changeset 35217:d210723b73e5

lock: use configint for 'ui.timeout' config The ui object can do the conversion itself.
author Boris Feld <boris.feld@octobus.net>
date Wed, 29 Nov 2017 21:00:02 -0500
parents 278f1feee73a
children 1b758105b5c7
files hgext/journal.py mercurial/localrepo.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/journal.py	Mon Dec 04 09:39:37 2017 +0100
+++ b/hgext/journal.py	Wed Nov 29 21:00:02 2017 -0500
@@ -304,7 +304,7 @@
             # default to 600 seconds timeout
             l = lock.lock(
                 vfs, 'namejournal.lock',
-                int(self.ui.config("ui", "timeout")), desc=desc)
+                self.ui.configint("ui", "timeout"), desc=desc)
             self.ui.warn(_("got lock after %s seconds\n") % l.delay)
         self._lockref = weakref.ref(l)
         return l
--- a/mercurial/localrepo.py	Mon Dec 04 09:39:37 2017 +0100
+++ b/mercurial/localrepo.py	Wed Nov 29 21:00:02 2017 -0500
@@ -1611,7 +1611,7 @@
                              (desc, inst.locker))
             # default to 600 seconds timeout
             l = lockmod.lock(vfs, lockname,
-                             int(self.ui.config("ui", "timeout")),
+                             self.ui.configint("ui", "timeout"),
                              releasefn=releasefn, acquirefn=acquirefn,
                              desc=desc)
             self.ui.warn(_("got lock after %s seconds\n") % l.delay)