tests/svnurlof.py
author Raphaël Gomès <rgomes@octobus.net>
Mon, 24 Oct 2022 15:32:14 +0200
branchstable
changeset 49527 a3356ab610fc
parent 48875 6000f5b25c9b
permissions -rw-r--r--
branching: merge default into stable This marks the feature freeze for the 6.3 release

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)