changeset 2050:e49d0fa38176

util.copyfiles: only switch to copy if hardlink raises IOError or OSError. before this, interrupting clone would give "file a same as file b" error because caught KeyboardInterrupt.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Wed, 05 Apr 2006 17:17:07 -0700
parents f70952384ae7
children 6a03cff2b0f5
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Wed Apr 05 19:07:50 2006 +0200
+++ b/mercurial/util.py	Wed Apr 05 17:17:07 2006 -0700
@@ -393,7 +393,7 @@
         if hardlink:
             try:
                 os_link(src, dst)
-            except:
+            except (IOError, OSError):
                 hardlink = False
                 shutil.copy(src, dst)
         else: