mercurial/util.py
changeset 25088 754df8e932d3
parent 24902 986a5c23b1c1
child 25112 3d14c1217117
--- a/mercurial/util.py	Fri May 15 09:58:02 2015 -0500
+++ b/mercurial/util.py	Fri May 15 09:58:21 2015 -0500
@@ -1003,15 +1003,13 @@
     f2 = testfile + ".hgtmp2"
     fd = None
     try:
-        try:
-            oslink(f1, f2)
-        except OSError:
-            return False
-
+        oslink(f1, f2)
         # nlinks() may behave differently for files on Windows shares if
         # the file is open.
         fd = posixfile(f2)
         return nlinks(f2) > 1
+    except OSError:
+        return False
     finally:
         if fd is not None:
             fd.close()