# HG changeset patch # User Benoit Boissinot # Date 1153000901 -7200 # Node ID 46e52bbb9b1a7bf781e54b4bda576eb07a30fa7d # Parent 0b4bff2b0ce3b2b8a78dfafdfd60f750de1c7179 expand the path if destination is not a directory diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -209,7 +209,7 @@ class ui(object): def expandpath(self, loc, default=None): """Return repository location relative to cwd or from [paths]""" - if "://" in loc or os.path.exists(loc): + if "://" in loc or os.path.isdir(loc): return loc path = self.config("paths", loc)