info-cvs
[Top][All Lists]
Advanced

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

Segmentation Fault (was Re: CVS sticky information ignored on import)


From: Hamish Allan
Subject: Segmentation Fault (was Re: CVS sticky information ignored on import)
Date: 9 Apr 2002 07:46:12 -0700

Thanks Greg.

> 'cvs import' does not "work" from within a working directory (aka
> sandbox) -- i.e. it does not do anything special.
> 
> Or rather it only works by virtue of the fact that by default it'll
> ignore all the administrative "CVS" sub-directories and the files they
> contain.

Ah, the tantalising 'by default'... I was hoping there would be some
way to persuade CVS to use the sticky data from the administrative
"CVS" sub-directories for the import. After all, the command does take
kflags and release tags as arguments!

I have ended up using the following instead:

find . -name Entries | xargs grep "/-kb/" \
  | sed -e "s|CVS/Entries:/||" -e "s|/[^/]*/[^/]*/-kb/.*||" \
  | xargs cvs -d $CVSROOT admin -kb

Actually that's not true, because if there are any files marked -kb in
the sandbox which are not imported because they're on the default CVS
ignore list, the admin command SIG_SEGVs.

Hence I've copied this to the gnu.cvs.bug list; if anyone is
interested, I can give you the exact script I'm running and the
sandbox source tree I'm running it on (which is
ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla0.9.8/src/mozilla-source-0.9.8.tar.bz2
BTW).

For archive purposes, if anyone else is trying to do the same thing I
circumvented the segfault problem by creating an 'ignore' list from
the original import (| grep "^I " | grep -v "CVS$" >> $CVSIGNORELIST)
and then

for i in $(find . -name Entries | xargs grep "/-kb/" \
  | sed -e "s|CVS/Entries:/||" -e "s|/[^/]*/[^/]*/-kb/.*||");
  do grep $i $CVSIGNORELIST || cvs -d $CVSROOT admin -kb $i; done

If anyone can think of a better way to determine which files not to
admin (e.g., using an exit code from cvs to determine whether the file
is in the repository) I'd love to know.

thanks,
Hamish

p.s.
> Unless you're managing third-party sources you shouldn't use "cvs import".

Unfortunately that's what I'm doing!

> However if you're managing third-party binary files and checking them
> out on non-unix-ish platforms then you will have to individually ensure
> that the '-kb' flag is set in the RCS files in your own repository for
> every binary file (but not for text files if you want proper text
> handling to work!).

Unfortunately that's also what I'm doing!

> If you're doing the latter a lot then you might be better off using
> something other than CVS.

Well... mozilla uses CVS, and whatever I used I'd need to
differentiate between text and binary files.

Thanks again.


reply via email to

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