On Wed, May 20, 2009 at 4:55 AM, Simon Heimberg <[email protected]> wrote: > What I understand: > * shell_notify is called when the dirstate of a file has changed. > * As a fallback, it is called too when (it is known that) a file has > changed on disc. (Often, the change is detected by the shell (explorer, > nautilus, ...)). > * update_thgstatus is called when the dirstate has changed. > > What I (still) do not understand: > * Why is shell_notify called for the root of the repo after clone, > recover, ... Should we introduce a function which notifies the shell > about all the files in a repo?
I'm not sure what the proper behavior is when we need to refresh the entire repository (or if the suggested behavior has changed between '95 and Windows 7). But I've been considering having the shell extension write a file in a repository when it is viewing a directory inside the repository. repo/.hg/explorer_paths/path.pidXXXX Then shell_notify() could just send notification events for the directories listed in the files in explorer_paths (and cleanup files with old pids). > * Is notify_func ever set in update.py? When launched from the changelog, it is. > * Is it really an advantage to cache the directory status on disc? When > a file has changed on disc, the directory status is not updated till > done manually. I prefer a current state to speed. Could reading an old > state file trigger an update_thgstatus and shell_notify (for all or for > the changed files)? A timeout could be introduced or a test if the file > the explorer gets the icon for is newer than the directory state file. > * I would prefer if shlib.update_thgstatus would not slow down the gui. > Could it start a thread which updates the file? If we move to using hooks instead of explicit calls, the updates will happen in the hg thread and this will be less noticeable (the GUI will not freeze up for a second). > * Should update_thgstatus (and shell_notify) go in an own file? Then > hgext/thgstatus.py could import this file. (It could prepend ".." to > sys.path for securely finding it.) In the final release, I expect to not use the hgext/thgstatus extension. Instead, any hooks we register will call directly into our thgutil python code. > What seems wrong: > * In clone, shell_notify is not called with a string instead of a list. > This does not raise an error. But when 'directory' shall be notified, it > tries to notify d, i, r, ... Thanks for catching that. -- Steve Borho ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Tortoisehg-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop
