Debian Codegraph @

doc/man/hg-log.1

raw
1 .TH HG LOG "" "" ""
2 .SH NAME
3 hg log \- show revision history of entire repository or files
4 .\" Man page generated from reStructuredText.
5 .
6 .SH SYNOPSIS
7 .sp
8 .nf
9 .ft C
10 hg log [OPTION]... [FILE]
11 .ft P
12 .fi
13 .SH DESCRIPTION
14 .sp
15 Print the revision history of the specified files or the entire
16 project.
17 .sp
18 If no revision range is specified, the default is \fBtip:0\fP unless
19 \-\-follow is set.
20 .sp
21 File history is shown without following rename or copy history of
22 files. Use \-f/\-\-follow with a filename to follow history across
23 renames and copies. \-\-follow without a filename will only show
24 ancestors of the starting revisions. The starting revisions can be
25 specified by \-r/\-\-rev, which default to the working directory parent.
26 .sp
27 By default this command prints revision number and changeset id,
28 tags, non\-trivial parents, user, date and time, and a summary for
29 each commit. When the \-v/\-\-verbose switch is used, the list of
30 changed files and full commit message are shown.
31 .sp
32 With \-\-graph the revisions are shown as an ASCII art DAG with the most
33 recent changeset at the top.
34 \(aqo\(aq is a changeset, \(aq@\(aq is a working directory parent, \(aq%\(aq is a changeset
35 involved in an unresolved merge conflict, \(aq_\(aq closes a branch,
36 \(aqx\(aq is obsolete, \(aq*\(aq is unstable, and \(aq+\(aq represents a fork where the
37 changeset from the lines below is a parent of the \(aqo\(aq merge on the same
38 line.
39 Paths in the DAG are represented with \(aq|\(aq, \(aq/\(aq and so forth. \(aq:\(aq in place
40 of a \(aq|\(aq indicates one or more revisions in a path are omitted.
41 .sp
42 Use \-L/\-\-line\-range FILE,M:N options to follow the history of lines
43 from M to N in FILE. With \-p/\-\-patch only diff hunks affecting
44 specified line range will be shown. This option requires \-\-follow;
45 it can be specified multiple times. Currently, this option is not
46 compatible with \-\-graph. This option is experimental.
47 .IP Note
48 .
49 \%\fBhg log \-\-patch\fP\: may generate unexpected diff output for merge
50 changesets, as it will only compare the merge changeset against
51 its first parent. Also, only files different from BOTH parents
52 will appear in files:.
53 .RE
54 .IP Note
55 .
56 For performance reasons, \%\fBhg log FILE\fP\: may omit duplicate changes
57 made on branches and will not show removals or mode changes. To
58 see all such changes, use the \-\-removed switch.
59 .RE
60 .IP Note
61 .
62 The history resulting from \-L/\-\-line\-range options depends on diff
63 options; for instance if white\-spaces are ignored, respective changes
64 with only white\-spaces in specified line range will not be listed.
65 .RE
66 .sp
67 Some examples:
68 .INDENT 0.0
69 .IP \(bu 2
70 .
71 changesets with full descriptions and file lists:
72 .sp
73 .nf
74 .ft C
75 hg log \-v
76 .ft P
77 .fi
78 .IP \(bu 2
79 .
80 changesets ancestral to the working directory:
81 .sp
82 .nf
83 .ft C
84 hg log \-f
85 .ft P
86 .fi
87 .IP \(bu 2
88 .
89 last 10 commits on the current branch:
90 .sp
91 .nf
92 .ft C
93 hg log \-l 10 \-b .
94 .ft P
95 .fi
96 .IP \(bu 2
97 .
98 changesets showing all modifications of a file, including removals:
99 .sp
100 .nf
101 .ft C
102 hg log \-\-removed file.c
103 .ft P
104 .fi
105 .IP \(bu 2
106 .
107 all changesets that touch a directory, with diffs, excluding merges:
108 .sp
109 .nf
110 .ft C
111 hg log \-Mp lib/
112 .ft P
113 .fi
114 .IP \(bu 2
115 .
116 all revision numbers that match a keyword:
117 .sp
118 .nf
119 .ft C
120 hg log \-k bug \-\-template "{rev}\en"
121 .ft P
122 .fi
123 .IP \(bu 2
124 .
125 the full hash identifier of the working directory parent:
126 .sp
127 .nf
128 .ft C
129 hg log \-r . \-\-template "{node}\en"
130 .ft P
131 .fi
132 .IP \(bu 2
133 .
134 list available log templates:
135 .sp
136 .nf
137 .ft C
138 hg log \-T list
139 .ft P
140 .fi
141 .IP \(bu 2
142 .
143 check if a given changeset is included in a tagged release:
144 .sp
145 .nf
146 .ft C
147 hg log \-r "a21ccf and ancestor(1.9)"
148 .ft P
149 .fi
150 .IP \(bu 2
151 .
152 find all changesets by some user in a date range:
153 .sp
154 .nf
155 .ft C
156 hg log \-k alice \-d "may 2008 to jul 2008"
157 .ft P
158 .fi
159 .IP \(bu 2
160 .
161 summary of all changesets after the last tag:
162 .sp
163 .nf
164 .ft C
165 hg log \-r "last(tagged())::" \-\-template "{desc|firstline}\en"
166 .ft P
167 .fi
168 .IP \(bu 2
169 .
170 changesets touching lines 13 to 23 for file.c:
171 .sp
172 .nf
173 .ft C
174 hg log \-L file.c,13:23
175 .ft P
176 .fi
177 .IP \(bu 2
178 .
179 changesets touching lines 13 to 23 for file.c and lines 2 to 6 of
180 main.c with patch:
181 .sp
182 .nf
183 .ft C
184 hg log \-L file.c,13:23 \-L main.c,2:6 \-p
185 .ft P
186 .fi
187 .UNINDENT
188 .sp
189 See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
190 .sp
191 See \%\fBhg help revisions\fP\: for more about specifying and ordering
192 revisions.
193 .sp
194 See \%\fBhg help templates\fP\: for more about pre\-packaged styles and
195 specifying custom templates. The default template used by the log
196 command can be customized via the \fBcommand\-templates.log\fP configuration
197 setting.
198 .sp
199 Returns 0 on success.
200 .SH OPTIONS
201 .INDENT 0.0
202 .TP
203 .B \-f, \-\-follow
204 .
205 follow changeset history, or file history across copies and renames
206 .TP
207 .B \-\-follow\-first
208 .
209 only follow the first parent of merge changesets (DEPRECATED)
210 .TP
211 .BI \-d, \-\-date \ <DATE>
212 .
213 show revisions matching date spec
214 .TP
215 .B \-C, \-\-copies
216 .
217 show copied files
218 .TP
219 .BI \-k, \-\-keyword \ <TEXT[+]>
220 .
221 do case\-insensitive search for a given text
222 .TP
223 .BI \-r, \-\-rev \ <REV[+]>
224 .
225 revisions to select or follow from
226 .TP
227 .BI \-L, \-\-line\-range \ <FILE,RANGE[+]>
228 .
229 follow line range of specified file (EXPERIMENTAL)
230 .TP
231 .B \-\-removed
232 .
233 include revisions where files were removed
234 .TP
235 .B \-m, \-\-only\-merges
236 .
237 show only merges (DEPRECATED) (use \-r "merge()" instead)
238 .TP
239 .BI \-u, \-\-user \ <USER[+]>
240 .
241 revisions committed by user
242 .TP
243 .BI \-\-only\-branch \ <BRANCH[+]>
244 .
245 show only changesets within the given named branch (DEPRECATED)
246 .TP
247 .BI \-b, \-\-branch \ <BRANCH[+]>
248 .
249 show changesets within the given named branch
250 .TP
251 .BI \-B, \-\-bookmark \ <BOOKMARK[+]>
252 .
253 show changesets within the given bookmark
254 .TP
255 .BI \-P, \-\-prune \ <REV[+]>
256 .
257 do not display revision or any of its ancestors
258 .TP
259 .B \-p, \-\-patch
260 .
261 show patch
262 .TP
263 .B \-g, \-\-git
264 .
265 use git extended diff format
266 .TP
267 .BI \-l, \-\-limit \ <NUM>
268 .
269 limit number of changes displayed
270 .TP
271 .B \-M, \-\-no\-merges
272 .
273 do not show merges
274 .TP
275 .B \-\-stat
276 .
277 output diffstat\-style summary of changes
278 .TP
279 .B \-G, \-\-graph
280 .
281 show the revision DAG
282 .TP
283 .BI \-\-style \ <STYLE>
284 .
285 display using template map file (DEPRECATED)
286 .TP
287 .BI \-T, \-\-template \ <TEMPLATE>
288 .
289 display with template
290 .TP
291 .BI \-I, \-\-include \ <PATTERN[+]>
292 .
293 include names matching the given patterns
294 .TP
295 .BI \-X, \-\-exclude \ <PATTERN[+]>
296 .
297 exclude names matching the given patterns
298 .UNINDENT
299 .sp
300 [+] marked option can be specified multiple times
301 .SH ALIASES
302 .sp
303 .nf
304 .ft C
305 history
306 .ft P
307 .fi
308 .\" Generated by docutils manpage writer.
309 .\"
310 .