Debian Codegraph @

doc/html/hg-files.html

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
7 <title>hg files</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="hg-files">
12 <span id="hg-files-1"></span>
13 <h1 class="title">hg files</h1>
14 <h2 class="subtitle" id="list-tracked-files">list tracked files</h2>
15
16 <div class="contents htmlonly topic" id="contents">
17 <p class="topic-title"><a class="reference internal" href="#top">Contents</a></p>
18 <ul class="simple">
19 <li><a class="reference internal" href="#synopsis" id="toc-entry-1">Synopsis</a></li>
20 <li><a class="reference internal" href="#description" id="toc-entry-2">Description</a></li>
21 <li><a class="reference internal" href="#options" id="toc-entry-3">Options</a></li>
22 </ul>
23 </div>
24 <div class="section" id="synopsis">
25 <h1><a class="toc-backref" href="#contents">Synopsis</a></h1>
26 <pre class="literal-block">
27 hg files [OPTION]... [FILE]...
28 </pre>
29 </div>
30 <div class="section" id="description">
31 <h1><a class="toc-backref" href="#contents">Description</a></h1>
32 <p>Print files under Mercurial control in the working directory or
33 specified revision for given files (excluding removed files).
34 Files can be specified as filenames or filesets.</p>
35 <p>If no files are given to match, this command prints the names
36 of all files under Mercurial control.</p>
37 <div class="verbose docutils container">
38 <p>Template:</p>
39 <p>The following keywords are supported in addition to the common template
40 keywords and functions. See also <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a>.</p>
41 <table class="docutils field-list" frame="void" rules="none">
42 <col class="field-name" />
43 <col class="field-body" />
44 <tbody valign="top">
45 <tr class="field"><th class="field-name">flags:</th><td class="field-body">String. Character denoting file's symlink and executable bits.</td>
46 </tr>
47 <tr class="field"><th class="field-name">path:</th><td class="field-body">String. Repository-absolute path of the file.</td>
48 </tr>
49 <tr class="field"><th class="field-name">size:</th><td class="field-body">Integer. Size of the file in bytes.</td>
50 </tr>
51 </tbody>
52 </table>
53 <p>Examples:</p>
54 <ul>
55 <li><p class="first">list all files under the current directory:</p>
56 <pre class="literal-block">
57 hg files .
58 </pre>
59 </li>
60 <li><p class="first">shows sizes and flags for current revision:</p>
61 <pre class="literal-block">
62 hg files -vr .
63 </pre>
64 </li>
65 <li><p class="first">list all files named README:</p>
66 <pre class="literal-block">
67 hg files -I &quot;**/README&quot;
68 </pre>
69 </li>
70 <li><p class="first">list all binary files:</p>
71 <pre class="literal-block">
72 hg files &quot;set:binary()&quot;
73 </pre>
74 </li>
75 <li><p class="first">find files containing a regular expression:</p>
76 <pre class="literal-block">
77 hg files &quot;set:grep('bob')&quot;
78 </pre>
79 </li>
80 <li><p class="first">search tracked file contents with xargs and grep:</p>
81 <pre class="literal-block">
82 hg files -0 | xargs -0 grep foo
83 </pre>
84 </li>
85 </ul>
86 </div>
87 <p>See <a class="reference external" href="topic-patterns.html"><tt class="docutils literal">hg help patterns</tt></a> and <a class="reference external" href="topic-filesets.html"><tt class="docutils literal">hg help filesets</tt></a> for more information
88 on specifying file patterns.</p>
89 <p>Returns 0 if a match is found, 1 otherwise.</p>
90 </div>
91 <div class="section" id="options">
92 <h1><a class="toc-backref" href="#contents">Options</a></h1>
93 <table class="docutils option-list" frame="void" rules="none">
94 <col class="option" />
95 <col class="description" />
96 <tbody valign="top">
97 <tr><td class="option-group" colspan="2">
98 <kbd><span class="option">-r</span>, <span class="option">--rev <var>&lt;REV&gt;</var></span></kbd></td>
99 </tr>
100 <tr><td>&nbsp;</td><td>search the repository as it is in REV</td></tr>
101 <tr><td class="option-group">
102 <kbd><span class="option">-0</span>, <span class="option">--print0</span></kbd></td>
103 <td>end filenames with NUL, for use with xargs</td></tr>
104 <tr><td class="option-group" colspan="2">
105 <kbd><span class="option">-I</span>, <span class="option">--include <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
106 </tr>
107 <tr><td>&nbsp;</td><td>include names matching the given patterns</td></tr>
108 <tr><td class="option-group" colspan="2">
109 <kbd><span class="option">-X</span>, <span class="option">--exclude <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
110 </tr>
111 <tr><td>&nbsp;</td><td>exclude names matching the given patterns</td></tr>
112 <tr><td class="option-group" colspan="2">
113 <kbd><span class="option">-T</span>, <span class="option">--template <var>&lt;TEMPLATE&gt;</var></span></kbd></td>
114 </tr>
115 <tr><td>&nbsp;</td><td>display with template</td></tr>
116 <tr><td class="option-group">
117 <kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td>
118 <td>recurse into subrepositories</td></tr>
119 </tbody>
120 </table>
121 <p>[+] marked option can be specified multiple times</p>
122 </div>
123 </div>
124 </body>
125 </html>