comparison mercurial/help/patterns.txt @ 13218:1f4721de2ca9

match: support reading pattern lists from files
author Steve Borho <steve@borho.org>
date Thu, 23 Dec 2010 15:12:24 -0600
parents f91e5630ce7e
children 6ab8b17adc03
comparison
equal deleted inserted replaced
13217:637d07d8e377 13218:1f4721de2ca9
18 across path separators and ``{a,b}`` to mean "a or b". 18 across path separators and ``{a,b}`` to mean "a or b".
19 19
20 To use a Perl/Python regular expression, start a name with ``re:``. 20 To use a Perl/Python regular expression, start a name with ``re:``.
21 Regexp pattern matching is anchored at the root of the repository. 21 Regexp pattern matching is anchored at the root of the repository.
22 22
23 To read name patterns from a file, use ``listfile:`` or ``listfile0:``.
24 The latter expects null delimited patterns while the former expects line
25 feeds. Each string read from the file is itself treated as a file
26 pattern.
27
23 Plain examples:: 28 Plain examples::
24 29
25 path:foo/bar a name bar in a directory named foo in the root 30 path:foo/bar a name bar in a directory named foo in the root
26 of the repository 31 of the repository
27 path:path:name a file or directory named "path:name" 32 path:path:name a file or directory named "path:name"
37 including itself. 42 including itself.
38 43
39 Regexp examples:: 44 Regexp examples::
40 45
41 re:.*\.c$ any name ending in ".c", anywhere in the repository 46 re:.*\.c$ any name ending in ".c", anywhere in the repository
47
48 File examples::
49
50 listfile:list.txt read list from list.txt with one file pattern per line
51 listfile0:list.txt read list from list.txt with null byte delimiters