changeset 26082:b188f60bd955

lock: make trylock private
author Matt Mackall <mpm@selenic.com>
date Mon, 24 Aug 2015 13:26:10 -0500
parents 3b6e5914edd8
children 027763aed157
files mercurial/lock.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/lock.py	Mon Aug 24 13:24:43 2015 -0500
+++ b/mercurial/lock.py	Mon Aug 24 13:26:10 2015 -0500
@@ -65,7 +65,7 @@
         timeout = self.timeout
         while True:
             try:
-                self.trylock()
+                self._trylock()
                 return self.timeout - timeout
             except error.LockHeld as inst:
                 if timeout != 0:
@@ -76,7 +76,7 @@
                 raise error.LockHeld(errno.ETIMEDOUT, inst.filename, self.desc,
                                      inst.locker)
 
-    def trylock(self):
+    def _trylock(self):
         if self.held:
             self.held += 1
             return