Mercurial > hg
annotate tests/svnurlof.py @ 49244:cd51d4957b28
branching: merge stable into default
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Thu, 02 Jun 2022 16:24:06 +0200 |
parents | 6000f5b25c9b |
children |
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 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) |