##// END OF EJS Templates
configitems: register the 'factotum.executable' config
marmoute -
r33238:21b56882 default
parent child Browse files
Show More
@@ -52,6 +52,7 b' from mercurial.i18n import _'
52 from mercurial import (
52 from mercurial import (
53 error,
53 error,
54 httpconnection,
54 httpconnection,
55 registrar,
55 url,
56 url,
56 util,
57 util,
57 )
58 )
@@ -63,6 +64,13 b' ERRMAX = 128'
63
64
64 _executable = _mountpoint = _service = None
65 _executable = _mountpoint = _service = None
65
66
67 configtable = {}
68 configitem = registrar.configitem(configtable)
69
70 configitem('factotum', 'executable',
71 default='/bin/auth/factotum',
72 )
73
66 def auth_getkey(self, params):
74 def auth_getkey(self, params):
67 if not self.ui.interactive():
75 if not self.ui.interactive():
68 raise error.Abort(_('factotum not interactive'))
76 raise error.Abort(_('factotum not interactive'))
@@ -127,7 +135,7 b' def find_user_password(self, realm, auth'
127
135
128 def uisetup(ui):
136 def uisetup(ui):
129 global _executable
137 global _executable
130 _executable = ui.config('factotum', 'executable', '/bin/auth/factotum')
138 _executable = ui.config('factotum', 'executable')
131 global _mountpoint
139 global _mountpoint
132 _mountpoint = ui.config('factotum', 'mountpoint', '/mnt/factotum')
140 _mountpoint = ui.config('factotum', 'mountpoint', '/mnt/factotum')
133 global _service
141 global _service
General Comments 0
You need to be logged in to leave comments. Login now