Mercurial > hg
diff hgext/narrow/narrowcommands.py @ 39933:d5498db5f86a
narrow: move the wireprotocol narrow capability name to core
We are trying to integrate the whole of narrow logic into core and it will be
helpful for upcoming patches to have these capability names in core. The next
patch will move the ellipses capability to core also.
The exact motivation is to know whether we are cloning a ellipses repo or not
and adding an ellipses repo requirement.
Differential Revision: https://phab.mercurial-scm.org/D4808
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Sun, 30 Sep 2018 03:42:35 +0530 |
parents | 24e493ec2229 |
children | a24f4638d6c1 |
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py Sun Sep 30 16:11:35 2018 +0900 +++ b/hgext/narrow/narrowcommands.py Sun Sep 30 03:42:35 2018 +0530 @@ -29,6 +29,7 @@ repoview, sparse, util, + wireprotoserver, ) from . import ( @@ -136,7 +137,7 @@ if repository.NARROW_REQUIREMENT not in repo.requirements: return orig(pullop, kwargs) - if narrowwirepeer.NARROWCAP not in pullop.remote.capabilities(): + if wireprotoserver.NARROWCAP not in pullop.remote.capabilities(): raise error.Abort(_("server doesn't support narrow clones")) orig(pullop, kwargs) kwargs['narrow'] = True