]> arthur.barton.de Git - bup.git/commit
git.CatPipe: more resilience against weird errors.
authorAvery Pennarun <apenwarr@gmail.com>
Fri, 23 Apr 2010 21:25:39 +0000 (17:25 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Fri, 23 Apr 2010 21:32:19 +0000 (17:32 -0400)
commit0ed56b2aac75d322ed9b7065f9e03b891a72c6a9
tree4199c5361283e14fa7308c6adfa6fc677a888542
parent46880edf5b8bd47e8ae635a213977c0d40e060a9
git.CatPipe: more resilience against weird errors.

Notably, MemoryErrors thrown because the file we're trying to load into
memory is too big to load all at once.  Now the MemoryError gets thrown, but
the main program is potentially able to recover from it because CatPipe at
least doesn't get into an inconsistent state.

Also we can recover nicely if some lamer kills our git-cat-file subprocess.

The AutoFlushIter we were using for this purpose turns out to not have been
good enough, and it's never been used anywhere but in CatPipe, so I've
revised it further and renamed it to git.AbortableIter.
lib/bup/git.py
lib/bup/helpers.py