5650 - synchronization of non-VCS files

I have had this long running problem with IDEA when it comes to detecting external changes to non-VCS files.

My project has a bunch of project related text files on a network filesystem, mostly documentation and configuration fiels. I have these files mounted on my Windows XP desktop as Z:\ drive. These files are under source code control, but using some old RCS crap on a solaris 10 fileserver. So, when I browse to them with IDEA they all appear read only initially. I have to log into the machine in order to check on the files to make them writeable.

The problem I have is that I will log into the remote machine, checkout some of these files, and then switch back to IDEA and press synchronize buton in the toolbar, and sometimes (not often), the files will change from read-only to writeable. It seems to work better if the file is in a tab in the editor pane. It seems to work almost never when the file(s) are a result of some search I did and I haven't loaded them into an editor tab yet;

Sometimes, just by minimizing and maximizing IDEA, IDEA will pickup the change and the file will be writeable. (I don't know why this helps because I have General->Syncrhonize files on frame activation disabled !)

Other times, nothing seems to work, so I have to go back to the remote machine and 'touch' the file to update the file modification timestamp. Sometimes, I have to do this 2 or 3 times in order for IDEA to see the change.

Also, sometimes (not often), IDEA will encounter some problem, and it forgets about the file. The file still exists on the remote machine, and I can see it if I use Windows Explorer to visit the Z:\ drive, but IDEA thinks it's is missing. When this happesn, I haven't found a way to get IDEA to recover. I usually have to restart IDEA.

Since it is on a network filesystem, my first suspiciion was that the machine times were not synchronized, but all our machines clocks are synchronized using a network time protocol. I have manually compared time on the network fileserver and my desktop and they are within milliseconds of each other.

This problem seems to have gotten worse for me in Demetra. One change in behavior is that the synchronize toolbar button seems to return instantly for me, almost like it does nothing. I could have sworn in took 5-10 seconds before when I resynchronized my project which has around 10000 files. Is the synchronize happening in the background now?

Anybody got some insight into this or have seen similar problem, I'd be glad to hear about it. I've been quietly suffering this problem, thinking it was some strange fluke or something, and then I'd forget about it for awhile because I dont' modify these read-only project files that often, but I've seen similar behavior in 4.5, 5.0, and now 6.0.

Comment actions Permalink

This problem continues for me. Nobody responded to this, so I guess nobody is having these wierd synchronization problems?

Here is a couple other examples that happened today:

1) There were a number of non-VCS documentation files I needed to edit, so I logged onto remote system to check them out and make them writeable.
This was before loading any of the files into IDEA (but the files are in in the project's source directories).

Then in IDEA I did a Synchronized. But then when I load each file it still thinks it is READ ONLY. If I press Synchronized nothing happens. It is still READ ONLY. What is wierd is that once I loaded the file into an Editor tab, if I then minimize and maximize IDEA, then 100% of the time (8 out of 10 files I edited, other 2 times see below), the file would become WRITEABLE. So, Synchronize button does nothing, but minimize/mazimize does something. I have "Save files on frame deactivation" turned ON and "Synchronize files on frame activation" turned OFF.

2) On 2 of the 10 times after minimizing/mazimizing IDEA, instead of making the file WRITEABLE, the file DISAPPEARED from the editor tab and IDEA seems to have forgotten about it. Even if I press synchronize, IDEA never finds the file again. I have to restart IDEA.

As I mentioned before my desktop is Windows XP SP2 and these remote files are moutned as the Z:\drive using PC-NFS from a Solaris 10 server.

I have a plain text editor (ConTEXT) that I used to edit the files sometimes, and that works without a problem, but it's a simple application. I thinking there is something broken with IDEA synchronization. Is the algorithm it uses documented anywhere?
The Synchronize button takes almost no time now in Demetra whereas it used to take 5-7 seconds before in 5.1, so I think something was changed. It almost seems like it's a no-op.

When I have time more time, I'll run Eclipse and see if it has the same problem, and report back. I could also try using Sambaserver which can make the NFS server look like a NT Share. Maybe that would give a different behavior?

Comment actions Permalink

There is a definite improvement in 5734 for synchronizing changes to non-VCS files which change from read-only to writeable through external change.

Before (5706 or earlier builds), I would make a file writeable, and then go back to IDEA and hit Synchronize and it would seem to do nothing; it returned almost immeidately.

Now when I press Synchorinze, it takes 5-6 seconds like it used to, and it recognizes that the file has changed from read-only to writeable.

I have not seen the problem where the file would just disappear; Although that happened only about 1 out of 10 times; But hopefully that is fixed also.

There are still some mysteries about how IDEA file synchronization works. I really wish this was better documetned.

For instance, I have "Synchronize files on frame activiation" turned OFF. Yet, sometimes, after making a file wrietable externally through a ssh telnet window, when I switch back to IDEA, it will already notice the file is writeable now, and then I don't have to press the Synhcronize button. But most of the time, I have to hit the Synchronize button to get IDEA to recognize it is writeable.

I think I have asked this before, but it would be nice to have finer grain control over the synchronization. For example, give us the option to automatically synchronize all files in editor tabs on frame activation. Or what I really want is for IDEA to automatically synchronize all files which are displayed in Editor tabs or Find panel or Inspection panel, i.e. any file which is referred to in the visible UI.

I'm sure this file synchronization of limited scope would be much faster than synchronizing my entire workspace

Likewise, I really want additional control over the synchronization which happens after I run my Ant task. I only need IDEA to synchronize the output directory after I compile code with Ant build xml file. I don't need my whole source tree to be synchronized each time.

Of course all of this would be improved if the synchronization happened in the background. Hopefully that is planned for next IDEA release.


Please sign in to leave a comment.