Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changegroup.py @ 27734:5c0fd878779c
treemanifests: set bundle2 part parameter indicating treemanifest
By adding a mandatory 'treemanifest' parameter in the bundle2 part, we
make it possible for the recipient to set repo requirements before the
manifest revlog is accessed.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 08 Jan 2016 21:13:06 -0800 |
parents | b0d23a55f91e |
children | bd37212c20ed |
line wrap: on
line diff
--- a/mercurial/changegroup.py Wed Jan 06 20:05:18 2016 +0000 +++ b/mercurial/changegroup.py Fri Jan 08 21:13:06 2016 -0800 @@ -1046,17 +1046,6 @@ directory = (f[-1] == '/') if directory: # a directory using treemanifests - # TODO fixup repo requirements safely - if 'treemanifest' not in repo.requirements: - if not wasempty: - raise error.Abort(_( - "bundle contains tree manifests, but local repo is " - "non-empty and does not use tree manifests")) - repo.requirements.add('treemanifest') - repo._applyopenerreqs() - repo._writerequirements() - repo.manifest._treeondisk = True - repo.manifest._treeinmem = True fl = repo.manifest.dirlog(f) else: fl = repo.file(f)