Re: newbie question on initializing repository

2004-06-17 Thread Bret A Cooper

Chris,
I've had some issues with my email so
I'm just now seeing your response.
Thanks for taking the time to write
up the shell script. Looks like
a nice way to do it. I guess it
boils down to whether its possible to 
determine the type of a file from its
name. Though as I think about it,
I could replace your if statement
with a call to the UNIX file command and then it
wouldn't be name dependent. But
it would be dependent on how
good a job the file command
does and I've seen it get things wrong.
Bret Cooper



---original message--
Date: Mon, 7 Jun 2004 17:17:10 -0400
From: [EMAIL PROTECTED]
Subject: RE: newbie question on initializing repository
To: [EMAIL PROTECTED]

In this case, I'd import a blank project, and then use cvs add
in a
script to add the
files, using the -kb option accordingly. Here's a c-shell pseudo-code
 
# Assume *.h and *.cpp files are text files, and the rest are binary
files...
for f in `find .`; then
  if [ -f $f ]; then
# found a file, test if binary
if [ $f == *.h || $f == *.cpp ]; then
  # add binary file
  cvs add -kb $f;
else
  # add text file
  cvs add $f;
  else
if [ -d $f ]; then
 # add directory
 cvs add $f;
fi;
  fi;
done
  
 You get the idea. Gurus may have a better solution though
 
-chris
 


-Original Message-

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Bret A Cooper

Sent: Monday, June 07, 2004 4:47 PM

To: [EMAIL PROTECTED]

Subject: newbie question on initializing repository






Hello, 



This is a first time user question. 



We have collected all of our source files within a directory
structure and are ready to initialize the cvs 

repository. There are a couple thousand files. Roughly 20%
are
binary type files and are scattered 

around throughout various directories. 



My original plan was to run the cvs init command from the
topmost directory and be done. However, 

I now believe its not that simple, as the binary files(only)
must be initialized with the -kb option.  

Is that correct? If so, any suggestions on the simplest/easiest
to go about this? 



Thanks, 

Bret Cooper
___
Info-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: newbie question on initializing repository

2004-06-08 Thread Spiro Trikaliotis
Hello,

* On Mon, Jun 07, 2004 at 05:34:02PM -0400 Larry Jones wrote:

  However, I now believe its not that simple, as the binary
  files(only) must be initialized with the -kb option.  Is that
  correct? If so, any suggestions on the simplest/easiest to go about
  this?
 
 If you can distinguish the binary files from the text files by their
 names (e.g., *.gif files are always binary), you can use the CVS
 wrappers facility to automatically handle the files correctly 

To add to this: If the text files are Unix-style (LF only), I also had
success in importing everything as binary, and changing the text files
to text afterwards with cvs admin.

If the text files are Windows style, doing a dos2unix on them, and then
treating it as in the above case, works, too.

Best regards,
   Spiro.

-- 
Spiro R. Trikaliotis I'm subscribed to the mailing lists I'm posting,
http://www.trikaliotis.net/  so please refrain from Cc:ing me. Thank you.


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/info-cvs


newbie question on initializing repository

2004-06-07 Thread Bret A Cooper

Hello,

This is a first time user question.

We have collected all of our source
files within a directory structure and are ready to initialize the cvs
repository. There are a couple
thousand files. Roughly 20% are binary type files and are scattered
around throughout various directories.

My original plan was to run the cvs
init command from the topmost directory and be done. However,
I now believe its not that simple, as
the binary files(only) must be initialized with the -kb option. 
Is that correct? If so, any suggestions
on the simplest/easiest to go about this?

Thanks,
Bret Cooper
___
Info-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/info-cvs


RE: newbie question on initializing repository

2004-06-07 Thread Christopher.Fouts
Title: Message



In 
this case, I'd import a blank project, and then use "cvs add" in a script to add 
the
files, 
using the -kb option accordingly. Here's a 
c-shellpseudo-code

# 
Assume *.h and *.cpp files are text files, and the rest are binary 
files...
for f 
in `find .`; then
 if [ -f $f ]; 
then
 # found a 
file, test if binary
 if [ $f == 
*.h || $f == *.cpp ]; then
 
# add binary file
 
cvs add -kb $f;
 
else
 
# add text file
cvs 
add $f;
 else
 if [ -d $f ]; 
then
 
# add directory
 
cvs add $f;
fi;
 fi;
done
 
You get the idea. Gurus may have a better 
solution though

-chris


  
  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf 
  Of Bret A CooperSent: Monday, June 07, 2004 4:47 
  PMTo: [EMAIL PROTECTED]Subject: newbie question on 
  initializing repositoryHello, This is a first time 
  user question. We have collected 
  all of our source files within a directory structure and are ready to 
  initialize the cvs repository. 
  There are a couple thousand files. Roughly 20% are binary type 
  files and are scattered around 
  throughout various directories. My 
  original plan was to run the cvs init command from the topmost directory and 
  be done. However, I now believe 
  its not that simple, as the binary files(only) must be initialized with the 
  -kb option.  Is that correct? If 
  so, any suggestions on the simplest/easiest to go about this? 
  Thanks, Bret Cooper
___
Info-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: newbie question on initializing repository

2004-06-07 Thread Larry Jones
Bret A Cooper writes:
 
 My original plan was to run the cvs init command from the topmost 
 directory and be done.

I think you mean cvs import -- init just creates a repository, it does
not populate it with user files.

 However,
 I now believe its not that simple, as the binary files(only) must be 
 initialized with the -kb option. 
 Is that correct? If so, any suggestions on the simplest/easiest to go 
 about this?

If you can distinguish the binary files from the text files by their
names (e.g., *.gif files are always binary), you can use the CVS
wrappers facility to automatically handle the files correctly -- see the
manual for details (and note that you can specify -W as many times as
you need to on the import command):

https://www.cvshome.org/docs/manual/cvs-1.11.16/cvs_18.html#SEC166

-Larry Jones

Oh yeah?  You just wait! -- Calvin


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/info-cvs