Did I find the right examples for you? yes no

All Samples(6)  |  Call(5)  |  Derive(0)  |  Import(1)

src/c/s/cspace-HgSite-1.1/cspace/hgsite/site.py   cspace-HgSite(Download)
from mercurial.hgweb import common, webcommands, webutil
 
from .util import exists_in_wc, find_line_no, get_ext, guess_mimetype, \
                  hex_node, href_builder, http_date
 
def browse_href_builder(base, ctx):
    """Return a URL builder to link to repository files in the file browser."""
    node = ctx.hex() if ctx.node() is not None else node_prefix
    href = href_builder(base.rstrip('/') + '/file/' + node)
 
    # Add URL builders to the request object
    if node is None:
        req.href = href_builder(req.url)
    else:
        req.href = href_builder(req.url + node_prefix + node)
    req.rev_href = href_builder(req.url + node_prefix + hex_node(req.ctx))