fix for cloning empty repo (.hg is still empty)
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 25 Oct 2005 14:55:39 -0700
changeset 1444 f84ed9c6131d
parent 1443 3a0b69ea5708
child 1445 56281e086f38
fix for cloning empty repo (.hg is still empty)
mercurial/commands.py
--- a/mercurial/commands.py	Mon Oct 24 20:42:20 2005 -0700
+++ b/mercurial/commands.py	Tue Oct 25 14:55:39 2005 -0700
@@ -715,7 +715,10 @@
         for f in files.split():
             src = os.path.join(source, ".hg", f)
             dst = os.path.join(dest, ".hg", f)
-            util.copyfiles(src, dst)
+            try:
+                util.copyfiles(src, dst)
+            except OSError, inst:
+                if inst.errno != errno.ENOENT: raise
 
         repo = hg.repository(ui, dest)