Re: recursive add

2005-03-08 Thread Spiro Trikaliotis
Hello,

an answer to an older post:

* On Tue, Mar 01, 2005 at 10:59:32AM -0800 Wei Shi wrote:
 
 Maybe this question has been brought up before.  Is
 there a recursive add command in CVS?

I'm not sure what you mean with recursive add. Possibly, the following
commands might accomplish what you want to do:

$ cvs add `find . -type d`
$ cvs add `find . -type f`

(I expect you are running on a Unix box, or with Cygwin on Windows)

If there are too much files/directories, you might encounter problems
with the maximum line length of the shell interpreter. In this case,
replacing the second command with

$ find . -type f -exec cvs add \{\} \;

is a good replacement, neglecting the fact this this command will be
much slower for a remote repository.

HTH,
   Spiro.

-- 
Spiro R. Trikaliotis  http://cbm4win.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: recursive add ?!

2002-07-12 Thread Kaz Kylheku

On Fri, 12 Jul 2002, Leif Hanack wrote:

 hello,
 
 i have a simple question. i'm using wincvs 1.36 and wonder why i can not
 find a recursive add command? ok, i can use the import module command but
 therefore my new sources need to be outside the cvs controlled directory!
 
 but when i e.g. have a directory under controll called myproject
 and when i want to add a new class com/foo/Foo.class it would be create
 to select com and add the selection recursively?!
 
 is this possible?!

I did it in Meta-CVS. :) Of course, the problem you run into is that
the directory may contain all kinds of files, some of which need to be
treated as binary. WinCVS has a dialog box in its import GUI where
can verify and change the disposition of each file.

 when i want to write this functionality by myself. where do i start? should
 i use tcl or python. are there tutorial concerning the integration in e.g.
 wincvs?!

For the sake of keeping the WinCVS program consistent, you would
probably want to do it in that program, perhaps reusing the code
which gathers up the file suffixes and throws them into a dialog box.

I do a similar thing in Meta-CVS; both the create command for
makign a new module, and the add command interactively deal with
file types. Now the problem is that cvs import and cvs add do not
have the same interface for specifying keyword modes. In import,
you specify a wildcard match on file suffixes, allowing you
to express the idea that all *.png files are to be treated -kb.
In cvs add, you do not have this; the keyword expansion mode you
specify applies to all file arguments.

In Meta-CVS the problem is solved by collating all of the files
into buckets based on their expansion mode, and then issue a
cvs add command (or several, if the command line is too long)
for each bucket.

-- 
Meta-CVS: solid version control tool with directory structure versioning. 
http://users.footprints.net/~kaz/mcvs.html  http://freshmeat.net/projects/mcvs


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



Re: recursive add ?!

2002-07-12 Thread Matt Riechers

Leif Hanack wrote:
 
 hello,
 
 i have a simple question. i'm using wincvs 1.36 and wonder why i can not
 find a recursive add command?

There isn't one. You have to add each new directory by hand before the
contents of that directory can be added.

-Matt

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



Re: recursive add ?!

2002-07-12 Thread Larry Jones

Leif Hanack writes:
 
 i have a simple question. i'm using wincvs 1.36 and wonder why i can not
 find a recursive add command?

Because CVS itself doesn't have a recursive add command?

-Larry Jones

I think grown-ups just ACT like they know what they're doing. -- Calvin

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



Re: recursive add

2001-12-17 Thread David D

I m not an expert of nix command but :

What the purpose of  xargs, it redistribute the output of the command before
| to the commande after ?

a+

Karl E. Jorgensen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...


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



Re: recursive add

2001-12-17 Thread Steve Greenland

On Sat, Dec 15, 2001 at 01:53:28PM +0100, David D wrote:
 Is cvs add */*/* add three level directories ?
 Wonderful !

Yes, but it's nothing to do with cvs, only standard unix globbing. You
can do 'echo cvs add */*/*' to see what the actual command line is.
Which means it probably won't work on the windows command line client.

Steve

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



Re: recursive add

2001-12-17 Thread Karl E. Jorgensen

On Mon, Dec 17, 2001 at 12:25:37PM +0100, David D wrote:
 I m not an expert of nix command but :
 
 What the purpose of  xargs, it redistribute the output of the command before
 | to the commande after ?
Exactly.

It could probably also be done by this one:

$ cvs add $(find . -type d; find . -type f)
or
$ cvs add $(find . -print)
- if find prints the directories before the files in them. I think it
  does.

Both of the above will run into problems if there are too many files.
Then the shell will complain about the maximum command line length.
xargs will chop it up to avoid that.

-- 
   PGP signed and encrypted|  .''`.  |** Debian GNU/Linux **
  messages preferred.  | : :' :  |By professionals,
 www.karl.jorgensen.com| \. `'   |for professionals
   |   `-|  http://www.debian.org/



msg15568/pgp0.pgp
Description: PGP signature


Re: recursive add

2001-12-16 Thread Alex Shinn

 Karl == Karl E Jorgensen [EMAIL PROTECTED] writes:

Karl On Fri, Dec 14, 2001 at 03:03:34PM +0900, Alex Shinn wrote:
 Is there a way to recursively add directory hierarchies in cvs?
 
 The manual says to use import in this case, but that doesn't do
 what I want since I'm trying to add within a branch.  Even if I
 specify the releasetag as an existing branch release, the files
 get imported into the main branch as well.

Karl What about something like:

Karl $ find . -type d -print | grep -v CVS| xargs cvs add

Karl followed by

Karl $ find . -type f -print | grep -v CVS | xargs cvs add

Karl (assuming that all files are text) ??

Well, not all text, but I ended up doing something like this with
File::Find.

Thanks for the help Larry and Karl.  Next question: can you add a tag
within a branch (not a sub-branch)?

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



Re: recursive add

2001-12-15 Thread Larry Jones

David D writes:
 
 Is cvs add */*/* add three level directories ?

I'm not sure of your terminology -- it adds files and directories that
are two levels below the current directory (provided the parent
directories have already been added).

-Larry Jones

I don't think that question was very hypothetical at all. -- Calvin

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



Re: recursive add

2001-12-15 Thread Karl E. Jorgensen

On Fri, Dec 14, 2001 at 03:03:34PM +0900, Alex Shinn wrote:
 Is there a way to recursively add directory hierarchies in cvs?
 
 The manual says to use import in this case, but that doesn't do what I
 want since I'm trying to add within a branch.  Even if I specify the
 releasetag as an existing branch release, the files get imported into
 the main branch as well.

What about something like:

$ find . -type d -print | grep -v CVS| xargs cvs add

followed by

$ find . -type f -print | grep -v CVS | xargs cvs add

(assuming that all files are text)
??
 
 -- 
 Alex

-- 
Karl E. Jørgensen
[EMAIL PROTECTED]
www.karl.jorgensen.com
 Today's fortune:
Order and simplification are the first steps toward mastery of a subject
-- the actual enemy is the unknown.
-- Thomas Mann



msg15546/pgp0.pgp
Description: PGP signature


Re: recursive add

2001-12-14 Thread Larry Jones

Alex Shinn writes:
 
 Is there a way to recursively add directory hierarchies in cvs?

cvs add *
cvs add */*
cvs add */*/*
...

I think there have been scripts posted here as well -- you might want to
check the archives.

-Larry Jones

It seems like once people grow up, they have no idea what's cool. -- Calvin

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