mercurial/win32.py
changeset 13795 43b5fe18ea6c
parent 13776 a2f0fdb1e488
child 13976 9ca1ff3d4f8c
--- a/mercurial/win32.py	Tue Mar 29 16:25:48 2011 +0200
+++ b/mercurial/win32.py	Mon Mar 28 15:54:22 2011 +0200
@@ -58,6 +58,7 @@
 
 # SetFileAttributes
 _FILE_ATTRIBUTE_NORMAL = 0x80
+_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x2000
 
 # Process Security and Access Rights
 _PROCESS_QUERY_INFORMATION = 0x0400
@@ -365,3 +366,8 @@
             # Leaking a tempfile is the lesser evil than aborting here and
             # leaving some potentially serious inconsistencies.
             pass
+
+def makedir(path, notindexed):
+    os.mkdir(path)
+    if notindexed:
+        _kernel32.SetFileAttributesA(path, _FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)