tests/svnurlof.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Sep 2022 15:49:14 +0200
branchstable
changeset 49469 b5c8524827d2
parent 48875 6000f5b25c9b
permissions -rw-r--r--
dirstate-v2: no longer register the data-file during transaction If the data file change during the transaction, we cannot truncate it. The content of the file itself is fine as it will get backed up at the same time as the docket. Leaving the trailing data at the end of failed transaction is fine. The dirstate-v2 format supports it. The dead data will simply we written over if necessary.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41480
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
import sys
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
from mercurial import (
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
    pycompat,
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
    util,
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
)
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 41480
diff changeset
     8
41480
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
     9
def main(argv):
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
    enc = util.urlreq.quote(pycompat.sysbytes(argv[1]))
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    11
    if pycompat.iswindows:
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
        fmt = 'file:///%s'
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
    else:
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    14
        fmt = 'file://%s'
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    15
    print(fmt % pycompat.sysstr(enc))
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    16
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 41480
diff changeset
    17
41480
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    18
if __name__ == '__main__':
eb6700e6c5ea tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff changeset
    19
    main(sys.argv)