mercurial/help/patterns.txt
branchstable
changeset 13427 2432b3227303
parent 13218 1f4721de2ca9
child 14686 6ab8b17adc03
equal deleted inserted replaced
13369:69238d0ca60f 13427:2432b3227303
    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