changeset 17696:b3f0f9a39c4e stable 2.3.2

merge with i18n
author Matt Mackall <mpm@selenic.com>
date Mon, 01 Oct 2012 23:06:14 -0500
parents 75f25bd4c7d4 (current diff) 829919ef894a (diff)
children a02b2018988c
files tests/test-largefiles.t
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/lock.py	Sun Sep 23 00:08:13 2012 -0400
+++ b/mercurial/lock.py	Mon Oct 01 23:06:14 2012 -0500
@@ -97,7 +97,12 @@
         The lock file is only deleted when None is returned.
 
         """
-        locker = util.readlock(self.f)
+        try:
+            locker = util.readlock(self.f)
+        except OSError, why:
+            if why.errno == errno.ENOENT:
+                return None
+            raise
         try:
             host, pid = locker.split(":", 1)
         except ValueError:
--- a/tests/test-largefiles.t	Sun Sep 23 00:08:13 2012 -0400
+++ b/tests/test-largefiles.t	Mon Oct 01 23:06:14 2012 -0500
@@ -1622,8 +1622,8 @@
   A large.dat
   A large2.dat
   A normal
-  $ find .hglf/ | sort
-  .hglf/
+  $ find .hglf | sort
+  .hglf
   .hglf/large.dat
   .hglf/large2.dat