IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New CVS question
OK, let's say I've got this file, abc.properties. It's a text file, not binary. It's stored in CVS. My team and I are doing concurrent development on this file, and also using multiple branches.

So the file history might look like this:
\nabc.properties\n+- 1.1\n+- 1.2\n+- 1.3\n|  +- 1.3.2.1 ("Branch_1")\n|  +- 1.3.2.2\n|  +- 1.3.2.3 (not yet merged into the head)\n+- 1.4\n|  +- 1.4.2.1 ("Branch_2")\n|  +- 1.4.2.2 (merged into trunk as 1.5)\n+- 1.5\n+- 1.6\n
So now let's say that I want to merge Revision 1.3.2.3 (the most recent version on "Branch_1") into the head.

The commands I have been using to do this are:
cvs -q up -A (to get me onto the head revision)
cvs -q up -dP -j Branch_1 (to merge the latest changes from "Branch_1" into the head)

Let's say, for the sake of argument, that there are luckily no conflicts resulting from this merge. All changes have been in disparate parts of the file, and CVS has been able to resolve changes without human intervention.

In this case, what will happen to changes that have been made on "Branch_2" (1.4.0.2 branch)? Will they be completely lost? If so, how do I stop that from happening?

I'm asking this question because I'm in charge of merges at work, and going through CVS history on a file appears to show that changes in a case similar to this are indeed getting lost. I'm at a loss to explain how this can happen.

Some web pages that I've been using as CVS help guides:
[link|http://computing.ee.ethz.ch/sepp/cvs-1.10-to/cvsbook/main_35.html|http://computing.ee....book/main_35.html]
[link|http://www.psc.edu/~semke/cvs_branches.html|http://www.psc.edu/~...cvs_branches.html]
[link|http://wiki.x.org/wiki/CvsBranchnames|http://wiki.x.org/wiki/CvsBranchnames]

TIA,
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New Start from within branch one
Make your local repository branch 1: -r 1.3.2.3. From there, do 'cvs up -A'. This will merge into your local copy all changes made to the head since you branched, so this will pull all changes from the 1.4 branch, as well as the 1.6 changes, into your local copy. Assuming no conflicts, do a commit and you're good.
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New You sure about that?
Make your local repository branch 1: -r 1.3.2.3. From there, do 'cvs up -A'. This will merge into your local copy all changes made to the head since you branched...
I'm not quite sure you have the right command there.

The command you quoted is the same one I quoted: cvs -q up -A The difference is the -q for "quiet mode." Big deal, no effect on what the command does.

What you described, however, sounds like the command: cvs -q up -j HEAD. Is that what you meant?
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New Doh! You're right
My way you'd still have to merge your changes back to the trunk, so yours should be correct. What you're doing should work. I can't think of any reason you should be losing your changes.

It's amazing how quickly you forget this stuff when you don't use it every day any more.[1] Oh, and you should be using the [link|http://ximbiot.com/cvs/manual/cvs-1.12.13/cvs.html|Cerderqvist]. Specifically looking at the section on [link|http://ximbiot.com/cvs/manual/cvs-1.12.13/cvs_5.html#SEC56|branching and merging]. Actually the link at the top says you should be using the [link|http://ximbiot.com/cvs/wiki/|CVS Wiki]. I'm more familiar with the Cerderqvist though. Visual memory helps.



[1] And when the last time you used it, you were using a GUI.[2]

[2] Yeah, I used tkCVS. You gonna make something of it?
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New Nope...
[2] Yeah, I used tkCVS. You gonna make something of it?
Why? What would I do? Make light of the fact that you're a GUI-weenie who can't do things the Real Man way of using the command-line? Naw, what would be the point in that?[1]



[1] (Weenie.)

PS- The Cederqvist is ass. And the Wiki admits in multiple places that the CVS documentation has suffered from documented-feature-removal over time. Branching is, notably, one of those places where the documentation is less than complete.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New Strange
I never encounterd something that didn't do exactly what it said.


PS: I suppose you do textual diffs, too, not using something like tkDiff? Uh huh, thought so.
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
Expand Edited by drewk May 1, 2006, 04:24:51 PM EDT
     CVS question - (Yendor) - (5)
         Start from within branch one - (drewk) - (4)
             You sure about that? - (Yendor) - (3)
                 Doh! You're right - (drewk) - (2)
                     Nope... - (Yendor) - (1)
                         Strange - (drewk)

There should be an opportunity for somebody here.
64 ms