info-cvs
[Top][All Lists]
Advanced

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

Re: Major cvs surgery, need suggestions


From: Paul Sander
Subject: Re: Major cvs surgery, need suggestions
Date: Fri, 1 Mar 2002 16:30:22 -0800

What you're trying to do has been discussed ad-nauseum in this forum for
years.  The method you prefer to use, though not popular, has been used
successfully in the past with success.

The "cvs tag -d" command does work in combination with wildcards on the
command line, and it also works with -l and with recursion.  Doing a "cvs
log" on a makefile or something like that should produce a list of all of
the tags applied to a common file, which you can use to write a script
to clean them out of your copied RCS files.  Be careful to remove only
version tags.

You'll also want to audit the branch tags, and do "cvs rm" as needed on
each branch to prevent checkouts on branches from giving the wrong
configurations.  (That means most likely checking out on every branch
and doing a "cvs rm" in the new locations of all of the moved files and
committing.)

>--- Forwarded mail from address@hidden

>>>     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
>situation.

>       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
>tag1
>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, "..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.

>--- End of forwarded message from address@hidden




reply via email to

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