[engine] Make ScmProjectTree pickable and fix most GitFSTest tests

Review Request #3770 — Created April 27, 2016 and submitted — Latest diff uploaded

3189, 3286
kwlzn, patricklaw, stuhood, wisechengyi

Two things to make ScmProjectTree picklable:

  • _reader, GitRepositoryReader contains a Popen instance. This review marks it @memoized so it is saved by memoized.
  • _scm, Git contains a logger, this review moves the logger to the module.

Also added is to initialize Git FS for test, only two tests fail now, created https://github.com/pantsbuild/pants/issues/3281 to address separately.
(Assertion errors not pickle or exceptions)

https://travis-ci.org/peiyuwang/pants/builds/126266801 passed
https://travis-ci.org/peiyuwang/pants/builds/126289749 passed
https://travis-ci.org/peiyuwang/pants/builds/126550497 passed