[PATCH 3 of 3] various extensions: use ui.configpath() for non-config file paths
Greg Ward
greg-hg at gerg.ca
Thu Dec 1 02:41:30 UTC 2011
# HG changeset patch
# User Greg Ward <greg at gerg.ca>
# Date 1322707245 18000
# Node ID a8426e3b443941ccae84e513d72385c8615cb2e0
# Parent d7dfdb703334d49525d66fb2addad45e05462c4b
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)
diff --git a/tests/test-check-code-hg.t b/tests/test-check-code-hg.t
--- a/tests/test-check-code-hg.t
+++ b/tests/test-check-code-hg.t
@@ -45,9 +45,6 @@
hgext/bugzilla.py:0:
> raise util.Abort(_('cannot find bugzilla user id for %s or %s') %
warning: line over 80 characters
- hgext/bugzilla.py:0:
- > bzdir = self.ui.config('bugzilla', 'bzdir', '/var/www/html/bugzilla')
- warning: line over 80 characters
hgext/convert/__init__.py:0:
> ('', 'ancestors', '', _('show current changeset in ancestor branches')),
warning: line over 80 characters
More information about the Mercurial-devel
mailing list