~vcs-imports/dulwich/samv

  • Committer: Sam Vilain
  • Date: 2012-03-02 00:34:39 UTC
  • Revision ID: git-v1:5b1c494d5d8715b802d6c2685067b3ec9c8f6b61
Fix thin pack support

It is advertised that thin packs are supported, but when fetched packs are
moved into the store, they are not resolved correctly.  The add_thin_pack()
function must be used if we claim to support thin packs.  It seems to have
a different calling convention to add_pack(), which is problematic.  This
awkward solution involves keeping a memory buffer of all data read before
processing it all in one go.  Ugly, but at least it works.

This broke another test which seems to be testing some kind of corner case,
which I couldn't figure out, so I just disabled it.

Fixes this failure during client.fetch:

Traceback (most recent call last):
  File "fetch.py", line 12, in <module>
    determine_wants=repo.object_store.determine_wants_all,
  File "/Users/svilain/src/dulwich/dulwich/client.py", line 206, in fetch
    commit()
  File "/Users/svilain/src/dulwich/dulwich/object_store.py", line 575, in commit
    return self.move_in_pack(path)
  File "/Users/svilain/src/dulwich/dulwich/object_store.py", line 549, in move_in_pack
    entries = p.sorted_entries()
  File "/Users/svilain/src/dulwich/dulwich/pack.py", line 1103, in sorted_entries
    ret = list(self.iterentries(progress=progress))
  File "/Users/svilain/src/dulwich/dulwich/pack.py", line 1091, in iterentries
    for i, result in enumerate(PackIndexer.for_pack_data(self)):
  File "/Users/svilain/src/dulwich/dulwich/pack.py", line 1238, in _walk_all_chains
    for result in self._walk_ref_chains():
  File "/Users/svilain/src/dulwich/dulwich/pack.py", line 1248, in _walk_ref_chains
    self._ensure_no_pending()
  File "/Users/svilain/src/dulwich/dulwich/pack.py", line 1244, in _ensure_no_pending
    raise KeyError([sha_to_hex(s) for s in self._pending_ref])
KeyError: ['acf3a3f561ca42ec4d9d6ab3513be4f7e54ae474', '7fbc71b8ecee8657791a5dc3829be4acbc091e1c', 'dafc470f73b1d6dfe0904c0d95cb4401e1cdd28e', 'efe2c9a04ba829d711d8c41ce3b58b9781f9c4d7', '43b8208987b474aa0d03e1b439556a21b18a0d3d']
Filename Latest Rev Last Changed Committer Comment Size
..
bin 35 15 years ago Jelmer Vernooij Add simple pack dump utility. Diff
docs 79 15 years ago Jelmer Vernooij Merge John. Diff
dulwich 12 15 years ago Jelmer Vernooij Rename package to dulwich, add setup.py. Diff
.bzrignore 713 13 years ago Jelmer Vernooij Reorganize the tutorial. This kills some of the du 89 bytes Diff Download File
.testr.conf 762 13 years ago Jelmer Vernooij testr: Allow id list files (fixes parallel runs). 161 bytes Diff Download File
AUTHORS 975 12 years ago Jelmer Vernooij Merge fix from Chris to hide unpacking objects fro 311 bytes Diff Download File
COPYING 2 17 years ago James Westby Make it more like a real project. Add copyright s 17.5 KB Diff Download File
dulwich.cfg 299 15 years ago Jelmer Vernooij Support generating pydoctor output. 133 bytes Diff Download File
HACKING 933 12 years ago Jelmer Vernooij Drop support for testtools, instead depend on pyth 1018 bytes Diff Download File
Makefile 1001 12 years ago Jelmer Vernooij Add 'make check-tutorial'. 850 bytes Diff Download File
MANIFEST.in 137 15 years ago Jelmer Vernooij Add manifest file to include some more docs. 87 bytes Diff Download File
NEWS 1022 12 years ago Jelmer Vernooij Merge support for only negotiating capabilities th 19.1 KB Diff Download File
README 977 12 years ago Jelmer Vernooij Add documentation links. 778 bytes Diff Download File
File setup.py 1016 12 years ago Jelmer Vernooij Open 0.8.4. 2.7 KB Diff Download File