|
8 | 8 | fromgit.utilimportto_native_path_linux,join_path_native |
9 | 9 | importshutil |
10 | 10 | importgit |
| 11 | +importsys |
11 | 12 | importos |
12 | 13 |
|
| 14 | +# Change the configuration if possible to prevent the underlying memory manager |
| 15 | +# to keep file handles open. On windows we get problems as they are not properly |
| 16 | +# closed due to mmap bugs on windows (as it appears) |
| 17 | +ifsys.platform=='win32': |
| 18 | +try: |
| 19 | +importsmmap.util |
| 20 | +smmap.util.MapRegion._test_read_into_memory=True |
| 21 | +exceptImportError: |
| 22 | +sys.stderr.write("The submodule tests will fail as some files cannot be removed due to open file handles.\n") |
| 23 | +sys.stderr.write("The latest version of gitdb uses a memory map manager which can be configured to work around this problem") |
| 24 | +#END handle windows platform |
| 25 | + |
| 26 | + |
13 | 27 | classTestRootProgress(RootUpdateProgress): |
14 | 28 | """Just prints messages, for now without checking the correctness of the states""" |
15 | 29 |
|
|