[Top][All Lists]

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

Re: checkout a old version file to cover the new one

From: Todd Denniston
Subject: Re: checkout a old version file to cover the new one
Date: Fri, 26 Aug 2005 08:31:28 -0500

xiangbin wrote:
> Hi,
> I am new user to CVS. When I work with the newest version, I
> suddenly found I need the old version of a file, say,main.c of version
> .I know that I can checkout the whole version of in another
> directory,then copy....But,if there is any way to achieve this just by
> checkout the old file and cover the local one ?

in the sandbox directory where main.c normally exists do:

cvs checkout -p -r1.1.1.1 main.c > main_1.1.1.1.c

-p      Check out files to standard output (avoids stickiness).

but lets clarify one point ... you say "and cover the local one", do you
mean you want to replace the contents of main.c (our example file) in your
sandbox with the contents it had at (our example rev), perhaps
because you want to undo all the changes since

I think that could be accomplished by either
cvs update -j1.1.1.1 main.c
cvs checkout -jcurrentRev -j1.1.1.1 main.c

Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter

reply via email to

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