Mercurial > evolve
comparison tests/test-prune.t @ 1239:8a06b32061ce
evolve: apply prune update before creating obsolescence markers
Prune used to compute the destination commit to update to after creating the
obsolescence markers. This is a commit to prevent a bug that would occur
with the changes in inhibit for transactions (next commit).
Indeed, with that change in inhibit, when creating the obsolescence markers in
prune, they would get inhibited right away and we wouldn't update to the first
non obsolete parent but stay on the same node as its obsolescence would have
been inhibited (bug).
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Thu, 02 Apr 2015 18:33:44 -0700 |
parents | 524dbc8ffeac |
children | e8e3dbddc198 |
comparison
equal
deleted
inserted
replaced
1238:ee695c7d1bf1 | 1239:8a06b32061ce |
---|---|
36 ---------------------------- | 36 ---------------------------- |
37 | 37 |
38 prune current and tip changeset | 38 prune current and tip changeset |
39 | 39 |
40 $ hg prune --user blah --date '1979-12-15' . | 40 $ hg prune --user blah --date '1979-12-15' . |
41 1 changesets pruned | |
42 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 41 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
43 (leaving bookmark BABAR) | 42 (leaving bookmark BABAR) |
44 working directory now at 47d2a3944de8 | 43 working directory now at 47d2a3944de8 |
44 1 changesets pruned | |
45 $ hg debugobsolete | 45 $ hg debugobsolete |
46 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} | 46 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} |
47 | 47 |
48 prune leaving instability behind | 48 prune leaving instability behind |
49 | 49 |
55 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) | 55 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) |
56 | 56 |
57 pruning multiple changeset at once | 57 pruning multiple changeset at once |
58 | 58 |
59 $ hg prune 2: | 59 $ hg prune 2: |
60 2 changesets pruned | |
61 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | 60 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
62 working directory now at 1f0dee641bb7 | 61 working directory now at 1f0dee641bb7 |
62 2 changesets pruned | |
63 $ hg debugobsolete | 63 $ hg debugobsolete |
64 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} | 64 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} |
65 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) | 65 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) |
66 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) | 66 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) |
67 47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob) | 67 47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob) |
116 one old, one new | 116 one old, one new |
117 | 117 |
118 $ hg up 'desc("add ee")' | 118 $ hg up 'desc("add ee")' |
119 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | 119 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
120 $ hg prune 'desc("add ee")' -s 'desc("add nE")' | 120 $ hg prune 'desc("add ee")' -s 'desc("add nE")' |
121 1 changesets pruned | |
122 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | 121 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
123 working directory now at 6e8148413dd5 | 122 working directory now at 6e8148413dd5 |
123 1 changesets pruned | |
124 $ hg debugobsolete | 124 $ hg debugobsolete |
125 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} | 125 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} |
126 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) | 126 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) |
127 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) | 127 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) |
128 47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob) | 128 47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob) |
206 $ mkcommit n1 | 206 $ mkcommit n1 |
207 created new head | 207 created new head |
208 $ mkcommit n2 | 208 $ mkcommit n2 |
209 | 209 |
210 $ hg prune 'desc("add n1")::desc("add n2")' -s 'desc("add nD")::desc("add nE")' --biject | 210 $ hg prune 'desc("add n1")::desc("add n2")' -s 'desc("add nD")::desc("add nE")' --biject |
211 2 changesets pruned | |
212 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 211 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
213 working directory now at 1f0dee641bb7 | 212 working directory now at 1f0dee641bb7 |
213 2 changesets pruned | |
214 $ hg debugobsolete | 214 $ hg debugobsolete |
215 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} | 215 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} |
216 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) | 216 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob) |
217 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) | 217 4538525df7e2b9f09423636c61ef63a4cb872a2d 0 {7c3bad9141dcb46ff89abf5f61856facd56e476c} (*) {'user': 'test'} (glob) |
218 47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob) | 218 47d2a3944de8b013de3be9578e8e344ea2e6c097 0 {4538525df7e2b9f09423636c61ef63a4cb872a2d} (*) {'user': 'test'} (glob) |
229 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 229 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
230 $ mkcommit n1 | 230 $ mkcommit n1 |
231 created new head | 231 created new head |
232 $ mkcommit n2 | 232 $ mkcommit n2 |
233 $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r . | 233 $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r . |
234 1 changesets pruned | |
235 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 234 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
236 working directory now at c7e58696a948 | 235 working directory now at c7e58696a948 |
236 1 changesets pruned | |
237 $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r . --bundle | 237 $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r . --bundle |
238 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 238 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
239 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/c7e58696a948-69ca36d3-backup.hg (glob) | 239 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/c7e58696a948-69ca36d3-backup.hg (glob) |
240 | 240 |
241 test hg prune --keep | 241 test hg prune --keep |
270 bookmark 'nostrip' deleted | 270 bookmark 'nostrip' deleted |
271 abort: nothing to prune | 271 abort: nothing to prune |
272 [255] | 272 [255] |
273 $ hg tag --remove --local a | 273 $ hg tag --remove --local a |
274 $ hg prune -B todelete | 274 $ hg prune -B todelete |
275 1 changesets pruned | |
276 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 275 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
277 (leaving bookmark todelete) | 276 (leaving bookmark todelete) |
278 working directory now at d62d843c9a01 | 277 working directory now at d62d843c9a01 |
279 bookmark 'todelete' deleted | 278 bookmark 'todelete' deleted |
279 1 changesets pruned | |
280 $ hg id -ir dcbb326fdec2 | 280 $ hg id -ir dcbb326fdec2 |
281 abort: hidden revision 'dcbb326fdec2'! | 281 abort: hidden revision 'dcbb326fdec2'! |
282 (use --hidden to access hidden revisions) | 282 (use --hidden to access hidden revisions) |
283 [255] | 283 [255] |
284 $ hg id -ir d62d843c9a01 | 284 $ hg id -ir d62d843c9a01 |
285 d62d843c9a01 | 285 d62d843c9a01 |
286 $ hg bookmarks | 286 $ hg bookmarks |
287 B 10:ff43616e5d0f | 287 B 10:ff43616e5d0f |
288 delete 6:2702dd0c91e7 | 288 delete 6:2702dd0c91e7 |
289 $ hg prune -B delete | 289 $ hg prune -B delete |
290 bookmark 'delete' deleted | |
290 3 changesets pruned | 291 3 changesets pruned |
291 bookmark 'delete' deleted | |
292 $ hg tag --remove --local c | 292 $ hg tag --remove --local c |
293 $ hg id -ir 6:2702dd0c91e7 | 293 $ hg id -ir 6:2702dd0c91e7 |
294 abort: hidden revision '6'! | 294 abort: hidden revision '6'! |
295 (use --hidden to access hidden revisions) | 295 (use --hidden to access hidden revisions) |
296 [255] | 296 [255] |