clone: directory names take precedence over symbolic names
authorTK Soh <teekaysoh@yahoo.com>
Thu, 08 Sep 2005 12:10:59 -0700
changeset 1221 89f899caecb5
parent 1220 8baa29e36b14
child 1222 a5cb17a2d240
clone: directory names take precedence over symbolic names If source matches both a directory name and a symbolic name to repo, the directory will be taken.
mercurial/commands.py
--- a/mercurial/commands.py	Thu Sep 08 12:10:43 2005 -0700
+++ b/mercurial/commands.py	Thu Sep 08 12:10:59 2005 -0700
@@ -614,7 +614,8 @@
         ui.setconfig("ui", "remotecmd", opts['remotecmd'])
 
     d = Dircleanup(dest)
-    source = ui.expandpath(source)
+    if not os.path.exists(source):
+        source = ui.expandpath(source)
     abspath = source
     other = hg.repository(ui, source)