[PATCH] test-module-imports: conditionalize for Windows

Augie Fackler raf at durin42.com
Wed Apr 8 19:12:14 CDT 2015


On Mon, Apr 06, 2015 at 09:56:24PM -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1428371471 14400
> #      Mon Apr 06 21:51:11 2015 -0400
> # Node ID 2b99e04a81db2bba7b44a59ea031481da60b70d3
> # Parent  e0fc84bf060e9c9ea69324860696e989831d76de
> test-module-imports: conditionalize for Windows
>
> Windows has several more warnings than posix platforms, notably changegroup.py,
> encoding.py, and several posix.py entries.  I have no idea how to fix them, but
> maybe it will inspire someone who knows how, to take a look.  This also means
> less noise in a Windows buildbot.
>
> diff --git a/tests/test-module-imports.t b/tests/test-module-imports.t
> --- a/tests/test-module-imports.t
> +++ b/tests/test-module-imports.t
> @@ -20,6 +20,7 @@
>  hidden by deduplication algorithm in the cycle detector, so fixing
>  these may expose other cycles.
>
> +#if no-windows
>    $ hg locate 'mercurial/**.py' | sed 's-\\-/-g' | xargs python "$import_checker"
>    mercurial/crecord.py mixed imports
>       stdlib:    fcntl, termios
> @@ -40,3 +41,37 @@
>       stdlib:    formatter
>       relative:  config, error, scmutil, util
>    Import cycle: mercurial.cmdutil -> mercurial.context -> mercurial.subrepo -> mercurial.cmdutil
> +#else
> +  $ hg locate 'mercurial/**.py' | sed 's-\\-/-g' | xargs python "$import_checker"
> +  mercurial/changegroup.py mixed imports
> +     stdlib:    os, struct, tempfile, zlib
> +     relative:  bz2

This one (just as an example) looks like bz2 is missing from your
python install, or else the logic in the import checker can't dig up
the existence of the bz2 module.

> +  mercurial/dispatch.py mixed imports
> +     stdlib:    commands
> +     relative:  error, extensions, fancyopts, hg, hook, util
> +  mercurial/encoding.py mixed imports
> +     stdlib:    locale, os
> +     relative:  unicodedata
> +  mercurial/fileset.py mixed imports
> +     stdlib:    parser
> +     relative:  error, merge, util
> +  mercurial/posix.py mixed imports
> +     stdlib:    errno, getpass, os, socket, stat, sys, tempfile
> +     relative:  grp, pwd, unicodedata
> +  mercurial/posix.py mixed imports
> +     stdlib:    re
> +     relative:  fcntl

Same type of problem here, presumably because fcntl only exists on unix-likes?

> +  mercurial/posix.py mixed imports
> +     stdlib:    array
> +     relative:  termios
> +  mercurial/revset.py mixed imports
> +     stdlib:    parser
> +     relative:  discovery, error, hbisect, phases, util
> +  mercurial/templater.py mixed imports
> +     stdlib:    parser
> +     relative:  config, error, templatefilters, templatekw, util
> +  mercurial/ui.py mixed imports
> +     stdlib:    formatter
> +     relative:  config, error, scmutil, util
> +  Import cycle: mercurial.cmdutil -> mercurial.context -> mercurial.subrepo -> mercurial.cmdutil
> +#endif
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list