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

Add simple lookup function to Tree.

Changeset 5b199401b304

Parent a5d0b8f18b40

by Jelmer Vernooij

Changes to one file · Browse files at 5b199401b304 Showing diff from parent a5d0b8f18b40 Diff from another changeset...

 
344
345
346
 
 
 
 
 
 
347
348
349
 
344
345
346
347
348
349
350
351
352
353
354
355
@@ -344,6 +344,12 @@
  """Return a list of tuples describing the tree entries"""   return self._entries   + def __getitem__(self, name): + for mode, entry, hexsha in self.entries(): + if entry == name: + return mode, hexsha + raise KeyError(name) +   def _parse_text(self):   """Grab the entries in the tree"""   count = 0