[C++-sig] Re: New indexing suite nearing review readiness

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Mon Oct 6 21:39:32 CEST 2003


--- David Abrahams <dave at boost-consulting.com> wrote:
> > Well, I'm a bit confused about this branching business. If I create a
> > branch on the files in (say) boost/python/suite/indexing/ and I then
> > do a cvs update -r my_new_branch in a parent directory, won't that then
> > delete all the files that don't *have* a my_new_branch?
> 
> Raoul,
> 
> have you seen http://cvsbook.red-bean.com/?
> It explains all.

Right. This is the title of the relevant section :)

Going Out On A Limb (How To Work With Branches And Survive)

I guess as a punishment for being vicious I should try to be constructive. When
I was writing "more problems" I had the following in mind:

- At some point I tried to branch individual files. I cannot remember the
details of all implications, but it was horrible. Ever since then my survial
rule #1 is "don't branch files, only branch complete sub-directory trees."

- Survival rule #2 was already offered by Joel, I believe: run the cvs update
-r command (following the cvs tag -b) only in the branched subdirectory. (After
this you can run cvs update from the top level as long as you don't specify a
-r again.)

This should get you a long way, but in my experience there is another problem
when you finally merge the branch. It has to do with files that

- existed on the HEAD at the point of branching
- and were later removed on the branch

These still exist on the HEAD after merging. To make sure you don't have stray
files after the merge keep a copy of the branch and run a diff -r branch_dir
merge_dir.

Final point: if someone updates files on the HEAD you will not see these
changes on the branch unless you explicitly merge them. If you maintain a
branch for a long time this can become very cumbersome. This leads to my
survival rule #3: branch only at the latest point possible.

Ralf


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com




More information about the Cplusplus-sig mailing list