| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,9 +9,23 @@ | |||
| 9 | 9 | ||
| 10 | 10 | import shutil | |
| 11 | 11 | import git | |
| 12 | + import sys | ||
| 12 | 13 | import os | |
| 13 | 14 | import sys | |
| 14 | 15 | ||
| 16 | + # Change the configuration if possible to prevent the underlying memory manager | ||
| 17 | + # to keep file handles open. On windows we get problems as they are not properly | ||
| 18 | + # closed due to mmap bugs on windows (as it appears) | ||
| 19 | + if sys.platform == 'win32': | ||
| 20 | + try: | ||
| 21 | + import smmap.util | ||
| 22 | + smmap.util.MapRegion._test_read_into_memory = True | ||
| 23 | + except ImportError: | ||
| 24 | + sys.stderr.write("The submodule tests will fail as some files cannot be removed due to open file handles.\n") | ||
| 25 | + sys.stderr.write("The latest version of gitdb uses a memory map manager which can be configured to work around this problem") | ||
| 26 | + #END handle windows platform | ||
| 27 | + | ||
| 28 | + | ||
| 15 | 29 | class TestRootProgress(RootUpdateProgress): | |
| 16 | 30 | """Just prints messages, for now without checking the correctness of the states""" | |
| 17 | 31 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments