Mercurial > hg-stable
changeset 15108:4c1ec0fe59d6
test-rollback: tinker a bit to make it easier to add more tests.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Wed, 14 Sep 2011 22:01:39 -0400 |
parents | 2433525a9e1e |
children | f7993be2c32f |
files | tests/test-rollback.t |
diffstat | 1 files changed, 23 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-rollback.t Thu Sep 15 15:03:54 2011 -0400 +++ b/tests/test-rollback.t Wed Sep 14 22:01:39 2011 -0400 @@ -1,9 +1,9 @@ - +setup repo $ hg init t $ cd t $ echo a > a - $ hg add a - $ hg commit -m "test" + $ hg commit -Am'add a' + adding a $ hg verify checking changesets checking manifests @@ -11,12 +11,14 @@ checking files 1 files, 1 changesets, 1 total revisions $ hg parents - changeset: 0:acb14030fe0a + changeset: 0:1f0dee641bb7 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 - summary: test + summary: add a + +rollback to null revision $ hg status $ hg rollback repository tip rolled back to revision -1 (undo commit) @@ -31,22 +33,23 @@ $ hg status A a -Test issue 902 +Two changesets this time so we rollback to a real changeset + $ hg commit -m'add a again' + $ echo a >> a + $ hg commit -m'modify a' - $ hg commit -m "test2" +Test issue 902 (current branch is preserved) $ hg branch test marked working directory as branch test $ hg rollback - repository tip rolled back to revision -1 (undo commit) - working directory now based on revision -1 + repository tip rolled back to revision 0 (undo commit) + working directory now based on revision 0 $ hg branch default Test issue 1635 (commit message saved) -.hg/last-message.txt: - $ cat .hg/last-message.txt ; echo - test2 + modify a Test rollback of hg before issue 902 was fixed @@ -55,9 +58,9 @@ marked working directory as branch test $ rm .hg/undo.branch $ hg rollback - repository tip rolled back to revision -1 (undo commit) + repository tip rolled back to revision 0 (undo commit) named branch could not be reset, current branch is still: test - working directory now based on revision -1 + working directory now based on revision 0 $ hg branch test @@ -69,9 +72,6 @@ rollback completed abort: pretxncommit hook exited with status * (glob) [255] - -.hg/last-message.txt: - $ cat .hg/last-message.txt ; echo precious commit message @@ -102,18 +102,18 @@ adding changesets adding manifests adding file changes - added 1 changesets with 1 changes to 1 files - updating to branch test + added 2 changesets with 2 changes to 1 files + updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd u $ hg id default - 1df294f7b1a2 + 8902593132ae now rollback and observe that 'hg serve' reloads the repository and presents the correct tip changeset: $ hg -R ../t rollback - repository tip rolled back to revision -1 (undo commit) - working directory now based on revision -1 + repository tip rolled back to revision 0 (undo commit) + working directory now based on revision 0 $ hg id default - 000000000000 + 23b0221f3370