#NEWLINE# def convert_tree( repo_key , repo , tree , recursive = False ) : #NEWLINE# #INDENT# entry_list = _tree_entries ( repo_key , repo , tree , recursive = recursive ) #NEWLINE# entry_list . sort ( key = ( lambda entry : entry [ 'path' ] ) ) #NEWLINE# return { #NEWLINE# #INDENT# 'url' : url_for ( 'plumbing.get_tree' , _external = True , repo_key = repo_key , sha = unicode ( tree . id ) ) , #NEWLINE# 'sha' : unicode ( tree . id ) , #NEWLINE# 'tree' : entry_list , #NEWLINE# #UNINDENT# }