Mercurial > hg
comparison tests/test-graft.t @ 32204:78fb569e2c33 stable
graft: test coverage of grafts and how merges can break duplicate detection
This demonstrates unfortunate behaviour: extending the graft range cause the
graft to behave differently. When the graft range includes a merge, we fail to
detect duplicates that are ancestors of the merge.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 09 May 2017 00:11:30 +0200 |
parents | 52dabcc49968 |
children | b4e1e30528c7 |
comparison
equal
deleted
inserted
replaced
32198:a0e46f6b248b | 32204:78fb569e2c33 |
---|---|
1307 $ hg up -q 3 | 1307 $ hg up -q 3 |
1308 $ hg graft -q 4 | 1308 $ hg graft -q 4 |
1309 $ hg status --change . | 1309 $ hg status --change . |
1310 M b/x | 1310 M b/x |
1311 | 1311 |
1312 Prepare for test of skipped changesets and how merges can influence it: | |
1313 | |
1314 $ hg merge -q -r 1 --tool :local | |
1315 $ hg ci -m m | |
1316 $ echo xx >> b/x | |
1317 $ hg ci -m xx | |
1318 | |
1319 $ hg log -G -T '{rev} {desc|firstline}' | |
1320 @ 7 xx | |
1321 | | |
1322 o 6 m | |
1323 |\ | |
1324 | o 5 y | |
1325 | | | |
1326 +---o 4 y | |
1327 | | | |
1328 | o 3 x | |
1329 | | | |
1330 | o 2 b | |
1331 | | | |
1332 o | 1 x | |
1333 |/ | |
1334 o 0 a | |
1335 | |
1336 Grafting of plain changes correctly detects that 3 and 5 should be skipped: | |
1337 | |
1338 $ hg up -qCr 4 | |
1339 $ hg graft --tool :local -r 2::5 | |
1340 skipping already grafted revision 3:ca093ca2f1d9 (was grafted from 1:13ec5badbf2a) | |
1341 skipping already grafted revision 5:43e9eb70dab0 (was grafted from 4:6c9a1289e5f1) | |
1342 grafting 2:42127f193bcd "b" | |
1343 | |
1344 Extending the graft range to include a merge will unfortunately make us miss | |
1345 that 3 and 5 should be skipped: | |
1346 | |
1347 $ hg up -qCr 4 | |
1348 $ hg graft --tool :local -r 2::7 | |
1349 skipping ungraftable merge revision 6 | |
1350 skipping already grafted revision 5:43e9eb70dab0 (was grafted from 4:6c9a1289e5f1) | |
1351 grafting 2:42127f193bcd "b" | |
1352 grafting 3:ca093ca2f1d9 "x" | |
1353 note: graft of 3:ca093ca2f1d9 created no changes to commit | |
1354 grafting 7:d3c3f2b38ecc "xx" | |
1355 note: graft of 7:d3c3f2b38ecc created no changes to commit | |
1356 | |
1312 $ cd .. | 1357 $ cd .. |