Only hg repositories override [paths], not simple directories (fixes issue510)
authorThomas Arendsen Hein <thomas@intevation.de>
Wed, 14 Mar 2007 22:38:40 +0100
changeset 4216 76d541c6f3c0
parent 4180 f80cf8b7bbd9
child 4217 ea976f5f3fa3
child 4221 0a95d0e83b4c
Only hg repositories override [paths], not simple directories (fixes issue510)
mercurial/ui.py
--- a/mercurial/ui.py	Tue Mar 13 18:53:23 2007 -0500
+++ b/mercurial/ui.py	Wed Mar 14 22:38:40 2007 +0100
@@ -362,7 +362,7 @@
 
     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)