This revision was automatically updated to reflect the committed changes. Closed by commit rHGa24f4638d6c1: narrow: move the ellipses server capability to core (authored by pulkit, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4809?vs=11516&id=11524 REVISION DETAIL https://phab.mercurial-scm.org/D4809 AFFECTED FILES hgext/narrow/narrowcommands.py hgext/narrow/narrowrepo.py hgext/narrow/narrowwirepeer.py mercurial/wireprotoserver.py CHANGE DETAILS diff --git a/mercurial/wireprotoserver.py b/mercurial/wireprotoserver.py --- a/mercurial/wireprotoserver.py +++ b/mercurial/wireprotoserver.py @@ -39,6 +39,7 @@ HGERRTYPE = 'application/hg-error' NARROWCAP = 'exp-narrow-1' +ELLIPSESCAP = 'exp-ellipses-1' SSHV1 = wireprototypes.SSHV1 SSHV2 = wireprototypes.SSHV2 diff --git a/hgext/narrow/narrowwirepeer.py b/hgext/narrow/narrowwirepeer.py --- a/hgext/narrow/narrowwirepeer.py +++ b/hgext/narrow/narrowwirepeer.py @@ -14,17 +14,15 @@ wireprotov1server, ) -ELLIPSESCAP = 'exp-ellipses-1' - def uisetup(): extensions.wrapfunction(wireprotov1server, '_capabilities', addnarrowcap) def addnarrowcap(orig, repo, proto): """add the narrow capability to the server""" caps = orig(repo, proto) caps.append(wireprotoserver.NARROWCAP) if repo.ui.configbool('experimental', 'narrowservebrokenellipses'): - caps.append(ELLIPSESCAP) + caps.append(wireprotoserver.ELLIPSESCAP) return caps def reposetup(repo): diff --git a/hgext/narrow/narrowrepo.py b/hgext/narrow/narrowrepo.py --- a/hgext/narrow/narrowrepo.py +++ b/hgext/narrow/narrowrepo.py @@ -13,7 +13,6 @@ from . import ( narrowdirstate, - narrowwirepeer, ) def wraprepo(repo): @@ -28,7 +27,7 @@ def peer(self): peer = super(narrowrepository, self).peer() peer._caps.add(wireprotoserver.NARROWCAP) - peer._caps.add(narrowwirepeer.ELLIPSESCAP) + peer._caps.add(wireprotoserver.ELLIPSESCAP) return peer repo.__class__ = narrowrepository diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py --- a/hgext/narrow/narrowcommands.py +++ b/hgext/narrow/narrowcommands.py @@ -32,10 +32,6 @@ wireprotoserver, ) -from . import ( - narrowwirepeer, -) - table = {} command = registrar.command(table) @@ -148,7 +144,7 @@ kwargs['excludepats'] = exclude # calculate known nodes only in ellipses cases because in non-ellipses cases # we have all the nodes - if narrowwirepeer.ELLIPSESCAP in pullop.remote.capabilities(): + if wireprotoserver.ELLIPSESCAP in pullop.remote.capabilities(): kwargs['known'] = [node.hex(ctx.node()) for ctx in repo.set('::%ln', pullop.common) if ctx.node() != node.nullid] To: pulkit, durin42, #hg-reviewers, indygreg Cc: martinvonz, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel