Show More
@@ -220,13 +220,14 b' secondaryactions = set()' | |||||
220 | tertiaryactions = set() |
|
220 | tertiaryactions = set() | |
221 | internalactions = set() |
|
221 | internalactions = set() | |
222 |
|
222 | |||
223 | def geteditcomment(first, last): |
|
223 | def geteditcomment(ui, first, last): | |
224 | """ construct the editor comment |
|
224 | """ construct the editor comment | |
225 | The comment includes:: |
|
225 | The comment includes:: | |
226 | - an intro |
|
226 | - an intro | |
227 | - sorted primary commands |
|
227 | - sorted primary commands | |
228 | - sorted short commands |
|
228 | - sorted short commands | |
229 | - sorted long commands |
|
229 | - sorted long commands | |
|
230 | - additional hints | |||
230 |
|
231 | |||
231 | Commands are only included once. |
|
232 | Commands are only included once. | |
232 | """ |
|
233 | """ | |
@@ -255,8 +256,14 b' Commands:' | |||||
255 | addverb(v) |
|
256 | addverb(v) | |
256 | actions.append('') |
|
257 | actions.append('') | |
257 |
|
258 | |||
258 | return ''.join(['# %s\n' % l if l else '#\n' |
|
259 | hints = [] | |
259 | for l in ((intro % (first, last)).split('\n')) + actions]) |
|
260 | if ui.configbool('histedit', 'dropmissing'): | |
|
261 | hints.append("Deleting a changeset from the list " | |||
|
262 | "will DISCARD it from the edited history!") | |||
|
263 | ||||
|
264 | lines = (intro % (first, last)).split('\n') + actions + hints | |||
|
265 | ||||
|
266 | return ''.join(['# %s\n' % l if l else '#\n' for l in lines]) | |||
260 |
|
267 | |||
261 | class histeditstate(object): |
|
268 | class histeditstate(object): | |
262 | def __init__(self, repo, parentctxnode=None, actions=None, keep=None, |
|
269 | def __init__(self, repo, parentctxnode=None, actions=None, keep=None, | |
@@ -1193,7 +1200,8 b' def _aborthistedit(ui, repo, state):' | |||||
1193 | def _edithisteditplan(ui, repo, state, rules): |
|
1200 | def _edithisteditplan(ui, repo, state, rules): | |
1194 | state.read() |
|
1201 | state.read() | |
1195 | if not rules: |
|
1202 | if not rules: | |
1196 |
comment = geteditcomment( |
|
1203 | comment = geteditcomment(ui, | |
|
1204 | node.short(state.parentctxnode), | |||
1197 | node.short(state.topmost)) |
|
1205 | node.short(state.topmost)) | |
1198 | rules = ruleeditor(repo, ui, state.actions, comment) |
|
1206 | rules = ruleeditor(repo, ui, state.actions, comment) | |
1199 | else: |
|
1207 | else: | |
@@ -1234,7 +1242,7 b' def _newhistedit(ui, repo, state, revs, ' | |||||
1234 |
|
1242 | |||
1235 | ctxs = [repo[r] for r in revs] |
|
1243 | ctxs = [repo[r] for r in revs] | |
1236 | if not rules: |
|
1244 | if not rules: | |
1237 | comment = geteditcomment(node.short(root), node.short(topmost)) |
|
1245 | comment = geteditcomment(ui, node.short(root), node.short(topmost)) | |
1238 | actions = [pick(state, r) for r in revs] |
|
1246 | actions = [pick(state, r) for r in revs] | |
1239 | rules = ruleeditor(repo, ui, actions, comment) |
|
1247 | rules = ruleeditor(repo, ui, actions, comment) | |
1240 | else: |
|
1248 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now