tests/svnurlof.py
author Matt Harbison <matt_harbison@yahoo.com>
Tue, 21 Feb 2023 13:26:07 -0500
changeset 50176 829aa604d71a
parent 48875 6000f5b25c9b
permissions -rw-r--r--
typing: add the return type hint to pycompat.rangelist() Not bothering with the args, because there are a few overloads and only 2 callers in the codebase, one of which is a test.

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)