info-cvs
[Top][All Lists]
Advanced

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

Re: How to expunge sick revision?


From: Greg A. Woods
Subject: Re: How to expunge sick revision?
Date: Mon, 8 Apr 2002 20:12:42 -0400 (EDT)

[ On Monday, April 8, 2002 at 17:52:08 (-0400), address@hidden wrote: ]
> Subject: How to expunge sick revision?
>
> I used "cvs remove" to get rid of some unwanted files, and CVS
> informed me to use "commit" to make the removals final.  OK, so I did
> "cvs commit", and CVS proceeded to commit everything in sight, not
> just the removals as it had announced.

Computers are pretty good at doing _exactly_ what you tell them to, eh?  :-)

(Presumably you've learned now that you have to tell CVS exactly which
files you want it to commit.....)

> reverting to an earlier (non-buggy) revision of the rotten file; I
> pull it out with "cvs update -r x.x". 

That's not how you revert to a previous revision of a file.

What you've done is set a sticky revision for that file in your current
working directory.

If you want to revert the state of a file in the repository to a
previous revision then you need to do two steps (and a prerequisite):

        0. make sure the file in your working directory is up to date
           with the committed 'x.x+1' revision and contains no local
           changes.

        1. first get the previous revision out into a working directory

                cvs update -p -r x.x file > file

        2. commit this revision (with an appropriate comment)

                cvs commit -m 'reverted to version x.x' file

Unfortunately the manual doesn't use the common term "revert" in
association with describing this procedure.  You'll find this
information at the bottom of the "Sticky tags" node in the manual
though.

The last part of that section in the manual is also a little bit
confused about the use of '-j' to revert changes -- that's how you'd
remove a set changes from your working directory copy.  That's not the
same as reverting the state of a file in the repository to to a specific
revision though since the merge of the negative delta is actualy going
to preserve any other more recent local changes to the file in your
working directory -- which would make the suggested comment above
incorrect (or at least incomplete).  You almost _NEVER_ want to use '-j'
to revert changes while mixing in other un-committed changes.  Revert to
the previous revision, commit it, then change it again.

Note you could also use 'cvs admin -o' to delete the undesired delta
from the repository, but you'd only want to do this if you're 111%
certain you know what you're doing and why, and only if there have been
no other commits, and maybe only if nobody else has even updated to the
errant revision.  I mention this only because it's possible, not because
it is in any way desirable.

-- 
                                                                Greg A. Woods

+1 416 218-0098;  <address@hidden>;  <address@hidden>;  <address@hidden>
Planix, Inc. <address@hidden>; VE3TCP; Secrets of the Weird <address@hidden>



reply via email to

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