Show More
@@ -1,454 +1,449 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 | ---- | |
8 | hg - Mercurial source code management system |
|
7 | hg - Mercurial source code management system | |
9 |
|
8 | |||
10 | SYNOPSIS |
|
9 | SYNOPSIS | |
11 | -------- |
|
10 | -------- | |
12 | 'hg' [-v -d -q -y] <command> [command options] [files] |
|
11 | 'hg' [-v -d -q -y] <command> [command options] [files] | |
13 |
|
12 | |||
14 | DESCRIPTION |
|
13 | DESCRIPTION | |
15 | ----------- |
|
14 | ----------- | |
16 | The hg(1) command provides a command line interface to the Mercurial system. |
|
15 | The hg(1) command provides a command line interface to the Mercurial system. | |
17 |
|
16 | |||
18 | OPTIONS |
|
17 | OPTIONS | |
19 | ------- |
|
18 | ------- | |
20 |
|
19 | |||
21 | --debug, -d:: |
|
20 | --debug, -d:: | |
22 | enable debugging output |
|
21 | enable debugging output | |
23 |
|
22 | |||
24 | --quiet, -q:: |
|
23 | --quiet, -q:: | |
25 | suppress output |
|
24 | suppress output | |
26 |
|
25 | |||
27 | --verbose, -v:: |
|
26 | --verbose, -v:: | |
28 | enable additional output |
|
27 | enable additional output | |
29 |
|
28 | |||
30 | --noninteractive, -y:: |
|
29 | --noninteractive, -y:: | |
31 | do not prompt, assume 'yes' for any required answers |
|
30 | do not prompt, assume 'yes' for any required answers | |
32 |
|
31 | |||
33 | COMMAND ELEMENTS |
|
32 | COMMAND ELEMENTS | |
34 | ---------------- |
|
33 | ---------------- | |
35 |
|
34 | |||
36 | files ...:: |
|
35 | files ...:: | |
37 | indicates one or more filename or relative path filenames |
|
36 | indicates one or more filename or relative path filenames | |
38 |
|
37 | |||
39 | path:: |
|
38 | path:: | |
40 | indicates a path on the local machine |
|
39 | indicates a path on the local machine | |
41 |
|
40 | |||
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 |
|
|
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 |
|
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 | |
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 | |
70 | place. |
|
69 | place. | |
71 |
|
70 | |||
72 | options: |
|
71 | options: | |
73 | -r, --revision <rev> annotate the specified revision |
|
72 | -r, --revision <rev> annotate the specified revision | |
74 | -u, --user list the author |
|
73 | -u, --user list the author | |
75 | -c, --changeset list the changeset |
|
74 | -c, --changeset list the changeset | |
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 |
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 | |||
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 | |
112 | -l, --logfile <file> show the commit message for the given file |
|
111 | -l, --logfile <file> show the commit message for the given file | |
113 | -d, --date <datecode> record datecode as commit date |
|
112 | -d, --date <datecode> record datecode as commit date | |
114 | -u, --user <user> record user as commiter |
|
113 | -u, --user <user> record user as commiter | |
115 |
|
114 | |||
116 | aliases: ci |
|
115 | aliases: ci | |
117 |
|
116 | |||
118 | copy <source> <dest>:: |
|
117 | copy <source> <dest>:: | |
119 | Mark <dest> file as a copy or rename of a <source> one |
|
118 | Mark <dest> file as a copy or rename of a <source> one | |
120 |
|
119 | |||
121 | This command takes effect for the next commit. |
|
120 | This command takes effect for the next commit. | |
122 |
|
121 | |||
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 |
|
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. | |
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, | |
137 | parent and commit comment. |
|
137 | parent and commit comment. | |
138 |
|
138 | |||
139 | forget [files]:: |
|
139 | forget [files]:: | |
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 |
|
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. | |
158 |
|
158 | |||
159 | identify:: |
|
159 | identify:: | |
160 | Print a short summary of the current state of the repo. |
|
160 | Print a short summary of the current state of the repo. | |
161 |
|
161 | |||
162 | This summary identifies the repository state using one or two parent |
|
162 | This summary identifies the repository state using one or two parent | |
163 | hash identifiers, followed by a "+" if there are uncommitted changes |
|
163 | hash identifiers, followed by a "+" if there are uncommitted changes | |
164 | in the working directory, followed by a list of tags for this revision. |
|
164 | in the working directory, followed by a list of tags for this revision. | |
165 |
|
165 | |||
166 | aliases: id |
|
166 | aliases: id | |
167 |
|
167 | |||
168 | import [-p <n> -b <base> -q] <patches>:: |
|
168 | import [-p <n> -b <base> -q] <patches>:: | |
169 | Import a list of patches and commit them individually. |
|
169 | Import a list of patches and commit them individually. | |
170 |
|
170 | |||
171 | options: |
|
171 | options: | |
172 | -p, --strip <n> directory strip option for patch. This has the same |
|
172 | -p, --strip <n> directory strip option for patch. This has the same | |
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. | |
199 |
|
183 | |||
200 | To display the revision history for the whole repository, use the history |
|
184 | To display the revision history for the whole repository, use the history | |
201 | command. |
|
185 | command. | |
202 |
|
186 | |||
203 | manifest [revision]:: |
|
187 | manifest [revision]:: | |
204 | Print a list of version controlled files for the given revision. |
|
188 | Print a list of version controlled files for the given revision. | |
205 |
|
189 | |||
206 | The manifest is the list of files being version controlled. If no revision |
|
190 | The manifest is the list of files being version controlled. If no revision | |
207 | is given then the tip is used. |
|
191 | is given then the tip is used. | |
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 |
|
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 |
|
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 | |
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: | |
233 |
|
218 | |||
234 | ssh://[user@]host[:port]/path |
|
219 | ssh://[user@]host[:port]/path | |
235 |
|
220 | |||
236 | rawcommit [-p -d -u -F -t -l]:: |
|
221 | rawcommit [-p -d -u -F -t -l]:: | |
237 | Lowlevel commit, for use in helper scripts. |
|
222 | Lowlevel commit, for use in helper scripts. | |
238 |
|
223 | |||
239 | This command is not intended to be used by normal users, as it is |
|
224 | This command is not intended to be used by normal users, as it is | |
240 | primarily useful for importing from other SCMs. |
|
225 | primarily useful for importing from other SCMs. | |
241 |
|
226 | |||
242 | recover:: |
|
227 | recover:: | |
243 | Recover from an interrupted commit or pull. |
|
228 | Recover from an interrupted commit or pull. | |
244 |
|
229 | |||
245 | This command tries to fix the repository status after an interrupted |
|
230 | This command tries to fix the repository status after an interrupted | |
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 |
|
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. | |
258 |
|
244 | |||
259 | serve [-a addr -n name -p port -t templatedir]:: |
|
245 | serve [-a addr -n name -p port -t templatedir]:: | |
260 | Start a local HTTP repository browser and pull server. |
|
246 | Start a local HTTP repository browser and pull server. | |
261 |
|
247 | |||
262 | options: |
|
248 | options: | |
263 | -a, --address <addr> address to use |
|
249 | -a, --address <addr> address to use | |
264 | -p, --port <n> port to use (default: 8000) |
|
250 | -p, --port <n> port to use (default: 8000) | |
265 | -n, --name <name> name to show in web pages (default: working dir) |
|
251 | -n, --name <name> name to show in web pages (default: working dir) | |
266 | -t, --templatedir <path> web templates to use |
|
252 | -t, --templatedir <path> web templates to use | |
267 |
|
253 | |||
268 | status:: |
|
254 | status:: | |
269 | Show changed files in the working directory. |
|
255 | Show changed files in the working directory. | |
270 |
|
256 | |||
271 | The codes used to show the status of files are: |
|
257 | The codes used to show the status of files are: | |
272 |
|
258 | |||
273 | C = changed |
|
259 | C = changed | |
274 | A = added |
|
260 | A = added | |
275 | R = removed |
|
261 | R = removed | |
276 | ? = not tracked |
|
262 | ? = not tracked | |
277 |
|
263 | |||
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 |
|
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. | |
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 |
|
|
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 | |||
328 | aliases: up checkout co |
|
312 | aliases: up checkout co | |
329 |
|
313 | |||
330 | verify:: |
|
314 | verify:: | |
331 | Verify the integrity of the current repository. |
|
315 | Verify the integrity of the current repository. | |
332 |
|
316 | |||
333 | This will perform an extensive check of the repository's |
|
317 | This will perform an extensive check of the repository's | |
334 | integrity, validating the hashes and checksums of each entry in |
|
318 | integrity, validating the hashes and checksums of each entry in | |
335 | the changelog, manifest, and tracked files, as well as the |
|
319 | the changelog, manifest, and tracked files, as well as the | |
336 | integrity of their crosslinks and indices. |
|
320 | integrity of their crosslinks and indices. | |
337 |
|
321 | |||
338 |
|
322 | |||
339 | ENVIRONMENT VARIABLES |
|
323 | ENVIRONMENT VARIABLES | |
340 | --------------------- |
|
324 | --------------------- | |
341 |
|
325 | |||
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. | |
353 |
|
337 | |||
354 | HGUSER:: |
|
338 | HGUSER:: | |
355 | This is the string used for the author of a commit. |
|
339 | This is the string used for the author of a commit. | |
356 |
|
340 | |||
357 | EMAIL:: |
|
341 | EMAIL:: | |
358 | If HGUSER is not set, this will be used as the author for a commit. |
|
342 | If HGUSER is not set, this will be used as the author for a commit. | |
359 |
|
343 | |||
360 | LOGNAME:: |
|
344 | LOGNAME:: | |
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 |
|
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 | |||
372 | FILES |
|
356 | FILES | |
373 | ----- |
|
357 | ----- | |
374 | .hgignore:: |
|
358 | .hgignore:: | |
375 | This file contains regular expressions (one per line) that describe file |
|
359 | This file contains regular expressions (one per line) that describe file | |
376 | names that should be ignored by hg. |
|
360 | names that should be ignored by hg. | |
377 |
|
361 | |||
378 | .hgtags:: |
|
362 | .hgtags:: | |
379 | This file contains changeset hash values and text tag names (one of each |
|
363 | This file contains changeset hash values and text tag names (one of each | |
380 | seperated by spaces) that correspond to tagged versions of the repository |
|
364 | seperated by spaces) that correspond to tagged versions of the repository | |
381 | contents. |
|
365 | contents. | |
382 |
|
366 | |||
383 | $HOME/.hgrc, .hg/hgrc:: |
|
367 | $HOME/.hgrc, .hg/hgrc:: | |
384 | This file contains defaults and configuration. Values in .hg/hgrc |
|
368 | This file contains defaults and configuration. Values in .hg/hgrc | |
385 | override those in .hgrc. |
|
369 | override those in .hgrc. | |
386 |
|
370 | |||
387 | NAMED REPOSITORIES |
|
371 | NAMED REPOSITORIES | |
388 | ------------------ |
|
372 | ------------------ | |
389 |
|
373 | |||
390 | To give symbolic names to a repository, create a section in .hgrc |
|
374 | To give symbolic names to a repository, create a section in .hgrc | |
391 | or .hg/hgrc containing assignments of names to paths. Example: |
|
375 | or .hg/hgrc containing assignments of names to paths. Example: | |
392 |
|
376 | |||
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 | ----------------- | |
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 | |||
403 | Mercurial supports a set of 'hook', commands that get automatically |
|
400 | Mercurial supports a set of 'hook', commands that get automatically | |
404 | executed by various actions such as starting or finishing a commit. To |
|
401 | executed by various actions such as starting or finishing a commit. To | |
405 | specify a hook, simply create an hgrc section like the following: |
|
402 | specify a hook, simply create an hgrc section like the following: | |
406 |
|
403 | |||
407 | ----------------- |
|
404 | ----------------- | |
408 | [hooks] |
|
405 | [hooks] | |
409 | precommit = echo "this hook gets executed immediately before a commit" |
|
406 | precommit = echo "this hook gets executed immediately before a commit" | |
410 | commit = hg export $NODE | mail -s "new commit $NODE" commit-list |
|
407 | commit = hg export $NODE | mail -s "new commit $NODE" commit-list | |
411 | ----------------- |
|
408 | ----------------- | |
412 |
|
409 | |||
413 |
|
410 | |||
414 | NON_TRANSPARENT PROXY SUPPORT |
|
411 | NON_TRANSPARENT PROXY SUPPORT | |
415 | ----------------------------- |
|
412 | ----------------------------- | |
416 |
|
413 | |||
417 | To access a Mercurial repository through a proxy, create a file |
|
414 | To access a Mercurial repository through a proxy, create a file | |
418 | $HOME/.hgrc in the following format: |
|
415 | $HOME/.hgrc in the following format: | |
419 |
|
416 | |||
420 | -------------- |
|
417 | -------------- | |
421 | [http_proxy] |
|
418 | [http_proxy] | |
422 | host=myproxy:8080 |
|
419 | host=myproxy:8080 | |
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" |
|
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 | ---- | |
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. | |
437 |
|
432 | |||
438 | AUTHOR |
|
433 | AUTHOR | |
439 | ------ |
|
434 | ------ | |
440 | Written by Matt Mackall <mpm@selenic.com> |
|
435 | Written by Matt Mackall <mpm@selenic.com> | |
441 |
|
436 | |||
442 | RESOURCES |
|
437 | RESOURCES | |
443 | --------- |
|
438 | --------- | |
444 | http://selenic.com/mercurial[Main Web Site] |
|
439 | http://selenic.com/mercurial[Main Web Site] | |
445 |
|
440 | |||
446 | http://selenic.com/hg[Source code repository] |
|
441 | http://selenic.com/hg[Source code repository] | |
447 |
|
442 | |||
448 | http://selenic.com/mailman/listinfo/mercurial[Mailing list] |
|
443 | http://selenic.com/mailman/listinfo/mercurial[Mailing list] | |
449 |
|
444 | |||
450 | COPYING |
|
445 | COPYING | |
451 | ------- |
|
446 | ------- | |
452 | Copyright (C) 2005 Matt Mackall. |
|
447 | Copyright (C) 2005 Matt Mackall. | |
453 | Free use of this software is granted under the terms of the GNU General |
|
448 | Free use of this software is granted under the terms of the GNU General | |
454 | Public License (GPL). |
|
449 | Public License (GPL). |
General Comments 0
You need to be logged in to leave comments.
Login now