Mercurial > hg
comparison hgext/narrow/narrowcommands.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 | 294c571490f0 |
children | e82da0fcc7c5 |
comparison
equal
deleted
inserted
replaced
39527:9db856446298 | 39528:2862e9b868c5 |
---|---|
169 def pullbundle2extraprepare(orig, pullop, kwargs): | 169 def pullbundle2extraprepare(orig, pullop, kwargs): |
170 repo = pullop.repo | 170 repo = pullop.repo |
171 if repository.NARROW_REQUIREMENT not in repo.requirements: | 171 if repository.NARROW_REQUIREMENT not in repo.requirements: |
172 return orig(pullop, kwargs) | 172 return orig(pullop, kwargs) |
173 | 173 |
174 if narrowbundle2.NARROWCAP not in pullop.remotebundle2caps: | 174 if narrowbundle2.NARROWCAP not in pullop.remote.capabilities(): |
175 raise error.Abort(_("server doesn't support narrow clones")) | 175 raise error.Abort(_("server doesn't support narrow clones")) |
176 orig(pullop, kwargs) | 176 orig(pullop, kwargs) |
177 kwargs['narrow'] = True | 177 kwargs['narrow'] = True |
178 include, exclude = repo.narrowpats | 178 include, exclude = repo.narrowpats |
179 kwargs['oldincludepats'] = include | 179 kwargs['oldincludepats'] = include |