Commit Graph

275 Commits

Author SHA1 Message Date
Pulkit Goyal
d06862e5b0 tests: make test-symlink-os-yes-fs-no use absolute_import 2016-04-14 00:58:31 +05:30
Pulkit Goyal
356cc5f1db tests: make test-ui-color use absolute_import 2016-04-14 00:56:08 +05:30
Pulkit Goyal
9a264b103c tests: make test-url use absolute_import 2016-04-14 00:53:35 +05:30
Pulkit Goyal
05677e56ec tests: make test-trusted use absolute_import 2016-04-14 00:49:58 +05:30
timeless
109fcbc79e pycompat: switch to util.urlreq/util.urlerr for py3 compat 2016-04-06 23:22:12 +00:00
timeless
f77cdcd3b1 pycompat: switch to util.stringio for py3 compat 2016-04-10 20:55:37 +00:00
timeless
85b96c6915 scmutil: use util.queue/util.empty for py3 compat 2016-04-06 20:07:51 +00:00
Robert Stanca
d5c8907a91 py3: use print_function in test-status-inprocess.py 2016-04-04 05:20:40 +03:00
Robert Stanca
b652d5efc0 py3: use absolute_import in test-status-inprocess.py 2016-04-04 05:19:35 +03:00
Robert Stanca
ec43026736 py3: use print_function in test-revlog-ancestry.py 2016-04-04 05:10:11 +03:00
Robert Stanca
a5acb646f6 py3: use absolute_import in test-revlog-ancestry.py 2016-04-04 05:09:24 +03:00
Robert Stanca
09fc340580 py3: use print_function in test-propertycache.py 2016-04-04 04:56:05 +03:00
Robert Stanca
6fd5d912b0 py3: use absolute_import in test-propertycache.py 2016-04-04 03:16:18 +03:00
Robert Stanca
3aa8a31da8 py3: use print_function in test-parseindex2.py 2016-04-04 03:14:16 +03:00
Robert Stanca
ceb4fa2343 py3: use absolute_import in test-parseindex2.py 2016-04-04 03:06:33 +03:00
Robert Stanca
528a3094ed py3: use print_function in test-minirst.py 2016-04-04 03:04:08 +03:00
Robert Stanca
2e474e497b py3: use absolute_import in test-minirst.py 2016-04-04 03:00:43 +03:00
Robert Stanca
6c104cf6cf py3: use print_function in test-hybridencode.py 2016-04-04 02:58:53 +03:00
Robert Stanca
f22cc3112f py3: use absolute_import in test-hybridencode.py 2016-04-04 01:33:08 +03:00
Robert Stanca
fdf4685725 py3: use print_function in test-hgweb-auth.py 2016-04-04 01:31:21 +03:00
Robert Stanca
f4b616ccd9 py3: use absolute_import in test-hgweb-auth.py 2016-04-04 00:55:36 +03:00
Robert Stanca
cf5e54b0da py3: use print_function in test-hg-parseurl.py 2016-04-04 00:29:03 +03:00
Robert Stanca
9781192919 py3: use absolute_import in test-hg-parseurl.py 2016-04-04 00:27:04 +03:00
Robert Stanca
00572a2f9d py3: use print_function in test-filelog.py 2016-04-04 00:17:11 +03:00
Robert Stanca
46a8931c72 py3: use absolute_import in test-filelog.py 2016-04-03 17:10:12 +03:00
Robert Stanca
156e21e68a py3: use print_function in test-filecache.py 2016-04-03 17:06:40 +03:00
Robert Stanca
6efe830746 py3: use absolute_import in test-filecache.py 2016-04-03 17:01:07 +03:00
Robert Stanca
40e6626cfd py3: use print_function in test-duplicateoptions.py 2016-04-03 16:58:43 +03:00
Robert Stanca
fded95215a py3: use absolute_import in test-duplicateoptions.py 2016-04-03 16:56:15 +03:00
Robert Stanca
8680733411 py3: lexicographical order imports and print_function in test-context.py 2016-04-03 16:34:55 +03:00
Robert Stanca
f65be6478e py3: use absolute_import in test-context.py 2016-04-03 06:20:17 +03:00
Robert Stanca
4687d363df py3: use print_function in test-bdiff.py 2016-04-03 06:16:17 +03:00
Robert Stanca
f0f5c61f68 py3: use absolute_import in test-bdiff.py 2016-04-03 06:12:18 +03:00
Robert Stanca
e8fffac232 py3: use print_function in test-batching.py 2016-04-03 06:10:52 +03:00
Robert Stanca
7210c10a6d py3: use absolute_import in test-batching.py 2016-04-03 06:05:43 +03:00
Robert Stanca
fb029720ba py3: use print_function in silenttestrunner.py 2016-04-02 18:17:23 +03:00
Robert Stanca
61dfaca509 py3: use absolute_import in silenttestrunner.py 2016-04-02 18:16:12 +03:00
Robert Stanca
3fe2accfd7 py3: use print_function in hypothesishelpers.py 2016-04-02 18:15:04 +03:00
Robert Stanca
929a6451ae tests: use absolute_import in hypothesishelpers.py 2016-04-02 18:14:10 +03:00
Robert Stanca
f151e77de8 py3: use print_function in get-with-headers.py 2016-04-02 18:12:33 +03:00
Robert Stanca
26872f1dfd py3: use print_function in generate-working-copy-states.py 2016-04-02 17:36:59 +03:00
Robert Stanca
a51cbf4e77 py3: use print_function in filterpyflakes.py 2016-04-02 17:35:02 +03:00
Robert Stanca
3ab964e343 py3: use print_function in test-ancestor.py 2016-04-02 17:33:11 +03:00
Robert Stanca
118adb331f py3: use print_function in seq.py 2016-04-02 17:29:38 +03:00
Robert Stanca
e8ea25819f py3: use absolute_import in seq.py 2016-04-02 17:28:35 +03:00
timeless
14b03acded py3: use print_function in import-checker 2016-03-30 04:55:16 +00:00
timeless
9580d303e6 py3: use absolute_import in import-checker 2016-03-30 04:50:19 +00:00
FUJIWARA Katsunori
15ff9ca52f templatefilters: use templatefilter to mark a function as template filter
Using decorator can localize changes for adding (or removing) a
template filter function in source code.

