view tests/svnurlof.py @ 51187:8c4e8d06432e

rust-mixed-index: move the mmap keepalive into a function The same code will be used for keeping the new index mmap around.
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 29 Jun 2023 16:09:57 +0200
parents 6000f5b25c9b
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)