# HG changeset patch # User Pierre-Yves David # Date 1498786932 -7200 # Node ID 21b568820a3cb38dc3a6cfa93c2923cca0284959 # Parent 91c1e7c974c286611016e5f2324709620e1f26a9 configitems: register the 'factotum.executable' config diff -r 91c1e7c974c2 -r 21b568820a3c hgext/factotum.py --- a/hgext/factotum.py Fri Jun 30 03:42:26 2017 +0200 +++ b/hgext/factotum.py Fri Jun 30 03:42:12 2017 +0200 @@ -52,6 +52,7 @@ from mercurial import ( error, httpconnection, + registrar, url, util, ) @@ -63,6 +64,13 @@ _executable = _mountpoint = _service = None +configtable = {} +configitem = registrar.configitem(configtable) + +configitem('factotum', 'executable', + default='/bin/auth/factotum', +) + def auth_getkey(self, params): if not self.ui.interactive(): raise error.Abort(_('factotum not interactive')) @@ -127,7 +135,7 @@ def uisetup(ui): global _executable - _executable = ui.config('factotum', 'executable', '/bin/auth/factotum') + _executable = ui.config('factotum', 'executable') global _mountpoint _mountpoint = ui.config('factotum', 'mountpoint', '/mnt/factotum') global _service