CVS Branchin', Balsa Hackin' Goodness



Okay, I've worked out all this crazy CVS branching stuff,
and committed the BALSA-CONFIG stuff. In addition, I set
up the branch latest-balsa-0-8. 

Re BALSA-CONFIG; checkout the tree and it should work
without any problems. You will lose your settings, but as
far as I can tell the patch is stable. One important
addition is a tool called offset-tool.sh; it makes things
more complicated, because there's lots of weird code
generation and stuff going on. But it corrects a problem
that as far as I can tell is insurmountable: I don't know
of a way to get the equivalent of the offsetof() macro
that is treated as a constant value for static initializers.
If someone knows a better way to do this, I'd like to hear
it, although I think offset-tool is really cool. But I
know it prevents cross-compiling and there are probably
other problems.

Re CVS branches:

I'm assuming you have an idea of how CVS branches work; it
took me a lot of digging, however, to figure out how to
use them. Here's my little quickie manual.

Ideally, any new patches that come in will be committed
to both the HEAD branch and the latest-balsa-0-8 branch.
This, however, requires maintaining two Balsa source
checkouts, which is something of a pain. We *can*
synchronize latest-balsa-0-8 with HEAD, but once big
changes land in HEAD, this won't work. So hopefully we can
get used to the two branches now.

This is how I take care of the three branches: HEAD,
latest-balsa-0-8, and BALSA-CONFIG...
   1) I have a directory $HOME/Balsa, which contains...
   2) three subdirs, named HEAD, latest-balsa-0-8, and
      BALSA-CONFIG
   3) In each of those subdirectories, I did a 'cvs co
      -r <branchname>' to get the desired revision.
   4) Each of those checkouts results in another
      subdirectory named balsa (which
      is why we can't put them all in ~/Balsa) and is 
      used for building and maintaining each tree.
   5) I personally make a build/ subdirectory under 
      HEAD etc. for keeping the build directory from the
      source directory.

Say we get a 0.8.0 bugfix. Then the patch is applied in
HEAD *** and in latest-balsa-0-8 *** and both are 
committed.

Say a major change to Balsa lands. We commit it into HEAD,
but don't touch latest-balsa-0-8 because latest-balsa-0-8
is only for bugfixes.

Say we want to merge BALSA-CONFIG into HEAD. The proper
way to do this is 

   cd ~/Balsa/HEAD/balsa
   cvs update
   cvs update -j BALSA-CONFIG
   cvs checkin

Say we want to merge BALSA-CONFIG into latest-0-8. We
realize that this is Wrong, so we don't. :-)

Say we want to create a new branch for some new feature:

   cd ~/Balsa
   mkdir Feature
   cvs rtag initial-Feature balsa
   cvs rtag -b -r initial-Feature Feature balsa
   cd Feature
   cvs co -r Feature

And then you make your changes in ~/Balsa/Feature. As
far as I can tell, there is no way to retag an existing
tree, so you'll have to copy your changes over to 
~/Balsa/Feature and commit them from there.

-- 
==============================
Peter Williams peter@newton.cx
"AIIEEEEEEEEE!!! DEATH ANTS!!"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]