Mercurial > hg
annotate tests/svnurlof.py @ 43401:09537caa87f9 stable
py3: add Python 3 exception output to test-lfs-serve-access.t
Similar to a973a75e92bf or 3e9c6cef949b.
author | Denis Laxalde <denis@laxalde.org> |
---|---|
date | Mon, 04 Nov 2019 16:04:09 +0100 |
parents | 2372284d9457 |
children | 6000f5b25c9b |
rev | line source |
---|---|
41480
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 from __future__ import absolute_import, print_function |
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 import sys |
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
3 |
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
4 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
|
5 pycompat, |
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
6 util, |
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 ) |
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41480
diff
changeset
|
9 |
41480
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 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
|
11 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
|
12 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
|
13 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
|
14 else: |
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 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
|
16 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
|
17 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41480
diff
changeset
|
18 |
41480
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
19 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
|
20 main(sys.argv) |