Choose garbage collection policy a bit more intelligently.
The CPython garbage-collector is only needed for circular reference
loops, because most unused objects are cleared via reference counting.
cvs2svn is careful not to create any reference loops, so under CPython
the garbage-collector costs a lot of overhead but brings zero benefit.
Therefore, it was disabled.
However, other Python implementations (e.g., Jython, PyPy in at least
one incarnation, and probably IronPython too) do not use reference
counting at all, and *rely* on the garbage collector to free unused
objects.
So, try to detect which Python implementation is being used, and
disable the garbage collector only if we are sure that we are running
under CPython.
Unfortunately, platform.python_implementation(), which provides the
required information, was only added in Python 2.6. So on older
versions of Python, just leave the garbage collector on. This will
cost some performance, but will always work.
This should fix an out-of-memory error that was reported by Jan Smets
<jan@smets.cx> when using PyPy.
git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5431 be7e6eca-30d4-0310-a8e5-ac0d63af7087