Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master-1, master-0, and 0.9.4

Pass lookup function into tree_lookup_path rather than dictionary-like object.

Changeset 19f62181a34c

Parent ca3718651ec6

by Jelmer Vernooij

Changes to one file · Browse files at 19f62181a34c Showing diff from parent ca3718651ec6 Diff from another changeset...

 
288
289
290
291
 
292
293
294
295
 
296
297
298
299
300
301
 
 
288
289
290
 
291
292
293
294
 
295
296
297
298
299
300
 
301
@@ -288,14 +288,14 @@
  return len(list(self.itershas()))     -def tree_lookup_path(object_store, root_sha, path): +def tree_lookup_path(lookup_obj, root_sha, path):   parts = path.split("/")   sha = root_sha   for p in parts: - obj = object_store[sha] + obj = lookup_obj(sha)   if type(obj) is not Tree:   raise NotTreeError(sha)   if p == '':   continue   mode, sha = obj[p] - return object_store[sha] + return lookup_obj(sha)