changeset 14860:67add0f24f83

dispatch: fix checking of rpath in _getlocal This avoids an extra config read
author Matt Mackall <mpm@selenic.com>
date Tue, 12 Jul 2011 16:36:34 -0500
parents dccecfaebdd2
children ad6a58581ecd b601b9eb372d
files mercurial/dispatch.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Tue Jul 12 16:36:22 2011 -0500
+++ b/mercurial/dispatch.py	Tue Jul 12 16:36:34 2011 -0500
@@ -474,7 +474,7 @@
         lui = ui.copy()
         lui.readconfig(os.path.join(path, ".hg", "hgrc"), path)
 
-    if rpath:
+    if rpath and rpath[-1]:
         path = lui.expandpath(rpath[-1])
         lui = ui.copy()
         lui.readconfig(os.path.join(path, ".hg", "hgrc"), path)