D4892: narrow: drop the bundle2 capability since we have server capabilities (BC)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG381d3121e97a: narrow: drop the bundle2 capability since we have server capabilities (BC) (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4892?vs=12608=12617 REVISION DETAIL https://phab.mercurial-scm.org/D4892 AFFECTED FILES hgext/narrow/narrowbundle2.py tests/test-narrow-clone-non-narrow-server.t CHANGE DETAILS diff --git a/tests/test-narrow-clone-non-narrow-server.t b/tests/test-narrow-clone-non-narrow-server.t --- a/tests/test-narrow-clone-non-narrow-server.t +++ b/tests/test-narrow-clone-non-narrow-server.t @@ -32,7 +32,6 @@ > EOF $ echo hello | hg -R . serve --stdio | \ > "$PYTHON" unquote.py | tr ' ' '\n' | grep narrow - narrow=v0 exp-narrow-1 $ cd .. diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -20,7 +20,6 @@ changegroup, error, exchange, -extensions, narrowspec, repair, repository, @@ -31,10 +30,9 @@ stringutil, ) -NARROWCAP = 'narrow' _NARROWACL_SECTION = 'narrowhgacl' -_CHANGESPECPART = NARROWCAP + ':changespec' -_SPECPART = NARROWCAP + ':spec' +_CHANGESPECPART = 'narrow:changespec' +_SPECPART = 'narrow:spec' _SPECPART_INCLUDE = 'include' _SPECPART_EXCLUDE = 'exclude' _KILLNODESIGNAL = 'KILL' @@ -44,12 +42,6 @@ _CSHEADERSIZE = struct.calcsize(_ELIDEDCSHEADER) _MFHEADERSIZE = struct.calcsize(_ELIDEDMFHEADER) -# When advertising capabilities, always include narrow clone support. -def getrepocaps_narrow(orig, repo, **kwargs): -caps = orig(repo, **kwargs) -caps[NARROWCAP] = ['v0'] -return caps - # Serve a changegroup for a client with a narrow clone. def getbundlechangegrouppart_narrow(bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, @@ -252,8 +244,6 @@ def setup(): """Enable narrow repo support in bundle2-related extension points.""" -extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow) - getbundleargs = wireprototypes.GETBUNDLE_ARGUMENTS getbundleargs['narrow'] = 'boolean' To: pulkit, durin42, martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D4892: narrow: drop the bundle2 capability since we have server capabilities (BC)
pulkit updated this revision to Diff 12608. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4892?vs=11711=12608 REVISION DETAIL https://phab.mercurial-scm.org/D4892 AFFECTED FILES hgext/narrow/narrowbundle2.py tests/test-narrow-clone-non-narrow-server.t CHANGE DETAILS diff --git a/tests/test-narrow-clone-non-narrow-server.t b/tests/test-narrow-clone-non-narrow-server.t --- a/tests/test-narrow-clone-non-narrow-server.t +++ b/tests/test-narrow-clone-non-narrow-server.t @@ -32,7 +32,6 @@ > EOF $ echo hello | hg -R . serve --stdio | \ > "$PYTHON" unquote.py | tr ' ' '\n' | grep narrow - narrow=v0 exp-narrow-1 $ cd .. diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -20,7 +20,6 @@ changegroup, error, exchange, -extensions, narrowspec, repair, repository, @@ -31,10 +30,9 @@ stringutil, ) -NARROWCAP = 'narrow' _NARROWACL_SECTION = 'narrowhgacl' -_CHANGESPECPART = NARROWCAP + ':changespec' -_SPECPART = NARROWCAP + ':spec' +_CHANGESPECPART = 'narrow:changespec' +_SPECPART = 'narrow:spec' _SPECPART_INCLUDE = 'include' _SPECPART_EXCLUDE = 'exclude' _KILLNODESIGNAL = 'KILL' @@ -44,12 +42,6 @@ _CSHEADERSIZE = struct.calcsize(_ELIDEDCSHEADER) _MFHEADERSIZE = struct.calcsize(_ELIDEDMFHEADER) -# When advertising capabilities, always include narrow clone support. -def getrepocaps_narrow(orig, repo, **kwargs): -caps = orig(repo, **kwargs) -caps[NARROWCAP] = ['v0'] -return caps - # Serve a changegroup for a client with a narrow clone. def getbundlechangegrouppart_narrow(bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, @@ -252,8 +244,6 @@ def setup(): """Enable narrow repo support in bundle2-related extension points.""" -extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow) - getbundleargs = wireprototypes.GETBUNDLE_ARGUMENTS getbundleargs['narrow'] = 'boolean' To: pulkit, durin42, martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D4892: narrow: drop the bundle2 capability since we have server capabilities (BC)
pulkit created this revision. Herald added a reviewer: durin42. Herald added a reviewer: martinvonz. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This patch drops the narrow bundle2 capabilities since we introduced narrow server capabilities which are more nice and now used everywhere. I am not sure what it can affect, so on safe side I marked this as BC. Also I removed the NARROWCAP constant as that kind of conflicts with the same name constant in wireprototypes.py. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4892 AFFECTED FILES hgext/narrow/narrowbundle2.py tests/test-narrow-clone-non-narrow-server.t CHANGE DETAILS diff --git a/tests/test-narrow-clone-non-narrow-server.t b/tests/test-narrow-clone-non-narrow-server.t --- a/tests/test-narrow-clone-non-narrow-server.t +++ b/tests/test-narrow-clone-non-narrow-server.t @@ -32,7 +32,6 @@ > EOF $ echo hello | hg -R . serve --stdio | \ > "$PYTHON" unquote.py | tr ' ' '\n' | grep narrow - narrow=v0 exp-narrow-1 $ cd .. diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -20,7 +20,6 @@ changegroup, error, exchange, -extensions, narrowspec, repair, repository, @@ -31,10 +30,9 @@ stringutil, ) -NARROWCAP = 'narrow' _NARROWACL_SECTION = 'narrowhgacl' -_CHANGESPECPART = NARROWCAP + ':changespec' -_SPECPART = NARROWCAP + ':spec' +_CHANGESPECPART = 'narrow:changespec' +_SPECPART = 'narrow:spec' _SPECPART_INCLUDE = 'include' _SPECPART_EXCLUDE = 'exclude' _KILLNODESIGNAL = 'KILL' @@ -44,12 +42,6 @@ _CSHEADERSIZE = struct.calcsize(_ELIDEDCSHEADER) _MFHEADERSIZE = struct.calcsize(_ELIDEDMFHEADER) -# When advertising capabilities, always include narrow clone support. -def getrepocaps_narrow(orig, repo, **kwargs): -caps = orig(repo, **kwargs) -caps[NARROWCAP] = ['v0'] -return caps - # Serve a changegroup for a client with a narrow clone. def getbundlechangegrouppart_narrow(bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, @@ -252,8 +244,6 @@ def setup(): """Enable narrow repo support in bundle2-related extension points.""" -extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow) - getbundleargs = wireprototypes.GETBUNDLE_ARGUMENTS getbundleargs['narrow'] = 'boolean' To: pulkit, durin42, martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel