Converting a checkout to a branch

Asked by Johan Walles on 2010-03-14

An SVN user has done "checkout" of my code from bzr when he should have done "branch".

He has some work in his checkout that I'd like him to "bzr send" to me.

What's the easiest way for him to convert his checkout to a branch so that he can "bzr send" me his changes?

Doing "bzr unbind" is rather useless since it throws away the link to my upstream branch.

In other words, what should YYY be for these two command lines to generate identical branches on my disk?
1. bzr branch XXX
2. bzr checkout XXX ; bzr YYY

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
2010-03-14
Last reply:
2010-03-19
John A Meinel (jameinel) said : #1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johan Walles wrote:
> New question #104314 on Bazaar:
> https://answers.launchpad.net/bzr/+question/104314
>
> An SVN user has done "checkout" of my code from bzr when he should have done "branch".
>
> He has some work in his checkout that I'd like him to "bzr send" to me.
>
> What's the easiest way for him to convert his checkout to a branch so that he can "bzr send" me his changes?
>
> Doing "bzr unbind" is rather useless since it throws away the link to my upstream branch.
>
> In other words, what should YYY be for these two command lines to generate identical branches on my disk?
> 1. bzr branch XXX
> 2. bzr checkout XXX ; bzr YYY
>
>

You are just missing the parent or submit location, so doing:

bzr checkout XXX; bzr merge --remember :bound; bzr unbind; bzr revert

Might do the right thing. (merge --remember :bound will set the submit
location to the ':bound' branch.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAkuc8OYACgkQJdeBCYSNAAMPZQCY6EoUpejN4WMxoBtrCimUp1al
CgCeIDoG+Os4EqON8RRxUd42/rIKFxo=
=z77K
-----END PGP SIGNATURE-----

Johan Walles (walles) said : #2

Yup, that makes it possible to do "bzr send". Thanks!

What if he wants to do "bzr missing" as well?

Martin Pool (mbp) said : #3

'bzr missing' tells you about revisions that are in one branch and not in the other. So the question is, will this user have created new revisions?

1- if they simply have a checkout and they commit, it will normally go back into the branch, in which case you will already have his work; you just need to get their uncommitted changes

2- if he has done 'commit --local' then unbinding will let him commit those changes in his own branch and then either run missing or send them to you

3- perhaps he hasn't done commit at all yet

Can you help with this problem?

Provide an answer of your own, or ask Johan Walles for more information if necessary.

To post a message you must log in.