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

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
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 Approve
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.
Revision history for this message
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
=== modified file 'breezy/controldir.py'
--- breezy/controldir.py 2017-11-28 17:13:29 +0000
+++ breezy/controldir.py 2018-03-04 19:18:46 +0000
@@ -415,7 +415,7 @@
415 # revision415 # revision
416 revision_id = source.last_revision()416 revision_id = source.last_revision()
417 repository_to.fetch(source.repository, revision_id=revision_id)417 repository_to.fetch(source.repository, revision_id=revision_id)
418 br_to = source.clone(self, revision_id=revision_id)418 br_to = source.sprout(self, revision_id=revision_id)
419 if source.get_push_location() is None or remember:419 if source.get_push_location() is None or remember:
420 # FIXME: Should be done only if we succeed ? -- vila 2012-01-18420 # FIXME: Should be done only if we succeed ? -- vila 2012-01-18
421 source.set_push_location(br_to.base)421 source.set_push_location(br_to.base)

Subscribers

People subscribed via source and target branches