hints on splitting out part of a branch

John Arbash Meinel john at arbash-meinel.com
Sat May 12 19:20:51 UTC 2012


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

On 5/12/2012 4:14 PM, Wichmann, Mats D wrote:
> I recall there has been discussion a few time in the past about 
> approaches for moving a subset of a branch out into its own branch,
> but retaining some of the original context (commit history, at
> least as relates to the subset).  And I can't find any of that...
> 
> We've got a branch which is watched by a job submission task which
> sends it to buildbot for rebuilding when there's a commit. One
> subdirectory of this branch has over the years grown apart so it no
> longer has a connection with the rest of it; and it does not
> contribute to the package that is built from the rest of the branch
> so it's irritating when a change in this area triggers a rebuild,
> needlessly (actually, a whole cascading set of events which is a
> bit expensive).  People would prefer to see it split off, but not
> to have all of the past history lost.
> 
> Thoughts?
> 

There is a command "bzr split", which essentially just does:

bzr branch whole_tree new_subtree
cd new_subtree
bzr rm stuff more_stuff
bzr mv keep_stuff/* .

That splits off keep_stuff into its own branch, which you can then
build off of.

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

iEYEARECAAYFAk+uuBMACgkQJdeBCYSNAAPTLQCg0NLcWZZRZN2JXC8YROlwKjlO
aNEAn0hcu3y442zJz5JPKoTIs+lGT/E1
=Q2ab
-----END PGP SIGNATURE-----



More information about the bazaar mailing list