D6938: changegroup: use positive logic for treemanifest changegroup3 logic
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sun Oct 6 09:44:36 EDT 2019
Closed by commit rHG4bbc9569e722: changegroup: use positive logic for treemanifest changegroup3 logic (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D6938?vs=16741&id=16865
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D6938/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D6938
AFFECTED FILES
mercurial/changegroup.py
CHANGE DETAILS
diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -1281,9 +1281,19 @@
def allsupportedversions(repo):
versions = set(_packermap.keys())
- if not (repo.ui.configbool('experimental', 'changegroup3') or
- repo.ui.configbool('experimental', 'treemanifest') or
- 'treemanifest' in repo.requirements):
+ needv03 = False
+ if (repo.ui.configbool('experimental', 'changegroup3') or
+ repo.ui.configbool('experimental', 'treemanifest') or
+ 'treemanifest' in repo.requirements):
+ # we keep version 03 because we need to to exchange treemanifest data
+ #
+ # we also keep vresion 01 and 02, because it is possible for repo to
+ # contains both normal and tree manifest at the same time. so using
+ # older version to pull data is viable
+ #
+ # (or even to push subset of history)
+ needv03 = True
+ if not needv03:
versions.discard('03')
return versions
To: marmoute, #hg-reviewers, indygreg
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list