[PATCH 2 of 3 RFC] various extensions: use ui.configpath() to get config file paths
Greg Ward
greg-hg at gerg.ca
Mon Oct 24 02:29:29 UTC 2011
# HG changeset patch
# User Greg Ward <greg at gerg.ca>
# Date 1319423148 14400
# Branch stable
# Node ID 330f23b14057c88e3ed8c5f178dc7f7dbc8b7c70
# Parent 355886191fae0c2dc21bd8fa4670de2da86b4caf
various extensions: use ui.configpath() to get config file paths
- acl: explain why we're not using configpath() (yet)
- bugzilla: usermap file
- notify: config file
diff --git a/hgext/acl.py b/hgext/acl.py
--- a/hgext/acl.py
+++ b/hgext/acl.py
@@ -218,6 +218,8 @@
ui.debug('acl: checking access for user "%s"\n' % user)
+ # XXX should use ui.configpath() here, but the test seems to
+ # assume that acl.config is relative to the current dir
cfg = ui.config('acl', 'config')
if cfg:
ui.readconfig(cfg, sections = ['acl.groups', 'acl.allow.branches',
diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py
--- a/hgext/bugzilla.py
+++ b/hgext/bugzilla.py
@@ -262,7 +262,7 @@
def __init__(self, ui):
self.ui = ui
- usermap = self.ui.config('bugzilla', 'usermap')
+ usermap = self.ui.configpath('bugzilla', 'usermap')
if usermap:
self.ui.readconfig(usermap, sections=['usermap'])
diff --git a/hgext/notify.py b/hgext/notify.py
--- a/hgext/notify.py
+++ b/hgext/notify.py
@@ -149,7 +149,7 @@
def __init__(self, ui, repo, hooktype):
self.ui = ui
- cfg = self.ui.config('notify', 'config')
+ cfg = self.ui.configpath('notify', 'config')
if cfg:
self.ui.readconfig(cfg, sections=['usersubs', 'reposubs'])
self.repo = repo
More information about the Mercurial-devel
mailing list