CVS Repository problem

Kevin Buettner kev@primenet.com
Fri, 6 Oct 2000 11:59:26 -0700


On Oct 6, 11:26am, Stephen Smith wrote:

> Kevin Buettner wrote:
> 
> > On Oct 6,  8:17am, Stephen Smith wrote:
> >
> > > I have a cvs tree that contains three modules a, b, and c.  For
> > > maintenance reasons, I want to split the cvs tree into three, one
> > > for each module and keep the history for each module intact.  Is
> > > there a way to do that?
> >
> > Maybe, but I'm not exactly clear on what it is that you want.
> >
> > Are you saying that you want to end up with three separate
> > repositories?
> 
> Yep, that way I can put them on separate machines.

I see.

Make two copies of the repository, then delete (via "rm -rf") the portions
that you don't want out of the three.  E.g,

    cp Repos Repos-B
    cp Repos Repos-C
    mv Repos Repos-A
    rm -rf Repos-A/b Repos-A/c Repos-B/a Repos-B/c Repos-C/a Repos-C/b

With regard to the history file...  I'd just leave it alone.  You'll
have irrelevant information in this file, but it doesn't really
matter.  I suppose you could write a perl script which would attempt
to excise the module B/module C stuff from Repos-A's history, but I
don't think it's really worth it.

I rarely use the "cvs history" command anyway; it just tells lots of
stuff that I don't really care about.  Also, it can't be used to find
out if someone is still using a checked out module or not since people
abandon their checked out stuff all of the time; at least I do anyway.

The ``cvs log'' command is *much* more useful in that you get to see
who did what to a particular file.  It also shows you all of the tags
associated with the file.  The log information is kept with the ,v
files in the repository, so the above scheme of making copies and
then removing the parts that you don't want should work okay.

May I ask your reasons for wishing to split the repository among
a number of machines?  (Performance?  Space?  Security?)

Kevin