comparison mercurial/commands.py @ 40111:9967818a85fa

help: document about "grep" template keywords
author Yuya Nishihara <yuya@tcha.org>
date Sun, 07 Oct 2018 22:50:12 +0900
parents 4fd0fac48922
children 288fdded64dd
comparison
equal deleted inserted replaced
40110:d1338b4e39d0 40111:9967818a85fa
2643 2643
2644 If no FILEs are specified (and -f/--follow isn't set), all files in 2644 If no FILEs are specified (and -f/--follow isn't set), all files in
2645 the repository are searched, including those that don't exist in the 2645 the repository are searched, including those that don't exist in the
2646 current branch or have been deleted in a prior changeset. 2646 current branch or have been deleted in a prior changeset.
2647 2647
2648 .. container:: verbose
2649
2650 Template:
2651
2652 The following keywords are supported in addition to the common template
2653 keywords and functions. See also :hg:`help templates`.
2654
2655 :change: String. Character denoting insertion ``+`` or removal ``-``.
2656 Available if ``--diff`` is specified.
2657 :lineno: Integer. Line number of the match.
2658 :path: String. Repository-absolute path of the file.
2659 :texts: List of text chunks.
2660
2661 And each entry of ``{texts}`` provides the following sub-keywords.
2662
2663 :matched: Boolean. True if the chunk matches the specified pattern.
2664 :text: String. Chunk content.
2665
2666 See :hg:`help templates.operators` for the list expansion syntax.
2667
2648 Returns 0 if a match is found, 1 otherwise. 2668 Returns 0 if a match is found, 1 otherwise.
2649 """ 2669 """
2650 opts = pycompat.byteskwargs(opts) 2670 opts = pycompat.byteskwargs(opts)
2651 diff = opts.get('all') or opts.get('diff') 2671 diff = opts.get('all') or opts.get('diff')
2652 all_files = opts.get('all_files') 2672 all_files = opts.get('all_files')