Show More
@@ -1,7 +1,6 b'' | |||||
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 | ---- | |
@@ -44,7 +43,7 b' 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 |
|
|
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. | |
@@ -55,13 +54,13 b' COMMANDS' | |||||
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 |
|
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 |
|
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 | |
@@ -78,32 +77,32 b' annotate [-r <rev> -u -n -c] [files ...]' | |||||
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 |
I |
|
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 |
|
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 |
|
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 |
|
92 | For efficiency, hardlinks are used for cloning whenever the | |
94 |
|
|
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 |
|
|
99 | Commit changes to the given files into the repository. | |
101 |
|
100 | |||
102 |
If a list of files is om |
|
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 |
|
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 | |||
@@ -125,10 +124,11 b' diff [-r revision] [-r revision] [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 |
|
127 | When two revision arguments are given, then changes are shown | |
129 |
|
|
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. | |
@@ -142,16 +142,16 b' forget [files]::' | |||||
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 |
|
145 | Repository "heads" are changesets that don't have children | |
146 |
They are where development generally takes place and |
|
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, |
|
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 |
|
|
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. | |
@@ -175,22 +175,6 b' import [-p <n> -b <base> -q] <patches>::' | |||||
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 | |||
@@ -210,11 +194,11 b' 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 |
|
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 | |
@@ -222,9 +206,10 b' pull <repository path>::' | |||||
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 |
|
209 | This is the symmetrical operation for pull. It helps to move | |
226 |
the current repository to a different one. If the |
|
210 | changes from the current repository to a different one. If the | |
227 |
this is identical to a pull in that directory |
|
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 | |
@@ -248,8 +233,9 b' recover::' | |||||
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 |
|
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 | |||
@@ -280,24 +266,28 b' tag [-t <text> -d <datecode> -u <user>] ' | |||||
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 |
|
269 | earlier versions or to mark branch points as releases, etc. | |
284 |
|
270 | |||
285 |
If no revision is given |
|
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. | |
@@ -306,20 +296,14 b' 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 |
|
|
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 | |
@@ -344,7 +328,7 b' HGEDITOR::' | |||||
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 | |||
@@ -363,7 +347,7 b' LOGNAME::' | |||||
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 |
|
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 | |
@@ -397,6 +381,19 b' tah = http://hg.intevation.org/mercurial' | |||||
397 | ----------------- |
|
381 | ----------------- | |
398 |
|
382 | |||
399 |
|
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 | ---------------- | |||
|
395 | ||||
|
396 | ||||
400 | HOOKS |
|
397 | HOOKS | |
401 | ----- |
|
398 | ----- | |
402 |
|
399 | |||
@@ -425,10 +422,8 b' passwd=<password>' | |||||
425 | no=<localhost1>,<localhost2>,<localhost3>,... |
|
422 | no=<localhost1>,<localhost2>,<localhost3>,... | |
426 | -------------- |
|
423 | -------------- | |
427 |
|
424 | |||
428 |
"user" |
|
425 | "user" and "passwd" fields are used for authenticating proxies, "no" is a | |
429 |
comma-separated list of local host names |
|
426 | comma-separated list of local host names to not proxy. | |
430 | bypassed. |
|
|||
431 |
|
||||
432 |
|
427 | |||
433 | BUGS |
|
428 | BUGS | |
434 | ---- |
|
429 | ---- |
General Comments 0
You need to be logged in to leave comments.
Login now