Mercurial > hg
annotate tests/svnurlof.py @ 41844:2105ed01c431
tests: make test-status.t compatible with test-check-module-imports.t
Otherwise the later fails on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D6072
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 05 Mar 2019 04:32:23 +0530 |
parents | eb6700e6c5ea |
children | 2372284d9457 |
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 |
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 |
eb6700e6c5ea
tests: make and use a new `svnurlof.py` helper for constructing svn urls
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
17 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
|
18 main(sys.argv) |