[Top][All Lists]

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

Re: Renaming files

From: Mark D. Baushke
Subject: Re: Renaming files
Date: Mon, 03 Mar 2003 04:39:47 -0800

Paul Raine (Con) <address@hidden> writes:

> Is it possible to rename files in the CVS repository? And if so how do I do
> this?

What you are really asking for is if CVS does version control on
directories. To that question, the answer is no. So, the "how" question
is answered that you do not have the ability to do this.

Of course, if you go to the repository and move the file "foo,v' to
"bar,v" then the new version of the file will look like it has always
been called "bar,v" ...

> I could create a new file in the repository and copy the code over...but
> then I'll loose the history in cvs...

Yes. That is the way that most folks deal with things. Typically
including in the log message for the newly added file that it was
copied from some other location in the repository.

The other alternative that I have seen done is to copy the somedir/foo,v
file to otherdir/bar,v and change the "State:" attribute of all versions
save the head to be "dead" in the new otherdir/bar,v file such that the
history still exists, but only the head version will ever be able to be
checked out in the new location or via the new name. Of course, this is
not idea as new changes to branches of somedir/foo,v will not find
themselves as a part of otherdir/bar,v as might be otherwise desired.

> Also I have a number of files that I would like to move to another
> directory in the repository. Is this possible??

Moving files in the repository will change its ability to be useful
for old tagged versions of the tree. Still, this may not be a problem
if the repository is young and has not yet had any code 'released'
using its former configuration.

        Good luck,
        -- Mark

reply via email to

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