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
1=== modified file 'fetch.py'
2--- fetch.py 2012-03-11 15:08:14 +0000
3+++ fetch.py 2014-05-05 18:26:08 +0000
4@@ -25,6 +25,7 @@
5 ZERO_SHA,
6 )
7 from dulwich.object_store import (
8+ ObjectStoreGraphWalker,
9 tree_lookup_path,
10 )
11 from dulwich.walk import Walker
12@@ -702,8 +703,9 @@
13 store.lock_write()
14 try:
15 heads = self.get_target_heads()
16- graph_walker = store.get_graph_walker(
17- [store._lookup_revision_sha1(head) for head in heads])
18+ graph_walker = ObjectStoreGraphWalker(
19+ [store._lookup_revision_sha1(head) for head in heads],
20+ lambda sha: store[sha].parents)
21 wants_recorder = DetermineWantsRecorder(determine_wants)
22
23 pb = ui.ui_factory.nested_progress_bar()
24
25=== modified file 'tests/test_transportgit.py'
26--- tests/test_transportgit.py 2010-12-25 01:23:48 +0000
27+++ tests/test_transportgit.py 2014-05-05 18:26:08 +0000
28@@ -18,7 +18,7 @@
29
30
31 from dulwich.tests.test_object_store import PackBasedObjectStoreTests
32-from dulwich.tests.test_repository import RefsContainerTests
33+from dulwich.tests.test_refs import RefsContainerTests
34
35 from bzrlib.tests import TestCaseWithTransport
36

Subscribers

People subscribed via source and target branches

to all changes: