Mercurial > hg
comparison tests/test-histedit-edit.t @ 44733:c6d31e659a28
commit: tell user what to do with .hg/last-message.txt
I have always assumed that the message will be reused by the next `hg
commit`, but it seems it's just silently dropped on the next
commit. Let's try to be more helpful by telling the user that they
have to manually tell hg to reuse it.
The file will still be lost if the user runs some other operation in
between (like a non-in-memory rebase). That will be fixed once we've
switched all operations to be in-memory :)
I didn't include `$(hg root)/` in the path in the message to the user
because that would have made the message too long. Hopefully the user
will figure that part out themselves.
Differential Revision: https://phab.mercurial-scm.org/D8463
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 20 Apr 2020 14:37:10 -0700 |
parents | 15d2afa31e57 |
children | a736ab681b78 |
comparison
equal
deleted
inserted
replaced
44732:f44a7d8660ea | 44733:c6d31e659a28 |
---|---|
371 HG: added f | 371 HG: added f |
372 ==== | 372 ==== |
373 transaction abort! | 373 transaction abort! |
374 rollback completed | 374 rollback completed |
375 note: commit message saved in .hg/last-message.txt | 375 note: commit message saved in .hg/last-message.txt |
376 note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it | |
376 abort: pretxncommit.unexpectedabort hook exited with status 1 | 377 abort: pretxncommit.unexpectedabort hook exited with status 1 |
377 [255] | 378 [255] |
378 $ cat .hg/last-message.txt | 379 $ cat .hg/last-message.txt |
379 f | 380 f |
380 | 381 |
395 HG: branch 'default' | 396 HG: branch 'default' |
396 HG: added f | 397 HG: added f |
397 transaction abort! | 398 transaction abort! |
398 rollback completed | 399 rollback completed |
399 note: commit message saved in .hg/last-message.txt | 400 note: commit message saved in .hg/last-message.txt |
401 note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it | |
400 abort: pretxncommit.unexpectedabort hook exited with status 1 | 402 abort: pretxncommit.unexpectedabort hook exited with status 1 |
401 [255] | 403 [255] |
402 | 404 |
403 $ cat >> .hg/hgrc <<EOF | 405 $ cat >> .hg/hgrc <<EOF |
404 > [hooks] | 406 > [hooks] |