comparison tests/test-backout.t @ 12316:4134686b83e1

tests: add exit codes to unified tests
author Matt Mackall <mpm@selenic.com>
date Thu, 16 Sep 2010 17:51:32 -0500
parents db969ebdebd9
children 92e30e135581
comparison
equal deleted inserted replaced
12315:ca58f6475f1d 12316:4134686b83e1
5 5
6 # should complain 6 # should complain
7 7
8 $ hg backout 8 $ hg backout
9 abort: please specify a revision to backout 9 abort: please specify a revision to backout
10 [255]
10 $ hg backout -r 0 0 11 $ hg backout -r 0 0
11 abort: please specify just one revision 12 abort: please specify just one revision
13 [255]
12 14
13 # basic operation 15 # basic operation
14 16
15 $ echo a > a 17 $ echo a > a
16 $ hg commit -d '0 0' -A -m a 18 $ hg commit -d '0 0' -A -m a
67 69
68 should fail 70 should fail
69 71
70 $ hg backout 1 72 $ hg backout 1
71 abort: cannot backout change on a different branch 73 abort: cannot backout change on a different branch
74 [255]
72 $ echo c > c 75 $ echo c > c
73 $ hg ci -Am2 76 $ hg ci -Am2
74 adding c 77 adding c
75 created new head 78 created new head
76 79
77 should fail 80 should fail
78 81
79 $ hg backout 1 82 $ hg backout 1
80 abort: cannot backout change on a different branch 83 abort: cannot backout change on a different branch
84 [255]
81 85
82 # backout with merge 86 # backout with merge
83 87
84 $ cd .. 88 $ cd ..
85 $ hg init merge 89 $ hg init merge
136 $ hg locate b 140 $ hg locate b
137 b 141 b
138 $ hg update -C tip 142 $ hg update -C tip
139 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 143 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
140 $ hg locate b 144 $ hg locate b
145 [1]
141 146
142 $ cd .. 147 $ cd ..
143 $ hg init m 148 $ hg init m
144 $ cd m 149 $ cd m
145 $ echo a > a 150 $ echo a > a
164 169
165 # backout of merge should fail 170 # backout of merge should fail
166 171
167 $ hg backout 4 172 $ hg backout 4
168 abort: cannot backout a merge changeset without --parent 173 abort: cannot backout a merge changeset without --parent
174 [255]
169 175
170 # backout of merge with bad parent should fail 176 # backout of merge with bad parent should fail
171 177
172 $ hg backout --parent 0 4 178 $ hg backout --parent 0 4
173 abort: cb9a9f314b8b is not a parent of b2f3bb92043e 179 abort: cb9a9f314b8b is not a parent of b2f3bb92043e
180 [255]
174 181
175 # backout of non-merge with parent should fail 182 # backout of non-merge with parent should fail
176 183
177 $ hg backout --parent 0 3 184 $ hg backout --parent 0 3
178 abort: cannot use --parent on non-merge changeset 185 abort: cannot use --parent on non-merge changeset
186 [255]
179 187
180 # backout with valid parent should be ok 188 # backout with valid parent should be ok
181 189
182 $ hg backout -d '5 0' --parent 2 4 190 $ hg backout -d '5 0' --parent 2 4
183 removing d 191 removing d