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

Bug 21435

Summary: [resources] Resource out of synch / update conflicts problems
Product: [Eclipse Project] Platform Reporter: Matthew Shaylor <matthew.shaylor>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: neil
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Matthew Shaylor CLA 2002-07-10 07:41:16 EDT
I am working with eclise on a project where the files reside on a network drive using an awkward 
source control utility (Rational Clearcase).  When I try to write a file to the drive I often get 
"Resource out of synch with Filesystem" or "update conflict" errors.  I suspect this is because 
either the revision control has touched the file or another developer has.

Eclipse doesn't 
cause this problem, but it will affect anyone using a shared resource.  Normally the refresh spots 
the change and propmpts to refresh however sometimes the file is changed in eclipse before the 
refresh happens.  If this is the case then saving the file in eclipse causes the above 
errors.

As a work around would it be possible to include an "Overwrite anyway" option on these 
errors and ignore any changes that have been made to the underlying file? Would it be possible to 
include a manual refresh option (which could appear instead of the revert option) so the file can 
be refreshed even if eclipse doesn't know that it is stale?

Regards,
Matthew Shaylor
Comment 1 John Arthorne CLA 2002-07-26 15:11:41 EDT
Matthew, I don't understand your request for an "overwrite anyway" option.  When 
I edit a file that is out of sync, it already presents me with the option to 
overwrite the external changes.

As for manual refresh, this is available in the navigator and package explorer 
views.  Just select the view and hit F5 or select a resource and choose 
"refresh" from the context menu.

You may also be interested in the auto-refresh plugin that is available from the 
platform core homepage on eclipse.org.
Comment 2 Neil Swingler CLA 2002-07-31 14:53:51 EDT
This is a duplicate of bug 16280. There you can find a hack to make it
bareable.

The problem is caused by funny timestamp behaviour of clearcase and SAMBA.
When a file is written to a view the timestamp is updated (and Eclipse stores
it to know if the file is in synch). Shortly afterwards, the timestamp may
change again. Thus when the file is written again, the saved timestamp is not
the same as the current one on the file.

I also asked for an "overwrite anyway" button to provide a workaround when
saving a file. The only way to save your changes is to copy them into the paste
buffer and apply them to the file when you reopen it.

Maybe you should set a unix/SAMBA/windows/clearcase enviroment up to see this
for yourselves.

The autorefresh plugin doesn't help if you are making frequent changes to a
single file, since you have already modified the file before the plugin
has refreshed it.
Comment 3 DJ Houghton CLA 2002-09-27 15:01:01 EDT

*** This bug has been marked as a duplicate of 16280 ***