Commit Graph

16 Commits

Author SHA1 Message Date
Martin von Zweigbergk
57f17ff9f2 match: handle everything-matching using new alwaysmatcher
Having a special matcher that always matches seems to make more sense
than making one of the other matchers handle the case. For now, we
just use this new matcher when no patterns were provided.
2017-05-19 11:50:01 -07:00
Martin von Zweigbergk
882acf90e8 match: remove support for includes from patternmatcher
Includes (and excludes) are now delegated to the includematcher.
2017-05-19 11:44:05 -07:00
Martin von Zweigbergk
1ba59afc49 match: split up main matcher into patternmatcher and includematcher
At this point the includematcher is an exact copy of the main matcher
class. We will specialize and simplify both classes in the following
patches. This initial unmodified copy is just to make the differences
clearer. We also rename the main matcher to "patternmatcher" for
consistency.

I may eventually merge this new includematcher back into the main
matcher, but I think doing it this way makes the intermediate steps
clearer regardless.
2017-05-19 22:36:14 -07:00
Martin von Zweigbergk
ce94f073cb match: remove support for exact matching from main matcher class
Exact matching is now handled by the exactmatcher class.

We can safely remove _files from the __repr__() implementation,
because even though the field is set, the patternspat field is enough
for the representation to be unambiguous (which was not the case when
the matcher could handle exact matches).
2017-05-18 23:39:39 -07:00
Martin von Zweigbergk
6f7738b741 match: remove support for excludes from matcher class
The support is now provided by differencematcher() and still available
via the match() function.
2017-05-16 22:15:42 -07:00
Martin von Zweigbergk
7f477af2bf debugwalk: also print matcher representation
This will make the effect of coming patches clearer.
2017-05-22 11:08:52 -07:00
Matt Mackall
7543320395 urls: bulk-change BTS urls to new location 2015-09-30 15:31:07 -05:00
Yuya Nishihara
ed7051c6c7 tests: write hgrc of more than two lines by using shell heredoc
Here document should be readable than repeating echo commands.
2014-11-04 23:41:46 +09:00
Matt Mackall
11be5cc27c tests: replace exit 80 with #require 2014-08-06 11:43:59 -05:00
Matt Mackall
28b6ee7d27 status: use condwrite to avoid zero-width format string hack 2012-11-06 17:30:47 -06:00
Mads Kiilerich
f815002da3 run-tests: allow test output lines to be terminated with \r in addition to \n
str.splitlines could not be used in 2d839579ce70, but _now_ we would like to
have lines with other line endings than \n.

Some fine occurences of (esc) markup of \r is replaced with multiple lines
ending with '\r (no-eol) (esc)'.  That is no win but also no significant loss.

This change makes it possible to drop filtercr.py - _that_ is a win.
2012-09-26 00:56:27 +02:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Danek Duvall
e826f21afa color: add support for terminfo-based attributes and color
Using terminfo instead of hard-coding ECMA-48 control sequences provides a
greater assurance that the terminal codes are correct for the current
terminal type; not everything supports the ANSI escape codes.

It also allows us to use a wider range of colors when a terminal emulator
supports it (such as 16- or 256-color xterm), and a few more non-color
attributes, such as the ever-popular blink.
2011-04-21 13:47:45 -07:00
Adrian Buehlmann
53cf962dbf copy: do not copy file if name is disallowed anyway 2011-04-15 16:15:32 +02:00
Mads Kiilerich
635406bf76 tests: use (esc) for all non-ASCII test output 2010-11-08 01:41:41 +01:00
Matt Mackall
17dbdccf9a tests: unify test-eolfilename 2010-09-26 13:41:32 -05:00