DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (a41a482b7876)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
from urlparse import urlunsplit


def makeReleasesDir(product, version=None, protocol=None, server=None,
                    ftp_root='/pub/'):
    if protocol:
        assert server is not None, "server is required with protocol"

    directory = '%s%s/releases/' % (ftp_root, product)
    if version:
        directory += '%s/' % version

    if protocol:
        return urlunsplit((protocol, server, directory, None, None))
    else:
        return directory