changeset 1444:f84ed9c6131d

fix for cloning empty repo (.hg is still empty)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 25 Oct 2005 14:55:39 -0700
parents 3a0b69ea5708
children 56281e086f38
files mercurial/commands.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)