Show More
@@ -680,11 +680,9 b' def bootstrapcontinue(ui, repo, parentct' | |||||
680 | if action in ('f', 'fold'): |
|
680 | if action in ('f', 'fold'): | |
681 | message = 'fold-temp-revision %s' % currentnode |
|
681 | message = 'fold-temp-revision %s' % currentnode | |
682 | else: |
|
682 | else: | |
683 |
message = ctx.description() |
|
683 | message = ctx.description() | |
684 |
|
|
684 | editopt = action in ('e', 'edit', 'm', 'mess') | |
685 |
|
|
685 | editor = cmdutil.getcommiteditor(edit=editopt) | |
686 | else: |
|
|||
687 | editor = False |
|
|||
688 | commit = commitfuncfor(repo, ctx) |
|
686 | commit = commitfuncfor(repo, ctx) | |
689 | new = commit(text=message, user=ctx.user(), |
|
687 | new = commit(text=message, user=ctx.user(), | |
690 | date=ctx.date(), extra=ctx.extra(), |
|
688 | date=ctx.date(), extra=ctx.extra(), |
@@ -156,7 +156,19 b' check histedit_source' | |||||
156 | update: 1 new changesets (update) |
|
156 | update: 1 new changesets (update) | |
157 | hist: 1 remaining (histedit --continue) |
|
157 | hist: 1 remaining (histedit --continue) | |
158 |
|
158 | |||
159 | $ HGEDITOR='true' hg histedit --continue |
|
159 | (test also that editor is invoked if histedit is continued for | |
|
160 | "edit" action) | |||
|
161 | ||||
|
162 | $ HGEDITOR='cat' hg histedit --continue | |||
|
163 | f | |||
|
164 | ||||
|
165 | ||||
|
166 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |||
|
167 | HG: Leave message empty to abort commit. | |||
|
168 | HG: -- | |||
|
169 | HG: user: test | |||
|
170 | HG: branch 'default' | |||
|
171 | HG: added f | |||
160 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
172 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
161 | saved backup bundle to $TESTTMP/r/.hg/strip-backup/b5f70786f9b0-backup.hg (glob) |
|
173 | saved backup bundle to $TESTTMP/r/.hg/strip-backup/b5f70786f9b0-backup.hg (glob) | |
162 |
|
174 | |||
@@ -271,6 +283,25 b' check saving last-message.txt, at first' | |||||
271 |
|
283 | |||
272 | check saving last-message.txt |
|
284 | check saving last-message.txt | |
273 |
|
285 | |||
|
286 | (test also that editor is invoked if histedit is continued for "message" | |||
|
287 | action) | |||
|
288 | ||||
|
289 | $ HGEDITOR=cat hg histedit --continue | |||
|
290 | f | |||
|
291 | ||||
|
292 | ||||
|
293 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |||
|
294 | HG: Leave message empty to abort commit. | |||
|
295 | HG: -- | |||
|
296 | HG: user: test | |||
|
297 | HG: branch 'default' | |||
|
298 | HG: added f | |||
|
299 | transaction abort! | |||
|
300 | rollback completed | |||
|
301 | note: commit message saved in .hg/last-message.txt | |||
|
302 | abort: pretxncommit.unexpectedabort hook exited with status 1 | |||
|
303 | [255] | |||
|
304 | ||||
274 | $ cat >> .hg/hgrc <<EOF |
|
305 | $ cat >> .hg/hgrc <<EOF | |
275 | > [hooks] |
|
306 | > [hooks] | |
276 | > pretxncommit.unexpectedabort = |
|
307 | > pretxncommit.unexpectedabort = |
General Comments 0
You need to be logged in to leave comments.
Login now