Rev 6465: (jelmer) Migrate the 'bugtracker' configuration setting to config stacks. in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Feb 7 13:18:41 UTC 2012
At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 6465 [merge]
revision-id: pqm at pqm.ubuntu.com-20120207131840-0whz346qm1ikv3pp
parent: pqm at pqm.ubuntu.com-20120207005724-xvfawh5exf1ohusu
parent: jelmer at samba.org-20120207004958-rdtzmipi10p1oq97
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2012-02-07 13:18:40 +0000
message:
(jelmer) Migrate the 'bugtracker' configuration setting to config stacks.
(Jelmer Vernooij)
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/merge_directive.py merge_directive.py-20070228184838-ja62280spt1g7f4x-1
bzrlib/tests/blackbox/test_commit.py test_commit.py-20060212094538-ae88fc861d969db0
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2012-02-06 23:38:33 +0000
+++ b/bzrlib/builtins.py 2012-02-07 13:18:40 +0000
@@ -3515,8 +3515,8 @@
tokens = fixed_bug.split(':')
if len(tokens) == 1:
if default_bugtracker is None:
- branch_config = branch.get_config()
- default_bugtracker = branch_config.get_user_option(
+ branch_config = branch.get_config_stack()
+ default_bugtracker = branch_config.get(
"bugtracker")
if default_bugtracker is None:
raise errors.BzrCommandError(gettext(
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py 2012-02-06 11:58:42 +0000
+++ b/bzrlib/config.py 2012-02-07 00:49:58 +0000
@@ -2673,6 +2673,15 @@
a file has been touched.
'''))
option_registry.register(
+ Option('bugtracker', default=None,
+ help='''\
+Default bug tracker to use.
+
+This bug tracker will be used for example when marking bugs
+as fixed using ``bzr commit --fixes``, if no explicit
+bug tracker was specified.
+'''))
+option_registry.register(
Option('check_signatures', default=CHECK_IF_POSSIBLE,
from_unicode=signature_policy_from_unicode,
help='''\
@@ -2899,7 +2908,6 @@
'bzrlib.transport.http._urllib2_wrappers', 'opt_ssl_cert_reqs')
-
class Section(object):
"""A section defines a dict of option name => value.
=== modified file 'bzrlib/merge_directive.py'
--- a/bzrlib/merge_directive.py 2011-12-18 15:28:38 +0000
+++ b/bzrlib/merge_directive.py 2012-02-07 00:49:58 +0000
@@ -260,7 +260,7 @@
:param sign: If True, gpg-sign the email
:return: an email message
"""
- mail_from = branch.get_config().username()
+ mail_from = branch.get_config_stack().get('email')
if self.message is not None:
subject = self.message
else:
=== modified file 'bzrlib/tests/blackbox/test_commit.py'
--- a/bzrlib/tests/blackbox/test_commit.py 2012-01-25 21:13:15 +0000
+++ b/bzrlib/tests/blackbox/test_commit.py 2012-02-07 00:49:58 +0000
@@ -628,7 +628,7 @@
"Commit refused."],
'commit -m add-b --fixes=123',
working_dir='tree')
- tree.branch.get_config().set_user_option("bugtracker", "lp")
+ tree.branch.get_config_stack().set("bugtracker", "lp")
self.run_bzr('commit -m hello --fixes=234 tree/hello.txt')
last_rev = tree.branch.repository.get_revision(tree.last_revision())
self.assertEqual('https://launchpad.net/bugs/234 fixed',
More information about the bazaar-commits
mailing list