merge patch from durin42 to use setuptools if possible.
Remove trailing whitespace.
Fix commit id, thanks Bryan Bishop.
speed up the python based tree object parser by using str.find
Merge faster pure-Python Tree parser.
Release 0.4.1.
Fix fetch() without determine_wants argument.
Add basic test for parsing commit objects.
Support custom fields in commits.
Support extension build fails.

Dulwich is pure python, with optional C implementation of some routines
for performance.

On systems which can not build the extensions, they default back to the
pure python implementations.

The builder can specify pure python by adding the flag
'--without-speedups' to the invocation of setup.py.
Add --without-speedups option.
Don't allow setting custom headers, per the discussion on the git list.
Fix two tests with the same name.
Implement Repo.get_config().
Rework server protocol to be smarter and interoperate with cgit client.

This largely consists of correctly implementing multi-ack and
single-ack mode on the client side as well as stopping graph walking
when a sufficient set of common commits is found. Tests are included,
and the implementation has been lightly tested against the cgit
client. However, the dulwich server does not interoperate with the
dulwich client anymore; this will be fixed in a future change.

This change also preserves the GraphWalker interface so as not to
break hg-git or bzr-git.

Change-Id: Ia63e7fd0da9ff17c9f3f546149b474eb4f8bb466
Add a GitFile class that uses the same locking protocol for writes as git.

Change-Id: Id9c6f8b5880a73e0e714cbc61e954d0ecae6103a
Clarify GitFile docstrings and disallow r+w modes.

Change-Id: I9a23ede0d7a3c93b0eb6c55aebf487a34d7cf875
Don't magically delete lockfiles on IOError/OSError.

The docstring already says the only way to guarantee that lockfiles
will be deleted is close them in a finally block, so the extra magic
is redundant.
Work towards making Dulwich less dependent on the filesystem.

This change is mostly refactoring, and accomplishes the following:
 * Create an abstract base class for Repo that does not need to point
   to a repo on disk.
 * Move some methods in DiskRefsContainer dealing with packs to the
   base class. Packs are such a fundamental tool for optimization in
   git that they should be used by non-disk-backed implementations.
 * Change GitBackend to take in a repo rather than a directory as an
   argument.

Change-Id: Ib2f12855b34c60de48d2b777fbca32f9c2317c8c
Improve server protocol error handling; fix flush-pkt handling.

Change-Id: Ib3631cd3167071f555113f62d80bc63bf02acdad