Make sure to close CVS repository files after parsing them.

The same problem that was fixed in the last commit also existed in
InternalRevisionCollector.  Fix it there in the same manner.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5422 be7e6eca-30d4-0310-a8e5-ac0d63af7087
generate_blobs: ensure that CVS files get closed.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5423 be7e6eca-30d4-0310-a8e5-ac0d63af7087
shrink_test_case: ensure that CVS files get closed.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5424 be7e6eca-30d4-0310-a8e5-ac0d63af7087
rcs_file_filter: ensure that files get closed.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5425 be7e6eca-30d4-0310-a8e5-ac0d63af7087
verify-cvs2svn: ensure that files get closed.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5426 be7e6eca-30d4-0310-a8e5-ac0d63af7087
destroy_repository: ensure that files get closed.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5427 be7e6eca-30d4-0310-a8e5-ac0d63af7087
cvs2svn_memlog: ensure that files get closed.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5428 be7e6eca-30d4-0310-a8e5-ac0d63af7087
cvs2svn_lib: ensure that files get closed.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5429 be7e6eca-30d4-0310-a8e5-ac0d63af7087
Centralize gc policy in a new GarbageCollectionPolicy class.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5430 be7e6eca-30d4-0310-a8e5-ac0d63af7087
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
cvs2git: Emit some more information in OutputPass.

During OutputPass of cvs2git, output the correspondence between the
SVN revnums used in CreateRevsPass and the commit marks written to the
dumpfile.  This gives users a hope of determining which CVS file
revisions are added in which Git commits (though they still have to
convert marks -> SHA1s themselves).

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5432 be7e6eca-30d4-0310-a8e5-ac0d63af7087