equal
deleted
inserted
replaced
219 default=configitems.dynamicdefault, |
219 default=configitems.dynamicdefault, |
220 ) |
220 ) |
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 |
227 # be specifying the version(s) of Mercurial they are tested with, or |
230 # be specifying the version(s) of Mercurial they are tested with, or |
228 # leave the attribute unspecified. |
231 # leave the attribute unspecified. |
450 ctx = self.repo[self.node] |
453 ctx = self.repo[self.node] |
451 summary = _getsummary(ctx) |
454 summary = _getsummary(ctx) |
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 |
459 def tostate(self): |
462 def tostate(self): |
460 """Print an action in format used by histedit state files |
463 """Print an action in format used by histedit state files |