Mercurial > hg > mercurial-crew-with-dirclash
annotate doc/hg.1.txt @ 496:6ce95a04999d
[PATCH] simplify init
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH] simplify init
From: Bryan O'Sullivan <bos@serpentine.com>
Remove source directory option from "hg init".
manifest hash: 2ace7b16c962fb434340b937fbcd494f3098a85f
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCwQG/ywK+sNU5EO8RArbCAJ9DG45GepMI0Z9KWXqV8gmEbV1WfwCgotih
LGAkD8iTfOLn7HIPVqt9FWY=
=65uW
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Mon, 27 Jun 2005 23:52:31 -0800 |
parents | e94cebc60d96 |
children | 2dcced388cab |
rev | line source |
---|---|
177 | 1 HG(1) |
2 ===== | |
3 Matt Mackall <mpm@selenic.com> | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
4 v0.6, 24 Jun 2005 |
177 | 5 |
6 NAME | |
7 ---- | |
438 | 8 hg - Mercurial source code management system |
177 | 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 OPTIONS | |
19 ------- | |
438 | 20 |
177 | 21 --debug, -d:: |
22 enable debugging output | |
23 | |
24 --quiet, -q:: | |
25 suppress output | |
26 | |
27 --verbose, -v:: | |
28 enable additional output | |
29 | |
30 --noninteractive, -y:: | |
31 do not prompt, assume 'yes' for any required answers | |
32 | |
33 COMMAND ELEMENTS | |
34 ---------------- | |
35 | |
36 files ...:: | |
37 indicates one or more filename or relative path filenames | |
38 | |
39 path:: | |
40 indicates a path on the local machine | |
41 | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
42 revision:: |
438 | 43 indicates a changeset which can be specified as a changeset revision |
44 number, a tag, or a unique substring of the changeset hash value | |
177 | 45 |
46 repository path:: | |
47 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
|
48 repository. There are two available URI protocols, http:// which is |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
49 fast and the old-http:// protocol which is much slower but does not |
438 | 50 require a special server on the web host. |
177 | 51 |
52 COMMANDS | |
53 -------- | |
438 | 54 |
177 | 55 add [files ...]:: |
438 | 56 Add the given files to the repository. Note that this just schedules the |
177 | 57 files for addition at the next hg commit time. |
58 | |
59 addremove:: | |
438 | 60 Add all new files and remove all missing files from the repository. New |
177 | 61 files are ignored if they match any of the patterns in .hgignore |
62 | |
438 | 63 annotate [-r <rev> -u -n -c] [files ...]:: |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
64 List the files with each line showing the revision id responsible |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
65 for that line. |
177 | 66 |
438 | 67 options: |
68 -r, --revision <rev> annotate the specified revision | |
69 -u, --user list the author | |
70 -c, --changeset list the changeset | |
71 -n, --number list the revision number (default) | |
177 | 72 |
438 | 73 cat <file> [revision]:: |
74 Output the given revision or tip of the specified file to stdout. | |
177 | 75 |
485 | 76 clone [-U] <source> [dest]:: |
77 Create a new copy of an existing repository. | |
78 | |
79 If the specified source is on the same filesystem, the repository | |
80 will be copied via hardlinks. This is the fastest and most | |
81 space-efficient mode of operation. | |
82 | |
83 If the destination directory is not specified, it defaults to the | |
84 current directory. | |
85 | |
86 If the destination is specified, but does not exist, it is created. | |
87 | |
88 The source is added to .hg/hgrc in the new copy as the default for | |
89 future pulls. | |
90 | |
91 options: | |
92 -U, --no-update do not update the new working directory | |
93 | |
438 | 94 commit [-A -t -l <file> -t <text> -u <user> -d <datecode>] [files...]:: |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
95 Commit all changed files in the working dir to the repository. This uses |
177 | 96 the EDITOR environment variable to bring up an editor to add a commit |
97 comment. | |
98 | |
438 | 99 Options: |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
100 |
438 | 101 -A, --addremove run addremove during commit |
102 -t, --text <text> use <text> as commit message | |
103 -l, --logfile <file> read the commit message from the specified | |
104 file | |
105 -d, --date <datecode> use the specified date code | |
106 -u, --user <user> record commit as the specified user | |
107 | |
108 aliases: ci | |
109 | |
110 copy <source> <dest>:: | |
111 Mark a file as copied or renamed for the next commit. | |
112 | |
177 | 113 diff [-r revision] [-r revision] [files ...]:: |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
114 Generate a unified diff of the indicated files. If there are no |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
115 revisions specified, the working directory file is compared to |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
116 the tip, one revision specified indicates a comparison between the |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
117 working directory file and the specified revision, and two revisions |
177 | 118 compares the two versions specified. |
119 | |
438 | 120 export [revision]:: |
121 Print the changeset header (author, changeset hash, parent, and commit | |
122 comment) and the diffs for a particular revision. | |
177 | 123 |
438 | 124 forget [files]:: |
125 Undo an 'hg add' scheduled for the next commit. | |
177 | 126 |
438 | 127 heads:: |
128 Show all changesets with no children. These are the "heads" of | |
129 development branches and are the usual targets for updates and merges. | |
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
130 |
177 | 131 history:: |
438 | 132 Print the revision history of the repository. Use the -v switch |
133 for more detail. | |
134 | |
135 identify:: | |
136 Print a short identifier of the current state of the repo. This | |
137 includes one or two parent hash identifiers, followed by | |
138 a "+" if there are uncommitted changes in the working directory, | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
139 followed by a list of tags for this revision. |
438 | 140 |
141 aliases: id | |
142 | |
143 import [-p <n> -b <base> -q] <patches>:: | |
144 Import the listed patches and commit them individually. | |
177 | 145 |
438 | 146 options: |
147 -p, --strip <n> directory strip option for patch | |
148 -b <path> base directory to read patches from | |
149 | |
150 aliases: patch | |
151 | |
496 | 152 init:: |
153 Initialize a new repository in the current directory. | |
177 | 154 |
155 log <file>:: | |
438 | 156 Print the revision history of the specified file. |
177 | 157 |
438 | 158 manifest [revision]:: |
159 Print the indicated revision of the manifest (list of version controlled | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
160 files). |
438 | 161 |
162 parents:: | |
163 Print the working directory's parent revisions. | |
164 | |
165 pull <repository path>:: | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
166 Pull any changes from the specified repository to the repository in the |
438 | 167 current directory. |
168 | |
169 options: | |
170 -u, --update update the working directory to tip after pull | |
171 | |
172 push <destination>:: | |
173 Push changes from the local repository to the specified | |
174 destination. If the destination is local, this is identical to a | |
175 a pull in that directory from the current directory. | |
176 | |
177 The other currently available push method is SSH. This requires an | |
178 accessible shell account on the destination machine and a copy of | |
179 hg in the remote path. Destinations are specified in the following | |
180 form: | |
181 | |
182 ssh://[user@]host[:port]/path | |
183 | |
184 rawcommit [-p -d -u -F -t -l]:: | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
185 Primarily useful for importing from other SCMs. |
177 | 186 |
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
187 recover:: |
438 | 188 Recover from an interrupted commit or pull. This should only be |
189 necessary when Mercurial suggests it. | |
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
190 |
177 | 191 remove [files ...]:: |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
192 Schedule the indicated files for removal from the repository at the next |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
193 commit. |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
194 |
438 | 195 aliases: rm |
177 | 196 |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
197 root:: |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
198 Print the root directory of the current repository. |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
199 |
177 | 200 serve [-a addr -n name -p port -t templatedir]:: |
438 | 201 Start a local HTTP repository browser and pull server. |
202 | |
203 options: | |
204 -a, --address <addr> address to use | |
205 -p, --port <n> port to use (default: 8000) | |
206 -n, --name <name> name to show in web pages (default: working dir) | |
207 -t, --templatedir <path> web templates to use | |
177 | 208 |
209 status:: | |
438 | 210 Show changed files in the working directory. |
211 | |
212 C = changed | |
213 A = added | |
214 R = removed | |
215 ? = not tracked | |
216 | |
217 tag [-t <text> -d <datecode> -u <user>] <name> [revision]:: | |
218 Add a tag <name> to the specified revision or the tip. | |
219 | |
220 options: | |
221 -t, --text <text> message for tag commit log entry | |
222 -d, --date <datecode> datecode for commit | |
223 -u, --user <user> user for commit | |
177 | 224 |
225 tags:: | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
226 List the repository tags. |
438 | 227 |
228 tip:: | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
229 Show the tip revision. |
177 | 230 |
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
231 undo:: |
438 | 232 Undo the last commit or pull transaction. |
233 | |
234 update [-m -C] [revision]:: | |
235 Update or merge the working directory to a specified revision. | |
236 | |
237 If there are no outstanding changes in the working directory and | |
238 there is a linear relationship between the current version and the | |
239 requested version, the result is the requested version. | |
240 | |
241 Otherwise the result is a merge between the contents of the | |
242 current working directory and the requested version. Files that | |
243 changed between either parent are marked as changed for the next | |
244 commit and a commit must be performed before any further updates | |
245 are allowed. Merging will not be performed without the -m flag. | |
246 | |
247 The -C switch will tell Mercurial to forcibly update to the | |
248 specified version, adding, removing, and overwriting locally | |
249 changed fils as necessary. | |
250 | |
251 options: | |
252 -m, --merge allow merging of branches | |
253 -C, --clean overwrite locally modified files | |
254 | |
255 aliases: up checkout co | |
256 | |
257 verify:: | |
258 Verify the integrity of the current repository. | |
259 | |
260 This will perform an extensive check of the repository's | |
261 integrity, validating the hashes and checksums of each entry in | |
262 the changelog, manifest, and tracked files, as well as the | |
263 integrity of their crosslinks and indices. | |
264 | |
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
265 |
177 | 266 ENVIRONMENT VARIABLES |
267 --------------------- | |
438 | 268 |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
269 HGEDITOR:: |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
270 This is the name of the editor to use when committing. Defaults to the |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
271 value of EDITOR. |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
272 |
177 | 273 HGMERGE:: |
438 | 274 An executable to use for resolving merge conflicts. The program , |
275 will be executed with three arguments: local file, remote file, | |
276 ancestor file. | |
277 | |
278 The default program is "hgmerge", which is a shell script provided | |
279 by Mercurial with some sensible defaults. | |
177 | 280 |
281 HGUSER:: | |
438 | 282 This is the string used for the author of a commit. |
177 | 283 |
284 EMAIL:: | |
438 | 285 If HGUSER is not set, this will be used as the author for a commit. |
177 | 286 |
287 LOGNAME:: | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
288 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
438 | 289 '@hostname' appended) as the author value for a commit. |
177 | 290 |
291 EDITOR:: | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
292 This is the name of the editor used in the hgmerge script. It will be |
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
293 used for commit messages, too, if HGEDITOR isn't set. Defaults to 'vi'. |
438 | 294 |
295 PYTHONPATH:: | |
296 This is used by Python to find imported modules and may need to be set | |
297 appropriately if Mercurial is not installed system-wide. | |
177 | 298 |
299 FILES | |
300 ----- | |
301 .hgignore:: | |
438 | 302 This file contains regular expressions (one per line) that describe file |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
303 names that should be ignored by hg. |
177 | 304 |
305 .hgtags:: | |
438 | 306 This file contains changeset hash values and text tag names (one of each |
177 | 307 seperated by spaces) that correspond to tagged versions of the repository |
308 contents. | |
309 | |
438 | 310 $HOME/.hgrc, .hg/hgrc:: |
311 This file contains defaults and configuration. Values in .hg/hgrc | |
312 override those in .hgrc. | |
313 | |
314 NAMED REPOSITORIES | |
315 ------------------ | |
316 | |
487 | 317 To give symbolic names to a repository, create a section in .hgrc |
318 or .hg/hgrc containing assignments of names to paths. Example: | |
438 | 319 |
487 | 320 ----------------- |
438 | 321 [paths] |
322 hg = http://selenic.com/hg | |
478
f1804f2e7f35
Update of doc/hg.1.txt
Thomas Arendsen Hein <thomas@intevation.de>
parents:
438
diff
changeset
|
323 tah = http://hg.intevation.org/mercurial-tah/ |
487 | 324 ----------------- |
325 | |
326 | |
327 HOOKS | |
328 ----- | |
329 | |
330 Mercurial supports a set of 'hook', commands that get automatically | |
331 executed by various actions such as starting or finishing a commit. To | |
332 specify a hook, simply create an hgrc section like the following: | |
333 | |
334 ----------------- | |
335 [hooks] | |
336 precommit = echo "this hook gets executed immediately before a commit" | |
337 commit = hg export $NODE | mail -s "new commit $NODE" commit-list | |
338 ----------------- | |
339 | |
181
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
340 |
321 | 341 NON_TRANSPARENT PROXY SUPPORT |
438 | 342 ----------------------------- |
321 | 343 |
487 | 344 To access a Mercurial repository through a proxy, create a file |
345 $HOME/.hgrc in the following format: | |
321 | 346 |
487 | 347 -------------- |
321 | 348 [http_proxy] |
349 host=myproxy:8080 | |
350 user=<username> | |
351 passwd=<password> | |
352 no=<localhost1>,<localhost2>,<localhost3>,... | |
487 | 353 -------------- |
321 | 354 |
487 | 355 "user","passwd" fields are used for authenticating proxies, "no" is a |
356 comma-separated list of local host names for which proxy must be | |
357 bypassed. | |
358 | |
321 | 359 |
177 | 360 BUGS |
361 ---- | |
362 Probably lots, please post them to the mailing list (See Resources below) | |
363 when you find them. | |
364 | |
365 AUTHOR | |
366 ------ | |
367 Written by Matt Mackall <mpm@selenic.com> | |
368 | |
369 RESOURCES | |
370 --------- | |
371 http://selenic.com/mercurial[Main Web Site] | |
372 | |
373 http://selenic.com/hg[Source code repository] | |
374 | |
375 http://selenic.com/mailman/listinfo/mercurial[Mailing list] | |
376 | |
377 COPYING | |
378 ------- | |
379 Copyright (C) 2005 Matt Mackall. | |
380 Free use of this software is granted under the terms of the GNU General | |
381 Public License (GPL). |