# HG changeset patch # User Steven Stallion # Date 1334722357 25200 # Node ID cef755f86d5cb4b266cb3dca96f6693c83aa8d2f # Parent 09dd707b522a766b7d5e5fd221c4e68ac735f4d9 factotum: rename mount and path configuration entries The factotum extension used mount and path entries which were too generic. These have been replaced by mountpoint and executable (respectively) to match existing conventions. diff -r 09dd707b522a -r cef755f86d5c hgext/factotum.py --- a/hgext/factotum.py Wed Apr 18 11:46:23 2012 -0500 +++ b/hgext/factotum.py Tue Apr 17 21:12:37 2012 -0700 @@ -35,13 +35,13 @@ default, these entries are:: [factotum] - mount = /mnt/factotum - path = /bin/auth/factotum + executable = /bin/auth/factotum + mountpoint = /mnt/factotum service = hg -The mount entry defines the mount point for the factotum file service. The -path entry defines the full path to the factotum binary. Lastly, the service -entry controls the service name used when reading keys. +The executable entry defines the full path to the factotum binary. The +mountpoint entry defines the path to the factotum file service. Lastly, the +service entry controls the service name used when reading keys. ''' @@ -58,12 +58,12 @@ if 'user=' not in params: params = '%s user?' % params params = '%s !password?' % params - os.system("%s -g '%s'" % (_path, params)) + os.system("%s -g '%s'" % (_executable, params)) def auth_getuserpasswd(self, getkey, params): params = 'proto=pass %s' % params while True: - fd = os.open('%s/rpc' % _mount, os.O_RDWR) + fd = os.open('%s/rpc' % _mountpoint, os.O_RDWR) try: try: os.write(fd, 'start %s' % params) @@ -112,9 +112,9 @@ return (user, passwd) def uisetup(ui): - global _mount - _mount = ui.config('factotum', 'mount', '/mnt/factotum') - global _path - _path = ui.config('factotum', 'path', '/bin/auth/factotum') + global _executable + _executable = ui.config('factotum', 'executable', '/bin/auth/factotum') + global _mountpoint + _mountpoint = ui.config('factotum', 'mountpoint', '/mnt/factotum') global _service _service = ui.config('factotum', 'service', 'hg')