Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 21818

Summary: [CVS UI] User forced to perform a refresh after using an external tool
Product: [Eclipse Project] Platform Reporter: David Almilli <almilli>
Component: TeamAssignee: Jean-Michel Lemieux <jean-michel_lemieux>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: andrew_cornwall, Tod_Creasey
Version: 2.0   
Target Milestone: 3.0   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description David Almilli CLA 2002-07-23 12:31:12 EDT
If I have eclipse open with a project that is shared with CVS and I 
use "cvs.exe up -d" on the command line.  If it modifies any of the CVS/Entries 
files it will continually mess up eclipse's CVS tool until I do a full 
refresh.  If I try to update after that within eclipse, it gives an error 
saying:

Problems encountered performing update

Reason:
Errors saving CVS synchronization information to disk.  Please fix the problems 
listed below and then update the affected resources from the CVS repository.

Under details it says:
Resource is out of sync with the file system: myproject/com/....../CVS/Entries


A workaround is to do a refresh on the whole project and it fixes itself, but 
it breaks the next time I use the command line tool.  It should be able to be 
used interchangeably.
Comment 1 John Arthorne CLA 2002-07-23 17:44:38 EDT
Moving to team for comment...
Comment 2 James Moody CLA 2002-07-23 19:35:54 EDT
You absolutely *must* perform a refresh. CVS.exe modified files inside the 
workspace without Eclipse's knowledge; when Eclipse needs them, they are out 
of sync, and you must refresh them to make Eclipse aware of the changes. This 
is the same as modifying *any* file outside of Eclipse. (Try editing a .txt 
file in notepad, then try to open it in Eclipse - it will tell you that you 
need to refresh first).

This is due to one of the fundamental designs of the way Eclipse interacts 
with the file system, and is intentional.
Comment 3 David Almilli CLA 2002-07-24 12:31:10 EDT
I would think that if it can recognize that it is out of sync, it would be able 
to perform a refresh of the CVS related files automatically.  Since it's not a 
user edited file, I think that would be acceptable to do.  In the case of a a 
standard text file or a file in the project that the user edits, a lot of IDEs 
and other editors will prompt a message saying the file has changed on disk, 
and asks if you would like to reload it.  Yeah, I can live with having to do a 
refresh, but I don't necessarily think it's the best way to handle it.

Just a thought.
Comment 4 Kevin McGuire CLA 2002-07-24 23:44:09 EDT
I agree, its a terrible model to force on the user. Unfortunately its 
fundamental to the way Eclipse is designed (as James pointed out).  We've 
avoided doing free refreshes because it can cause deltas and builders to run 
with somewhat hard to predict side effects.

I would like to revisit this subject though because I have to believe we can do 
better.  Its a problem for all external tools, so you were right to log it 
against Core to start.
Comment 5 Michael Valenta CLA 2002-09-03 12:40:35 EDT
The fix for bug 21281 is related to this bug. The fix that was released will 
check for any out-of-sync resources before a CVS operation is performed. If out-
of-sync resource are found, the user is prompted to refresh. This should ease 
this problem somewhat. I'm not sure if this bug should be closed since the 
solution in bug 21281 is CVS specific.
Comment 6 Michael Valenta CLA 2002-09-06 14:47:18 EDT
Changed title from "Using the command line cvs.exe outside of eclipse will give 
eclipse errors when updating"
Comment 7 Michael Valenta CLA 2002-09-12 10:25:26 EDT
*** Bug 22096 has been marked as a duplicate of this bug. ***
Comment 8 Jean-Michel Lemieux CLA 2003-08-20 13:56:09 EDT
*** Bug 41332 has been marked as a duplicate of this bug. ***
Comment 9 Jean-Michel Lemieux CLA 2003-08-20 14:00:00 EDT
With the new background sync it is another case where we have to handle
out-of-sync resources better.
Comment 10 Jean-Michel Lemieux CLA 2003-11-04 22:10:39 EST
moving to 3.0. we will look into this at the same time as core addresses the issue.
Comment 11 Jean-Michel Lemieux CLA 2004-03-17 09:11:04 EST
There a preference in 3.0 to perform automatic refresh with the file system. 
to enable goto the workbench preference page under work in progress. On 
windows in uses native file notifications.