[MERGE] migrate switch command into the core

John Arbash Meinel john at arbash-meinel.com
Fri Nov 16 16:19:06 GMT 2007


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

Ian Clatworthy wrote:
> As recently discussed, here's a patch to add switch to the core product.
> This is basically the code taken directly from BzrTools. I think it is
> worth landing this first and then extending it (via a second patch I'll
> do) to support heavyweight checkouts as Matthew, John and Aaron have
> been discussing.
> 
> Once this is through review and landed, I'll submit the changes to
> BzrTools as well to take switch out of there. In the meantime, I'm
> assuming that there won't be any problems having the "same" code in two
> places?
> 
> BTW, now seems like a good time to acknowledge the work Aaron Bentley
> and David Allouche did to write the original code. I've added their
> names to the NEWS item but removed their names from the file headers for
> the sake of standardising the copyright header.
> 
> Ian C.
> 

Well, one trick is to add the file with the same file id. Specifically you can do:

bzr add switch.py --file-ids-from=.../bzrtools

You may have to add switch.py in the root rather than in bzrlib so that
- --file-ids-from can see that it is the same file. But then you can 'bzr mv
switch.py bzrlib'.

It isn't perfect, as the file-id graphs aren't synced (that is part of
cherrypicking support, etc.) But it does mean that if in the future you try to
cherrypick a specific revision which only touches that file, it *should* try to
apply that to the correct file in the other branch.

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

iD8DBQFHPcL6JdeBCYSNAAMRAoVdAJ0T4pEK4D5rueuq/i6JPwLcWcdSxACgw2iD
vrxnAQnyT9HVRPDgyBRvHY8=
=PEa5
-----END PGP SIGNATURE-----



More information about the bazaar mailing list