This patch also removes leading ":FILTER:" part in help document of
each filters, because using templatefilter makes it useless.

This patch uses not 'filter' but 'templatefilter' as a decorator name,
because the former name hides Python built-in one, even though the
latter is a little redundant in 'templatefilters.py'.
2016-03-30 02:10:44 +09:00
Pulkit Goyal
b34b7bcc64 py3: make test-ui-color use print_function 2016-03-29 16:41:32 +05:30
Pulkit Goyal
45549ce716 py3: make test-ui-config use print_function 2016-03-29 16:38:27 +05:30
Pulkit Goyal
71fccc06f3 py3: make test-ui-config use absolute_import 2016-03-29 16:33:09 +05:30
Pulkit Goyal
de0aaa7281 py3: make test-ui-verbosity use absolute_import 2016-03-29 16:29:21 +05:30
Pulkit Goyal
c93c7768eb py3: make test-ui-verbosity use print_function 2016-03-29 16:27:01 +05:30
Pulkit Goyal
3bf3d96968 py3: make test-url use print_function 2016-03-29 16:23:40 +05:30
Pulkit Goyal
cc4d4c5afe py3: make test-walkrepo use print_function 2016-03-29 16:21:31 +05:30
Pulkit Goyal
74462a15a9 py3: make test-wireproto use print_function 2016-03-29 16:14:58 +05:30
timeless
00f06c8c06 py3: glob line numbers in test-check-py3-compat 2016-03-28 22:30:23 +00:00
Pulkit Goyal
9473cc11a7 tests: make tinyproxy.py use print_function 2016-03-28 01:57:44 +05:30
timeless
54523ab07e tests: glob py3 line numbers
Since not everyone is running py3.5 and code changes periodically,
avoid pinning line numbers for invalid syntax errors.
2016-03-28 03:40:30 +00:00
timeless
97d7b5a27f tests: update py3.5 output
745eb6bf6abd removed one item...
2016-03-28 03:35:08 +00:00
Gregory Szorc
ec4984dfe0 node: use byte literals to construct nullid and wdirid
Python 3's hex() insists on operating on bytes. This patch gives
it what it wants.

'' and b'' in Python 2 are equivalent, so this has no impact on
Python 2.
2016-03-12 14:04:57 -08:00
Gregory Szorc
671d581fbd tests: try to import modules with Python 3
All of mercurial.* is now using absolute_import. Most of
mercurial.* is able to ast parse with Python 3. The next big
hurdle is being able to import modules using Python 3.

