It's been awhile, and there may be better/newer ways to do this but:
And a functional example provided by someone else:
(I haven't looked at this example, it is just what google found for me)
This does require an "active process/thread" to monitor for
changes, where I believe the OSX stuff can be queried when
you are interested in the change list...
After doing a little search of my own... I think the codeproject sample
uses the ReadDirectoryChangesW API described at
And yes, I gather this requires having a dedicated thread. I don't see
that as a problem myself, but there is an alternative: it looks like
you can also use FindFirstChangeNotification and
There's an example at
http://www.codeguru.com/cpp/w-p/files/article.php/c4467 that describes
this (actually it describes both approaches), though its sample code is
confusing. Perhaps a better code sample is at
http://www.codeproject.com/KB/system/FolderWatch.aspx . And it appears
to have a caveat described at http://support.microsoft.com/kb/188321
where, if you are watching a network folder, you need to make sure you
have extra permissions.
If I were implementing this, I'd read the codeguru sample briefly, look
at the directorychangewatcher sample from codeproject (which seems to
expose a simpler API), and talk with the TortoiseSVN folks to see what
code could be leveraged directly from there, as well as what problems
they may have run into.
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-03-04 18:42:38 CET