diff --git a/mercurial/exchange.py b/mercurial/exchange.py index 3d3b4ac369f2352a48114a8dd73a25da3766e957_bWVyY3VyaWFsL2V4Y2hhbmdlLnB5..cabac7dfc6214e915908912678ff8e84f5dc7488_bWVyY3VyaWFsL2V4Y2hhbmdlLnB5 100644 --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -717,6 +717,8 @@ cgpart = bundler.newpart('changegroup', data=cg) if version is not None: cgpart.addparam('version', version) + if 'treemanifest' in pushop.repo.requirements: + cgpart.addparam('treemanifest', '1') def handlereply(op): """extract addchangegroup returns from server reply""" cgreplies = op.records.getreplies(cgpart.id) diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t index 3d3b4ac369f2352a48114a8dd73a25da3766e957_dGVzdHMvdGVzdC10cmVlbWFuaWZlc3QudA==..cabac7dfc6214e915908912678ff8e84f5dc7488_dGVzdHMvdGVzdC10cmVlbWFuaWZlc3QudA== 100644 --- a/tests/test-treemanifest.t +++ b/tests/test-treemanifest.t @@ -312,5 +312,25 @@ 1 +foo +Pushing from treemanifest repo to an empty repo makes that a treemanifest repo + + $ cd .. + $ hg init empty-repo + $ cat << EOF >> empty-repo/.hg/hgrc + > [experimental] + > changegroup3=yes + > EOF + $ grep treemanifest empty-repo/.hg/requires + [1] + $ hg push -R repo -r 0 empty-repo + pushing to empty-repo + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 2 changes to 2 files + $ grep treemanifest empty-repo/.hg/requires + treemanifest + Create deeper repo with tree manifests. @@ -315,6 +335,5 @@ Create deeper repo with tree manifests. - $ cd .. $ hg --config experimental.treemanifest=True init deeprepo $ cd deeprepo