[qbzr] [RFH] Rework Bazaar Explorer + QBzr to use separate process for bzr operations and main process only as GUI presenter

Alexander Belchenko bialix at ukr.net
Thu May 5 05:07:54 UTC 2011


Gordon Tyler пишет:
> On 5/4/2011 8:31 AM, Alexander Belchenko wrote:
>> I have one doubt though: if FileSystemWatcher looks into
>> subdirectories then it will be triggered on any change inside .bzr
>> directory. IIRC some read-only operations will create/delete lock
>> dir/file inside .bzr. Therefore it will trigger false positive
>> alarms, IIUC.
> 
> I suppose it would depend on the API that you're using to watch for
> filesystem changes. There might be a way to make it ignore .bzr.
> 
> On a related note, it looks like QFileSystemWatcher, when watching a
> directory, will not notify you if the files in that dir are modified,
> only if the directory listing is changed (i.e. a file is added or
> removed). You would have to make it watch specific files to see when
> they change. This would get out of hand quite quickly for a large
> directory tree. So you may have to write your own bridge to various
> platform services like inotify, FindFirstChangeNotification and FSEvents.

Yesterday I've played a bit with QFileSystemWatcher and
FindFirstChangeNotification, and I think you're right about
limitations of the former.

Unfortunately, my preferred platform is Windows, and although I have
access to some Linux machines I'm not very sure I'll be able to commit
many time to write native intotify-based solution. And I don't have
Mac. So unless somebody will help there to write native code, I have
to live with limitations of PyQt.

> 
> Linux API: http://en.wikipedia.org/wiki/Inotify
> Windows API: http://msdn.microsoft.com/en-us/library/aa365261
> Mac OS X API:
> http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html
> <http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005289-CH1-DontLinkElementID_15>
> 
> Ciao,
> Gordon

-- 
All the dude wanted was his rug back



More information about the bazaar mailing list