##// END OF EJS Templates
chistedit: support histedit.summary-template in curses histedit plan...
Kyle Lippincott -
r45057:ad5a10f4 default
parent child Browse files
Show More
@@ -1113,7 +1113,8 b' def screen_size():'
1113 1113
1114 1114
1115 1115 class histeditrule(object):
1116 def __init__(self, ctx, pos, action=b'pick'):
1116 def __init__(self, ui, ctx, pos, action=b'pick'):
1117 self.ui = ui
1117 1118 self.ctx = ctx
1118 1119 self.action = action
1119 1120 self.origpos = pos
@@ -1153,6 +1154,14 b' class histeditrule(object):'
1153 1154
1154 1155 @property
1155 1156 def desc(self):
1157 summary = (
1158 cmdutil.rendertemplate(
1159 self.ctx, self.ui.config(b'histedit', b'summary-template')
1160 )
1161 or b''
1162 )
1163 if summary:
1164 return summary
1156 1165 # This is split off from the prefix property so that we can
1157 1166 # separately make the description for 'roll' red (since it
1158 1167 # will get discarded).
@@ -1700,7 +1709,7 b' def _chistedit(ui, repo, freeargs, opts)'
1700 1709
1701 1710 ctxs = []
1702 1711 for i, r in enumerate(revs):
1703 ctxs.append(histeditrule(repo[r], i))
1712 ctxs.append(histeditrule(ui, repo[r], i))
1704 1713 # Curses requires setting the locale or it will default to the C
1705 1714 # locale. This sets the locale to the user's default system
1706 1715 # locale.
General Comments 0
You need to be logged in to leave comments. Login now