Merge lp:~ace17/bzr-git/dulwich into lp:bzr-git

Proposed by Sebastien Alaiwan
Status: Merged
Approved by: Richard Wilbur
Approved revision: 1632
Merge reported by: Richard Wilbur
Merged at revision: not available
Proposed branch: lp:~ace17/bzr-git/dulwich
Merge into: lp:bzr-git
Diff against target: 35 lines (+5/-3)
2 files modified
fetch.py (+4/-2)
tests/test_transportgit.py (+1/-1)
To merge this branch: bzr merge lp:~ace17/bzr-git/dulwich
Reviewer Review Type Date Requested Status
Richard Wilbur already merged Approve
Review via email: mp+218313@code.launchpad.net

Description of the change

Allow to do a checkout when dulwich version is 0.9.5 (Debian testing).

To post a comment you must log in.
Revision history for this message
Sergei Golubchik (sergii) wrote :

This patch isn't quite correct. The old code in dulwich was

 def get_graph_walker(self, heads):
     return ObjectStoreGraphWalker(heads, lambda sha: self[sha].parents)

But this patch does

- graph_walker = store.get_graph_walker(list)
+ graph_walker = ObjectStoreGraphWalker(heads, list)

The correct replacement is

 graph_walker = ObjectStoreGraphWalker(
         [store._lookup_revision_sha1(head) for head in heads],
         lambda sha: store[sha].parents)

lp:~ace17/bzr-git/dulwich updated
1632. By Sebastien Alaiwan

Fix call to ObjectStoreGraphWalker

Revision history for this message
Sebastien Alaiwan (ace17) wrote :

> This patch isn't quite correct. The old code in dulwich was
>
> def get_graph_walker(self, heads):
> return ObjectStoreGraphWalker(heads, lambda sha: self[sha].parents)
>
> But this patch does
>
> - graph_walker = store.get_graph_walker(list)
> + graph_walker = ObjectStoreGraphWalker(heads, list)
>
> The correct replacement is
>
> graph_walker = ObjectStoreGraphWalker(
> [store._lookup_revision_sha1(head) for head in heads],
> lambda sha: store[sha].parents)
Done, thanks for your feedback!

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

Thanks Sebastien for the good work updating bzr-git to work with changes in dulwich! Unfortunately I got to this merge request too slowly and the changes you proposed have already been merged on other branches.

I'm disapproving this merge request as I don't have the option to mark it 'Superseded'.

I look forward to your next contribution, which I will try to move on more quickly.

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

On the other hand, I guess I could just as easily mark this 'Approved' since all the changes have been approved and 'Merged' since they have already been merge.

review: Approve (already merged)
Revision history for this message
Sebastien Alaiwan (ace17) wrote :

Nice to learn git checkouts are going to work again! :-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'fetch.py'
--- fetch.py 2012-03-11 15:08:14 +0000
+++ fetch.py 2014-05-05 18:26:08 +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 lambda sha: store[sha].parents)
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 'tests/test_transportgit.py'
--- tests/test_transportgit.py 2010-12-25 01:23:48 +0000
+++ tests/test_transportgit.py 2014-05-05 18:26:08 +0000
@@ -18,7 +18,7 @@
1818
1919
20from dulwich.tests.test_object_store import PackBasedObjectStoreTests20from dulwich.tests.test_object_store import PackBasedObjectStoreTests
21from dulwich.tests.test_repository import RefsContainerTests21from dulwich.tests.test_refs import RefsContainerTests
2222
23from bzrlib.tests import TestCaseWithTransport23from bzrlib.tests import TestCaseWithTransport
2424

Subscribers

People subscribed via source and target branches

to all changes: