##// END OF EJS Templates
mq: use dirstateguard instead of dirstate.invalidate (qpush)...
mq: use dirstateguard instead of dirstate.invalidate (qpush) Before this patch, "mq.queue.apply()" uses "dirstate.invalidate()" as a kind of "restore .hg/dirstate to the original status" during afailure. But it just discards changes in memory, and doesn't actually restore ".hg/dirstate". Then, it can't work as expected, if "dirstate.write()" is executed while processing. This patch uses "dirstateguard" instead of "dirstate.invalidate()" to restore ".hg/dirstate" at failure even if "dirstate.write()" is executed before failure. This is a part of preparations to fix the issue that the recent (in memory) dirstate isn't visible to external processes (e.g. "precommit" hook).

File last commit:

r24909:d71492ca default
r24996:58308dde default
Show More
test-module-imports.t
39 lines | 1.4 KiB | text/troff | Tads3Lexer
/ tests / test-module-imports.t
Matt Mackall
test-module-imports: use test-repo requirement
r23894 #require test-repo
Augie Fackler
test-module-imports: skip on Python < 2.6, since ast is new in 2.6
r20059 This code uses the ast module, which was new in 2.6, so we'll skip
this test on anything earlier.
Augie Fackler
tests: use $PYTHON instead of hardcoding python...
r22947 $ $PYTHON -c 'import sys ; assert sys.version_info >= (2, 6)' || exit 80
Augie Fackler
test-module-imports: skip on Python < 2.6, since ast is new in 2.6
r20059
Augie Fackler
test-module-imports.t: new test to use the import cycle detector
r20039 $ import_checker="$TESTDIR"/../contrib/import-checker.py
Matt Mackall
test-module-imports: use test-repo requirement
r23894
Augie Fackler
test-module-imports.t: new test to use the import cycle detector
r20039 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.
Simon Heimberg
tests: test-module-imports.t works on windows (with backslash path sep)...
r20395 $ hg locate 'mercurial/**.py' | sed 's-\\-/-g' | xargs python "$import_checker"
Mads Kiilerich
import-checker: show stdlib and relative imports separately...
r20386 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
Gregory Szorc
revset: don't import discovery at module level...
r24722 relative: error, hbisect, phases, util
Mads Kiilerich
import-checker: show stdlib and relative imports separately...
r20386 mercurial/templater.py mixed imports
stdlib: parser
Durham Goode
template: add revset() template function...
r20519 relative: config, error, templatefilters, templatekw, util
Mads Kiilerich
import-checker: show stdlib and relative imports separately...
r20386 mercurial/ui.py mixed imports
stdlib: formatter
relative: config, error, scmutil, util
Matt Mackall
import-checker: fix rotatecycle...
r24487 Import cycle: mercurial.cmdutil -> mercurial.context -> mercurial.subrepo -> mercurial.cmdutil