tests/svnurlof.py
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 26 Apr 2024 19:10:35 +0100
changeset 51626 865efc020c33
parent 48875 6000f5b25c9b
permissions -rw-r--r--
dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior.
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)