Merge lp://staging/~spiv/bzr/checkout-tags-propagation-603395-2.2 into lp://staging/bzr/2.2
Status: | Superseded |
---|---|
Proposed branch: | lp://staging/~spiv/bzr/checkout-tags-propagation-603395-2.2 |
Merge into: | lp://staging/bzr/2.2 |
Diff against target: |
427 lines (+276/-16) 8 files modified
NEWS (+13/-0) bzrlib/branch.py (+1/-1) bzrlib/builtins.py (+3/-1) bzrlib/tag.py (+69/-13) bzrlib/tests/blackbox/test_merge.py (+1/-1) bzrlib/tests/blackbox/test_tags.py (+12/-0) bzrlib/tests/per_branch/test_tags.py (+170/-0) bzrlib/tests/test_tag.py (+7/-0) |
To merge this branch: | bzr merge lp://staging/~spiv/bzr/checkout-tags-propagation-603395-2.2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Needs Fixing | ||
Review via email:
|
This proposal has been superseded by a proposal from 2010-11-09.
Commit message
Tags.merge_to now updates the master branch as well, if any. (#603395)
Description of the change
This is part of the fix for bug 603395. It makes BasicTags.merge_to also merge to the master branch, if there is one. This is consistent with e.g. set_tag.
bzr-builddeb directly calls that API, and presumably expects merge_to in a checkout branch to update the master as well.
This tests take care to deal with all the permutations, including those that can only be triggered by an unfixed bzr operating on the checkout. See the test comments for details.
See also <https:/
I should point out: this does have the perhaps unwanted side-effect that "bzr merge" can cause tags to be added the master even if the next command is "bzr commit". That's really <https:/ /bugs.launchpad .net/bzr/ +bug/99137> (tags are "permanently" propagated by merge), and this patch is just making the overall behaviour more consistent. I can see an argument that undoing the accidental limiting of the the effect of bug 99137 might not be acceptable in a stable branch, though.
A compromise would be to add a new optional argument to merge_to (or perhaps a whole new method) that callers can use to explicitly enable/disable propagation. I'm not sure if it would be better to default to enabled (so that plugins like builddeb can automatically benefit), or disabled (to minimise the change in behaviour, and also perhaps to avoid needing to tweak the API layers between cmd_merge and br.tags.merge_to to pass the flag). With 'bzr merge' not propagating we'd then rely on <https:/ /code.launchpad .net/~spiv/ bzr/tags- commit- propagation- 603395- 2.2> to propagate at commit time rather than merge time.