Package trac :: Package versioncontrol :: Package web_ui :: Module util

Module util

source code

Classes
  content_closing
Functions
 
get_changes(repos, revs, log=None) source code
 
get_path_links(href, reponame, path, rev, order=None, desc=None) source code
 
get_existing_node(req, repos, path, rev) source code
 
get_allowed_node(repos, path, rev, perm) source code
 
make_log_graph(repos, revs)
Generate graph information for the given revisions.
source code
 
render_zip(req, filename, repos, root_node, iter_nodes)
Send a ZIP file containing the data corresponding to the nodes iterable.
source code
Function Details

make_log_graph(repos, revs)

source code 

Generate graph information for the given revisions.

Returns a tuple (threads, vertices, columns), where:

  • threads: List of paint command lists [(type, column, line)], where type is either 0 for "move to" or 1 for "line to", and column and line are coordinates.
  • vertices: List of (column, thread_index) tuples, where the i`th item specifies the column in which to draw the dot in line `i and the corresponding thread.
  • columns: Maximum width of the graph.

render_zip(req, filename, repos, root_node, iter_nodes)

source code 
Send a ZIP file containing the data corresponding to the nodes iterable.
Parameters:
  • root_node (~trac.versioncontrol.api.Node) - optional ancestor for all the nodes
  • iter_nodes - callable taking the optional root_node as input and generating the ~trac.versioncontrol.api.Node for which the content should be added into the zip.