# HG changeset patch # User Patrick Mezard # Date 1198790921 -3600 # Node ID 4cf5a4950fc92adcca7a67c03ba6bf3e0db3bfb2 # Parent b63ef7b1441c11cc89ddb7156a878ae0ee067438 hg: fail upon copy/link errors while cloning locally diff -r b63ef7b1441c -r 4cf5a4950fc9 mercurial/hg.py --- a/mercurial/hg.py Thu Dec 27 03:14:46 2007 +0300 +++ b/mercurial/hg.py Thu Dec 27 22:28:41 2007 +0100 @@ -164,11 +164,10 @@ if copy: def force_copy(src, dst): - try: - util.copyfiles(src, dst) - except OSError, inst: - if inst.errno != errno.ENOENT: - raise + if not os.path.exists(src): + # Tolerate empty source repository and optional files + return + util.copyfiles(src, dst) src_store = os.path.realpath(src_repo.spath) if not os.path.exists(dest):