2015-01-17 03:25:30 +03:00
|
|
|
#require test-repo
|
|
|
|
|
2013-11-18 03:13:55 +04:00
|
|
|
This code uses the ast module, which was new in 2.6, so we'll skip
|
|
|
|
this test on anything earlier.
|
2014-10-15 23:35:59 +04:00
|
|
|
$ $PYTHON -c 'import sys ; assert sys.version_info >= (2, 6)' || exit 80
|
2013-11-18 03:13:55 +04:00
|
|
|
|
2013-11-17 22:38:35 +04:00
|
|
|
$ import_checker="$TESTDIR"/../contrib/import-checker.py
|
2015-01-17 03:25:30 +03:00
|
|
|
|
2013-11-17 22:38:35 +04:00
|
|
|
Run the doctests from the import checker, and make sure
|
|
|
|
it's working correctly.
|
|
|
|
$ TERM=dumb
|
|
|
|
$ export TERM
|
|
|
|
$ python -m doctest $import_checker
|
|
|
|
|
|
|
|
$ cd "$TESTDIR"/..
|
|
|
|
|
|
|
|
There are a handful of cases here that require renaming a module so it
|
|
|
|
doesn't overlap with a stdlib module name. There are also some cycles
|
|
|
|
here that we should still endeavor to fix, and some cycles will be
|
|
|
|
hidden by deduplication algorithm in the cycle detector, so fixing
|
|
|
|
these may expose other cycles.
|
|
|
|
|
2014-01-28 03:33:52 +04:00
|
|
|
$ hg locate 'mercurial/**.py' | sed 's-\\-/-g' | xargs python "$import_checker"
|
2014-02-05 04:43:51 +04:00
|
|
|
mercurial/dispatch.py mixed imports
|
|
|
|
stdlib: commands
|
|
|
|
relative: error, extensions, fancyopts, hg, hook, util
|
|
|
|
mercurial/fileset.py mixed imports
|
|
|
|
stdlib: parser
|
|
|
|
relative: error, merge, util
|
|
|
|
mercurial/revset.py mixed imports
|
|
|
|
stdlib: parser
|
2015-04-14 19:54:16 +03:00
|
|
|
relative: error, hbisect, phases, util
|
2014-02-05 04:43:51 +04:00
|
|
|
mercurial/templater.py mixed imports
|
|
|
|
stdlib: parser
|
template: add revset() template function
Adds a template function that executes a revset and returns the list of
revisions as the result. It has the signature 'revset(query [, args...])'. The
args are optional and are applied to the query string using the standard
python string.format(args) pattern. This allows things like:
'{revset("parents({0})", rev)}' to produce the parents of each individual
commit in the log output. If no args are specified, the revset result is
cached for the duration of the templater; so it's better to not use args if
performance is a concern.
By itself, revset() can be used to print commit parents, print the common
ancestor of a commit with the main branch, etc.
It can be used with the ifcontains() function to do things like
'{ifcontains(rev, revset('.'), label(...), ...)}' to color the working copy
parent, to color certain branches, to color draft commits, etc.
2014-02-12 09:04:12 +04:00
|
|
|
relative: config, error, templatefilters, templatekw, util
|
2014-02-05 04:43:51 +04:00
|
|
|
mercurial/ui.py mixed imports
|
|
|
|
stdlib: formatter
|
|
|
|
relative: config, error, scmutil, util
|
2015-03-28 02:50:39 +03:00
|
|
|
Import cycle: mercurial.cmdutil -> mercurial.context -> mercurial.subrepo -> mercurial.cmdutil
|