info-cvs
[Top][All Lists]
Advanced

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

Newbie problems...


From: reg
Subject: Newbie problems...
Date: Tue, 4 Sep 2001 23:56:13 -0600

I am starting a project where I need a Source Management System, and
CVS seems to be what is available with BSD versions of Unix.

I've used a number of other source control programs over the years
(UPDATE/Historian on the CDC/Cray mainframes, SCCS on UNIX) but have
never had to use a program with as many options (and possibilities for
making a WRONG choice) as CVS.  It looks powerful, but there is no question
that there is a steep learning curve at the beginning to keep from getting
bitten in the ass later along...

As such, Ive tried a little experiment before bringing the entire code
under CVS (OK, Ive done the first step or two with CVS on the real
code, but wont go any further till I understand things better).

So, here is what Ive done, and here is what I dont understand, can
someone comment and point at my mis-understandings.  [[ Ive read the
Users Manual and the FAQ, twice, and got a little more out of each
on the 2nd reading, but there is still a lot I dont understand about
what is going on...]]

What I want to do is bring in a vendor distribution,
    make changes
    bring in a new vendor distribution,
    apply the previous changes to it,
    make additional changes...

I can get to about the 2nd or 3rd step above, but at that point I can no
longer see the 'correct' version 1 or version 2 of the code.

So here is what Ive done with my small experimental version of a
CVS repositiory, there is only one source file, truncate.c, and the
repository is truncate...

I have built the initial repository

                setenv CVSROOT /usr/local/CVSstuff
                cvs init

I have the test source (truncate.c) in $HOME/truncate-orig

                cd truncate-orig
                cvs import truncate regc v1

It looks like setting up a MODULES file is a good idea, I do:

                cvs checkout CVSROOT/modules
                cd CVSROOT

and add the line

                truncate truncate

to the modules file, then commit the modules file

                cvs commit modules
                cd ..
                cvs release -d CVSROOT

So I can use dir truncate or module truncate without thinking about
which is correct.

My reading of the FAQ (p4-5) would imply that I should apply a pair of
'tags' at this point (for later use?) namely

                cvs rtag bp_v1 truncate
                cvs rtag -b -r bp_v1 latest_v1 truncate

My reading is that 'latest_v1' is 'sticky' and will apply to the latest
revision on this branch (but this doesnt seem to work).

OK, now I update this source to simulate the changes I have to the real
sources to date...

                cd $HOME
                cvs checkout truncate
                cd truncate
                    [make some changes to truncate.c with the editor]
                cvs commit truncate.c
                    [make some more changes to truncate.c with the editor]
                cvs commit truncate.c

I now do
                cd ..
                cvs release -d truncate

and checkout the source again just to see if the changes are there.

                cvs checkout truncate

And I have the LATEST version as expected.
However, when I do

                cvs checkout -r latest_v1
          -or-  cvs checkout -r bp_v1

I get the ORIGINAL, un-modified version.
I would expect the 'latest_v1' tage to give me the latest version
(hence its name).

Now I want to simulate the arrival of a new version of the code from the
vendor.  In the directory truncate-new I have made a change to truncate.c
that is on DIFFERENT lines from the change made above (lets make it simple)

                cd truncate-new
                cvs import truncate regc v2

It complains about there being overlapping changes (THERE ARE NOT!!!)
viz:

        1 conflicts created by this import.
        Use the following command to help the merge:

                cvs checkout -jregc:yesterday -jregc truncate

but if I do the commit again, without changing anything I get:

        No conflicts created by this import

WHATS GOING ON HERE?????

I will stagger on, I add some tags here as above

                cvs rtag bp_v2 truncate
                cvs rtag -b -r bp_v2 latest_v2 truncate

I now go back and try to recover v1+changes and v2..
I try
                cvs release -d truncate
                cvs checkout truncate

OK, that is v1 + changes, as I did above.
I try
                cd ..
                cvs release -d truncate
                cvs checkout -r latest_v1 truncate
          -or-  cvs checkout -r p_v1

This is back to the ORIGINAL v1, as before.
At least its the same, but its not what I was expecting.

I now try
                cvs release -d truncate
                cvs checkout -r latest_v2 truncate

And I see v1 + changes, and not v2 as expected.

can someone point me in the right direction.
I am either doing something wrong, or I mis-understand what is going
on.  In either case things are not working the way I expect.


                                        Reg.Clemens
                                        address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]