[Updated] D10342: changegroup: don't limit cgv4 to revlogv2 repos
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Wed May 5 22:39:58 UTC 2021
Closed by commit rHG08e26ef4ad35: changegroup: don't limit cgv4 to revlogv2 repos (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10342?vs=27449&id=27602
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10342/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10342
AFFECTED FILES
mercurial/changegroup.py
mercurial/configitems.py
CHANGE DETAILS
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -904,6 +904,11 @@
)
coreconfigitem(
b'experimental',
+ b'changegroup4',
+ default=False,
+)
+coreconfigitem(
+ b'experimental',
b'cleanup-as-archived',
default=False,
)
diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -1689,11 +1689,14 @@
#
# (or even to push subset of history)
needv03 = True
- has_revlogv2 = requirements.REVLOGV2_REQUIREMENT in repo.requirements
- if not has_revlogv2:
- versions.discard(b'04')
if not needv03:
versions.discard(b'03')
+ want_v4 = (
+ repo.ui.configbool(b'experimental', b'changegroup4')
+ or requirements.REVLOGV2_REQUIREMENT in repo.requirements
+ )
+ if not want_v4:
+ versions.discard(b'04')
return versions
To: Alphare, #hg-reviewers, marmoute
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210505/05676f88/attachment.html>
More information about the Mercurial-patches
mailing list