Mercurial > hg
diff hgext/narrow/narrowrepo.py @ 39528:2862e9b868c5
narrow: check "narrow" wire protocol capability, not bundle2 capability
It seems like the new "narrow" wire protocol capability should be what
determines if the server supports the "narrow" and
"{,old}{in,ex}cludepats" arguments to the getbundle request.
Differential Revision: https://phab.mercurial-scm.org/D4527
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 11 Sep 2018 11:03:15 -0700 |
parents | 576eef1ab43d |
children | e82da0fcc7c5 |
line wrap: on
line diff
--- a/hgext/narrow/narrowrepo.py Tue Aug 21 16:11:17 2018 +0300 +++ b/hgext/narrow/narrowrepo.py Tue Sep 11 11:03:15 2018 -0700 @@ -8,6 +8,7 @@ from __future__ import absolute_import from . import ( + narrowbundle2, narrowdirstate, narrowrevlog, ) @@ -26,4 +27,10 @@ dirstate = super(narrowrepository, self)._makedirstate() return narrowdirstate.wrapdirstate(self, dirstate) + def peer(self): + peer = super(narrowrepository, self).peer() + peer._caps.add(narrowbundle2.NARROWCAP) + peer._caps.add(narrowbundle2.ELLIPSESCAP) + return peer + repo.__class__ = narrowrepository