Merge lp:~abentley/bzr/fix-switch-branch into lp:bzr
Status: | Merged |
---|---|
Approved by: | John A Meinel |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~abentley/bzr/fix-switch-branch |
Merge into: | lp:bzr |
Diff against target: |
93 lines (+33/-4) 4 files modified
NEWS (+3/-0) bzrlib/merge.py (+4/-1) bzrlib/switch.py (+1/-2) bzrlib/tests/test_switch.py (+25/-1) |
To merge this branch: | bzr merge lp:~abentley/bzr/fix-switch-branch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Approve | ||
Review via email: mp+24050@code.launchpad.net |
Description of the change
Hi all,
This branch fixes a bug it took me a while to track down, because I initially
assume it was related to pipelines.
Basically, the issue is that Merge3Merger does not guarantee that
self.this_branch has a value, but ConfigurableFil
Merger does provide this guarantee, but switch doesn't use Merger.
This manifested in switch as:
File "/home/
hook_status, lines = hook.merge_
File "/home/
not self.filename_
File "/home/
config = self.merger.
AttributeError: 'NoneType' object has no attribute 'get_config'
But of course, it is only triggered if a ConfigurableFil
when editing NEWS.
This branch fixes it at Merge3Merger, by ensuring that this_branch is set to
this_tree.branch if not supplied. It could also have been fixed at switch, but
I was concerned that this could lead to repeats of this problem.
There is an open bug on this, in fact there are like 3. It should be mentioned in NEWS. Otherwise: