##// END OF EJS Templates
configitems: register the 'histedit.linelen' config
Boris Feld -
r34474:12c06837 default
parent child Browse files
Show More
@@ -221,6 +221,9 b" configitem('histedit', 'defaultrev',"
221 configitem('histedit', 'dropmissing',
221 configitem('histedit', 'dropmissing',
222 default=False,
222 default=False,
223 )
223 )
224 configitem('histedit', 'linelen',
225 default=80,
226 )
224
227
225 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
228 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
226 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
229 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
@@ -452,7 +455,7 b' class histeditaction(object):'
452 line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary)
455 line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary)
453 # trim to 75 columns by default so it's not stupidly wide in my editor
456 # trim to 75 columns by default so it's not stupidly wide in my editor
454 # (the 5 more are left for verb)
457 # (the 5 more are left for verb)
455 maxlen = self.repo.ui.configint('histedit', 'linelen', default=80)
458 maxlen = self.repo.ui.configint('histedit', 'linelen')
456 maxlen = max(maxlen, 22) # avoid truncating hash
459 maxlen = max(maxlen, 22) # avoid truncating hash
457 return util.ellipsis(line, maxlen)
460 return util.ellipsis(line, maxlen)
458
461
General Comments 0
You need to be logged in to leave comments. Login now