Show More
@@ -1,3340 +1,3362 b'' | |||
|
1 | 1 | Short help: |
|
2 | 2 | |
|
3 | 3 | $ hg |
|
4 | 4 | Mercurial Distributed SCM |
|
5 | 5 | |
|
6 | 6 | basic commands: |
|
7 | 7 | |
|
8 | 8 | add add the specified files on the next commit |
|
9 | 9 | annotate show changeset information by line for each file |
|
10 | 10 | clone make a copy of an existing repository |
|
11 | 11 | commit commit the specified files or all outstanding changes |
|
12 | 12 | diff diff repository (or selected files) |
|
13 | 13 | export dump the header and diffs for one or more changesets |
|
14 | 14 | forget forget the specified files on the next commit |
|
15 | 15 | init create a new repository in the given directory |
|
16 | 16 | log show revision history of entire repository or files |
|
17 | 17 | merge merge another revision into working directory |
|
18 | 18 | pull pull changes from the specified source |
|
19 | 19 | push push changes to the specified destination |
|
20 | 20 | remove remove the specified files on the next commit |
|
21 | 21 | serve start stand-alone webserver |
|
22 | 22 | status show changed files in the working directory |
|
23 | 23 | summary summarize working directory state |
|
24 | 24 | update update working directory (or switch revisions) |
|
25 | 25 | |
|
26 | 26 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
27 | 27 | |
|
28 | 28 | $ hg -q |
|
29 | 29 | add add the specified files on the next commit |
|
30 | 30 | annotate show changeset information by line for each file |
|
31 | 31 | clone make a copy of an existing repository |
|
32 | 32 | commit commit the specified files or all outstanding changes |
|
33 | 33 | diff diff repository (or selected files) |
|
34 | 34 | export dump the header and diffs for one or more changesets |
|
35 | 35 | forget forget the specified files on the next commit |
|
36 | 36 | init create a new repository in the given directory |
|
37 | 37 | log show revision history of entire repository or files |
|
38 | 38 | merge merge another revision into working directory |
|
39 | 39 | pull pull changes from the specified source |
|
40 | 40 | push push changes to the specified destination |
|
41 | 41 | remove remove the specified files on the next commit |
|
42 | 42 | serve start stand-alone webserver |
|
43 | 43 | status show changed files in the working directory |
|
44 | 44 | summary summarize working directory state |
|
45 | 45 | update update working directory (or switch revisions) |
|
46 | 46 | |
|
47 | 47 | $ hg help |
|
48 | 48 | Mercurial Distributed SCM |
|
49 | 49 | |
|
50 | 50 | list of commands: |
|
51 | 51 | |
|
52 | 52 | add add the specified files on the next commit |
|
53 | 53 | addremove add all new files, delete all missing files |
|
54 | 54 | annotate show changeset information by line for each file |
|
55 | 55 | archive create an unversioned archive of a repository revision |
|
56 | 56 | backout reverse effect of earlier changeset |
|
57 | 57 | bisect subdivision search of changesets |
|
58 | 58 | bookmarks create a new bookmark or list existing bookmarks |
|
59 | 59 | branch set or show the current branch name |
|
60 | 60 | branches list repository named branches |
|
61 | 61 | bundle create a bundle file |
|
62 | 62 | cat output the current or given revision of files |
|
63 | 63 | clone make a copy of an existing repository |
|
64 | 64 | commit commit the specified files or all outstanding changes |
|
65 | 65 | config show combined config settings from all hgrc files |
|
66 | 66 | copy mark files as copied for the next commit |
|
67 | 67 | diff diff repository (or selected files) |
|
68 | 68 | export dump the header and diffs for one or more changesets |
|
69 | 69 | files list tracked files |
|
70 | 70 | forget forget the specified files on the next commit |
|
71 | 71 | graft copy changes from other branches onto the current branch |
|
72 | 72 | grep search revision history for a pattern in specified files |
|
73 | 73 | heads show branch heads |
|
74 | 74 | help show help for a given topic or a help overview |
|
75 | 75 | identify identify the working directory or specified revision |
|
76 | 76 | import import an ordered set of patches |
|
77 | 77 | incoming show new changesets found in source |
|
78 | 78 | init create a new repository in the given directory |
|
79 | 79 | log show revision history of entire repository or files |
|
80 | 80 | manifest output the current or given revision of the project manifest |
|
81 | 81 | merge merge another revision into working directory |
|
82 | 82 | outgoing show changesets not found in the destination |
|
83 | 83 | paths show aliases for remote repositories |
|
84 | 84 | phase set or show the current phase name |
|
85 | 85 | pull pull changes from the specified source |
|
86 | 86 | push push changes to the specified destination |
|
87 | 87 | recover roll back an interrupted transaction |
|
88 | 88 | remove remove the specified files on the next commit |
|
89 | 89 | rename rename files; equivalent of copy + remove |
|
90 | 90 | resolve redo merges or set/view the merge status of files |
|
91 | 91 | revert restore files to their checkout state |
|
92 | 92 | root print the root (top) of the current working directory |
|
93 | 93 | serve start stand-alone webserver |
|
94 | 94 | status show changed files in the working directory |
|
95 | 95 | summary summarize working directory state |
|
96 | 96 | tag add one or more tags for the current or given revision |
|
97 | 97 | tags list repository tags |
|
98 | 98 | unbundle apply one or more bundle files |
|
99 | 99 | update update working directory (or switch revisions) |
|
100 | 100 | verify verify the integrity of the repository |
|
101 | 101 | version output version and copyright information |
|
102 | 102 | |
|
103 | 103 | additional help topics: |
|
104 | 104 | |
|
105 | 105 | bundlespec Bundle File Formats |
|
106 | 106 | color Colorizing Outputs |
|
107 | 107 | config Configuration Files |
|
108 | 108 | dates Date Formats |
|
109 | 109 | diffs Diff Formats |
|
110 | 110 | environment Environment Variables |
|
111 | 111 | extensions Using Additional Features |
|
112 | 112 | filesets Specifying File Sets |
|
113 | 113 | glossary Glossary |
|
114 | 114 | hgignore Syntax for Mercurial Ignore Files |
|
115 | 115 | hgweb Configuring hgweb |
|
116 | 116 | internals Technical implementation topics |
|
117 | 117 | merge-tools Merge Tools |
|
118 | 118 | pager Pager Support |
|
119 | 119 | patterns File Name Patterns |
|
120 | 120 | phases Working with Phases |
|
121 | 121 | revisions Specifying Revisions |
|
122 | 122 | scripting Using Mercurial from scripts and automation |
|
123 | 123 | subrepos Subrepositories |
|
124 | 124 | templating Template Usage |
|
125 | 125 | urls URL Paths |
|
126 | 126 | |
|
127 | 127 | (use 'hg help -v' to show built-in aliases and global options) |
|
128 | 128 | |
|
129 | 129 | $ hg -q help |
|
130 | 130 | add add the specified files on the next commit |
|
131 | 131 | addremove add all new files, delete all missing files |
|
132 | 132 | annotate show changeset information by line for each file |
|
133 | 133 | archive create an unversioned archive of a repository revision |
|
134 | 134 | backout reverse effect of earlier changeset |
|
135 | 135 | bisect subdivision search of changesets |
|
136 | 136 | bookmarks create a new bookmark or list existing bookmarks |
|
137 | 137 | branch set or show the current branch name |
|
138 | 138 | branches list repository named branches |
|
139 | 139 | bundle create a bundle file |
|
140 | 140 | cat output the current or given revision of files |
|
141 | 141 | clone make a copy of an existing repository |
|
142 | 142 | commit commit the specified files or all outstanding changes |
|
143 | 143 | config show combined config settings from all hgrc files |
|
144 | 144 | copy mark files as copied for the next commit |
|
145 | 145 | diff diff repository (or selected files) |
|
146 | 146 | export dump the header and diffs for one or more changesets |
|
147 | 147 | files list tracked files |
|
148 | 148 | forget forget the specified files on the next commit |
|
149 | 149 | graft copy changes from other branches onto the current branch |
|
150 | 150 | grep search revision history for a pattern in specified files |
|
151 | 151 | heads show branch heads |
|
152 | 152 | help show help for a given topic or a help overview |
|
153 | 153 | identify identify the working directory or specified revision |
|
154 | 154 | import import an ordered set of patches |
|
155 | 155 | incoming show new changesets found in source |
|
156 | 156 | init create a new repository in the given directory |
|
157 | 157 | log show revision history of entire repository or files |
|
158 | 158 | manifest output the current or given revision of the project manifest |
|
159 | 159 | merge merge another revision into working directory |
|
160 | 160 | outgoing show changesets not found in the destination |
|
161 | 161 | paths show aliases for remote repositories |
|
162 | 162 | phase set or show the current phase name |
|
163 | 163 | pull pull changes from the specified source |
|
164 | 164 | push push changes to the specified destination |
|
165 | 165 | recover roll back an interrupted transaction |
|
166 | 166 | remove remove the specified files on the next commit |
|
167 | 167 | rename rename files; equivalent of copy + remove |
|
168 | 168 | resolve redo merges or set/view the merge status of files |
|
169 | 169 | revert restore files to their checkout state |
|
170 | 170 | root print the root (top) of the current working directory |
|
171 | 171 | serve start stand-alone webserver |
|
172 | 172 | status show changed files in the working directory |
|
173 | 173 | summary summarize working directory state |
|
174 | 174 | tag add one or more tags for the current or given revision |
|
175 | 175 | tags list repository tags |
|
176 | 176 | unbundle apply one or more bundle files |
|
177 | 177 | update update working directory (or switch revisions) |
|
178 | 178 | verify verify the integrity of the repository |
|
179 | 179 | version output version and copyright information |
|
180 | 180 | |
|
181 | 181 | additional help topics: |
|
182 | 182 | |
|
183 | 183 | bundlespec Bundle File Formats |
|
184 | 184 | color Colorizing Outputs |
|
185 | 185 | config Configuration Files |
|
186 | 186 | dates Date Formats |
|
187 | 187 | diffs Diff Formats |
|
188 | 188 | environment Environment Variables |
|
189 | 189 | extensions Using Additional Features |
|
190 | 190 | filesets Specifying File Sets |
|
191 | 191 | glossary Glossary |
|
192 | 192 | hgignore Syntax for Mercurial Ignore Files |
|
193 | 193 | hgweb Configuring hgweb |
|
194 | 194 | internals Technical implementation topics |
|
195 | 195 | merge-tools Merge Tools |
|
196 | 196 | pager Pager Support |
|
197 | 197 | patterns File Name Patterns |
|
198 | 198 | phases Working with Phases |
|
199 | 199 | revisions Specifying Revisions |
|
200 | 200 | scripting Using Mercurial from scripts and automation |
|
201 | 201 | subrepos Subrepositories |
|
202 | 202 | templating Template Usage |
|
203 | 203 | urls URL Paths |
|
204 | 204 | |
|
205 | 205 | Test extension help: |
|
206 | 206 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
207 | 207 | Using Additional Features |
|
208 | 208 | """"""""""""""""""""""""" |
|
209 | 209 | |
|
210 | 210 | Mercurial has the ability to add new features through the use of |
|
211 | 211 | extensions. Extensions may add new commands, add options to existing |
|
212 | 212 | commands, change the default behavior of commands, or implement hooks. |
|
213 | 213 | |
|
214 | 214 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
215 | 215 | Python search path, create an entry for it in your configuration file, |
|
216 | 216 | like this: |
|
217 | 217 | |
|
218 | 218 | [extensions] |
|
219 | 219 | foo = |
|
220 | 220 | |
|
221 | 221 | You may also specify the full path to an extension: |
|
222 | 222 | |
|
223 | 223 | [extensions] |
|
224 | 224 | myfeature = ~/.hgext/myfeature.py |
|
225 | 225 | |
|
226 | 226 | See 'hg help config' for more information on configuration files. |
|
227 | 227 | |
|
228 | 228 | Extensions are not loaded by default for a variety of reasons: they can |
|
229 | 229 | increase startup overhead; they may be meant for advanced usage only; they |
|
230 | 230 | may provide potentially dangerous abilities (such as letting you destroy |
|
231 | 231 | or modify history); they might not be ready for prime time; or they may |
|
232 | 232 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
233 | 233 | to activate extensions as needed. |
|
234 | 234 | |
|
235 | 235 | To explicitly disable an extension enabled in a configuration file of |
|
236 | 236 | broader scope, prepend its path with !: |
|
237 | 237 | |
|
238 | 238 | [extensions] |
|
239 | 239 | # disabling extension bar residing in /path/to/extension/bar.py |
|
240 | 240 | bar = !/path/to/extension/bar.py |
|
241 | 241 | # ditto, but no path was supplied for extension baz |
|
242 | 242 | baz = ! |
|
243 | 243 | |
|
244 | 244 | enabled extensions: |
|
245 | 245 | |
|
246 | 246 | children command to display child changesets (DEPRECATED) |
|
247 | 247 | rebase command to move sets of revisions to a different ancestor |
|
248 | 248 | |
|
249 | 249 | disabled extensions: |
|
250 | 250 | |
|
251 | 251 | acl hooks for controlling repository access |
|
252 | 252 | blackbox log repository events to a blackbox for debugging |
|
253 | 253 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
254 | 254 | censor erase file content at a given revision |
|
255 | 255 | churn command to display statistics about repository history |
|
256 | 256 | clonebundles advertise pre-generated bundles to seed clones |
|
257 | 257 | convert import revisions from foreign VCS repositories into |
|
258 | 258 | Mercurial |
|
259 | 259 | eol automatically manage newlines in repository files |
|
260 | 260 | extdiff command to allow external programs to compare revisions |
|
261 | 261 | factotum http authentication with factotum |
|
262 | 262 | gpg commands to sign and verify changesets |
|
263 | 263 | hgk browse the repository in a graphical way |
|
264 | 264 | highlight syntax highlighting for hgweb (requires Pygments) |
|
265 | 265 | histedit interactive history editing |
|
266 | 266 | keyword expand keywords in tracked files |
|
267 | 267 | largefiles track large binary files |
|
268 | 268 | mq manage a stack of patches |
|
269 | 269 | notify hooks for sending email push notifications |
|
270 | 270 | patchbomb command to send changesets as (a series of) patch emails |
|
271 | 271 | purge command to delete untracked files from the working |
|
272 | 272 | directory |
|
273 | 273 | relink recreates hardlinks between repository clones |
|
274 | 274 | schemes extend schemes with shortcuts to repository swarms |
|
275 | 275 | share share a common history between several working directories |
|
276 | 276 | shelve save and restore changes to the working directory |
|
277 | 277 | strip strip changesets and their descendants from history |
|
278 | 278 | transplant command to transplant changesets from another branch |
|
279 | 279 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
280 | 280 | zeroconf discover and advertise repositories on the local network |
|
281 | 281 | |
|
282 | 282 | Verify that extension keywords appear in help templates |
|
283 | 283 | |
|
284 | 284 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null |
|
285 | 285 | |
|
286 | 286 | Test short command list with verbose option |
|
287 | 287 | |
|
288 | 288 | $ hg -v help shortlist |
|
289 | 289 | Mercurial Distributed SCM |
|
290 | 290 | |
|
291 | 291 | basic commands: |
|
292 | 292 | |
|
293 | 293 | add add the specified files on the next commit |
|
294 | 294 | annotate, blame |
|
295 | 295 | show changeset information by line for each file |
|
296 | 296 | clone make a copy of an existing repository |
|
297 | 297 | commit, ci commit the specified files or all outstanding changes |
|
298 | 298 | diff diff repository (or selected files) |
|
299 | 299 | export dump the header and diffs for one or more changesets |
|
300 | 300 | forget forget the specified files on the next commit |
|
301 | 301 | init create a new repository in the given directory |
|
302 | 302 | log, history show revision history of entire repository or files |
|
303 | 303 | merge merge another revision into working directory |
|
304 | 304 | pull pull changes from the specified source |
|
305 | 305 | push push changes to the specified destination |
|
306 | 306 | remove, rm remove the specified files on the next commit |
|
307 | 307 | serve start stand-alone webserver |
|
308 | 308 | status, st show changed files in the working directory |
|
309 | 309 | summary, sum summarize working directory state |
|
310 | 310 | update, up, checkout, co |
|
311 | 311 | update working directory (or switch revisions) |
|
312 | 312 | |
|
313 | 313 | global options ([+] can be repeated): |
|
314 | 314 | |
|
315 | 315 | -R --repository REPO repository root directory or name of overlay bundle |
|
316 | 316 | file |
|
317 | 317 | --cwd DIR change working directory |
|
318 | 318 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
319 | 319 | all prompts |
|
320 | 320 | -q --quiet suppress output |
|
321 | 321 | -v --verbose enable additional output |
|
322 | 322 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
323 | 323 | debug) |
|
324 | 324 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
325 | 325 | --debug enable debugging output |
|
326 | 326 | --debugger start debugger |
|
327 | 327 | --encoding ENCODE set the charset encoding (default: ascii) |
|
328 | 328 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
329 | 329 | --traceback always print a traceback on exception |
|
330 | 330 | --time time how long the command takes |
|
331 | 331 | --profile print command execution profile |
|
332 | 332 | --version output version information and exit |
|
333 | 333 | -h --help display help and exit |
|
334 | 334 | --hidden consider hidden changesets |
|
335 | 335 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
336 | 336 | (default: auto) |
|
337 | 337 | |
|
338 | 338 | (use 'hg help' for the full list of commands) |
|
339 | 339 | |
|
340 | 340 | $ hg add -h |
|
341 | 341 | hg add [OPTION]... [FILE]... |
|
342 | 342 | |
|
343 | 343 | add the specified files on the next commit |
|
344 | 344 | |
|
345 | 345 | Schedule files to be version controlled and added to the repository. |
|
346 | 346 | |
|
347 | 347 | The files will be added to the repository at the next commit. To undo an |
|
348 | 348 | add before that, see 'hg forget'. |
|
349 | 349 | |
|
350 | 350 | If no names are given, add all files to the repository (except files |
|
351 | 351 | matching ".hgignore"). |
|
352 | 352 | |
|
353 | 353 | Returns 0 if all files are successfully added. |
|
354 | 354 | |
|
355 | 355 | options ([+] can be repeated): |
|
356 | 356 | |
|
357 | 357 | -I --include PATTERN [+] include names matching the given patterns |
|
358 | 358 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
359 | 359 | -S --subrepos recurse into subrepositories |
|
360 | 360 | -n --dry-run do not perform actions, just print output |
|
361 | 361 | |
|
362 | 362 | (some details hidden, use --verbose to show complete help) |
|
363 | 363 | |
|
364 | 364 | Verbose help for add |
|
365 | 365 | |
|
366 | 366 | $ hg add -hv |
|
367 | 367 | hg add [OPTION]... [FILE]... |
|
368 | 368 | |
|
369 | 369 | add the specified files on the next commit |
|
370 | 370 | |
|
371 | 371 | Schedule files to be version controlled and added to the repository. |
|
372 | 372 | |
|
373 | 373 | The files will be added to the repository at the next commit. To undo an |
|
374 | 374 | add before that, see 'hg forget'. |
|
375 | 375 | |
|
376 | 376 | If no names are given, add all files to the repository (except files |
|
377 | 377 | matching ".hgignore"). |
|
378 | 378 | |
|
379 | 379 | Examples: |
|
380 | 380 | |
|
381 | 381 | - New (unknown) files are added automatically by 'hg add': |
|
382 | 382 | |
|
383 | 383 | $ ls |
|
384 | 384 | foo.c |
|
385 | 385 | $ hg status |
|
386 | 386 | ? foo.c |
|
387 | 387 | $ hg add |
|
388 | 388 | adding foo.c |
|
389 | 389 | $ hg status |
|
390 | 390 | A foo.c |
|
391 | 391 | |
|
392 | 392 | - Specific files to be added can be specified: |
|
393 | 393 | |
|
394 | 394 | $ ls |
|
395 | 395 | bar.c foo.c |
|
396 | 396 | $ hg status |
|
397 | 397 | ? bar.c |
|
398 | 398 | ? foo.c |
|
399 | 399 | $ hg add bar.c |
|
400 | 400 | $ hg status |
|
401 | 401 | A bar.c |
|
402 | 402 | ? foo.c |
|
403 | 403 | |
|
404 | 404 | Returns 0 if all files are successfully added. |
|
405 | 405 | |
|
406 | 406 | options ([+] can be repeated): |
|
407 | 407 | |
|
408 | 408 | -I --include PATTERN [+] include names matching the given patterns |
|
409 | 409 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
410 | 410 | -S --subrepos recurse into subrepositories |
|
411 | 411 | -n --dry-run do not perform actions, just print output |
|
412 | 412 | |
|
413 | 413 | global options ([+] can be repeated): |
|
414 | 414 | |
|
415 | 415 | -R --repository REPO repository root directory or name of overlay bundle |
|
416 | 416 | file |
|
417 | 417 | --cwd DIR change working directory |
|
418 | 418 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
419 | 419 | all prompts |
|
420 | 420 | -q --quiet suppress output |
|
421 | 421 | -v --verbose enable additional output |
|
422 | 422 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
423 | 423 | debug) |
|
424 | 424 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
425 | 425 | --debug enable debugging output |
|
426 | 426 | --debugger start debugger |
|
427 | 427 | --encoding ENCODE set the charset encoding (default: ascii) |
|
428 | 428 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
429 | 429 | --traceback always print a traceback on exception |
|
430 | 430 | --time time how long the command takes |
|
431 | 431 | --profile print command execution profile |
|
432 | 432 | --version output version information and exit |
|
433 | 433 | -h --help display help and exit |
|
434 | 434 | --hidden consider hidden changesets |
|
435 | 435 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
436 | 436 | (default: auto) |
|
437 | 437 | |
|
438 | 438 | Test the textwidth config option |
|
439 | 439 | |
|
440 | 440 | $ hg root -h --config ui.textwidth=50 |
|
441 | 441 | hg root |
|
442 | 442 | |
|
443 | 443 | print the root (top) of the current working |
|
444 | 444 | directory |
|
445 | 445 | |
|
446 | 446 | Print the root directory of the current |
|
447 | 447 | repository. |
|
448 | 448 | |
|
449 | 449 | Returns 0 on success. |
|
450 | 450 | |
|
451 | 451 | (some details hidden, use --verbose to show |
|
452 | 452 | complete help) |
|
453 | 453 | |
|
454 | 454 | Test help option with version option |
|
455 | 455 | |
|
456 | 456 | $ hg add -h --version |
|
457 | 457 | Mercurial Distributed SCM (version *) (glob) |
|
458 | 458 | (see https://mercurial-scm.org for more information) |
|
459 | 459 | |
|
460 | 460 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
461 | 461 | This is free software; see the source for copying conditions. There is NO |
|
462 | 462 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
463 | 463 | |
|
464 | 464 | $ hg add --skjdfks |
|
465 | 465 | hg add: option --skjdfks not recognized |
|
466 | 466 | hg add [OPTION]... [FILE]... |
|
467 | 467 | |
|
468 | 468 | add the specified files on the next commit |
|
469 | 469 | |
|
470 | 470 | options ([+] can be repeated): |
|
471 | 471 | |
|
472 | 472 | -I --include PATTERN [+] include names matching the given patterns |
|
473 | 473 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
474 | 474 | -S --subrepos recurse into subrepositories |
|
475 | 475 | -n --dry-run do not perform actions, just print output |
|
476 | 476 | |
|
477 | 477 | (use 'hg add -h' to show more help) |
|
478 | 478 | [255] |
|
479 | 479 | |
|
480 | 480 | Test ambiguous command help |
|
481 | 481 | |
|
482 | 482 | $ hg help ad |
|
483 | 483 | list of commands: |
|
484 | 484 | |
|
485 | 485 | add add the specified files on the next commit |
|
486 | 486 | addremove add all new files, delete all missing files |
|
487 | 487 | |
|
488 | 488 | (use 'hg help -v ad' to show built-in aliases and global options) |
|
489 | 489 | |
|
490 | 490 | Test command without options |
|
491 | 491 | |
|
492 | 492 | $ hg help verify |
|
493 | 493 | hg verify |
|
494 | 494 | |
|
495 | 495 | verify the integrity of the repository |
|
496 | 496 | |
|
497 | 497 | Verify the integrity of the current repository. |
|
498 | 498 | |
|
499 | 499 | This will perform an extensive check of the repository's integrity, |
|
500 | 500 | validating the hashes and checksums of each entry in the changelog, |
|
501 | 501 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
502 | 502 | and indices. |
|
503 | 503 | |
|
504 | 504 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more |
|
505 | 505 | information about recovery from corruption of the repository. |
|
506 | 506 | |
|
507 | 507 | Returns 0 on success, 1 if errors are encountered. |
|
508 | 508 | |
|
509 | 509 | (some details hidden, use --verbose to show complete help) |
|
510 | 510 | |
|
511 | 511 | $ hg help diff |
|
512 | 512 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
513 | 513 | |
|
514 | 514 | diff repository (or selected files) |
|
515 | 515 | |
|
516 | 516 | Show differences between revisions for the specified files. |
|
517 | 517 | |
|
518 | 518 | Differences between files are shown using the unified diff format. |
|
519 | 519 | |
|
520 | 520 | Note: |
|
521 | 521 | 'hg diff' may generate unexpected results for merges, as it will |
|
522 | 522 | default to comparing against the working directory's first parent |
|
523 | 523 | changeset if no revisions are specified. |
|
524 | 524 | |
|
525 | 525 | When two revision arguments are given, then changes are shown between |
|
526 | 526 | those revisions. If only one revision is specified then that revision is |
|
527 | 527 | compared to the working directory, and, when no revisions are specified, |
|
528 | 528 | the working directory files are compared to its first parent. |
|
529 | 529 | |
|
530 | 530 | Alternatively you can specify -c/--change with a revision to see the |
|
531 | 531 | changes in that changeset relative to its first parent. |
|
532 | 532 | |
|
533 | 533 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
534 | 534 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
535 | 535 | with undesirable results. |
|
536 | 536 | |
|
537 | 537 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
538 | 538 | For more information, read 'hg help diffs'. |
|
539 | 539 | |
|
540 | 540 | Returns 0 on success. |
|
541 | 541 | |
|
542 | 542 | options ([+] can be repeated): |
|
543 | 543 | |
|
544 | 544 | -r --rev REV [+] revision |
|
545 | 545 | -c --change REV change made by revision |
|
546 | 546 | -a --text treat all files as text |
|
547 | 547 | -g --git use git extended diff format |
|
548 | 548 | --binary generate binary diffs in git mode (default) |
|
549 | 549 | --nodates omit dates from diff headers |
|
550 | 550 | --noprefix omit a/ and b/ prefixes from filenames |
|
551 | 551 | -p --show-function show which function each change is in |
|
552 | 552 | --reverse produce a diff that undoes the changes |
|
553 | 553 | -w --ignore-all-space ignore white space when comparing lines |
|
554 | 554 | -b --ignore-space-change ignore changes in the amount of white space |
|
555 | 555 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
556 | 556 | -U --unified NUM number of lines of context to show |
|
557 | 557 | --stat output diffstat-style summary of changes |
|
558 | 558 | --root DIR produce diffs relative to subdirectory |
|
559 | 559 | -I --include PATTERN [+] include names matching the given patterns |
|
560 | 560 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
561 | 561 | -S --subrepos recurse into subrepositories |
|
562 | 562 | |
|
563 | 563 | (some details hidden, use --verbose to show complete help) |
|
564 | 564 | |
|
565 | 565 | $ hg help status |
|
566 | 566 | hg status [OPTION]... [FILE]... |
|
567 | 567 | |
|
568 | 568 | aliases: st |
|
569 | 569 | |
|
570 | 570 | show changed files in the working directory |
|
571 | 571 | |
|
572 | 572 | Show status of files in the repository. If names are given, only files |
|
573 | 573 | that match are shown. Files that are clean or ignored or the source of a |
|
574 | 574 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
575 | 575 | -C/--copies or -A/--all are given. Unless options described with "show |
|
576 | 576 | only ..." are given, the options -mardu are used. |
|
577 | 577 | |
|
578 | 578 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
579 | 579 | explicitly requested with -u/--unknown or -i/--ignored. |
|
580 | 580 | |
|
581 | 581 | Note: |
|
582 | 582 | 'hg status' may appear to disagree with diff if permissions have |
|
583 | 583 | changed or a merge has occurred. The standard diff format does not |
|
584 | 584 | report permission changes and diff only reports changes relative to one |
|
585 | 585 | merge parent. |
|
586 | 586 | |
|
587 | 587 | If one revision is given, it is used as the base revision. If two |
|
588 | 588 | revisions are given, the differences between them are shown. The --change |
|
589 | 589 | option can also be used as a shortcut to list the changed files of a |
|
590 | 590 | revision from its first parent. |
|
591 | 591 | |
|
592 | 592 | The codes used to show the status of files are: |
|
593 | 593 | |
|
594 | 594 | M = modified |
|
595 | 595 | A = added |
|
596 | 596 | R = removed |
|
597 | 597 | C = clean |
|
598 | 598 | ! = missing (deleted by non-hg command, but still tracked) |
|
599 | 599 | ? = not tracked |
|
600 | 600 | I = ignored |
|
601 | 601 | = origin of the previous file (with --copies) |
|
602 | 602 | |
|
603 | 603 | Returns 0 on success. |
|
604 | 604 | |
|
605 | 605 | options ([+] can be repeated): |
|
606 | 606 | |
|
607 | 607 | -A --all show status of all files |
|
608 | 608 | -m --modified show only modified files |
|
609 | 609 | -a --added show only added files |
|
610 | 610 | -r --removed show only removed files |
|
611 | 611 | -d --deleted show only deleted (but tracked) files |
|
612 | 612 | -c --clean show only files without changes |
|
613 | 613 | -u --unknown show only unknown (not tracked) files |
|
614 | 614 | -i --ignored show only ignored files |
|
615 | 615 | -n --no-status hide status prefix |
|
616 | 616 | -C --copies show source of copied files |
|
617 | 617 | -0 --print0 end filenames with NUL, for use with xargs |
|
618 | 618 | --rev REV [+] show difference from revision |
|
619 | 619 | --change REV list the changed files of a revision |
|
620 | 620 | -I --include PATTERN [+] include names matching the given patterns |
|
621 | 621 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
622 | 622 | -S --subrepos recurse into subrepositories |
|
623 | 623 | |
|
624 | 624 | (some details hidden, use --verbose to show complete help) |
|
625 | 625 | |
|
626 | 626 | $ hg -q help status |
|
627 | 627 | hg status [OPTION]... [FILE]... |
|
628 | 628 | |
|
629 | 629 | show changed files in the working directory |
|
630 | 630 | |
|
631 | 631 | $ hg help foo |
|
632 | 632 | abort: no such help topic: foo |
|
633 | 633 | (try 'hg help --keyword foo') |
|
634 | 634 | [255] |
|
635 | 635 | |
|
636 | 636 | $ hg skjdfks |
|
637 | 637 | hg: unknown command 'skjdfks' |
|
638 | 638 | Mercurial Distributed SCM |
|
639 | 639 | |
|
640 | 640 | basic commands: |
|
641 | 641 | |
|
642 | 642 | add add the specified files on the next commit |
|
643 | 643 | annotate show changeset information by line for each file |
|
644 | 644 | clone make a copy of an existing repository |
|
645 | 645 | commit commit the specified files or all outstanding changes |
|
646 | 646 | diff diff repository (or selected files) |
|
647 | 647 | export dump the header and diffs for one or more changesets |
|
648 | 648 | forget forget the specified files on the next commit |
|
649 | 649 | init create a new repository in the given directory |
|
650 | 650 | log show revision history of entire repository or files |
|
651 | 651 | merge merge another revision into working directory |
|
652 | 652 | pull pull changes from the specified source |
|
653 | 653 | push push changes to the specified destination |
|
654 | 654 | remove remove the specified files on the next commit |
|
655 | 655 | serve start stand-alone webserver |
|
656 | 656 | status show changed files in the working directory |
|
657 | 657 | summary summarize working directory state |
|
658 | 658 | update update working directory (or switch revisions) |
|
659 | 659 | |
|
660 | 660 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
661 | 661 | [255] |
|
662 | 662 | |
|
663 | Typoed command gives suggestion | |
|
664 | $ hg puls | |
|
665 | hg: unknown command 'puls' | |
|
666 | (did you mean one of pull, push?) | |
|
667 | [255] | |
|
668 | ||
|
669 | Not enabled extension gets suggested | |
|
670 | ||
|
671 | $ hg rebase | |
|
672 | hg: unknown command 'rebase' | |
|
673 | 'rebase' is provided by the following extension: | |
|
674 | ||
|
675 | rebase command to move sets of revisions to a different ancestor | |
|
676 | ||
|
677 | (use 'hg help extensions' for information on enabling extensions) | |
|
678 | [255] | |
|
679 | ||
|
680 | Disabled extension gets suggested | |
|
681 | $ hg --config extensions.rebase=! rebase | |
|
682 | hg: unknown command 'rebase' | |
|
683 | (did you mean one of rename, resolve?) | |
|
684 | [255] | |
|
663 | 685 | |
|
664 | 686 | Make sure that we don't run afoul of the help system thinking that |
|
665 | 687 | this is a section and erroring out weirdly. |
|
666 | 688 | |
|
667 | 689 | $ hg .log |
|
668 | 690 | hg: unknown command '.log' |
|
669 | 691 | (did you mean log?) |
|
670 | 692 | [255] |
|
671 | 693 | |
|
672 | 694 | $ hg log. |
|
673 | 695 | hg: unknown command 'log.' |
|
674 | 696 | (did you mean log?) |
|
675 | 697 | [255] |
|
676 | 698 | $ hg pu.lh |
|
677 | 699 | hg: unknown command 'pu.lh' |
|
678 | 700 | (did you mean one of pull, push?) |
|
679 | 701 | [255] |
|
680 | 702 | |
|
681 | 703 | $ cat > helpext.py <<EOF |
|
682 | 704 | > import os |
|
683 | 705 | > from mercurial import commands, registrar |
|
684 | 706 | > |
|
685 | 707 | > cmdtable = {} |
|
686 | 708 | > command = registrar.command(cmdtable) |
|
687 | 709 | > |
|
688 | 710 | > @command(b'nohelp', |
|
689 | 711 | > [(b'', b'longdesc', 3, b'x'*90), |
|
690 | 712 | > (b'n', b'', None, b'normal desc'), |
|
691 | 713 | > (b'', b'newline', b'', b'line1\nline2')], |
|
692 | 714 | > b'hg nohelp', |
|
693 | 715 | > norepo=True) |
|
694 | 716 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) |
|
695 | 717 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) |
|
696 | 718 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) |
|
697 | 719 | > def nohelp(ui, *args, **kwargs): |
|
698 | 720 | > pass |
|
699 | 721 | > |
|
700 | 722 | > def uisetup(ui): |
|
701 | 723 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') |
|
702 | 724 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') |
|
703 | 725 | > |
|
704 | 726 | > EOF |
|
705 | 727 | $ echo '[extensions]' >> $HGRCPATH |
|
706 | 728 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
707 | 729 | |
|
708 | 730 | Test for aliases |
|
709 | 731 | |
|
710 | 732 | $ hg help hgalias |
|
711 | 733 | hg hgalias [--remote] |
|
712 | 734 | |
|
713 | 735 | alias for: hg summary |
|
714 | 736 | |
|
715 | 737 | summarize working directory state |
|
716 | 738 | |
|
717 | 739 | This generates a brief summary of the working directory state, including |
|
718 | 740 | parents, branch, commit status, phase and available updates. |
|
719 | 741 | |
|
720 | 742 | With the --remote option, this will check the default paths for incoming |
|
721 | 743 | and outgoing changes. This can be time-consuming. |
|
722 | 744 | |
|
723 | 745 | Returns 0 on success. |
|
724 | 746 | |
|
725 | 747 | defined by: helpext |
|
726 | 748 | |
|
727 | 749 | options: |
|
728 | 750 | |
|
729 | 751 | --remote check for push and pull |
|
730 | 752 | |
|
731 | 753 | (some details hidden, use --verbose to show complete help) |
|
732 | 754 | |
|
733 | 755 | $ hg help shellalias |
|
734 | 756 | hg shellalias |
|
735 | 757 | |
|
736 | 758 | shell alias for: |
|
737 | 759 | |
|
738 | 760 | echo hi |
|
739 | 761 | |
|
740 | 762 | defined by: helpext |
|
741 | 763 | |
|
742 | 764 | (some details hidden, use --verbose to show complete help) |
|
743 | 765 | |
|
744 | 766 | Test command with no help text |
|
745 | 767 | |
|
746 | 768 | $ hg help nohelp |
|
747 | 769 | hg nohelp |
|
748 | 770 | |
|
749 | 771 | (no help text available) |
|
750 | 772 | |
|
751 | 773 | options: |
|
752 | 774 | |
|
753 | 775 | --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
754 | 776 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
755 | 777 | -n -- normal desc |
|
756 | 778 | --newline VALUE line1 line2 |
|
757 | 779 | |
|
758 | 780 | (some details hidden, use --verbose to show complete help) |
|
759 | 781 | |
|
760 | 782 | $ hg help -k nohelp |
|
761 | 783 | Commands: |
|
762 | 784 | |
|
763 | 785 | nohelp hg nohelp |
|
764 | 786 | |
|
765 | 787 | Extension Commands: |
|
766 | 788 | |
|
767 | 789 | nohelp (no help text available) |
|
768 | 790 | |
|
769 | 791 | Test that default list of commands omits extension commands |
|
770 | 792 | |
|
771 | 793 | $ hg help |
|
772 | 794 | Mercurial Distributed SCM |
|
773 | 795 | |
|
774 | 796 | list of commands: |
|
775 | 797 | |
|
776 | 798 | add add the specified files on the next commit |
|
777 | 799 | addremove add all new files, delete all missing files |
|
778 | 800 | annotate show changeset information by line for each file |
|
779 | 801 | archive create an unversioned archive of a repository revision |
|
780 | 802 | backout reverse effect of earlier changeset |
|
781 | 803 | bisect subdivision search of changesets |
|
782 | 804 | bookmarks create a new bookmark or list existing bookmarks |
|
783 | 805 | branch set or show the current branch name |
|
784 | 806 | branches list repository named branches |
|
785 | 807 | bundle create a bundle file |
|
786 | 808 | cat output the current or given revision of files |
|
787 | 809 | clone make a copy of an existing repository |
|
788 | 810 | commit commit the specified files or all outstanding changes |
|
789 | 811 | config show combined config settings from all hgrc files |
|
790 | 812 | copy mark files as copied for the next commit |
|
791 | 813 | diff diff repository (or selected files) |
|
792 | 814 | export dump the header and diffs for one or more changesets |
|
793 | 815 | files list tracked files |
|
794 | 816 | forget forget the specified files on the next commit |
|
795 | 817 | graft copy changes from other branches onto the current branch |
|
796 | 818 | grep search revision history for a pattern in specified files |
|
797 | 819 | heads show branch heads |
|
798 | 820 | help show help for a given topic or a help overview |
|
799 | 821 | identify identify the working directory or specified revision |
|
800 | 822 | import import an ordered set of patches |
|
801 | 823 | incoming show new changesets found in source |
|
802 | 824 | init create a new repository in the given directory |
|
803 | 825 | log show revision history of entire repository or files |
|
804 | 826 | manifest output the current or given revision of the project manifest |
|
805 | 827 | merge merge another revision into working directory |
|
806 | 828 | outgoing show changesets not found in the destination |
|
807 | 829 | paths show aliases for remote repositories |
|
808 | 830 | phase set or show the current phase name |
|
809 | 831 | pull pull changes from the specified source |
|
810 | 832 | push push changes to the specified destination |
|
811 | 833 | recover roll back an interrupted transaction |
|
812 | 834 | remove remove the specified files on the next commit |
|
813 | 835 | rename rename files; equivalent of copy + remove |
|
814 | 836 | resolve redo merges or set/view the merge status of files |
|
815 | 837 | revert restore files to their checkout state |
|
816 | 838 | root print the root (top) of the current working directory |
|
817 | 839 | serve start stand-alone webserver |
|
818 | 840 | status show changed files in the working directory |
|
819 | 841 | summary summarize working directory state |
|
820 | 842 | tag add one or more tags for the current or given revision |
|
821 | 843 | tags list repository tags |
|
822 | 844 | unbundle apply one or more bundle files |
|
823 | 845 | update update working directory (or switch revisions) |
|
824 | 846 | verify verify the integrity of the repository |
|
825 | 847 | version output version and copyright information |
|
826 | 848 | |
|
827 | 849 | enabled extensions: |
|
828 | 850 | |
|
829 | 851 | helpext (no help text available) |
|
830 | 852 | |
|
831 | 853 | additional help topics: |
|
832 | 854 | |
|
833 | 855 | bundlespec Bundle File Formats |
|
834 | 856 | color Colorizing Outputs |
|
835 | 857 | config Configuration Files |
|
836 | 858 | dates Date Formats |
|
837 | 859 | diffs Diff Formats |
|
838 | 860 | environment Environment Variables |
|
839 | 861 | extensions Using Additional Features |
|
840 | 862 | filesets Specifying File Sets |
|
841 | 863 | glossary Glossary |
|
842 | 864 | hgignore Syntax for Mercurial Ignore Files |
|
843 | 865 | hgweb Configuring hgweb |
|
844 | 866 | internals Technical implementation topics |
|
845 | 867 | merge-tools Merge Tools |
|
846 | 868 | pager Pager Support |
|
847 | 869 | patterns File Name Patterns |
|
848 | 870 | phases Working with Phases |
|
849 | 871 | revisions Specifying Revisions |
|
850 | 872 | scripting Using Mercurial from scripts and automation |
|
851 | 873 | subrepos Subrepositories |
|
852 | 874 | templating Template Usage |
|
853 | 875 | urls URL Paths |
|
854 | 876 | |
|
855 | 877 | (use 'hg help -v' to show built-in aliases and global options) |
|
856 | 878 | |
|
857 | 879 | |
|
858 | 880 | Test list of internal help commands |
|
859 | 881 | |
|
860 | 882 | $ hg help debug |
|
861 | 883 | debug commands (internal and unsupported): |
|
862 | 884 | |
|
863 | 885 | debugancestor |
|
864 | 886 | find the ancestor revision of two revisions in a given index |
|
865 | 887 | debugapplystreamclonebundle |
|
866 | 888 | apply a stream clone bundle file |
|
867 | 889 | debugbuilddag |
|
868 | 890 | builds a repo with a given DAG from scratch in the current |
|
869 | 891 | empty repo |
|
870 | 892 | debugbundle lists the contents of a bundle |
|
871 | 893 | debugcheckstate |
|
872 | 894 | validate the correctness of the current dirstate |
|
873 | 895 | debugcolor show available color, effects or style |
|
874 | 896 | debugcommands |
|
875 | 897 | list all available commands and options |
|
876 | 898 | debugcomplete |
|
877 | 899 | returns the completion list associated with the given command |
|
878 | 900 | debugcreatestreamclonebundle |
|
879 | 901 | create a stream clone bundle file |
|
880 | 902 | debugdag format the changelog or an index DAG as a concise textual |
|
881 | 903 | description |
|
882 | 904 | debugdata dump the contents of a data file revision |
|
883 | 905 | debugdate parse and display a date |
|
884 | 906 | debugdeltachain |
|
885 | 907 | dump information about delta chains in a revlog |
|
886 | 908 | debugdirstate |
|
887 | 909 | show the contents of the current dirstate |
|
888 | 910 | debugdiscovery |
|
889 | 911 | runs the changeset discovery protocol in isolation |
|
890 | 912 | debugextensions |
|
891 | 913 | show information about active extensions |
|
892 | 914 | debugfileset parse and apply a fileset specification |
|
893 | 915 | debugfsinfo show information detected about current filesystem |
|
894 | 916 | debuggetbundle |
|
895 | 917 | retrieves a bundle from a repo |
|
896 | 918 | debugignore display the combined ignore pattern and information about |
|
897 | 919 | ignored files |
|
898 | 920 | debugindex dump the contents of an index file |
|
899 | 921 | debugindexdot |
|
900 | 922 | dump an index DAG as a graphviz dot file |
|
901 | 923 | debuginstall test Mercurial installation |
|
902 | 924 | debugknown test whether node ids are known to a repo |
|
903 | 925 | debuglocks show or modify state of locks |
|
904 | 926 | debugmergestate |
|
905 | 927 | print merge state |
|
906 | 928 | debugnamecomplete |
|
907 | 929 | complete "names" - tags, open branch names, bookmark names |
|
908 | 930 | debugobsolete |
|
909 | 931 | create arbitrary obsolete marker |
|
910 | 932 | debugoptADV (no help text available) |
|
911 | 933 | debugoptDEP (no help text available) |
|
912 | 934 | debugoptEXP (no help text available) |
|
913 | 935 | debugpathcomplete |
|
914 | 936 | complete part or all of a tracked path |
|
915 | 937 | debugpickmergetool |
|
916 | 938 | examine which merge tool is chosen for specified file |
|
917 | 939 | debugpushkey access the pushkey key/value protocol |
|
918 | 940 | debugpvec (no help text available) |
|
919 | 941 | debugrebuilddirstate |
|
920 | 942 | rebuild the dirstate as it would look like for the given |
|
921 | 943 | revision |
|
922 | 944 | debugrebuildfncache |
|
923 | 945 | rebuild the fncache file |
|
924 | 946 | debugrename dump rename information |
|
925 | 947 | debugrevlog show data and statistics about a revlog |
|
926 | 948 | debugrevspec parse and apply a revision specification |
|
927 | 949 | debugsetparents |
|
928 | 950 | manually set the parents of the current working directory |
|
929 | 951 | debugsub (no help text available) |
|
930 | 952 | debugsuccessorssets |
|
931 | 953 | show set of successors for revision |
|
932 | 954 | debugtemplate |
|
933 | 955 | parse and apply a template |
|
934 | 956 | debugupdatecaches |
|
935 | 957 | warm all known caches in the repository |
|
936 | 958 | debugupgraderepo |
|
937 | 959 | upgrade a repository to use different features |
|
938 | 960 | debugwalk show how files match on given patterns |
|
939 | 961 | debugwireargs |
|
940 | 962 | (no help text available) |
|
941 | 963 | |
|
942 | 964 | (use 'hg help -v debug' to show built-in aliases and global options) |
|
943 | 965 | |
|
944 | 966 | internals topic renders index of available sub-topics |
|
945 | 967 | |
|
946 | 968 | $ hg help internals |
|
947 | 969 | Technical implementation topics |
|
948 | 970 | """"""""""""""""""""""""""""""" |
|
949 | 971 | |
|
950 | 972 | To access a subtopic, use "hg help internals.{subtopic-name}" |
|
951 | 973 | |
|
952 | 974 | bundles Bundles |
|
953 | 975 | censor Censor |
|
954 | 976 | changegroups Changegroups |
|
955 | 977 | requirements Repository Requirements |
|
956 | 978 | revlogs Revision Logs |
|
957 | 979 | wireprotocol Wire Protocol |
|
958 | 980 | |
|
959 | 981 | sub-topics can be accessed |
|
960 | 982 | |
|
961 | 983 | $ hg help internals.changegroups |
|
962 | 984 | Changegroups |
|
963 | 985 | """""""""""" |
|
964 | 986 | |
|
965 | 987 | Changegroups are representations of repository revlog data, specifically |
|
966 | 988 | the changelog data, root/flat manifest data, treemanifest data, and |
|
967 | 989 | filelogs. |
|
968 | 990 | |
|
969 | 991 | There are 3 versions of changegroups: "1", "2", and "3". From a high- |
|
970 | 992 | level, versions "1" and "2" are almost exactly the same, with the only |
|
971 | 993 | difference being an additional item in the *delta header*. Version "3" |
|
972 | 994 | adds support for revlog flags in the *delta header* and optionally |
|
973 | 995 | exchanging treemanifests (enabled by setting an option on the |
|
974 | 996 | "changegroup" part in the bundle2). |
|
975 | 997 | |
|
976 | 998 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
977 | 999 | segments: |
|
978 | 1000 | |
|
979 | 1001 | +---------------------------------+ |
|
980 | 1002 | | | | | |
|
981 | 1003 | | changeset | manifest | filelogs | |
|
982 | 1004 | | | | | |
|
983 | 1005 | | | | | |
|
984 | 1006 | +---------------------------------+ |
|
985 | 1007 | |
|
986 | 1008 | When exchanging treemanifests, there are 4 logical segments: |
|
987 | 1009 | |
|
988 | 1010 | +-------------------------------------------------+ |
|
989 | 1011 | | | | | | |
|
990 | 1012 | | changeset | root | treemanifests | filelogs | |
|
991 | 1013 | | | manifest | | | |
|
992 | 1014 | | | | | | |
|
993 | 1015 | +-------------------------------------------------+ |
|
994 | 1016 | |
|
995 | 1017 | The principle building block of each segment is a *chunk*. A *chunk* is a |
|
996 | 1018 | framed piece of data: |
|
997 | 1019 | |
|
998 | 1020 | +---------------------------------------+ |
|
999 | 1021 | | | | |
|
1000 | 1022 | | length | data | |
|
1001 | 1023 | | (4 bytes) | (<length - 4> bytes) | |
|
1002 | 1024 | | | | |
|
1003 | 1025 | +---------------------------------------+ |
|
1004 | 1026 | |
|
1005 | 1027 | All integers are big-endian signed integers. Each chunk starts with a |
|
1006 | 1028 | 32-bit integer indicating the length of the entire chunk (including the |
|
1007 | 1029 | length field itself). |
|
1008 | 1030 | |
|
1009 | 1031 | There is a special case chunk that has a value of 0 for the length |
|
1010 | 1032 | ("0x00000000"). We call this an *empty chunk*. |
|
1011 | 1033 | |
|
1012 | 1034 | Delta Groups |
|
1013 | 1035 | ============ |
|
1014 | 1036 | |
|
1015 | 1037 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
1016 | 1038 | or patches against previous revisions. |
|
1017 | 1039 | |
|
1018 | 1040 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
1019 | 1041 | to signal the end of the delta group: |
|
1020 | 1042 | |
|
1021 | 1043 | +------------------------------------------------------------------------+ |
|
1022 | 1044 | | | | | | | |
|
1023 | 1045 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
1024 | 1046 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
1025 | 1047 | | | | | | | |
|
1026 | 1048 | +------------------------------------------------------------------------+ |
|
1027 | 1049 | |
|
1028 | 1050 | Each *chunk*'s data consists of the following: |
|
1029 | 1051 | |
|
1030 | 1052 | +---------------------------------------+ |
|
1031 | 1053 | | | | |
|
1032 | 1054 | | delta header | delta data | |
|
1033 | 1055 | | (various by version) | (various) | |
|
1034 | 1056 | | | | |
|
1035 | 1057 | +---------------------------------------+ |
|
1036 | 1058 | |
|
1037 | 1059 | The *delta data* is a series of *delta*s that describe a diff from an |
|
1038 | 1060 | existing entry (either that the recipient already has, or previously |
|
1039 | 1061 | specified in the bundle/changegroup). |
|
1040 | 1062 | |
|
1041 | 1063 | The *delta header* is different between versions "1", "2", and "3" of the |
|
1042 | 1064 | changegroup format. |
|
1043 | 1065 | |
|
1044 | 1066 | Version 1 (headerlen=80): |
|
1045 | 1067 | |
|
1046 | 1068 | +------------------------------------------------------+ |
|
1047 | 1069 | | | | | | |
|
1048 | 1070 | | node | p1 node | p2 node | link node | |
|
1049 | 1071 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1050 | 1072 | | | | | | |
|
1051 | 1073 | +------------------------------------------------------+ |
|
1052 | 1074 | |
|
1053 | 1075 | Version 2 (headerlen=100): |
|
1054 | 1076 | |
|
1055 | 1077 | +------------------------------------------------------------------+ |
|
1056 | 1078 | | | | | | | |
|
1057 | 1079 | | node | p1 node | p2 node | base node | link node | |
|
1058 | 1080 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1059 | 1081 | | | | | | | |
|
1060 | 1082 | +------------------------------------------------------------------+ |
|
1061 | 1083 | |
|
1062 | 1084 | Version 3 (headerlen=102): |
|
1063 | 1085 | |
|
1064 | 1086 | +------------------------------------------------------------------------------+ |
|
1065 | 1087 | | | | | | | | |
|
1066 | 1088 | | node | p1 node | p2 node | base node | link node | flags | |
|
1067 | 1089 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
1068 | 1090 | | | | | | | | |
|
1069 | 1091 | +------------------------------------------------------------------------------+ |
|
1070 | 1092 | |
|
1071 | 1093 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which |
|
1072 | 1094 | contain a series of *delta*s, densely packed (no separators). These deltas |
|
1073 | 1095 | describe a diff from an existing entry (either that the recipient already |
|
1074 | 1096 | has, or previously specified in the bundle/changegroup). The format is |
|
1075 | 1097 | described more fully in "hg help internals.bdiff", but briefly: |
|
1076 | 1098 | |
|
1077 | 1099 | +---------------------------------------------------------------+ |
|
1078 | 1100 | | | | | | |
|
1079 | 1101 | | start offset | end offset | new length | content | |
|
1080 | 1102 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
1081 | 1103 | | | | | | |
|
1082 | 1104 | +---------------------------------------------------------------+ |
|
1083 | 1105 | |
|
1084 | 1106 | Please note that the length field in the delta data does *not* include |
|
1085 | 1107 | itself. |
|
1086 | 1108 | |
|
1087 | 1109 | In version 1, the delta is always applied against the previous node from |
|
1088 | 1110 | the changegroup or the first parent if this is the first entry in the |
|
1089 | 1111 | changegroup. |
|
1090 | 1112 | |
|
1091 | 1113 | In version 2 and up, the delta base node is encoded in the entry in the |
|
1092 | 1114 | changegroup. This allows the delta to be expressed against any parent, |
|
1093 | 1115 | which can result in smaller deltas and more efficient encoding of data. |
|
1094 | 1116 | |
|
1095 | 1117 | Changeset Segment |
|
1096 | 1118 | ================= |
|
1097 | 1119 | |
|
1098 | 1120 | The *changeset segment* consists of a single *delta group* holding |
|
1099 | 1121 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
1100 | 1122 | the boundary to the *manifest segment*. |
|
1101 | 1123 | |
|
1102 | 1124 | Manifest Segment |
|
1103 | 1125 | ================ |
|
1104 | 1126 | |
|
1105 | 1127 | The *manifest segment* consists of a single *delta group* holding manifest |
|
1106 | 1128 | data. If treemanifests are in use, it contains only the manifest for the |
|
1107 | 1129 | root directory of the repository. Otherwise, it contains the entire |
|
1108 | 1130 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
1109 | 1131 | the boundary to the next segment (either the *treemanifests segment* or |
|
1110 | 1132 | the *filelogs segment*, depending on version and the request options). |
|
1111 | 1133 | |
|
1112 | 1134 | Treemanifests Segment |
|
1113 | 1135 | --------------------- |
|
1114 | 1136 | |
|
1115 | 1137 | The *treemanifests segment* only exists in changegroup version "3", and |
|
1116 | 1138 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
1117 | 1139 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
1118 | 1140 | Aside from the filenames in the *treemanifests segment* containing a |
|
1119 | 1141 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
1120 | 1142 | (see below). The final sub-segment is followed by an *empty chunk* |
|
1121 | 1143 | (logically, a sub-segment with filename size 0). This denotes the boundary |
|
1122 | 1144 | to the *filelogs segment*. |
|
1123 | 1145 | |
|
1124 | 1146 | Filelogs Segment |
|
1125 | 1147 | ================ |
|
1126 | 1148 | |
|
1127 | 1149 | The *filelogs segment* consists of multiple sub-segments, each |
|
1128 | 1150 | corresponding to an individual file whose data is being described: |
|
1129 | 1151 | |
|
1130 | 1152 | +--------------------------------------------------+ |
|
1131 | 1153 | | | | | | | |
|
1132 | 1154 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
1133 | 1155 | | | | | | (4 bytes) | |
|
1134 | 1156 | | | | | | | |
|
1135 | 1157 | +--------------------------------------------------+ |
|
1136 | 1158 | |
|
1137 | 1159 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
1138 | 1160 | a sub-segment with filename size 0). This denotes the end of the segment |
|
1139 | 1161 | and of the overall changegroup. |
|
1140 | 1162 | |
|
1141 | 1163 | Each filelog sub-segment consists of the following: |
|
1142 | 1164 | |
|
1143 | 1165 | +------------------------------------------------------+ |
|
1144 | 1166 | | | | | |
|
1145 | 1167 | | filename length | filename | delta group | |
|
1146 | 1168 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
1147 | 1169 | | | | | |
|
1148 | 1170 | +------------------------------------------------------+ |
|
1149 | 1171 | |
|
1150 | 1172 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
1151 | 1173 | followed by N chunks constituting the *delta group* for this file. The |
|
1152 | 1174 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
1153 | 1175 | next filelog sub-segment. |
|
1154 | 1176 | |
|
1155 | 1177 | Test list of commands with command with no help text |
|
1156 | 1178 | |
|
1157 | 1179 | $ hg help helpext |
|
1158 | 1180 | helpext extension - no help text available |
|
1159 | 1181 | |
|
1160 | 1182 | list of commands: |
|
1161 | 1183 | |
|
1162 | 1184 | nohelp (no help text available) |
|
1163 | 1185 | |
|
1164 | 1186 | (use 'hg help -v helpext' to show built-in aliases and global options) |
|
1165 | 1187 | |
|
1166 | 1188 | |
|
1167 | 1189 | test advanced, deprecated and experimental options are hidden in command help |
|
1168 | 1190 | $ hg help debugoptADV |
|
1169 | 1191 | hg debugoptADV |
|
1170 | 1192 | |
|
1171 | 1193 | (no help text available) |
|
1172 | 1194 | |
|
1173 | 1195 | options: |
|
1174 | 1196 | |
|
1175 | 1197 | (some details hidden, use --verbose to show complete help) |
|
1176 | 1198 | $ hg help debugoptDEP |
|
1177 | 1199 | hg debugoptDEP |
|
1178 | 1200 | |
|
1179 | 1201 | (no help text available) |
|
1180 | 1202 | |
|
1181 | 1203 | options: |
|
1182 | 1204 | |
|
1183 | 1205 | (some details hidden, use --verbose to show complete help) |
|
1184 | 1206 | |
|
1185 | 1207 | $ hg help debugoptEXP |
|
1186 | 1208 | hg debugoptEXP |
|
1187 | 1209 | |
|
1188 | 1210 | (no help text available) |
|
1189 | 1211 | |
|
1190 | 1212 | options: |
|
1191 | 1213 | |
|
1192 | 1214 | (some details hidden, use --verbose to show complete help) |
|
1193 | 1215 | |
|
1194 | 1216 | test advanced, deprecated and experimental options are shown with -v |
|
1195 | 1217 | $ hg help -v debugoptADV | grep aopt |
|
1196 | 1218 | --aopt option is (ADVANCED) |
|
1197 | 1219 | $ hg help -v debugoptDEP | grep dopt |
|
1198 | 1220 | --dopt option is (DEPRECATED) |
|
1199 | 1221 | $ hg help -v debugoptEXP | grep eopt |
|
1200 | 1222 | --eopt option is (EXPERIMENTAL) |
|
1201 | 1223 | |
|
1202 | 1224 | #if gettext |
|
1203 | 1225 | test deprecated option is hidden with translation with untranslated description |
|
1204 | 1226 | (use many globy for not failing on changed transaction) |
|
1205 | 1227 | $ LANGUAGE=sv hg help debugoptDEP |
|
1206 | 1228 | hg debugoptDEP |
|
1207 | 1229 | |
|
1208 | 1230 | (*) (glob) |
|
1209 | 1231 | |
|
1210 | 1232 | options: |
|
1211 | 1233 | |
|
1212 | 1234 | (some details hidden, use --verbose to show complete help) |
|
1213 | 1235 | #endif |
|
1214 | 1236 | |
|
1215 | 1237 | Test commands that collide with topics (issue4240) |
|
1216 | 1238 | |
|
1217 | 1239 | $ hg config -hq |
|
1218 | 1240 | hg config [-u] [NAME]... |
|
1219 | 1241 | |
|
1220 | 1242 | show combined config settings from all hgrc files |
|
1221 | 1243 | $ hg showconfig -hq |
|
1222 | 1244 | hg config [-u] [NAME]... |
|
1223 | 1245 | |
|
1224 | 1246 | show combined config settings from all hgrc files |
|
1225 | 1247 | |
|
1226 | 1248 | Test a help topic |
|
1227 | 1249 | |
|
1228 | 1250 | $ hg help dates |
|
1229 | 1251 | Date Formats |
|
1230 | 1252 | """""""""""" |
|
1231 | 1253 | |
|
1232 | 1254 | Some commands allow the user to specify a date, e.g.: |
|
1233 | 1255 | |
|
1234 | 1256 | - backout, commit, import, tag: Specify the commit date. |
|
1235 | 1257 | - log, revert, update: Select revision(s) by date. |
|
1236 | 1258 | |
|
1237 | 1259 | Many date formats are valid. Here are some examples: |
|
1238 | 1260 | |
|
1239 | 1261 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
1240 | 1262 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
1241 | 1263 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
1242 | 1264 | - "Dec 6" (midnight) |
|
1243 | 1265 | - "13:18" (today assumed) |
|
1244 | 1266 | - "3:39" (3:39AM assumed) |
|
1245 | 1267 | - "3:39pm" (15:39) |
|
1246 | 1268 | - "2006-12-06 13:18:29" (ISO 8601 format) |
|
1247 | 1269 | - "2006-12-6 13:18" |
|
1248 | 1270 | - "2006-12-6" |
|
1249 | 1271 | - "12-6" |
|
1250 | 1272 | - "12/6" |
|
1251 | 1273 | - "12/6/6" (Dec 6 2006) |
|
1252 | 1274 | - "today" (midnight) |
|
1253 | 1275 | - "yesterday" (midnight) |
|
1254 | 1276 | - "now" - right now |
|
1255 | 1277 | |
|
1256 | 1278 | Lastly, there is Mercurial's internal format: |
|
1257 | 1279 | |
|
1258 | 1280 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
1259 | 1281 | |
|
1260 | 1282 | This is the internal representation format for dates. The first number is |
|
1261 | 1283 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second |
|
1262 | 1284 | is the offset of the local timezone, in seconds west of UTC (negative if |
|
1263 | 1285 | the timezone is east of UTC). |
|
1264 | 1286 | |
|
1265 | 1287 | The log command also accepts date ranges: |
|
1266 | 1288 | |
|
1267 | 1289 | - "<DATE" - at or before a given date/time |
|
1268 | 1290 | - ">DATE" - on or after a given date/time |
|
1269 | 1291 | - "DATE to DATE" - a date range, inclusive |
|
1270 | 1292 | - "-DAYS" - within a given number of days of today |
|
1271 | 1293 | |
|
1272 | 1294 | Test repeated config section name |
|
1273 | 1295 | |
|
1274 | 1296 | $ hg help config.host |
|
1275 | 1297 | "http_proxy.host" |
|
1276 | 1298 | Host name and (optional) port of the proxy server, for example |
|
1277 | 1299 | "myproxy:8000". |
|
1278 | 1300 | |
|
1279 | 1301 | "smtp.host" |
|
1280 | 1302 | Host name of mail server, e.g. "mail.example.com". |
|
1281 | 1303 | |
|
1282 | 1304 | Unrelated trailing paragraphs shouldn't be included |
|
1283 | 1305 | |
|
1284 | 1306 | $ hg help config.extramsg | grep '^$' |
|
1285 | 1307 | |
|
1286 | 1308 | |
|
1287 | 1309 | Test capitalized section name |
|
1288 | 1310 | |
|
1289 | 1311 | $ hg help scripting.HGPLAIN > /dev/null |
|
1290 | 1312 | |
|
1291 | 1313 | Help subsection: |
|
1292 | 1314 | |
|
1293 | 1315 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
1294 | 1316 | [1] |
|
1295 | 1317 | |
|
1296 | 1318 | Show nested definitions |
|
1297 | 1319 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
1298 | 1320 | |
|
1299 | 1321 | $ hg help config.type | egrep '^$'|wc -l |
|
1300 | 1322 | \s*3 (re) |
|
1301 | 1323 | |
|
1302 | 1324 | Separate sections from subsections |
|
1303 | 1325 | |
|
1304 | 1326 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq |
|
1305 | 1327 | "format" |
|
1306 | 1328 | -------- |
|
1307 | 1329 | |
|
1308 | 1330 | "usegeneraldelta" |
|
1309 | 1331 | |
|
1310 | 1332 | "dotencode" |
|
1311 | 1333 | |
|
1312 | 1334 | "usefncache" |
|
1313 | 1335 | |
|
1314 | 1336 | "usestore" |
|
1315 | 1337 | |
|
1316 | 1338 | "profiling" |
|
1317 | 1339 | ----------- |
|
1318 | 1340 | |
|
1319 | 1341 | "format" |
|
1320 | 1342 | |
|
1321 | 1343 | "progress" |
|
1322 | 1344 | ---------- |
|
1323 | 1345 | |
|
1324 | 1346 | "format" |
|
1325 | 1347 | |
|
1326 | 1348 | |
|
1327 | 1349 | Last item in help config.*: |
|
1328 | 1350 | |
|
1329 | 1351 | $ hg help config.`hg help config|grep '^ "'| \ |
|
1330 | 1352 | > tail -1|sed 's![ "]*!!g'`| \ |
|
1331 | 1353 | > grep 'hg help -c config' > /dev/null |
|
1332 | 1354 | [1] |
|
1333 | 1355 | |
|
1334 | 1356 | note to use help -c for general hg help config: |
|
1335 | 1357 | |
|
1336 | 1358 | $ hg help config |grep 'hg help -c config' > /dev/null |
|
1337 | 1359 | |
|
1338 | 1360 | Test templating help |
|
1339 | 1361 | |
|
1340 | 1362 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
1341 | 1363 | desc String. The text of the changeset description. |
|
1342 | 1364 | diffstat String. Statistics of changes with the following format: |
|
1343 | 1365 | firstline Any text. Returns the first line of text. |
|
1344 | 1366 | nonempty Any text. Returns '(none)' if the string is empty. |
|
1345 | 1367 | |
|
1346 | 1368 | Test deprecated items |
|
1347 | 1369 | |
|
1348 | 1370 | $ hg help -v templating | grep currentbookmark |
|
1349 | 1371 | currentbookmark |
|
1350 | 1372 | $ hg help templating | (grep currentbookmark || true) |
|
1351 | 1373 | |
|
1352 | 1374 | Test help hooks |
|
1353 | 1375 | |
|
1354 | 1376 | $ cat > helphook1.py <<EOF |
|
1355 | 1377 | > from mercurial import help |
|
1356 | 1378 | > |
|
1357 | 1379 | > def rewrite(ui, topic, doc): |
|
1358 | 1380 | > return doc + '\nhelphook1\n' |
|
1359 | 1381 | > |
|
1360 | 1382 | > def extsetup(ui): |
|
1361 | 1383 | > help.addtopichook('revisions', rewrite) |
|
1362 | 1384 | > EOF |
|
1363 | 1385 | $ cat > helphook2.py <<EOF |
|
1364 | 1386 | > from mercurial import help |
|
1365 | 1387 | > |
|
1366 | 1388 | > def rewrite(ui, topic, doc): |
|
1367 | 1389 | > return doc + '\nhelphook2\n' |
|
1368 | 1390 | > |
|
1369 | 1391 | > def extsetup(ui): |
|
1370 | 1392 | > help.addtopichook('revisions', rewrite) |
|
1371 | 1393 | > EOF |
|
1372 | 1394 | $ echo '[extensions]' >> $HGRCPATH |
|
1373 | 1395 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
1374 | 1396 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
1375 | 1397 | $ hg help revsets | grep helphook |
|
1376 | 1398 | helphook1 |
|
1377 | 1399 | helphook2 |
|
1378 | 1400 | |
|
1379 | 1401 | help -c should only show debug --debug |
|
1380 | 1402 | |
|
1381 | 1403 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' |
|
1382 | 1404 | [1] |
|
1383 | 1405 | |
|
1384 | 1406 | help -c should only show deprecated for -v |
|
1385 | 1407 | |
|
1386 | 1408 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1387 | 1409 | [1] |
|
1388 | 1410 | |
|
1389 | 1411 | Test -s / --system |
|
1390 | 1412 | |
|
1391 | 1413 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ |
|
1392 | 1414 | > wc -l | sed -e 's/ //g' |
|
1393 | 1415 | 0 |
|
1394 | 1416 | $ hg help config.files --system unix | grep 'USER' | \ |
|
1395 | 1417 | > wc -l | sed -e 's/ //g' |
|
1396 | 1418 | 0 |
|
1397 | 1419 | |
|
1398 | 1420 | Test -e / -c / -k combinations |
|
1399 | 1421 | |
|
1400 | 1422 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1401 | 1423 | Commands: |
|
1402 | 1424 | $ hg help -e|egrep '^[A-Z].*:|^ debug' |
|
1403 | 1425 | Extensions: |
|
1404 | 1426 | $ hg help -k|egrep '^[A-Z].*:|^ debug' |
|
1405 | 1427 | Topics: |
|
1406 | 1428 | Commands: |
|
1407 | 1429 | Extensions: |
|
1408 | 1430 | Extension Commands: |
|
1409 | 1431 | $ hg help -c schemes |
|
1410 | 1432 | abort: no such help topic: schemes |
|
1411 | 1433 | (try 'hg help --keyword schemes') |
|
1412 | 1434 | [255] |
|
1413 | 1435 | $ hg help -e schemes |head -1 |
|
1414 | 1436 | schemes extension - extend schemes with shortcuts to repository swarms |
|
1415 | 1437 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1416 | 1438 | Commands: |
|
1417 | 1439 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1418 | 1440 | Extensions: |
|
1419 | 1441 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1420 | 1442 | Extensions: |
|
1421 | 1443 | Commands: |
|
1422 | 1444 | $ hg help -c commit > /dev/null |
|
1423 | 1445 | $ hg help -e -c commit > /dev/null |
|
1424 | 1446 | $ hg help -e commit > /dev/null |
|
1425 | 1447 | abort: no such help topic: commit |
|
1426 | 1448 | (try 'hg help --keyword commit') |
|
1427 | 1449 | [255] |
|
1428 | 1450 | |
|
1429 | 1451 | Test keyword search help |
|
1430 | 1452 | |
|
1431 | 1453 | $ cat > prefixedname.py <<EOF |
|
1432 | 1454 | > '''matched against word "clone" |
|
1433 | 1455 | > ''' |
|
1434 | 1456 | > EOF |
|
1435 | 1457 | $ echo '[extensions]' >> $HGRCPATH |
|
1436 | 1458 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
1437 | 1459 | $ hg help -k clone |
|
1438 | 1460 | Topics: |
|
1439 | 1461 | |
|
1440 | 1462 | config Configuration Files |
|
1441 | 1463 | extensions Using Additional Features |
|
1442 | 1464 | glossary Glossary |
|
1443 | 1465 | phases Working with Phases |
|
1444 | 1466 | subrepos Subrepositories |
|
1445 | 1467 | urls URL Paths |
|
1446 | 1468 | |
|
1447 | 1469 | Commands: |
|
1448 | 1470 | |
|
1449 | 1471 | bookmarks create a new bookmark or list existing bookmarks |
|
1450 | 1472 | clone make a copy of an existing repository |
|
1451 | 1473 | paths show aliases for remote repositories |
|
1452 | 1474 | update update working directory (or switch revisions) |
|
1453 | 1475 | |
|
1454 | 1476 | Extensions: |
|
1455 | 1477 | |
|
1456 | 1478 | clonebundles advertise pre-generated bundles to seed clones |
|
1457 | 1479 | prefixedname matched against word "clone" |
|
1458 | 1480 | relink recreates hardlinks between repository clones |
|
1459 | 1481 | |
|
1460 | 1482 | Extension Commands: |
|
1461 | 1483 | |
|
1462 | 1484 | qclone clone main and patch repository at same time |
|
1463 | 1485 | |
|
1464 | 1486 | Test unfound topic |
|
1465 | 1487 | |
|
1466 | 1488 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1467 | 1489 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1468 | 1490 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') |
|
1469 | 1491 | [255] |
|
1470 | 1492 | |
|
1471 | 1493 | Test unfound keyword |
|
1472 | 1494 | |
|
1473 | 1495 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1474 | 1496 | abort: no matches |
|
1475 | 1497 | (try 'hg help' for a list of topics) |
|
1476 | 1498 | [255] |
|
1477 | 1499 | |
|
1478 | 1500 | Test omit indicating for help |
|
1479 | 1501 | |
|
1480 | 1502 | $ cat > addverboseitems.py <<EOF |
|
1481 | 1503 | > '''extension to test omit indicating. |
|
1482 | 1504 | > |
|
1483 | 1505 | > This paragraph is never omitted (for extension) |
|
1484 | 1506 | > |
|
1485 | 1507 | > .. container:: verbose |
|
1486 | 1508 | > |
|
1487 | 1509 | > This paragraph is omitted, |
|
1488 | 1510 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1489 | 1511 | > |
|
1490 | 1512 | > This paragraph is never omitted, too (for extension) |
|
1491 | 1513 | > ''' |
|
1492 | 1514 | > |
|
1493 | 1515 | > from mercurial import help, commands |
|
1494 | 1516 | > testtopic = """This paragraph is never omitted (for topic). |
|
1495 | 1517 | > |
|
1496 | 1518 | > .. container:: verbose |
|
1497 | 1519 | > |
|
1498 | 1520 | > This paragraph is omitted, |
|
1499 | 1521 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1500 | 1522 | > |
|
1501 | 1523 | > This paragraph is never omitted, too (for topic) |
|
1502 | 1524 | > """ |
|
1503 | 1525 | > def extsetup(ui): |
|
1504 | 1526 | > help.helptable.append((["topic-containing-verbose"], |
|
1505 | 1527 | > "This is the topic to test omit indicating.", |
|
1506 | 1528 | > lambda ui: testtopic)) |
|
1507 | 1529 | > EOF |
|
1508 | 1530 | $ echo '[extensions]' >> $HGRCPATH |
|
1509 | 1531 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1510 | 1532 | $ hg help addverboseitems |
|
1511 | 1533 | addverboseitems extension - extension to test omit indicating. |
|
1512 | 1534 | |
|
1513 | 1535 | This paragraph is never omitted (for extension) |
|
1514 | 1536 | |
|
1515 | 1537 | This paragraph is never omitted, too (for extension) |
|
1516 | 1538 | |
|
1517 | 1539 | (some details hidden, use --verbose to show complete help) |
|
1518 | 1540 | |
|
1519 | 1541 | no commands defined |
|
1520 | 1542 | $ hg help -v addverboseitems |
|
1521 | 1543 | addverboseitems extension - extension to test omit indicating. |
|
1522 | 1544 | |
|
1523 | 1545 | This paragraph is never omitted (for extension) |
|
1524 | 1546 | |
|
1525 | 1547 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1526 | 1548 | extension) |
|
1527 | 1549 | |
|
1528 | 1550 | This paragraph is never omitted, too (for extension) |
|
1529 | 1551 | |
|
1530 | 1552 | no commands defined |
|
1531 | 1553 | $ hg help topic-containing-verbose |
|
1532 | 1554 | This is the topic to test omit indicating. |
|
1533 | 1555 | """""""""""""""""""""""""""""""""""""""""" |
|
1534 | 1556 | |
|
1535 | 1557 | This paragraph is never omitted (for topic). |
|
1536 | 1558 | |
|
1537 | 1559 | This paragraph is never omitted, too (for topic) |
|
1538 | 1560 | |
|
1539 | 1561 | (some details hidden, use --verbose to show complete help) |
|
1540 | 1562 | $ hg help -v topic-containing-verbose |
|
1541 | 1563 | This is the topic to test omit indicating. |
|
1542 | 1564 | """""""""""""""""""""""""""""""""""""""""" |
|
1543 | 1565 | |
|
1544 | 1566 | This paragraph is never omitted (for topic). |
|
1545 | 1567 | |
|
1546 | 1568 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1547 | 1569 | topic) |
|
1548 | 1570 | |
|
1549 | 1571 | This paragraph is never omitted, too (for topic) |
|
1550 | 1572 | |
|
1551 | 1573 | Test section lookup |
|
1552 | 1574 | |
|
1553 | 1575 | $ hg help revset.merge |
|
1554 | 1576 | "merge()" |
|
1555 | 1577 | Changeset is a merge changeset. |
|
1556 | 1578 | |
|
1557 | 1579 | $ hg help glossary.dag |
|
1558 | 1580 | DAG |
|
1559 | 1581 | The repository of changesets of a distributed version control system |
|
1560 | 1582 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1561 | 1583 | of nodes and edges, where nodes correspond to changesets and edges |
|
1562 | 1584 | imply a parent -> child relation. This graph can be visualized by |
|
1563 | 1585 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is |
|
1564 | 1586 | limited by the requirement for children to have at most two parents. |
|
1565 | 1587 | |
|
1566 | 1588 | |
|
1567 | 1589 | $ hg help hgrc.paths |
|
1568 | 1590 | "paths" |
|
1569 | 1591 | ------- |
|
1570 | 1592 | |
|
1571 | 1593 | Assigns symbolic names and behavior to repositories. |
|
1572 | 1594 | |
|
1573 | 1595 | Options are symbolic names defining the URL or directory that is the |
|
1574 | 1596 | location of the repository. Example: |
|
1575 | 1597 | |
|
1576 | 1598 | [paths] |
|
1577 | 1599 | my_server = https://example.com/my_repo |
|
1578 | 1600 | local_path = /home/me/repo |
|
1579 | 1601 | |
|
1580 | 1602 | These symbolic names can be used from the command line. To pull from |
|
1581 | 1603 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push |
|
1582 | 1604 | local_path'. |
|
1583 | 1605 | |
|
1584 | 1606 | Options containing colons (":") denote sub-options that can influence |
|
1585 | 1607 | behavior for that specific path. Example: |
|
1586 | 1608 | |
|
1587 | 1609 | [paths] |
|
1588 | 1610 | my_server = https://example.com/my_path |
|
1589 | 1611 | my_server:pushurl = ssh://example.com/my_path |
|
1590 | 1612 | |
|
1591 | 1613 | The following sub-options can be defined: |
|
1592 | 1614 | |
|
1593 | 1615 | "pushurl" |
|
1594 | 1616 | The URL to use for push operations. If not defined, the location |
|
1595 | 1617 | defined by the path's main entry is used. |
|
1596 | 1618 | |
|
1597 | 1619 | "pushrev" |
|
1598 | 1620 | A revset defining which revisions to push by default. |
|
1599 | 1621 | |
|
1600 | 1622 | When 'hg push' is executed without a "-r" argument, the revset defined |
|
1601 | 1623 | by this sub-option is evaluated to determine what to push. |
|
1602 | 1624 | |
|
1603 | 1625 | For example, a value of "." will push the working directory's revision |
|
1604 | 1626 | by default. |
|
1605 | 1627 | |
|
1606 | 1628 | Revsets specifying bookmarks will not result in the bookmark being |
|
1607 | 1629 | pushed. |
|
1608 | 1630 | |
|
1609 | 1631 | The following special named paths exist: |
|
1610 | 1632 | |
|
1611 | 1633 | "default" |
|
1612 | 1634 | The URL or directory to use when no source or remote is specified. |
|
1613 | 1635 | |
|
1614 | 1636 | 'hg clone' will automatically define this path to the location the |
|
1615 | 1637 | repository was cloned from. |
|
1616 | 1638 | |
|
1617 | 1639 | "default-push" |
|
1618 | 1640 | (deprecated) The URL or directory for the default 'hg push' location. |
|
1619 | 1641 | "default:pushurl" should be used instead. |
|
1620 | 1642 | |
|
1621 | 1643 | $ hg help glossary.mcguffin |
|
1622 | 1644 | abort: help section not found: glossary.mcguffin |
|
1623 | 1645 | [255] |
|
1624 | 1646 | |
|
1625 | 1647 | $ hg help glossary.mc.guffin |
|
1626 | 1648 | abort: help section not found: glossary.mc.guffin |
|
1627 | 1649 | [255] |
|
1628 | 1650 | |
|
1629 | 1651 | $ hg help template.files |
|
1630 | 1652 | files List of strings. All files modified, added, or removed by |
|
1631 | 1653 | this changeset. |
|
1632 | 1654 | files(pattern) |
|
1633 | 1655 | All files of the current changeset matching the pattern. See |
|
1634 | 1656 | 'hg help patterns'. |
|
1635 | 1657 | |
|
1636 | 1658 | Test section lookup by translated message |
|
1637 | 1659 | |
|
1638 | 1660 | str.lower() instead of encoding.lower(str) on translated message might |
|
1639 | 1661 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) |
|
1640 | 1662 | as the second or later byte of multi-byte character. |
|
1641 | 1663 | |
|
1642 | 1664 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) |
|
1643 | 1665 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this |
|
1644 | 1666 | replacement makes message meaningless. |
|
1645 | 1667 | |
|
1646 | 1668 | This tests that section lookup by translated string isn't broken by |
|
1647 | 1669 | such str.lower(). |
|
1648 | 1670 | |
|
1649 | 1671 | $ $PYTHON <<EOF |
|
1650 | 1672 | > def escape(s): |
|
1651 | 1673 | > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) |
|
1652 | 1674 | > # translation of "record" in ja_JP.cp932 |
|
1653 | 1675 | > upper = "\x8bL\x98^" |
|
1654 | 1676 | > # str.lower()-ed section name should be treated as different one |
|
1655 | 1677 | > lower = "\x8bl\x98^" |
|
1656 | 1678 | > with open('ambiguous.py', 'w') as fp: |
|
1657 | 1679 | > fp.write("""# ambiguous section names in ja_JP.cp932 |
|
1658 | 1680 | > u'''summary of extension |
|
1659 | 1681 | > |
|
1660 | 1682 | > %s |
|
1661 | 1683 | > ---- |
|
1662 | 1684 | > |
|
1663 | 1685 | > Upper name should show only this message |
|
1664 | 1686 | > |
|
1665 | 1687 | > %s |
|
1666 | 1688 | > ---- |
|
1667 | 1689 | > |
|
1668 | 1690 | > Lower name should show only this message |
|
1669 | 1691 | > |
|
1670 | 1692 | > subsequent section |
|
1671 | 1693 | > ------------------ |
|
1672 | 1694 | > |
|
1673 | 1695 | > This should be hidden at 'hg help ambiguous' with section name. |
|
1674 | 1696 | > ''' |
|
1675 | 1697 | > """ % (escape(upper), escape(lower))) |
|
1676 | 1698 | > EOF |
|
1677 | 1699 | |
|
1678 | 1700 | $ cat >> $HGRCPATH <<EOF |
|
1679 | 1701 | > [extensions] |
|
1680 | 1702 | > ambiguous = ./ambiguous.py |
|
1681 | 1703 | > EOF |
|
1682 | 1704 | |
|
1683 | 1705 | $ $PYTHON <<EOF | sh |
|
1684 | 1706 | > upper = "\x8bL\x98^" |
|
1685 | 1707 | > print "hg --encoding cp932 help -e ambiguous.%s" % upper |
|
1686 | 1708 | > EOF |
|
1687 | 1709 | \x8bL\x98^ (esc) |
|
1688 | 1710 | ---- |
|
1689 | 1711 | |
|
1690 | 1712 | Upper name should show only this message |
|
1691 | 1713 | |
|
1692 | 1714 | |
|
1693 | 1715 | $ $PYTHON <<EOF | sh |
|
1694 | 1716 | > lower = "\x8bl\x98^" |
|
1695 | 1717 | > print "hg --encoding cp932 help -e ambiguous.%s" % lower |
|
1696 | 1718 | > EOF |
|
1697 | 1719 | \x8bl\x98^ (esc) |
|
1698 | 1720 | ---- |
|
1699 | 1721 | |
|
1700 | 1722 | Lower name should show only this message |
|
1701 | 1723 | |
|
1702 | 1724 | |
|
1703 | 1725 | $ cat >> $HGRCPATH <<EOF |
|
1704 | 1726 | > [extensions] |
|
1705 | 1727 | > ambiguous = ! |
|
1706 | 1728 | > EOF |
|
1707 | 1729 | |
|
1708 | 1730 | Show help content of disabled extensions |
|
1709 | 1731 | |
|
1710 | 1732 | $ cat >> $HGRCPATH <<EOF |
|
1711 | 1733 | > [extensions] |
|
1712 | 1734 | > ambiguous = !./ambiguous.py |
|
1713 | 1735 | > EOF |
|
1714 | 1736 | $ hg help -e ambiguous |
|
1715 | 1737 | ambiguous extension - (no help text available) |
|
1716 | 1738 | |
|
1717 | 1739 | (use 'hg help extensions' for information on enabling extensions) |
|
1718 | 1740 | |
|
1719 | 1741 | Test dynamic list of merge tools only shows up once |
|
1720 | 1742 | $ hg help merge-tools |
|
1721 | 1743 | Merge Tools |
|
1722 | 1744 | """"""""""" |
|
1723 | 1745 | |
|
1724 | 1746 | To merge files Mercurial uses merge tools. |
|
1725 | 1747 | |
|
1726 | 1748 | A merge tool combines two different versions of a file into a merged file. |
|
1727 | 1749 | Merge tools are given the two files and the greatest common ancestor of |
|
1728 | 1750 | the two file versions, so they can determine the changes made on both |
|
1729 | 1751 | branches. |
|
1730 | 1752 | |
|
1731 | 1753 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg |
|
1732 | 1754 | backout' and in several extensions. |
|
1733 | 1755 | |
|
1734 | 1756 | Usually, the merge tool tries to automatically reconcile the files by |
|
1735 | 1757 | combining all non-overlapping changes that occurred separately in the two |
|
1736 | 1758 | different evolutions of the same initial base file. Furthermore, some |
|
1737 | 1759 | interactive merge programs make it easier to manually resolve conflicting |
|
1738 | 1760 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1739 | 1761 | Mercurial does not include any interactive merge programs but relies on |
|
1740 | 1762 | external tools for that. |
|
1741 | 1763 | |
|
1742 | 1764 | Available merge tools |
|
1743 | 1765 | ===================== |
|
1744 | 1766 | |
|
1745 | 1767 | External merge tools and their properties are configured in the merge- |
|
1746 | 1768 | tools configuration section - see hgrc(5) - but they can often just be |
|
1747 | 1769 | named by their executable. |
|
1748 | 1770 | |
|
1749 | 1771 | A merge tool is generally usable if its executable can be found on the |
|
1750 | 1772 | system and if it can handle the merge. The executable is found if it is an |
|
1751 | 1773 | absolute or relative executable path or the name of an application in the |
|
1752 | 1774 | executable search path. The tool is assumed to be able to handle the merge |
|
1753 | 1775 | if it can handle symlinks if the file is a symlink, if it can handle |
|
1754 | 1776 | binary files if the file is binary, and if a GUI is available if the tool |
|
1755 | 1777 | requires a GUI. |
|
1756 | 1778 | |
|
1757 | 1779 | There are some internal merge tools which can be used. The internal merge |
|
1758 | 1780 | tools are: |
|
1759 | 1781 | |
|
1760 | 1782 | ":dump" |
|
1761 | 1783 | Creates three versions of the files to merge, containing the contents of |
|
1762 | 1784 | local, other and base. These files can then be used to perform a merge |
|
1763 | 1785 | manually. If the file to be merged is named "a.txt", these files will |
|
1764 | 1786 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
1765 | 1787 | they will be placed in the same directory as "a.txt". |
|
1766 | 1788 | |
|
1767 | 1789 | This implies permerge. Therefore, files aren't dumped, if premerge runs |
|
1768 | 1790 | successfully. Use :forcedump to forcibly write files out. |
|
1769 | 1791 | |
|
1770 | 1792 | ":fail" |
|
1771 | 1793 | Rather than attempting to merge files that were modified on both |
|
1772 | 1794 | branches, it marks them as unresolved. The resolve command must be used |
|
1773 | 1795 | to resolve these conflicts. |
|
1774 | 1796 | |
|
1775 | 1797 | ":forcedump" |
|
1776 | 1798 | Creates three versions of the files as same as :dump, but omits |
|
1777 | 1799 | premerge. |
|
1778 | 1800 | |
|
1779 | 1801 | ":local" |
|
1780 | 1802 | Uses the local 'p1()' version of files as the merged version. |
|
1781 | 1803 | |
|
1782 | 1804 | ":merge" |
|
1783 | 1805 | Uses the internal non-interactive simple merge algorithm for merging |
|
1784 | 1806 | files. It will fail if there are any conflicts and leave markers in the |
|
1785 | 1807 | partially merged file. Markers will have two sections, one for each side |
|
1786 | 1808 | of merge. |
|
1787 | 1809 | |
|
1788 | 1810 | ":merge-local" |
|
1789 | 1811 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1790 | 1812 | local 'p1()' changes. |
|
1791 | 1813 | |
|
1792 | 1814 | ":merge-other" |
|
1793 | 1815 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1794 | 1816 | other 'p2()' changes. |
|
1795 | 1817 | |
|
1796 | 1818 | ":merge3" |
|
1797 | 1819 | Uses the internal non-interactive simple merge algorithm for merging |
|
1798 | 1820 | files. It will fail if there are any conflicts and leave markers in the |
|
1799 | 1821 | partially merged file. Marker will have three sections, one from each |
|
1800 | 1822 | side of the merge and one for the base content. |
|
1801 | 1823 | |
|
1802 | 1824 | ":other" |
|
1803 | 1825 | Uses the other 'p2()' version of files as the merged version. |
|
1804 | 1826 | |
|
1805 | 1827 | ":prompt" |
|
1806 | 1828 | Asks the user which of the local 'p1()' or the other 'p2()' version to |
|
1807 | 1829 | keep as the merged version. |
|
1808 | 1830 | |
|
1809 | 1831 | ":tagmerge" |
|
1810 | 1832 | Uses the internal tag merge algorithm (experimental). |
|
1811 | 1833 | |
|
1812 | 1834 | ":union" |
|
1813 | 1835 | Uses the internal non-interactive simple merge algorithm for merging |
|
1814 | 1836 | files. It will use both left and right sides for conflict regions. No |
|
1815 | 1837 | markers are inserted. |
|
1816 | 1838 | |
|
1817 | 1839 | Internal tools are always available and do not require a GUI but will by |
|
1818 | 1840 | default not handle symlinks or binary files. |
|
1819 | 1841 | |
|
1820 | 1842 | Choosing a merge tool |
|
1821 | 1843 | ===================== |
|
1822 | 1844 | |
|
1823 | 1845 | Mercurial uses these rules when deciding which merge tool to use: |
|
1824 | 1846 | |
|
1825 | 1847 | 1. If a tool has been specified with the --tool option to merge or |
|
1826 | 1848 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
1827 | 1849 | configuration, its configuration is used. Otherwise the specified tool |
|
1828 | 1850 | must be executable by the shell. |
|
1829 | 1851 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
1830 | 1852 | must be executable by the shell. |
|
1831 | 1853 | 3. If the filename of the file to be merged matches any of the patterns in |
|
1832 | 1854 | the merge-patterns configuration section, the first usable merge tool |
|
1833 | 1855 | corresponding to a matching pattern is used. Here, binary capabilities |
|
1834 | 1856 | of the merge tool are not considered. |
|
1835 | 1857 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
1836 | 1858 | name of a configured tool, the specified value is used and must be |
|
1837 | 1859 | executable by the shell. Otherwise the named tool is used if it is |
|
1838 | 1860 | usable. |
|
1839 | 1861 | 5. If any usable merge tools are present in the merge-tools configuration |
|
1840 | 1862 | section, the one with the highest priority is used. |
|
1841 | 1863 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
1842 | 1864 | but it will by default not be used for symlinks and binary files. |
|
1843 | 1865 | 7. If the file to be merged is not binary and is not a symlink, then |
|
1844 | 1866 | internal ":merge" is used. |
|
1845 | 1867 | 8. Otherwise, ":prompt" is used. |
|
1846 | 1868 | |
|
1847 | 1869 | Note: |
|
1848 | 1870 | After selecting a merge program, Mercurial will by default attempt to |
|
1849 | 1871 | merge the files using a simple merge algorithm first. Only if it |
|
1850 | 1872 | doesn't succeed because of conflicting changes Mercurial will actually |
|
1851 | 1873 | execute the merge program. Whether to use the simple merge algorithm |
|
1852 | 1874 | first can be controlled by the premerge setting of the merge tool. |
|
1853 | 1875 | Premerge is enabled by default unless the file is binary or a symlink. |
|
1854 | 1876 | |
|
1855 | 1877 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
1856 | 1878 | configuration of merge tools. |
|
1857 | 1879 | |
|
1858 | 1880 | Compression engines listed in `hg help bundlespec` |
|
1859 | 1881 | |
|
1860 | 1882 | $ hg help bundlespec | grep gzip |
|
1861 | 1883 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression |
|
1862 | 1884 | An algorithm that produces smaller bundles than "gzip". |
|
1863 | 1885 | This engine will likely produce smaller bundles than "gzip" but will be |
|
1864 | 1886 | "gzip" |
|
1865 | 1887 | better compression than "gzip". It also frequently yields better (?) |
|
1866 | 1888 | |
|
1867 | 1889 | Test usage of section marks in help documents |
|
1868 | 1890 | |
|
1869 | 1891 | $ cd "$TESTDIR"/../doc |
|
1870 | 1892 | $ $PYTHON check-seclevel.py |
|
1871 | 1893 | $ cd $TESTTMP |
|
1872 | 1894 | |
|
1873 | 1895 | #if serve |
|
1874 | 1896 | |
|
1875 | 1897 | Test the help pages in hgweb. |
|
1876 | 1898 | |
|
1877 | 1899 | Dish up an empty repo; serve it cold. |
|
1878 | 1900 | |
|
1879 | 1901 | $ hg init "$TESTTMP/test" |
|
1880 | 1902 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
1881 | 1903 | $ cat hg.pid >> $DAEMON_PIDS |
|
1882 | 1904 | |
|
1883 | 1905 | $ get-with-headers.py $LOCALIP:$HGPORT "help" |
|
1884 | 1906 | 200 Script output follows |
|
1885 | 1907 | |
|
1886 | 1908 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1887 | 1909 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1888 | 1910 | <head> |
|
1889 | 1911 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1890 | 1912 | <meta name="robots" content="index, nofollow" /> |
|
1891 | 1913 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1892 | 1914 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1893 | 1915 | |
|
1894 | 1916 | <title>Help: Index</title> |
|
1895 | 1917 | </head> |
|
1896 | 1918 | <body> |
|
1897 | 1919 | |
|
1898 | 1920 | <div class="container"> |
|
1899 | 1921 | <div class="menu"> |
|
1900 | 1922 | <div class="logo"> |
|
1901 | 1923 | <a href="https://mercurial-scm.org/"> |
|
1902 | 1924 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1903 | 1925 | </div> |
|
1904 | 1926 | <ul> |
|
1905 | 1927 | <li><a href="/shortlog">log</a></li> |
|
1906 | 1928 | <li><a href="/graph">graph</a></li> |
|
1907 | 1929 | <li><a href="/tags">tags</a></li> |
|
1908 | 1930 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1909 | 1931 | <li><a href="/branches">branches</a></li> |
|
1910 | 1932 | </ul> |
|
1911 | 1933 | <ul> |
|
1912 | 1934 | <li class="active">help</li> |
|
1913 | 1935 | </ul> |
|
1914 | 1936 | </div> |
|
1915 | 1937 | |
|
1916 | 1938 | <div class="main"> |
|
1917 | 1939 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1918 | 1940 | |
|
1919 | 1941 | <form class="search" action="/log"> |
|
1920 | 1942 | |
|
1921 | 1943 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
1922 | 1944 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
1923 | 1945 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
1924 | 1946 | </form> |
|
1925 | 1947 | <table class="bigtable"> |
|
1926 | 1948 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
1927 | 1949 | |
|
1928 | 1950 | <tr><td> |
|
1929 | 1951 | <a href="/help/bundlespec"> |
|
1930 | 1952 | bundlespec |
|
1931 | 1953 | </a> |
|
1932 | 1954 | </td><td> |
|
1933 | 1955 | Bundle File Formats |
|
1934 | 1956 | </td></tr> |
|
1935 | 1957 | <tr><td> |
|
1936 | 1958 | <a href="/help/color"> |
|
1937 | 1959 | color |
|
1938 | 1960 | </a> |
|
1939 | 1961 | </td><td> |
|
1940 | 1962 | Colorizing Outputs |
|
1941 | 1963 | </td></tr> |
|
1942 | 1964 | <tr><td> |
|
1943 | 1965 | <a href="/help/config"> |
|
1944 | 1966 | config |
|
1945 | 1967 | </a> |
|
1946 | 1968 | </td><td> |
|
1947 | 1969 | Configuration Files |
|
1948 | 1970 | </td></tr> |
|
1949 | 1971 | <tr><td> |
|
1950 | 1972 | <a href="/help/dates"> |
|
1951 | 1973 | dates |
|
1952 | 1974 | </a> |
|
1953 | 1975 | </td><td> |
|
1954 | 1976 | Date Formats |
|
1955 | 1977 | </td></tr> |
|
1956 | 1978 | <tr><td> |
|
1957 | 1979 | <a href="/help/diffs"> |
|
1958 | 1980 | diffs |
|
1959 | 1981 | </a> |
|
1960 | 1982 | </td><td> |
|
1961 | 1983 | Diff Formats |
|
1962 | 1984 | </td></tr> |
|
1963 | 1985 | <tr><td> |
|
1964 | 1986 | <a href="/help/environment"> |
|
1965 | 1987 | environment |
|
1966 | 1988 | </a> |
|
1967 | 1989 | </td><td> |
|
1968 | 1990 | Environment Variables |
|
1969 | 1991 | </td></tr> |
|
1970 | 1992 | <tr><td> |
|
1971 | 1993 | <a href="/help/extensions"> |
|
1972 | 1994 | extensions |
|
1973 | 1995 | </a> |
|
1974 | 1996 | </td><td> |
|
1975 | 1997 | Using Additional Features |
|
1976 | 1998 | </td></tr> |
|
1977 | 1999 | <tr><td> |
|
1978 | 2000 | <a href="/help/filesets"> |
|
1979 | 2001 | filesets |
|
1980 | 2002 | </a> |
|
1981 | 2003 | </td><td> |
|
1982 | 2004 | Specifying File Sets |
|
1983 | 2005 | </td></tr> |
|
1984 | 2006 | <tr><td> |
|
1985 | 2007 | <a href="/help/glossary"> |
|
1986 | 2008 | glossary |
|
1987 | 2009 | </a> |
|
1988 | 2010 | </td><td> |
|
1989 | 2011 | Glossary |
|
1990 | 2012 | </td></tr> |
|
1991 | 2013 | <tr><td> |
|
1992 | 2014 | <a href="/help/hgignore"> |
|
1993 | 2015 | hgignore |
|
1994 | 2016 | </a> |
|
1995 | 2017 | </td><td> |
|
1996 | 2018 | Syntax for Mercurial Ignore Files |
|
1997 | 2019 | </td></tr> |
|
1998 | 2020 | <tr><td> |
|
1999 | 2021 | <a href="/help/hgweb"> |
|
2000 | 2022 | hgweb |
|
2001 | 2023 | </a> |
|
2002 | 2024 | </td><td> |
|
2003 | 2025 | Configuring hgweb |
|
2004 | 2026 | </td></tr> |
|
2005 | 2027 | <tr><td> |
|
2006 | 2028 | <a href="/help/internals"> |
|
2007 | 2029 | internals |
|
2008 | 2030 | </a> |
|
2009 | 2031 | </td><td> |
|
2010 | 2032 | Technical implementation topics |
|
2011 | 2033 | </td></tr> |
|
2012 | 2034 | <tr><td> |
|
2013 | 2035 | <a href="/help/merge-tools"> |
|
2014 | 2036 | merge-tools |
|
2015 | 2037 | </a> |
|
2016 | 2038 | </td><td> |
|
2017 | 2039 | Merge Tools |
|
2018 | 2040 | </td></tr> |
|
2019 | 2041 | <tr><td> |
|
2020 | 2042 | <a href="/help/pager"> |
|
2021 | 2043 | pager |
|
2022 | 2044 | </a> |
|
2023 | 2045 | </td><td> |
|
2024 | 2046 | Pager Support |
|
2025 | 2047 | </td></tr> |
|
2026 | 2048 | <tr><td> |
|
2027 | 2049 | <a href="/help/patterns"> |
|
2028 | 2050 | patterns |
|
2029 | 2051 | </a> |
|
2030 | 2052 | </td><td> |
|
2031 | 2053 | File Name Patterns |
|
2032 | 2054 | </td></tr> |
|
2033 | 2055 | <tr><td> |
|
2034 | 2056 | <a href="/help/phases"> |
|
2035 | 2057 | phases |
|
2036 | 2058 | </a> |
|
2037 | 2059 | </td><td> |
|
2038 | 2060 | Working with Phases |
|
2039 | 2061 | </td></tr> |
|
2040 | 2062 | <tr><td> |
|
2041 | 2063 | <a href="/help/revisions"> |
|
2042 | 2064 | revisions |
|
2043 | 2065 | </a> |
|
2044 | 2066 | </td><td> |
|
2045 | 2067 | Specifying Revisions |
|
2046 | 2068 | </td></tr> |
|
2047 | 2069 | <tr><td> |
|
2048 | 2070 | <a href="/help/scripting"> |
|
2049 | 2071 | scripting |
|
2050 | 2072 | </a> |
|
2051 | 2073 | </td><td> |
|
2052 | 2074 | Using Mercurial from scripts and automation |
|
2053 | 2075 | </td></tr> |
|
2054 | 2076 | <tr><td> |
|
2055 | 2077 | <a href="/help/subrepos"> |
|
2056 | 2078 | subrepos |
|
2057 | 2079 | </a> |
|
2058 | 2080 | </td><td> |
|
2059 | 2081 | Subrepositories |
|
2060 | 2082 | </td></tr> |
|
2061 | 2083 | <tr><td> |
|
2062 | 2084 | <a href="/help/templating"> |
|
2063 | 2085 | templating |
|
2064 | 2086 | </a> |
|
2065 | 2087 | </td><td> |
|
2066 | 2088 | Template Usage |
|
2067 | 2089 | </td></tr> |
|
2068 | 2090 | <tr><td> |
|
2069 | 2091 | <a href="/help/urls"> |
|
2070 | 2092 | urls |
|
2071 | 2093 | </a> |
|
2072 | 2094 | </td><td> |
|
2073 | 2095 | URL Paths |
|
2074 | 2096 | </td></tr> |
|
2075 | 2097 | <tr><td> |
|
2076 | 2098 | <a href="/help/topic-containing-verbose"> |
|
2077 | 2099 | topic-containing-verbose |
|
2078 | 2100 | </a> |
|
2079 | 2101 | </td><td> |
|
2080 | 2102 | This is the topic to test omit indicating. |
|
2081 | 2103 | </td></tr> |
|
2082 | 2104 | |
|
2083 | 2105 | |
|
2084 | 2106 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
2085 | 2107 | |
|
2086 | 2108 | <tr><td> |
|
2087 | 2109 | <a href="/help/add"> |
|
2088 | 2110 | add |
|
2089 | 2111 | </a> |
|
2090 | 2112 | </td><td> |
|
2091 | 2113 | add the specified files on the next commit |
|
2092 | 2114 | </td></tr> |
|
2093 | 2115 | <tr><td> |
|
2094 | 2116 | <a href="/help/annotate"> |
|
2095 | 2117 | annotate |
|
2096 | 2118 | </a> |
|
2097 | 2119 | </td><td> |
|
2098 | 2120 | show changeset information by line for each file |
|
2099 | 2121 | </td></tr> |
|
2100 | 2122 | <tr><td> |
|
2101 | 2123 | <a href="/help/clone"> |
|
2102 | 2124 | clone |
|
2103 | 2125 | </a> |
|
2104 | 2126 | </td><td> |
|
2105 | 2127 | make a copy of an existing repository |
|
2106 | 2128 | </td></tr> |
|
2107 | 2129 | <tr><td> |
|
2108 | 2130 | <a href="/help/commit"> |
|
2109 | 2131 | commit |
|
2110 | 2132 | </a> |
|
2111 | 2133 | </td><td> |
|
2112 | 2134 | commit the specified files or all outstanding changes |
|
2113 | 2135 | </td></tr> |
|
2114 | 2136 | <tr><td> |
|
2115 | 2137 | <a href="/help/diff"> |
|
2116 | 2138 | diff |
|
2117 | 2139 | </a> |
|
2118 | 2140 | </td><td> |
|
2119 | 2141 | diff repository (or selected files) |
|
2120 | 2142 | </td></tr> |
|
2121 | 2143 | <tr><td> |
|
2122 | 2144 | <a href="/help/export"> |
|
2123 | 2145 | export |
|
2124 | 2146 | </a> |
|
2125 | 2147 | </td><td> |
|
2126 | 2148 | dump the header and diffs for one or more changesets |
|
2127 | 2149 | </td></tr> |
|
2128 | 2150 | <tr><td> |
|
2129 | 2151 | <a href="/help/forget"> |
|
2130 | 2152 | forget |
|
2131 | 2153 | </a> |
|
2132 | 2154 | </td><td> |
|
2133 | 2155 | forget the specified files on the next commit |
|
2134 | 2156 | </td></tr> |
|
2135 | 2157 | <tr><td> |
|
2136 | 2158 | <a href="/help/init"> |
|
2137 | 2159 | init |
|
2138 | 2160 | </a> |
|
2139 | 2161 | </td><td> |
|
2140 | 2162 | create a new repository in the given directory |
|
2141 | 2163 | </td></tr> |
|
2142 | 2164 | <tr><td> |
|
2143 | 2165 | <a href="/help/log"> |
|
2144 | 2166 | log |
|
2145 | 2167 | </a> |
|
2146 | 2168 | </td><td> |
|
2147 | 2169 | show revision history of entire repository or files |
|
2148 | 2170 | </td></tr> |
|
2149 | 2171 | <tr><td> |
|
2150 | 2172 | <a href="/help/merge"> |
|
2151 | 2173 | merge |
|
2152 | 2174 | </a> |
|
2153 | 2175 | </td><td> |
|
2154 | 2176 | merge another revision into working directory |
|
2155 | 2177 | </td></tr> |
|
2156 | 2178 | <tr><td> |
|
2157 | 2179 | <a href="/help/pull"> |
|
2158 | 2180 | pull |
|
2159 | 2181 | </a> |
|
2160 | 2182 | </td><td> |
|
2161 | 2183 | pull changes from the specified source |
|
2162 | 2184 | </td></tr> |
|
2163 | 2185 | <tr><td> |
|
2164 | 2186 | <a href="/help/push"> |
|
2165 | 2187 | push |
|
2166 | 2188 | </a> |
|
2167 | 2189 | </td><td> |
|
2168 | 2190 | push changes to the specified destination |
|
2169 | 2191 | </td></tr> |
|
2170 | 2192 | <tr><td> |
|
2171 | 2193 | <a href="/help/remove"> |
|
2172 | 2194 | remove |
|
2173 | 2195 | </a> |
|
2174 | 2196 | </td><td> |
|
2175 | 2197 | remove the specified files on the next commit |
|
2176 | 2198 | </td></tr> |
|
2177 | 2199 | <tr><td> |
|
2178 | 2200 | <a href="/help/serve"> |
|
2179 | 2201 | serve |
|
2180 | 2202 | </a> |
|
2181 | 2203 | </td><td> |
|
2182 | 2204 | start stand-alone webserver |
|
2183 | 2205 | </td></tr> |
|
2184 | 2206 | <tr><td> |
|
2185 | 2207 | <a href="/help/status"> |
|
2186 | 2208 | status |
|
2187 | 2209 | </a> |
|
2188 | 2210 | </td><td> |
|
2189 | 2211 | show changed files in the working directory |
|
2190 | 2212 | </td></tr> |
|
2191 | 2213 | <tr><td> |
|
2192 | 2214 | <a href="/help/summary"> |
|
2193 | 2215 | summary |
|
2194 | 2216 | </a> |
|
2195 | 2217 | </td><td> |
|
2196 | 2218 | summarize working directory state |
|
2197 | 2219 | </td></tr> |
|
2198 | 2220 | <tr><td> |
|
2199 | 2221 | <a href="/help/update"> |
|
2200 | 2222 | update |
|
2201 | 2223 | </a> |
|
2202 | 2224 | </td><td> |
|
2203 | 2225 | update working directory (or switch revisions) |
|
2204 | 2226 | </td></tr> |
|
2205 | 2227 | |
|
2206 | 2228 | |
|
2207 | 2229 | |
|
2208 | 2230 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
2209 | 2231 | |
|
2210 | 2232 | <tr><td> |
|
2211 | 2233 | <a href="/help/addremove"> |
|
2212 | 2234 | addremove |
|
2213 | 2235 | </a> |
|
2214 | 2236 | </td><td> |
|
2215 | 2237 | add all new files, delete all missing files |
|
2216 | 2238 | </td></tr> |
|
2217 | 2239 | <tr><td> |
|
2218 | 2240 | <a href="/help/archive"> |
|
2219 | 2241 | archive |
|
2220 | 2242 | </a> |
|
2221 | 2243 | </td><td> |
|
2222 | 2244 | create an unversioned archive of a repository revision |
|
2223 | 2245 | </td></tr> |
|
2224 | 2246 | <tr><td> |
|
2225 | 2247 | <a href="/help/backout"> |
|
2226 | 2248 | backout |
|
2227 | 2249 | </a> |
|
2228 | 2250 | </td><td> |
|
2229 | 2251 | reverse effect of earlier changeset |
|
2230 | 2252 | </td></tr> |
|
2231 | 2253 | <tr><td> |
|
2232 | 2254 | <a href="/help/bisect"> |
|
2233 | 2255 | bisect |
|
2234 | 2256 | </a> |
|
2235 | 2257 | </td><td> |
|
2236 | 2258 | subdivision search of changesets |
|
2237 | 2259 | </td></tr> |
|
2238 | 2260 | <tr><td> |
|
2239 | 2261 | <a href="/help/bookmarks"> |
|
2240 | 2262 | bookmarks |
|
2241 | 2263 | </a> |
|
2242 | 2264 | </td><td> |
|
2243 | 2265 | create a new bookmark or list existing bookmarks |
|
2244 | 2266 | </td></tr> |
|
2245 | 2267 | <tr><td> |
|
2246 | 2268 | <a href="/help/branch"> |
|
2247 | 2269 | branch |
|
2248 | 2270 | </a> |
|
2249 | 2271 | </td><td> |
|
2250 | 2272 | set or show the current branch name |
|
2251 | 2273 | </td></tr> |
|
2252 | 2274 | <tr><td> |
|
2253 | 2275 | <a href="/help/branches"> |
|
2254 | 2276 | branches |
|
2255 | 2277 | </a> |
|
2256 | 2278 | </td><td> |
|
2257 | 2279 | list repository named branches |
|
2258 | 2280 | </td></tr> |
|
2259 | 2281 | <tr><td> |
|
2260 | 2282 | <a href="/help/bundle"> |
|
2261 | 2283 | bundle |
|
2262 | 2284 | </a> |
|
2263 | 2285 | </td><td> |
|
2264 | 2286 | create a bundle file |
|
2265 | 2287 | </td></tr> |
|
2266 | 2288 | <tr><td> |
|
2267 | 2289 | <a href="/help/cat"> |
|
2268 | 2290 | cat |
|
2269 | 2291 | </a> |
|
2270 | 2292 | </td><td> |
|
2271 | 2293 | output the current or given revision of files |
|
2272 | 2294 | </td></tr> |
|
2273 | 2295 | <tr><td> |
|
2274 | 2296 | <a href="/help/config"> |
|
2275 | 2297 | config |
|
2276 | 2298 | </a> |
|
2277 | 2299 | </td><td> |
|
2278 | 2300 | show combined config settings from all hgrc files |
|
2279 | 2301 | </td></tr> |
|
2280 | 2302 | <tr><td> |
|
2281 | 2303 | <a href="/help/copy"> |
|
2282 | 2304 | copy |
|
2283 | 2305 | </a> |
|
2284 | 2306 | </td><td> |
|
2285 | 2307 | mark files as copied for the next commit |
|
2286 | 2308 | </td></tr> |
|
2287 | 2309 | <tr><td> |
|
2288 | 2310 | <a href="/help/files"> |
|
2289 | 2311 | files |
|
2290 | 2312 | </a> |
|
2291 | 2313 | </td><td> |
|
2292 | 2314 | list tracked files |
|
2293 | 2315 | </td></tr> |
|
2294 | 2316 | <tr><td> |
|
2295 | 2317 | <a href="/help/graft"> |
|
2296 | 2318 | graft |
|
2297 | 2319 | </a> |
|
2298 | 2320 | </td><td> |
|
2299 | 2321 | copy changes from other branches onto the current branch |
|
2300 | 2322 | </td></tr> |
|
2301 | 2323 | <tr><td> |
|
2302 | 2324 | <a href="/help/grep"> |
|
2303 | 2325 | grep |
|
2304 | 2326 | </a> |
|
2305 | 2327 | </td><td> |
|
2306 | 2328 | search revision history for a pattern in specified files |
|
2307 | 2329 | </td></tr> |
|
2308 | 2330 | <tr><td> |
|
2309 | 2331 | <a href="/help/heads"> |
|
2310 | 2332 | heads |
|
2311 | 2333 | </a> |
|
2312 | 2334 | </td><td> |
|
2313 | 2335 | show branch heads |
|
2314 | 2336 | </td></tr> |
|
2315 | 2337 | <tr><td> |
|
2316 | 2338 | <a href="/help/help"> |
|
2317 | 2339 | help |
|
2318 | 2340 | </a> |
|
2319 | 2341 | </td><td> |
|
2320 | 2342 | show help for a given topic or a help overview |
|
2321 | 2343 | </td></tr> |
|
2322 | 2344 | <tr><td> |
|
2323 | 2345 | <a href="/help/hgalias"> |
|
2324 | 2346 | hgalias |
|
2325 | 2347 | </a> |
|
2326 | 2348 | </td><td> |
|
2327 | 2349 | summarize working directory state |
|
2328 | 2350 | </td></tr> |
|
2329 | 2351 | <tr><td> |
|
2330 | 2352 | <a href="/help/identify"> |
|
2331 | 2353 | identify |
|
2332 | 2354 | </a> |
|
2333 | 2355 | </td><td> |
|
2334 | 2356 | identify the working directory or specified revision |
|
2335 | 2357 | </td></tr> |
|
2336 | 2358 | <tr><td> |
|
2337 | 2359 | <a href="/help/import"> |
|
2338 | 2360 | import |
|
2339 | 2361 | </a> |
|
2340 | 2362 | </td><td> |
|
2341 | 2363 | import an ordered set of patches |
|
2342 | 2364 | </td></tr> |
|
2343 | 2365 | <tr><td> |
|
2344 | 2366 | <a href="/help/incoming"> |
|
2345 | 2367 | incoming |
|
2346 | 2368 | </a> |
|
2347 | 2369 | </td><td> |
|
2348 | 2370 | show new changesets found in source |
|
2349 | 2371 | </td></tr> |
|
2350 | 2372 | <tr><td> |
|
2351 | 2373 | <a href="/help/manifest"> |
|
2352 | 2374 | manifest |
|
2353 | 2375 | </a> |
|
2354 | 2376 | </td><td> |
|
2355 | 2377 | output the current or given revision of the project manifest |
|
2356 | 2378 | </td></tr> |
|
2357 | 2379 | <tr><td> |
|
2358 | 2380 | <a href="/help/nohelp"> |
|
2359 | 2381 | nohelp |
|
2360 | 2382 | </a> |
|
2361 | 2383 | </td><td> |
|
2362 | 2384 | (no help text available) |
|
2363 | 2385 | </td></tr> |
|
2364 | 2386 | <tr><td> |
|
2365 | 2387 | <a href="/help/outgoing"> |
|
2366 | 2388 | outgoing |
|
2367 | 2389 | </a> |
|
2368 | 2390 | </td><td> |
|
2369 | 2391 | show changesets not found in the destination |
|
2370 | 2392 | </td></tr> |
|
2371 | 2393 | <tr><td> |
|
2372 | 2394 | <a href="/help/paths"> |
|
2373 | 2395 | paths |
|
2374 | 2396 | </a> |
|
2375 | 2397 | </td><td> |
|
2376 | 2398 | show aliases for remote repositories |
|
2377 | 2399 | </td></tr> |
|
2378 | 2400 | <tr><td> |
|
2379 | 2401 | <a href="/help/phase"> |
|
2380 | 2402 | phase |
|
2381 | 2403 | </a> |
|
2382 | 2404 | </td><td> |
|
2383 | 2405 | set or show the current phase name |
|
2384 | 2406 | </td></tr> |
|
2385 | 2407 | <tr><td> |
|
2386 | 2408 | <a href="/help/recover"> |
|
2387 | 2409 | recover |
|
2388 | 2410 | </a> |
|
2389 | 2411 | </td><td> |
|
2390 | 2412 | roll back an interrupted transaction |
|
2391 | 2413 | </td></tr> |
|
2392 | 2414 | <tr><td> |
|
2393 | 2415 | <a href="/help/rename"> |
|
2394 | 2416 | rename |
|
2395 | 2417 | </a> |
|
2396 | 2418 | </td><td> |
|
2397 | 2419 | rename files; equivalent of copy + remove |
|
2398 | 2420 | </td></tr> |
|
2399 | 2421 | <tr><td> |
|
2400 | 2422 | <a href="/help/resolve"> |
|
2401 | 2423 | resolve |
|
2402 | 2424 | </a> |
|
2403 | 2425 | </td><td> |
|
2404 | 2426 | redo merges or set/view the merge status of files |
|
2405 | 2427 | </td></tr> |
|
2406 | 2428 | <tr><td> |
|
2407 | 2429 | <a href="/help/revert"> |
|
2408 | 2430 | revert |
|
2409 | 2431 | </a> |
|
2410 | 2432 | </td><td> |
|
2411 | 2433 | restore files to their checkout state |
|
2412 | 2434 | </td></tr> |
|
2413 | 2435 | <tr><td> |
|
2414 | 2436 | <a href="/help/root"> |
|
2415 | 2437 | root |
|
2416 | 2438 | </a> |
|
2417 | 2439 | </td><td> |
|
2418 | 2440 | print the root (top) of the current working directory |
|
2419 | 2441 | </td></tr> |
|
2420 | 2442 | <tr><td> |
|
2421 | 2443 | <a href="/help/shellalias"> |
|
2422 | 2444 | shellalias |
|
2423 | 2445 | </a> |
|
2424 | 2446 | </td><td> |
|
2425 | 2447 | (no help text available) |
|
2426 | 2448 | </td></tr> |
|
2427 | 2449 | <tr><td> |
|
2428 | 2450 | <a href="/help/tag"> |
|
2429 | 2451 | tag |
|
2430 | 2452 | </a> |
|
2431 | 2453 | </td><td> |
|
2432 | 2454 | add one or more tags for the current or given revision |
|
2433 | 2455 | </td></tr> |
|
2434 | 2456 | <tr><td> |
|
2435 | 2457 | <a href="/help/tags"> |
|
2436 | 2458 | tags |
|
2437 | 2459 | </a> |
|
2438 | 2460 | </td><td> |
|
2439 | 2461 | list repository tags |
|
2440 | 2462 | </td></tr> |
|
2441 | 2463 | <tr><td> |
|
2442 | 2464 | <a href="/help/unbundle"> |
|
2443 | 2465 | unbundle |
|
2444 | 2466 | </a> |
|
2445 | 2467 | </td><td> |
|
2446 | 2468 | apply one or more bundle files |
|
2447 | 2469 | </td></tr> |
|
2448 | 2470 | <tr><td> |
|
2449 | 2471 | <a href="/help/verify"> |
|
2450 | 2472 | verify |
|
2451 | 2473 | </a> |
|
2452 | 2474 | </td><td> |
|
2453 | 2475 | verify the integrity of the repository |
|
2454 | 2476 | </td></tr> |
|
2455 | 2477 | <tr><td> |
|
2456 | 2478 | <a href="/help/version"> |
|
2457 | 2479 | version |
|
2458 | 2480 | </a> |
|
2459 | 2481 | </td><td> |
|
2460 | 2482 | output version and copyright information |
|
2461 | 2483 | </td></tr> |
|
2462 | 2484 | |
|
2463 | 2485 | |
|
2464 | 2486 | </table> |
|
2465 | 2487 | </div> |
|
2466 | 2488 | </div> |
|
2467 | 2489 | |
|
2468 | 2490 | |
|
2469 | 2491 | |
|
2470 | 2492 | </body> |
|
2471 | 2493 | </html> |
|
2472 | 2494 | |
|
2473 | 2495 | |
|
2474 | 2496 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" |
|
2475 | 2497 | 200 Script output follows |
|
2476 | 2498 | |
|
2477 | 2499 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2478 | 2500 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2479 | 2501 | <head> |
|
2480 | 2502 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2481 | 2503 | <meta name="robots" content="index, nofollow" /> |
|
2482 | 2504 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2483 | 2505 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2484 | 2506 | |
|
2485 | 2507 | <title>Help: add</title> |
|
2486 | 2508 | </head> |
|
2487 | 2509 | <body> |
|
2488 | 2510 | |
|
2489 | 2511 | <div class="container"> |
|
2490 | 2512 | <div class="menu"> |
|
2491 | 2513 | <div class="logo"> |
|
2492 | 2514 | <a href="https://mercurial-scm.org/"> |
|
2493 | 2515 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2494 | 2516 | </div> |
|
2495 | 2517 | <ul> |
|
2496 | 2518 | <li><a href="/shortlog">log</a></li> |
|
2497 | 2519 | <li><a href="/graph">graph</a></li> |
|
2498 | 2520 | <li><a href="/tags">tags</a></li> |
|
2499 | 2521 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2500 | 2522 | <li><a href="/branches">branches</a></li> |
|
2501 | 2523 | </ul> |
|
2502 | 2524 | <ul> |
|
2503 | 2525 | <li class="active"><a href="/help">help</a></li> |
|
2504 | 2526 | </ul> |
|
2505 | 2527 | </div> |
|
2506 | 2528 | |
|
2507 | 2529 | <div class="main"> |
|
2508 | 2530 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2509 | 2531 | <h3>Help: add</h3> |
|
2510 | 2532 | |
|
2511 | 2533 | <form class="search" action="/log"> |
|
2512 | 2534 | |
|
2513 | 2535 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2514 | 2536 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2515 | 2537 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2516 | 2538 | </form> |
|
2517 | 2539 | <div id="doc"> |
|
2518 | 2540 | <p> |
|
2519 | 2541 | hg add [OPTION]... [FILE]... |
|
2520 | 2542 | </p> |
|
2521 | 2543 | <p> |
|
2522 | 2544 | add the specified files on the next commit |
|
2523 | 2545 | </p> |
|
2524 | 2546 | <p> |
|
2525 | 2547 | Schedule files to be version controlled and added to the |
|
2526 | 2548 | repository. |
|
2527 | 2549 | </p> |
|
2528 | 2550 | <p> |
|
2529 | 2551 | The files will be added to the repository at the next commit. To |
|
2530 | 2552 | undo an add before that, see 'hg forget'. |
|
2531 | 2553 | </p> |
|
2532 | 2554 | <p> |
|
2533 | 2555 | If no names are given, add all files to the repository (except |
|
2534 | 2556 | files matching ".hgignore"). |
|
2535 | 2557 | </p> |
|
2536 | 2558 | <p> |
|
2537 | 2559 | Examples: |
|
2538 | 2560 | </p> |
|
2539 | 2561 | <ul> |
|
2540 | 2562 | <li> New (unknown) files are added automatically by 'hg add': |
|
2541 | 2563 | <pre> |
|
2542 | 2564 | \$ ls (re) |
|
2543 | 2565 | foo.c |
|
2544 | 2566 | \$ hg status (re) |
|
2545 | 2567 | ? foo.c |
|
2546 | 2568 | \$ hg add (re) |
|
2547 | 2569 | adding foo.c |
|
2548 | 2570 | \$ hg status (re) |
|
2549 | 2571 | A foo.c |
|
2550 | 2572 | </pre> |
|
2551 | 2573 | <li> Specific files to be added can be specified: |
|
2552 | 2574 | <pre> |
|
2553 | 2575 | \$ ls (re) |
|
2554 | 2576 | bar.c foo.c |
|
2555 | 2577 | \$ hg status (re) |
|
2556 | 2578 | ? bar.c |
|
2557 | 2579 | ? foo.c |
|
2558 | 2580 | \$ hg add bar.c (re) |
|
2559 | 2581 | \$ hg status (re) |
|
2560 | 2582 | A bar.c |
|
2561 | 2583 | ? foo.c |
|
2562 | 2584 | </pre> |
|
2563 | 2585 | </ul> |
|
2564 | 2586 | <p> |
|
2565 | 2587 | Returns 0 if all files are successfully added. |
|
2566 | 2588 | </p> |
|
2567 | 2589 | <p> |
|
2568 | 2590 | options ([+] can be repeated): |
|
2569 | 2591 | </p> |
|
2570 | 2592 | <table> |
|
2571 | 2593 | <tr><td>-I</td> |
|
2572 | 2594 | <td>--include PATTERN [+]</td> |
|
2573 | 2595 | <td>include names matching the given patterns</td></tr> |
|
2574 | 2596 | <tr><td>-X</td> |
|
2575 | 2597 | <td>--exclude PATTERN [+]</td> |
|
2576 | 2598 | <td>exclude names matching the given patterns</td></tr> |
|
2577 | 2599 | <tr><td>-S</td> |
|
2578 | 2600 | <td>--subrepos</td> |
|
2579 | 2601 | <td>recurse into subrepositories</td></tr> |
|
2580 | 2602 | <tr><td>-n</td> |
|
2581 | 2603 | <td>--dry-run</td> |
|
2582 | 2604 | <td>do not perform actions, just print output</td></tr> |
|
2583 | 2605 | </table> |
|
2584 | 2606 | <p> |
|
2585 | 2607 | global options ([+] can be repeated): |
|
2586 | 2608 | </p> |
|
2587 | 2609 | <table> |
|
2588 | 2610 | <tr><td>-R</td> |
|
2589 | 2611 | <td>--repository REPO</td> |
|
2590 | 2612 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2591 | 2613 | <tr><td></td> |
|
2592 | 2614 | <td>--cwd DIR</td> |
|
2593 | 2615 | <td>change working directory</td></tr> |
|
2594 | 2616 | <tr><td>-y</td> |
|
2595 | 2617 | <td>--noninteractive</td> |
|
2596 | 2618 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2597 | 2619 | <tr><td>-q</td> |
|
2598 | 2620 | <td>--quiet</td> |
|
2599 | 2621 | <td>suppress output</td></tr> |
|
2600 | 2622 | <tr><td>-v</td> |
|
2601 | 2623 | <td>--verbose</td> |
|
2602 | 2624 | <td>enable additional output</td></tr> |
|
2603 | 2625 | <tr><td></td> |
|
2604 | 2626 | <td>--color TYPE</td> |
|
2605 | 2627 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2606 | 2628 | <tr><td></td> |
|
2607 | 2629 | <td>--config CONFIG [+]</td> |
|
2608 | 2630 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2609 | 2631 | <tr><td></td> |
|
2610 | 2632 | <td>--debug</td> |
|
2611 | 2633 | <td>enable debugging output</td></tr> |
|
2612 | 2634 | <tr><td></td> |
|
2613 | 2635 | <td>--debugger</td> |
|
2614 | 2636 | <td>start debugger</td></tr> |
|
2615 | 2637 | <tr><td></td> |
|
2616 | 2638 | <td>--encoding ENCODE</td> |
|
2617 | 2639 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2618 | 2640 | <tr><td></td> |
|
2619 | 2641 | <td>--encodingmode MODE</td> |
|
2620 | 2642 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2621 | 2643 | <tr><td></td> |
|
2622 | 2644 | <td>--traceback</td> |
|
2623 | 2645 | <td>always print a traceback on exception</td></tr> |
|
2624 | 2646 | <tr><td></td> |
|
2625 | 2647 | <td>--time</td> |
|
2626 | 2648 | <td>time how long the command takes</td></tr> |
|
2627 | 2649 | <tr><td></td> |
|
2628 | 2650 | <td>--profile</td> |
|
2629 | 2651 | <td>print command execution profile</td></tr> |
|
2630 | 2652 | <tr><td></td> |
|
2631 | 2653 | <td>--version</td> |
|
2632 | 2654 | <td>output version information and exit</td></tr> |
|
2633 | 2655 | <tr><td>-h</td> |
|
2634 | 2656 | <td>--help</td> |
|
2635 | 2657 | <td>display help and exit</td></tr> |
|
2636 | 2658 | <tr><td></td> |
|
2637 | 2659 | <td>--hidden</td> |
|
2638 | 2660 | <td>consider hidden changesets</td></tr> |
|
2639 | 2661 | <tr><td></td> |
|
2640 | 2662 | <td>--pager TYPE</td> |
|
2641 | 2663 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2642 | 2664 | </table> |
|
2643 | 2665 | |
|
2644 | 2666 | </div> |
|
2645 | 2667 | </div> |
|
2646 | 2668 | </div> |
|
2647 | 2669 | |
|
2648 | 2670 | |
|
2649 | 2671 | |
|
2650 | 2672 | </body> |
|
2651 | 2673 | </html> |
|
2652 | 2674 | |
|
2653 | 2675 | |
|
2654 | 2676 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" |
|
2655 | 2677 | 200 Script output follows |
|
2656 | 2678 | |
|
2657 | 2679 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2658 | 2680 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2659 | 2681 | <head> |
|
2660 | 2682 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2661 | 2683 | <meta name="robots" content="index, nofollow" /> |
|
2662 | 2684 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2663 | 2685 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2664 | 2686 | |
|
2665 | 2687 | <title>Help: remove</title> |
|
2666 | 2688 | </head> |
|
2667 | 2689 | <body> |
|
2668 | 2690 | |
|
2669 | 2691 | <div class="container"> |
|
2670 | 2692 | <div class="menu"> |
|
2671 | 2693 | <div class="logo"> |
|
2672 | 2694 | <a href="https://mercurial-scm.org/"> |
|
2673 | 2695 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2674 | 2696 | </div> |
|
2675 | 2697 | <ul> |
|
2676 | 2698 | <li><a href="/shortlog">log</a></li> |
|
2677 | 2699 | <li><a href="/graph">graph</a></li> |
|
2678 | 2700 | <li><a href="/tags">tags</a></li> |
|
2679 | 2701 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2680 | 2702 | <li><a href="/branches">branches</a></li> |
|
2681 | 2703 | </ul> |
|
2682 | 2704 | <ul> |
|
2683 | 2705 | <li class="active"><a href="/help">help</a></li> |
|
2684 | 2706 | </ul> |
|
2685 | 2707 | </div> |
|
2686 | 2708 | |
|
2687 | 2709 | <div class="main"> |
|
2688 | 2710 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2689 | 2711 | <h3>Help: remove</h3> |
|
2690 | 2712 | |
|
2691 | 2713 | <form class="search" action="/log"> |
|
2692 | 2714 | |
|
2693 | 2715 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2694 | 2716 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2695 | 2717 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2696 | 2718 | </form> |
|
2697 | 2719 | <div id="doc"> |
|
2698 | 2720 | <p> |
|
2699 | 2721 | hg remove [OPTION]... FILE... |
|
2700 | 2722 | </p> |
|
2701 | 2723 | <p> |
|
2702 | 2724 | aliases: rm |
|
2703 | 2725 | </p> |
|
2704 | 2726 | <p> |
|
2705 | 2727 | remove the specified files on the next commit |
|
2706 | 2728 | </p> |
|
2707 | 2729 | <p> |
|
2708 | 2730 | Schedule the indicated files for removal from the current branch. |
|
2709 | 2731 | </p> |
|
2710 | 2732 | <p> |
|
2711 | 2733 | This command schedules the files to be removed at the next commit. |
|
2712 | 2734 | To undo a remove before that, see 'hg revert'. To undo added |
|
2713 | 2735 | files, see 'hg forget'. |
|
2714 | 2736 | </p> |
|
2715 | 2737 | <p> |
|
2716 | 2738 | -A/--after can be used to remove only files that have already |
|
2717 | 2739 | been deleted, -f/--force can be used to force deletion, and -Af |
|
2718 | 2740 | can be used to remove files from the next revision without |
|
2719 | 2741 | deleting them from the working directory. |
|
2720 | 2742 | </p> |
|
2721 | 2743 | <p> |
|
2722 | 2744 | The following table details the behavior of remove for different |
|
2723 | 2745 | file states (columns) and option combinations (rows). The file |
|
2724 | 2746 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
2725 | 2747 | (as reported by 'hg status'). The actions are Warn, Remove |
|
2726 | 2748 | (from branch) and Delete (from disk): |
|
2727 | 2749 | </p> |
|
2728 | 2750 | <table> |
|
2729 | 2751 | <tr><td>opt/state</td> |
|
2730 | 2752 | <td>A</td> |
|
2731 | 2753 | <td>C</td> |
|
2732 | 2754 | <td>M</td> |
|
2733 | 2755 | <td>!</td></tr> |
|
2734 | 2756 | <tr><td>none</td> |
|
2735 | 2757 | <td>W</td> |
|
2736 | 2758 | <td>RD</td> |
|
2737 | 2759 | <td>W</td> |
|
2738 | 2760 | <td>R</td></tr> |
|
2739 | 2761 | <tr><td>-f</td> |
|
2740 | 2762 | <td>R</td> |
|
2741 | 2763 | <td>RD</td> |
|
2742 | 2764 | <td>RD</td> |
|
2743 | 2765 | <td>R</td></tr> |
|
2744 | 2766 | <tr><td>-A</td> |
|
2745 | 2767 | <td>W</td> |
|
2746 | 2768 | <td>W</td> |
|
2747 | 2769 | <td>W</td> |
|
2748 | 2770 | <td>R</td></tr> |
|
2749 | 2771 | <tr><td>-Af</td> |
|
2750 | 2772 | <td>R</td> |
|
2751 | 2773 | <td>R</td> |
|
2752 | 2774 | <td>R</td> |
|
2753 | 2775 | <td>R</td></tr> |
|
2754 | 2776 | </table> |
|
2755 | 2777 | <p> |
|
2756 | 2778 | <b>Note:</b> |
|
2757 | 2779 | </p> |
|
2758 | 2780 | <p> |
|
2759 | 2781 | 'hg remove' never deletes files in Added [A] state from the |
|
2760 | 2782 | working directory, not even if "--force" is specified. |
|
2761 | 2783 | </p> |
|
2762 | 2784 | <p> |
|
2763 | 2785 | Returns 0 on success, 1 if any warnings encountered. |
|
2764 | 2786 | </p> |
|
2765 | 2787 | <p> |
|
2766 | 2788 | options ([+] can be repeated): |
|
2767 | 2789 | </p> |
|
2768 | 2790 | <table> |
|
2769 | 2791 | <tr><td>-A</td> |
|
2770 | 2792 | <td>--after</td> |
|
2771 | 2793 | <td>record delete for missing files</td></tr> |
|
2772 | 2794 | <tr><td>-f</td> |
|
2773 | 2795 | <td>--force</td> |
|
2774 | 2796 | <td>forget added files, delete modified files</td></tr> |
|
2775 | 2797 | <tr><td>-S</td> |
|
2776 | 2798 | <td>--subrepos</td> |
|
2777 | 2799 | <td>recurse into subrepositories</td></tr> |
|
2778 | 2800 | <tr><td>-I</td> |
|
2779 | 2801 | <td>--include PATTERN [+]</td> |
|
2780 | 2802 | <td>include names matching the given patterns</td></tr> |
|
2781 | 2803 | <tr><td>-X</td> |
|
2782 | 2804 | <td>--exclude PATTERN [+]</td> |
|
2783 | 2805 | <td>exclude names matching the given patterns</td></tr> |
|
2784 | 2806 | </table> |
|
2785 | 2807 | <p> |
|
2786 | 2808 | global options ([+] can be repeated): |
|
2787 | 2809 | </p> |
|
2788 | 2810 | <table> |
|
2789 | 2811 | <tr><td>-R</td> |
|
2790 | 2812 | <td>--repository REPO</td> |
|
2791 | 2813 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2792 | 2814 | <tr><td></td> |
|
2793 | 2815 | <td>--cwd DIR</td> |
|
2794 | 2816 | <td>change working directory</td></tr> |
|
2795 | 2817 | <tr><td>-y</td> |
|
2796 | 2818 | <td>--noninteractive</td> |
|
2797 | 2819 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2798 | 2820 | <tr><td>-q</td> |
|
2799 | 2821 | <td>--quiet</td> |
|
2800 | 2822 | <td>suppress output</td></tr> |
|
2801 | 2823 | <tr><td>-v</td> |
|
2802 | 2824 | <td>--verbose</td> |
|
2803 | 2825 | <td>enable additional output</td></tr> |
|
2804 | 2826 | <tr><td></td> |
|
2805 | 2827 | <td>--color TYPE</td> |
|
2806 | 2828 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2807 | 2829 | <tr><td></td> |
|
2808 | 2830 | <td>--config CONFIG [+]</td> |
|
2809 | 2831 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2810 | 2832 | <tr><td></td> |
|
2811 | 2833 | <td>--debug</td> |
|
2812 | 2834 | <td>enable debugging output</td></tr> |
|
2813 | 2835 | <tr><td></td> |
|
2814 | 2836 | <td>--debugger</td> |
|
2815 | 2837 | <td>start debugger</td></tr> |
|
2816 | 2838 | <tr><td></td> |
|
2817 | 2839 | <td>--encoding ENCODE</td> |
|
2818 | 2840 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2819 | 2841 | <tr><td></td> |
|
2820 | 2842 | <td>--encodingmode MODE</td> |
|
2821 | 2843 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2822 | 2844 | <tr><td></td> |
|
2823 | 2845 | <td>--traceback</td> |
|
2824 | 2846 | <td>always print a traceback on exception</td></tr> |
|
2825 | 2847 | <tr><td></td> |
|
2826 | 2848 | <td>--time</td> |
|
2827 | 2849 | <td>time how long the command takes</td></tr> |
|
2828 | 2850 | <tr><td></td> |
|
2829 | 2851 | <td>--profile</td> |
|
2830 | 2852 | <td>print command execution profile</td></tr> |
|
2831 | 2853 | <tr><td></td> |
|
2832 | 2854 | <td>--version</td> |
|
2833 | 2855 | <td>output version information and exit</td></tr> |
|
2834 | 2856 | <tr><td>-h</td> |
|
2835 | 2857 | <td>--help</td> |
|
2836 | 2858 | <td>display help and exit</td></tr> |
|
2837 | 2859 | <tr><td></td> |
|
2838 | 2860 | <td>--hidden</td> |
|
2839 | 2861 | <td>consider hidden changesets</td></tr> |
|
2840 | 2862 | <tr><td></td> |
|
2841 | 2863 | <td>--pager TYPE</td> |
|
2842 | 2864 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2843 | 2865 | </table> |
|
2844 | 2866 | |
|
2845 | 2867 | </div> |
|
2846 | 2868 | </div> |
|
2847 | 2869 | </div> |
|
2848 | 2870 | |
|
2849 | 2871 | |
|
2850 | 2872 | |
|
2851 | 2873 | </body> |
|
2852 | 2874 | </html> |
|
2853 | 2875 | |
|
2854 | 2876 | |
|
2855 | 2877 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" |
|
2856 | 2878 | 200 Script output follows |
|
2857 | 2879 | |
|
2858 | 2880 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2859 | 2881 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2860 | 2882 | <head> |
|
2861 | 2883 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2862 | 2884 | <meta name="robots" content="index, nofollow" /> |
|
2863 | 2885 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2864 | 2886 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2865 | 2887 | |
|
2866 | 2888 | <title>Help: dates</title> |
|
2867 | 2889 | </head> |
|
2868 | 2890 | <body> |
|
2869 | 2891 | |
|
2870 | 2892 | <div class="container"> |
|
2871 | 2893 | <div class="menu"> |
|
2872 | 2894 | <div class="logo"> |
|
2873 | 2895 | <a href="https://mercurial-scm.org/"> |
|
2874 | 2896 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2875 | 2897 | </div> |
|
2876 | 2898 | <ul> |
|
2877 | 2899 | <li><a href="/shortlog">log</a></li> |
|
2878 | 2900 | <li><a href="/graph">graph</a></li> |
|
2879 | 2901 | <li><a href="/tags">tags</a></li> |
|
2880 | 2902 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2881 | 2903 | <li><a href="/branches">branches</a></li> |
|
2882 | 2904 | </ul> |
|
2883 | 2905 | <ul> |
|
2884 | 2906 | <li class="active"><a href="/help">help</a></li> |
|
2885 | 2907 | </ul> |
|
2886 | 2908 | </div> |
|
2887 | 2909 | |
|
2888 | 2910 | <div class="main"> |
|
2889 | 2911 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2890 | 2912 | <h3>Help: dates</h3> |
|
2891 | 2913 | |
|
2892 | 2914 | <form class="search" action="/log"> |
|
2893 | 2915 | |
|
2894 | 2916 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2895 | 2917 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2896 | 2918 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2897 | 2919 | </form> |
|
2898 | 2920 | <div id="doc"> |
|
2899 | 2921 | <h1>Date Formats</h1> |
|
2900 | 2922 | <p> |
|
2901 | 2923 | Some commands allow the user to specify a date, e.g.: |
|
2902 | 2924 | </p> |
|
2903 | 2925 | <ul> |
|
2904 | 2926 | <li> backout, commit, import, tag: Specify the commit date. |
|
2905 | 2927 | <li> log, revert, update: Select revision(s) by date. |
|
2906 | 2928 | </ul> |
|
2907 | 2929 | <p> |
|
2908 | 2930 | Many date formats are valid. Here are some examples: |
|
2909 | 2931 | </p> |
|
2910 | 2932 | <ul> |
|
2911 | 2933 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
2912 | 2934 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
2913 | 2935 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
2914 | 2936 | <li> "Dec 6" (midnight) |
|
2915 | 2937 | <li> "13:18" (today assumed) |
|
2916 | 2938 | <li> "3:39" (3:39AM assumed) |
|
2917 | 2939 | <li> "3:39pm" (15:39) |
|
2918 | 2940 | <li> "2006-12-06 13:18:29" (ISO 8601 format) |
|
2919 | 2941 | <li> "2006-12-6 13:18" |
|
2920 | 2942 | <li> "2006-12-6" |
|
2921 | 2943 | <li> "12-6" |
|
2922 | 2944 | <li> "12/6" |
|
2923 | 2945 | <li> "12/6/6" (Dec 6 2006) |
|
2924 | 2946 | <li> "today" (midnight) |
|
2925 | 2947 | <li> "yesterday" (midnight) |
|
2926 | 2948 | <li> "now" - right now |
|
2927 | 2949 | </ul> |
|
2928 | 2950 | <p> |
|
2929 | 2951 | Lastly, there is Mercurial's internal format: |
|
2930 | 2952 | </p> |
|
2931 | 2953 | <ul> |
|
2932 | 2954 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
2933 | 2955 | </ul> |
|
2934 | 2956 | <p> |
|
2935 | 2957 | This is the internal representation format for dates. The first number |
|
2936 | 2958 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The |
|
2937 | 2959 | second is the offset of the local timezone, in seconds west of UTC |
|
2938 | 2960 | (negative if the timezone is east of UTC). |
|
2939 | 2961 | </p> |
|
2940 | 2962 | <p> |
|
2941 | 2963 | The log command also accepts date ranges: |
|
2942 | 2964 | </p> |
|
2943 | 2965 | <ul> |
|
2944 | 2966 | <li> "<DATE" - at or before a given date/time |
|
2945 | 2967 | <li> ">DATE" - on or after a given date/time |
|
2946 | 2968 | <li> "DATE to DATE" - a date range, inclusive |
|
2947 | 2969 | <li> "-DAYS" - within a given number of days of today |
|
2948 | 2970 | </ul> |
|
2949 | 2971 | |
|
2950 | 2972 | </div> |
|
2951 | 2973 | </div> |
|
2952 | 2974 | </div> |
|
2953 | 2975 | |
|
2954 | 2976 | |
|
2955 | 2977 | |
|
2956 | 2978 | </body> |
|
2957 | 2979 | </html> |
|
2958 | 2980 | |
|
2959 | 2981 | |
|
2960 | 2982 | Sub-topic indexes rendered properly |
|
2961 | 2983 | |
|
2962 | 2984 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" |
|
2963 | 2985 | 200 Script output follows |
|
2964 | 2986 | |
|
2965 | 2987 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2966 | 2988 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2967 | 2989 | <head> |
|
2968 | 2990 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2969 | 2991 | <meta name="robots" content="index, nofollow" /> |
|
2970 | 2992 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2971 | 2993 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2972 | 2994 | |
|
2973 | 2995 | <title>Help: internals</title> |
|
2974 | 2996 | </head> |
|
2975 | 2997 | <body> |
|
2976 | 2998 | |
|
2977 | 2999 | <div class="container"> |
|
2978 | 3000 | <div class="menu"> |
|
2979 | 3001 | <div class="logo"> |
|
2980 | 3002 | <a href="https://mercurial-scm.org/"> |
|
2981 | 3003 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2982 | 3004 | </div> |
|
2983 | 3005 | <ul> |
|
2984 | 3006 | <li><a href="/shortlog">log</a></li> |
|
2985 | 3007 | <li><a href="/graph">graph</a></li> |
|
2986 | 3008 | <li><a href="/tags">tags</a></li> |
|
2987 | 3009 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2988 | 3010 | <li><a href="/branches">branches</a></li> |
|
2989 | 3011 | </ul> |
|
2990 | 3012 | <ul> |
|
2991 | 3013 | <li><a href="/help">help</a></li> |
|
2992 | 3014 | </ul> |
|
2993 | 3015 | </div> |
|
2994 | 3016 | |
|
2995 | 3017 | <div class="main"> |
|
2996 | 3018 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2997 | 3019 | |
|
2998 | 3020 | <form class="search" action="/log"> |
|
2999 | 3021 | |
|
3000 | 3022 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3001 | 3023 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3002 | 3024 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3003 | 3025 | </form> |
|
3004 | 3026 | <table class="bigtable"> |
|
3005 | 3027 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
3006 | 3028 | |
|
3007 | 3029 | <tr><td> |
|
3008 | 3030 | <a href="/help/internals.bundles"> |
|
3009 | 3031 | bundles |
|
3010 | 3032 | </a> |
|
3011 | 3033 | </td><td> |
|
3012 | 3034 | Bundles |
|
3013 | 3035 | </td></tr> |
|
3014 | 3036 | <tr><td> |
|
3015 | 3037 | <a href="/help/internals.censor"> |
|
3016 | 3038 | censor |
|
3017 | 3039 | </a> |
|
3018 | 3040 | </td><td> |
|
3019 | 3041 | Censor |
|
3020 | 3042 | </td></tr> |
|
3021 | 3043 | <tr><td> |
|
3022 | 3044 | <a href="/help/internals.changegroups"> |
|
3023 | 3045 | changegroups |
|
3024 | 3046 | </a> |
|
3025 | 3047 | </td><td> |
|
3026 | 3048 | Changegroups |
|
3027 | 3049 | </td></tr> |
|
3028 | 3050 | <tr><td> |
|
3029 | 3051 | <a href="/help/internals.requirements"> |
|
3030 | 3052 | requirements |
|
3031 | 3053 | </a> |
|
3032 | 3054 | </td><td> |
|
3033 | 3055 | Repository Requirements |
|
3034 | 3056 | </td></tr> |
|
3035 | 3057 | <tr><td> |
|
3036 | 3058 | <a href="/help/internals.revlogs"> |
|
3037 | 3059 | revlogs |
|
3038 | 3060 | </a> |
|
3039 | 3061 | </td><td> |
|
3040 | 3062 | Revision Logs |
|
3041 | 3063 | </td></tr> |
|
3042 | 3064 | <tr><td> |
|
3043 | 3065 | <a href="/help/internals.wireprotocol"> |
|
3044 | 3066 | wireprotocol |
|
3045 | 3067 | </a> |
|
3046 | 3068 | </td><td> |
|
3047 | 3069 | Wire Protocol |
|
3048 | 3070 | </td></tr> |
|
3049 | 3071 | |
|
3050 | 3072 | |
|
3051 | 3073 | |
|
3052 | 3074 | |
|
3053 | 3075 | |
|
3054 | 3076 | </table> |
|
3055 | 3077 | </div> |
|
3056 | 3078 | </div> |
|
3057 | 3079 | |
|
3058 | 3080 | |
|
3059 | 3081 | |
|
3060 | 3082 | </body> |
|
3061 | 3083 | </html> |
|
3062 | 3084 | |
|
3063 | 3085 | |
|
3064 | 3086 | Sub-topic topics rendered properly |
|
3065 | 3087 | |
|
3066 | 3088 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" |
|
3067 | 3089 | 200 Script output follows |
|
3068 | 3090 | |
|
3069 | 3091 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3070 | 3092 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3071 | 3093 | <head> |
|
3072 | 3094 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3073 | 3095 | <meta name="robots" content="index, nofollow" /> |
|
3074 | 3096 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3075 | 3097 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3076 | 3098 | |
|
3077 | 3099 | <title>Help: internals.changegroups</title> |
|
3078 | 3100 | </head> |
|
3079 | 3101 | <body> |
|
3080 | 3102 | |
|
3081 | 3103 | <div class="container"> |
|
3082 | 3104 | <div class="menu"> |
|
3083 | 3105 | <div class="logo"> |
|
3084 | 3106 | <a href="https://mercurial-scm.org/"> |
|
3085 | 3107 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3086 | 3108 | </div> |
|
3087 | 3109 | <ul> |
|
3088 | 3110 | <li><a href="/shortlog">log</a></li> |
|
3089 | 3111 | <li><a href="/graph">graph</a></li> |
|
3090 | 3112 | <li><a href="/tags">tags</a></li> |
|
3091 | 3113 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3092 | 3114 | <li><a href="/branches">branches</a></li> |
|
3093 | 3115 | </ul> |
|
3094 | 3116 | <ul> |
|
3095 | 3117 | <li class="active"><a href="/help">help</a></li> |
|
3096 | 3118 | </ul> |
|
3097 | 3119 | </div> |
|
3098 | 3120 | |
|
3099 | 3121 | <div class="main"> |
|
3100 | 3122 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3101 | 3123 | <h3>Help: internals.changegroups</h3> |
|
3102 | 3124 | |
|
3103 | 3125 | <form class="search" action="/log"> |
|
3104 | 3126 | |
|
3105 | 3127 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3106 | 3128 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3107 | 3129 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3108 | 3130 | </form> |
|
3109 | 3131 | <div id="doc"> |
|
3110 | 3132 | <h1>Changegroups</h1> |
|
3111 | 3133 | <p> |
|
3112 | 3134 | Changegroups are representations of repository revlog data, specifically |
|
3113 | 3135 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3114 | 3136 | filelogs. |
|
3115 | 3137 | </p> |
|
3116 | 3138 | <p> |
|
3117 | 3139 | There are 3 versions of changegroups: "1", "2", and "3". From a |
|
3118 | 3140 | high-level, versions "1" and "2" are almost exactly the same, with the |
|
3119 | 3141 | only difference being an additional item in the *delta header*. Version |
|
3120 | 3142 | "3" adds support for revlog flags in the *delta header* and optionally |
|
3121 | 3143 | exchanging treemanifests (enabled by setting an option on the |
|
3122 | 3144 | "changegroup" part in the bundle2). |
|
3123 | 3145 | </p> |
|
3124 | 3146 | <p> |
|
3125 | 3147 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
3126 | 3148 | segments: |
|
3127 | 3149 | </p> |
|
3128 | 3150 | <pre> |
|
3129 | 3151 | +---------------------------------+ |
|
3130 | 3152 | | | | | |
|
3131 | 3153 | | changeset | manifest | filelogs | |
|
3132 | 3154 | | | | | |
|
3133 | 3155 | | | | | |
|
3134 | 3156 | +---------------------------------+ |
|
3135 | 3157 | </pre> |
|
3136 | 3158 | <p> |
|
3137 | 3159 | When exchanging treemanifests, there are 4 logical segments: |
|
3138 | 3160 | </p> |
|
3139 | 3161 | <pre> |
|
3140 | 3162 | +-------------------------------------------------+ |
|
3141 | 3163 | | | | | | |
|
3142 | 3164 | | changeset | root | treemanifests | filelogs | |
|
3143 | 3165 | | | manifest | | | |
|
3144 | 3166 | | | | | | |
|
3145 | 3167 | +-------------------------------------------------+ |
|
3146 | 3168 | </pre> |
|
3147 | 3169 | <p> |
|
3148 | 3170 | The principle building block of each segment is a *chunk*. A *chunk* |
|
3149 | 3171 | is a framed piece of data: |
|
3150 | 3172 | </p> |
|
3151 | 3173 | <pre> |
|
3152 | 3174 | +---------------------------------------+ |
|
3153 | 3175 | | | | |
|
3154 | 3176 | | length | data | |
|
3155 | 3177 | | (4 bytes) | (<length - 4> bytes) | |
|
3156 | 3178 | | | | |
|
3157 | 3179 | +---------------------------------------+ |
|
3158 | 3180 | </pre> |
|
3159 | 3181 | <p> |
|
3160 | 3182 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
3161 | 3183 | integer indicating the length of the entire chunk (including the length field |
|
3162 | 3184 | itself). |
|
3163 | 3185 | </p> |
|
3164 | 3186 | <p> |
|
3165 | 3187 | There is a special case chunk that has a value of 0 for the length |
|
3166 | 3188 | ("0x00000000"). We call this an *empty chunk*. |
|
3167 | 3189 | </p> |
|
3168 | 3190 | <h2>Delta Groups</h2> |
|
3169 | 3191 | <p> |
|
3170 | 3192 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
3171 | 3193 | or patches against previous revisions. |
|
3172 | 3194 | </p> |
|
3173 | 3195 | <p> |
|
3174 | 3196 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
3175 | 3197 | to signal the end of the delta group: |
|
3176 | 3198 | </p> |
|
3177 | 3199 | <pre> |
|
3178 | 3200 | +------------------------------------------------------------------------+ |
|
3179 | 3201 | | | | | | | |
|
3180 | 3202 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
3181 | 3203 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
3182 | 3204 | | | | | | | |
|
3183 | 3205 | +------------------------------------------------------------------------+ |
|
3184 | 3206 | </pre> |
|
3185 | 3207 | <p> |
|
3186 | 3208 | Each *chunk*'s data consists of the following: |
|
3187 | 3209 | </p> |
|
3188 | 3210 | <pre> |
|
3189 | 3211 | +---------------------------------------+ |
|
3190 | 3212 | | | | |
|
3191 | 3213 | | delta header | delta data | |
|
3192 | 3214 | | (various by version) | (various) | |
|
3193 | 3215 | | | | |
|
3194 | 3216 | +---------------------------------------+ |
|
3195 | 3217 | </pre> |
|
3196 | 3218 | <p> |
|
3197 | 3219 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
3198 | 3220 | entry (either that the recipient already has, or previously specified in the |
|
3199 | 3221 | bundle/changegroup). |
|
3200 | 3222 | </p> |
|
3201 | 3223 | <p> |
|
3202 | 3224 | The *delta header* is different between versions "1", "2", and |
|
3203 | 3225 | "3" of the changegroup format. |
|
3204 | 3226 | </p> |
|
3205 | 3227 | <p> |
|
3206 | 3228 | Version 1 (headerlen=80): |
|
3207 | 3229 | </p> |
|
3208 | 3230 | <pre> |
|
3209 | 3231 | +------------------------------------------------------+ |
|
3210 | 3232 | | | | | | |
|
3211 | 3233 | | node | p1 node | p2 node | link node | |
|
3212 | 3234 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3213 | 3235 | | | | | | |
|
3214 | 3236 | +------------------------------------------------------+ |
|
3215 | 3237 | </pre> |
|
3216 | 3238 | <p> |
|
3217 | 3239 | Version 2 (headerlen=100): |
|
3218 | 3240 | </p> |
|
3219 | 3241 | <pre> |
|
3220 | 3242 | +------------------------------------------------------------------+ |
|
3221 | 3243 | | | | | | | |
|
3222 | 3244 | | node | p1 node | p2 node | base node | link node | |
|
3223 | 3245 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3224 | 3246 | | | | | | | |
|
3225 | 3247 | +------------------------------------------------------------------+ |
|
3226 | 3248 | </pre> |
|
3227 | 3249 | <p> |
|
3228 | 3250 | Version 3 (headerlen=102): |
|
3229 | 3251 | </p> |
|
3230 | 3252 | <pre> |
|
3231 | 3253 | +------------------------------------------------------------------------------+ |
|
3232 | 3254 | | | | | | | | |
|
3233 | 3255 | | node | p1 node | p2 node | base node | link node | flags | |
|
3234 | 3256 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
3235 | 3257 | | | | | | | | |
|
3236 | 3258 | +------------------------------------------------------------------------------+ |
|
3237 | 3259 | </pre> |
|
3238 | 3260 | <p> |
|
3239 | 3261 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a |
|
3240 | 3262 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
3241 | 3263 | from an existing entry (either that the recipient already has, or previously |
|
3242 | 3264 | specified in the bundle/changegroup). The format is described more fully in |
|
3243 | 3265 | "hg help internals.bdiff", but briefly: |
|
3244 | 3266 | </p> |
|
3245 | 3267 | <pre> |
|
3246 | 3268 | +---------------------------------------------------------------+ |
|
3247 | 3269 | | | | | | |
|
3248 | 3270 | | start offset | end offset | new length | content | |
|
3249 | 3271 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
3250 | 3272 | | | | | | |
|
3251 | 3273 | +---------------------------------------------------------------+ |
|
3252 | 3274 | </pre> |
|
3253 | 3275 | <p> |
|
3254 | 3276 | Please note that the length field in the delta data does *not* include itself. |
|
3255 | 3277 | </p> |
|
3256 | 3278 | <p> |
|
3257 | 3279 | In version 1, the delta is always applied against the previous node from |
|
3258 | 3280 | the changegroup or the first parent if this is the first entry in the |
|
3259 | 3281 | changegroup. |
|
3260 | 3282 | </p> |
|
3261 | 3283 | <p> |
|
3262 | 3284 | In version 2 and up, the delta base node is encoded in the entry in the |
|
3263 | 3285 | changegroup. This allows the delta to be expressed against any parent, |
|
3264 | 3286 | which can result in smaller deltas and more efficient encoding of data. |
|
3265 | 3287 | </p> |
|
3266 | 3288 | <h2>Changeset Segment</h2> |
|
3267 | 3289 | <p> |
|
3268 | 3290 | The *changeset segment* consists of a single *delta group* holding |
|
3269 | 3291 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
3270 | 3292 | the boundary to the *manifest segment*. |
|
3271 | 3293 | </p> |
|
3272 | 3294 | <h2>Manifest Segment</h2> |
|
3273 | 3295 | <p> |
|
3274 | 3296 | The *manifest segment* consists of a single *delta group* holding manifest |
|
3275 | 3297 | data. If treemanifests are in use, it contains only the manifest for the |
|
3276 | 3298 | root directory of the repository. Otherwise, it contains the entire |
|
3277 | 3299 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
3278 | 3300 | the boundary to the next segment (either the *treemanifests segment* or the |
|
3279 | 3301 | *filelogs segment*, depending on version and the request options). |
|
3280 | 3302 | </p> |
|
3281 | 3303 | <h3>Treemanifests Segment</h3> |
|
3282 | 3304 | <p> |
|
3283 | 3305 | The *treemanifests segment* only exists in changegroup version "3", and |
|
3284 | 3306 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
3285 | 3307 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
3286 | 3308 | Aside from the filenames in the *treemanifests segment* containing a |
|
3287 | 3309 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
3288 | 3310 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
3289 | 3311 | a sub-segment with filename size 0). This denotes the boundary to the |
|
3290 | 3312 | *filelogs segment*. |
|
3291 | 3313 | </p> |
|
3292 | 3314 | <h2>Filelogs Segment</h2> |
|
3293 | 3315 | <p> |
|
3294 | 3316 | The *filelogs segment* consists of multiple sub-segments, each |
|
3295 | 3317 | corresponding to an individual file whose data is being described: |
|
3296 | 3318 | </p> |
|
3297 | 3319 | <pre> |
|
3298 | 3320 | +--------------------------------------------------+ |
|
3299 | 3321 | | | | | | | |
|
3300 | 3322 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
3301 | 3323 | | | | | | (4 bytes) | |
|
3302 | 3324 | | | | | | | |
|
3303 | 3325 | +--------------------------------------------------+ |
|
3304 | 3326 | </pre> |
|
3305 | 3327 | <p> |
|
3306 | 3328 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
3307 | 3329 | a sub-segment with filename size 0). This denotes the end of the segment |
|
3308 | 3330 | and of the overall changegroup. |
|
3309 | 3331 | </p> |
|
3310 | 3332 | <p> |
|
3311 | 3333 | Each filelog sub-segment consists of the following: |
|
3312 | 3334 | </p> |
|
3313 | 3335 | <pre> |
|
3314 | 3336 | +------------------------------------------------------+ |
|
3315 | 3337 | | | | | |
|
3316 | 3338 | | filename length | filename | delta group | |
|
3317 | 3339 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
3318 | 3340 | | | | | |
|
3319 | 3341 | +------------------------------------------------------+ |
|
3320 | 3342 | </pre> |
|
3321 | 3343 | <p> |
|
3322 | 3344 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
3323 | 3345 | followed by N chunks constituting the *delta group* for this file. The |
|
3324 | 3346 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
3325 | 3347 | next filelog sub-segment. |
|
3326 | 3348 | </p> |
|
3327 | 3349 | |
|
3328 | 3350 | </div> |
|
3329 | 3351 | </div> |
|
3330 | 3352 | </div> |
|
3331 | 3353 | |
|
3332 | 3354 | |
|
3333 | 3355 | |
|
3334 | 3356 | </body> |
|
3335 | 3357 | </html> |
|
3336 | 3358 | |
|
3337 | 3359 | |
|
3338 | 3360 | $ killdaemons.py |
|
3339 | 3361 | |
|
3340 | 3362 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now