dispatch: fix checking of rpath in _getlocal
authorMatt Mackall <mpm@selenic.com>
Tue, 12 Jul 2011 16:36:34 -0500
changeset 14860 67add0f24f83
parent 14859 dccecfaebdd2
child 14866 ad6a58581ecd
child 14867 b601b9eb372d
dispatch: fix checking of rpath in _getlocal This avoids an extra config read
mercurial/dispatch.py
--- 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)