On 10/11/19 7:57 PM, Mads Kiilerich wrote:
# HG changeset patch
# User Mads Kiilerich <mad...@unity3d.com>
# Date 1570804632 -7200
# Fri Oct 11 16:37:12 2019 +0200
# Node ID 72d12ee773795edc163f73b9160e5d29022878dd
# Parent 52781d57313d512efb7150603104bea3ca11d0eb
changegroup: leave out all parent file revisions when creating bundles
I'm not sure the analysis nailed the root cause. It is tricky to
reproduce good test cases.
But one problem we could fix by pruning ancestors instead of using linkrevs:
Create a repo with aliasing:
$ hg init repo1
$ cd repo1
$ touch f
$ hg ci -Aqm 0
$ echo 1 > f
$ hg ci -m 1f1
$ hg up -cqr 0
$ hg branch -q b
$ echo 1 > f # linkrev aliasing to rev 1
$ hg ci -m 2f1
When bundling rev 2 for a repo that has rev 1, f will be skipped even
though it
isn't an ancestor:
$ hg bundle -v -r 2 --base 1 bundle.hg
1 changesets found
uncompressed size of bundle content:
185 (changelog)
163 (manifests)
A bundle with missing ancestor revisions would fail unbundling with "abort:
00changelog.i@d681519c3ea7: unknown parent!". But if using
fastpathlinkrev and
the ancestors are present but the file revs are not, the bundle can be
applied
but will break on use:
$ hg clone -qU . -r 0 repo2
$ hg -R repo2 pull bundle.hg
pulling from bundle.hg
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 0 changes to 0 files
new changesets 5e690c649d09 (1 drafts)
(run 'hg update' to get a working copy)
$ hg -R repo2 up -r tip
abort: data/f.i@d0c79e1d3309: no match found!
[255]
/Mads
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel