Show More
@@ -214,21 +214,32 class _constraints(object): | |||
|
214 | 214 | # leave the attribute unspecified. |
|
215 | 215 | testedwith = 'internal' |
|
216 | 216 | |
|
217 | def geteditcomment(first, last): | |
|
218 | """ construct the editor comment | |
|
219 | The comment includes:: | |
|
220 | - an intro | |
|
221 | - short commands | |
|
222 | ||
|
223 | Commands are only included once. | |
|
224 | """ | |
|
225 | intro = _("""Edit history between %s and %s | |
|
226 | ||
|
227 | Commits are listed from least to most recent | |
|
228 | ||
|
229 | Commands:""") | |
|
217 | 230 | # i18n: command names and abbreviations must remain untranslated |
|
218 | editcomment = _("""# Edit history between %s and %s | |
|
219 | # | |
|
220 | # Commits are listed from least to most recent | |
|
221 | # | |
|
222 | # Commands: | |
|
223 | # p, pick = use commit | |
|
224 | # e, edit = use commit, but stop for amending | |
|
225 | # f, fold = use commit, but combine it with the one above | |
|
226 | # r, roll = like fold, but discard this commit's description | |
|
227 | # d, drop = remove commit from history | |
|
228 | # m, mess = edit commit message without changing commit content | |
|
229 | # | |
|
231 | verbs = _(""" | |
|
232 | p, pick = use commit | |
|
233 | e, edit = use commit, but stop for amending | |
|
234 | f, fold = use commit, but combine it with the one above | |
|
235 | r, roll = like fold, but discard this commit's description | |
|
236 | d, drop = remove commit from history | |
|
237 | m, mess = edit commit message without changing commit content | |
|
230 | 238 | """) |
|
231 | 239 | |
|
240 | return ''.join(['# %s\n' % l if l else '#\n' | |
|
241 | for l in ((intro % (first, last) + verbs).split('\n'))]) | |
|
242 | ||
|
232 | 243 | class histeditstate(object): |
|
233 | 244 | def __init__(self, repo, parentctxnode=None, actions=None, keep=None, |
|
234 | 245 | topmost=None, replacements=None, lock=None, wlock=None): |
@@ -976,7 +987,7 def _histedit(ui, repo, state, *freeargs | |||
|
976 | 987 | elif goal == 'edit-plan': |
|
977 | 988 | state.read() |
|
978 | 989 | if not rules: |
|
979 |
comment = editcomment |
|
|
990 | comment = geteditcomment(node.short(state.parentctxnode), | |
|
980 | 991 | node.short(state.topmost)) |
|
981 | 992 | rules = ruleeditor(repo, ui, state.actions, comment) |
|
982 | 993 | else: |
@@ -1059,7 +1070,7 def _histedit(ui, repo, state, *freeargs | |||
|
1059 | 1070 | |
|
1060 | 1071 | ctxs = [repo[r] for r in revs] |
|
1061 | 1072 | if not rules: |
|
1062 |
comment = editcomment |
|
|
1073 | comment = geteditcomment(node.short(root), node.short(topmost)) | |
|
1063 | 1074 | actions = [pick(state, r) for r in revs] |
|
1064 | 1075 | rules = ruleeditor(repo, ui, actions, comment) |
|
1065 | 1076 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now