Well, assuming you're wrapping CVS, why not just move the CVS subdirectory out
of the way before the actual "cvs add subdir" gets executed.  After it's done,
you can move the CVS subdirectory back.

Greg's change will maintain the recursive behaviour of "cvs add" (as it should).
It is mainly geared towards not having to explicitly "cvs add" a subdirectory
(ie "cvs add subdir" will be implied when you "cvs add file" and the file's
directory is not already in the repo).

Noel




[EMAIL PROTECTED] on 04/18/2000 11:30:22 AM

To:   [EMAIL PROTECTED]
cc:   [EMAIL PROTECTED]
Subject:  Re: Help: Scripts to change repositories




Whether or not there is an explicit need to do 'cvs add subdir', if I have a
directory tree that has CVS subdirs, that do not have CVS control files in them,
will a 'cvs add' on the main dir work or not?

With the current system, it will not.

Incidently, I also am in favor of a different command ('radd', for recursive
add?)
that has zero chance of breaking other programs, or removing the 'add' command
for
two releases before putting it back in (think 'rlog'). Or, adding the '-R' flag
to
'add', and just saying that the default for add is '-l'.

(So saying because recursive add will break my scripts. But since they don't
work
right anyways, :-).

(Incidently, my earlier versions used import, rather than checking out the root
and adding a directory. That was a pain, as I had to always remember to clean
out
the crud (make clean). before using them. It was only a day or two ago that I
actually needed to make a new module, and discovered that 'add' checks for, and
aborts, if it finds a CVS subdir without any regards to the presense of CVS
control files.)

Noel L Yap wrote:
>
> Greg Woods is working on removing the need to "cvs add subdir".  There was a
lot
> of traffic about it a couple of months ago.  I don't know where that
development
> stands now.
>
> I know this info doesn't help right now.  The only other alternative I know is
> if you make the change yourself locally.  Any global change will definitely
> conflict with Greg's potential, pending changes.
>
> Noel
>
> [EMAIL PROTECTED] on 04/17/2000 04:54:52 PM
>
> To:   [EMAIL PROTECTED]
> cc:   (bcc: Noel L Yap)
> Subject:  Help: Scripts to change repositories
>
> I'm working on some scripts to allow people to use multiple repositories
> with a single set of files, and I've run into a problem.
>
> 'cvs add subdir' will fail to work if there is a CVS directory in
> subdir. No test is made to see if there is no control files in subdir or
> not, only if the CVS directory exists.
>
> In other words, my scripts work fine, changing the cvs repository
> information around, until you add a new subdirectory. Then, it can be
> added to one of your repositories, only.
>
> The only work-around that I can see at the moment is to not store the
> 'extra repository' information in the CVS directory, but in another
> direcctory, and to be 'rmdir'/'mkdir'-ing CVS directories a lot. This
> has the disadvantage of exposing at least one new directory into public
> view.
>
> Is there any chance that we can get 'cvs add subdir' to say 'Hey,
> subdir/CVS does exist, but is not in the repository and has no
> Repository, Root, Entries, etc -- lets create those admin files and add
> subdir to the repository'?
>
> Michael




Reply via email to