Changeset 7a597e664642…
Parent 311f5c0941eb…
by
Changes to 2 files · Browse files at 7a597e664642 Showing diff from parent 311f5c0941eb Diff from another changeset...
@@ -191,14 +191,6 @@ sha = graphwalker.next()
return haves
- def get_graph_walker(self, heads):
- """Obtain a graph walker for this object store.
-
- :param heads: Local heads to start search with
- :return: GraphWalker object
- """
- return ObjectStoreGraphWalker(heads, lambda sha: self[sha].parents)
-
def generate_pack_contents(self, have, want, progress=None):
"""Iterate over the contents of a pack file.
|
@@ -215,8 +215,7 @@ """
if heads is None:
heads = self.refs.as_dict('refs/heads').values()
- return ObjectStoreGraphWalker(
- heads, lambda sha: self.object_store[sha].parents)
+ return ObjectStoreGraphWalker(heads, self.get_parents)
def ref(self, name):
"""Return the SHA1 a ref is pointing to.
@@ -270,7 +269,8 @@ :param sha: SHA of the commit for which to retrieve the parents
:return: List of parents
"""
- return self.commit(sha).parents
+ # TODO: Lookup grafts as well
+ return self.object_store[sha].parents
def get_config(self):
"""Retrieve the config object.
|
Loading...