Merge lp:~spiv/bzr/switch-crash-559436 into lp:bzr/2.1
Status: | Rejected |
---|---|
Rejected by: | Andrew Bennetts |
Proposed branch: | lp:~spiv/bzr/switch-crash-559436 |
Merge into: | lp:bzr/2.1 |
Diff against target: |
64 lines (+23/-2) 3 files modified
NEWS (+14/-0) bzrlib/merge.py (+7/-1) bzrlib/switch.py (+2/-1) |
To merge this branch: | bzr merge lp:~spiv/bzr/switch-crash-559436 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
bzr-core | Pending | ||
Review via email: mp+23817@code.launchpad.net |
Commit message
Fix crash in 'bzr switch' related to the merge_file_content hook.
Description of the change
This fixes bug 559436. A more conservative change might be to explicitly pass this_branch in bzrlib.
I haven't added test coverage explicitly, instead relying on a new assertion in Merge3Merger to trip. In an earlier revision I added test coverage in a pretty blunt way: by registering a hook in setUp of blackbox.
(Incidentally, I cannot find a case where a *Merger is passed a this_tree that is not the same object as the working_tree, and Merge3Merger actually does self.this_tree = working_tree. Something to clean up in a future API bump perhaps.)