Mercurial > hg-stable
annotate doc/hg.1.txt @ 196:48827121af7e
add export, recover, and undo to the man page
add export to hg help
author | jake@edge2.net |
---|---|
date | Mon, 30 May 2005 09:53:48 -0700 |
parents | 089594a5bbde |
children | 73b8a8a059ec 27d08c0c2a7e |
rev | line source |
---|---|
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 | |
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
103 export [revision]:: |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
104 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
|
105 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
|
106 |
177 | 107 history:: |
108 print the revision history of the repository | |
109 | |
110 init:: | |
111 initialize a repository in the current directory | |
112 | |
113 log <file>:: | |
114 print the revision history of the specified file | |
115 | |
116 merge <repository path>:: | |
117 pull any changes from the specified repository to the repository in the | |
118 current directory. Use the value of the HGMERGE environment variable | |
119 as a program to resolve any merge conflicts between the two repositories. | |
120 An implicit commit is done at the end of this process if there were any | |
121 merge conflicts. Note that merge does not yet merge with changed files | |
122 in the working dir. | |
123 | |
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
124 recover:: |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
125 rollback an interrupted transaction |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
126 |
177 | 127 remove [files ...]:: |
128 schedule the indicated files for removal from the repository at the next | |
129 commit | |
130 | |
131 serve [-a addr -n name -p port -t templatedir]:: | |
132 this will start an http server, by default on port 8000, that will | |
133 allow browsing the repository using the hgweb interface and will allow | |
134 merging from the repository. -a sets the interface address, -p the | |
135 port to listen on, -n the name of the repository and -t sets the | |
136 location of the template directory. | |
137 | |
138 status:: | |
139 list new, changed, and missing files in the working directory | |
140 | |
141 tags:: | |
142 list the current tags | |
143 | |
196
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
144 undo:: |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
145 undo the last transaction |
48827121af7e
add export, recover, and undo to the man page
jake@edge2.net
parents:
182
diff
changeset
|
146 |
177 | 147 ENVIRONMENT VARIABLES |
148 --------------------- | |
149 HGMERGE:: | |
150 points to an executable to use for resolving merge conflicts, the | |
151 program will be executed with four arguments: local file, remote | |
152 file, ancestor file, and original filename. | |
153 | |
154 HGUSER:: | |
155 this is the string used for the author value of a commit | |
156 | |
157 HG_OPTS:: | |
158 this string is used for default arguments to hg | |
159 | |
160 PYTHONPATH:: | |
161 this is used by Python to find imported modules and needs to be set | |
162 appropriately based on where mercurial is installed | |
163 | |
164 EMAIL:: | |
165 if HGUSER is not set, this will be used next as the author value for | |
166 a commit | |
167 | |
168 LOGNAME:: | |
169 if neither HGUSER nor EMAIL is set, LOGNAME will be used (with | |
170 '@hostname' appended) as the author value for a commit | |
171 | |
172 EDITOR:: | |
173 this is the name of the editor to use when committing | |
174 | |
175 FILES | |
176 ----- | |
177 .hgignore:: | |
178 this file contains regular expressions (one per line) that describe file | |
179 names that should be ignored by hg | |
180 | |
181 .hgtags:: | |
182 this file contains changeset hash values and text tag names (one of each | |
183 seperated by spaces) that correspond to tagged versions of the repository | |
184 contents. | |
185 | |
181
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
186 $HOME/.hgpaths:: |
038e4d8602bd
updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents:
177
diff
changeset
|
187 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
|
188 (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
|
189 <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
|
190 |
177 | 191 BUGS |
192 ---- | |
193 Probably lots, please post them to the mailing list (See Resources below) | |
194 when you find them. | |
195 | |
196 AUTHOR | |
197 ------ | |
198 Written by Matt Mackall <mpm@selenic.com> | |
199 | |
200 RESOURCES | |
201 --------- | |
202 http://selenic.com/mercurial[Main Web Site] | |
203 | |
204 http://selenic.com/hg[Source code repository] | |
205 | |
206 http://selenic.com/mailman/listinfo/mercurial[Mailing list] | |
207 | |
208 COPYING | |
209 ------- | |
210 Copyright (C) 2005 Matt Mackall. | |
211 Free use of this software is granted under the terms of the GNU General | |
212 Public License (GPL). |