Anders
Anders

Reputation: 12726

FileSystemWatcher not working with Subversion?

I have an app that uses the FileSystemWatcher to listen for Created and Deleted events in a certain folder. The app works perfectly well when moving files in Windows Explorer. But the thing is, it is really meant to be used when users are moving files in a Subversion client (Syncro svn), which has a sort of explorer of its own for the user's working folder. But when files are moved from within the svn client, none of the actual files moved trigger the Created and Deleted events. The only ones that are triggered are for svn-specific files (.tmp, .svn-base and whatnot).

I first thought that this might be some sort of mechanism the svn client had for only "virtually" move the files at first, to actually move them at a later stage (commit or something), but in fact if I look in the Windows Explorer after doing the move inside the svn client, the files are actually there in the new folder. So why doesn't the FileSystemWatcher report these files, but only the svn-specific ones?

Upvotes: 0

Views: 149

Answers (1)

Vitaly
Vitaly

Reputation: 823

Happens because files are not being moved right as they are. Instead, moved file has .tmp suffix when copied to target directory. Once copy process is completed SyncroSvn then attempts to rename the file. That's it. Just catch Renamed event also.

Upvotes: 1

Related Questions