mercurial/hg.py
changeset 6944 7e5f3480c45b
parent 6903 0642d9d7ec80
child 7048 25961e53a07f
--- a/mercurial/hg.py	Thu Aug 28 13:06:24 2008 +0200
+++ b/mercurial/hg.py	Fri Aug 29 16:50:11 2008 +0200
@@ -178,11 +178,11 @@
 
             for f in src_repo.store.copylist():
                 src = os.path.join(src_repo.path, f)
+                dst = os.path.join(dest_path, f)
+                dstbase = os.path.dirname(dst)
+                if dstbase and not os.path.exists(dstbase):
+                    os.mkdir(dstbase)
                 if os.path.exists(src):
-                    dst = os.path.join(dest_path, f)
-                    dstbase = os.path.dirname(dst)
-                    if not os.path.exists(dstbase):
-                        os.mkdir(dstbase)
                     if dst.endswith('data'):
                         # lock to avoid premature writing to the target
                         dest_lock = lock.lock(os.path.join(dstbase, "lock"))