Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
13793:ba58c5a61503 | 13795:43b5fe18ea6c |
---|---|
56 | 56 |
57 _OPEN_EXISTING = 3 | 57 _OPEN_EXISTING = 3 |
58 | 58 |
59 # SetFileAttributes | 59 # SetFileAttributes |
60 _FILE_ATTRIBUTE_NORMAL = 0x80 | 60 _FILE_ATTRIBUTE_NORMAL = 0x80 |
61 _FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x2000 | |
61 | 62 |
62 # Process Security and Access Rights | 63 # Process Security and Access Rights |
63 _PROCESS_QUERY_INFORMATION = 0x0400 | 64 _PROCESS_QUERY_INFORMATION = 0x0400 |
64 | 65 |
65 # GetExitCodeProcess | 66 # GetExitCodeProcess |
363 except OSError: | 364 except OSError: |
364 # The unlink might have failed due to some very rude AV-Scanners. | 365 # The unlink might have failed due to some very rude AV-Scanners. |
365 # Leaking a tempfile is the lesser evil than aborting here and | 366 # Leaking a tempfile is the lesser evil than aborting here and |
366 # leaving some potentially serious inconsistencies. | 367 # leaving some potentially serious inconsistencies. |
367 pass | 368 pass |
369 | |
370 def makedir(path, notindexed): | |
371 os.mkdir(path) | |
372 if notindexed: | |
373 _kernel32.SetFileAttributesA(path, _FILE_ATTRIBUTE_NOT_CONTENT_INDEXED) |