Show More
@@ -402,11 +402,10 b' def message(ui, repo, ctx, ha, opts):' | |||||
402 | raise error.InterventionRequired( |
|
402 | raise error.InterventionRequired( | |
403 | _('Fix up the change and run hg histedit --continue')) |
|
403 | _('Fix up the change and run hg histedit --continue')) | |
404 | message = oldctx.description() |
|
404 | message = oldctx.description() | |
405 | def editor(repo, ctx, subs): |
|
|||
406 | return ui.edit(ctx.description() + "\n", ctx.user()) |
|
|||
407 | commit = commitfuncfor(repo, oldctx) |
|
405 | commit = commitfuncfor(repo, oldctx) | |
408 | new = commit(text=message, user=oldctx.user(), date=oldctx.date(), |
|
406 | new = commit(text=message, user=oldctx.user(), date=oldctx.date(), | |
409 |
extra=oldctx.extra(), |
|
407 | extra=oldctx.extra(), | |
|
408 | editor=cmdutil.getcommiteditor(edit=True)) | |||
410 | newctx = repo[new] |
|
409 | newctx = repo[new] | |
411 | if oldctx.node() != newctx.node(): |
|
410 | if oldctx.node() != newctx.node(): | |
412 | return newctx, [(oldctx.node(), (new,))] |
|
411 | return newctx, [(oldctx.node(), (new,))] |
@@ -240,20 +240,35 b' check saving last-message.txt, at first' | |||||
240 | > pretxncommit.unexpectedabort = false |
|
240 | > pretxncommit.unexpectedabort = false | |
241 | > EOF |
|
241 | > EOF | |
242 |
|
242 | |||
|
243 | $ hg status --rev '1fd3b2fe7754^1' --rev 1fd3b2fe7754 | |||
|
244 | A f | |||
|
245 | ||||
243 | $ rm -f .hg/last-message.txt |
|
246 | $ rm -f .hg/last-message.txt | |
244 |
$ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit tip --commands - 2>&1 << EOF |
|
247 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit tip --commands - 2>&1 << EOF | |
245 | > mess 1fd3b2fe7754 f |
|
248 | > mess 1fd3b2fe7754 f | |
246 | > EOF |
|
249 | > EOF | |
247 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
250 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
251 | adding f | |||
248 | ==== before editing |
|
252 | ==== before editing | |
249 | f |
|
253 | f | |
|
254 | ||||
|
255 | ||||
|
256 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |||
|
257 | HG: Leave message empty to abort commit. | |||
|
258 | HG: -- | |||
|
259 | HG: user: test | |||
|
260 | HG: branch 'default' | |||
|
261 | HG: added f | |||
250 |
=== |
|
262 | ==== | |
251 | transaction abort! |
|
263 | transaction abort! | |
252 | rollback completed |
|
264 | rollback completed | |
253 | note: commit message saved in .hg/last-message.txt |
|
265 | note: commit message saved in .hg/last-message.txt | |
254 | abort: pretxncommit.unexpectedabort hook exited with status 1 |
|
266 | abort: pretxncommit.unexpectedabort hook exited with status 1 | |
|
267 | [255] | |||
255 | $ cat .hg/last-message.txt |
|
268 | $ cat .hg/last-message.txt | |
256 | f |
|
269 | f | |
|
270 | ||||
|
271 | ||||
257 | check saving last-message.txt |
|
272 | check saving last-message.txt | |
258 |
|
273 | |||
259 | $ cat >> .hg/hgrc <<EOF |
|
274 | $ cat >> .hg/hgrc <<EOF |
General Comments 0
You need to be logged in to leave comments.
Login now