Show More
@@ -143,7 +143,7 b' def share(ui, source, dest=None, update=' | |||||
143 |
|
143 | |||
144 | if not os.path.isdir(root): |
|
144 | if not os.path.isdir(root): | |
145 | os.mkdir(root) |
|
145 | os.mkdir(root) | |
146 | os.mkdir(roothg) |
|
146 | util.makedir(roothg, notindexed=True) | |
147 |
|
147 | |||
148 | requirements = '' |
|
148 | requirements = '' | |
149 | try: |
|
149 | try: | |
@@ -281,7 +281,7 b' def clone(ui, source, dest=None, pull=Fa' | |||||
281 | dir_cleanup.dir_ = hgdir |
|
281 | dir_cleanup.dir_ = hgdir | |
282 | try: |
|
282 | try: | |
283 | dest_path = hgdir |
|
283 | dest_path = hgdir | |
284 |
|
|
284 | util.makedir(dest_path, notindexed=True) | |
285 | except OSError, inst: |
|
285 | except OSError, inst: | |
286 | if inst.errno == errno.EEXIST: |
|
286 | if inst.errno == errno.EEXIST: | |
287 | dir_cleanup.close() |
|
287 | dir_cleanup.close() |
@@ -47,7 +47,7 b' class localrepository(repo.repository):' | |||||
47 | if create: |
|
47 | if create: | |
48 | if not os.path.exists(path): |
|
48 | if not os.path.exists(path): | |
49 | util.makedirs(path) |
|
49 | util.makedirs(path) | |
50 |
|
|
50 | util.makedir(self.path, notindexed=True) | |
51 | requirements = ["revlogv1"] |
|
51 | requirements = ["revlogv1"] | |
52 | if self.ui.configbool('format', 'usestore', True): |
|
52 | if self.ui.configbool('format', 'usestore', True): | |
53 | os.mkdir(os.path.join(self.path, "store")) |
|
53 | os.mkdir(os.path.join(self.path, "store")) |
@@ -438,6 +438,9 b' def checksignature(func):' | |||||
438 |
|
438 | |||
439 | return check |
|
439 | return check | |
440 |
|
440 | |||
|
441 | def makedir(path, notindexed): | |||
|
442 | os.mkdir(path) | |||
|
443 | ||||
441 | def unlinkpath(f): |
|
444 | def unlinkpath(f): | |
442 | """unlink and remove the directory if it is empty""" |
|
445 | """unlink and remove the directory if it is empty""" | |
443 | os.unlink(f) |
|
446 | os.unlink(f) |
@@ -58,6 +58,7 b' class _BY_HANDLE_FILE_INFORMATION(ctypes' | |||||
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 | |
@@ -365,3 +366,8 b' def unlink(f):' | |||||
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) |
General Comments 0
You need to be logged in to leave comments.
Login now