partial branches

Erik de Castro Lopo erikd+bzr at mega-nerd.com
Mon May 14 11:17:52 BST 2007


John,

I tried your option 3 below and thought I give a little feedback
as there were a couple of missing steps. I'll point them out
below.

John Arbash Meinel wrote:

> 3) If you don't care about publicizing the history of the public
> project, you can use a simple trick:
> 
> cd private
> bzr export ../public
> cd ../public
> rm -rf stuff I don't want

Need to do a "bzr init" here otherwise we're doing the "bzr add"
without any bzr metadata.

> bzr add --file-ids-from ../private
> bzr commit -m "First snapshot of the public project"
> 
> Now you have a branch with no history, but matching file ids to the
> private project. If you then do:
> 
> cd ../private
> bzr merge -r 0..-1 ../public
> 
> This will probably cause lots of conflicts (since the files show up as
> "new" in the public side).
> 
> bzr revert .
> 
> The final "." is important. It reverts all of the file-content changes
> without reverting the "pending-merge".

I still had a bunch of conflicts here and had to do a 

    bzr resolve --all
 
> bzr commit -m "merge and reject public project changes".

This now seems to be working. I'll post an update if I run into any
troubles.

Cheers,
Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Don't hate the media. Become the media."
- Jello Biafra



More information about the bazaar mailing list