changeset 1221:89f899caecb5

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.
author TK Soh <teekaysoh@yahoo.com>
date Thu, 08 Sep 2005 12:10:59 -0700
parents 8baa29e36b14
children a5cb17a2d240
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -614,7 +614,8 @@ def clone(ui, source, dest=None, **opts)
         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)