Merge pack protocol receiver fix.
Fix whitespace bug in dul-web.

Had a tab that was syntactically correct, but since python treats tabs
as 8 spaces rather than 4 it resulted in incorrect behavior.
Add launchpad link.
Add TESTFLAGS variable to Makefile to make running nosetests easier.

Change-Id: I7d94577883ad0805281bcac0003df964bfd05cdc
Check tag and commit objects for duplicate and out-of-order headers.

This requires factoring out the commit/tag parsing code so it can be
used directly from both the _parse_text and check methods. The parse
methods yield tuples, which can either be used to set members or
check for ordering.

Change-Id: I5ffe47100273912eaa283d03332286287b109a13
Lazily read the contents of ShaFiles from disk.

Previously, ShaFile.from_file read and inflated the entire contents of a
ShaFile, storing the inflated text in memory. Parsing that text was done
lazily, but this resulted in a confusing performance profile, since the
"lazy" part was in fact faster (memory/CPU-bound) than the eager part
(I/O-bound).

This change ensures that a file is only read fully from disk right
before it is about to be parsed. The first few bytes are still read
from disk to get the file type, but there is no need to slurp the
whole file. Moreover, we now maintain a distinction between ShaFiles
that are initialized from (possibly raw) strings and files initialized
with filenames. In order to parse the contents of a file, we need to
have one or the other. There is a third category of ShaFiles that
should never be parsed, where all the properties are intended to be set
explicitly (usually (but not always) during testing). These objects are
created as usual via __init__.

The tests all pass, but we do not currently have a way of testing the
point at which the implementation reads the whole file from disk.

Also, note that a call to foo.id still results in reading the whole file
and calculating its SHA-1; this behavior may change in the future.

Change-Id: Ib9f67ead0d2a812a2e43cffa54c37a1c4a219841
Make ShaFiles created from files trust their filenames.

This adds a dummy FixedSha class that implements the read-only part
of hashlib's hash interface but does not actually compute a SHA-1
digest. This allows us to assign ids to file objects based on their
filename rather than requiring a read of the whole file; SHA-1s will
soon be checked during check().

Added a filename_to_sha helper function to objects.py; refactored the
opposite sha_to_filename functionality into this file as well for
parallelism and testing. As a side effect, reorganized some files in
tests/data to have the normal 2/38 filename structure.

Change-Id: Ic459628aec32a92e29ea49cfd6cbe685053971ef
object_store: clean up whitespace

Change-Id: Ifa5cda814fb3aef7cfe68c27cd0388dc35c4cfa9
dulwich.client: whitespace and 80 column cleanup

Change-Id: Idfd20438160153c863d96c7591d1797ed63d0727
compat tests: move assertRepos(Not)Equal to util

Change-Id: Ia226f2fed3b2b6dc23c11c541163bd081d0d45e7
Fix Blob._deserialize.
Correctly avoid parsing ShaFiles with fixed SHAs when calling sha().

This required some reworking of the _needs_* and _sha ivars. Improved
check() to force computing the SHA and verifying that it matches the
previously-set value. Added a test for this check.

Change-Id: I6782693d7d7708bc7c28f357c27419d51409b884
Merge trunk.
Add some basic tests for fastexport.
Fix fastexport commit exporter, add test.
merge support for generating fastexport streams.
Add basic test for write_commit_patch.
Cope with diffstat not being present in test_patch.
fix bug #557585 GitFile breaks dulwich on Windows
fix is to add os.O_BINARY flag as os.open doesn't open files as binary
on this platform by default
add git_am_patch_split.