mercurial/ui.py
changeset 4212 76d541c6f3c0
parent 4044 78a0dd93db0b
child 4213 0a95d0e83b4c
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -362,7 +362,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.isdir(loc):
+        if "://" in loc or os.path.isdir(os.path.join(loc, '.hg')):
             return loc
 
         path = self.config("paths", loc)