Bug 143462 - [usability][updating] Dirty remote editors do not get notified
Summary: [usability][updating] Dirty remote editors do not get notified
Status: ASSIGNED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kevin Doyle CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: investigate
: 164106 (view as bug list)
Depends on:
Blocks: 166302 220302
  Show dependency tree
 
Reported: 2006-05-24 10:31 EDT by Martin Oberhuber CLA
Modified: 2009-06-17 11:40 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2006-05-24 10:31:23 EDT
* I'm editing sample.txt on an RSE supplied "Local" or "Dstore" connection.
* Now I modify that file outside RSE.
* I select the folder containing sample.txt in the RSE tree and choose "Refresh".
* By looking at the properties of sample.txt, I see that the time stamp has
  been modified. So RSE knows that the file is not up-to-date any more.

Still, I can continue editing the file and I'm not warned by RSE that I'm editing a file in the local cache only and it is out-of-sync with respect to the real file system.
When I do the same on the Eclipse Resource System, as soon as I click into the editor I get a message "The file has been modified on the file system. Do you want to reload?" -- I'd expect RSE to do exactly the same.

I think that not getting notified is potentially dangerous, since the lack of notification easily leads to editing files that need to be merged later. This later merge step can potentially be avoided.

Note that when I close the editor and re-open it, the file gets re-downloaded. So RSE does care about the time stamps. It just does not care about the dirty editor.

I guess that perhaps the simplest fix for this problem would be that
* When remote resources are refreshed,
* For any resource that is in the local cache and has been changed remotely,
  - If the file is not being currently edited, delete the file in the cache
  - If this fails due to file locking or the file is being edited, redownload immediately, i.e. schedule a download job as part of the refresh and notify editors as soon as the download job is completed.
Comment 1 Martin Oberhuber CLA 2006-05-24 10:53:18 EDT
I think this issue is particularly annoying when looking at files that are being generated remotely (e.g. as part of an edit-compile-debug cycle, and I constantly want to look at updated output from the remote side).

Will the "Compile Commands" have an automatic refresh action associated like the Eclipse External Tools? - I think this might be an important use case.

Increasing Severity to "major" since this may lead the user to wrong assumptions and decisions because of looking at outdated files. It is important that the RSE File System is really reliable for the user i.e. he gets what he expects. Otherwise we may well get an acceptance problem.
Comment 2 David Dykstal CLA 2006-05-24 11:42:54 EDT
This sounds like there is a notification to the editor that's just missing when a file change has been detected in the cache.

One thing we don't want to do is continually query the remote system to see if files have been changed.
Comment 3 Martin Oberhuber CLA 2006-06-28 10:00:54 EDT
defer to M4.
Comment 4 Kushal Munir CLA 2006-10-04 10:47:52 EDT
This will not be implemented in the 1.0 release.

We will need the following:
1. A refresh complete notification event.
2. API changes to allow services to opt out of this. There are systems where the remote resource can be locked and the timestamp check may be unnecessary.
3. Potentially a user preference or option to not do automatic downloads if a newer remote resource is available. It has the potential to be disconcerting for the user if a refresh all of a sudden leads to a download of one or more remote resources. We may need to show a dialog to the user first.
Comment 5 Kushal Munir CLA 2006-10-24 14:48:37 EDT
This will be fixed after 1.0
Comment 6 Martin Oberhuber CLA 2006-11-10 18:09:18 EST
Should be considered for 2.0
Comment 7 Martin Oberhuber CLA 2006-12-01 07:17:34 EST
*** Bug 164106 has been marked as a duplicate of this bug. ***
Comment 8 Martin Oberhuber CLA 2007-05-30 14:27:12 EDT
I'd like to see that at least investigated for 2.0.1
Comment 9 Martin Oberhuber CLA 2007-07-12 08:42:40 EDT
Kevin this is one of the really hard problems that have been lurking around for a while. Would you want to have a look? - I'd like to see it investigated for 2.0.1 although a real solution will likely not be possible without API changes.

Feel free to reassign to DaveM if you don't think you can handle this.
Comment 10 Kevin Doyle CLA 2007-09-11 18:22:45 EDT
Going to try and take a look at what needs to be done to implement this for the Face to Face meeting if I have time.

Changing target milestone to 3.0.