info-cvs
[Top][All Lists]
Advanced

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

Re: Need to Fix Import


From: Eric Siegerman
Subject: Re: Need to Fix Import
Date: Thu, 12 Jul 2001 20:15:30 -0400
User-agent: Mutt/1.2.5i

On Thu, Jul 12, 2001 at 02:44:27PM -0700, Matthew E Brown wrote:
> I am using CVS to track our changes to a Army simulation used for weapon
> system trade analysis.  I accidentally imported our version of the code
> (with many local changes) to the vendor branch.  This could pose a problem
> when I try to merge the differences from the Army's next import on  the
> vendor branch.  Is there a way to back out this mistake?

Restoring from backups would be one way (but of course will lose
local changes committed since the backup was made).

Before attempting recovery, BACK UP your repo, and the sandbox
you're going to be using for the merge.  That way, if you make
another mistake, you won't have dug yourself in deeper.  (I'm not
being patronizing; more mistakes are all too possible when (a)
you're working late under stress with the state of the project
hanging in the balance, and (b) you start getting fancy, as you
may well need to do.  Not to mention (c) you're following advice
from some guy on the Net that might turn out to be very wrong :-)

The best way to recover would probably be to just go ahead and
import the correct version over top of your wrong one -- WITHOUT
attempting a merge first.  (Be sure to note in the commit message
for the correct import what happened, otherwise people will
forevermore be wondering why the Army made so many changes and
then immediately reverted them all -- then again, it being the
Army, maybe they won't wonder :-)

There will be some manual cleanup afterwards, but the second
import should get you most of the way there.  Once you've done
it, look especially carefully at files you've added or deleted
locally; they may have ended up in an incorrect state.

One way to check your cleanup work would be to "cvs co -rvendor
module" into a scratch directory, using the VENDOR BRANCH tag,
and make sure what you get is identical to the Army's original
distribution (except for CVS admin directories of course); then
do it again using the RELEASE tag you assigned to the correct
import.  Once those two checkouts produce exact copies of the
distribution, you can be pretty confident that you've succeeded
in "painting over" your botched import.

When you're satisfied that you've got the vendor branch back into
good shape, ONLY THEN try to merge it into your mainline.  It
won't bother CVS that there were two imports with no intervening
merge; it'll just take the latest and greatest from the vendor
branch, and not even notice the preceding junk revision.

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea.
        - RFC 1925 (quoting an unnamed source)



reply via email to

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