mercurial/helptext/patterns.txt
changeset 50695 1c31b343e514
parent 48523 823e906d879d
equal deleted inserted replaced
50686:a41eeb877d07 50695:1c31b343e514
    16 To use a plain path name without any pattern matching, start it with
    16 To use a plain path name without any pattern matching, start it with
    17 ``path:``. These path names must completely match starting at the
    17 ``path:``. These path names must completely match starting at the
    18 current repository root, and when the path points to a directory, it is matched
    18 current repository root, and when the path points to a directory, it is matched
    19 recursively. To match all files in a directory non-recursively (not including
    19 recursively. To match all files in a directory non-recursively (not including
    20 any files in subdirectories), ``rootfilesin:`` can be used, specifying an
    20 any files in subdirectories), ``rootfilesin:`` can be used, specifying an
    21 absolute path (relative to the repository root).
    21 absolute path (relative to the repository root). To match a single file exactly,
       
    22 relative to the repository root, you can use ``filepath:``.
    22 
    23 
    23 To use an extended glob, start a name with ``glob:``. Globs are rooted
    24 To use an extended glob, start a name with ``glob:``. Globs are rooted
    24 at the current directory; a glob such as ``*.c`` will only match files
    25 at the current directory; a glob such as ``*.c`` will only match files
    25 in the current directory ending with ``.c``. ``rootglob:`` can be used
    26 in the current directory ending with ``.c``. ``rootglob:`` can be used
    26 instead of ``glob:`` for a glob that is rooted at the root of the
    27 instead of ``glob:`` for a glob that is rooted at the root of the
    48 under matched directories are treated as matched.
    49 under matched directories are treated as matched.
    49 For ``-I`` and ``-X`` options, ``glob:`` will match directories recursively.
    50 For ``-I`` and ``-X`` options, ``glob:`` will match directories recursively.
    50 
    51 
    51 Plain examples::
    52 Plain examples::
    52 
    53 
    53   path:foo/bar        a name bar in a directory named foo in the root
    54   path:foo/bar                  a name bar in a directory named foo in the root
    54                       of the repository
    55                                 of the repository
    55   path:path:name      a file or directory named "path:name"
    56   path:some/path                a file or directory named "some/path"
    56   rootfilesin:foo/bar the files in a directory called foo/bar, but not any files
    57   filepath:some/path/to/a/file  exactly a single file named
    57                       in its subdirectories and not a file bar in directory foo
    58                                 "some/path/to/a/file", relative to the root
       
    59                                 of the repository
       
    60   rootfilesin:foo/bar           the files in a directory called foo/bar, but
       
    61                                 not any files in its subdirectories and not
       
    62                                 a file bar in directory foo
    58 
    63 
    59 Glob examples::
    64 Glob examples::
    60 
    65 
    61   glob:*.c       any name ending in ".c" in the current directory
    66   glob:*.c       any name ending in ".c" in the current directory
    62   *.c            any name ending in ".c" in the current directory
    67   *.c            any name ending in ".c" in the current directory