--- a/mercurial/help/patterns.txt Fri Feb 17 01:21:15 2017 -0800
+++ b/mercurial/help/patterns.txt Mon Feb 13 15:39:29 2017 -0800
@@ -13,7 +13,10 @@
To use a plain path name without any pattern matching, start it with
``path:``. These path names must completely match starting at the
-current repository root.
+current repository root, and when the path points to a directory, it is matched
+recursively. To match all files in a directory non-recursively (not including
+any files in subdirectories), ``rootfilesin:`` can be used, specifying an
+absolute path (relative to the repository root).
To use an extended glob, start a name with ``glob:``. Globs are rooted
at the current directory; a glob such as ``*.c`` will only match files
@@ -39,12 +42,15 @@
All patterns, except for ``glob:`` specified in command line (not for
``-I`` or ``-X`` options), can match also against directories: files
under matched directories are treated as matched.
+For ``-I`` and ``-X`` options, ``glob:`` will match directories recursively.
Plain examples::
- path:foo/bar a name bar in a directory named foo in the root
- of the repository
- path:path:name a file or directory named "path:name"
+ path:foo/bar a name bar in a directory named foo in the root
+ of the repository
+ path:path:name a file or directory named "path:name"
+ rootfilesin:foo/bar the files in a directory called foo/bar, but not any files
+ in its subdirectories and not a file bar in directory foo
Glob examples::
@@ -52,6 +58,8 @@
*.c any name ending in ".c" in the current directory
**.c any name ending in ".c" in any subdirectory of the
current directory including itself.
+ foo/* any file in directory foo plus all its subdirectories,
+ recursively
foo/*.c any name ending in ".c" in the directory foo
foo/**.c any name ending in ".c" in any subdirectory of foo
including itself.