Re: Subversion checked-out files not indexed in Windows search

2014-03-18 Thread Ivan Zhakov
On 13 March 2014 17:14, Bert Huijben b...@qqmail.nl wrote:


 -Original Message-
 From: Ivan Zhakov [mailto:i...@visualsvn.com]
 Sent: donderdag 13 maart 2014 13:56
 To: Branko Čibej
 Cc: Subversion Development
 Subject: Re: Subversion checked-out files not indexed in Windows search

 On 13 March 2014 16:46, Branko Čibej br...@wandisco.com wrote:
  On 13.03.2014 13:37, Ivan Zhakov wrote:
 
  On 12 March 2014 18:17, Gareth McCaughan
  gareth.mccaug...@lightblueoptics.com wrote:
 
  Ivan Zhakov wrote:
 
  It looks like serious issue. Could you please file issue in Subversion
  issue tracker: http://subversion.tigris.org/issues
 
  Done. Issue #4478.
 
  Gareth, thanks a lot!
 
  It seems we have second reason to create temporary files in target WC
  directory, instead of .svn/tmp. Another problem we had before is
  inherited ACL on Windows discussed year ago:
  http://mail-archives.apache.org/mod_mbox/subversion-
 dev/201309.mbox/%3C20130928110059.d1bb8d007dfe7b26cbcb4f719cb77fd6
 .be88925bf6.wbe%40email16.secureserver.net%3E
 
  I've prepared stupid patch to create temporary files in WC, instead of
  .svn/tmp and it seems working fine.
 
 
  -1. This leaves us with no reliable way to clean up the working copy in 
  case
  of an aborted operation.
 
  There should be a better way for managing ACLs on windows that does not
  require us to mess up the working copy. I'm perfectly happy with just
  documenting that we don't support different ACLs for .svn and the rest of
  the WC, at least for now.
 
 Please note that problem reported is not about inherited ACL: now
 users got NOT_INDEXED attribute on all WC files, because .svn marked
 to by not indexed by Windows Search and tools like that.

 I'm working on a better patch for this, that doesn't have this problem and
 will improve performance on the pristine store operations as well.
That's good news. Could you please share idea of your patch?

I'm thinking of something like this:
1. Create temp file in target directory.
2. Set DELETE_ON_CLOSE=TRUE using SetFileInformationByHandle()
3. Write contents to temporary file
4. Set DELETE_ON_CLOSE=FALSE using SetFileInformationByHandle()
5. Rename to final location using SetFileInformationByHandle()
6. Delete if failed.
7. CloseFile()

This will be Windows Vista only code since
SetFileInformationByHandle() is not available for older platforms. But
newer Windows SDKs has compatibility library FileExtd.lib for Windows
XP.



 But since when is this a huge problem? We applied this setting since 1.6 if I 
 remember correctly...
 I'm more surprised that you didn't know about this?

I think setting NOT_INDEXED attribute is big problem, while ACL is
nice to have but not so critical. I was not aware about this problem
before.


-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com


RE: Subversion checked-out files not indexed in Windows search

