tests/test-rollback.out
author Greg Ward <greg-hg@gerg.ca>
Tue, 24 Nov 2009 21:08:40 -0500
changeset 9935 48b81d9bca8d
parent 9934 720f70b720d3
child 10081 a5f3f9b1c42a
permissions -rw-r--r--
commit: if relevant, tell user their commit message was saved. (issue1635) Specifically, if: 1) the user edited the message (it didn't come straight from -m) and 2) the commit was aborted by an exception then the saved commit message in .hg/last-message.txt could come in handy, so mention it with a ui.write(). This doesn't help users who manually rollback to amend a changeset: the fact that the message was saved to .hg/last-message.txt is invisible in that case.

checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
changeset:   0:0acdaf898367
tag:         tip
user:        test
date:        Mon Jan 12 13:46:40 1970 +0000
summary:     test

rolling back last transaction
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
A a
% Test issue 902
marked working directory as branch test
rolling back last transaction
default
% Test issue 1635 (commit message saved)
.hg/last-message.txt:
test2
% Test rollback of hg before issue 902 was fixed
marked working directory as branch test
rolling back last transaction
Named branch could not be reset, current branch still is: test
test
% rollback by pretxncommit saves commit message (issue 1635)
transaction abort!
rollback completed
abort: pretxncommit hook exited with status 1
.hg/last-message.txt:
precious commit message
% same thing, but run $EDITOR
transaction abort!
rollback completed
note: commit message saved in .hg/last-message.txt
abort: pretxncommit hook exited with status 1
.hg/last-message.txt:
another precious commit message