Rev 6445: Support scripts that don't call bzrlib.initialize() but still call run_bzr(). in file:///home/vila/src/bzr/bugs/917733-cmdline-overrides/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Jan 19 10:28:32 UTC 2012
At file:///home/vila/src/bzr/bugs/917733-cmdline-overrides/
------------------------------------------------------------
revno: 6445
revision-id: v.ladeuil+lp at free.fr-20120119102811-xymwz1k7bi0v19h9
parent: pqm at pqm.ubuntu.com-20120118111041-ycipd0shpm4kbtsl
fixes bug: https://launchpad.net/bugs/917733
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 917733-cmdline-overrides
timestamp: Thu 2012-01-19 11:28:11 +0100
message:
Support scripts that don't call bzrlib.initialize() but still call run_bzr().
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2011-12-18 12:46:49 +0000
+++ b/bzrlib/commands.py 2012-01-19 10:28:11 +0000
@@ -1071,7 +1071,11 @@
argv_copy.append(a)
i += 1
- bzrlib.global_state.cmdline_overrides._from_cmdline(override_config)
+ if bzrlib.global_state is None:
+ cmdline_overrides = config.CommandLineStore()
+ else:
+ cmdline_overrides = bzrlib.global_state.cmdline_overrides
+ cmdline_overrides._from_cmdline(override_config)
debug.set_debug_flags_from_config()
@@ -1131,7 +1135,7 @@
trace.debug_memory('Process status after command:', short=False)
option._verbosity_level = saved_verbosity_level
# Reset the overrides
- bzrlib.global_state.cmdline_overrides._reset()
+ cmdline_overrides._reset()
def display_command(func):
=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt 2012-01-18 10:42:07 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt 2012-01-19 10:28:11 +0000
@@ -32,6 +32,9 @@
.. Fixes for situations where bzr would previously crash or give incorrect
or undesirable results.
+* Support scripts that don't call bzrlib.initialize() but still call run_bzr().
+ (Vincent Ladeuil, #917733)
+
* Test for equality instead of object identity where ROOT_PARENT is concerned.
(Wouter van Heyst, #881142)
More information about the bazaar-commits
mailing list