Debian Codegraph @

doc/man/hg-export.1

raw
1 .TH HG EXPORT "" "" ""
2 .SH NAME
3 hg export \- dump the header and diffs for one or more changesets
4 .\" Man page generated from reStructuredText.
5 .
6 .SH SYNOPSIS
7 .sp
8 .nf
9 .ft C
10 hg export [OPTION]... [\-o OUTFILESPEC] [\-r] [REV]...
11 .ft P
12 .fi
13 .SH DESCRIPTION
14 .sp
15 Print the changeset header and diffs for one or more revisions.
16 If no revision is given, the parent of the working directory is used.
17 .sp
18 The information shown in the changeset header is: author, date,
19 branch name (if non\-default), changeset hash, parent(s) and commit
20 comment.
21 .IP Note
22 .
23 \%\fBhg export\fP\: may generate unexpected diff output for merge
24 changesets, as it will compare the merge changeset against its
25 first parent only.
26 .RE
27 .sp
28 Output may be to a file, in which case the name of the file is
29 given using a template string. See \%\fBhg help templates\fP\:. In addition
30 to the common template keywords, the following formatting rules are
31 supported:
32 .INDENT 0.0
33 .TP
34 .B \fB%%\fP
35 .sp
36 literal "%" character
37 .TP
38 .B \fB%H\fP
39 .sp
40 changeset hash (40 hexadecimal digits)
41 .TP
42 .B \fB%N\fP
43 .sp
44 number of patches being generated
45 .TP
46 .B \fB%R\fP
47 .sp
48 changeset revision number
49 .TP
50 .B \fB%b\fP
51 .sp
52 basename of the exporting repository
53 .TP
54 .B \fB%h\fP
55 .sp
56 short\-form changeset hash (12 hexadecimal digits)
57 .TP
58 .B \fB%m\fP
59 .sp
60 first line of the commit message (only alphanumeric characters)
61 .TP
62 .B \fB%n\fP
63 .sp
64 zero\-padded sequence number, starting at 1
65 .TP
66 .B \fB%r\fP
67 .sp
68 zero\-padded changeset revision number
69 .TP
70 .B \fB\e\fP
71 .sp
72 literal "" character
73 .UNINDENT
74 .sp
75 Without the \-a/\-\-text option, export will avoid generating diffs
76 of files it detects as binary. With \-a, export will generate a
77 diff anyway, probably with undesirable results.
78 .sp
79 With \-B/\-\-bookmark changesets reachable by the given bookmark are
80 selected.
81 .sp
82 Use the \-g/\-\-git option to generate diffs in the git extended diff
83 format. See \%\fBhg help diffs\fP\: for more information.
84 .sp
85 With the \-\-switch\-parent option, the diff will be against the
86 second parent. It can be useful to review a merge.
87 .sp
88 Template:
89 .sp
90 The following keywords are supported in addition to the common template
91 keywords and functions. See also \%\fBhg help templates\fP\:.
92 .INDENT 0.0
93 .TP
94 .B diff
95 .
96 String. Diff content.
97 .TP
98 .B parents
99 .
100 List of strings. Parent nodes of the changeset.
101 .UNINDENT
102 .sp
103 Examples:
104 .INDENT 0.0
105 .IP \(bu 2
106 .
107 use export and import to transplant a bugfix to the current
108 branch:
109 .sp
110 .nf
111 .ft C
112 hg export \-r 9353 | hg import \-
113 .ft P
114 .fi
115 .IP \(bu 2
116 .
117 export all the changesets between two revisions to a file with
118 rename information:
119 .sp
120 .nf
121 .ft C
122 hg export \-\-git \-r 123:150 > changes.txt
123 .ft P
124 .fi
125 .IP \(bu 2
126 .
127 split outgoing changes into a series of patches with
128 descriptive names:
129 .sp
130 .nf
131 .ft C
132 hg export \-r "outgoing()" \-o "%n\-%m.patch"
133 .ft P
134 .fi
135 .UNINDENT
136 .sp
137 Returns 0 on success.
138 .SH OPTIONS
139 .INDENT 0.0
140 .TP
141 .BI \-B, \-\-bookmark \ <BOOKMARK>
142 .
143 export changes only reachable by given bookmark
144 .TP
145 .BI \-o, \-\-output \ <FORMAT>
146 .
147 print output to file with formatted name
148 .TP
149 .B \-\-switch\-parent
150 .
151 diff against the second parent
152 .TP
153 .BI \-r, \-\-rev \ <REV[+]>
154 .
155 revisions to export
156 .TP
157 .B \-a, \-\-text
158 .
159 treat all files as text
160 .TP
161 .B \-g, \-\-git
162 .
163 use git extended diff format (DEFAULT: diff.git)
164 .TP
165 .B \-\-binary
166 .
167 generate binary diffs in git mode (default)
168 .TP
169 .B \-\-nodates
170 .
171 omit dates from diff headers
172 .TP
173 .BI \-T, \-\-template \ <TEMPLATE>
174 .
175 display with template
176 .UNINDENT
177 .sp
178 [+] marked option can be specified multiple times
179 .\" Generated by docutils manpage writer.
180 .\"
181 .