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

Re: problems managing package with CVS



>>>>> "Chris" == Chris Ruffin <c.ruffin@ieee.org> writes:

    >> Note: [1] if you did change the file, the info documentation
    >> recommends using "cvs admin -bsource-dist" to revert back to
    >> the upstream branch.

    Chris> Now you've lost me.

Ok, I will try and stick to proper CVS terms then. If you think this
is confusing - I agree! However, I have tried to make my description
easy to understand.


(disclaimer: I hope I haven't made any mistakes that confuse the
issues...)


For each file, cvs keeps track of what the "head branch"[1][2] a file
is on. A file can only have one "head branch". IIRC you can tell what
the "head branch" a file is on by looking at the output of "cvs
status".


1. By default, all files are from the "source-dist" head branch, so if
you upload a new source all files will automatically reflect that
state.

All you need is to type in
cvs update
(***no parameters***) and everything will happen auto-magically.

I found this confusing at first, because this is not what I was
expecting.  I was expecting the 2nd case to occur all the time
(below). I don't think this is properly documented either, but I could
be mistaken. This is purely based on my experience with Heimdal.

(this has a number of other implications, for instance: "cvs diff
-rsource-dist" will not compare any files with the source-dist head
branch, because it knows that the files have to be the same).


2. If you modify a file and commit it for the "main branch", cvs will
realize it can no longer track the "source-dist" head branch, and
remove the head branch specification for that file.  Now if you type
in:

cvs update

it will no longer update the file to reflect changes to the upstream
source. Instead, you have to force it to update it with the changes,
using the -j command, as mentioned elsewhere. The -j option is ignored
for any files with the "source-dist" head branch, these are updated as
per 1.


3. if you decide that your changes are no longer required, you could
just check in a new file that is the same as the upstream source.
However, cvs will still keep track of that file as a "modified file".
I think this means (among other things) that cvs will no longer delete
the file even if it is deleted upstream.  In order to force cvs to
revert back to the "source-dist" head branch, you must use the "cvs
admin -bsource-dist" command, delete the file, and check it out again.


4. Somewhere along the line somebody in Debian decided that a
cvs-co-upgrade program was required, however, in my experience it was
not required for any files belonging to the source-dist head branch,
as cvs automatically does the right thing. However, if upstream
deleted a file that doesn't have the "source-dist" head branch (eg.
was locally modified), it will not get deleted. Perhaps that is the
reason for cvs-co-upgrade.

I don't see any reason why cvs-co-upgrade needs to check for new
files.  If cvs-update has produced a file, then it already exists in
CVS, although it may need to be committed. A "cvs add" operation
should not be required.


I hope that helps...


To the original poster: perhaps for some reason or another, your files
do not have the "source-dist" head branch, which is why they are not
getting removed automatically.


Note:
[1] "head branch" and "currently checked out branch" are two
completely different terms - don't confuse the two.
[2] actually the CVS info documentation refers to the `head' revision,
but for simplicity I will call it the "head branch".

-- 
Brian May <bam@debian.org>



Reply to: