author | mpm@selenic.com |
Fri, 27 May 2005 13:09:56 -0800 | |
changeset 182 | 089594a5bbde |
parent 178 | b3bf5a0edd69 |
parent 181 | 038e4d8602bd |
child 196 | 48827121af7e |
permissions | -rw-r--r-- |
177 | 1 |
HG(1) |
2 |
===== |
|
3 |
Matt Mackall <mpm@selenic.com> |
|
4 |
v0.5, 27 May 2005 |
|
5 |
||
6 |
NAME |
|
7 |
---- |
|
8 |
hg - command line interface to the Mercurial source code management system |
|
9 |
||
10 |
SYNOPSIS |
|
11 |
-------- |
|
12 |
'hg' [-v -d -q -y] <command> [command options] [files] |
|
13 |
||
14 |
DESCRIPTION |
|
15 |
----------- |
|
16 |
The hg(1) command provides a command line interface to the Mercurial system. |
|
17 |
||
18 |
NOTE |
|
19 |
---- |
|
20 |
Many of the hg commands are not yet subdirectory and/or working directory |
|
21 |
aware. This means that some commands will only work in the top level |
|
22 |
repository directory or will only accept paths and filenames relative to the |
|
23 |
top level. Merges and commits, in particular, should be done in the |
|
24 |
top-level directory. |
|
25 |
||
26 |
OPTIONS |
|
27 |
------- |
|
28 |
--debug, -d:: |
|
29 |
enable debugging output |
|
30 |
||
31 |
--quiet, -q:: |
|
32 |
suppress output |
|
33 |
||
34 |
--verbose, -v:: |
|
35 |
enable additional output |
|
36 |
||
37 |
--noninteractive, -y:: |
|
38 |
do not prompt, assume 'yes' for any required answers |
|
39 |
||
40 |
COMMAND ELEMENTS |
|
41 |
---------------- |
|
42 |
||
43 |
files ...:: |
|
44 |
indicates one or more filename or relative path filenames |
|
45 |
||
46 |
path:: |
|
47 |
indicates a path on the local machine |
|
48 |
||
49 |
revision:: |
|
50 |
indicates a changeset which can be specified as a changeset id (int), |
|
51 |
a tag, or a unique substring of the changeset hash value |
|
52 |
||
53 |
repository path:: |
|
54 |
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
|
55 |
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
|
56 |
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
|
57 |
require python on the web host. |
177 | 58 |
|
59 |
COMMANDS |
|
60 |
-------- |
|
61 |
add [files ...]:: |
|
62 |
add the given files to the repository. Note that this just schedules the |
|
63 |
files for addition at the next hg commit time. |
|
64 |
||
65 |
addremove:: |
|
66 |
add all new files and remove all missing files from the repository. new |
|
67 |
files are ignored if they match any of the patterns in .hgignore |
|
68 |
||
69 |
annotate [-r revision -u -n -c] [files ...]:: |
|
70 |
list the files with each line showing the revision id responsible |
|
71 |
for that line. -u will add the author to the revision id, -c will |
|
72 |
print the changeset hash, and -n will ... |
|
73 |
||
74 |
branch <path>:: |
|
75 |
create a new branch of the repository indicated by path in the current |
|
76 |
directory. Note that there should not be a repository already initialized |
|
77 |
in the current directory |
|
78 |
||
79 |
checkout [revision]:: |
|
80 |
check out the indicated version of the repository into the working |
|
81 |
directory. Note that currently no merge occurs with changed files |
|
82 |
in the working dir. |
|
83 |
||
84 |
commit:: |
|
85 |
commit all changed files in the working dir to the repository. This uses |
|
86 |
the EDITOR environment variable to bring up an editor to add a commit |
|
87 |
comment. |
|
88 |
||
89 |
diff [-r revision] [-r revision] [files ...]:: |
|
90 |
generate a unified diff of the indicated files. If there are no |
|
91 |
revisions specified, the working directory file is compared to |
|
92 |
the tip, one revision specified indicates a comparison between the |
|
93 |
working directory file and the specified revision, two revisions |
|
94 |
compares the two versions specified. |
|
95 |
||
96 |
dump <file> [revision]:: |
|
97 |
print the indicated revision of the file |
|
98 |
||
99 |
dumpmanifest [revision]:: |
|
100 |
print the indicated revision of the manifest (list of version controlled |
|
101 |
files) |
|
102 |
||
103 |
history:: |
|
104 |
print the revision history of the repository |
|
105 |
||
106 |
init:: |
|
107 |
initialize a repository in the current directory |
|
108 |
||
109 |
log <file>:: |
|
110 |
print the revision history of the specified file |
|
111 |
||
112 |
merge <repository path>:: |
|
113 |
pull any changes from the specified repository to the repository in the |
|
114 |
current directory. Use the value of the HGMERGE environment variable |
|
115 |
as a program to resolve any merge conflicts between the two repositories. |
|
116 |
An implicit commit is done at the end of this process if there were any |
|
117 |
merge conflicts. Note that merge does not yet merge with changed files |
|
118 |
in the working dir. |
|
119 |
||
120 |
remove [files ...]:: |
|
121 |
schedule the indicated files for removal from the repository at the next |
|
122 |
commit |
|
123 |
||
124 |
serve [-a addr -n name -p port -t templatedir]:: |
|
125 |
this will start an http server, by default on port 8000, that will |
|
126 |
allow browsing the repository using the hgweb interface and will allow |
|
127 |
merging from the repository. -a sets the interface address, -p the |
|
128 |
port to listen on, -n the name of the repository and -t sets the |
|
129 |
location of the template directory. |
|
130 |
||
131 |
status:: |
|
132 |
list new, changed, and missing files in the working directory |
|
133 |
||
134 |
tags:: |
|
135 |
list the current tags |
|
136 |
||
137 |
ENVIRONMENT VARIABLES |
|
138 |
--------------------- |
|
139 |
HGMERGE:: |
|
140 |
points to an executable to use for resolving merge conflicts, the |
|
141 |
program will be executed with four arguments: local file, remote |
|
142 |
file, ancestor file, and original filename. |
|
143 |
||
144 |
HGUSER:: |
|
145 |
this is the string used for the author value of a commit |
|
146 |
||
147 |
HG_OPTS:: |
|
148 |
this string is used for default arguments to hg |
|
149 |
||
150 |
PYTHONPATH:: |
|
151 |
this is used by Python to find imported modules and needs to be set |
|
152 |
appropriately based on where mercurial is installed |
|
153 |
||
154 |
EMAIL:: |
|
155 |
if HGUSER is not set, this will be used next as the author value for |
|
156 |
a commit |
|
157 |
||
158 |
LOGNAME:: |
|
159 |
if neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
|
160 |
'@hostname' appended) as the author value for a commit |
|
161 |
||
162 |
EDITOR:: |
|
163 |
this is the name of the editor to use when committing |
|
164 |
||
165 |
FILES |
|
166 |
----- |
|
167 |
.hgignore:: |
|
168 |
this file contains regular expressions (one per line) that describe file |
|
169 |
names that should be ignored by hg |
|
170 |
||
171 |
.hgtags:: |
|
172 |
this file contains changeset hash values and text tag names (one of each |
|
173 |
seperated by spaces) that correspond to tagged versions of the repository |
|
174 |
contents. |
|
175 |
||
181
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
176 |
$HOME/.hgpaths:: |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
177 |
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
|
178 |
(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
|
179 |
<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
|
180 |
|
177 | 181 |
BUGS |
182 |
---- |
|
183 |
Probably lots, please post them to the mailing list (See Resources below) |
|
184 |
when you find them. |
|
185 |
||
186 |
AUTHOR |
|
187 |
------ |
|
188 |
Written by Matt Mackall <mpm@selenic.com> |
|
189 |
||
190 |
RESOURCES |
|
191 |
--------- |
|
192 |
http://selenic.com/mercurial[Main Web Site] |
|
193 |
||
194 |
http://selenic.com/hg[Source code repository] |
|
195 |
||
196 |
http://selenic.com/mailman/listinfo/mercurial[Mailing list] |
|
197 |
||
198 |
COPYING |
|
199 |
------- |
|
200 |
Copyright (C) 2005 Matt Mackall. |
|
201 |
Free use of this software is granted under the terms of the GNU General |
|
202 |
Public License (GPL). |