[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: Bert Huijben <bert_at_qqmail.nl>
Date: Sun, 6 Feb 2011 11:43:22 +0100

> -----Original Message-----
> From: Stefan Küng [mailto:tortoisesvn_at_gmail.com]
> Sent: zondag 6 februari 2011 10:43
> To: Subversion Development
> Subject: mark .svn folders to not get indexed
>
> 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

Note that this patch is not really what you want: It doesn't handle UTF-8,
nor long path names (which apr's version would do for us). We need to
support both when we don't want to introduce a regression.

In 1.7 we usually only have one .svn directory per workingcopy so there
won't be any performance difference on our operations.

So +1 on the idea.

        Bert
Received on 2011-02-06 11:44:12 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.