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:
Sean Farley 2014-03-20 15:39:23 -05:00
parent 2b9454aabf
commit e49969855a

View File

@ -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: