def _collect_filetree_revs(obj_store, tree_sha, kset):
 filetree = obj_store[tree_sha]
 for (name, mode, sha) in filetree.iteritems():
  if ((not S_ISGITLINK(mode)) and (sha not in kset)):
   kset.add(sha)
   if stat.S_ISDIR(mode):
    _collect_filetree_revs(obj_store, sha, kset)

def _collect_filetree_revs ( obj_store , tree_sha , kset ) : filetree = obj_store [ tree_sha ] for ( name , mode , sha ) in filetree . iteritems ( ) : if ( ( not S_ISGITLINK ( mode ) ) and ( sha not in kset ) ) : kset . add ( sha ) if stat . S_ISDIR ( mode ) : _collect_filetree_revs ( obj_store , sha , kset )
collect sha1s of files and directories for specified tree .