def _walk_tree(store, tree, root=''):
 for entry in tree.iteritems():
  entry_abspath = posixpath.join(root, entry.path)
  if stat.S_ISDIR(entry.mode):
   for _ in _walk_tree(store, store[entry.sha], entry_abspath):
    (yield _)
  else:
   (yield (entry_abspath, entry))

def _walk_tree ( store , tree , root = '' ) : for entry in tree . iteritems ( ) : entry_abspath = posixpath . join ( root , entry . path ) if stat . S_ISDIR ( entry . mode ) : for _ in _walk_tree ( store , store [ entry . sha ] , entry_abspath ) : ( yield _ ) else : ( yield ( entry_abspath , entry ) )
recursively walk a dulwich tree .