# HG changeset patch # User Matt Mackall # Date 1310506594 18000 # Node ID 67add0f24f834dc59ae3a13357759177dcf8c2e4 # Parent dccecfaebdd2922d611ada371af20550ae4ebb39 dispatch: fix checking of rpath in _getlocal This avoids an extra config read diff -r dccecfaebdd2 -r 67add0f24f83 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)