[PATCH 3 of 3 RFC] various extensions: use ui.configpath() for non-config file paths
Greg Ward
greg-hg at gerg.ca
Sun Oct 23 21:29:30 CDT 2011
# HG changeset patch
# User Greg Ward <greg at gerg.ca>
# Date 1319423183 14400
# Branch stable
# Node ID 882157f6e8814b6a4d006b98bce3863e1a3bd038
# Parent 330f23b14057c88e3ed8c5f178dc7f7dbc8b7c70
various extensions: use ui.configpath() for non-config file paths
- bugzilla: path to Bugzilla installation
- inotify: pid file, log file
diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py
--- a/hgext/bugzilla.py
+++ b/hgext/bugzilla.py
@@ -379,7 +379,8 @@
for id in ids:
self.ui.status(_(' bug %s\n') % id)
cmdfmt = self.ui.config('bugzilla', 'notify', self.default_notify)
- bzdir = self.ui.config('bugzilla', 'bzdir', '/var/www/html/bugzilla')
+ bzdir = self.ui.configpath(
+ 'bugzilla', 'bzdir', '/var/www/html/bugzilla')
try:
# Backwards-compatible with old notify string, which
# took one string. This will throw with a new format
diff --git a/hgext/inotify/server.py b/hgext/inotify/server.py
--- a/hgext/inotify/server.py
+++ b/hgext/inotify/server.py
@@ -478,12 +478,12 @@
else:
runargs = util.hgcmd() + sys.argv[1:]
- pidfile = ui.config('inotify', 'pidfile')
+ pidfile = ui.configpath('inotify', 'pidfile')
if opts['daemon'] and pidfile is not None and 'pid-file' not in runargs:
runargs.append("--pid-file=%s" % pidfile)
service = service()
- logfile = ui.config('inotify', 'log')
+ logfile = ui.configpath('inotify', 'log')
appendpid = ui.configbool('inotify', 'appendpid', False)
More information about the Mercurial-devel
mailing list