From e49969855ac52d0d5462d5409d0d3dfe0fb38572 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Thu, 20 Mar 2014 15:39:23 -0500 Subject: [PATCH] activepath: factor remote.local out of loop This change will lay the ground work for making activepath take a string. --- hg_remotebranches.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hg_remotebranches.py b/hg_remotebranches.py index 6b8197cea2..02294f48c5 100644 --- a/hg_remotebranches.py +++ b/hg_remotebranches.py @@ -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: