[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: patch: directory watcher always ignored the first file notify entry

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 27 Aug 2009 09:57:35 +0200

On 27.08.2009 01:48, monster wrote:
> I did some more testing and found something weird:
> I commented _all_ calls to CSVNStatusCache::Instance
> ().AddFolderForCrawling, then I added one call when creating the
> dirEntry in GetDirectoryCacheEntry:
> if (!path.IsEmpty()&& path.HasAdminDir())
> {
> CSVNStatusCache::Instance().AddFolderForCrawling(path);
> // watcher.AddPath(path); //the crawler does this too
> }

The call to AddFolderForCrawling() here is a good idea.
But removing all calls to that method in other places just won't work.
If you check the comments in the code, you should see that most of these
calls are necessary to keep the status up-to-date *recursively*.
Also, don't forget the 'bogus' state 'external' (not a real status
because an external folder has its own status), nested layouts (a nested
versioned folder appears as unversioned when the status is fetched for
its parent folder, but of course such a nested folder *has* its own
status) and property modifications (when an svn property is modified,
the directory watcher doesn't get a notification for that file/folder
but for a file inside the .svn folder only).
All these 'exceptions' require that we do more crawling than you might
think is necessary.

> I also had to comment if (SetHoldoff()) in FolderCrawler.cpp, this
> logic doesn't hold anymore with only one crawl request per dirEntry.

Yes, that's what I already did yesterday (I mentioned a fix in the
crawler that I wanted to test first in my last mail).

> Now it matches my logic with a dirEntry should be crawled just once
> (except until we get a file change notification), and it seems to work
> well too, fastest tsvncache I ever seen. It would require more testing
> thou, to discover if the functionality is 100% equivalent with the old
> code.

I've committed a change in r17016 which addresses most of your
suggestions (but without removing *all* calls to AddFolderForCrawling
since as I said most of them really are required).


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-08-27 09:57:52 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.