tests/svnurlof.py
author Gregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Feb 2022 11:57:59 -0700
changeset 48856 078e1e1cc7da
parent 43076 2372284d9457
child 48875 6000f5b25c9b
permissions -rw-r--r--
tests: require Python 3.5+ in run-tests.py We change the version check logic to hard fail if running on <= 3.5.0. The branch for <3.5 has been deleted. And the >=3.5 branch block has been dedented. Differential Revision: https://phab.mercurial-scm.org/D12234

from __future__ import absolute_import, print_function
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)