merge from trac:r11999 and trac:r12019
merge from trac:r12083
merge from trac:r12173
import the following files from http://svn.edgewall.com/repos/trac/branches/1.0-stable@12206

 - tracopt/versioncontrol/git/tests/__init__.py
 - tracopt/versioncontrol/git/tests/PyGIT.py
 - trac/tests/compat.py
fixed unit tests