|
@@ -37,7 +37,6 @@ from dulwich.object_store import (
|
|
|
MemoryObjectStore,
|
|
|
)
|
|
|
from dulwich.objects import (
|
|
|
- Blob,
|
|
|
hex_to_sha,
|
|
|
sha_to_hex,
|
|
|
Commit,
|
|
@@ -47,7 +46,6 @@ from dulwich.objects import (
|
|
|
from dulwich.pack import (
|
|
|
OFS_DELTA,
|
|
|
REF_DELTA,
|
|
|
- DELTA_TYPES,
|
|
|
MemoryPackIndex,
|
|
|
Pack,
|
|
|
PackData,
|
|
@@ -60,7 +58,6 @@ from dulwich.pack import (
|
|
|
write_pack_header,
|
|
|
write_pack_index_v1,
|
|
|
write_pack_index_v2,
|
|
|
- SHA1Writer,
|
|
|
write_pack_object,
|
|
|
write_pack,
|
|
|
unpack_object,
|
|
@@ -187,7 +184,7 @@ class TestPackData(PackTests):
|
|
|
"""Tests getting the data from the packfile."""
|
|
|
|
|
|
def test_create_pack(self):
|
|
|
- p = self.get_pack_data(pack1_sha)
|
|
|
+ self.get_pack_data(pack1_sha)
|
|
|
|
|
|
def test_from_file(self):
|
|
|
path = os.path.join(self.datadir, 'pack-%s.pack' % pack1_sha)
|
|
@@ -408,7 +405,7 @@ class TestPack(PackTests):
|
|
|
self.assertRaises(ChecksumMismatch, lambda:
|
|
|
bad_pack.check_length_and_checksum())
|
|
|
|
|
|
- def test_iterobjects(self):
|
|
|
+ def test_iterobjects_2(self):
|
|
|
p = self.get_pack(pack1_sha)
|
|
|
objs = dict((o.id, o) for o in p.iterobjects())
|
|
|
self.assertEqual(3, len(objs))
|
|
@@ -490,7 +487,6 @@ class WritePackTests(TestCase):
|
|
|
|
|
|
f.write('x') # unpack_object needs extra trailing data.
|
|
|
f.seek(offset)
|
|
|
- comp_len = len(f.getvalue()) - offset - 1
|
|
|
unpacked, unused = unpack_object(f.read, compute_crc32=True)
|
|
|
self.assertEqual(Blob.type_num, unpacked.pack_type_num)
|
|
|
self.assertEqual(Blob.type_num, unpacked.obj_type_num)
|
|
@@ -998,7 +994,7 @@ class DeltaChainIteratorTests(TestCase):
|
|
|
def test_bad_ext_ref_non_thin_pack(self):
|
|
|
blob, = self.store_blobs(['blob'])
|
|
|
f = BytesIO()
|
|
|
- entries = build_pack(f, [(REF_DELTA, (blob.id, 'blob1'))],
|
|
|
+ build_pack(f, [(REF_DELTA, (blob.id, 'blob1'))],
|
|
|
store=self.store)
|
|
|
pack_iter = self.make_pack_iter(f, thin=False)
|
|
|
try:
|
|
@@ -1010,7 +1006,7 @@ class DeltaChainIteratorTests(TestCase):
|
|
|
def test_bad_ext_ref_thin_pack(self):
|
|
|
b1, b2, b3 = self.store_blobs(['foo', 'bar', 'baz'])
|
|
|
f = BytesIO()
|
|
|
- entries = build_pack(f, [
|
|
|
+ build_pack(f, [
|
|
|
(REF_DELTA, (1, 'foo99')),
|
|
|
(REF_DELTA, (b1.id, 'foo1')),
|
|
|
(REF_DELTA, (b2.id, 'bar2')),
|