[Top][All Lists]

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

Re: undoing a commit after other changes have been made

From: Spiro Trikaliotis
Subject: Re: undoing a commit after other changes have been made
Date: Tue, 12 Jun 2007 17:15:46 +0200
User-agent: Mutt/1.5.9i


* On Mon, Jun 11, 2007 at 05:15:34PM -0400 Peter Kahn wrote:

>    I think my process would be as follows:
>    1. using rlog and commit emails determine the start and end point at
>    which the fix-pack was committed

It would have been better if you applied tags, so you could find the
changes by tag. Nevertheless, rlog (or, perhaps, cvs2cl, a stand-alone
perl utility) might help you.

>    2. checkout the module at the HEAD
>    3. merge from end to start of the fix-pack commit
>    4. resolve any problems
>    Is this right?


>    For example: if I found that this fix-pack was the only change made on
>    the 20th, then I'd do something
>      cvs co mymodule  ;  cd mymodule
>      cvs merge -j 20070120 -j 20070119

The only thing: cvs does not know merge. Additionally, you cannot use
dates in -j operation.

What I would do:

1. Find out when the last version that worked was checked in

2. Tag that version with 'cvs tag -d "2007-10-01 13:12" tagBeforeProblem',
   if it was on October 1st, 2007 at 13:12

3. Do the same for the version after the fix, but name the tag
   differently  ("tagAfterProblem" might be a good name)

4. cvs up -j tagAfterProblem -j tagBeforeProblem

5. Have fun! :)

Of course, you can use better tag names than the ones I suggested here.
They were only for illustrative purposes.

For the future, you should make sure to tag as much as possible. For
example, I am always tagging my checked-in version with a tag like
"t20071001-1312" if I have the same time as the example in 1.
Additionally, I tag it whenever there is some "logical" reason to do so.

Notice that the approach above might fail if there were many concurrent
check-ins at the time of the fixes. For example, if someone checked in
something unrelated between tagBeforeProblem and tagAfterProblem, that
check-in will be lost.

If you would have had an appropriate tag, this would not be a problem


Spiro R. Trikaliotis                               

reply via email to

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