Mercurial > hg
view tests/test-merge-subrepos.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 | 0f64af33fb63 |
children | 439b4d005b4a |
line wrap: on
line source
$ hg init $ echo a > a $ hg ci -qAm 'add a' $ hg init subrepo $ echo 'subrepo = http://example.net/libfoo' > .hgsub $ hg ci -qAm 'added subrepo' $ hg up -qC 0 $ echo ax > a $ hg ci -m 'changed a' created new head $ hg up -qC 1 $ cd subrepo $ echo b > b $ hg add b $ cd .. Should fail, since there are added files to subrepo: $ hg merge abort: uncommitted changes in subrepository 'subrepo' [255]