mercurial/commands.py
changeset 1221 89f899caecb5
parent 1220 8baa29e36b14
child 1222 a5cb17a2d240
--- 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)