diff mercurial/util.py @ 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 24c604628867
children e18beba54a7e 345107e167a0
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -393,7 +393,7 @@ def copyfiles(src, dst, hardlink=None):
         if hardlink:
             try:
                 os_link(src, dst)
-            except:
+            except (IOError, OSError):
                 hardlink = False
                 shutil.copy(src, dst)
         else: