Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 151949 - Recent synchronize required before "team" operations.
Summary: Recent synchronize required before "team" operations.
Status: RESOLVED DUPLICATE of bug 73260
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-26 23:35 EDT by Preston L. Bannister CLA
Modified: 2006-08-10 10:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Preston L. Bannister CLA 2006-07-26 23:35:12 EDT
The "cvs commit" operation in Eclipse (via Team|Commit...) fails when files were changed outside Eclipse.  The "Team" operations invoke tools that will *always* visit the filesystem.  The "Team" operations will usually (always?) fail when Eclipse's knowledge of files is out of sync.  What this means is that the user will *always* need to perform a manual "refresh" operation to avoid irrelevant failures from "Team" operations.  Eclipse should automatically perform the "refresh" when needed.

There are two obvious solutions.  

1) Before any "Team" operation a "Refresh" operation must be performed on the selected node (or have occurred very recently).

2) Eclipse (at least with CVS) determines that a "Refresh" was needed when (before?) a "Team" operation fails.  When the need for a "refresh" is determined for the requested operation - Eclipse could simply perform the refresh.

Version control (CVS or other) invoked by "Team" operations requires file system access for each file under the selected explorer node.  Given the usual filesystem caching, performing a "refresh" before a "team" operation should have little or no impact on performance.

This issue should be a more general case of bug# 73260 (and I did not find another bug report that seemed to address the same issue).
Comment 1 Bogdan Gheorghe CLA 2006-07-27 14:55:01 EDT
Eclipse provides a "Refresh automatically" option under Preferences > General > Workspaces. 

Enabling this will ensure that Eclipse keeps files in sync - if an editor is open on a file that has been changed on disk, Eclipse will first prompt the user if they wish to reload the contents of the file. If no editor is opened on the file, the contents will be refreshed automatically.
Comment 2 Preston L. Bannister CLA 2006-07-27 19:52:01 EDT
Simply put, this is a problem as default behavior for the usual case is wrong.

Before filing this bug I searched open bug reports for anything similar.  I now see that was a mistake.  Searching non-open bugs came up with quite a few touching on the same topic: 20704, 21818, 23776, 35357, 41259 (at least).

The problem remains.

Reading through prior bugs, I see support for "Refresh automatically" was given as a solution to some of the filed bugs.  This is not correct.  From the notes it seems the implementation relies on Windows file-change notifications.  While this is an excellent optimization (on Windows with local files), this is only accurate *most* of the time.  For remote files and non-Windows machines, you cannot count on file-change notifications.

The singular truth here is that if the CVS support can detect that a refresh is needed, then at that point you have all the information needed to automatically perform the equivalent of a manual refresh.  The same notion should apply to all "Team" VCS implementations.
Comment 3 Michael Valenta CLA 2006-08-10 10:12:21 EDT

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