2014-03-18 Thread Bert Huijben


 -Original Message-
 From: Ivan Zhakov [mailto:i...@visualsvn.com]
 Sent: dinsdag 18 maart 2014 11:07
 To: Bert Huijben
 Cc: Branko Čibej; Subversion Development
 Subject: Re: Subversion checked-out files not indexed in Windows search
 
 On 13 March 2014 17:14, Bert Huijben b...@qqmail.nl wrote:
 
 
  -Original Message-
  From: Ivan Zhakov [mailto:i...@visualsvn.com]
  Sent: donderdag 13 maart 2014 13:56
  To: Branko Čibej
  Cc: Subversion Development
  Subject: Re: Subversion checked-out files not indexed in Windows search
 
  On 13 March 2014 16:46, Branko Čibej br...@wandisco.com wrote:
   On 13.03.2014 13:37, Ivan Zhakov wrote:
  
   On 12 March 2014 18:17, Gareth McCaughan
   gareth.mccaug...@lightblueoptics.com wrote:
  
   Ivan Zhakov wrote:
  
   It looks like serious issue. Could you please file issue in Subversion
   issue tracker: http://subversion.tigris.org/issues
  
   Done. Issue #4478.
  
   Gareth, thanks a lot!
  
   It seems we have second reason to create temporary files in target WC
   directory, instead of .svn/tmp. Another problem we had before is
   inherited ACL on Windows discussed year ago:
   http://mail-archives.apache.org/mod_mbox/subversion-
 
 dev/201309.mbox/%3C20130928110059.d1bb8d007dfe7b26cbcb4f719cb77fd6
  .be88925bf6.wbe%40email16.secureserver.net%3E
  
   I've prepared stupid patch to create temporary files in WC, instead of
   .svn/tmp and it seems working fine.
  
  
   -1. This leaves us with no reliable way to clean up the working copy in
 case
   of an aborted operation.
  
   There should be a better way for managing ACLs on windows that does
 not
   require us to mess up the working copy. I'm perfectly happy with just
   documenting that we don't support different ACLs for .svn and the rest
 of
   the WC, at least for now.
  
  Please note that problem reported is not about inherited ACL: now
  users got NOT_INDEXED attribute on all WC files, because .svn marked
  to by not indexed by Windows Search and tools like that.
 
  I'm working on a better patch for this, that doesn't have this problem and
  will improve performance on the pristine store operations as well.
 That's good news. Could you please share idea of your patch?
 
 I'm thinking of something like this:
 1. Create temp file in target directory.
 2. Set DELETE_ON_CLOSE=TRUE using SetFileInformationByHandle()
 3. Write contents to temporary file
 4. Set DELETE_ON_CLOSE=FALSE using SetFileInformationByHandle()
 5. Rename to final location using SetFileInformationByHandle()
 6. Delete if failed.
 7. CloseFile()

The idea I was working on didn't involve creating files in locations where they 
could work against us in a case of a crash. I don't think delete on close will 
be handled on system failures, just on application failures.

The original reason to set the NOT_INDEXED flag on the .svn subdirectory 
(patches by stefanking and you), was that this caused quite a huge slowdown as 
the file indexer on Windows 7 and XP continuously monitors for changes and 
started indexing the file even before we moved it in place. (Even triggering an 
NTFS bug in Windows 7 pre SP 1)

