Mercurial > hg
comparison hgext/histedit.py @ 45857:ec6ba70be853
tests: show how `hg histedit` can put color codes in histedit plan
Differential Revision: https://phab.mercurial-scm.org/D9323
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 16 Nov 2020 10:30:06 -0800 |
parents | 1f9736eb0e65 |
children | 62983988bbf5 |
comparison
equal
deleted
inserted
replaced
45856:8357e0e81bb7 | 45857:ec6ba70be853 |
---|---|
523 by default lines are in the form: | 523 by default lines are in the form: |
524 <hash> <rev> <summary> | 524 <hash> <rev> <summary> |
525 """ | 525 """ |
526 ctx = self.repo[self.node] | 526 ctx = self.repo[self.node] |
527 ui = self.repo.ui | 527 ui = self.repo.ui |
528 summary = cmdutil.rendertemplate( | 528 with ui.configoverride({}, b'histedit'): |
529 ctx, ui.config(b'histedit', b'summary-template') | 529 summary = cmdutil.rendertemplate( |
530 ) | 530 ctx, ui.config(b'histedit', b'summary-template') |
531 ) | |
531 summary = summary.splitlines()[0] | 532 summary = summary.splitlines()[0] |
532 line = b'%s %s %s' % (self.verb, ctx, summary) | 533 line = b'%s %s %s' % (self.verb, ctx, summary) |
533 # trim to 75 columns by default so it's not stupidly wide in my editor | 534 # trim to 75 columns by default so it's not stupidly wide in my editor |
534 # (the 5 more are left for verb) | 535 # (the 5 more are left for verb) |
535 maxlen = self.repo.ui.configint(b'histedit', b'linelen') | 536 maxlen = self.repo.ui.configint(b'histedit', b'linelen') |