Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
39527:9db856446298 | 39528:2862e9b868c5 |
---|---|
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 from __future__ import absolute_import | 8 from __future__ import absolute_import |
9 | 9 |
10 from . import ( | 10 from . import ( |
11 narrowbundle2, | |
11 narrowdirstate, | 12 narrowdirstate, |
12 narrowrevlog, | 13 narrowrevlog, |
13 ) | 14 ) |
14 | 15 |
15 def wraprepo(repo): | 16 def wraprepo(repo): |
24 | 25 |
25 def _makedirstate(self): | 26 def _makedirstate(self): |
26 dirstate = super(narrowrepository, self)._makedirstate() | 27 dirstate = super(narrowrepository, self)._makedirstate() |
27 return narrowdirstate.wrapdirstate(self, dirstate) | 28 return narrowdirstate.wrapdirstate(self, dirstate) |
28 | 29 |
30 def peer(self): | |
31 peer = super(narrowrepository, self).peer() | |
32 peer._caps.add(narrowbundle2.NARROWCAP) | |
33 peer._caps.add(narrowbundle2.ELLIPSESCAP) | |
34 return peer | |
35 | |
29 repo.__class__ = narrowrepository | 36 repo.__class__ = narrowrepository |