mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
activepath: factor remote.local out of loop
This change will lay the ground work for making activepath take a string.
This commit is contained in:
parent
2b9454aabf
commit
e49969855a
@ -146,9 +146,14 @@ def reposetup(ui, repo):
|
||||
|
||||
def _activepath(self, remote):
|
||||
realpath = ''
|
||||
local = None
|
||||
try:
|
||||
local = remote.local()
|
||||
except AttributeError:
|
||||
pass
|
||||
for path, uri in ui.configitems('paths'):
|
||||
uri = self.ui.expandpath(self._expandscheme(uri))
|
||||
if remote.local():
|
||||
if local:
|
||||
uri = os.path.realpath(uri)
|
||||
rpath = getattr(remote, 'root', None)
|
||||
if rpath is None:
|
||||
|
Loading…
Reference in New Issue
Block a user