Commit Graph

12 Commits

Author SHA1 Message Date
Matt Mackall
c031f45352 test-module-imports: use test-repo requirement 2015-01-16 16:25:30 -08:00
Augie Fackler
a5ddb1dcfe tests: use $PYTHON instead of hardcoding python
This makes running the testsuite with pypy possible.
2014-10-15 15:35:59 -04:00
Durham Goode
f8aca20bcb 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-11 21:04:12 -08:00
Augie Fackler
859551f9b1 repoview: use repo.revs() instead of a private revset method
Breaks an import cycle.
2014-02-04 17:13:45 -05:00
Augie Fackler
edc98c0164 match: use ctx.getfileset() instead of fileset.getfileset()
Resolves an import cycle involving match and merge.
2014-02-04 14:54:42 -05:00
Simon Heimberg
d4711ad797 tests: test-module-imports.t works on windows (with backslash path sep)
Transform the backslashes to slashes on windows, because they are eaten up by
the shell. (Similar as done in test-check-pyflakes.t.)

This test will not produce a traceback on windows anymore. But the test still
fails because the detected mixed imports differ.
2014-01-28 00:33:52 +01:00
Augie Fackler
8bfe6ea1ed itersubrepos: move to scmutil to break a direct import cycle 2014-02-03 18:36:00 -05:00
Mads Kiilerich
446ad18e32 import-checker: show stdlib and relative imports separately
Make the output more useful for debugging problems.
2014-02-05 01:43:51 +01:00
Chris Jerdonek
2f40a478a8 import-checker: backout dbcb4de20d06 (issue4129)
This patch backs out dbcb4de20d06, which caused test-module-imports.t to
be skipped when the test was run using virtualenv.  Since the test now
passes when using virtualenv, the skip is no longer necessary.
2013-12-22 21:27:00 -08:00
Augie Fackler
e5f635905e test-module-imports: try and detect virtualenv breakage (issue4129)
virtualenvs (among other things) break the stdlib module detection in
the import checker, and I don't see a good way to work around that for
now.
2013-12-14 11:58:26 -05:00
Augie Fackler
b707be4041 test-module-imports: skip on Python < 2.6, since ast is new in 2.6 2013-11-17 18:13:55 -05:00
Augie Fackler
96de448db2 test-module-imports.t: new test to use the import cycle detector 2013-11-17 13:38:35 -05:00