logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hg files - list tracked files

Description

       Print  files  under  Mercurial  control  in  the  working directory or specified revision for given files
       (excluding removed files).  Files can be specified as filenames or filesets.

       If no files are given to match, this command prints the names of all files under Mercurial control.

       Template:

       The following keywords are supported in addition to the common template keywords and functions. See  also
       hghelptemplates.

       flags  String. Character denoting file's symlink and executable bits.

       path   String. Repository-absolute path of the file.

       size   Integer. Size of the file in bytes.

              Examples:

       • list all files under the current directory:

         hg files .

       • shows sizes and flags for current revision:

         hg files -vr .

       • list all files named README:

         hg files -I "**/README"

       • list all binary files:

         hg files "set:binary()"

       • find files containing a regular expression:

         hg files "set:grep('bob')"

       • search tracked file contents with xargs and grep:

         hg files -0 | xargs -0 grep foo

         See hghelppatterns and hghelpfilesets for more information on specifying file patterns.

         Returns 0 if a match is found, 1 otherwise.

Name

       hg files - list tracked files

Options

-r,--rev<REV>
              search the repository as it is in REV

       -0,--print0
              end filenames with NUL, for use with xargs

       -I,--include<PATTERN[+]>
              include names matching the given patterns

       -X,--exclude<PATTERN[+]>
              exclude names matching the given patterns

       -T,--template<TEMPLATE>
              display with template

       -S,--subrepos
              recurse into subrepositories

              [+] marked option can be specified multiple times

                                                                                                       HG(FILES)

Synopsis

       hg files [OPTION]... [FILE]...

See Also