tests/svnurlof.py
author Raphaël Gomès <rgomes@octobus.net>
Mon, 18 Jul 2022 17:25:49 +0200
changeset 49482 5fbdd88824dc
parent 48875 6000f5b25c9b
permissions -rw-r--r--
rust-filepatterns: allow overriding default syntax This will be used when parsing pattern files other than .hgignore like the sparse spec.

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)