Mercurial > hg-stable
changeset 5699:4cf5a4950fc9
hg: fail upon copy/link errors while cloning locally
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Thu, 27 Dec 2007 22:28:41 +0100 |
parents | b63ef7b1441c |
children | 9cedc3fbbebb 75c2071385da |
files | mercurial/hg.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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):