Mercurial > evolve
comparison tests/test-prune.t @ 1471:4140d680784e
evolve: (issue4386) cleanup, split, fold and bijection in `hg prune`
Before this patch, the prune command was splitting and folding implicitely
based on the number of successors and precursors. This patch makes the
two behavior explicit by requesting a flag to perform a split or a fold.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Thu, 25 Jun 2015 13:33:50 -0700 |
parents | 37c505975e28 |
children | 42c30774e63d |
comparison
equal
deleted
inserted
replaced
1470:c3f6e97c71b1 | 1471:4140d680784e |
---|---|
30 o 1:7c3bad9141dc[] (stable/draft) add b | 30 o 1:7c3bad9141dc[] (stable/draft) add b |
31 | | 31 | |
32 o 0:1f0dee641bb7[] (stable/public) add a | 32 o 0:1f0dee641bb7[] (stable/public) add a |
33 | 33 |
34 | 34 |
35 Check arguments exclusive to each other | |
36 --------------------------------------- | |
37 | |
38 $ hg prune --fold --biject | |
39 abort: can only specify one of biject, fold | |
40 [255] | |
41 $ hg prune --split --fold | |
42 abort: can only specify one of fold, split | |
43 [255] | |
44 $ hg prune --split --fold --biject | |
45 abort: can only specify one of biject, fold, split | |
46 [255] | |
47 | |
35 Check simple case | 48 Check simple case |
36 ---------------------------- | 49 ---------------------------- |
37 | 50 |
38 prune current and tip changeset | 51 prune current and tip changeset |
39 | 52 |
148 | 161 |
149 | 162 |
150 one old, two new | 163 one old, two new |
151 | 164 |
152 $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")' | 165 $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")' |
166 abort: please add --split if you want to do a split | |
167 [255] | |
168 $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")' --split | |
153 1 changesets pruned | 169 1 changesets pruned |
154 $ hg debugobsolete | 170 $ hg debugobsolete |
155 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} | 171 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} |
156 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) | 172 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) |
157 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) | 173 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) |
188 00ded550b1e28bba454bd34cec1269d22cf3ef25 aa96dc3f04c2c2341fe6880aeb6dc9fbffff9ef9 8ee176ff1d4b2034ce51e3efc579c2de346b631d 0 (*) {'user': 'test'} (glob) | 204 00ded550b1e28bba454bd34cec1269d22cf3ef25 aa96dc3f04c2c2341fe6880aeb6dc9fbffff9ef9 8ee176ff1d4b2034ce51e3efc579c2de346b631d 0 (*) {'user': 'test'} (glob) |
189 | 205 |
190 two old, one new: | 206 two old, one new: |
191 | 207 |
192 $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nB")' | 208 $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nB")' |
209 abort: please add --fold if you want to do a fold | |
210 [255] | |
211 $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nB")' --fold | |
193 2 changesets pruned | 212 2 changesets pruned |
194 $ hg debugobsolete | 213 $ hg debugobsolete |
195 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} | 214 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} |
196 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) | 215 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) |
197 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) | 216 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) |