Merge lp:~ryorke/bzr/202374-pull-update-showbase into lp:bzr
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Martin Pool | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5455 | ||||
Proposed branch: | lp:~ryorke/bzr/202374-pull-update-showbase | ||||
Merge into: | lp:bzr | ||||
Diff against target: |
263 lines (+118/-12) 5 files modified
NEWS (+9/-0) bzrlib/builtins.py (+16/-5) bzrlib/tests/blackbox/test_pull.py (+43/-0) bzrlib/tests/blackbox/test_update.py (+38/-0) bzrlib/workingtree.py (+12/-7) |
||||
To merge this branch: | bzr merge lp:~ryorke/bzr/202374-pull-update-showbase | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Packman (community) | Approve | ||
bzr-core | Pending | ||
Review via email: mp+36571@code.launchpad.net |
Commit message
Enable use of 3-way conflict markers in pull and update by adding --show-base option
Description of the change
Fixes bug 202374, --show-base for pull and update.
Code more-or-less copied from builtins.cmd_merge. In both cases show_base gets passed down to merge.merge_inner in the appropriate WorkingTree method.
Disallow --show-base for pull if not invoked on a working tree.
Tests added in tests/blackbox/
Default unchange (i.e., by default don't show-base). The bug reporter asked for --show-base to be the default, which may be sensible, but that is a design decision that I won't take.
I've run './bzr --no-plugins selftest --parallel=fork' on my system which selftest reports as
bzr-2.3.0dev1 python-2.6.4 Linux-2.
I get some odd results, including maximum recursion depth exceeded, and a few errors in test_test_server. I hope these are unrelated to my changes.
Running
'./bzr --no-plugins selftest --parallel=fork blackbox'
gives
OK (known_failures=2)
22 tests skipped
Thanks for working on this Rory, the change looks pretty good to me.
You'll want to add a NEWS entry for this, see the 'Documenting Changes' section of doc/developers/ HACKING. txt for details.
> I get some odd results, including maximum recursion depth exceeded, and a few errors in > test_test_server. I hope these are unrelated to my changes.
Almost certainly unrelated, but it might be worth checking if there are open bugs on any of these failures and filing if not.
Some nitpicks on the diff:
+ def run(self, dir='.', revision= None,show_ base=None) :
PEP 8, you want a space before show_base there.
+ open(pathjoin('a', 'hello' ),'wt') .write( 'fee')
The test lines like this are relying on refcounting to do the right thing, which is fine, and as you care about the content for these tests I see why you didn't use the normal make_branch_ and_tree options, but a different spelling would be preferable.
+ #tree.update() gives no such revision, so ... bzr(['update' ,'-r1'] )
+ self.run_
As your comment notes, this isn't ideal, we only really want to be using run_bzr for commands we're actually testing. Perhaps another reviewer can suggest a better option.
Tests pass here, just need that news added and another reviewer's opinion.