tests/svnurlof.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 25 Sep 2023 12:37:52 +0200
changeset 51015 812cd3dfa4cb
parent 48875 6000f5b25c9b
permissions -rw-r--r--
verify: keep the revlog open for reading while verifying it This is more explicit. No performances difference were observed.

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)