comparison help/patterns.txt @ 9539:c904e76e3834

help: move help topics from mercurial/help.py to help/*.txt The help topics are loaded on demand so we wont hit the disk unless we really have to.
author Martin Geisler <mg@lazybytes.net>
date Sun, 04 Oct 2009 09:59:13 +0200
parents
children cad36e496640
comparison
equal deleted inserted replaced
9538:f96ee862aba0 9539:c904e76e3834
1 Mercurial accepts several notations for identifying one or more
2 files at a time.
3
4 By default, Mercurial treats filenames as shell-style extended
5 glob patterns.
6
7 Alternate pattern notations must be specified explicitly.
8
9 To use a plain path name without any pattern matching, start it
10 with "path:". These path names must completely match starting at
11 the current repository root.
12
13 To use an extended glob, start a name with "glob:". Globs are
14 rooted at the current directory; a glob such as "``*.c``" will
15 only match files in the current directory ending with ".c".
16
17 The supported glob syntax extensions are "``**``" to match any
18 string across path separators and "{a,b}" to mean "a or b".
19
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.
22
23 Plain examples::
24
25 path:foo/bar a name bar in a directory named foo in the root
26 of the repository
27 path:path:name a file or directory named "path:name"
28
29 Glob examples::
30
31 glob:*.c any name ending in ".c" in the current directory
32 *.c any name ending in ".c" in the current directory
33 **.c any name ending in ".c" in any subdirectory of the
34 current directory including itself.
35 foo/*.c any name ending in ".c" in the directory foo
36 foo/**.c any name ending in ".c" in any subdirectory of foo
37 including itself.
38
39 Regexp examples::
40
41 re:.*\.c$ any name ending in ".c", anywhere in the repository