changeset 6089:28054773438c

clone: make things work when source is a repo object
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Wed, 13 Feb 2008 18:37:38 -0200
parents 3b96cefc1b2b
children 152b6c5c1574 65340b8231eb
files mercurial/hg.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Wed Feb 13 18:37:38 2008 -0200
+++ b/mercurial/hg.py	Wed Feb 13 18:37:38 2008 -0200
@@ -105,14 +105,14 @@
     destination is local repository
     """
 
-    origsource = ui.expandpath(source)
-    source, rev, checkout = parseurl(origsource, rev)
-
     if isinstance(source, str):
+        origsource = ui.expandpath(source)
+        source, rev, checkout = parseurl(origsource, rev)
         src_repo = repository(ui, source)
     else:
         src_repo = source
-        source = src_repo.url()
+        origsource = source = src_repo.url()
+        checkout = None
 
     if dest is None:
         dest = defaultdest(source)