This patch adds testing of hgext.* and mercurial.* module imports
in Python 3. As the new test output shows, most modules can't
import under Python 3. However, many of the failures are due
to a common problem in a highly imported module (e.g. the bytes vs
str issue in node.py).
2016-03-12 14:05:23 -08:00
Gregory Szorc
06a84c707a tests: perform an ast parse with Python 3
Previously, test-check-py3-compat.t parsed Python files with Python 2
and looked for known patterns that are incompatible with Python 3.

Now that we have a mechanism for invoking Python 3 interpreters from
tests, we can expand check-py3-compat.py and its corresponding .t
test to perform an additional AST parse using Python 3.

As the test output shows, we identify a number of new parse failures
on Python 3. There are some redundant warnings for missing parentheses
for the print function. Given the recent influx of patches around
fixing these, the redundancy shouldn't last for too long.
2016-03-18 16:15:12 -07:00
Pulkit Goyal
4650b402b2 contrib: revsetbenchmarks use absolute_import and print_function 2016-03-16 04:35:03 +05:30
Pulkit Goyal
ec9a9da094 contrib: synthrepo use absolute_import 2016-03-16 04:23:58 +05:30
Pulkit Goyal
5cf3296f5c contrib: python-hook-examples use absolute_import 2016-03-16 04:13:28 +05:30
Pulkit Goyal
17d5faaa79 contrib: make perf.py use absolute_import 2016-03-16 04:12:16 +05:30
Pulkit Goyal
37b8e88ad9 showstack: use absolute_import 2016-03-13 01:59:18 +05:30
Pulkit Goyal
edde19dc54 contrib: use absolute_import in win32/hgwebdir_wsgi.py 2016-03-14 14:12:13 +05:30
Pulkit Goyal
dd1cc9fd24 contrib: make memory.py use absolute_import 2016-03-13 01:32:42 +05:30
Pulkit Goyal
590ab61e6f check-code: use absolute_import and print_function 2016-03-13 01:08:39 +05:30
timeless
c63b17c586 transplant: use absolute_import 2016-03-01 04:53:43 +00:00
Pulkit Goyal
6eac74ace4 debugshell: use absolute_import 2016-03-06 03:19:08 +05:30
Pierre-Yves David
cc59112ca7 hgext: officially turn 'hgext' into a namespace package
Actually since Python 2.3, there is some way to turn top level package into
"namespace package" so that multiple subpackage installed in different part of
the path can still be imported transparently. This feature was previously
thought (at least by myself) to be only provided by some setuptool black magic.

Turning hgext into such namespace package allows third extensions to install
themselves inside the "hgext" namespace package to avoid polluting the global
python module namespace. They will now be able to do so without making it a pain
to use a Mercurial "installed" in a different way/location than these
extensions.

The only constrains is that the extension ship a 'hgext/__init__.py' containing
the same call to 'pkgutil.extend_path' and nothing else. This seems realistic.

The main question that remains is: should we introduce a dedicated namespace for
third party extension (hgext3rd?) to make a clearer distinction between what is
officially supported and what is not? If so, this will be introduced in a follow
up patch.
2016-02-27 12:56:26 +01:00
Martijn Pieters
64a4b2e8cf fsmonitor: dependencies for new experimental extension
In preparation for the filesystem monitor extension, include the pywatchman
library. The fbmonitor extension relies on this library to communicate with
the Watchman service. The library is BSD licensed and is taken from
https://github.com/facebook/watchman/tree/master/python.

