tests/svnurlof.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 13 Mar 2024 11:34:21 +0100
changeset 51596 6378d57562af
parent 48875 6000f5b25c9b
permissions -rw-r--r--
tags-cache: add a dedicated warm cache function to hgtagsfnodescache Having a dedicated API point will help to optimize that specific usage. Right doing a full phases weam takes a long time, even when the cache is already filled.

import sys

from mercurial import (
    pycompat,
    util,
)


def main(argv):
    enc = util.urlreq.quote(pycompat.sysbytes(argv[1]))
    if pycompat.iswindows:
        fmt = 'file:///%s'
    else:
        fmt = 'file://%s'
    print(fmt % pycompat.sysstr(enc))


if __name__ == '__main__':
    main(sys.argv)