tests/svnurlof.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 13 Dec 2022 16:29:30 +0100
changeset 50089 7e71d878c708
parent 48966 6000f5b25c9b
permissions -rw-r--r--
dirstate: use `dirstate.change_files` to scope the change in `remove` This is the way.

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)