Mercurial > hg
comparison hgext/histedit.py @ 29468:04b68ce5e964
histedit: use _getsummary in torule
This patch uses our common method instead of duplicating logic.
author | Sean Farley <sean@farley.io> |
---|---|
date | Fri, 27 May 2016 14:02:36 -0700 |
parents | 4c4232e51167 |
children | ffa194c3a83c |
comparison
equal
deleted
inserted
replaced
29467:4c4232e51167 | 29468:04b68ce5e964 |
---|---|
418 | 418 |
419 by default lines are in the form: | 419 by default lines are in the form: |
420 <hash> <rev> <summary> | 420 <hash> <rev> <summary> |
421 """ | 421 """ |
422 ctx = self.repo[self.node] | 422 ctx = self.repo[self.node] |
423 summary = '' | 423 summary = _getsummary(ctx) |
424 if ctx.description(): | |
425 summary = ctx.description().splitlines()[0] | |
426 line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary) | 424 line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary) |
427 # trim to 75 columns by default so it's not stupidly wide in my editor | 425 # trim to 75 columns by default so it's not stupidly wide in my editor |
428 # (the 5 more are left for verb) | 426 # (the 5 more are left for verb) |
429 maxlen = self.repo.ui.configint('histedit', 'linelen', default=80) | 427 maxlen = self.repo.ui.configint('histedit', 'linelen', default=80) |
430 maxlen = max(maxlen, 22) # avoid truncating hash | 428 maxlen = max(maxlen, 22) # avoid truncating hash |