changeset 1892:622ee75cb4c9

Directory names take precedence over symbolic names consistently. Previously this was only done for clone.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 12 Mar 2006 18:05:13 +0100
parents e5c8e38b788f
children 6569651a4f1e
files mercurial/commands.py mercurial/ui.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -718,8 +718,7 @@ def clone(ui, source, dest=None, **opts)
     if opts['remotecmd']:
         ui.setconfig("ui", "remotecmd", opts['remotecmd'])
 
-    if not os.path.exists(source):
-        source = ui.expandpath(source)
+    source = ui.expandpath(source)
 
     d = Dircleanup(dest)
     abspath = source
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -154,6 +154,10 @@ class ui(object):
         return user
 
     def expandpath(self, loc, root=""):
+        """Return repository location relative to cwd or from [paths]"""
+        if os.path.exists(loc):
+            return loc
+
         paths = {}
         for name, path in self.configitems("paths"):
             m = path.find("://")