tests/svnurlof.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 09 Apr 2024 14:37:24 +0200
changeset 51599 9b51a4fb0f96
parent 48966 6000f5b25c9b
permissions -rw-r--r--
bundlespec: type the _bundlespeccontentopts dictionary If only we had a tool to detect the kind of stupid error we just fixed… ho wait.

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)