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

Re: mark .svn folders to not get indexed

From: Branko ÄŒibej <brane_at_e-reka.si>
Date: Sun, 06 Feb 2011 16:08:28 +0100

+1, this is a great idea.

On 06.02.2011 10:42, Stefan Küng 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
>
>
>
> Stefan
>
>
Received on 2011-02-06 16:09:14 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.