right way to reverse engineer a "virgin" branch?

Chris Hecker checker at d6.com
Fri Apr 22 05:15:19 UTC 2011


I have two websites, one on mediawiki, and one on wordpress, and I've 
got them in bzr.  The problem is, because I'm dumb, I didn't start out 
the branch with a virgin distribution branch from 
wordpress.org/mediawiki.org, and then branch that to my site(s), so that 
any hacks I make on the core code are in my branch, and then I can 
update the virgin branch (I have a feeling there is a better name than 
"virgin" for this concept?) and merge over and bzr will keep my changes. 
  I just dumped the whole sites under bzr a while back to get it going 
(I figured having them in version control asap was more important that 
figuring this out back then).

So, now I'd like to "unmerge" them, so to speak, so that updates from 
the original code are easier.  What's the best way to do this?

Focusing on one of them for concreteness, since it's the identical 
problem for the other site, I have the site at mediawiki-1.15.5, and I 
want to update it to 1.16.4.  I'd like to do this unmerge now, so that 
this and any future updates from mediawiki go into the virgin branch 
first, then come across to my site.  I think the best I can do is to 
branch my current site to a virgin branch, then manually get that back 
to identical mediawiki-1.15.5, then merge that back over to my site, 
then reapply any changes in the site branch, so now I've got the site 
branch coming from the virgin 1.15.5 with applied changes so bzr knows 
they're on top of the merge.  Then, I update virgin to 1.16.4, and then 
merge over?  And bzr will do the right thing?

What do I do about stuff that I don't want in the virgin branch, but do 
in site?  It's in virgin because it was branch from site, but I'd like 
to just be able to rm everything in virgin and then untar the latest 
there, and then have bzr add and remove everything, but I can't do that 
right now, since I have the images/ dir in both site and virgin.  Should 
I bzr rm images in virgin, merge over, check in, and then recreate those 
files with a bzr revert -r -2 images/ in site?

Is that my best bet?  Is brz revert the right tool for this job?

Thanks,
Chris




More information about the bazaar mailing list