This package has not been updated to mercurial code standards.
2016-03-02 16:25:12 +00:00
timeless
2194aed867 win32mbcs: use absolute_import 2016-03-02 21:50:35 +00:00
timeless
78f32a823b notify: use absolute_import 2016-03-02 21:48:08 +00:00
timeless
3d3cc1c01c patchbomb: use absolute_import 2016-03-02 21:42:42 +00:00
timeless
0d9e787fe4 convert: __init__ use absolute_import 2016-03-02 16:34:43 +00:00
timeless
798be7b824 convert: cvs use absolute_import 2016-03-02 16:41:35 +00:00
timeless
2ac9193926 convert: transport use absolute_import 2016-03-02 16:37:50 +00:00
timeless
4bcfa639ac convert: bzr use absolute_import 2016-03-02 16:32:52 +00:00
timeless
d982b75f31 convert: common use absolute_import 2016-03-02 16:26:35 +00:00
timeless
d9aed31d36 convert: convcmd use absolute_import 2016-03-02 16:23:28 +00:00
timeless
d35bed319b convert: subversion use absolute_import 2016-03-02 16:13:05 +00:00
timeless
8a88474c92 tests: test-dispatch use print_function 2016-03-08 20:57:40 +00:00
timeless
e113808b95 tests: test-dispatch use absolute_import 2016-03-08 20:57:15 +00:00
Gregory Szorc
443b14a872 contrib: remove references to 2to3
The custom porting fixers are removed. A comment related to 2to3
has been removed from the import checker.

