Re: [lazarus] Changes to file on disk warning annoying
[EMAIL PROTECTED] wrote: Ok, so how about: when the file was written less than margin+1 seconds ago, it has to be precisely the same, otherwise there may be a margin. Why play with arbitrary (as far as I can see) margins. There is something like checksums. On a typical sourcefile like we use (25kb for lazarus) this should take a few msecs not much more and is robust and easy to implement. Just do the checksum if fileage suggests that the files are the same. If timestamps change a lot on network drives, people don't want the overhead of retrieving the file all the time. Some error margin of about 1 or 2 seconds is then preferred. It can always be an option though. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
Dale Welch wrote: Is the windows client using a fat,fat32,vfat? if it is it's time is only stored to the nearest even second. so this does cause a problem between the machines On mine, it's NTFS. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
On Tuesday 24 January 2006 18:07, Tony Maro wrote: Ger Remmers wrote: If my understanding is correct you are working on a Linux box I had the very same problem upto about 2 weeks ago but it went away with a kernel update What is the kernel version you are running? Command is -uname -a Linux tony-lin 2.6.12-10-386 #1 Thu Dec 22 11:37:10 UTC 2005 i686 GNU/Linux Latest stable is 2.6.13 so you may need to upgrade If you're running SuSE you can even upgrade to 2.6.15 This is what I'm running : Linux ws1 2.6.15-jad2-default #1 PREEMPT Sat Dec 24 00:00:07 CET 2005 i686 athlon i386 GNU/Linux and here all the file has changed problems are gone. -- Ger _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
L505 wrote: Ahh, that is the reason my keyboard teacher in grade 6 or so kept telling me to LOOK at the screen not the keyboard! But real programmers look at the keyboard, because there are so many odd key combinations that you can't possibly hold them all in your head. Actually, I look at neither. I typically stare off in space or at handwritten notes until I've typed a line or so, then glance at the screen. I'm going to try the kernel update and see where that takes me... -Tony _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Changes to file on disk warning annoying
I just changed from using SMB to get to my source files to using NFS to a Windows box. Now Lazarus complains around once a minute that the file has changed on disk, and offers to reload the changes - looking at the DIFF provided, there _are_ no changes. I'm assuming it's an NFS or timeclock related thing. Is there a way to disable this check in the Lazarus IDE? I checked the options but couldn't find anything. -Tony _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
On Mon, 23 Jan 2006 14:48:03 -0700 L505 [EMAIL PROTECTED] wrote: I just changed from using SMB to get to my source files to using NFS to a Windows box. Now Lazarus complains around once a minute that the file has changed on disk, and offers to reload the changes - looking at the DIFF provided, there _are_ no changes. I'm assuming it's an NFS or timeclock related thing. Is there a way to disable this check in the Lazarus IDE? I checked the options but couldn't find anything. I have this same problem when compiling my files with fakelinux, because my files are synchronized with samba. The feature we could implement would be automatically refresh without notification or similar checkbox in the environment or editor options. The files didn't changed on disk, so an automatic refresh would undo your current changes. At the moment the IDE does this: On saving/opening a file it retrieves the FileAge of the file. At several occassions it compares these file dates with the current file dates. If it changed it gives the user the choice. When the server and the client are not properly synchronized, the file dates differ (but not immediately because of the caches) and for the client it seems as if the file changed. We could extend the check to load the file and compare its content. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
Mattias Gaertner wrote: The files didn't changed on disk, so an automatic refresh would undo your current changes. At the moment the IDE does this: On saving/opening a file it retrieves the FileAge of the file. At several occassions it compares these file dates with the current file dates. If it changed it gives the user the choice. It's odd, because both computers sync clocks from the same timeserver - which is also located on my network. I've looked and the clocks appear the same, so I assume it's something about going from Linux to Windows over NFS that's making it look different. When the server and the client are not properly synchronized, the file dates differ (but not immediately because of the caches) and for the client it seems as if the file changed. We could extend the check to load the file and compare its content. I'd think have it run the DIFF before deciding to pop up the dialog, and if nothing appears, ignore the change? -Tony _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
Micha Nelissen wrote: On Mon, 23 Jan 2006 23:11:24 +0100 Mattias Gaertner [EMAIL PROTECTED] wrote: We could extend the check to load the file and compare its content. Maybe introducing a margin of error would be enough ? 2 seconds or so ? So if changed only 2 seconds later, the IDE doesn't notice. I just double-checked and the clocks on the two machines are in perfect sync... while watching both clocks they appear to change seconds at exactly the same moment. Of course this could mean it's a few milliseconds off, but that shouldn't trigger it should it? I never had this problem when using SMB to access the same files, so, perhaps it's something else triggering this? It's the same two machines, but now I'm using NFS instead of SMB. -Tony _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
On Mon, 23 Jan 2006 17:18:36 -0500 Tony Maro [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: The files didn't changed on disk, so an automatic refresh would undo your current changes. At the moment the IDE does this: On saving/opening a file it retrieves the FileAge of the file. At several occassions it compares these file dates with the current file dates. If it changed it gives the user the choice. It's odd, because both computers sync clocks from the same timeserver - which is also located on my network. I've looked and the clocks appear the same, so I assume it's something about going from Linux to Windows over NFS that's making it look different. When the server and the client are not properly synchronized, the file dates differ (but not immediately because of the caches) and for the client it seems as if the file changed. We could extend the check to load the file and compare its content. I'd think have it run the DIFF before deciding to pop up the dialog, and if nothing appears, ignore the change? This means IO overhead. Especially on a network fs. That's why I didn't implement it. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
On Mon, 2006-01-23 at 23:34, Mattias Gaertner wrote: On Mon, 23 Jan 2006 23:17:40 +0100 Micha Nelissen [EMAIL PROTECTED] wrote: On Mon, 23 Jan 2006 23:11:24 +0100 Mattias Gaertner [EMAIL PROTECTED] wrote: We could extend the check to load the file and compare its content. Maybe introducing a margin of error would be enough ? 2 seconds or so ? So if changed only 2 seconds later, the IDE doesn't notice. This would not work for files changed on build. The IDE saves the file and some part of the build processs changes it automatically in far less than a second. The fileage is simply not reliable on a network filesystem. I guess the only proper way to do it is to do a checksum. I have no idea what it does cost on CPU load, but source files are normally not that big. But to save time even further the checksum could be done only when the FileAge differs I presume. Darius _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
On Mon, 23 Jan 2006 23:51:26 +0100 (Romance Standard Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: On Mon, 23 Jan 2006, Mattias Gaertner wrote: On Mon, 23 Jan 2006 17:18:36 -0500 Tony Maro [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: The files didn't changed on disk, so an automatic refresh would undo your current changes. At the moment the IDE does this: On saving/opening a file it retrieves the FileAge of the file. At several occassions it compares these file dates with the current file dates. If it changed it gives the user the choice. It's odd, because both computers sync clocks from the same timeserver - which is also located on my network. I've looked and the clocks appear the same, so I assume it's something about going from Linux to Windows over NFS that's making it look different. When the server and the client are not properly synchronized, the file dates differ (but not immediately because of the caches) and for the client it seems as if the file changed. We could extend the check to load the file and compare its content. I'd think have it run the DIFF before deciding to pop up the dialog, and if nothing appears, ignore the change? This means IO overhead. Especially on a network fs. That's why I didn't implement it. That is why I wouldn't recommend implementing it, either. Imagine the IDE suddenly diffing all files in your project ! Right. But if no one comes up with a solution we should add this as an option. WinCVS has the same problem. When we switch from winter DST to summer DST all files on a NTFS directory structure, all files are marked as 'locally changed'. It has probably something to do with NTFS using universal time when storing filetimes. (that is the explanation I read for the CVS phenomenon) I expect something similar is happening here. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
I assume everyone knows in samba the reason is line feeds, but just to make sure I will double verify.. Samba converts files line feeds and this causes the editor refresh issue _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
Mattias Gaertner wrote: The files didn't changed on disk, so an automatic refresh would undo your current changes. With samba this is not the case - the files are changed. The line feeds are converted. At the moment the IDE does this: On saving/opening a file it retrieves the FileAge of the file. At several occassions it compares these file dates with the current file dates. If it changed it gives the user the choice. It's odd, because both computers sync clocks from the same timeserver - which is also located on my network. I've looked and the clocks appear the same, so I assume it's something about going from Linux to Windows over NFS that's making it look different. linefeeds in samba _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
linefeeds in samba Right, but my point is under SMB it _worked_, but under NFS it doesn't... your description sounds like it should be the other way around? -Tony Ahh, I see. So we have two different problems here, but with the similar effects: the refresh dialog window popping up. I guess we will need to analyze both issues, I didn't read the messages closely enough! _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
Is the windows client using a fat,fat32,vfat? if it is it's time is only stored to the nearest even second. so this does cause a problem between the machines ---dale On Monday 23 January 2006 15:04, Mattias Gaertner wrote: On Mon, 23 Jan 2006 23:51:26 +0100 (Romance Standard Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: On Mon, 23 Jan 2006, Mattias Gaertner wrote: On Mon, 23 Jan 2006 17:18:36 -0500 Tony Maro [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: The files didn't changed on disk, so an automatic refresh would undo your current changes. At the moment the IDE does this: On saving/opening a file it retrieves the FileAge of the file. At several occassions it compares these file dates with the current file dates. If it changed it gives the user the choice. It's odd, because both computers sync clocks from the same timeserver - which is also located on my network. I've looked and the clocks appear the same, so I assume it's something about going from Linux to Windows over NFS that's making it look different. When the server and the client are not properly synchronized, the file dates differ (but not immediately because of the caches) and for the client it seems as if the file changed. We could extend the check to load the file and compare its content. I'd think have it run the DIFF before deciding to pop up the dialog, and if nothing appears, ignore the change? This means IO overhead. Especially on a network fs. That's why I didn't implement it. That is why I wouldn't recommend implementing it, either. Imagine the IDE suddenly diffing all files in your project ! Right. But if no one comes up with a solution we should add this as an option. WinCVS has the same problem. When we switch from winter DST to summer DST all files on a NTFS directory structure, all files are marked as 'locally changed'. It has probably something to do with NTFS using universal time when storing filetimes. (that is the explanation I read for the CVS phenomenon) I expect something similar is happening here. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Changes to file on disk warning annoying
Mattias Gaertner wrote: The IDE saves the file and some part of the build processs changes it automatically in far less than a second. Yes, so if curr_file_age old_file_age + 2 seconds, pop up diff dialog, otherwise not. So if it's written, and the time is increased by one second, it's OK. The fileage is simply not reliable on a network filesystem. Things are not that bad :-). It's usually the milliseconds that get rounded/truncated/whatever. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives