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