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