Mercurial > hg
comparison tests/test-rebase-obsolete.t @ 35993:a603a570cdbe
rebase: add a test case for issue5782
Issue 5782 reports that rebase incorrectly aborts when trying to rebase
an extinct revision (an obsolete revision with only obsolete successor).
We add a test to demonstrate this: the first "hg rebase" command aborts
with the divergence warning while, when allowing divergence, the rebase
completes and does not actually produce any divergence.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Wed, 07 Feb 2018 12:06:13 +0100 |
parents | 128dd940bedc |
children | b7e2cf114e85 |
comparison
equal
deleted
inserted
replaced
35992:07cd54eae696 | 35993:a603a570cdbe |
---|---|
1216 | x 1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49) | 1216 | x 1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49) |
1217 |/ | 1217 |/ |
1218 o 0:b173517d0057 a | 1218 o 0:b173517d0057 a |
1219 | 1219 |
1220 | 1220 |
1221 issue5782 | |
1222 $ hg strip -r 0: | |
1223 $ hg debugdrawdag <<EOF | |
1224 > d | |
1225 > | | |
1226 > c1 c # replace: c -> c1 | |
1227 > \ / | |
1228 > b | |
1229 > | | |
1230 > a | |
1231 > EOF | |
1232 1 new orphan changesets | |
1233 $ hg debugobsolete `hg log -T "{node}" --hidden -r 'desc("c1")'` | |
1234 obsoleted 1 changesets | |
1235 $ hg log -G -r 'a': --hidden | |
1236 * 4:76be324c128b d | |
1237 | | |
1238 | x 3:ef8a456de8fa c1 (pruned) | |
1239 | | | |
1240 x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa) | |
1241 |/ | |
1242 o 1:488e1b7e7341 b | |
1243 | | |
1244 o 0:b173517d0057 a | |
1245 | |
1246 $ hg rebase -d 0 -r 2 | |
1247 abort: this rebase will cause divergences from: a82ac2b38757 | |
1248 (to force the rebase please set experimental.evolution.allowdivergence=True) | |
1249 [255] | |
1250 $ hg rebase -d 0 -r 2 --config experimental.evolution.allowdivergence=True | |
1251 rebasing 2:a82ac2b38757 "c" (c) | |
1252 $ hg log -G -r 'a': --hidden | |
1253 o 5:69ad416a4a26 c | |
1254 | | |
1255 | * 4:76be324c128b d | |
1256 | | | |
1257 | | x 3:ef8a456de8fa c1 (pruned) | |
1258 | | | | |
1259 | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa rewritten using rebase as 5:69ad416a4a26) | |
1260 | |/ | |
1261 | o 1:488e1b7e7341 b | |
1262 |/ | |
1263 o 0:b173517d0057 a | |
1264 | |
1221 $ cd .. | 1265 $ cd .. |
1222 | 1266 |
1223 Rebase merge where successor of one parent is equal to destination (issue5198) | 1267 Rebase merge where successor of one parent is equal to destination (issue5198) |
1224 | 1268 |
1225 $ hg init p1-succ-is-dest | 1269 $ hg init p1-succ-is-dest |