comparison hgext/factotum.py @ 33242:037c5c937602

configitems: register the 'factotum.mountpoint' config
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 30 Jun 2017 03:42:13 +0200
parents 21b568820a3c
children a9524aea7cab
comparison
equal deleted inserted replaced
33241:21b568820a3c 33242:037c5c937602
68 configitem = registrar.configitem(configtable) 68 configitem = registrar.configitem(configtable)
69 69
70 configitem('factotum', 'executable', 70 configitem('factotum', 'executable',
71 default='/bin/auth/factotum', 71 default='/bin/auth/factotum',
72 ) 72 )
73 configitem('factotum', 'mountpoint',
74 default='/mnt/factotum',
75 )
73 76
74 def auth_getkey(self, params): 77 def auth_getkey(self, params):
75 if not self.ui.interactive(): 78 if not self.ui.interactive():
76 raise error.Abort(_('factotum not interactive')) 79 raise error.Abort(_('factotum not interactive'))
77 if 'user=' not in params: 80 if 'user=' not in params:
135 138
136 def uisetup(ui): 139 def uisetup(ui):
137 global _executable 140 global _executable
138 _executable = ui.config('factotum', 'executable') 141 _executable = ui.config('factotum', 'executable')
139 global _mountpoint 142 global _mountpoint
140 _mountpoint = ui.config('factotum', 'mountpoint', '/mnt/factotum') 143 _mountpoint = ui.config('factotum', 'mountpoint')
141 global _service 144 global _service
142 _service = ui.config('factotum', 'service', 'hg') 145 _service = ui.config('factotum', 'service', 'hg')