After this patch, no references to 2to3 remain.
2016-02-27 21:15:16 -08:00
timeless
8f60984480 purge: use absolute_import 2016-03-02 21:39:55 +00:00
timeless
9df52ee9f1 record: use absolute_import 2016-03-02 21:38:32 +00:00
timeless
37728f6a24 relink: use absolute_import 2016-03-02 21:36:14 +00:00
timeless
bf3fcbb8c7 schemas: use absolute_import 2016-03-02 21:33:55 +00:00
timeless
067d78e42f shelve: use absolute_import 2016-03-02 21:30:51 +00:00
timeless
fe1b5c51ca strip: use absolute_import 2016-03-02 21:26:36 +00:00
timeless
6a754bf667 convert: monotone use absolute_import 2016-03-02 15:50:34 +00:00
timeless
d22428de9f convert: p4 use absolute_import 2016-03-02 15:31:15 +00:00
timeless
9b1f5043ce convert: hg use absolute_import 2016-03-02 15:26:49 +00:00
timeless
de2d02e8b7 convert: cvsps use absolute_import 2016-03-02 14:56:29 +00:00
timeless
96ac5cd883 convert: darcs use absolute_import 2016-03-02 14:23:23 +00:00
timeless
86b7c93478 convert: filemap use absolute_import 2016-03-02 09:00:58 +00:00
timeless
81c64e649e convert: gnuarch use absolute_import 2016-03-02 08:58:01 +00:00
timeless
65e468cce9 convert: git use absolute_import 2016-03-02 20:42:13 +00:00
Pulkit Goyal
bc36832277 hgclient: use absolute_import and print_function 2016-03-06 03:15:45 +05:30
Pulkit Goyal
df7262ef1e fixpax: use absolute_import and print_function 2016-03-06 03:10:17 +05:30
Pulkit Goyal
2f8a8e257d debugcmdserver: use absolute_import and print_function 2016-03-06 03:06:09 +05:30
Pulkit Goyal
72963156f8 check-config: use absolute_import and print_function 2016-03-06 03:01:46 +05:30
Pulkit Goyal
7790f458a6 casesmash: use absolute_import 2016-03-06 02:25:50 +05:30
Gregory Szorc
14f5317aad commands: use absolute_import
All mercurial.* modules are now using absolute_import \o/
2015-12-21 22:26:31 -08:00
Gregory Szorc
330e05f22b cmdutil: use absolute_import
Now that @command doesn't write back into commands when it is being
executed during the loading of commands.py itself, we are unblocked
from converting cmdutil to absolute_import.
2016-02-27 23:57:07 -08:00
Christian Ebert
929efdce88 keyword: use absolute_import 2016-03-01 10:33:06 +00:00
Augie Fackler
e5e6b47d65 pager: use absolute_import 2016-02-28 22:15:00 -05:00
timeless
c202bff77a zeroconf: use absolute_import 2016-03-01 08:42:46 +00:00
timeless
1f9922ecf6 zeroconf: use print function 2016-03-01 07:17:32 +00:00
Gregory Szorc
44166bddc4 clonebundles: use absolute_import 2016-02-09 17:51:44 -08:00
Gregory Szorc
e3a6f51297 churn: use absolute_import 2016-02-09 17:50:45 -08:00
Gregory Szorc
2679f2b06a children: use absolute_import 2016-02-09 17:34:32 -08:00
Gregory Szorc
e63b301993 censor: use absolute_import 2016-02-09 17:33:10 -08:00
Gregory Szorc
6dc0d92138 bugzilla: use absolute_import 2016-02-09 17:31:50 -08:00
Gregory Szorc
7670e7605d blackbox: use absolute_import 2016-02-09 17:30:38 -08:00
Gregory Szorc
280f76fc24 acl: use absolute_import
Continuing the march towards Python 3.
2016-02-09 17:29:39 -08:00
Gregory Szorc
ade216b11a mail: use print function
We no longer use the print statement in mercurial.* \o/
2016-01-02 11:47:07 -08:00
Gregory Szorc
4d22c2ded4 lsprofcalltree: use print function
While I was here, some single element tuples have been removed in
favor of the shorter syntax. Some commented lines of code containing
print statements have also been removed because it was unclear what
purpose they served.
2016-01-02 11:45:29 -08:00
Gregory Szorc
742b6fa534 lsprof: use print function 2016-01-02 11:40:53 -08:00
Gregory Szorc
73c33b60d4 keepalive: use print function 2015-06-21 23:14:54 -07:00
Gregory Szorc
edf696301c dispatch: use print function
Python 3 doesn't have a print statement.
2015-06-21 21:45:41 -07:00
Augie Fackler
f19af9e9c4 httpclient: update to 938f2107d6e2 of httpplus
This enhances proxy support in httpclient a little bit, though I don't
know that we used that functionality at all. It also switches httpplus
to using absolute_import.
2015-12-31 13:19:20 -05:00
Gregory Szorc
9859c8fd09 exchange: use absolute_import 2015-12-23 12:32:08 -08:00
Gregory Szorc
4ccb8aa7b3 localrepo: use absolute_import 2015-12-23 12:30:14 -08:00
Gregory Szorc
2a56f0283f httpconnection: use absolute_import 2015-12-21 21:52:58 -08:00
Gregory Szorc
ccd1a37a31 keepalive: use absolute_import 2015-12-22 16:28:28 -08:00
Gregory Szorc
a12b0c85e9 context: use absolute_import 2015-12-21 21:51:31 -08:00
Gregory Szorc
69a8c50d7e lsprofcalltree: use absolute_import 2015-12-21 21:44:15 -08:00
Gregory Szorc
8e54d63538 byterange: use absolute_import
There were a lot of imports scattered around this file. They have been
consolidated at the top of the file where they belong.
2015-12-21 21:42:14 -08:00
Gregory Szorc
061e8691b5 dirstate: use absolute_import 2015-12-21 21:38:53 -08:00
Gregory Szorc
d6f69e17c6 manifest: use absolute_import 2015-12-21 21:35:46 -08:00
Gregory Szorc
fbecdd00e5 pvec: use absolute_import 2015-12-21 21:32:58 -08:00
Gregory Szorc
3abe9bcc8e py3compat: use absolute_import 2015-12-21 21:31:57 -08:00
Gregory Szorc
090eb4dcbe patch: use absolute_import 2015-12-21 21:33:52 -08:00
Gregory Szorc
ffa0c7e97c mdiff: use absolute_import 2015-12-21 21:26:14 -08:00
Gregory Szorc
4b6a93ce1c scmposix: use absolute_import 2015-12-21 21:24:49 -08:00
Gregory Szorc
4602d8f855 scmutil: use absolute_import 2015-12-21 21:23:43 -08:00
Gregory Szorc
2895e45846 scmwindows: use absolute_import 2015-12-21 21:21:09 -08:00
Gregory Szorc
dfef101207 store: use absolute_import 2015-12-21 21:19:57 -08:00
Gregory Szorc
68a8e8f9f4 help: use absolute_import 2015-12-21 21:33:27 -08:00
Matt Harbison
3cab7ba2f7 tests: convert directory separators to '/' for MSYS in test-check-py-compat
This is the same fix as ca24c20a1c94.
2015-12-16 17:22:37 -05:00
Gregory Szorc
25c5781010 revlog: use absolute_import 2015-12-12 23:22:18 -08:00
Gregory Szorc
c66a27807d windows: use absolute_import 2015-12-12 23:19:38 -08:00
Gregory Szorc
5c29ba6835 similar: use absolute_import 2015-12-12 23:17:22 -08:00
Gregory Szorc
7b3fa04da1 util: use absolute_import 2015-12-12 23:14:08 -08:00
Gregory Szorc
5d71f3b2b9 encoding: use absolute_import 2015-12-12 22:57:48 -05:00