diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -32,7 +32,6 @@ ) NARROWCAP = 'narrow' -ELLIPSESCAP = 'ellipses' _NARROWACL_SECTION = 'narrowhgacl' _CHANGESPECPART = NARROWCAP + ':changespec' _SPECPART = NARROWCAP + ':spec' diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py --- a/hgext/narrow/narrowcommands.py +++ b/hgext/narrow/narrowcommands.py @@ -32,7 +32,7 @@ ) from . import ( - narrowbundle2, + narrowwirepeer, ) table = {} @@ -171,7 +171,7 @@ if repository.NARROW_REQUIREMENT not in repo.requirements: return orig(pullop, kwargs) - if narrowbundle2.NARROWCAP not in pullop.remote.capabilities(): + if narrowwirepeer.NARROWCAP not in pullop.remote.capabilities(): raise error.Abort(_("server doesn't support narrow clones")) orig(pullop, kwargs) kwargs['narrow'] = True @@ -182,7 +182,7 @@ kwargs['excludepats'] = exclude # calculate known nodes only in ellipses cases because in non-ellipses cases # we have all the nodes - if narrowbundle2.ELLIPSESCAP in pullop.remote.capabilities(): + if narrowwirepeer.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 @@ -8,9 +8,9 @@ from __future__ import absolute_import from . import ( - narrowbundle2, narrowdirstate, narrowrevlog, + narrowwirepeer, ) def wraprepo(repo): @@ -29,8 +29,8 @@ def peer(self): peer = super(narrowrepository, self).peer() - peer._caps.add(narrowbundle2.NARROWCAP) - peer._caps.add(narrowbundle2.ELLIPSESCAP) + peer._caps.add(narrowwirepeer.NARROWCAP) + peer._caps.add(narrowwirepeer.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 @@ -17,7 +17,8 @@ wireprotov1server, ) -from . import narrowbundle2 +NARROWCAP = 'narrow' +ELLIPSESCAP = 'ellipses' def uisetup(): def peersetup(ui, peer): @@ -46,9 +47,9 @@ def addnarrowcap(orig, repo, proto): """add the narrow capability to the server""" caps = orig(repo, proto) - caps.append(narrowbundle2.NARROWCAP) + caps.append(NARROWCAP) if repo.ui.configbool('experimental', 'narrowservebrokenellipses'): - caps.append(narrowbundle2.ELLIPSESCAP) + caps.append(ELLIPSESCAP) return caps def reposetup(repo):