Merge lp:~wgrant/bzr-git/dulwich-0.9.6 into lp:bzr-git

Proposed by William Grant
Status: Merged
Merged at revision: 1630
Proposed branch: lp:~wgrant/bzr-git/dulwich-0.9.6
Merge into: lp:bzr-git
Diff against target: 162 lines (+43/-11)
6 files modified
NEWS (+2/-0)
fetch.py (+4/-2)
info.py (+1/-1)
tests/test_fetch.py (+1/-1)
tests/test_transportgit.py (+19/-1)
transportgit.py (+16/-6)
To merge this branch: bzr merge lp:~wgrant/bzr-git/dulwich-0.9.6
Reviewer Review Type Date Requested Status
Richard Wilbur Approve
Review via email: mp+258714@code.launchpad.net
To post a comment you must log in.
lp:~wgrant/bzr-git/dulwich-0.9.6 updated
1635. By William Grant

Fix test_tagged_tree to not create a non-integral tag timestamp.

Revision history for this message
Richard Wilbur (richard-wilbur) wrote :

Thanks, William, for updating bzr-git.
+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2013-09-22 21:28:04 +0000
+++ NEWS 2015-05-10 00:53:31 +0000
@@ -5,6 +5,8 @@
5 * "Support" empty repositories; print an appropriate error.5 * "Support" empty repositories; print an appropriate error.
6 (Jelmer Vernooij, #1219424)6 (Jelmer Vernooij, #1219424)
77
8 * Fix compatibility with and depend on dulwich 0.9.6. (William Grant)
9
80.6.12 2013-09-22100.6.12 2013-09-22
911
10 FEATURES12 FEATURES
1113
=== modified file 'fetch.py'
--- fetch.py 2012-03-11 15:08:14 +0000
+++ fetch.py 2015-05-10 00:53:31 +0000
@@ -25,6 +25,7 @@
25 ZERO_SHA,25 ZERO_SHA,
26 )26 )
27from dulwich.object_store import (27from dulwich.object_store import (
28 ObjectStoreGraphWalker,
28 tree_lookup_path,29 tree_lookup_path,
29 )30 )
30from dulwich.walk import Walker31from dulwich.walk import Walker
@@ -702,8 +703,9 @@
702 store.lock_write()703 store.lock_write()
703 try:704 try:
704 heads = self.get_target_heads()705 heads = self.get_target_heads()
705 graph_walker = store.get_graph_walker(706 graph_walker = ObjectStoreGraphWalker(
706 [store._lookup_revision_sha1(head) for head in heads])707 [store._lookup_revision_sha1(head) for head in heads],
708 store)
707 wants_recorder = DetermineWantsRecorder(determine_wants)709 wants_recorder = DetermineWantsRecorder(determine_wants)
708710
709 pb = ui.ui_factory.nested_progress_bar()711 pb = ui.ui_factory.nested_progress_bar()
710712
=== modified file 'info.py'
--- info.py 2013-09-22 21:15:30 +0000
+++ info.py 2015-05-10 00:53:31 +0000
@@ -2,7 +2,7 @@
22
3bzr_plugin_name = "git"3bzr_plugin_name = "git"
44
5dulwich_minimum_version = (0, 9, 1)5dulwich_minimum_version = (0, 9, 6)
66
7# versions ending in 'exp' mean experimental mappings7# versions ending in 'exp' mean experimental mappings
8# versions ending in 'dev' mean development version8# versions ending in 'dev' mean development version
99
=== modified file 'tests/test_fetch.py'
--- tests/test_fetch.py 2011-10-10 12:02:14 +0000
+++ tests/test_fetch.py 2015-05-10 00:53:31 +0000
@@ -297,7 +297,7 @@
297 gitsha = marks[mark]297 gitsha = marks[mark]
298 tag = Tag()298 tag = Tag()
299 tag.name = "sometag"299 tag.name = "sometag"
300 tag.tag_time = time.time()300 tag.tag_time = int(time.time())
301 tag.tag_timezone = 0301 tag.tag_timezone = 0
302 tag.tagger = "Somebody <somebody@example.com>"302 tag.tagger = "Somebody <somebody@example.com>"
303 tag.message = "Created tag pointed at tree"303 tag.message = "Created tag pointed at tree"
304304
=== modified file 'tests/test_transportgit.py'
--- tests/test_transportgit.py 2010-12-25 01:23:48 +0000
+++ tests/test_transportgit.py 2015-05-10 00:53:31 +0000
@@ -17,8 +17,10 @@
17"""Tests for bzr-git's object store."""17"""Tests for bzr-git's object store."""
1818
1919
20from dulwich.objects import Blob
20from dulwich.tests.test_object_store import PackBasedObjectStoreTests21from dulwich.tests.test_object_store import PackBasedObjectStoreTests
21from dulwich.tests.test_repository import RefsContainerTests22from dulwich.tests.test_refs import RefsContainerTests
23from dulwich.tests.utils import make_object
2224
23from bzrlib.tests import TestCaseWithTransport25from bzrlib.tests import TestCaseWithTransport
2426
@@ -35,6 +37,22 @@
35 PackBasedObjectStoreTests.tearDown(self)37 PackBasedObjectStoreTests.tearDown(self)
36 TestCaseWithTransport.tearDown(self)38 TestCaseWithTransport.tearDown(self)
3739
40 def test_remembers_packs(self):
41 self.store.add_object(make_object(Blob, data="data"))
42 self.assertEqual(0, len(self.store.packs))
43 self.store.pack_loose_objects()
44 self.assertEqual(1, len(self.store.packs))
45
46 # Packing a second object creates a second pack.
47 self.store.add_object(make_object(Blob, data="more data"))
48 self.store.pack_loose_objects()
49 self.assertEqual(2, len(self.store.packs))
50
51 # If we reopen the store, it reloads both packs.
52 restore = TransportObjectStore(self.get_transport())
53 self.assertEqual(2, len(restore.packs))
54
55
38# FIXME: Unfortunately RefsContainerTests requires on a specific set of refs existing.56# FIXME: Unfortunately RefsContainerTests requires on a specific set of refs existing.
3957
40# class TransportRefContainerTests(RefsContainerTests, TestCaseWithTransport):58# class TransportRefContainerTests(RefsContainerTests, TestCaseWithTransport):
4159
=== modified file 'transportgit.py'
--- transportgit.py 2013-09-22 21:14:37 +0000
+++ transportgit.py 2015-05-10 00:53:31 +0000
@@ -411,9 +411,6 @@
411 def __repr__(self):411 def __repr__(self):
412 return "%s(%r)" % (self.__class__.__name__, self.transport)412 return "%s(%r)" % (self.__class__.__name__, self.transport)
413413
414 def _pack_cache_stale(self):
415 return False # FIXME
416
417 @property414 @property
418 def alternates(self):415 def alternates(self):
419 if self._alternates is not None:416 if self._alternates is not None:
@@ -442,6 +439,17 @@
442 finally:439 finally:
443 f.close()440 f.close()
444441
442 @property
443 def packs(self):
444 # FIXME: Never invalidates.
445 if not self._pack_cache:
446 self._update_pack_cache()
447 return self._pack_cache.values()
448
449 def _update_pack_cache(self):
450 for pack in self._load_packs():
451 self._pack_cache[pack._basename] = pack
452
445 def _pack_names(self):453 def _pack_names(self):
446 try:454 try:
447 f = self.transport.get('info/packs')455 f = self.transport.get('info/packs')
@@ -475,6 +483,7 @@
475 idxname = name.replace(".pack", ".idx")483 idxname = name.replace(".pack", ".idx")
476 idx = load_pack_index_file(idxname, self.pack_transport.get(idxname))484 idx = load_pack_index_file(idxname, self.pack_transport.get(idxname))
477 pack = Pack.from_objects(pd, idx)485 pack = Pack.from_objects(pd, idx)
486 pack._basename = idxname[:-5]
478 ret.append(pack)487 ret.append(pack)
479 return ret488 return ret
480489
@@ -536,7 +545,7 @@
536 idxfile = self.pack_transport.get(basename + ".idx")545 idxfile = self.pack_transport.get(basename + ".idx")
537 idx = load_pack_index_file(basename+".idx", idxfile)546 idx = load_pack_index_file(basename+".idx", idxfile)
538 final_pack = Pack.from_objects(p, idx)547 final_pack = Pack.from_objects(p, idx)
539 self._add_known_pack(final_pack)548 self._add_known_pack(basename, final_pack)
540 return final_pack549 return final_pack
541550
542 def add_thin_pack(self):551 def add_thin_pack(self):
@@ -582,8 +591,9 @@
582 write_pack_index_v2(idxfile, data.sorted_entries(), data_sum)591 write_pack_index_v2(idxfile, data.sorted_entries(), data_sum)
583 finally:592 finally:
584 idxfile.close()593 idxfile.close()
585 final_pack = Pack("pack-%s" % pack_sha)594 basename = "pack-%s" % pack_sha
586 self._add_known_pack(final_pack)595 final_pack = Pack(basename)
596 self._add_known_pack(basename, final_pack)
587 return final_pack597 return final_pack
588598
589 def add_pack(self):599 def add_pack(self):

Subscribers

People subscribed via source and target branches

to all changes: