info-cvs
[Top][All Lists]
Advanced

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

Fw: checkout a old version file to cover the new one-SOLOVED


From: xiangbin
Subject: Fw: checkout a old version file to cover the new one-SOLOVED
Date: Mon, 29 Aug 2005 08:48:09 +0800

Hi,all
What I really want is  to replace the contents of main.c with the contents
it had at 1.1.1.1 and DO NOT change the version(keep it 1.2) .The following
command:
$cvs up -r1.1.1.1 -C main.c
only checkout the 1.1.1.1 version and when I modifed it and do commit:
------------------
$cvs commit
cvs commit: Examining .
cvs commit: sticky tag `1.1.1.1' for file `main.c' is not a branch
cvs [commit aborted]: correct above errors first!
----------------------------------
As you see,that's not what I want .
Finally,thanks for Todd,by
cvs update -j1.1.1.1 main.c
really achieves my goals .

-Xiangbin

----- Original Message ----- From: "Todd Denniston" <address@hidden>
To: "xiangbin" <address@hidden>
Cc: <address@hidden>
Sent: Friday, August 26, 2005 9:31 PM
Subject: Re: checkout a old version file to cover the new one


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
1.1.1.1 .I know that I can checkout the whole version of 1.1.1.1 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 1.1.1.1 (our example rev), perhaps
because you want to undo all the changes since 1.1.1.1?

I think that could be accomplished by either
cvs update -j1.1.1.1 main.c
or
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]