Mercurial > hg
comparison tests/test-graft.t @ 32205:b4e1e30528c7 stable
graft: fix graft across merges of duplicates of grafted changes
Graft used findmissingrevs to find the candidates for graft duplicates in the
destination. That function operates with the constraint:
1. N is an ancestor of some node in 'heads'
2. N is not an ancestor of any node in 'common'
For our purpose, we do however have to work correctly in cases where the graft
set has multiple roots or where merges between graft ranges are skipped. The
only changesets we can be sure doesn't have ancestors that are grafts of any
changeset in the graftset, are the ones that are common ancestors of *all*
changesets in the graftset. We thus need:
2. N is not an ancestor of all nodes in 'common'
This change will graft more correctly, but it will also in some cases make
graft slower by making it search through a bigger and unnecessary large sets of
changes to find duplicates. In the general case of grafting individual or
linear sets, we do the same amount of work as before.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 11 May 2017 17:18:40 +0200 |
parents | 78fb569e2c33 |
children | 3a755652ce3a |
comparison
equal
deleted
inserted
replaced
32204:78fb569e2c33 | 32205:b4e1e30528c7 |
---|---|
1339 $ hg graft --tool :local -r 2::5 | 1339 $ hg graft --tool :local -r 2::5 |
1340 skipping already grafted revision 3:ca093ca2f1d9 (was grafted from 1:13ec5badbf2a) | 1340 skipping already grafted revision 3:ca093ca2f1d9 (was grafted from 1:13ec5badbf2a) |
1341 skipping already grafted revision 5:43e9eb70dab0 (was grafted from 4:6c9a1289e5f1) | 1341 skipping already grafted revision 5:43e9eb70dab0 (was grafted from 4:6c9a1289e5f1) |
1342 grafting 2:42127f193bcd "b" | 1342 grafting 2:42127f193bcd "b" |
1343 | 1343 |
1344 Extending the graft range to include a merge will unfortunately make us miss | 1344 Extending the graft range to include a (skipped) merge of 3 will not prevent us from |
1345 that 3 and 5 should be skipped: | 1345 also detecting that both 3 and 5 should be skipped: |
1346 | 1346 |
1347 $ hg up -qCr 4 | 1347 $ hg up -qCr 4 |
1348 $ hg graft --tool :local -r 2::7 | 1348 $ hg graft --tool :local -r 2::7 |
1349 skipping ungraftable merge revision 6 | 1349 skipping ungraftable merge revision 6 |
1350 skipping already grafted revision 3:ca093ca2f1d9 (was grafted from 1:13ec5badbf2a) | |
1350 skipping already grafted revision 5:43e9eb70dab0 (was grafted from 4:6c9a1289e5f1) | 1351 skipping already grafted revision 5:43e9eb70dab0 (was grafted from 4:6c9a1289e5f1) |
1351 grafting 2:42127f193bcd "b" | 1352 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" | 1353 grafting 7:d3c3f2b38ecc "xx" |
1355 note: graft of 7:d3c3f2b38ecc created no changes to commit | 1354 note: graft of 7:d3c3f2b38ecc created no changes to commit |
1356 | 1355 |
1357 $ cd .. | 1356 $ cd .. |