mercurial/hg.py
changeset 17194 32a6a33b9a35
parent 17192 1ac628cd7113
child 17198 ecde35a1af9e
--- a/mercurial/hg.py	Fri Jul 13 21:52:28 2012 +0200
+++ b/mercurial/hg.py	Fri Jul 13 21:52:37 2012 +0200
@@ -302,7 +302,8 @@
             dircleanup = DirCleanup(dest)
 
         copy = False
-        if srcpeer.cancopy() and islocal(dest) and not srcrepo.revs("secret()"):
+        if (srcrepo and srcrepo.cancopy() and islocal(dest)
+            and not srcrepo.revs("secret()")):
             copy = not pull and not rev
 
         if copy: