tests/svnurlof.py
author Julien Cristau <jcristau@debian.org>
Mon, 14 Oct 2024 16:46:25 +0200
branchstable
changeset 51696 cd788962c6d9
parent 48966 6000f5b25c9b
permissions -rw-r--r--
tests: use shlex.quote instead of pipes.quote The pipes module got removed in python 3.13. https://bugs.debian.org/1084553

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)