[PATCH] factotum: rename mount and path configuration entries
Steven Stallion
sstallion at gmail.com
Tue Apr 17 23:31:12 UTC 2012
# HG changeset patch
# User Steven Stallion <sstallion at gmail.com>
# Date 1334705438 25200
# Node ID 91ee267604aefd135aa7932cd8e24e623a7d950f
# Parent 91196ebcaeed06217427e08b879e761dc79472c7
factotum: rename mount and path configuration entries
The factotum extension used mount and path entries which are deemed
too generic. These have been replaced by mountpoint and executable
respectively to match existing conventions among other extensions.
diff -r 91196ebcaeed -r 91ee267604ae hgext/factotum.py
--- a/hgext/factotum.py Mon Apr 16 22:41:03 2012 -0700
+++ b/hgext/factotum.py Tue Apr 17 16:30:38 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 mountpoint entry defines the path for the factotum file service. The
+executable entry defines the full path to the factotum binary. 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')
More information about the Mercurial-devel
mailing list