Mercurial > evolve
comparison tests/test-prune.t @ 4045:821e4be40c6c
prune: replace --biject with --pair
People have been complaining about `--biject` being to obscure for a while.
A recent discussion with Pulkit Goyal and Dan Villiom Podlaski Christiansen
produce some new concrete proposal that we liked. We eventually settle on using
`--pair`. The `--biject` flag will be kept as an alias for a while.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 30 Aug 2018 19:50:39 +0200 |
parents | 54a469cd5b26 |
children | dc247e648f43 0f2305921e4d |
comparison
equal
deleted
inserted
replaced
4044:c0fbe70f2e48 | 4045:821e4be40c6c |
---|---|
33 | 33 |
34 | 34 |
35 Check arguments exclusive to each other | 35 Check arguments exclusive to each other |
36 --------------------------------------- | 36 --------------------------------------- |
37 | 37 |
38 $ hg prune --fold --pair | |
39 abort: can only specify one of pair, fold | |
40 [255] | |
38 $ hg prune --fold --biject | 41 $ hg prune --fold --biject |
39 abort: can only specify one of biject, fold | 42 abort: nothing to prune |
40 [255] | 43 [255] |
41 $ hg prune --split --fold | 44 $ hg prune --split --fold |
42 abort: can only specify one of fold, split | 45 abort: can only specify one of fold, split |
43 [255] | 46 [255] |
47 $ hg prune --split --fold --pair | |
48 abort: can only specify one of pair, fold, split | |
49 [255] | |
44 $ hg prune --split --fold --biject | 50 $ hg prune --split --fold --biject |
45 abort: can only specify one of biject, fold, split | 51 abort: can only specify one of fold, split |
46 [255] | 52 [255] |
47 | 53 |
48 Check simple case | 54 Check simple case |
49 ---------------------------- | 55 ---------------------------- |
50 | 56 |
194 | 200 |
195 two old, two new (should be denied) | 201 two old, two new (should be denied) |
196 | 202 |
197 $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nD")' -s 'desc("add nC")' | 203 $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nD")' -s 'desc("add nC")' |
198 abort: Can't use multiple successors for multiple precursors | 204 abort: Can't use multiple successors for multiple precursors |
199 (use --biject to mark a series as a replacement for another) | 205 (use --pair to mark a series as a replacement for another) |
200 [255] | 206 [255] |
201 $ hg debugobsolete | 207 $ hg debugobsolete |
202 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'} | 208 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'} |
203 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} | 209 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} |
204 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} | 210 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} |
221 bb5e90a7ea1f3b4b38b23150a4a597b6146d70ef 6e8148413dd541855b72a920a90c06fca127c7e7 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} | 227 bb5e90a7ea1f3b4b38b23150a4a597b6146d70ef 6e8148413dd541855b72a920a90c06fca127c7e7 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} |
222 00ded550b1e28bba454bd34cec1269d22cf3ef25 aa96dc3f04c2c2341fe6880aeb6dc9fbffff9ef9 8ee176ff1d4b2034ce51e3efc579c2de346b631d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} | 228 00ded550b1e28bba454bd34cec1269d22cf3ef25 aa96dc3f04c2c2341fe6880aeb6dc9fbffff9ef9 8ee176ff1d4b2034ce51e3efc579c2de346b631d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} |
223 814c38b95e72dfe2cbf675b1649ea9d780c89a80 6f6f25e4f748d8f7571777e6e168aedf50350ce8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'} | 229 814c38b95e72dfe2cbf675b1649ea9d780c89a80 6f6f25e4f748d8f7571777e6e168aedf50350ce8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'} |
224 354011cd103f58bbbd9091a3cee6d6a6bd0dddf7 6f6f25e4f748d8f7571777e6e168aedf50350ce8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} | 230 354011cd103f58bbbd9091a3cee6d6a6bd0dddf7 6f6f25e4f748d8f7571777e6e168aedf50350ce8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} |
225 | 231 |
226 two old, two new with --biject | 232 two old, two new with --pair |
227 | 233 |
228 $ hg up 0 | 234 $ hg up 0 |
229 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | 235 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
230 $ mkcommit n1 | 236 $ mkcommit n1 |
231 created new head | 237 created new head |
232 $ mkcommit n2 | 238 $ mkcommit n2 |
233 | 239 |
234 $ hg prune 'desc("add n1")::desc("add n2")' -s 'desc("add nD")::desc("add nE")' --biject | 240 $ hg prune 'desc("add n1")::desc("add n2")' -s 'desc("add nD")::desc("add nE")' --pair |
235 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 241 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
236 working directory now at 1f0dee641bb7 | 242 working directory now at 1f0dee641bb7 |
237 2 changesets pruned | 243 2 changesets pruned |
238 $ hg debugobsolete | 244 $ hg debugobsolete |
239 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'} | 245 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'} |