info-cvs
[Top][All Lists]
Advanced

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

Re: [FAQ?] revert to current version


From: Mark D. Baushke
Subject: Re: [FAQ?] revert to current version
Date: Sat, 18 Feb 2006 11:28:21 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sergei Organov <address@hidden> writes:

> Steve <address@hidden> writes:
> > On 16/2/06 19:04, in article
> > address@hidden, "Ted Stern"
> > <address@hidden> wrote:
> >
> >> So is that possible, or is my -p method the most concise way possible?
> >> 
> >> Ted
> >
> > cvs update -C foobar
> 
> I think that's exactly what OP asked for, but does anybody know how to
> just get rid of local changes *without* updating the source to the
> latest version from repository?

For a single file:

   cvs update -rBASE -p foobar > foobar

For a group of files, using bourne shell scripting

   for file in `cvs -qn update | awk '/^[MC] / {print $NF}'`;\
   do cvs update -rBASE -p $file > $file; echo Reverted $file;  done
 
> One way that I see is:
> 
> $ cvs diff -u foobar | patch -p0 -R
> 
> 
> Can it be done without help of external tools?

For single files, yes.

        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFD93VVCg7APGsDnFERAge4AJ9O3CtZuh9ce1lxp8UXEa8M76E3gwCdGsOm
OHPfOUtY6Q/fCf/v+75ynqI=
=1kJO
-----END PGP SIGNATURE-----




reply via email to

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