Mercurial > public > mercurial-scm > hg-stable
diff mercurial/win32.py @ 13795:43b5fe18ea6c
set NOT_CONTENT_INDEXED on .hg dir (issue2694)
when running on Windows
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Mon, 28 Mar 2011 15:54:22 +0200 |
parents | a2f0fdb1e488 |
children | 9ca1ff3d4f8c |
line wrap: on
line diff
--- 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)