Merge lp:~jelmer/brz/push-uses-sprout into lp:brz

Proposed by Jelmer Vernooij on 2018-03-04
Status: Merged
Approved by: Jelmer Vernooij on 2018-03-05
Approved revision: 6877
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/push-uses-sprout
Merge into: lp:brz
Diff against target: 12 lines (+1/-1)
1 file modified
breezy/controldir.py (+1/-1)
To merge this branch: bzr merge lp:~jelmer/brz/push-uses-sprout
Reviewer Review Type Date Requested Status
Martin Packman 2018-03-04 Approve on 2018-03-05
Review via email: mp+340585@code.launchpad.net

Commit message

Use sprout rather than clone when creating a copy of a branch in a controldir.

Description of the change

Use sprout rather than clone when creating a copy of a branch in a controldir.

This is necessary in the case where the target controldir is incompatible with
the source branch format. (e.g. pushing from bzr to git or vice versa)

To post a comment you must log in.
Martin Packman (gz) wrote :

Okay, implementation differences here all a bit complex, but seems sane enough.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/controldir.py'
2--- breezy/controldir.py 2017-11-28 17:13:29 +0000
3+++ breezy/controldir.py 2018-03-04 19:18:46 +0000
4@@ -415,7 +415,7 @@
5 # revision
6 revision_id = source.last_revision()
7 repository_to.fetch(source.repository, revision_id=revision_id)
8- br_to = source.clone(self, revision_id=revision_id)
9+ br_to = source.sprout(self, revision_id=revision_id)
10 if source.get_push_location() is None or remember:
11 # FIXME: Should be done only if we succeed ? -- vila 2012-01-18
12 source.set_push_location(br_to.base)

Subscribers

People subscribed via source and target branches