Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » CVS: reverting to previous revision
CVS: reverting to previous revision [message #328126] Wed, 14 May 2008 19:11 Go to next message
Eclipse UserFriend
Originally posted by: first.last.oracle.com

Is there a way to revert to a previous CVS revision,
so that the file then shows up in the Synchronize view
as an "incoming" change?

I can replace a file with a previous revision,
but then it shows up as an "outgoing" change.

Thanks.
Brian
Re: CVS: reverting to previous revision [message #328135 is a reply to message #328126] Thu, 15 May 2008 00:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

I guess that depends on your definition of "a previous CVS revision".

If you checked out a project and modified a file locally <b><i>and</i></b> the file has no other changes committed, you can perform a <b>Team - Revert to base</b>, or something similar. You would then be replacing your sandbox version with the latest <b>head</b> version.

But, if you want to replace with a version other than the <b>head</b> version, then your local sandbox version does not match the <b>head</b> version, and would require a commit to commit differences between your sandbox version and the head version.
Re: CVS: reverting to previous revision [message #328136 is a reply to message #328135] Thu, 15 May 2008 04:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: first.last.oracle.com

Maybe my description wasn't very clear.

I have file Foo.java. It has several revisions on the CVS repository
(1.1, 1.2, 1.3). When I "synchronize" my workspace with the repository,
Eclipse indicates that my workspace is in synch with HEAD (i.e. the
Foo.java revision in my workspace is 1.3). I would like to "check out"
revision 1.2 and have subsequent "synchronizations" with the repository
to tell me that there is an "incoming" change available for Foo.java (that
incoming change being revision 1.3).

I can see how I get the contents of Foo.java revision 1.2: Team ->
Show History -> Get Contents. But then "synchronize" indicates I have
an "outgoing" change. I would like my client (i.e. Eclipse) to know
the current revision in my workspace is 1.2 and that "synchronize"
should tell me I now have an "incoming" change.

Is there any way to do that?
Thanks.
Brian
Re: CVS: reverting to previous revision [message #328143 is a reply to message #328136] Thu, 15 May 2008 13:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

Using your scenario, Eclipse does not really "checkout" the older version. It simply replaces the contents of your file with that of the older revision. It then appears your local copy of the file is different than the head version and wants you to commit your changes.

I don't know exactly what you are trying to accomplish, or if it is possible using Eclipse's internal CVS client.
Re: CVS: reverting to previous revision [message #328144 is a reply to message #328136] Thu, 15 May 2008 13:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Brian Vosburgh wrote:
> Maybe my description wasn't very clear.
>
> I have file Foo.java. It has several revisions on the CVS repository
> (1.1, 1.2, 1.3). When I "synchronize" my workspace with the repository,
> Eclipse indicates that my workspace is in synch with HEAD (i.e. the
> Foo.java revision in my workspace is 1.3). I would like to "check out"
> revision 1.2 and have subsequent "synchronizations" with the repository
> to tell me that there is an "incoming" change available for Foo.java (that
> incoming change being revision 1.3).
>
> I can see how I get the contents of Foo.java revision 1.2: Team ->
> Show History -> Get Contents. But then "synchronize" indicates I have
> an "outgoing" change. I would like my client (i.e. Eclipse) to know
> the current revision in my workspace is 1.2 and that "synchronize"
> should tell me I now have an "incoming" change.
>
> Is there any way to do that?

No, there's not. I'm not even sure that is possible or easy using
command-line CVS. You can get any revision as "sticky" but that is
different, in that it will not show an incoming change when you
synchronize (it is "sticky" in that the file is stuck at the revision
you have).

Eric
Re: CVS: reverting to previous revision [message #328147 is a reply to message #328136] Thu, 15 May 2008 13:46 Go to previous messageGo to next message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
What do you think CVS is? Envy?

:-)

Wayne

On Thu, 2008-05-15 at 00:58 -0400, Brian Vosburgh wrote:
> Maybe my description wasn't very clear.
>
> I have file Foo.java. It has several revisions on the CVS repository
> (1.1, 1.2, 1.3). When I "synchronize" my workspace with the repository,
> Eclipse indicates that my workspace is in synch with HEAD (i.e. the
> Foo.java revision in my workspace is 1.3). I would like to "check out"
> revision 1.2 and have subsequent "synchronizations" with the repository
> to tell me that there is an "incoming" change available for Foo.java (that
> incoming change being revision 1.3).
>
> I can see how I get the contents of Foo.java revision 1.2: Team ->
> Show History -> Get Contents. But then "synchronize" indicates I have
> an "outgoing" change. I would like my client (i.e. Eclipse) to know
> the current revision in my workspace is 1.2 and that "synchronize"
> should tell me I now have an "incoming" change.
>
> Is there any way to do that?
> Thanks.
> Brian
Re: CVS: reverting to previous revision [message #328148 is a reply to message #328147] Thu, 15 May 2008 14:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: first.last.oracle.com

Bullseye! :-) *Someone* understands me! (Unfortunately it's Wayne. :-) )

I guess I thought that, since Eclipse can tell which revision I checked
out originally (I think the revision number is in the ./CVS/Entries file),
Eclipse could simply alter that setting and now think that I had checked
out another revision (1.2, in the example below). Oh well....

Thanks.
Brian

Wayne Beaton wrote:
> What do you think CVS is? Envy?
>
> :-)
>
> Wayne
>
> On Thu, 2008-05-15 at 00:58 -0400, Brian Vosburgh wrote:
>> Maybe my description wasn't very clear.
>>
>> I have file Foo.java. It has several revisions on the CVS repository
>> (1.1, 1.2, 1.3). When I "synchronize" my workspace with the repository,
>> Eclipse indicates that my workspace is in synch with HEAD (i.e. the
>> Foo.java revision in my workspace is 1.3). I would like to "check out"
>> revision 1.2 and have subsequent "synchronizations" with the repository
>> to tell me that there is an "incoming" change available for Foo.java (that
>> incoming change being revision 1.3).
>>
>> I can see how I get the contents of Foo.java revision 1.2: Team ->
>> Show History -> Get Contents. But then "synchronize" indicates I have
>> an "outgoing" change. I would like my client (i.e. Eclipse) to know
>> the current revision in my workspace is 1.2 and that "synchronize"
>> should tell me I now have an "incoming" change.
>>
>> Is there any way to do that?
>> Thanks.
>> Brian
>
Re: CVS: reverting to previous revision [message #328149 is a reply to message #328148] Thu, 15 May 2008 15:46 Go to previous messageGo to next message
Mark Phippard is currently offline Mark PhippardFriend
Messages: 129
Registered: July 2009
Senior Member
On 2008-05-15 10:58:35 -0400, Brian Vosburgh <first.last@oracle.com> said:

> Bullseye! :-) *Someone* understands me! (Unfortunately it's Wayne. :-) )
>
> I guess I thought that, since Eclipse can tell which revision I checked
> out originally (I think the revision number is in the ./CVS/Entries file),
> Eclipse could simply alter that setting and now think that I had checked
> out another revision (1.2, in the example below). Oh well....

Subversion, at least with Subclipse, can do this. I use it all the
time just to be able to test the Synchronize view. I have also looked
for ways to do this with CVS so that I could test how it handled
different scenarios in the Synchronize view. It seems like a fairly
basic feature, I am not sure why it would require something as
sophisticated as Envy was to provide it.

Mark
Re: CVS: reverting to previous revision [message #328159 is a reply to message #328148] Thu, 15 May 2008 22:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: first.last.oracle.com

Well, I played around a bit: If you edit the appropriate ./CVS/Entries file
and change the file's revision number to the desired number and then restart
Eclipse, "synchronizing" will give me the behavior I am looking for.

For example, change
/Foo.java/1.3/Wed May 14 20:22:24 2008//
to
/Foo.java/1.2/Wed May 14 20:22:24 2008//

and things seem OK. Of course, there might be some side-effect I'm not aware
of just yet....

Just for the record.


Brian Vosburgh wrote:
> Bullseye! :-) *Someone* understands me! (Unfortunately it's Wayne. :-) )
>
> I guess I thought that, since Eclipse can tell which revision I checked
> out originally (I think the revision number is in the ./CVS/Entries file),
> Eclipse could simply alter that setting and now think that I had checked
> out another revision (1.2, in the example below). Oh well....
>
> Thanks.
> Brian
>
> Wayne Beaton wrote:
>> What do you think CVS is? Envy?
>> :-)
>>
>> Wayne
>>
>> On Thu, 2008-05-15 at 00:58 -0400, Brian Vosburgh wrote:
>>> Maybe my description wasn't very clear.
>>>
>>> I have file Foo.java. It has several revisions on the CVS repository
>>> (1.1, 1.2, 1.3). When I "synchronize" my workspace with the repository,
>>> Eclipse indicates that my workspace is in synch with HEAD (i.e. the
>>> Foo.java revision in my workspace is 1.3). I would like to "check out"
>>> revision 1.2 and have subsequent "synchronizations" with the repository
>>> to tell me that there is an "incoming" change available for Foo.java
>>> (that
>>> incoming change being revision 1.3).
>>>
>>> I can see how I get the contents of Foo.java revision 1.2: Team ->
>>> Show History -> Get Contents. But then "synchronize" indicates I have
>>> an "outgoing" change. I would like my client (i.e. Eclipse) to know
>>> the current revision in my workspace is 1.2 and that "synchronize"
>>> should tell me I now have an "incoming" change.
>>>
>>> Is there any way to do that?
>>> Thanks.
>>> Brian
>>
Re: CVS: reverting to previous revision [message #328180 is a reply to message #328159] Fri, 16 May 2008 14:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Brian Vosburgh wrote:
> Well, I played around a bit: If you edit the appropriate ./CVS/Entries file
> and change the file's revision number to the desired number and then
> restart
> Eclipse, "synchronizing" will give me the behavior I am looking for.
>
> For example, change
> /Foo.java/1.3/Wed May 14 20:22:24 2008//
> to
> /Foo.java/1.2/Wed May 14 20:22:24 2008//
>
> and things seem OK. Of course, there might be some side-effect I'm not
> aware
> of just yet....

I suggest you ask on a CVS support forum about the validity and safety
of doing that. If there is no reason not to, I'd suggest entering a
feature request against Eclipse's CVS component to implement something
like that in the UI.

Eric



> Brian Vosburgh wrote:
>> Bullseye! :-) *Someone* understands me! (Unfortunately it's Wayne. :-) )
>>
>> I guess I thought that, since Eclipse can tell which revision I checked
>> out originally (I think the revision number is in the ./CVS/Entries
>> file),
>> Eclipse could simply alter that setting and now think that I had checked
>> out another revision (1.2, in the example below). Oh well....
>>
>> Thanks.
>> Brian
>>
>> Wayne Beaton wrote:
>>> What do you think CVS is? Envy?
>>> :-)
>>>
>>> Wayne
>>>
>>> On Thu, 2008-05-15 at 00:58 -0400, Brian Vosburgh wrote:
>>>> Maybe my description wasn't very clear.
>>>>
>>>> I have file Foo.java. It has several revisions on the CVS repository
>>>> (1.1, 1.2, 1.3). When I "synchronize" my workspace with the repository,
>>>> Eclipse indicates that my workspace is in synch with HEAD (i.e. the
>>>> Foo.java revision in my workspace is 1.3). I would like to "check out"
>>>> revision 1.2 and have subsequent "synchronizations" with the repository
>>>> to tell me that there is an "incoming" change available for Foo.java
>>>> (that
>>>> incoming change being revision 1.3).
>>>>
>>>> I can see how I get the contents of Foo.java revision 1.2: Team ->
>>>> Show History -> Get Contents. But then "synchronize" indicates I have
>>>> an "outgoing" change. I would like my client (i.e. Eclipse) to know
>>>> the current revision in my workspace is 1.2 and that "synchronize"
>>>> should tell me I now have an "incoming" change.
>>>>
>>>> Is there any way to do that?
>>>> Thanks.
>>>> Brian
>>>
Re: CVS: reverting to previous revision [message #328264 is a reply to message #328180] Tue, 20 May 2008 13:45 Go to previous messageGo to next message
Michael Valenta is currently offline Michael ValentaFriend
Messages: 35
Registered: July 2009
Member
Brian,

By all means, enter a bug report. In the past, I used a utility plug-in
I wrote that provided this type of support for CVS (i.e. the action was
called Move to HEAD and would remove any tags from the local file copy
area). I don't think we would ever add this action to the CVS feature
but we could definitely make it available in the repository.

Michael

Eric Rizzo wrote:
> Brian Vosburgh wrote:
>> Well, I played around a bit: If you edit the appropriate ./CVS/Entries
>> file
>> and change the file's revision number to the desired number and then
>> restart
>> Eclipse, "synchronizing" will give me the behavior I am looking for.
>>
>> For example, change
>> /Foo.java/1.3/Wed May 14 20:22:24 2008//
>> to
>> /Foo.java/1.2/Wed May 14 20:22:24 2008//
>>
>> and things seem OK. Of course, there might be some side-effect I'm not
>> aware
>> of just yet....
>
> I suggest you ask on a CVS support forum about the validity and safety
> of doing that. If there is no reason not to, I'd suggest entering a
> feature request against Eclipse's CVS component to implement something
> like that in the UI.
>
> Eric
>
>
>
>> Brian Vosburgh wrote:
>>> Bullseye! :-) *Someone* understands me! (Unfortunately it's Wayne. :-) )
>>>
>>> I guess I thought that, since Eclipse can tell which revision I checked
>>> out originally (I think the revision number is in the ./CVS/Entries
>>> file),
>>> Eclipse could simply alter that setting and now think that I had checked
>>> out another revision (1.2, in the example below). Oh well....
>>>
>>> Thanks.
>>> Brian
>>>
>>> Wayne Beaton wrote:
>>>> What do you think CVS is? Envy?
>>>> :-)
>>>>
>>>> Wayne
>>>>
>>>> On Thu, 2008-05-15 at 00:58 -0400, Brian Vosburgh wrote:
>>>>> Maybe my description wasn't very clear.
>>>>>
>>>>> I have file Foo.java. It has several revisions on the CVS repository
>>>>> (1.1, 1.2, 1.3). When I "synchronize" my workspace with the
>>>>> repository,
>>>>> Eclipse indicates that my workspace is in synch with HEAD (i.e. the
>>>>> Foo.java revision in my workspace is 1.3). I would like to "check out"
>>>>> revision 1.2 and have subsequent "synchronizations" with the
>>>>> repository
>>>>> to tell me that there is an "incoming" change available for
>>>>> Foo.java (that
>>>>> incoming change being revision 1.3).
>>>>>
>>>>> I can see how I get the contents of Foo.java revision 1.2: Team ->
>>>>> Show History -> Get Contents. But then "synchronize" indicates I have
>>>>> an "outgoing" change. I would like my client (i.e. Eclipse) to know
>>>>> the current revision in my workspace is 1.2 and that "synchronize"
>>>>> should tell me I now have an "incoming" change.
>>>>>
>>>>> Is there any way to do that?
>>>>> Thanks.
>>>>> Brian
>>>>
Re: CVS: reverting to previous revision [message #332490 is a reply to message #328135] Wed, 22 October 2008 20:38 Go to previous message
Eclipse UserFriend
Originally posted by: javidjamae+javalobby.gmail.com

I tried doing a "Team -> Revert to Base" and it does *not* replace with HEAD.

I tried Revert to Base with version 1.34 on a file that was version 1.36 on the server. I modified the file locally then ran Revert to Base and it replaced the contents with the 1.34 version and took off the dirty flag (the ">" character) that says I'm out of sync with CVS.

So, revert to base did what what the original poster wanted to do and replaced the modified file with the version that he originally checked out.

To replace with head you have to use "Replace -> Replace with Head".
Previous Topic:myEditorPart#saveState(IMemento) not being called
Next Topic:getting available preference names
Goto Forum:
  


Current Time: Thu Jul 18 06:38:02 GMT 2024

Powered by FUDForum. Page generated in 0.04132 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top