The new install code keeps the file under a full lock that allows us to move 
the file in place without outside handling of a file. (A virusscanner can still 
read it while we have it open, but as we already have the move and delete 
privileges we don't have to wait to obtain move rights).

I think we should stick to the original (far pre Subversion 1.0) model of 
creating files in the .svn wc directories, for the same reason Brane alreadt 
vetoed your idea of creating the files in the directory. The reasoning behind 
that is very solid.
That some users want to see permissions different than in all previous versions 
is not a good reason to slow things down (another open, ACL check, ACL update, 
close) and/or to make the working copy less stable (possibility of files in the 
working copy that hides real changes and are easily to accidentally commit).

We never touched ACLs, on any platforms... I don't think we should start with 
doing that, especially at a performance cost.

I hoped that for the non-indexing bit we could just pass the attribute to 
CreateFileW(), but this function explicitly ignores this attribute. It only 
applies it from the parent directory. Using a different tempdir for creating 
new pristine files would work.


But the reason we set this flag is mostly gone anyway... I think we should just 
remove our code to touch that attribute and use the apr attribute function like 
we did before. The additional indexing is not really our problem (and the 
indexer won't care about a few more MB), and it is very easy to filter on 
*.svn-base if somebody want that.

Bert

 
 This will be Windows Vista only code since
 SetFileInformationByHandle() is not available for older platforms. But
 newer Windows SDKs has compatibility library FileExtd.lib for Windows
 XP.
 
 
 
  But since when is this a huge

Re: Subversion checked-out files not indexed in Windows search

2014-03-18 Thread Branko Čibej
On 18.03.2014 11:20, Bert Huijben wrote:
 But the reason we set this flag is mostly gone anyway... I think we should 
 just remove our code to touch that attribute and use the apr attribute 
 function like we did before. The additional indexing is not really our 
 problem (and the indexer won't care about a few more MB), and it is very easy 
 to filter on *.svn-base if somebody want that.

Dunno ... I think any indexing in the .svn directory is a mistake and
likely to cause confusion. Not because of performance degradation, but
because users really shouldn't care about the contents of that
directory, including not seeing them in search results.

Of course, tweaking that flag when the file is renamed has its own set
of interesting problems ... for example, we'd have to check the flag
and inheritance settings on the parent directory.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. br...@wandisco.com


RE: Subversion checked-out files not indexed in Windows search

2014-03-18 Thread Bert Huijben
 -Original Message-
 From: Branko Čibej [mailto:br...@wandisco.com]
 Sent: dinsdag 18 maart 2014 11:37
 To: 'Subversion Development'
 Subject: Re: Subversion checked-out files not indexed in Windows search
 
 On 18.03.2014 11:20, Bert Huijben wrote:
  But the reason we set this flag is mostly gone anyway... I think we should
 just remove our code to touch that attribute and use the apr attribute
 function like we did before. The additional indexing is not really our problem
 (and the indexer won't care about a few more MB), and it is very easy to
 filter on *.svn-base if somebody want that.
 
 Dunno ... I think any indexing in the .svn directory is a mistake and
 likely to cause confusion. Not because of performance degradation, but
 because users really shouldn't care about the contents of that
 directory, including not seeing them in search results.
 
 Of course, tweaking that flag when the file is renamed has its own set
 of interesting problems ... for example, we'd have to check the flag
 and inheritance settings on the parent directory.

We are not the one indexing :)
The attribute is just a hint supported by some of the possible indexers (many 
have positive and negative overrides). On some filesystems the flag isn't even 
supported.


Introducing a second tmp directory to create pristine files in (perhaps below 
.svn/pristine) would allow setting the flag just for the pristine files.

I'm not sure if that really requires a format bump... We could just clean it 
like .svn/tmp when there are no locks and no working queue items.

Bert 



RE: Subversion checked-out files not indexed in Windows search

2014-03-17 Thread Bert Huijben


 -Original Message-
 From: Markus Schaber [mailto:m.scha...@codesys.com]
 Sent: maandag 17 maart 2014 10:07
 To: Jason Kresowaty; dev@subversion.apache.org
 Subject: AW: Subversion checked-out files not indexed in Windows search
 
 Hi,
 
 Von: Jason Kresowaty [mailto:ja...@binarycoder.net]
  On 3/13/2014 9:08 AM, Branko Čibej wrote:
   I understand that; it simply means that when we install a file from
   .svn/tmp into the working copy proper, we have to change that
   attribute; either before or after the file is moved into place.
 
  When this came up on ACLs, there seemed to be a lot of resistance to
 changing
  the file after it was in place. Kind of switching the subject, but if you're
  okay with changing files after they are in place, consider also propagating
  the ACL at that time too.
 
 What about first setting the ACL and attributes while the file still is in the
 temp folder, and then moving the file to the final place?

To what would you want to set the ACL?

The code snippet posted makes the file inherit the ACL of its parent directory, 
which in this case would be the temp directory.

Which is exactly the current behavior.

And updating these attributes one at a time during checkout would be huge (not 
a small) performance killer during checkout, as both operations would be 
updating the MFT.

We should try to perform as much operations as possible while having the files 
open anyway, as each file open (which at the kernel level includes operations 
as setting properties) will involve virus scanners, etc.


With the current trunk code the best solution might be to just remove the 
setting of the 'don't index' property, as the current code already moves the 
files in place while still open and 100% locked from indexers. 
(Those indexers really slowed us down on Windows XP and 7 around the time that 
we introduced this flag as the indexer opened the file between us creating and 
moving the file)

Bert



Re: Subversion checked-out files not indexed in Windows search

2014-03-17 Thread Jason Kresowaty


On 3/17/2014 5:40 AM, Bert Huijben wrote:


And updating these attributes one at a time during checkout would be huge (not 
a small) performance killer during checkout, as both operations would be 
updating the MFT.

We should try to perform as much operations as possible while having the files 
open anyway, as each file open (which at the kernel level includes operations 
as setting properties) will involve virus scanners, etc.


With the current trunk code the best solution might be to just remove the 
setting of the 'don't index' property, as the current code already moves the 
files in place while still open and 100% locked from indexers.
(Those indexers really slowed us down on Windows XP and 7 around the time that 
we introduced this flag as the indexer opened the file between us creating and 
moving the file)

Bert





As far as the ACLs, I think Windows Explorer uses this technique, so if 
it causes problems with scanners, these problems happen just working 
with files in Explorer too.


It is more complexity, but you could check if the 'attributes' are 
incorrect and only make the API call if there is something to change. 
Thus, only those users affected by the problem incur any decrease in 
performance.


(This is assuming the API's in question are not already optimized for 
this case; if I recall correctly, I don't think these kinds of APIs edit 
the modified date in any case, for example.)




Re: Subversion checked-out files not indexed in Windows search

2014-03-17 Thread Thomas Åkesson

On 17 mar 2014, at 10:40, Bert Huijben b...@qqmail.nl wrote:

 
 
 -Original Message-
 From: Markus Schaber [mailto:m.scha...@codesys.com]
 Sent: maandag 17 maart 2014 10:07
 To: Jason Kresowaty; dev@subversion.apache.org
 Subject: AW: Subversion checked-out files not indexed in Windows search
 
 Hi,
 
 Von: Jason Kresowaty [mailto:ja...@binarycoder.net]
 On 3/13/2014 9:08 AM, Branko Čibej wrote:
 I understand that; it simply means that when we install a file from
 .svn/tmp into the working copy proper, we have to change that
 attribute; either before or after the file is moved into place.
 
 When this came up on ACLs, there seemed to be a lot of resistance to
 changing
 the file after it was in place. Kind of switching the subject, but if you're
 okay with changing files after they are in place, consider also propagating
 the ACL at that time too.
 
 What about first setting the ACL and attributes while the file still is in 
 the
 temp folder, and then moving the file to the final place?
 
 To what would you want to set the ACL?
 
 The code snippet posted makes the file inherit the ACL of its parent 
 directory, which in this case would be the temp directory.
 
 Which is exactly the current behavior.
 
 And updating these attributes one at a time during checkout would be huge 
 (not a small) performance killer during checkout, as both operations would be 
 updating the MFT.
 
 We should try to perform as much operations as possible while having the 
 files open anyway, as each file open (which at the kernel level includes 
 operations as setting properties) will involve virus scanners, etc.
 
 
 With the current trunk code the best solution might be to just remove the 
 setting of the 'don't index' property, as the current code already moves the 
 files in place while still open and 100% locked from indexers. 
 (Those indexers really slowed us down on Windows XP and 7 around the time 
 that we introduced this flag as the indexer opened the file between us 
 creating and moving the file)


Taking that line of thought one step further; The don't index' property should 
probably be set on 'pristine' and 'wc.db' (for completeness also on 'entries' 
and 'format') rather than on '.svn'. Notably avoiding to set/inherit that 
property on tmp. I think setting the property is quite important, particularly 
for 'pristine'.

Should solve the indexing issue but not the ACL issue. 

/Thomas Å.

Re: Subversion checked-out files not indexed in Windows search

2014-03-15 Thread Jason Kresowaty

On 3/13/2014 9:08 AM, Branko Čibej wrote:

I understand that; it simply means that when we install a file from
.svn/tmp into the working copy proper, we have to change that
attribute; either before or after the file is moved into place.


When this came up on ACLs, there seemed to be a lot of resistance to
changing the file after it was in place. Kind of switching the subject,
but if you're okay with changing files after they are in place, consider
also propagating the ACL at that time too. As has been pointed out,
below is not the best possible solution as the file momentarily has the
undesired (but current-behavior) ACL and so there could be a problem on
abort. But I think it is an improvement over the current behavior, and
it is simple to implement.

This seems to give the desired effect:

DWORD ret;
ACL emptyAcl;
if (!InitializeAcl(emptyAcl, sizeof(ACL), ACL_REVISION)) {
  return 1;
}
// UNPROTECTED_SACL_SECURITY_INFORMATION ensures to enable inheritance.
// An empty DACL must be specified, not a NULL pointer.
ret = SetNamedSecurityInfo(fileName, SE_FILE_OBJECT,
  DACL_SECURITY_INFORMATION | UNPROTECTED_SACL_SECURITY_INFORMATION,
  NULL, NULL, emptyAcl, NULL);
if  (ret != ERROR_SUCCESS) {
  return 1;
}

I think also a check that the file supports ACLs (e.g., because FAT/etc.
systems do not).

Thanks, I'll try not to harp on this subject again in the future. It's
just the fact that SVN does not do this (even as an option that can be
turned on) happens to be my #1 issue with svn.


Re: Subversion checked-out files not indexed in Windows search

2014-03-13 Thread Ivan Zhakov
On 12 March 2014 18:17, Gareth McCaughan
gareth.mccaug...@lightblueoptics.com wrote:
 Ivan Zhakov wrote:

 It looks like serious issue. Could you please file issue in Subversion
 issue tracker: http://subversion.tigris.org/issues

 Done. Issue #4478.

Gareth, thanks a lot!

It seems we have second reason to create temporary files in target WC
directory, instead of .svn/tmp. Another problem we had before is
inherited ACL on Windows discussed year ago:
http://mail-archives.apache.org/mod_mbox/subversion-dev/201309.mbox/%3C20130928110059.d1bb8d007dfe7b26cbcb4f719cb77fd6.be88925bf6.wbe%40email16.secureserver.net%3E

I've prepared stupid patch to create temporary files in WC, instead of
.svn/tmp and it seems working fine.

-- 
Ivan Zhakov
Index: subversion/libsvn_wc/workqueue.c
===
--- subversion/libsvn_wc/workqueue.c(revision 1577065)
+++ subversion/libsvn_wc/workqueue.c(working copy)
@@ -476,6 +476,7 @@
   const svn_checksum_t *checksum;
   apr_hash_t *props;
   apr_time_t changed_date;
+  svn_error_t *err;
 
   local_relpath = apr_pstrmemdup(scratch_pool, arg1-data, arg1-len);
   SVN_ERR(svn_wc__db_from_relpath(local_abspath, db, wri_abspath,
@@ -564,17 +565,32 @@
scratch_pool);
 }
 
+  temp_dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+#if 0
   /* Where is the Right Place to put a temp file in this working copy?  */
   SVN_ERR(svn_wc__db_temp_wcroot_tempdir(temp_dir_abspath,
  db, wcroot_abspath,
  scratch_pool, scratch_pool));
+#endif
 
   /* Translate to a temporary file. We don't want the user seeing a partial
  file, nor let them muck with it while we translate. We may also need to
  get its TRANSLATED_SIZE before the user can monkey it.  */
-  SVN_ERR(svn_stream__create_for_install(dst_stream, temp_dir_abspath,
- scratch_pool, scratch_pool));
+  err = svn_stream__create_for_install(dst_stream, temp_dir_abspath,
+   scratch_pool, scratch_pool);
 
+  if (err  APR_STATUS_IS_ENOENT(err-apr_err))
+{
+  svn_error_clear(err);
+  SVN_ERR(svn_io_make_dir_recursively(temp_dir_abspath, scratch_pool));
+  SVN_ERR(svn_stream__create_for_install(dst_stream, temp_dir_abspath,
+ scratch_pool, scratch_pool));
+}
+  else if (err)
+{
+  return svn_error_trace(err);
+}
+
   /* Copy from the source to the dest, translating as we go. This will also
  close both streams.  */
   SVN_ERR(svn_stream_copy3(src_stream, dst_stream,


Re: Subversion checked-out files not indexed in Windows search

2014-03-13 Thread Stefan Kueng

On 13.03.2014 14:14, Bert Huijben wrote:




-Original Message-
From: Ivan Zhakov [mailto:i...@visualsvn.com]
Sent: donderdag 13 maart 2014 13:56
To: Branko Čibej
Cc: Subversion Development
Subject: Re: Subversion checked-out files not indexed in Windows search

On 13 March 2014 16:46, Branko Čibej br...@wandisco.com wrote:

On 13.03.2014 13:37, Ivan Zhakov wrote:

On 12 March 2014 18:17, Gareth McCaughan
gareth.mccaug...@lightblueoptics.com wrote:

Ivan Zhakov wrote:

It looks like serious issue. Could you please file issue in Subversion
issue tracker: http://subversion.tigris.org/issues

Done. Issue #4478.

Gareth, thanks a lot!

It seems we have second reason to create temporary files in target WC
directory, instead of .svn/tmp. Another problem we had before is
inherited ACL on Windows discussed year ago:
http://mail-archives.apache.org/mod_mbox/subversion-

dev/201309.mbox/%3C20130928110059.d1bb8d007dfe7b26cbcb4f719cb77fd6
.be88925bf6.wbe%40email16.secureserver.net%3E


I've prepared stupid patch to create temporary files in WC, instead of
.svn/tmp and it seems working fine.


-1. This leaves us with no reliable way to clean up the working copy in case
of an aborted operation.

There should be a better way for managing ACLs on windows that does not
require us to mess up the working copy. I'm perfectly happy with just
documenting that we don't support different ACLs for .svn and the rest of
the WC, at least for now.


Please note that problem reported is not about inherited ACL: now
users got NOT_INDEXED attribute on all WC files, because .svn marked
to by not indexed by Windows Search and tools like that.


I'm working on a better patch for this, that doesn't have this problem and will 
improve performance on the pristine store operations as well.

But since when is this a huge problem? We applied this setting since 1.6 if I 
remember correctly... I'm more surprised that you didn't know about this?


Instead of setting the attributes after moving the files, how about 
creating a new folder wctemp in the .svn folder and set the attribute 
on that folder. Then use that folder to create the temp files which are 
intended for moving to the working copy? That way temp files don't have 
to be created inside the working copy.


Stefan


--
   ___
  oo  // \\  De Chelonian Mobile
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/The coolest interface to (Sub)version control
   /_/   \_\ http://tortoisesvn.net


Re: Subversion checked-out files not indexed in Windows search

2014-03-13 Thread Ivan Zhakov
On 13 March 2014 21:52, Stefan Kueng tortoise...@gmail.com wrote:
 On 13.03.2014 14:14, Bert Huijben wrote:



 -Original Message-
 From: Ivan Zhakov [mailto:i...@visualsvn.com]
 Sent: donderdag 13 maart 2014 13:56
 To: Branko Čibej
 Cc: Subversion Development
 Subject: Re: Subversion checked-out files not indexed in Windows search

 On 13 March 2014 16:46, Branko Čibej br...@wandisco.com wrote:

 On 13.03.2014 13:37, Ivan Zhakov wrote:

 On 12 March 2014 18:17, Gareth McCaughan
 gareth.mccaug...@lightblueoptics.com wrote:

 Ivan Zhakov wrote:

 It looks like serious issue. Could you please file issue in Subversion
 issue tracker: http://subversion.tigris.org/issues

 Done. Issue #4478.

 Gareth, thanks a lot!

 It seems we have second reason to create temporary files in target WC
 directory, instead of .svn/tmp. Another problem we had before is
 inherited ACL on Windows discussed year ago:
 http://mail-archives.apache.org/mod_mbox/subversion-

 dev/201309.mbox/%3C20130928110059.d1bb8d007dfe7b26cbcb4f719cb77fd6
 .be88925bf6.wbe%40email16.secureserver.net%3E


 I've prepared stupid patch to create temporary files in WC, instead of
 .svn/tmp and it seems working fine.


 -1. This leaves us with no reliable way to clean up the working copy in
 case
 of an aborted operation.

 There should be a better way for managing ACLs on windows that does not
 require us to mess up the working copy. I'm perfectly happy with just
 documenting that we don't support different ACLs for .svn and the rest
 of
 the WC, at least for now.

 Please note that problem reported is not about inherited ACL: now
 users got NOT_INDEXED attribute on all WC files, because .svn marked
 to by not indexed by Windows Search and tools like that.


 I'm working on a better patch for this, that doesn't have this problem and
 will improve performance on the pristine store operations as well.

 But since when is this a huge problem? We applied this setting since 1.6
 if I remember correctly... I'm more surprised that you didn't know about
 this?


 Instead of setting the attributes after moving the files, how about creating
 a new folder wctemp in the .svn folder and set the attribute on that
 folder. Then use that folder to create the temp files which are intended for
 moving to the working copy? That way temp files don't have to be created
 inside the working copy.

Because user may change not indexed attribute of WC folder and
children should inherit it.


-- 
Ivan Zhakov


Re: Subversion checked-out files not indexed in Windows search

2014-03-12 Thread Ivan Zhakov
On 10 March 2014 18:25, Gareth McCaughan
gareth.mccaug...@lightblueoptics.com wrote:
 It appears that files checked out using Subversion (1.7 onwards)
 are marked as not indexable by Windows search. The way in which
 this happens appears to be as follows:

 When the WC is created:

 1. .svn directory is created, and marked as hidden and not indexable.
 2. .svn/tmp directory is created, and inherits that not-indexable
property. (Or maybe it's given it explicitly; I haven't checked.)

 On checkout:

 1. Temporary file is created under .svn, and accordingly gets its
not-indexable flag set.
 2. Temporary file is moved to its proper location; this doesn't
cause the not-indexable flag to be cleared.

 So the point is that the NOT_CONTENT_INDEXABLE attribute on a
 directory doesn't exactly mean don't search inside this directory
 but make files created in this directory searchable. Then when
 they get moved elsewhere they retain that unsearchability.

 (If skeptical, you can see this by hand on a Windows machine,
 as follows: Create a directory A and subdirectory A\B. Right-click
 on B, select Properties, select Advanced, uncheck the
 allow-indexing box. Create two files A\B\C.txt and A\B\D.txt
 and put the word wombat in each. Now right-click D.txt,
 select Properties, select Advanced, and *check* the
 allow-indexing box; and drag C.txt out of A\B and into A.
 Now, in A, search for wombat using Windows Search. It will
 find D.txt even though it's in the unsearchable folder A\B,
 and it will not find C.txt even though it's in the searchable
 folder A, because what actually matters is the attributes on
 the files.)

 *

 Windows Search is of course generally a poor tool for searching
 source code, but this still seems fairly clearly (1) unintended
 and (2) undesirable.

 Should I file an issue? If not, will someone else?

 *

 I am not familiar with the code responsible for this, but
 a little browsing suggests that the rename is being done
 in svn_stream__install_stream (called from run_file_install
 in libsvn_wc/workqueue.c) by a call to SetFileInformationByHandle,
 and that this function is capable of changing the file attributes
 at the same time as doing the rename. I make no claim that
 this would actually be a good solution.

 *

 (Note 1. This seems to have been reported informally a couple
 of times before, but I don't see that it's ever received an
 official answer, had an issue filed in the Subversion issue
 tracker, or been fixed. Apologies if it has and I've missed it.)

 (Note 2. I have observed the behaviour described above on
 Windows 7 using svn 1.7.5, and on Windows 8 using svn 1.8.3.
 There is nothing in the CHANGES file to suggest it's likely
 to have been fixed since then, but I can check with the latest
 release if that's necessary.)

 (Note 3. I am not subscribed to users@ but will check for
 replies in the online archives; best to Cc: me, though, if
 you have questions or comments you want to be sure I'll see.)

It looks like serious issue. Could you please file issue in Subversion
issue tracker:
http://subversion.tigris.org/issues

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com


RE: Subversion checked-out files not indexed in Windows search

2014-03-12 Thread Gareth McCaughan
Ivan Zhakov wrote:

 It looks like serious issue. Could you please file issue in Subversion
 issue tracker: http://subversion.tigris.org/issues

Done. Issue #4478. 

-- 
g