Mercurial > hg
annotate tests/svnurlof.py @ 42816:fb84730d1c5a
run-tests: error out on `--local --with-[c]hg`
I don't see much reason to allow these combinations. You could use
--local and override only one of --with-hg or --with-chg, but I don't
see much practical use for that. It would be easy to work around
anyway by passing both --with-hg and --with-chg. By erroring out, it
makes the code a bit easier to reason about to allow the next few
patches.
Differential Revision: https://phab.mercurial-scm.org/D6759
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 23 Aug 2019 08:46:49 -0700 |
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) |