# HG changeset patch # User Benoit Boissinot # Date 2005-10-25 21:55:39 # Node ID f84ed9c6131da1db6ec41ef508a9a817f53cd59e # Parent 3a0b69ea5708355a99d3506f0ff485ea3ac2bad0 fix for cloning empty repo (.hg is still empty) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -715,7 +715,10 @@ def clone(ui, source, dest=None, **opts) 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)