Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WinCVS - Checkout an old revision of a file

751 views
Skip to first unread message

Michael Stammberger

unread,
Jan 25, 2000, 3:00:00 AM1/25/00
to
Hi,

I have checked out a module, made some changes to some files in this
module and commited these changes to the repositry.
Now I decide that some changes in one of the files in this module are
wrong - but only in one of the files, the changes I made to the other
files were ok.

How can I get back the old revision of this single file?
Example:
The current revision number of this particular file is 1.5 and I want to
go back to revision 1.3. All other files in the module have different
revision numbers between 1.1 - 1.8.

Is this possible in WinCVS or should I do it with the CVS command line?

Any ideas?

Michael
--
Remember, even if you win the rat race, you're still a rat...

Michael Stammberger

unread,
Jan 25, 2000, 3:00:00 AM1/25/00
to
Hi,

I found a solution for this, but I am not happy with that. Maybe there
is a better way to do it...
Please let me explain what I am doing:

(The current revision of my file is 1.4 - I want to retrieve revision
1.2)

1. Menu Modify->Update selection
2. Select 'Sticky options'->'Retrieve rev./tag/branch'
3. Type in 1.2
4. Ok.

Now I get the revision 1.2 - that's fine, but WinCVS creates with this
command a "Sticky-Tag" on that file! And in addition: This sticky tag is
'1.2'. CVS only accepts sticky tags which start with a letter.

I cannot commit this file to the repository with this tag.

The only way I found to remove this bad tag was to use the CVS command
line:
cvs update -A filename

Is there a better solution to do this in WinCVS without using the
command line?

Any ideas, suggestions?

Thomas Rassmann

unread,
Jan 25, 2000, 3:00:00 AM1/25/00
to
Michael Stammberger wrote:
> I found a solution for this, but I am not happy with that. Maybe there
> is a better way to do it...
> Please let me explain what I am doing:
>
> (The current revision of my file is 1.4 - I want to retrieve revision
> 1.2)
>
> 1. Menu Modify->Update selection
> 2. Select 'Sticky options'->'Retrieve rev./tag/branch'
> 3. Type in 1.2
> 4. Ok.
>
> Now I get the revision 1.2 - that's fine, but WinCVS creates with this
> command a "Sticky-Tag" on that file! And in addition: This sticky tag is
> '1.2'. CVS only accepts sticky tags which start with a letter.
>
> I cannot commit this file to the repository with this tag.

Possible workaround:
store the checkedout revision 1.2 to a temp. file,
cvs update -A file (you will get the newest one without sticky tag)
cvs edit
copy temp. file to new checkedout file revision
cvs commit file (generates new revision)

If you want to delete the revisions 1.3, 1.4, 1.5 in the repository
you can use 'cvs admin -o 1.2::1.6 filename' (see cvs manual).

Hope this helps,
Tom
--
Thomas Rassmann mailto:Thomas....@sdm.de
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, D-81737 Muenchen, Germany
Tel +49 89 63812-346 Fax -410

Ray McVay

unread,
Jan 27, 2000, 3:00:00 AM1/27/00
to
I'm pretty sure there's a checkbox in the update dialog that handles
that.

--

Ray


Michael Stammberger

unread,
Feb 2, 2000, 3:00:00 AM2/2/00
to
Hi Ray,

> I'm pretty sure there's a checkbox in the update dialog that handles
> that.

Yes, you were right.
After trying a lot of combinations i found this way to revert a change.
Let me explain it with an example:
The current revision of the relevant file in my working directory is 1.9
I want to undo all changes I made on "myfile.txt" since revision 1.4
Here we go:
1. Menu "Modify" -> "Update selection..."
2. "Merge options"
3. Select the "Plus with..." radio button
4. In "Only this rev./tag:" type in 1.9
5. In "Plus with this rev./tag:" type in 1.4
6. Ok.

This will generate the cvs command line:
cvs update -j1.9 -j1.4 myfile.txt

That's all I want to do. Thank you Ray for your suggestion...

Michael

0 new messages