[Top][All Lists]

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

Re: Major cvs surgery, need suggestions

From: David A. Desrosiers
Subject: Re: Major cvs surgery, need suggestions
Date: Fri, 01 Mar 2002 23:29:53 GMT
User-agent: Pan/0.11.2 (Unix)

>>      foo.c in the top level is 1.46, but when moved and added, it gets
>> version 1.1 (logically). How do I preserve the history of the changes
>> made to this file to date, so I can do a 'cvs log' on it and get the
>> full changes?
> You can't. The best you can do is
> mv foo.c src/foo.c
> cvs add src/foo.c
> cvs rm foo.c
> cvs ci -m"Moved foo.c to src/foo.c" foo.c src/foo.c

        This is the exact solution I can _NOT_ use. What happens here is that I
lose both history _AND_ revision of each file. Not exactly ideal for my

        What I have found which works, but is very tedious to do is:

(in repository directly)
cp old,v new,v

(in local working copy)
rm old
cvs remove old
cvs commit old
cvs update new
cvs log new      <-- remember all tags here, I have about 50 cvs tag -d
cvs tag -d tag2

        Once I do that, the new file has the full history _AND_ revision (when
committed with -r 1.47 for example on this one file), and I can properly
make sure that the NEW files do not show up on OLD tags and branches.
Perfect.. except..

        With about 300 files, each with 50 or so tags on it (for previous
releases, pre-releases and testing releases), doing 'cvs tag -d' manually
for each tag is very _VERRRRRY_ slow and manual.

        So my next question is, " there a way to globally delete all tags on
all files in a directory?" such as 'cvs tag -d *.c' to remove all tags on
all *.c files in the current directory?

> Then, when log src/foo.c, you'll see how to backtrack to previous
> versions.

        Only with -r`rev`, but not with -D`date`, again.. not ideal.

> One can also play games with moving/copying files in the repository, but
> that leads to problems when checking out older versions, and files with
> tags they should have. The above is the best current practice for being
> able to correctly reproduce old versions.

        I disagree. Doing the cvs remove/add locally is the most harmful to my
goals (preserve history, changes, and revision per file). Using the
process I've shown above seems to work perfectly, except it's very tedious
to plod through so many files and directories.

reply via email to

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