[Top][All Lists]

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

Re: Two newbie questions

From: Larry Jones
Subject: Re: Two newbie questions
Date: Wed, 7 May 2008 16:38:10 -0400 (EDT)

Paul Coene writes:
> 1) I had a very large (1000+ files) project that I needed to get into
> CVS.  I noticed that you need to tell CVS whether a file is binary or
> not.  I didn't want to have to do this file by file, so I ran the
> entire import with the -kb flag.  Was this ok, or are all my checkout
> commits going to make full copies instead of diffs since all files
> were imported with the binary flag?  Was there a better way?

No, it isn't OK.  CVS always does diffs, even on binary files, so that
isn't a concern, but CVS won't automatically merge binary files and the
line endings in the repository may be messed up such that if you check
out on a platform with different line ending conventions, the files will
be incorrect.

How bad it is depends on whether your (client, if you're using
client/server CVS) system distinguishes between text and binary files
(Unix and Linux do not, Windows does).  If not, then the data in the
repository is fine, you just need to fix the keyword expansion mode for
the non-binary file: do ``cvs admin -kkv'' on all the text files and
then ``cvs update -A'' to fix the working directory copies.

If it does, then the repository data is incorrect and the best thing to
do is (manually) delete the project from the repository and then
reimport it correctly.  Assuming you can distinguish the binary files by
their extensions, you need to use the CVS wrappers facility to specify
which files are binary and which are text, either by changing the
repository's CVSROOT/cvswrappers file or by using one or more -W options
on the import command itself:


> 2) When I did the import, I gave it an initial release tag.  Since
> then I have changed many files along one of the directory trees.
> Is there a way to CVS to revert that whole directory tree back to
> that revision tag, or is is basically check out that revision and
> recommit?

Have you committed the changes?  If not, you can just do ``cvs update
-C'' in your working directory to throw away all the changes.  If you
have committed changes and now want to revert them, you can do a reverse
merge to undo the changes and then commit the files:

        cvs update -j BASE -j REV_YOU_WANT
        cvs commit -m'Revert to REV_YOU_WANT'

-- Larry Jones

Fortunately, that was our plan from the start. -- Calvin

reply via email to

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