The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

CVS question

Argh, i always thougt i know how to handle cvs...it concerns branching and merging.
Maybe i'm just a little confused and you guys can help me out.

I have the main trunk and a branch, like this:

HEAD: ---+----+----+----+
REL :    |-------+----+

I need to merge the changes from HEAD to REL, well that's
simple: cvs update -j HEAD
So far, so good. After that, i still have two trunks in my
reposiory, i.e. The HEAD trunk is untouched.
What I need is basically to have the contents of the REL
branch _AFTER_ the merge also in the MAIN trunk, so that
only one trunk is left.
Graphically:

HEAD: ---+----+----+----+---|----+
REL :    |-------+----+-----+

Later this will be branched again.

The goal is, to have some kind of savepoint, where both
trunks do have the same contents, so that the further development in the HEAD trunk reflects the changes in REL
and that the release created from the REL branch reflects
the changes of HEAD.

Am I missing the obvious solution?

Thankful for every tip that removes the blockade of my brain....

Frank
Frank
Thursday, August 18, 2005
 
 
Oops, the ASCI graphics don't work as expected,
hope you'll understand it anyway....
Frank
Thursday, August 18, 2005
 
 
while this can be done (i think you just do the same REL to HEAD merge as you did when you went from HEAD to REL), you might want to consider more branches.

there's an excellent article on the perforce site about branching strategies, it's been pointed out in this forum before but i don't have the url handy.
mb Send private email
Thursday, August 18, 2005
 
 
Make sure you use CVSNT (which works equally well on Unixes) rather than plain cvs; CVSNT has mergepoint tracking which does this kind of thing very well.
Ori Berger
Thursday, August 18, 2005
 
 
I'd repost this on the cvs mailing list if I were you. Start at cvshome.org, and follow the redirections.

Also, I find that the update -j is clearer when I use two tags, e.g. cvs update -jTAG1 -jTAG2, and think of it as meaning "take the differences between TAG1 and TAG2" and apply it to the specified directory. You can use HEAD as one of the tags, but I prefer to use named tags.

~Matt
Matt Doar Send private email
Thursday, August 18, 2005
 
 
Matt, cvsnt makes most "double -j" usage a thing of the past. It really is much better than the original cvshome version.
Ori Berger
Friday, August 19, 2005
 
 
Thanks for the suggestions.

Unfurtunately CVSNT is not an option because the repository
is at a client site and they won't change their setup
because of this.

I think, the best soultion is to branch of a REL_2 and use
the old REL as the development branch and forget about HEAD.
Frank
Friday, August 19, 2005
 
 
Looks like this article calls that the 'promotion' model:

http://www.perforce.com/perforce/bestpractices.html
mb Send private email
Friday, August 19, 2005
 
 
I think you're making things too complex.  There's really no point in trying to do a two way merge.  Think about it.  Why do you need two copies of the EXACT same source code?

Merge from REL to HEAD, fix any conflicts, commit changes and then tag the HEAD branch with something like REL_FINAL or REL_20050819.  Then if you need to make changes from the mergepoint, checkout the tage REL_FINAL or REL_20050819 and branch with something like REL_FINAL_BRANCH or REL_20050819_BRANCH.

Then release the original REL branch.  If you think you may be making more changes on the REL branch, tag it with something like MERGE_TO_HEAD_20050819.  Then later on you can merge only the changes from that point to the top of the REL branch to HEAD.
Grant
Saturday, August 20, 2005
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz