[PATCH 1 of 3 V2] lock: use configint for 'ui.timeout' config
Boris Feld
boris.feld at octobus.net
Mon Dec 4 10:28:42 UTC 2017
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1512007202 18000
# Wed Nov 29 21:00:02 2017 -0500
# Node ID 144214ed28417180a25a0f6311de1f0ac0b02b8e
# Parent 8287df8b7be545fdafa22b771012ac65f6264d12
# EXP-Topic lock-message
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 144214ed2841
lock: use configint for 'ui.timeout' config
The ui object can do the conversion itself.
diff --git a/hgext/journal.py b/hgext/journal.py
--- a/hgext/journal.py
+++ b/hgext/journal.py
@@ -304,7 +304,7 @@ class journalstorage(object):
# 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
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1609,7 +1609,7 @@ class localrepository(object):
(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)
More information about the Mercurial-devel
mailing list