[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two newbie questions
Re: Two newbie questions
Wed, 07 May 2008 12:59:59 -0700
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)
On 07 May 2008 07:41:10 -0700, Paul Coene wrote:
> I'm new to CVS, but an old hand at CM. Two questions:
> 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?
Probably not okay, because yes, this will make full copies instead of
diffs in the version-controlled files. One thing you can do is
1) First look for a pattern of files that should probably not be binary:
cd <cvs checkout>
find . -print | \
grep -v '/CVS' | \
Once you've verified that you have the correct pattern for
selecting files, pipe that output into an "admin -kkv" command:
find ... | grep ... | egrep ... | \
xargs cvs admin -kkv
After that you should be fine. You can use -kkvl if you are
concerned about who's locking the file.
> Was there a better way?
Yes, there would have been a better way, and I wish more places
1) Initialize your repository:
cvs -d /path/to/repos init
2) Modify CVS's default keyword handling based on filename:
cvs -d /path/to/repos checkout CVSROOT
In the cvswrappers file, you can specify that some files are binary
by default. These, for example, cover most of the worst offendors
(delete leading spaces). You probably have some others ...
*.[Dd][Oo][Cc] -k 'b'
*.[Gg][Ii][Ff] -k 'b'
*.[Gg][Zz] -k 'b'
*.[Jj][Pp][Ee][Gg] -k 'b'
*.[Jj][Pp][Gg] -k 'b'
*.[Pp][Dd][Ff] -k 'b'
*.[Pp][Pp][Tt] -k 'b'
*.[Pp][Ss] -k 'b'
*.[Tt][Aa][Rr] -k 'b'
*.[Tt][Gg][Zz] -k 'b'
*.[Zz] -k 'b'
Save the file and commit. Subsequent commits or imports will be
checked against this file.
Optional: clean up
cvs -d /path/to/repos release -d CVSROOT
> 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
I think what you want is something like this:
cvs update -j HEAD -j INITIAL_RELEASE
dodecatheon at gmail dot com
Frango ut patefaciam -- I break so that I may reveal