Merge lp:~lifeless/bzr/commit into lp:bzr

Proposed by Robert Collins
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~lifeless/bzr/commit
Merge into: lp:bzr
Diff against target: 42 lines (+6/-2)
2 files modified
NEWS (+3/-0)
bzrlib/commit.py (+3/-2)
To merge this branch: bzr merge lp:~lifeless/bzr/commit
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
bzr-core Pending
Review via email: mp+23150@code.launchpad.net

Commit message

(robertc) Fix regression in MutableTree.commit where it ignores passed in configs. (Robert Collins)

Description of the change

Fix (no tests, sorry EWEEKENDLAZY) a regression in commit where you cannot pass in a custom config object due to a glitch in how the config is found.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

FWIW I agree. It would be an interesting thing to check to see where a config is passed into the Commit object on construction.

review: Approve
Revision history for this message
Tim Penhey (thumper) wrote :

A quick grep of the source shows that the config is passed into the constructor only in tests.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-04-08 08:48:59 +0000
3+++ NEWS 2010-04-10 09:26:20 +0000
4@@ -22,6 +22,9 @@
5 Bug Fixes
6 *********
7
8+* ``bzrlib.mutabletree.MutableTree.commit`` will now support a passed in
9+ config as in previous versions of bzrlib. (Robert Collins)
10+
11 * Make sure the ``ExecutablePath`` and ``InterpreterPath`` are set in
12 Apport crash reports, to avoid "This problem report applies to a program
13 which is not installed any more" error.
14
15=== modified file 'bzrlib/commit.py'
16--- bzrlib/commit.py 2010-04-06 06:40:54 +0000
17+++ bzrlib/commit.py 2010-04-10 09:26:20 +0000
18@@ -243,6 +243,8 @@
19 """
20 operation = OperationWithCleanups(self._commit)
21 self.revprops = revprops or {}
22+ # XXX: Can be set on __init__ or passed in - this is a bit ugly.
23+ self.config = config or self.config
24 return operation.run(
25 message=message,
26 timestamp=timestamp,
27@@ -256,7 +258,6 @@
28 working_tree=working_tree,
29 local=local,
30 reporter=reporter,
31- config=config,
32 message_callback=message_callback,
33 recursive=recursive,
34 exclude=exclude,
35@@ -264,7 +265,7 @@
36
37 def _commit(self, operation, message, timestamp, timezone, committer,
38 specific_files, rev_id, allow_pointless, strict, verbose,
39- working_tree, local, reporter, config, message_callback, recursive,
40+ working_tree, local, reporter, message_callback, recursive,
41 exclude, possible_master_transports):
42 mutter('preparing to commit')
43