| 1 |
#require test-repo hg32 |
| 2 |
|
| 3 |
$ . "$TESTDIR/helpers-testrepo.sh" |
| 4 |
|
| 5 |
$ cd "$TESTDIR"/.. |
| 6 |
|
| 7 |
There are a handful of cases here that require renaming a module so it |
| 8 |
doesn't overlap with a stdlib module name. There are also some cycles |
| 9 |
here that we should still endeavor to fix, and some cycles will be |
| 10 |
hidden by deduplication algorithm in the cycle detector, so fixing |
| 11 |
these may expose other cycles. |
| 12 |
|
| 13 |
Known-bad files are excluded by -X as some of them would produce unstable |
| 14 |
outputs, which should be fixed later. |
| 15 |
|
| 16 |
NOTE: the `hg files` command here only works on files that are known to |
| 17 |
Mercurial. If you add an import of a new file and haven't yet `hg add`ed it, you |
| 18 |
will likely receive warnings about a direct import. |
| 19 |
|
| 20 |
$ bash contrib/check-import |
| 21 |
mercurial/__main__.py:*: function level import: mercurial.demandimport (glob) |
| 22 |
mercurial/__main__.py:*: function level import: mercurial.dispatch (glob) |
| 23 |
mercurial/color.py:*: function level import: mercurial.win32 (glob) |
| 24 |
mercurial/debugcommands.py:*: function level import: mercurial.fileset (glob) |
| 25 |
mercurial/debugcommands.py:*: function level import: mercurial.pyo3_rustext (glob) |
| 26 |
mercurial/debugcommands.py:*: function level import: mercurial.cext.base85 (glob) |
| 27 |
mercurial/debugcommands.py:*: function level import: mercurial.cext.bdiff (glob) |
| 28 |
mercurial/debugcommands.py:*: function level import: mercurial.cext.mpatch (glob) |
| 29 |
mercurial/debugcommands.py:*: function level import: mercurial.cext.osutil (glob) |
| 30 |
mercurial/debugcommands.py:*: function level import: mercurial.win32 (glob) |
| 31 |
mercurial/debugcommands.py:*: function level import: mercurial.cext (glob) |
| 32 |
mercurial/debugcommands.py:*: function level import: mercurial.pyo3_rustext (glob) |
| 33 |
mercurial/error.py:*: function level import: mercurial.node.hex (glob) |
| 34 |
mercurial/error.py:*: function level import: mercurial.node.short (glob) |
| 35 |
mercurial/extensions.py:*: function level import: mercurial.color (glob) |
| 36 |
mercurial/extensions.py:*: function level import: mercurial.filemerge (glob) |
| 37 |
mercurial/extensions.py:*: function level import: mercurial.fileset (glob) |
| 38 |
mercurial/extensions.py:*: function level import: mercurial.templatefilters (glob) |
| 39 |
mercurial/extensions.py:*: function level import: mercurial.templatefuncs (glob) |
| 40 |
mercurial/extensions.py:*: function level import: hgext.__index__ (glob) |
| 41 |
mercurial/extensions.py:*: function level import: hgext.__index__ (glob) |
| 42 |
mercurial/hgweb/server.py:*: function level import: mercurial.sslutil (glob) |
| 43 |
mercurial/merge_utils/diff.py:*: function level import: mercurial.merge (glob) |
| 44 |
mercurial/metadata.py:*: function level import: mercurial.worker (glob) |
| 45 |
mercurial/policy.py:*: function level import: mercurial.zstd (glob) |
| 46 |
mercurial/profiling.py:*: function level import: mercurial.lsprof (glob) |
| 47 |
mercurial/profiling.py:*: function level import: mercurial.lsprofcalltree (glob) |
| 48 |
mercurial/profiling.py:*: function level import: mercurial.statprof (glob) |
| 49 |
mercurial/repoview.py:*: function level import: mercurial.mergestate (glob) |
| 50 |
mercurial/revlogutils/rewrite.py:*: function level import: mercurial.pure.parsers (glob) |
| 51 |
mercurial/revlogutils/rewrite.py:*: function level import: mercurial.pure.parsers (glob) |
| 52 |
mercurial/statprof.py:*: function level import: mercurial.utils.procutil (glob) |
| 53 |
mercurial/subrepo.py:*: function level import: mercurial.repo.factory (glob) |
| 54 |
mercurial/subrepo.py:*: function level import: mercurial.cmd_impls.update (glob) |
| 55 |
mercurial/subrepo.py:*: function level import: mercurial.cmd_impls.clone (glob) |
| 56 |
mercurial/subrepo.py:*: function level import: mercurial.repo.factory (glob) |
| 57 |
mercurial/subrepo.py:*: function level import: mercurial.cmd_impls.update (glob) |
| 58 |
mercurial/subrepo.py:*: function level import: mercurial.repo.factory (glob) |
| 59 |
mercurial/subrepo.py:*: function level import: mercurial.cmd_impls.outgoing (glob) |
| 60 |
mercurial/subrepo.py:*: function level import: mercurial.cmd_impls.incoming (glob) |
| 61 |
mercurial/subrepo.py:*: function level import: mercurial.cmd_impls.clone (glob) |
| 62 |
mercurial/templatekw.py:*: function level import: mercurial.cmdutil (glob) |
| 63 |
Import cycle: hgext.convert.convcmd -> hgext.convert.p4 -> hgext.convert.convcmd |
| 64 |
Import cycle: hgext.fsmonitor.pywatchman.load -> hgext.fsmonitor.pywatchman.pybser -> hgext.fsmonitor.pywatchman.load |
| 65 |
Import cycle: hgext.fsmonitor.pywatchman.__init__ -> hgext.fsmonitor.pywatchman.load -> hgext.fsmonitor.pywatchman.__init__ |
| 66 |
[1] |
| 67 |
|
| 68 |
All files that get type checked must have 'from __future__ import annotations' |
| 69 |
|
| 70 |
$ testrepohg files 'set:**.py and size(">0")' -I mercurial -I hgext -X mercurial/thirdparty -0 \ |
| 71 |
> | xargs -0 grep -L '^from __future__ import annotations$' |