Show More
@@ -525,9 +525,10 b' class histeditaction(object):' | |||||
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 |
@@ -104,6 +104,32 b' test customization of revision summary' | |||||
104 | # |
|
104 | # | |
105 |
|
105 | |||
106 |
|
106 | |||
|
107 | colors in the custom template don't show up in the editor | |||
|
108 | $ HGEDITOR=cat hg histedit 177f92b77385 --color=debug \ | |||
|
109 | > --config histedit.summary-template='I am rev {label("rev", rev)}' | |||
|
110 | pick 177f92b77385 I am rev [rev|2] | |||
|
111 | pick 055a42cdd887 I am rev [rev|3] | |||
|
112 | pick e860deea161a I am rev [rev|4] | |||
|
113 | pick 652413bf663e I am rev [rev|5] | |||
|
114 | ||||
|
115 | # Edit history between 177f92b77385 and 652413bf663e | |||
|
116 | # | |||
|
117 | # Commits are listed from least to most recent | |||
|
118 | # | |||
|
119 | # You can reorder changesets by reordering the lines | |||
|
120 | # | |||
|
121 | # Commands: | |||
|
122 | # | |||
|
123 | # e, edit = use commit, but stop for amending | |||
|
124 | # m, mess = edit commit message without changing commit content | |||
|
125 | # p, pick = use commit | |||
|
126 | # b, base = checkout changeset and apply further changesets from there | |||
|
127 | # d, drop = remove commit from history | |||
|
128 | # f, fold = use commit, but combine it with the one above | |||
|
129 | # r, roll = like fold, but discard this commit's description and date | |||
|
130 | # | |||
|
131 | ||||
|
132 | ||||
107 | edit the history |
|
133 | edit the history | |
108 | (use a hacky editor to check histedit-last-edit.txt backup) |
|
134 | (use a hacky editor to check histedit-last-edit.txt backup) | |
109 |
|
135 |
General Comments 0
You need to be logged in to leave comments.
Login now