Mercurial > hg > mercurial-crew-with-dirclash
comparison doc/hg.1.txt @ 498:8cf3999b3d03
Various doc clean-ups and spelling fixes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Various doc clean-ups and spelling fixes
manifest hash: 4115506709314aabfb4a66973ef2bc8f22f2225b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCwQ5YywK+sNU5EO8RAkAlAJoCsXCgEQ1lmS58aSrUyPf+KIK99gCeLY/v
Tg9JhygJjwsu5xocc9Nh04Y=
=JTG4
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Tue, 28 Jun 2005 00:46:16 -0800 |
parents | 2dcced388cab |
children | dc1f735dfaac |
comparison
equal
deleted
inserted
replaced
497:2dcced388cab | 498:8cf3999b3d03 |
---|---|
1 HG(1) | 1 HG(1) |
2 ===== | 2 ===== |
3 Matt Mackall <mpm@selenic.com> | 3 Matt Mackall <mpm@selenic.com> |
4 v0.6, 24 Jun 2005 | |
5 | 4 |
6 NAME | 5 NAME |
7 ---- | 6 ---- |
8 hg - Mercurial source code management system | 7 hg - Mercurial source code management system |
9 | 8 |
42 revision:: | 41 revision:: |
43 indicates a changeset which can be specified as a changeset revision | 42 indicates a changeset which can be specified as a changeset revision |
44 number, a tag, or a unique substring of the changeset hash value | 43 number, a tag, or a unique substring of the changeset hash value |
45 | 44 |
46 repository path:: | 45 repository path:: |
47 is either the pathname of a local repository of the URI of a remote | 46 either the pathname of a local repository or the URI of a remote |
48 repository. There are two available URI protocols, http:// which is | 47 repository. There are two available URI protocols, http:// which is |
49 fast and the old-http:// protocol which is much slower but does not | 48 fast and the old-http:// protocol which is much slower but does not |
50 require a special server on the web host. | 49 require a special server on the web host. |
51 | 50 |
52 COMMANDS | 51 COMMANDS |
53 -------- | 52 -------- |
54 | 53 |
55 add [files ...]:: | 54 add [files ...]:: |
56 Schedule files to be version controlled and added to the repository. | 55 Schedule files to be version controlled and added to the repository. |
57 | 56 |
58 The files get effectively added to the repository at the next commit. | 57 The files will be added to the repository at the next commit. |
59 | 58 |
60 addremove:: | 59 addremove:: |
61 Add all new files and remove all missing files from the repository. | 60 Add all new files and remove all missing files from the repository. |
62 | 61 |
63 New files are ignored if they match any of the patterns in .hgignore. As | 62 New files are ignored if they match any of the patterns in .hgignore. As |
64 with add, the effects of this command take place at the next commit. | 63 with add, these changes take effect at the next commit. |
65 | 64 |
66 annotate [-r <rev> -u -n -c] [files ...]:: | 65 annotate [-r <rev> -u -n -c] [files ...]:: |
67 List changes in files, showing the revision id responsible for each line | 66 List changes in files, showing the revision id responsible for each line |
68 | 67 |
69 This command is useful to discover who did a change or when a change took | 68 This command is useful to discover who did a change or when a change took |
76 -n, --number list the revision number (default) | 75 -n, --number list the revision number (default) |
77 | 76 |
78 cat <file> [revision]:: | 77 cat <file> [revision]:: |
79 Output to stdout the given revision for the specified file. | 78 Output to stdout the given revision for the specified file. |
80 | 79 |
81 In case no revision is given, then the tip is used. | 80 If no revision is given then the tip is used. |
82 | 81 |
83 clone [-U] <source> [dest]:: | 82 clone [-U] <source> [dest]:: |
84 Create a copy of an existing repository in a new directory. | 83 Create a copy of an existing repository in a new directory. |
85 | 84 |
86 If the destination directory is specified, but doesn't exist, it is | 85 If the destination directory is specified but doesn't exist, it is |
87 created. If no destination directory is specified, it defaults to the | 86 created. If no destination directory is specified, it defaults to the |
88 current directory. | 87 current directory. |
89 | 88 |
90 The source is added to the new copy's .hg/hgrc file to be used in | 89 The source is added to the new repository's .hg/hgrc file to be used in |
91 future pulls. | 90 future pulls. |
92 | 91 |
93 For speed and storage size, hardlinks are used to do the copy whenever | 92 For efficiency, hardlinks are used for cloning whenever the |
94 the specified source and destination are on the same filesystem. | 93 source and destination are on the same filesystem. |
95 | 94 |
96 options: | 95 options: |
97 -U, --no-update do not update the new working directory | 96 -U, --no-update do not update the new working directory |
98 | 97 |
99 commit [-A -t -l <file> -t <text> -u <user> -d <datecode>] [files...]:: | 98 commit [-A -t -l <file> -t <text> -u <user> -d <datecode>] [files...]:: |
100 Incorporate changes from given files into the repository. | 99 Commit changes to the given files into the repository. |
101 | 100 |
102 If a list of files is ommited, all of the working dir files will | 101 If a list of files is omitted, all changes reported by "hg status" |
103 be commited. | 102 will be commited. |
104 | 103 |
105 The EDITOR environment variable is used to bring up an editor to add | 104 The HGEDITOR or EDITOR environment variables are used to start an |
106 a commit comment. | 105 editor to add a commit comment. |
107 | 106 |
108 Options: | 107 Options: |
109 | 108 |
110 -A, --addremove run addremove during commit | 109 -A, --addremove run addremove during commit |
111 -t, --text <text> use <text> as commit message | 110 -t, --text <text> use <text> as commit message |
123 diff [-r revision] [-r revision] [files ...]:: | 122 diff [-r revision] [-r revision] [files ...]:: |
124 Show differences between revisions for the specified files. | 123 Show differences between revisions for the specified files. |
125 | 124 |
126 Differences between files are shown using the unified diff format. | 125 Differences between files are shown using the unified diff format. |
127 | 126 |
128 When two revision arguments are given, then changes are shown between | 127 When two revision arguments are given, then changes are shown |
129 such revisions. If only one revision is specified then that revision is | 128 between those revisions. If only one revision is specified then |
130 compared to the tip, and, when no revisions are specified, the working | 129 that revision is compared to the working directory, and, when no |
131 directory files are compared to the tip. | 130 revisions are specified, the working directory files are compared |
131 to its parent. | |
132 | 132 |
133 export [revision]:: | 133 export [revision]:: |
134 Print the changeset header and diffs for a particular revision. | 134 Print the changeset header and diffs for a particular revision. |
135 | 135 |
136 The information shown in the changeset header is: author, changeset hash, | 136 The information shown in the changeset header is: author, changeset hash, |
140 Undo an 'hg add' scheduled for the next commit. | 140 Undo an 'hg add' scheduled for the next commit. |
141 | 141 |
142 heads:: | 142 heads:: |
143 Show all repository head changesets. | 143 Show all repository head changesets. |
144 | 144 |
145 Repository "heads" are changesets that don't have children changesets. | 145 Repository "heads" are changesets that don't have children |
146 They are where development generally takes place and are the usual targets | 146 changesets. They are where development generally takes place and |
147 for update and merge operations. | 147 are the usual targets for update and merge operations. |
148 | 148 |
149 history:: | 149 history:: |
150 Print a log of the revision history of the repository. | 150 Print a log of the revision history of the repository. |
151 | 151 |
152 By default this command outputs: changeset id and hash, tags, parents, | 152 By default this command outputs: changeset id and hash, tags, |
153 user, date and time, and a summary for each commit. | 153 parents, user, date and time, and a summary for each commit. The |
154 The -v switch adds some more detail, such as changed files, manifest | 154 -v switch adds some more detail, such as changed files, manifest |
155 hashes or message signatures. | 155 hashes or message signatures. |
156 | 156 |
157 To display the history of a given file, see the log command. | 157 To display the history of a given file, see the log command. |
158 | 158 |
159 identify:: | 159 identify:: |
173 meaning as the correnponding patch option | 173 meaning as the correnponding patch option |
174 -b <path> base directory to read patches from | 174 -b <path> base directory to read patches from |
175 | 175 |
176 aliases: patch | 176 aliases: patch |
177 | 177 |
178 | |
179 If the specified source is on the same filesystem, the repository | |
180 will be copied via hardlinks. This is the fastest and most | |
181 space-efficient mode of operation. | |
182 | |
183 If the destination directory is not specified, it defaults to the | |
184 current directory. | |
185 | |
186 If the destination is specified, but does not exist, it is created. | |
187 | |
188 The source is added to .hg/hgrc in the new copy as the default for | |
189 future pulls. | |
190 | |
191 options: | |
192 -U, --no-update do not update the new working directory | |
193 | |
194 init:: | 178 init:: |
195 Initialize a new repository in the current directory. | 179 Initialize a new repository in the current directory. |
196 | 180 |
197 log <file>:: | 181 log <file>:: |
198 Print the revision history of the specified file. | 182 Print the revision history of the specified file. |
208 | 192 |
209 parents:: | 193 parents:: |
210 Print the working directory's parent revisions. | 194 Print the working directory's parent revisions. |
211 | 195 |
212 pull <repository path>:: | 196 pull <repository path>:: |
213 Pull any changes from a repository to the current directory's one. | 197 Pull changes from a remote repository to a local one. |
214 | 198 |
215 Pulling is a fundamental operation in a distributed version control system, | 199 This finds all changes from the repository at the specified path |
216 as it eases handling changes from different branches, both local and | 200 or URL and adds them to the local repository. By default, this |
217 remote, into the current repository. | 201 does not update the copy of the project in the working directory. |
218 | 202 |
219 options: | 203 options: |
220 -u, --update update the working directory to tip after pull | 204 -u, --update update the working directory to tip after pull |
221 | 205 |
222 push <destination>:: | 206 push <destination>:: |
223 Push changes from the local repository to the given destination. | 207 Push changes from the local repository to the given destination. |
224 | 208 |
225 This is the symmetrical operation for pull. It helps to move changes from | 209 This is the symmetrical operation for pull. It helps to move |
226 the current repository to a different one. If the destination is local | 210 changes from the current repository to a different one. If the |
227 this is identical to a pull in that directory from the current one. | 211 destination is local this is identical to a pull in that directory |
212 from the current one. | |
228 | 213 |
229 The other currently available push method is SSH. This requires an | 214 The other currently available push method is SSH. This requires an |
230 accessible shell account on the destination machine and a copy of | 215 accessible shell account on the destination machine and a copy of |
231 hg in the remote path. Destinations are specified in the following | 216 hg in the remote path. Destinations are specified in the following |
232 form: | 217 form: |
246 operation. It should only be necessary when Mercurial suggests it. | 231 operation. It should only be necessary when Mercurial suggests it. |
247 | 232 |
248 remove [files ...]:: | 233 remove [files ...]:: |
249 Schedule the indicated files for removal from the repository. | 234 Schedule the indicated files for removal from the repository. |
250 | 235 |
251 This command shedules the files to be removed, but the actual removing | 236 This command shedules the files to be removed at the next commit. |
252 takes place at the next commit. | 237 This only removes files from the current branch, not from the |
238 entire project history. | |
253 | 239 |
254 aliases: rm | 240 aliases: rm |
255 | 241 |
256 root:: | 242 root:: |
257 Print the root directory of the current repository. | 243 Print the root directory of the current repository. |
278 tag [-t <text> -d <datecode> -u <user>] <name> [revision]:: | 264 tag [-t <text> -d <datecode> -u <user>] <name> [revision]:: |
279 Name a particular revision using <name>. | 265 Name a particular revision using <name>. |
280 | 266 |
281 Tags are used to name particular revisions of the repository and are | 267 Tags are used to name particular revisions of the repository and are |
282 very useful to compare different revision, to go back to significant | 268 very useful to compare different revision, to go back to significant |
283 earlier versions or to set special branch points, as releases, etc. | 269 earlier versions or to mark branch points as releases, etc. |
284 | 270 |
285 If no revision is given as argument the tip is used. | 271 If no revision is given, the tip is used. |
286 | 272 |
287 This tags are versioned, and kept along with the repository metadata. But | 273 To facilitate version control, distribution, and merging of tags, |
288 Mercurial has support for other type of tags that can be used locally for | 274 they are stored as a file named ".hgtags" which is managed |
289 convenience and that are created adding lines with a changeset hash value | 275 similarly to other project files and can be hand-edited if |
290 and a name or names to name the revision in a .hgtags file | 276 necessary. |
291 | 277 |
292 options: | 278 options: |
293 -t, --text <text> message for tag commit log entry | 279 -t, --text <text> message for tag commit log entry |
294 -d, --date <datecode> datecode for commit | 280 -d, --date <datecode> datecode for commit |
295 -u, --user <user> user for commit | 281 -u, --user <user> user for commit |
296 | 282 |
283 Note: Mercurial also has support for "local tags" that are not | |
284 version-controlled or distributed which are stored in the .hg/hgrc | |
285 file. | |
286 | |
297 tags:: | 287 tags:: |
298 List the repository tags. | 288 List the repository tags. |
299 | 289 |
300 Local tags in the .hgtags don't get listed when using this command. | 290 This lists both regular and local tags. |
301 | 291 |
302 tip:: | 292 tip:: |
303 Show the tip revision. | 293 Show the tip revision. |
304 | 294 |
305 undo:: | 295 undo:: |
306 Undo the last commit or pull transaction. | 296 Undo the last commit or pull transaction. |
307 | 297 |
308 update [-m -C] [revision]:: | 298 update [-m -C] [revision]:: |
309 Bring the working directory to the state of a given revision. | 299 Update the working directory to the specified revision. |
310 | 300 |
311 After running this command the current directory will have the contents | 301 By default, update will refuse to run if doing so would require |
312 of the specified revision. | 302 merging or discarding local changes. |
313 | 303 |
314 If there were outstanding changes in the current directory and a merge | 304 With the -m option, a merge will be performed. |
315 would be needed, the -m option can be used to merge those changes with | 305 |
316 the target revision. Without the -m or --merge option, no merge | 306 With the -C option, local changes will be lost. |
317 will happen. | |
318 | |
319 The -C or --clean option must be used in case a pristine version is | |
320 desired. In this case, existing changes will be discarded and lost. If | |
321 these changes should be kept, then a commit prior updating, or a merge | |
322 is due. | |
323 | 307 |
324 options: | 308 options: |
325 -m, --merge allow merging of branches | 309 -m, --merge allow merging of branches |
326 -C, --clean overwrite locally modified files | 310 -C, --clean overwrite locally modified files |
327 | 311 |
342 HGEDITOR:: | 326 HGEDITOR:: |
343 This is the name of the editor to use when committing. Defaults to the | 327 This is the name of the editor to use when committing. Defaults to the |
344 value of EDITOR. | 328 value of EDITOR. |
345 | 329 |
346 HGMERGE:: | 330 HGMERGE:: |
347 An executable to use for resolving merge conflicts. The program , | 331 An executable to use for resolving merge conflicts. The program |
348 will be executed with three arguments: local file, remote file, | 332 will be executed with three arguments: local file, remote file, |
349 ancestor file. | 333 ancestor file. |
350 | 334 |
351 The default program is "hgmerge", which is a shell script provided | 335 The default program is "hgmerge", which is a shell script provided |
352 by Mercurial with some sensible defaults. | 336 by Mercurial with some sensible defaults. |
361 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with | 345 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
362 '@hostname' appended) as the author value for a commit. | 346 '@hostname' appended) as the author value for a commit. |
363 | 347 |
364 EDITOR:: | 348 EDITOR:: |
365 This is the name of the editor used in the hgmerge script. It will be | 349 This is the name of the editor used in the hgmerge script. It will be |
366 used for commit messages, too, if HGEDITOR isn't set. Defaults to 'vi'. | 350 used for commit messages if HGEDITOR isn't set. Defaults to 'vi'. |
367 | 351 |
368 PYTHONPATH:: | 352 PYTHONPATH:: |
369 This is used by Python to find imported modules and may need to be set | 353 This is used by Python to find imported modules and may need to be set |
370 appropriately if Mercurial is not installed system-wide. | 354 appropriately if Mercurial is not installed system-wide. |
371 | 355 |
393 ----------------- | 377 ----------------- |
394 [paths] | 378 [paths] |
395 hg = http://selenic.com/hg | 379 hg = http://selenic.com/hg |
396 tah = http://hg.intevation.org/mercurial-tah/ | 380 tah = http://hg.intevation.org/mercurial-tah/ |
397 ----------------- | 381 ----------------- |
382 | |
383 | |
384 LOCAL TAGS | |
385 ---------- | |
386 | |
387 To create tags that are local to the repository and not distributed or | |
388 version-controlled, create an hgrc section like the following: | |
389 | |
390 ---------------- | |
391 [tags] | |
392 working = 2dcced388cab3677a8f543c3c47a0ad34ac9d435 | |
393 tested = 12e0fdbc57a0be78f0e817fd1d170a3615cd35da | |
394 ---------------- | |
398 | 395 |
399 | 396 |
400 HOOKS | 397 HOOKS |
401 ----- | 398 ----- |
402 | 399 |
423 user=<username> | 420 user=<username> |
424 passwd=<password> | 421 passwd=<password> |
425 no=<localhost1>,<localhost2>,<localhost3>,... | 422 no=<localhost1>,<localhost2>,<localhost3>,... |
426 -------------- | 423 -------------- |
427 | 424 |
428 "user","passwd" fields are used for authenticating proxies, "no" is a | 425 "user" and "passwd" fields are used for authenticating proxies, "no" is a |
429 comma-separated list of local host names for which proxy must be | 426 comma-separated list of local host names to not proxy. |
430 bypassed. | |
431 | |
432 | 427 |
433 BUGS | 428 BUGS |
434 ---- | 429 ---- |
435 Probably lots, please post them to the mailing list (See Resources below) | 430 Probably lots, please post them to the mailing list (See Resources below) |
436 when you find them. | 431 when you find them. |