##// END OF EJS Templates
test-rollback: tinker a bit to make it easier to add more tests.
Greg Ward -
r15108:4c1ec0fe default
parent child Browse files
Show More
@@ -1,9 +1,9 b''
1
1 setup repo
2 $ hg init t
2 $ hg init t
3 $ cd t
3 $ cd t
4 $ echo a > a
4 $ echo a > a
5 $ hg add a
5 $ hg commit -Am'add a'
6 $ hg commit -m "test"
6 adding a
7 $ hg verify
7 $ hg verify
8 checking changesets
8 checking changesets
9 checking manifests
9 checking manifests
@@ -11,12 +11,14 b''
11 checking files
11 checking files
12 1 files, 1 changesets, 1 total revisions
12 1 files, 1 changesets, 1 total revisions
13 $ hg parents
13 $ hg parents
14 changeset: 0:acb14030fe0a
14 changeset: 0:1f0dee641bb7
15 tag: tip
15 tag: tip
16 user: test
16 user: test
17 date: Thu Jan 01 00:00:00 1970 +0000
17 date: Thu Jan 01 00:00:00 1970 +0000
18 summary: test
18 summary: add a
19
19
20
21 rollback to null revision
20 $ hg status
22 $ hg status
21 $ hg rollback
23 $ hg rollback
22 repository tip rolled back to revision -1 (undo commit)
24 repository tip rolled back to revision -1 (undo commit)
@@ -31,22 +33,23 b''
31 $ hg status
33 $ hg status
32 A a
34 A a
33
35
34 Test issue 902
36 Two changesets this time so we rollback to a real changeset
37 $ hg commit -m'add a again'
38 $ echo a >> a
39 $ hg commit -m'modify a'
35
40
36 $ hg commit -m "test2"
41 Test issue 902 (current branch is preserved)
37 $ hg branch test
42 $ hg branch test
38 marked working directory as branch test
43 marked working directory as branch test
39 $ hg rollback
44 $ hg rollback
40 repository tip rolled back to revision -1 (undo commit)
45 repository tip rolled back to revision 0 (undo commit)
41 working directory now based on revision -1
46 working directory now based on revision 0
42 $ hg branch
47 $ hg branch
43 default
48 default
44
49
45 Test issue 1635 (commit message saved)
50 Test issue 1635 (commit message saved)
46 .hg/last-message.txt:
47
48 $ cat .hg/last-message.txt ; echo
51 $ cat .hg/last-message.txt ; echo
49 test2
52 modify a
50
53
51 Test rollback of hg before issue 902 was fixed
54 Test rollback of hg before issue 902 was fixed
52
55
@@ -55,9 +58,9 b' Test rollback of hg before issue 902 was'
55 marked working directory as branch test
58 marked working directory as branch test
56 $ rm .hg/undo.branch
59 $ rm .hg/undo.branch
57 $ hg rollback
60 $ hg rollback
58 repository tip rolled back to revision -1 (undo commit)
61 repository tip rolled back to revision 0 (undo commit)
59 named branch could not be reset, current branch is still: test
62 named branch could not be reset, current branch is still: test
60 working directory now based on revision -1
63 working directory now based on revision 0
61 $ hg branch
64 $ hg branch
62 test
65 test
63
66
@@ -69,9 +72,6 b' rollback by pretxncommit saves commit me'
69 rollback completed
72 rollback completed
70 abort: pretxncommit hook exited with status * (glob)
73 abort: pretxncommit hook exited with status * (glob)
71 [255]
74 [255]
72
73 .hg/last-message.txt:
74
75 $ cat .hg/last-message.txt ; echo
75 $ cat .hg/last-message.txt ; echo
76 precious commit message
76 precious commit message
77
77
@@ -102,18 +102,18 b' test rollback on served repository'
102 adding changesets
102 adding changesets
103 adding manifests
103 adding manifests
104 adding file changes
104 adding file changes
105 added 1 changesets with 1 changes to 1 files
105 added 2 changesets with 2 changes to 1 files
106 updating to branch test
106 updating to branch default
107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
108 $ cd u
108 $ cd u
109 $ hg id default
109 $ hg id default
110 1df294f7b1a2
110 8902593132ae
111
111
112 now rollback and observe that 'hg serve' reloads the repository and
112 now rollback and observe that 'hg serve' reloads the repository and
113 presents the correct tip changeset:
113 presents the correct tip changeset:
114
114
115 $ hg -R ../t rollback
115 $ hg -R ../t rollback
116 repository tip rolled back to revision -1 (undo commit)
116 repository tip rolled back to revision 0 (undo commit)
117 working directory now based on revision -1
117 working directory now based on revision 0
118 $ hg id default
118 $ hg id default
119 000000000000
119 23b0221f3370
General Comments 0
You need to be logged in to leave comments. Login now