mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
exchange: access requirements on repo instead of peer
As part of formalizing the peer interface, I audited for attribute accesses for non-internal names to find API violations. This uncovered the code changed in this commit. localpeer.requirements is just an alias to the repo's requirements attribute. So, change the code to get the data from the source instead of relying on a one-off attribute in the localpeer type. Differential Revision: https://phab.mercurial-scm.org/D265
This commit is contained in:
parent
59e773f0f6
commit
e464f2d82b
@ -1226,8 +1226,10 @@ def pull(repo, remote, heads=None, force=False, bookmarks=(), opargs=None,
|
||||
opargs = {}
|
||||
pullop = pulloperation(repo, remote, heads, force, bookmarks=bookmarks,
|
||||
streamclonerequested=streamclonerequested, **opargs)
|
||||
if pullop.remote.local():
|
||||
missing = set(pullop.remote.requirements) - pullop.repo.supported
|
||||
|
||||
peerlocal = pullop.remote.local()
|
||||
if peerlocal:
|
||||
missing = set(peerlocal.requirements) - pullop.repo.supported
|
||||
if missing:
|
||||
msg = _("required features are not"
|
||||
" supported in the destination:"
|
||||
|
Loading…
Reference in New Issue
Block a user