On Sun, Feb 6, 2011 at 12:42, Stefan Küng <tortoise...@gmail.com> wrote: > Hi, > > For some time now I've been looking for a way to configure the windows > indexing service to not index the .svn folders. I wanted to do that in my > installer for TSVN, but after countless hours of searching the web and > reading up even on the internals of the service I found that there just > isn't a way to do that. > > Then I found a way to do this: just set the attribute > FILE_ATTRIBUTE_NOT_CONTENT_INDEXED on the .svn folder - the files and > folders created in it will automatically inherit that attribute when they > get created. > But this would have to be done in the svn library when those folders and > files are created. > > Unfortunately, apr doesn't provide a way to set this flag when creating the > folders or even later, so this would mean OS specific code in the svn > library. > > The advantages for Windows users would be: > * a search won't show matches in the pristine files, those search results > are useless for users anyway and are only "spam" in the results > * the indexing service won't crawl unnecessary data, reducing disk access a > lot > * since the indexing service won't crawl the .svn folder anymore, > access-denied errors during svn commands would also get reduced, especially > errors like these: > http://subversion.wandisco.com/blogs/windows-7-bogus-errorfilecorrupt-error-.html > > > I still remember the heated discussions about setting the hidden attribute > on Windows for the .svn folders, so I'd like to discuss this first before I > commit the change to init_adm() > > #ifdef WIN32 > /* tell Windows to not index the admin dir and its content */ > const char * admdirpath = svn_wc__adm_child(local_abspath, NULL, pool); > SetFileAttributes(admindirpath, GetFileAttributes(admindirpath) > |FILE_ATTRIBUTE_NOT_CONTENT_INDEXED); > #endif > > > I'm big +1 for marking .svn not indexed by Windows indexing service.
-- Ivan Zhakov VisualSVN Team