view tests/svnurlof.py @ 48875:6000f5b25c9b

py2: remove simple from __future__ statements These were needed for Python 2 support. Now that our linter no longer mandates these, we can start deleting them. Differential Revision: https://phab.mercurial-scm.org/D12254
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 03 Mar 2022 17:34:00 +0100
parents 2372284d9457
children
line wrap: on
line source

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)