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