← Back to team overview

dulwich-users team mailing list archive

[PATCH v2 0/6] close files

 

While testing on Windows, I got unable-to-remove-temp-dir errors. All
patches (other than the first two, which are small cleanups that I
encountered along the way) address these issues.

Tested on Python 2.5.4/Windows and Python 2.6.4/Ubuntu.

Changed from v1:
  - patch #3: use getattr() instead of hasattr()
  - patch #4: wrap in try-finally block
  - patch #6: wrap in try-finally blocks

[1/6] pack.PackIndex: de-duplicate __iter__ implementation
[2/6] pack.FilePackIndex: use self._file instead of file parameter
[3/6] pack.FilePackIndex: close mmap object
[4/6] object_store.DiskObjectStore.move_in_thin_pack: close temp pack
[5/6] test_object_store.PackBasedObjectStoreTests: close packs
[6/6] test_pack.TestPack.test_copy: close packs

 dulwich/object_store.py            |   12 +++++++---
 dulwich/pack.py                    |   10 +++-----
 dulwich/tests/test_object_store.py |    5 ++++
 dulwich/tests/test_pack.py         |   39 ++++++++++++++++++++++-------------
 4 files changed, 41 insertions(+), 25 deletions(-)

-- 
1.7.3.2.msysgit.0




Follow ups

References