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] 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/narrowwirepeer.py b/hgext/narrow/narrowwirepeer.py --- a/hgext/narrow/narrowwirepeer.py +++ b/hgext/narrow/narrowwirepeer.py @@ -14,8 +14,6 @@ wireprotov1server, ) -ELLIPSESCAP = 'exp-ellipses-1' - def uisetup(): extensions.wrapfunction(wireprotov1server, '_capabilities', addnarrowcap) @@ -24,7 +22,7 @@ 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/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