tests/svnurlof.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sun, 14 Apr 2024 02:41:36 +0200
changeset 51616 ecf4b959fa74
parent 48966 6000f5b25c9b
permissions -rw-r--r--
perf: start recording total time after warming The warming might be costly and this should not affect the "time profile" of the actual collection.

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)