author | Thomas Arendsen Hein <thomas@intevation.de> |
Thu, 02 Jun 2005 07:06:29 +0100 | |
changeset 234 | 3427806d5ab9 |
parent 196 | 48827121af7e |
permissions | -rw-r--r-- |
177 | 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 |
<html> |
|
3 |
<head> |
|
4 |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
|
5 |
<meta name="generator" content="AsciiDoc 6.0.3"> |
|
6 |
<meta name="author" content="Matt Mackall"> |
|
7 |
<meta name="author-email" content="mpm@selenic.com"> |
|
8 |
<title>HG(1)</title> |
|
9 |
</head> |
|
10 |
<body> |
|
11 |
<h1>HG(1)</h1> |
|
12 |
<p> |
|
13 |
<strong>by Matt Mackall</strong><br /> |
|
14 |
<tt><<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>></tt><br /> |
|
15 |
v0.5, |
|
16 |
27 May 2005 |
|
17 |
</p> |
|
18 |
<hr /> |
|
19 |
<h2>NAME</h2> |
|
20 |
<p> |
|
21 |
hg - command line interface to the Mercurial source code management system |
|
22 |
</p> |
|
23 |
<hr /> |
|
24 |
<h2>SYNOPSIS</h2> |
|
25 |
<p> |
|
26 |
<em>hg</em> [-v -d -q -y] <command> [command options] [files] |
|
27 |
</p> |
|
28 |
<hr /> |
|
29 |
<h2>DESCRIPTION</h2> |
|
30 |
<p> |
|
31 |
The hg(1) command provides a command line interface to the Mercurial system. |
|
32 |
</p> |
|
33 |
<hr /> |
|
34 |
<h2>NOTE</h2> |
|
35 |
<p> |
|
36 |
Many of the hg commands are not yet subdirectory and/or working directory |
|
37 |
aware. This means that some commands will only work in the top level |
|
38 |
repository directory or will only accept paths and filenames relative to the |
|
39 |
top level. Merges and commits, in particular, should be done in the |
|
40 |
top-level directory. |
|
41 |
</p> |
|
42 |
<hr /> |
|
43 |
<h2>OPTIONS</h2> |
|
44 |
<dl> |
|
45 |
<dt> |
|
46 |
—debug, -d |
|
47 |
</dt> |
|
48 |
<dd> |
|
49 |
||
50 |
enable debugging output |
|
51 |
||
52 |
</dd> |
|
53 |
<dt> |
|
54 |
—quiet, -q |
|
55 |
</dt> |
|
56 |
<dd> |
|
57 |
||
58 |
suppress output |
|
59 |
||
60 |
</dd> |
|
61 |
<dt> |
|
62 |
—verbose, -v |
|
63 |
</dt> |
|
64 |
<dd> |
|
65 |
||
66 |
enable additional output |
|
67 |
||
68 |
</dd> |
|
69 |
<dt> |
|
70 |
—noninteractive, -y |
|
71 |
</dt> |
|
72 |
<dd> |
|
73 |
||
74 |
do not prompt, assume <em>yes</em> for any required answers |
|
75 |
||
76 |
</dd> |
|
77 |
</dl> |
|
78 |
<hr /> |
|
79 |
<h2>COMMAND ELEMENTS</h2> |
|
80 |
<dl> |
|
81 |
<dt> |
|
82 |
files … |
|
83 |
</dt> |
|
84 |
<dd> |
|
85 |
||
86 |
indicates one or more filename or relative path filenames |
|
87 |
||
88 |
</dd> |
|
89 |
<dt> |
|
90 |
path |
|
91 |
</dt> |
|
92 |
<dd> |
|
93 |
||
94 |
indicates a path on the local machine |
|
95 |
||
96 |
</dd> |
|
97 |
<dt> |
|
98 |
revision |
|
99 |
</dt> |
|
100 |
<dd> |
|
101 |
||
102 |
indicates a changeset which can be specified as a changeset id (int), |
|
103 |
a tag, or a unique substring of the changeset hash value |
|
104 |
||
105 |
</dd> |
|
106 |
<dt> |
|
107 |
repository path |
|
108 |
</dt> |
|
109 |
<dd> |
|
110 |
||
111 |
is either the pathname of a local repository of the URI of a remote |
|
181
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
112 |
repository. There are two available URI protocols, http:// which is |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
113 |
fast and the old-http:// protocol which is much slower but does not |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
114 |
require python on the web host. |
177 | 115 |
|
116 |
</dd> |
|
117 |
</dl> |
|
118 |
<hr /> |
|
119 |
<h2>COMMANDS</h2> |
|
120 |
<dl> |
|
121 |
<dt> |
|
122 |
add [files …] |
|
123 |
</dt> |
|
124 |
<dd> |
|
125 |
||
126 |
add the given files to the repository. Note that this just schedules the |
|
127 |
files for addition at the next hg commit time. |
|
128 |
||
129 |
</dd> |
|
130 |
<dt> |
|
131 |
addremove |
|
132 |
</dt> |
|
133 |
<dd> |
|
134 |
||
135 |
add all new files and remove all missing files from the repository. new |
|
136 |
files are ignored if they match any of the patterns in .hgignore |
|
137 |
||
138 |
</dd> |
|
139 |
<dt> |
|
140 |
annotate [-r revision -u -n -c] [files …] |
|
141 |
</dt> |
|
142 |
<dd> |
|
143 |
||
144 |
list the files with each line showing the revision id responsible |
|
145 |
for that line. -u will add the author to the revision id, -c will |
|
146 |
print the changeset hash, and -n will … |
|
147 |
||
148 |
</dd> |
|
149 |
<dt> |
|
150 |
branch <path> |
|
151 |
</dt> |
|
152 |
<dd> |
|
153 |
||
154 |
create a new branch of the repository indicated by path in the current |
|
155 |
directory. Note that there should not be a repository already initialized |
|
156 |
in the current directory |
|
157 |
||
158 |
</dd> |
|
159 |
<dt> |
|
160 |
checkout [revision] |
|
161 |
</dt> |
|
162 |
<dd> |
|
163 |
||
164 |
check out the indicated version of the repository into the working |
|
165 |
directory. Note that currently no merge occurs with changed files |
|
166 |
in the working dir. |
|
167 |
||
168 |
</dd> |
|
169 |
<dt> |
|
170 |
commit |
|
171 |
</dt> |
|
172 |
<dd> |
|
173 |
||
174 |
commit all changed files in the working dir to the repository. This uses |
|
175 |
the EDITOR environment variable to bring up an editor to add a commit |
|
176 |
comment. |
|
177 |
||
178 |
</dd> |
|
179 |
<dt> |
|
180 |
diff [-r revision] [-r revision] [files …] |
|
181 |
</dt> |
|
182 |
<dd> |
|
183 |
||
184 |
generate a unified diff of the indicated files. If there are no |
|
185 |
revisions specified, the working directory file is compared to |
|
186 |
the tip, one revision specified indicates a comparison between the |
|
187 |
working directory file and the specified revision, two revisions |
|
188 |
compares the two versions specified. |
|
189 |
||
190 |
</dd> |
|
191 |
<dt> |
|
192 |
dump <file> [revision] |
|
193 |
</dt> |
|
194 |
<dd> |
|
195 |
||
196 |
print the indicated revision of the file |
|
197 |
||
198 |
</dd> |
|
199 |
<dt> |
|
200 |
dumpmanifest [revision] |
|
201 |
</dt> |
|
202 |
<dd> |
|
203 |
||
204 |
print the indicated revision of the manifest (list of version controlled |
|
205 |
files) |
|
206 |
||
207 |
</dd> |
|
208 |
<dt> |
|
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
209 |
export [revision] |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
210 |
</dt> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
211 |
<dd> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
212 |
|
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
213 |
print the changeset header (author, changeset hash, parent, and commit |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
214 |
comment) and the diffs for a particular revision. |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
215 |
|
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
216 |
</dd> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
217 |
<dt> |
177 | 218 |
history |
219 |
</dt> |
|
220 |
<dd> |
|
221 |
||
222 |
print the revision history of the repository |
|
223 |
||
224 |
</dd> |
|
225 |
<dt> |
|
226 |
init |
|
227 |
</dt> |
|
228 |
<dd> |
|
229 |
||
230 |
initialize a repository in the current directory |
|
231 |
||
232 |
</dd> |
|
233 |
<dt> |
|
234 |
log <file> |
|
235 |
</dt> |
|
236 |
<dd> |
|
237 |
||
238 |
print the revision history of the specified file |
|
239 |
||
240 |
</dd> |
|
241 |
<dt> |
|
242 |
merge <repository path> |
|
243 |
</dt> |
|
244 |
<dd> |
|
245 |
||
246 |
pull any changes from the specified repository to the repository in the |
|
247 |
current directory. Use the value of the HGMERGE environment variable |
|
248 |
as a program to resolve any merge conflicts between the two repositories. |
|
249 |
An implicit commit is done at the end of this process if there were any |
|
250 |
merge conflicts. Note that merge does not yet merge with changed files |
|
251 |
in the working dir. |
|
252 |
||
253 |
</dd> |
|
254 |
<dt> |
|
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
255 |
recover |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
256 |
</dt> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
257 |
<dd> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
258 |
|
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
259 |
rollback an interrupted transaction |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
260 |
|
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
261 |
</dd> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
262 |
<dt> |
177 | 263 |
remove [files …] |
264 |
</dt> |
|
265 |
<dd> |
|
266 |
||
267 |
schedule the indicated files for removal from the repository at the next |
|
268 |
commit |
|
269 |
||
270 |
</dd> |
|
271 |
<dt> |
|
272 |
serve [-a addr -n name -p port -t templatedir] |
|
273 |
</dt> |
|
274 |
<dd> |
|
275 |
||
276 |
this will start an http server, by default on port 8000, that will |
|
277 |
allow browsing the repository using the hgweb interface and will allow |
|
278 |
merging from the repository. -a sets the interface address, -p the |
|
279 |
port to listen on, -n the name of the repository and -t sets the |
|
280 |
location of the template directory. |
|
281 |
||
282 |
</dd> |
|
283 |
<dt> |
|
284 |
status |
|
285 |
</dt> |
|
286 |
<dd> |
|
287 |
||
288 |
list new, changed, and missing files in the working directory |
|
289 |
||
290 |
</dd> |
|
291 |
<dt> |
|
292 |
tags |
|
293 |
</dt> |
|
294 |
<dd> |
|
295 |
||
296 |
list the current tags |
|
297 |
||
298 |
</dd> |
|
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
299 |
<dt> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
300 |
undo |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
301 |
</dt> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
302 |
<dd> |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
303 |
|
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
304 |
undo the last transaction |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
305 |
|
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
306 |
</dd> |
177 | 307 |
</dl> |
308 |
<hr /> |
|
309 |
<h2>ENVIRONMENT VARIABLES</h2> |
|
310 |
<dl> |
|
311 |
<dt> |
|
312 |
HGMERGE |
|
313 |
</dt> |
|
314 |
<dd> |
|
315 |
||
316 |
points to an executable to use for resolving merge conflicts, the |
|
317 |
program will be executed with four arguments: local file, remote |
|
318 |
file, ancestor file, and original filename. |
|
319 |
||
320 |
</dd> |
|
321 |
<dt> |
|
322 |
HGUSER |
|
323 |
</dt> |
|
324 |
<dd> |
|
325 |
||
326 |
this is the string used for the author value of a commit |
|
327 |
||
328 |
</dd> |
|
329 |
<dt> |
|
330 |
HG_OPTS |
|
331 |
</dt> |
|
332 |
<dd> |
|
333 |
||
334 |
this string is used for default arguments to hg |
|
335 |
||
336 |
</dd> |
|
337 |
<dt> |
|
338 |
PYTHONPATH |
|
339 |
</dt> |
|
340 |
<dd> |
|
341 |
||
342 |
this is used by Python to find imported modules and needs to be set |
|
343 |
appropriately based on where mercurial is installed |
|
344 |
||
345 |
</dd> |
|
346 |
<dt> |
|
347 |
||
348 |
</dt> |
|
349 |
<dd> |
|
350 |
||
351 |
if HGUSER is not set, this will be used next as the author value for |
|
352 |
a commit |
|
353 |
||
354 |
</dd> |
|
355 |
<dt> |
|
356 |
LOGNAME |
|
357 |
</dt> |
|
358 |
<dd> |
|
359 |
||
360 |
if neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
|
361 |
<em>@hostname</em> appended) as the author value for a commit |
|
362 |
||
363 |
</dd> |
|
364 |
<dt> |
|
365 |
EDITOR |
|
366 |
</dt> |
|
367 |
<dd> |
|
368 |
||
369 |
this is the name of the editor to use when committing |
|
370 |
||
371 |
</dd> |
|
372 |
</dl> |
|
373 |
<hr /> |
|
374 |
<h2>FILES</h2> |
|
375 |
<dl> |
|
376 |
<dt> |
|
377 |
.hgignore |
|
378 |
</dt> |
|
379 |
<dd> |
|
380 |
||
381 |
this file contains regular expressions (one per line) that describe file |
|
382 |
names that should be ignored by hg |
|
383 |
||
384 |
</dd> |
|
385 |
<dt> |
|
386 |
.hgtags |
|
387 |
</dt> |
|
388 |
<dd> |
|
389 |
||
390 |
this file contains changeset hash values and text tag names (one of each |
|
391 |
seperated by spaces) that correspond to tagged versions of the repository |
|
392 |
contents. |
|
393 |
||
394 |
</dd> |
|
181
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
395 |
<dt> |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
396 |
$HOME/.hgpaths |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
397 |
</dt> |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
398 |
<dd> |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
399 |
|
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
400 |
this file contains a mapping from a symbolic name to a repository path |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
401 |
(which could be a local path or a remote URI), the format is |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
402 |
<symbolic name> <repository path> with each mapping on a seperate line |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
403 |
|
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
404 |
</dd> |
177 | 405 |
</dl> |
406 |
<hr /> |
|
407 |
<h2>BUGS</h2> |
|
408 |
<p> |
|
409 |
Probably lots, please post them to the mailing list (See Resources below) |
|
410 |
when you find them. |
|
411 |
</p> |
|
412 |
<hr /> |
|
413 |
<h2>AUTHOR</h2> |
|
414 |
<p> |
|
415 |
Written by Matt Mackall <mpm@selenic.com> |
|
416 |
</p> |
|
417 |
<hr /> |
|
418 |
<h2>RESOURCES</h2> |
|
419 |
<p> |
|
420 |
<a href="http://selenic.com/mercurial">Main Web Site</a> |
|
421 |
</p> |
|
422 |
<p> |
|
423 |
<a href="http://selenic.com/hg">Source code repository</a> |
|
424 |
</p> |
|
425 |
<p> |
|
426 |
<a href="http://selenic.com/mailman/listinfo/mercurial">Mailing list</a> |
|
427 |
</p> |
|
428 |
<hr /> |
|
429 |
<h2>COPYING</h2> |
|
430 |
<p> |
|
431 |
Copyright © 2005 Matt Mackall. |
|
432 |
Free use of this software is granted under the terms of the GNU General |
|
433 |
Public License (GPL). |
|
434 |
</p> |
|
435 |
<p></p> |
|
436 |
<p></p> |
|
437 |
<hr /><p><small> |
|
438 |
Version 0.5<br /> |
|
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
439 |
Last updated 27-May-2005 15:51:06 MDT |
177 | 440 |
</small></p> |
441 |
</body> |
|
442 |
</html> |