[Top][All Lists]

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

Re: How do you "unupdate" a file

From: Kaz Kylheku
Subject: Re: How do you "unupdate" a file
Date: Thu, 11 Apr 2002 10:09:58 -0700 (PDT)

On Thu, 11 Apr 2002, Frederic Brehm wrote:

> Date: Thu, 11 Apr 2002 12:07:35 -0400
> From: Frederic Brehm <address@hidden>
> To: address@hidden
> Subject: [info-cvs] How do you "unupdate" a file
> I updated a file by mistake and I'm not ready to integrate its 

You mean you *changed* a file by mistake?

> changes with my current sandbox. An "update -r old.rev" will fix 
> things up, but it sets a sticky tag.

This doesn't fix anything; it only retrieves an old version. Moreover,
it will merge any local changes you have made to that old version,
possibly causing conflicts.

If you need to restore to a repository version, there are two cases.

If it's the newest version on whatever branch you are on, then this
is just a case of discarding local changes. Simply remove the local
file and do a cvs update. Alternately, newer CVS versions have an
update option for getting a pristine copy: update -C. Your file is now
up to date with no local modifications.

If the version you want to restore to is not the latest one, then
there are two ways to do it. One is to patch backwards to the
older version using an update with two -j options. Another is
to use cvs update -r old-rev -p to pipe the update to standard output,
which sets no sticky tag. Redirect the output to the file you want to
restore. Either way, you need to commit.

Meta-CVS: solid version control tool with directory structure versioning.

reply via email to

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