Debian Codegraph @

doc/man/hg-files.1

raw
1 .TH HG FILES "" "" ""
2 .SH NAME
3 hg files \- list tracked files
4 .\" Man page generated from reStructuredText.
5 .
6 .SH SYNOPSIS
7 .sp
8 .nf
9 .ft C
10 hg files [OPTION]... [FILE]...
11 .ft P
12 .fi
13 .SH DESCRIPTION
14 .sp
15 Print files under Mercurial control in the working directory or
16 specified revision for given files (excluding removed files).
17 Files can be specified as filenames or filesets.
18 .sp
19 If no files are given to match, this command prints the names
20 of all files under Mercurial control.
21 .sp
22 Template:
23 .sp
24 The following keywords are supported in addition to the common template
25 keywords and functions. See also \%\fBhg help templates\fP\:.
26 .INDENT 0.0
27 .TP
28 .B flags
29 .
30 String. Character denoting file\(aqs symlink and executable bits.
31 .TP
32 .B path
33 .
34 String. Repository\-absolute path of the file.
35 .TP
36 .B size
37 .
38 Integer. Size of the file in bytes.
39 .UNINDENT
40 .sp
41 Examples:
42 .INDENT 0.0
43 .IP \(bu 2
44 .
45 list all files under the current directory:
46 .sp
47 .nf
48 .ft C
49 hg files .
50 .ft P
51 .fi
52 .IP \(bu 2
53 .
54 shows sizes and flags for current revision:
55 .sp
56 .nf
57 .ft C
58 hg files \-vr .
59 .ft P
60 .fi
61 .IP \(bu 2
62 .
63 list all files named README:
64 .sp
65 .nf
66 .ft C
67 hg files \-I "**/README"
68 .ft P
69 .fi
70 .IP \(bu 2
71 .
72 list all binary files:
73 .sp
74 .nf
75 .ft C
76 hg files "set:binary()"
77 .ft P
78 .fi
79 .IP \(bu 2
80 .
81 find files containing a regular expression:
82 .sp
83 .nf
84 .ft C
85 hg files "set:grep(\(aqbob\(aq)"
86 .ft P
87 .fi
88 .IP \(bu 2
89 .
90 search tracked file contents with xargs and grep:
91 .sp
92 .nf
93 .ft C
94 hg files \-0 | xargs \-0 grep foo
95 .ft P
96 .fi
97 .UNINDENT
98 .sp
99 See \%\fBhg help patterns\fP\: and \%\fBhg help filesets\fP\: for more information
100 on specifying file patterns.
101 .sp
102 Returns 0 if a match is found, 1 otherwise.
103 .SH OPTIONS
104 .INDENT 0.0
105 .TP
106 .BI \-r, \-\-rev \ <REV>
107 .
108 search the repository as it is in REV
109 .TP
110 .B \-0, \-\-print0
111 .
112 end filenames with NUL, for use with xargs
113 .TP
114 .BI \-I, \-\-include \ <PATTERN[+]>
115 .
116 include names matching the given patterns
117 .TP
118 .BI \-X, \-\-exclude \ <PATTERN[+]>
119 .
120 exclude names matching the given patterns
121 .TP
122 .BI \-T, \-\-template \ <TEMPLATE>
123 .
124 display with template
125 .TP
126 .B \-S, \-\-subrepos
127 .
128 recurse into subrepositories
129 .UNINDENT
130 .sp
131 [+] marked option can be specified multiple times
132 .\" Generated by docutils manpage writer.
133 .\"
134 .