| 1 |
.TH HG CAT "" "" "" |
| 2 |
.SH NAME |
| 3 |
hg cat \- output the current or given revision of files |
| 4 |
.\" Man page generated from reStructuredText. |
| 5 |
. |
| 6 |
.SH SYNOPSIS |
| 7 |
.sp |
| 8 |
.nf |
| 9 |
.ft C |
| 10 |
hg cat [OPTION]... FILE... |
| 11 |
.ft P |
| 12 |
.fi |
| 13 |
.SH DESCRIPTION |
| 14 |
.sp |
| 15 |
Print the specified files as they were at the given revision. If |
| 16 |
no revision is given, the parent of the working directory is used. |
| 17 |
.sp |
| 18 |
Output may be to a file, in which case the name of the file is |
| 19 |
given using a template string. See \%\fBhg help templates\fP\:. In addition |
| 20 |
to the common template keywords, the following formatting rules are |
| 21 |
supported: |
| 22 |
.INDENT 0.0 |
| 23 |
.TP |
| 24 |
.B \fB%%\fP |
| 25 |
.sp |
| 26 |
literal "%" character |
| 27 |
.TP |
| 28 |
.B \fB%s\fP |
| 29 |
.sp |
| 30 |
basename of file being printed |
| 31 |
.TP |
| 32 |
.B \fB%d\fP |
| 33 |
.sp |
| 34 |
dirname of file being printed, or \(aq.\(aq if in repository root |
| 35 |
.TP |
| 36 |
.B \fB%p\fP |
| 37 |
.sp |
| 38 |
root\-relative path name of file being printed |
| 39 |
.TP |
| 40 |
.B \fB%H\fP |
| 41 |
.sp |
| 42 |
changeset hash (40 hexadecimal digits) |
| 43 |
.TP |
| 44 |
.B \fB%R\fP |
| 45 |
.sp |
| 46 |
changeset revision number |
| 47 |
.TP |
| 48 |
.B \fB%h\fP |
| 49 |
.sp |
| 50 |
short\-form changeset hash (12 hexadecimal digits) |
| 51 |
.TP |
| 52 |
.B \fB%r\fP |
| 53 |
.sp |
| 54 |
zero\-padded changeset revision number |
| 55 |
.TP |
| 56 |
.B \fB%b\fP |
| 57 |
.sp |
| 58 |
basename of the exporting repository |
| 59 |
.TP |
| 60 |
.B \fB\e\fP |
| 61 |
.sp |
| 62 |
literal "" character |
| 63 |
.UNINDENT |
| 64 |
.sp |
| 65 |
Template: |
| 66 |
.sp |
| 67 |
The following keywords are supported in addition to the common template |
| 68 |
keywords and functions. See also \%\fBhg help templates\fP\:. |
| 69 |
.INDENT 0.0 |
| 70 |
.TP |
| 71 |
.B data |
| 72 |
. |
| 73 |
String. File content. |
| 74 |
.TP |
| 75 |
.B path |
| 76 |
. |
| 77 |
String. Repository\-absolute path of the file. |
| 78 |
.UNINDENT |
| 79 |
.sp |
| 80 |
Returns 0 on success. |
| 81 |
.SH OPTIONS |
| 82 |
.INDENT 0.0 |
| 83 |
.TP |
| 84 |
.BI \-o, \-\-output \ <FORMAT> |
| 85 |
. |
| 86 |
print output to file with formatted name |
| 87 |
.TP |
| 88 |
.BI \-r, \-\-rev \ <REV> |
| 89 |
. |
| 90 |
print the given revision |
| 91 |
.TP |
| 92 |
.B \-\-decode |
| 93 |
. |
| 94 |
apply any matching decode filter |
| 95 |
.TP |
| 96 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 97 |
. |
| 98 |
include names matching the given patterns |
| 99 |
.TP |
| 100 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 101 |
. |
| 102 |
exclude names matching the given patterns |
| 103 |
.TP |
| 104 |
.BI \-T, \-\-template \ <TEMPLATE> |
| 105 |
. |
| 106 |
display with template |
| 107 |
.UNINDENT |
| 108 |
.sp |
| 109 |
[+] marked option can be specified multiple times |
| 110 |
.\" Generated by docutils manpage writer. |
| 111 |
.\" |
| 112 |
. |