##// END OF EJS Templates
extensions: mark win32text deprecated...
Matt Mackall -
r20624:23146e4d default
parent child Browse files
Show More
@@ -1,172 +1,172 b''
1 1 # win32text.py - LF <-> CRLF/CR translation utilities for Windows/Mac users
2 2 #
3 3 # Copyright 2005, 2007-2009 Matt Mackall <mpm@selenic.com> and others
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 '''perform automatic newline conversion
8 '''perform automatic newline conversion (DEPRECATED)
9 9
10 10 Deprecation: The win32text extension requires each user to configure
11 11 the extension again and again for each clone since the configuration
12 12 is not copied when cloning.
13 13
14 14 We have therefore made the ``eol`` as an alternative. The ``eol``
15 15 uses a version controlled file for its configuration and each clone
16 16 will therefore use the right settings from the start.
17 17
18 18 To perform automatic newline conversion, use::
19 19
20 20 [extensions]
21 21 win32text =
22 22 [encode]
23 23 ** = cleverencode:
24 24 # or ** = macencode:
25 25
26 26 [decode]
27 27 ** = cleverdecode:
28 28 # or ** = macdecode:
29 29
30 30 If not doing conversion, to make sure you do not commit CRLF/CR by accident::
31 31
32 32 [hooks]
33 33 pretxncommit.crlf = python:hgext.win32text.forbidcrlf
34 34 # or pretxncommit.cr = python:hgext.win32text.forbidcr
35 35
36 36 To do the same check on a server to prevent CRLF/CR from being
37 37 pushed or pulled::
38 38
39 39 [hooks]
40 40 pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
41 41 # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
42 42 '''
43 43
44 44 from mercurial.i18n import _
45 45 from mercurial.node import short
46 46 from mercurial import util
47 47 import re
48 48
49 49 testedwith = 'internal'
50 50
51 51 # regexp for single LF without CR preceding.
52 52 re_single_lf = re.compile('(^|[^\r])\n', re.MULTILINE)
53 53
54 54 newlinestr = {'\r\n': 'CRLF', '\r': 'CR'}
55 55 filterstr = {'\r\n': 'clever', '\r': 'mac'}
56 56
57 57 def checknewline(s, newline, ui=None, repo=None, filename=None):
58 58 # warn if already has 'newline' in repository.
59 59 # it might cause unexpected eol conversion.
60 60 # see issue 302:
61 61 # http://mercurial.selenic.com/bts/issue302
62 62 if newline in s and ui and filename and repo:
63 63 ui.warn(_('WARNING: %s already has %s line endings\n'
64 64 'and does not need EOL conversion by the win32text plugin.\n'
65 65 'Before your next commit, please reconsider your '
66 66 'encode/decode settings in \nMercurial.ini or %s.\n') %
67 67 (filename, newlinestr[newline], repo.join('hgrc')))
68 68
69 69 def dumbdecode(s, cmd, **kwargs):
70 70 checknewline(s, '\r\n', **kwargs)
71 71 # replace single LF to CRLF
72 72 return re_single_lf.sub('\\1\r\n', s)
73 73
74 74 def dumbencode(s, cmd):
75 75 return s.replace('\r\n', '\n')
76 76
77 77 def macdumbdecode(s, cmd, **kwargs):
78 78 checknewline(s, '\r', **kwargs)
79 79 return s.replace('\n', '\r')
80 80
81 81 def macdumbencode(s, cmd):
82 82 return s.replace('\r', '\n')
83 83
84 84 def cleverdecode(s, cmd, **kwargs):
85 85 if not util.binary(s):
86 86 return dumbdecode(s, cmd, **kwargs)
87 87 return s
88 88
89 89 def cleverencode(s, cmd):
90 90 if not util.binary(s):
91 91 return dumbencode(s, cmd)
92 92 return s
93 93
94 94 def macdecode(s, cmd, **kwargs):
95 95 if not util.binary(s):
96 96 return macdumbdecode(s, cmd, **kwargs)
97 97 return s
98 98
99 99 def macencode(s, cmd):
100 100 if not util.binary(s):
101 101 return macdumbencode(s, cmd)
102 102 return s
103 103
104 104 _filters = {
105 105 'dumbdecode:': dumbdecode,
106 106 'dumbencode:': dumbencode,
107 107 'cleverdecode:': cleverdecode,
108 108 'cleverencode:': cleverencode,
109 109 'macdumbdecode:': macdumbdecode,
110 110 'macdumbencode:': macdumbencode,
111 111 'macdecode:': macdecode,
112 112 'macencode:': macencode,
113 113 }
114 114
115 115 def forbidnewline(ui, repo, hooktype, node, newline, **kwargs):
116 116 halt = False
117 117 seen = set()
118 118 # we try to walk changesets in reverse order from newest to
119 119 # oldest, so that if we see a file multiple times, we take the
120 120 # newest version as canonical. this prevents us from blocking a
121 121 # changegroup that contains an unacceptable commit followed later
122 122 # by a commit that fixes the problem.
123 123 tip = repo['tip']
124 124 for rev in xrange(len(repo) - 1, repo[node].rev() - 1, -1):
125 125 c = repo[rev]
126 126 for f in c.files():
127 127 if f in seen or f not in tip or f not in c:
128 128 continue
129 129 seen.add(f)
130 130 data = c[f].data()
131 131 if not util.binary(data) and newline in data:
132 132 if not halt:
133 133 ui.warn(_('attempt to commit or push text file(s) '
134 134 'using %s line endings\n') %
135 135 newlinestr[newline])
136 136 ui.warn(_('in %s: %s\n') % (short(c.node()), f))
137 137 halt = True
138 138 if halt and hooktype == 'pretxnchangegroup':
139 139 crlf = newlinestr[newline].lower()
140 140 filter = filterstr[newline]
141 141 ui.warn(_('\nTo prevent this mistake in your local repository,\n'
142 142 'add to Mercurial.ini or .hg/hgrc:\n'
143 143 '\n'
144 144 '[hooks]\n'
145 145 'pretxncommit.%s = python:hgext.win32text.forbid%s\n'
146 146 '\n'
147 147 'and also consider adding:\n'
148 148 '\n'
149 149 '[extensions]\n'
150 150 'win32text =\n'
151 151 '[encode]\n'
152 152 '** = %sencode:\n'
153 153 '[decode]\n'
154 154 '** = %sdecode:\n') % (crlf, crlf, filter, filter))
155 155 return halt
156 156
157 157 def forbidcrlf(ui, repo, hooktype, node, **kwargs):
158 158 return forbidnewline(ui, repo, hooktype, node, '\r\n', **kwargs)
159 159
160 160 def forbidcr(ui, repo, hooktype, node, **kwargs):
161 161 return forbidnewline(ui, repo, hooktype, node, '\r', **kwargs)
162 162
163 163 def reposetup(ui, repo):
164 164 if not repo.local():
165 165 return
166 166 for name, fn in _filters.iteritems():
167 167 repo.adddatafilter(name, fn)
168 168
169 169 def extsetup(ui):
170 170 if ui.configbool('win32text', 'warn', True):
171 171 ui.warn(_("win32text is deprecated: "
172 172 "http://mercurial.selenic.com/wiki/Win32TextExtension\n"))
@@ -1,1994 +1,1993 b''
1 1 Short help:
2 2
3 3 $ hg
4 4 Mercurial Distributed SCM
5 5
6 6 basic commands:
7 7
8 8 add add the specified files on the next commit
9 9 annotate show changeset information by line for each file
10 10 clone make a copy of an existing repository
11 11 commit commit the specified files or all outstanding changes
12 12 diff diff repository (or selected files)
13 13 export dump the header and diffs for one or more changesets
14 14 forget forget the specified files on the next commit
15 15 init create a new repository in the given directory
16 16 log show revision history of entire repository or files
17 17 merge merge working directory with another revision
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 working directory with another revision
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 track a line of development with movable markers
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 forget forget the specified files on the next commit
70 70 graft copy changes from other branches onto the current branch
71 71 grep search for a pattern in specified files and revisions
72 72 heads show branch heads
73 73 help show help for a given topic or a help overview
74 74 identify identify the working copy or specified revision
75 75 import import an ordered set of patches
76 76 incoming show new changesets found in source
77 77 init create a new repository in the given directory
78 78 locate locate files matching specific patterns
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 working directory with another revision
82 82 outgoing show changesets not found in the destination
83 83 parents show the parents of the working directory or revision
84 84 paths show aliases for remote repositories
85 85 phase set or show the current phase name
86 86 pull pull changes from the specified source
87 87 push push changes to the specified destination
88 88 recover roll back an interrupted transaction
89 89 remove remove the specified files on the next commit
90 90 rename rename files; equivalent of copy + remove
91 91 resolve redo merges or set/view the merge status of files
92 92 revert restore files to their checkout state
93 93 root print the root (top) of the current working directory
94 94 serve start stand-alone webserver
95 95 status show changed files in the working directory
96 96 summary summarize working directory state
97 97 tag add one or more tags for the current or given revision
98 98 tags list repository tags
99 99 unbundle apply one or more changegroup files
100 100 update update working directory (or switch revisions)
101 101 verify verify the integrity of the repository
102 102 version output version and copyright information
103 103
104 104 additional help topics:
105 105
106 106 config Configuration Files
107 107 dates Date Formats
108 108 diffs Diff Formats
109 109 environment Environment Variables
110 110 extensions Using Additional Features
111 111 filesets Specifying File Sets
112 112 glossary Glossary
113 113 hgignore Syntax for Mercurial Ignore Files
114 114 hgweb Configuring hgweb
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 subrepos Subrepositories
122 122 templating Template Usage
123 123 urls URL Paths
124 124
125 125 use "hg -v help" to show builtin aliases and global options
126 126
127 127 $ hg -q help
128 128 add add the specified files on the next commit
129 129 addremove add all new files, delete all missing files
130 130 annotate show changeset information by line for each file
131 131 archive create an unversioned archive of a repository revision
132 132 backout reverse effect of earlier changeset
133 133 bisect subdivision search of changesets
134 134 bookmarks track a line of development with movable markers
135 135 branch set or show the current branch name
136 136 branches list repository named branches
137 137 bundle create a changegroup file
138 138 cat output the current or given revision of files
139 139 clone make a copy of an existing repository
140 140 commit commit the specified files or all outstanding changes
141 141 config show combined config settings from all hgrc files
142 142 copy mark files as copied for the next commit
143 143 diff diff repository (or selected files)
144 144 export dump the header and diffs for one or more changesets
145 145 forget forget the specified files on the next commit
146 146 graft copy changes from other branches onto the current branch
147 147 grep search for a pattern in specified files and revisions
148 148 heads show branch heads
149 149 help show help for a given topic or a help overview
150 150 identify identify the working copy or specified revision
151 151 import import an ordered set of patches
152 152 incoming show new changesets found in source
153 153 init create a new repository in the given directory
154 154 locate locate files matching specific patterns
155 155 log show revision history of entire repository or files
156 156 manifest output the current or given revision of the project manifest
157 157 merge merge working directory with another revision
158 158 outgoing show changesets not found in the destination
159 159 parents show the parents of the working directory or revision
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 merge-tools Merge Tools
192 192 multirevs Specifying Multiple Revisions
193 193 patterns File Name Patterns
194 194 phases Working with Phases
195 195 revisions Specifying Single Revisions
196 196 revsets Specifying Revision Sets
197 197 subrepos Subrepositories
198 198 templating Template Usage
199 199 urls URL Paths
200 200
201 201 Test extension help:
202 202 $ hg help extensions --config extensions.rebase= --config extensions.children=
203 203 Using Additional Features
204 204 """""""""""""""""""""""""
205 205
206 206 Mercurial has the ability to add new features through the use of
207 207 extensions. Extensions may add new commands, add options to existing
208 208 commands, change the default behavior of commands, or implement hooks.
209 209
210 210 To enable the "foo" extension, either shipped with Mercurial or in the
211 211 Python search path, create an entry for it in your configuration file,
212 212 like this:
213 213
214 214 [extensions]
215 215 foo =
216 216
217 217 You may also specify the full path to an extension:
218 218
219 219 [extensions]
220 220 myfeature = ~/.hgext/myfeature.py
221 221
222 222 See "hg help config" for more information on configuration files.
223 223
224 224 Extensions are not loaded by default for a variety of reasons: they can
225 225 increase startup overhead; they may be meant for advanced usage only; they
226 226 may provide potentially dangerous abilities (such as letting you destroy
227 227 or modify history); they might not be ready for prime time; or they may
228 228 alter some usual behaviors of stock Mercurial. It is thus up to the user
229 229 to activate extensions as needed.
230 230
231 231 To explicitly disable an extension enabled in a configuration file of
232 232 broader scope, prepend its path with !:
233 233
234 234 [extensions]
235 235 # disabling extension bar residing in /path/to/extension/bar.py
236 236 bar = !/path/to/extension/bar.py
237 237 # ditto, but no path was supplied for extension baz
238 238 baz = !
239 239
240 240 enabled extensions:
241 241
242 242 children command to display child changesets (DEPRECATED)
243 243 rebase command to move sets of revisions to a different ancestor
244 244
245 245 disabled extensions:
246 246
247 247 acl hooks for controlling repository access
248 248 blackbox log repository events to a blackbox for debugging
249 249 bugzilla hooks for integrating with the Bugzilla bug tracker
250 250 churn command to display statistics about repository history
251 251 color colorize output from some commands
252 252 convert import revisions from foreign VCS repositories into
253 253 Mercurial
254 254 eol automatically manage newlines in repository files
255 255 extdiff command to allow external programs to compare revisions
256 256 factotum http authentication with factotum
257 257 gpg commands to sign and verify changesets
258 258 hgcia hooks for integrating with the CIA.vc notification service
259 259 hgk browse the repository in a graphical way
260 260 highlight syntax highlighting for hgweb (requires Pygments)
261 261 histedit interactive history editing
262 262 keyword expand keywords in tracked files
263 263 largefiles track large binary files
264 264 mq manage a stack of patches
265 265 notify hooks for sending email push notifications
266 266 pager browse command output with an external pager
267 267 patchbomb command to send changesets as (a series of) patch emails
268 268 progress show progress bars for some actions
269 269 purge command to delete untracked files from the working
270 270 directory
271 271 record commands to interactively select changes for
272 272 commit/qrefresh
273 273 relink recreates hardlinks between repository clones
274 274 schemes extend schemes with shortcuts to repository swarms
275 275 share share a common history between several working directories
276 276 shelve save and restore changes to the working directory
277 277 strip strip changesets and their descendents from history
278 278 transplant command to transplant changesets from another branch
279 279 win32mbcs allow the use of MBCS paths with problematic encodings
280 win32text perform automatic newline conversion
281 280 zeroconf discover and advertise repositories on the local network
282 281 Test short command list with verbose option
283 282
284 283 $ hg -v help shortlist
285 284 Mercurial Distributed SCM
286 285
287 286 basic commands:
288 287
289 288 add add the specified files on the next commit
290 289 annotate, blame
291 290 show changeset information by line for each file
292 291 clone make a copy of an existing repository
293 292 commit, ci commit the specified files or all outstanding changes
294 293 diff diff repository (or selected files)
295 294 export dump the header and diffs for one or more changesets
296 295 forget forget the specified files on the next commit
297 296 init create a new repository in the given directory
298 297 log, history show revision history of entire repository or files
299 298 merge merge working directory with another revision
300 299 pull pull changes from the specified source
301 300 push push changes to the specified destination
302 301 remove, rm remove the specified files on the next commit
303 302 serve start stand-alone webserver
304 303 status, st show changed files in the working directory
305 304 summary, sum summarize working directory state
306 305 update, up, checkout, co
307 306 update working directory (or switch revisions)
308 307
309 308 global options:
310 309
311 310 -R --repository REPO repository root directory or name of overlay bundle
312 311 file
313 312 --cwd DIR change working directory
314 313 -y --noninteractive do not prompt, automatically pick the first choice for
315 314 all prompts
316 315 -q --quiet suppress output
317 316 -v --verbose enable additional output
318 317 --config CONFIG [+] set/override config option (use 'section.name=value')
319 318 --debug enable debugging output
320 319 --debugger start debugger
321 320 --encoding ENCODE set the charset encoding (default: ascii)
322 321 --encodingmode MODE set the charset encoding mode (default: strict)
323 322 --traceback always print a traceback on exception
324 323 --time time how long the command takes
325 324 --profile print command execution profile
326 325 --version output version information and exit
327 326 -h --help display help and exit
328 327 --hidden consider hidden changesets
329 328
330 329 [+] marked option can be specified multiple times
331 330
332 331 use "hg help" for the full list of commands
333 332
334 333 $ hg add -h
335 334 hg add [OPTION]... [FILE]...
336 335
337 336 add the specified files on the next commit
338 337
339 338 Schedule files to be version controlled and added to the repository.
340 339
341 340 The files will be added to the repository at the next commit. To undo an
342 341 add before that, see "hg forget".
343 342
344 343 If no names are given, add all files to the repository.
345 344
346 345 Returns 0 if all files are successfully added.
347 346
348 347 options:
349 348
350 349 -I --include PATTERN [+] include names matching the given patterns
351 350 -X --exclude PATTERN [+] exclude names matching the given patterns
352 351 -S --subrepos recurse into subrepositories
353 352 -n --dry-run do not perform actions, just print output
354 353
355 354 [+] marked option can be specified multiple times
356 355
357 356 use "hg -v help add" to show more complete help and the global options
358 357
359 358 Verbose help for add
360 359
361 360 $ hg add -hv
362 361 hg add [OPTION]... [FILE]...
363 362
364 363 add the specified files on the next commit
365 364
366 365 Schedule files to be version controlled and added to the repository.
367 366
368 367 The files will be added to the repository at the next commit. To undo an
369 368 add before that, see "hg forget".
370 369
371 370 If no names are given, add all files to the repository.
372 371
373 372 An example showing how new (unknown) files are added automatically by "hg
374 373 add":
375 374
376 375 $ ls
377 376 foo.c
378 377 $ hg status
379 378 ? foo.c
380 379 $ hg add
381 380 adding foo.c
382 381 $ hg status
383 382 A foo.c
384 383
385 384 Returns 0 if all files are successfully added.
386 385
387 386 options:
388 387
389 388 -I --include PATTERN [+] include names matching the given patterns
390 389 -X --exclude PATTERN [+] exclude names matching the given patterns
391 390 -S --subrepos recurse into subrepositories
392 391 -n --dry-run do not perform actions, just print output
393 392
394 393 [+] marked option can be specified multiple times
395 394
396 395 global options:
397 396
398 397 -R --repository REPO repository root directory or name of overlay bundle
399 398 file
400 399 --cwd DIR change working directory
401 400 -y --noninteractive do not prompt, automatically pick the first choice for
402 401 all prompts
403 402 -q --quiet suppress output
404 403 -v --verbose enable additional output
405 404 --config CONFIG [+] set/override config option (use 'section.name=value')
406 405 --debug enable debugging output
407 406 --debugger start debugger
408 407 --encoding ENCODE set the charset encoding (default: ascii)
409 408 --encodingmode MODE set the charset encoding mode (default: strict)
410 409 --traceback always print a traceback on exception
411 410 --time time how long the command takes
412 411 --profile print command execution profile
413 412 --version output version information and exit
414 413 -h --help display help and exit
415 414 --hidden consider hidden changesets
416 415
417 416 [+] marked option can be specified multiple times
418 417
419 418 Test help option with version option
420 419
421 420 $ hg add -h --version
422 421 Mercurial Distributed SCM (version *) (glob)
423 422 (see http://mercurial.selenic.com for more information)
424 423
425 424 Copyright (C) 2005-2014 Matt Mackall and others
426 425 This is free software; see the source for copying conditions. There is NO
427 426 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
428 427
429 428 $ hg add --skjdfks
430 429 hg add: option --skjdfks not recognized
431 430 hg add [OPTION]... [FILE]...
432 431
433 432 add the specified files on the next commit
434 433
435 434 options:
436 435
437 436 -I --include PATTERN [+] include names matching the given patterns
438 437 -X --exclude PATTERN [+] exclude names matching the given patterns
439 438 -S --subrepos recurse into subrepositories
440 439 -n --dry-run do not perform actions, just print output
441 440
442 441 [+] marked option can be specified multiple times
443 442
444 443 use "hg help add" to show the full help text
445 444 [255]
446 445
447 446 Test ambiguous command help
448 447
449 448 $ hg help ad
450 449 list of commands:
451 450
452 451 add add the specified files on the next commit
453 452 addremove add all new files, delete all missing files
454 453
455 454 use "hg -v help ad" to show builtin aliases and global options
456 455
457 456 Test command without options
458 457
459 458 $ hg help verify
460 459 hg verify
461 460
462 461 verify the integrity of the repository
463 462
464 463 Verify the integrity of the current repository.
465 464
466 465 This will perform an extensive check of the repository's integrity,
467 466 validating the hashes and checksums of each entry in the changelog,
468 467 manifest, and tracked files, as well as the integrity of their crosslinks
469 468 and indices.
470 469
471 470 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
472 471 information about recovery from corruption of the repository.
473 472
474 473 Returns 0 on success, 1 if errors are encountered.
475 474
476 475 use "hg -v help verify" to show the global options
477 476
478 477 $ hg help diff
479 478 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
480 479
481 480 diff repository (or selected files)
482 481
483 482 Show differences between revisions for the specified files.
484 483
485 484 Differences between files are shown using the unified diff format.
486 485
487 486 Note:
488 487 diff may generate unexpected results for merges, as it will default to
489 488 comparing against the working directory's first parent changeset if no
490 489 revisions are specified.
491 490
492 491 When two revision arguments are given, then changes are shown between
493 492 those revisions. If only one revision is specified then that revision is
494 493 compared to the working directory, and, when no revisions are specified,
495 494 the working directory files are compared to its parent.
496 495
497 496 Alternatively you can specify -c/--change with a revision to see the
498 497 changes in that changeset relative to its first parent.
499 498
500 499 Without the -a/--text option, diff will avoid generating diffs of files it
501 500 detects as binary. With -a, diff will generate a diff anyway, probably
502 501 with undesirable results.
503 502
504 503 Use the -g/--git option to generate diffs in the git extended diff format.
505 504 For more information, read "hg help diffs".
506 505
507 506 Returns 0 on success.
508 507
509 508 options:
510 509
511 510 -r --rev REV [+] revision
512 511 -c --change REV change made by revision
513 512 -a --text treat all files as text
514 513 -g --git use git extended diff format
515 514 --nodates omit dates from diff headers
516 515 -p --show-function show which function each change is in
517 516 --reverse produce a diff that undoes the changes
518 517 -w --ignore-all-space ignore white space when comparing lines
519 518 -b --ignore-space-change ignore changes in the amount of white space
520 519 -B --ignore-blank-lines ignore changes whose lines are all blank
521 520 -U --unified NUM number of lines of context to show
522 521 --stat output diffstat-style summary of changes
523 522 -I --include PATTERN [+] include names matching the given patterns
524 523 -X --exclude PATTERN [+] exclude names matching the given patterns
525 524 -S --subrepos recurse into subrepositories
526 525
527 526 [+] marked option can be specified multiple times
528 527
529 528 use "hg -v help diff" to show more complete help and the global options
530 529
531 530 $ hg help status
532 531 hg status [OPTION]... [FILE]...
533 532
534 533 aliases: st
535 534
536 535 show changed files in the working directory
537 536
538 537 Show status of files in the repository. If names are given, only files
539 538 that match are shown. Files that are clean or ignored or the source of a
540 539 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
541 540 -C/--copies or -A/--all are given. Unless options described with "show
542 541 only ..." are given, the options -mardu are used.
543 542
544 543 Option -q/--quiet hides untracked (unknown and ignored) files unless
545 544 explicitly requested with -u/--unknown or -i/--ignored.
546 545
547 546 Note:
548 547 status may appear to disagree with diff if permissions have changed or
549 548 a merge has occurred. The standard diff format does not report
550 549 permission changes and diff only reports changes relative to one merge
551 550 parent.
552 551
553 552 If one revision is given, it is used as the base revision. If two
554 553 revisions are given, the differences between them are shown. The --change
555 554 option can also be used as a shortcut to list the changed files of a
556 555 revision from its first parent.
557 556
558 557 The codes used to show the status of files are:
559 558
560 559 M = modified
561 560 A = added
562 561 R = removed
563 562 C = clean
564 563 ! = missing (deleted by non-hg command, but still tracked)
565 564 ? = not tracked
566 565 I = ignored
567 566 = origin of the previous file listed as A (added)
568 567
569 568 Returns 0 on success.
570 569
571 570 options:
572 571
573 572 -A --all show status of all files
574 573 -m --modified show only modified files
575 574 -a --added show only added files
576 575 -r --removed show only removed files
577 576 -d --deleted show only deleted (but tracked) files
578 577 -c --clean show only files without changes
579 578 -u --unknown show only unknown (not tracked) files
580 579 -i --ignored show only ignored files
581 580 -n --no-status hide status prefix
582 581 -C --copies show source of copied files
583 582 -0 --print0 end filenames with NUL, for use with xargs
584 583 --rev REV [+] show difference from revision
585 584 --change REV list the changed files of a revision
586 585 -I --include PATTERN [+] include names matching the given patterns
587 586 -X --exclude PATTERN [+] exclude names matching the given patterns
588 587 -S --subrepos recurse into subrepositories
589 588
590 589 [+] marked option can be specified multiple times
591 590
592 591 use "hg -v help status" to show more complete help and the global options
593 592
594 593 $ hg -q help status
595 594 hg status [OPTION]... [FILE]...
596 595
597 596 show changed files in the working directory
598 597
599 598 $ hg help foo
600 599 hg: unknown command 'foo'
601 600 Mercurial Distributed SCM
602 601
603 602 basic commands:
604 603
605 604 add add the specified files on the next commit
606 605 annotate show changeset information by line for each file
607 606 clone make a copy of an existing repository
608 607 commit commit the specified files or all outstanding changes
609 608 diff diff repository (or selected files)
610 609 export dump the header and diffs for one or more changesets
611 610 forget forget the specified files on the next commit
612 611 init create a new repository in the given directory
613 612 log show revision history of entire repository or files
614 613 merge merge working directory with another revision
615 614 pull pull changes from the specified source
616 615 push push changes to the specified destination
617 616 remove remove the specified files on the next commit
618 617 serve start stand-alone webserver
619 618 status show changed files in the working directory
620 619 summary summarize working directory state
621 620 update update working directory (or switch revisions)
622 621
623 622 use "hg help" for the full list of commands or "hg -v" for details
624 623 [255]
625 624
626 625 $ hg skjdfks
627 626 hg: unknown command 'skjdfks'
628 627 Mercurial Distributed SCM
629 628
630 629 basic commands:
631 630
632 631 add add the specified files on the next commit
633 632 annotate show changeset information by line for each file
634 633 clone make a copy of an existing repository
635 634 commit commit the specified files or all outstanding changes
636 635 diff diff repository (or selected files)
637 636 export dump the header and diffs for one or more changesets
638 637 forget forget the specified files on the next commit
639 638 init create a new repository in the given directory
640 639 log show revision history of entire repository or files
641 640 merge merge working directory with another revision
642 641 pull pull changes from the specified source
643 642 push push changes to the specified destination
644 643 remove remove the specified files on the next commit
645 644 serve start stand-alone webserver
646 645 status show changed files in the working directory
647 646 summary summarize working directory state
648 647 update update working directory (or switch revisions)
649 648
650 649 use "hg help" for the full list of commands or "hg -v" for details
651 650 [255]
652 651
653 652 $ cat > helpext.py <<EOF
654 653 > import os
655 654 > from mercurial import commands
656 655 >
657 656 > def nohelp(ui, *args, **kwargs):
658 657 > pass
659 658 >
660 659 > cmdtable = {
661 660 > "nohelp": (nohelp, [], "hg nohelp"),
662 661 > }
663 662 >
664 663 > commands.norepo += ' nohelp'
665 664 > EOF
666 665 $ echo '[extensions]' >> $HGRCPATH
667 666 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
668 667
669 668 Test command with no help text
670 669
671 670 $ hg help nohelp
672 671 hg nohelp
673 672
674 673 (no help text available)
675 674
676 675 use "hg -v help nohelp" to show the global options
677 676
678 677 $ hg help -k nohelp
679 678 Commands:
680 679
681 680 nohelp hg nohelp
682 681
683 682 Extension Commands:
684 683
685 684 nohelp (no help text available)
686 685
687 686 Test that default list of commands omits extension commands
688 687
689 688 $ hg help
690 689 Mercurial Distributed SCM
691 690
692 691 list of commands:
693 692
694 693 add add the specified files on the next commit
695 694 addremove add all new files, delete all missing files
696 695 annotate show changeset information by line for each file
697 696 archive create an unversioned archive of a repository revision
698 697 backout reverse effect of earlier changeset
699 698 bisect subdivision search of changesets
700 699 bookmarks track a line of development with movable markers
701 700 branch set or show the current branch name
702 701 branches list repository named branches
703 702 bundle create a changegroup file
704 703 cat output the current or given revision of files
705 704 clone make a copy of an existing repository
706 705 commit commit the specified files or all outstanding changes
707 706 config show combined config settings from all hgrc files
708 707 copy mark files as copied for the next commit
709 708 diff diff repository (or selected files)
710 709 export dump the header and diffs for one or more changesets
711 710 forget forget the specified files on the next commit
712 711 graft copy changes from other branches onto the current branch
713 712 grep search for a pattern in specified files and revisions
714 713 heads show branch heads
715 714 help show help for a given topic or a help overview
716 715 identify identify the working copy or specified revision
717 716 import import an ordered set of patches
718 717 incoming show new changesets found in source
719 718 init create a new repository in the given directory
720 719 locate locate files matching specific patterns
721 720 log show revision history of entire repository or files
722 721 manifest output the current or given revision of the project manifest
723 722 merge merge working directory with another revision
724 723 outgoing show changesets not found in the destination
725 724 parents show the parents of the working directory or revision
726 725 paths show aliases for remote repositories
727 726 phase set or show the current phase name
728 727 pull pull changes from the specified source
729 728 push push changes to the specified destination
730 729 recover roll back an interrupted transaction
731 730 remove remove the specified files on the next commit
732 731 rename rename files; equivalent of copy + remove
733 732 resolve redo merges or set/view the merge status of files
734 733 revert restore files to their checkout state
735 734 root print the root (top) of the current working directory
736 735 serve start stand-alone webserver
737 736 status show changed files in the working directory
738 737 summary summarize working directory state
739 738 tag add one or more tags for the current or given revision
740 739 tags list repository tags
741 740 unbundle apply one or more changegroup files
742 741 update update working directory (or switch revisions)
743 742 verify verify the integrity of the repository
744 743 version output version and copyright information
745 744
746 745 enabled extensions:
747 746
748 747 helpext (no help text available)
749 748
750 749 additional help topics:
751 750
752 751 config Configuration Files
753 752 dates Date Formats
754 753 diffs Diff Formats
755 754 environment Environment Variables
756 755 extensions Using Additional Features
757 756 filesets Specifying File Sets
758 757 glossary Glossary
759 758 hgignore Syntax for Mercurial Ignore Files
760 759 hgweb Configuring hgweb
761 760 merge-tools Merge Tools
762 761 multirevs Specifying Multiple Revisions
763 762 patterns File Name Patterns
764 763 phases Working with Phases
765 764 revisions Specifying Single Revisions
766 765 revsets Specifying Revision Sets
767 766 subrepos Subrepositories
768 767 templating Template Usage
769 768 urls URL Paths
770 769
771 770 use "hg -v help" to show builtin aliases and global options
772 771
773 772
774 773
775 774 Test list of commands with command with no help text
776 775
777 776 $ hg help helpext
778 777 helpext extension - no help text available
779 778
780 779 list of commands:
781 780
782 781 nohelp (no help text available)
783 782
784 783 use "hg -v help helpext" to show builtin aliases and global options
785 784
786 785 Test a help topic
787 786
788 787 $ hg help revs
789 788 Specifying Single Revisions
790 789 """""""""""""""""""""""""""
791 790
792 791 Mercurial supports several ways to specify individual revisions.
793 792
794 793 A plain integer is treated as a revision number. Negative integers are
795 794 treated as sequential offsets from the tip, with -1 denoting the tip, -2
796 795 denoting the revision prior to the tip, and so forth.
797 796
798 797 A 40-digit hexadecimal string is treated as a unique revision identifier.
799 798
800 799 A hexadecimal string less than 40 characters long is treated as a unique
801 800 revision identifier and is referred to as a short-form identifier. A
802 801 short-form identifier is only valid if it is the prefix of exactly one
803 802 full-length identifier.
804 803
805 804 Any other string is treated as a bookmark, tag, or branch name. A bookmark
806 805 is a movable pointer to a revision. A tag is a permanent name associated
807 806 with a revision. A branch name denotes the tipmost open branch head of
808 807 that branch - or if they are all closed, the tipmost closed head of the
809 808 branch. Bookmark, tag, and branch names must not contain the ":"
810 809 character.
811 810
812 811 The reserved name "tip" always identifies the most recent revision.
813 812
814 813 The reserved name "null" indicates the null revision. This is the revision
815 814 of an empty repository, and the parent of revision 0.
816 815
817 816 The reserved name "." indicates the working directory parent. If no
818 817 working directory is checked out, it is equivalent to null. If an
819 818 uncommitted merge is in progress, "." is the revision of the first parent.
820 819
821 820 Test templating help
822 821
823 822 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
824 823 desc String. The text of the changeset description.
825 824 diffstat String. Statistics of changes with the following format:
826 825 firstline Any text. Returns the first line of text.
827 826 nonempty Any text. Returns '(none)' if the string is empty.
828 827
829 828 Test help hooks
830 829
831 830 $ cat > helphook1.py <<EOF
832 831 > from mercurial import help
833 832 >
834 833 > def rewrite(topic, doc):
835 834 > return doc + '\nhelphook1\n'
836 835 >
837 836 > def extsetup(ui):
838 837 > help.addtopichook('revsets', rewrite)
839 838 > EOF
840 839 $ cat > helphook2.py <<EOF
841 840 > from mercurial import help
842 841 >
843 842 > def rewrite(topic, doc):
844 843 > return doc + '\nhelphook2\n'
845 844 >
846 845 > def extsetup(ui):
847 846 > help.addtopichook('revsets', rewrite)
848 847 > EOF
849 848 $ echo '[extensions]' >> $HGRCPATH
850 849 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
851 850 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
852 851 $ hg help revsets | grep helphook
853 852 helphook1
854 853 helphook2
855 854
856 855 Test keyword search help
857 856
858 857 $ cat > prefixedname.py <<EOF
859 858 > '''matched against word "clone"
860 859 > '''
861 860 > EOF
862 861 $ echo '[extensions]' >> $HGRCPATH
863 862 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
864 863 $ hg help -k clone
865 864 Topics:
866 865
867 866 config Configuration Files
868 867 extensions Using Additional Features
869 868 glossary Glossary
870 869 phases Working with Phases
871 870 subrepos Subrepositories
872 871 urls URL Paths
873 872
874 873 Commands:
875 874
876 875 bookmarks track a line of development with movable markers
877 876 clone make a copy of an existing repository
878 877 paths show aliases for remote repositories
879 878 update update working directory (or switch revisions)
880 879
881 880 Extensions:
882 881
883 882 prefixedname matched against word "clone"
884 883 relink recreates hardlinks between repository clones
885 884
886 885 Extension Commands:
887 886
888 887 qclone clone main and patch repository at same time
889 888
890 889 Test omit indicating for help
891 890
892 891 $ cat > addverboseitems.py <<EOF
893 892 > '''extension to test omit indicating.
894 893 >
895 894 > This paragraph is never omitted (for extension)
896 895 >
897 896 > .. container:: verbose
898 897 >
899 898 > This paragraph is omitted,
900 899 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension)
901 900 >
902 901 > This paragraph is never omitted, too (for extension)
903 902 > '''
904 903 >
905 904 > from mercurial import help, commands
906 905 > testtopic = """This paragraph is never omitted (for topic).
907 906 >
908 907 > .. container:: verbose
909 908 >
910 909 > This paragraph is omitted,
911 910 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic)
912 911 >
913 912 > This paragraph is never omitted, too (for topic)
914 913 > """
915 914 > def extsetup(ui):
916 915 > help.helptable.append((["topic-containing-verbose"],
917 916 > "This is the topic to test omit indicating.",
918 917 > lambda : testtopic))
919 918 > EOF
920 919 $ echo '[extensions]' >> $HGRCPATH
921 920 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
922 921 $ hg help addverboseitems
923 922 addverboseitems extension - extension to test omit indicating.
924 923
925 924 This paragraph is never omitted (for extension)
926 925
927 926 This paragraph is never omitted, too (for extension)
928 927
929 928 use "hg help -v addverboseitems" to show more complete help
930 929
931 930 no commands defined
932 931 $ hg help -v addverboseitems
933 932 addverboseitems extension - extension to test omit indicating.
934 933
935 934 This paragraph is never omitted (for extension)
936 935
937 936 This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension)
938 937
939 938 This paragraph is never omitted, too (for extension)
940 939
941 940 no commands defined
942 941 $ hg help topic-containing-verbose
943 942 This is the topic to test omit indicating.
944 943 """"""""""""""""""""""""""""""""""""""""""
945 944
946 945 This paragraph is never omitted (for topic).
947 946
948 947 This paragraph is never omitted, too (for topic)
949 948
950 949 use "hg help -v topic-containing-verbose" to show more complete help
951 950 $ hg help -v topic-containing-verbose
952 951 This is the topic to test omit indicating.
953 952 """"""""""""""""""""""""""""""""""""""""""
954 953
955 954 This paragraph is never omitted (for topic).
956 955
957 956 This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic)
958 957
959 958 This paragraph is never omitted, too (for topic)
960 959
961 960 Test usage of section marks in help documents
962 961
963 962 $ cd "$TESTDIR"/../doc
964 963 $ python check-seclevel.py
965 964 $ cd $TESTTMP
966 965
967 966 #if serve
968 967
969 968 Test the help pages in hgweb.
970 969
971 970 Dish up an empty repo; serve it cold.
972 971
973 972 $ hg init "$TESTTMP/test"
974 973 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
975 974 $ cat hg.pid >> $DAEMON_PIDS
976 975
977 976 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
978 977 200 Script output follows
979 978
980 979 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
981 980 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
982 981 <head>
983 982 <link rel="icon" href="/static/hgicon.png" type="image/png" />
984 983 <meta name="robots" content="index, nofollow" />
985 984 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
986 985 <script type="text/javascript" src="/static/mercurial.js"></script>
987 986
988 987 <title>Help: Index</title>
989 988 </head>
990 989 <body>
991 990
992 991 <div class="container">
993 992 <div class="menu">
994 993 <div class="logo">
995 994 <a href="http://mercurial.selenic.com/">
996 995 <img src="/static/hglogo.png" alt="mercurial" /></a>
997 996 </div>
998 997 <ul>
999 998 <li><a href="/shortlog">log</a></li>
1000 999 <li><a href="/graph">graph</a></li>
1001 1000 <li><a href="/tags">tags</a></li>
1002 1001 <li><a href="/bookmarks">bookmarks</a></li>
1003 1002 <li><a href="/branches">branches</a></li>
1004 1003 </ul>
1005 1004 <ul>
1006 1005 <li class="active">help</li>
1007 1006 </ul>
1008 1007 </div>
1009 1008
1010 1009 <div class="main">
1011 1010 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1012 1011 <form class="search" action="/log">
1013 1012
1014 1013 <p><input name="rev" id="search1" type="text" size="30" /></p>
1015 1014 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1016 1015 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1017 1016 </form>
1018 1017 <table class="bigtable">
1019 1018 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1020 1019
1021 1020 <tr><td>
1022 1021 <a href="/help/config">
1023 1022 config
1024 1023 </a>
1025 1024 </td><td>
1026 1025 Configuration Files
1027 1026 </td></tr>
1028 1027 <tr><td>
1029 1028 <a href="/help/dates">
1030 1029 dates
1031 1030 </a>
1032 1031 </td><td>
1033 1032 Date Formats
1034 1033 </td></tr>
1035 1034 <tr><td>
1036 1035 <a href="/help/diffs">
1037 1036 diffs
1038 1037 </a>
1039 1038 </td><td>
1040 1039 Diff Formats
1041 1040 </td></tr>
1042 1041 <tr><td>
1043 1042 <a href="/help/environment">
1044 1043 environment
1045 1044 </a>
1046 1045 </td><td>
1047 1046 Environment Variables
1048 1047 </td></tr>
1049 1048 <tr><td>
1050 1049 <a href="/help/extensions">
1051 1050 extensions
1052 1051 </a>
1053 1052 </td><td>
1054 1053 Using Additional Features
1055 1054 </td></tr>
1056 1055 <tr><td>
1057 1056 <a href="/help/filesets">
1058 1057 filesets
1059 1058 </a>
1060 1059 </td><td>
1061 1060 Specifying File Sets
1062 1061 </td></tr>
1063 1062 <tr><td>
1064 1063 <a href="/help/glossary">
1065 1064 glossary
1066 1065 </a>
1067 1066 </td><td>
1068 1067 Glossary
1069 1068 </td></tr>
1070 1069 <tr><td>
1071 1070 <a href="/help/hgignore">
1072 1071 hgignore
1073 1072 </a>
1074 1073 </td><td>
1075 1074 Syntax for Mercurial Ignore Files
1076 1075 </td></tr>
1077 1076 <tr><td>
1078 1077 <a href="/help/hgweb">
1079 1078 hgweb
1080 1079 </a>
1081 1080 </td><td>
1082 1081 Configuring hgweb
1083 1082 </td></tr>
1084 1083 <tr><td>
1085 1084 <a href="/help/merge-tools">
1086 1085 merge-tools
1087 1086 </a>
1088 1087 </td><td>
1089 1088 Merge Tools
1090 1089 </td></tr>
1091 1090 <tr><td>
1092 1091 <a href="/help/multirevs">
1093 1092 multirevs
1094 1093 </a>
1095 1094 </td><td>
1096 1095 Specifying Multiple Revisions
1097 1096 </td></tr>
1098 1097 <tr><td>
1099 1098 <a href="/help/patterns">
1100 1099 patterns
1101 1100 </a>
1102 1101 </td><td>
1103 1102 File Name Patterns
1104 1103 </td></tr>
1105 1104 <tr><td>
1106 1105 <a href="/help/phases">
1107 1106 phases
1108 1107 </a>
1109 1108 </td><td>
1110 1109 Working with Phases
1111 1110 </td></tr>
1112 1111 <tr><td>
1113 1112 <a href="/help/revisions">
1114 1113 revisions
1115 1114 </a>
1116 1115 </td><td>
1117 1116 Specifying Single Revisions
1118 1117 </td></tr>
1119 1118 <tr><td>
1120 1119 <a href="/help/revsets">
1121 1120 revsets
1122 1121 </a>
1123 1122 </td><td>
1124 1123 Specifying Revision Sets
1125 1124 </td></tr>
1126 1125 <tr><td>
1127 1126 <a href="/help/subrepos">
1128 1127 subrepos
1129 1128 </a>
1130 1129 </td><td>
1131 1130 Subrepositories
1132 1131 </td></tr>
1133 1132 <tr><td>
1134 1133 <a href="/help/templating">
1135 1134 templating
1136 1135 </a>
1137 1136 </td><td>
1138 1137 Template Usage
1139 1138 </td></tr>
1140 1139 <tr><td>
1141 1140 <a href="/help/urls">
1142 1141 urls
1143 1142 </a>
1144 1143 </td><td>
1145 1144 URL Paths
1146 1145 </td></tr>
1147 1146 <tr><td>
1148 1147 <a href="/help/topic-containing-verbose">
1149 1148 topic-containing-verbose
1150 1149 </a>
1151 1150 </td><td>
1152 1151 This is the topic to test omit indicating.
1153 1152 </td></tr>
1154 1153
1155 1154 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1156 1155
1157 1156 <tr><td>
1158 1157 <a href="/help/add">
1159 1158 add
1160 1159 </a>
1161 1160 </td><td>
1162 1161 add the specified files on the next commit
1163 1162 </td></tr>
1164 1163 <tr><td>
1165 1164 <a href="/help/annotate">
1166 1165 annotate
1167 1166 </a>
1168 1167 </td><td>
1169 1168 show changeset information by line for each file
1170 1169 </td></tr>
1171 1170 <tr><td>
1172 1171 <a href="/help/clone">
1173 1172 clone
1174 1173 </a>
1175 1174 </td><td>
1176 1175 make a copy of an existing repository
1177 1176 </td></tr>
1178 1177 <tr><td>
1179 1178 <a href="/help/commit">
1180 1179 commit
1181 1180 </a>
1182 1181 </td><td>
1183 1182 commit the specified files or all outstanding changes
1184 1183 </td></tr>
1185 1184 <tr><td>
1186 1185 <a href="/help/diff">
1187 1186 diff
1188 1187 </a>
1189 1188 </td><td>
1190 1189 diff repository (or selected files)
1191 1190 </td></tr>
1192 1191 <tr><td>
1193 1192 <a href="/help/export">
1194 1193 export
1195 1194 </a>
1196 1195 </td><td>
1197 1196 dump the header and diffs for one or more changesets
1198 1197 </td></tr>
1199 1198 <tr><td>
1200 1199 <a href="/help/forget">
1201 1200 forget
1202 1201 </a>
1203 1202 </td><td>
1204 1203 forget the specified files on the next commit
1205 1204 </td></tr>
1206 1205 <tr><td>
1207 1206 <a href="/help/init">
1208 1207 init
1209 1208 </a>
1210 1209 </td><td>
1211 1210 create a new repository in the given directory
1212 1211 </td></tr>
1213 1212 <tr><td>
1214 1213 <a href="/help/log">
1215 1214 log
1216 1215 </a>
1217 1216 </td><td>
1218 1217 show revision history of entire repository or files
1219 1218 </td></tr>
1220 1219 <tr><td>
1221 1220 <a href="/help/merge">
1222 1221 merge
1223 1222 </a>
1224 1223 </td><td>
1225 1224 merge working directory with another revision
1226 1225 </td></tr>
1227 1226 <tr><td>
1228 1227 <a href="/help/pull">
1229 1228 pull
1230 1229 </a>
1231 1230 </td><td>
1232 1231 pull changes from the specified source
1233 1232 </td></tr>
1234 1233 <tr><td>
1235 1234 <a href="/help/push">
1236 1235 push
1237 1236 </a>
1238 1237 </td><td>
1239 1238 push changes to the specified destination
1240 1239 </td></tr>
1241 1240 <tr><td>
1242 1241 <a href="/help/remove">
1243 1242 remove
1244 1243 </a>
1245 1244 </td><td>
1246 1245 remove the specified files on the next commit
1247 1246 </td></tr>
1248 1247 <tr><td>
1249 1248 <a href="/help/serve">
1250 1249 serve
1251 1250 </a>
1252 1251 </td><td>
1253 1252 start stand-alone webserver
1254 1253 </td></tr>
1255 1254 <tr><td>
1256 1255 <a href="/help/status">
1257 1256 status
1258 1257 </a>
1259 1258 </td><td>
1260 1259 show changed files in the working directory
1261 1260 </td></tr>
1262 1261 <tr><td>
1263 1262 <a href="/help/summary">
1264 1263 summary
1265 1264 </a>
1266 1265 </td><td>
1267 1266 summarize working directory state
1268 1267 </td></tr>
1269 1268 <tr><td>
1270 1269 <a href="/help/update">
1271 1270 update
1272 1271 </a>
1273 1272 </td><td>
1274 1273 update working directory (or switch revisions)
1275 1274 </td></tr>
1276 1275
1277 1276 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1278 1277
1279 1278 <tr><td>
1280 1279 <a href="/help/addremove">
1281 1280 addremove
1282 1281 </a>
1283 1282 </td><td>
1284 1283 add all new files, delete all missing files
1285 1284 </td></tr>
1286 1285 <tr><td>
1287 1286 <a href="/help/archive">
1288 1287 archive
1289 1288 </a>
1290 1289 </td><td>
1291 1290 create an unversioned archive of a repository revision
1292 1291 </td></tr>
1293 1292 <tr><td>
1294 1293 <a href="/help/backout">
1295 1294 backout
1296 1295 </a>
1297 1296 </td><td>
1298 1297 reverse effect of earlier changeset
1299 1298 </td></tr>
1300 1299 <tr><td>
1301 1300 <a href="/help/bisect">
1302 1301 bisect
1303 1302 </a>
1304 1303 </td><td>
1305 1304 subdivision search of changesets
1306 1305 </td></tr>
1307 1306 <tr><td>
1308 1307 <a href="/help/bookmarks">
1309 1308 bookmarks
1310 1309 </a>
1311 1310 </td><td>
1312 1311 track a line of development with movable markers
1313 1312 </td></tr>
1314 1313 <tr><td>
1315 1314 <a href="/help/branch">
1316 1315 branch
1317 1316 </a>
1318 1317 </td><td>
1319 1318 set or show the current branch name
1320 1319 </td></tr>
1321 1320 <tr><td>
1322 1321 <a href="/help/branches">
1323 1322 branches
1324 1323 </a>
1325 1324 </td><td>
1326 1325 list repository named branches
1327 1326 </td></tr>
1328 1327 <tr><td>
1329 1328 <a href="/help/bundle">
1330 1329 bundle
1331 1330 </a>
1332 1331 </td><td>
1333 1332 create a changegroup file
1334 1333 </td></tr>
1335 1334 <tr><td>
1336 1335 <a href="/help/cat">
1337 1336 cat
1338 1337 </a>
1339 1338 </td><td>
1340 1339 output the current or given revision of files
1341 1340 </td></tr>
1342 1341 <tr><td>
1343 1342 <a href="/help/config">
1344 1343 config
1345 1344 </a>
1346 1345 </td><td>
1347 1346 show combined config settings from all hgrc files
1348 1347 </td></tr>
1349 1348 <tr><td>
1350 1349 <a href="/help/copy">
1351 1350 copy
1352 1351 </a>
1353 1352 </td><td>
1354 1353 mark files as copied for the next commit
1355 1354 </td></tr>
1356 1355 <tr><td>
1357 1356 <a href="/help/graft">
1358 1357 graft
1359 1358 </a>
1360 1359 </td><td>
1361 1360 copy changes from other branches onto the current branch
1362 1361 </td></tr>
1363 1362 <tr><td>
1364 1363 <a href="/help/grep">
1365 1364 grep
1366 1365 </a>
1367 1366 </td><td>
1368 1367 search for a pattern in specified files and revisions
1369 1368 </td></tr>
1370 1369 <tr><td>
1371 1370 <a href="/help/heads">
1372 1371 heads
1373 1372 </a>
1374 1373 </td><td>
1375 1374 show branch heads
1376 1375 </td></tr>
1377 1376 <tr><td>
1378 1377 <a href="/help/help">
1379 1378 help
1380 1379 </a>
1381 1380 </td><td>
1382 1381 show help for a given topic or a help overview
1383 1382 </td></tr>
1384 1383 <tr><td>
1385 1384 <a href="/help/identify">
1386 1385 identify
1387 1386 </a>
1388 1387 </td><td>
1389 1388 identify the working copy or specified revision
1390 1389 </td></tr>
1391 1390 <tr><td>
1392 1391 <a href="/help/import">
1393 1392 import
1394 1393 </a>
1395 1394 </td><td>
1396 1395 import an ordered set of patches
1397 1396 </td></tr>
1398 1397 <tr><td>
1399 1398 <a href="/help/incoming">
1400 1399 incoming
1401 1400 </a>
1402 1401 </td><td>
1403 1402 show new changesets found in source
1404 1403 </td></tr>
1405 1404 <tr><td>
1406 1405 <a href="/help/locate">
1407 1406 locate
1408 1407 </a>
1409 1408 </td><td>
1410 1409 locate files matching specific patterns
1411 1410 </td></tr>
1412 1411 <tr><td>
1413 1412 <a href="/help/manifest">
1414 1413 manifest
1415 1414 </a>
1416 1415 </td><td>
1417 1416 output the current or given revision of the project manifest
1418 1417 </td></tr>
1419 1418 <tr><td>
1420 1419 <a href="/help/nohelp">
1421 1420 nohelp
1422 1421 </a>
1423 1422 </td><td>
1424 1423 (no help text available)
1425 1424 </td></tr>
1426 1425 <tr><td>
1427 1426 <a href="/help/outgoing">
1428 1427 outgoing
1429 1428 </a>
1430 1429 </td><td>
1431 1430 show changesets not found in the destination
1432 1431 </td></tr>
1433 1432 <tr><td>
1434 1433 <a href="/help/parents">
1435 1434 parents
1436 1435 </a>
1437 1436 </td><td>
1438 1437 show the parents of the working directory or revision
1439 1438 </td></tr>
1440 1439 <tr><td>
1441 1440 <a href="/help/paths">
1442 1441 paths
1443 1442 </a>
1444 1443 </td><td>
1445 1444 show aliases for remote repositories
1446 1445 </td></tr>
1447 1446 <tr><td>
1448 1447 <a href="/help/phase">
1449 1448 phase
1450 1449 </a>
1451 1450 </td><td>
1452 1451 set or show the current phase name
1453 1452 </td></tr>
1454 1453 <tr><td>
1455 1454 <a href="/help/recover">
1456 1455 recover
1457 1456 </a>
1458 1457 </td><td>
1459 1458 roll back an interrupted transaction
1460 1459 </td></tr>
1461 1460 <tr><td>
1462 1461 <a href="/help/rename">
1463 1462 rename
1464 1463 </a>
1465 1464 </td><td>
1466 1465 rename files; equivalent of copy + remove
1467 1466 </td></tr>
1468 1467 <tr><td>
1469 1468 <a href="/help/resolve">
1470 1469 resolve
1471 1470 </a>
1472 1471 </td><td>
1473 1472 redo merges or set/view the merge status of files
1474 1473 </td></tr>
1475 1474 <tr><td>
1476 1475 <a href="/help/revert">
1477 1476 revert
1478 1477 </a>
1479 1478 </td><td>
1480 1479 restore files to their checkout state
1481 1480 </td></tr>
1482 1481 <tr><td>
1483 1482 <a href="/help/root">
1484 1483 root
1485 1484 </a>
1486 1485 </td><td>
1487 1486 print the root (top) of the current working directory
1488 1487 </td></tr>
1489 1488 <tr><td>
1490 1489 <a href="/help/tag">
1491 1490 tag
1492 1491 </a>
1493 1492 </td><td>
1494 1493 add one or more tags for the current or given revision
1495 1494 </td></tr>
1496 1495 <tr><td>
1497 1496 <a href="/help/tags">
1498 1497 tags
1499 1498 </a>
1500 1499 </td><td>
1501 1500 list repository tags
1502 1501 </td></tr>
1503 1502 <tr><td>
1504 1503 <a href="/help/unbundle">
1505 1504 unbundle
1506 1505 </a>
1507 1506 </td><td>
1508 1507 apply one or more changegroup files
1509 1508 </td></tr>
1510 1509 <tr><td>
1511 1510 <a href="/help/verify">
1512 1511 verify
1513 1512 </a>
1514 1513 </td><td>
1515 1514 verify the integrity of the repository
1516 1515 </td></tr>
1517 1516 <tr><td>
1518 1517 <a href="/help/version">
1519 1518 version
1520 1519 </a>
1521 1520 </td><td>
1522 1521 output version and copyright information
1523 1522 </td></tr>
1524 1523 </table>
1525 1524 </div>
1526 1525 </div>
1527 1526
1528 1527 <script type="text/javascript">process_dates()</script>
1529 1528
1530 1529
1531 1530 </body>
1532 1531 </html>
1533 1532
1534 1533
1535 1534 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1536 1535 200 Script output follows
1537 1536
1538 1537 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1539 1538 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1540 1539 <head>
1541 1540 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1542 1541 <meta name="robots" content="index, nofollow" />
1543 1542 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1544 1543 <script type="text/javascript" src="/static/mercurial.js"></script>
1545 1544
1546 1545 <title>Help: add</title>
1547 1546 </head>
1548 1547 <body>
1549 1548
1550 1549 <div class="container">
1551 1550 <div class="menu">
1552 1551 <div class="logo">
1553 1552 <a href="http://mercurial.selenic.com/">
1554 1553 <img src="/static/hglogo.png" alt="mercurial" /></a>
1555 1554 </div>
1556 1555 <ul>
1557 1556 <li><a href="/shortlog">log</a></li>
1558 1557 <li><a href="/graph">graph</a></li>
1559 1558 <li><a href="/tags">tags</a></li>
1560 1559 <li><a href="/bookmarks">bookmarks</a></li>
1561 1560 <li><a href="/branches">branches</a></li>
1562 1561 </ul>
1563 1562 <ul>
1564 1563 <li class="active"><a href="/help">help</a></li>
1565 1564 </ul>
1566 1565 </div>
1567 1566
1568 1567 <div class="main">
1569 1568 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1570 1569 <h3>Help: add</h3>
1571 1570
1572 1571 <form class="search" action="/log">
1573 1572
1574 1573 <p><input name="rev" id="search1" type="text" size="30" /></p>
1575 1574 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1576 1575 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1577 1576 </form>
1578 1577 <div id="doc">
1579 1578 <p>
1580 1579 hg add [OPTION]... [FILE]...
1581 1580 </p>
1582 1581 <p>
1583 1582 add the specified files on the next commit
1584 1583 </p>
1585 1584 <p>
1586 1585 Schedule files to be version controlled and added to the
1587 1586 repository.
1588 1587 </p>
1589 1588 <p>
1590 1589 The files will be added to the repository at the next commit. To
1591 1590 undo an add before that, see &quot;hg forget&quot;.
1592 1591 </p>
1593 1592 <p>
1594 1593 If no names are given, add all files to the repository.
1595 1594 </p>
1596 1595 <p>
1597 1596 An example showing how new (unknown) files are added
1598 1597 automatically by &quot;hg add&quot;:
1599 1598 </p>
1600 1599 <pre>
1601 1600 \$ ls (re)
1602 1601 foo.c
1603 1602 \$ hg status (re)
1604 1603 ? foo.c
1605 1604 \$ hg add (re)
1606 1605 adding foo.c
1607 1606 \$ hg status (re)
1608 1607 A foo.c
1609 1608 </pre>
1610 1609 <p>
1611 1610 Returns 0 if all files are successfully added.
1612 1611 </p>
1613 1612 <p>
1614 1613 options:
1615 1614 </p>
1616 1615 <table>
1617 1616 <tr><td>-I</td>
1618 1617 <td>--include PATTERN [+]</td>
1619 1618 <td>include names matching the given patterns</td></tr>
1620 1619 <tr><td>-X</td>
1621 1620 <td>--exclude PATTERN [+]</td>
1622 1621 <td>exclude names matching the given patterns</td></tr>
1623 1622 <tr><td>-S</td>
1624 1623 <td>--subrepos</td>
1625 1624 <td>recurse into subrepositories</td></tr>
1626 1625 <tr><td>-n</td>
1627 1626 <td>--dry-run</td>
1628 1627 <td>do not perform actions, just print output</td></tr>
1629 1628 </table>
1630 1629 <p>
1631 1630 [+] marked option can be specified multiple times
1632 1631 </p>
1633 1632 <p>
1634 1633 global options:
1635 1634 </p>
1636 1635 <table>
1637 1636 <tr><td>-R</td>
1638 1637 <td>--repository REPO</td>
1639 1638 <td>repository root directory or name of overlay bundle file</td></tr>
1640 1639 <tr><td></td>
1641 1640 <td>--cwd DIR</td>
1642 1641 <td>change working directory</td></tr>
1643 1642 <tr><td>-y</td>
1644 1643 <td>--noninteractive</td>
1645 1644 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1646 1645 <tr><td>-q</td>
1647 1646 <td>--quiet</td>
1648 1647 <td>suppress output</td></tr>
1649 1648 <tr><td>-v</td>
1650 1649 <td>--verbose</td>
1651 1650 <td>enable additional output</td></tr>
1652 1651 <tr><td></td>
1653 1652 <td>--config CONFIG [+]</td>
1654 1653 <td>set/override config option (use 'section.name=value')</td></tr>
1655 1654 <tr><td></td>
1656 1655 <td>--debug</td>
1657 1656 <td>enable debugging output</td></tr>
1658 1657 <tr><td></td>
1659 1658 <td>--debugger</td>
1660 1659 <td>start debugger</td></tr>
1661 1660 <tr><td></td>
1662 1661 <td>--encoding ENCODE</td>
1663 1662 <td>set the charset encoding (default: ascii)</td></tr>
1664 1663 <tr><td></td>
1665 1664 <td>--encodingmode MODE</td>
1666 1665 <td>set the charset encoding mode (default: strict)</td></tr>
1667 1666 <tr><td></td>
1668 1667 <td>--traceback</td>
1669 1668 <td>always print a traceback on exception</td></tr>
1670 1669 <tr><td></td>
1671 1670 <td>--time</td>
1672 1671 <td>time how long the command takes</td></tr>
1673 1672 <tr><td></td>
1674 1673 <td>--profile</td>
1675 1674 <td>print command execution profile</td></tr>
1676 1675 <tr><td></td>
1677 1676 <td>--version</td>
1678 1677 <td>output version information and exit</td></tr>
1679 1678 <tr><td>-h</td>
1680 1679 <td>--help</td>
1681 1680 <td>display help and exit</td></tr>
1682 1681 <tr><td></td>
1683 1682 <td>--hidden</td>
1684 1683 <td>consider hidden changesets</td></tr>
1685 1684 </table>
1686 1685 <p>
1687 1686 [+] marked option can be specified multiple times
1688 1687 </p>
1689 1688
1690 1689 </div>
1691 1690 </div>
1692 1691 </div>
1693 1692
1694 1693 <script type="text/javascript">process_dates()</script>
1695 1694
1696 1695
1697 1696 </body>
1698 1697 </html>
1699 1698
1700 1699
1701 1700 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1702 1701 200 Script output follows
1703 1702
1704 1703 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1705 1704 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1706 1705 <head>
1707 1706 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1708 1707 <meta name="robots" content="index, nofollow" />
1709 1708 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1710 1709 <script type="text/javascript" src="/static/mercurial.js"></script>
1711 1710
1712 1711 <title>Help: remove</title>
1713 1712 </head>
1714 1713 <body>
1715 1714
1716 1715 <div class="container">
1717 1716 <div class="menu">
1718 1717 <div class="logo">
1719 1718 <a href="http://mercurial.selenic.com/">
1720 1719 <img src="/static/hglogo.png" alt="mercurial" /></a>
1721 1720 </div>
1722 1721 <ul>
1723 1722 <li><a href="/shortlog">log</a></li>
1724 1723 <li><a href="/graph">graph</a></li>
1725 1724 <li><a href="/tags">tags</a></li>
1726 1725 <li><a href="/bookmarks">bookmarks</a></li>
1727 1726 <li><a href="/branches">branches</a></li>
1728 1727 </ul>
1729 1728 <ul>
1730 1729 <li class="active"><a href="/help">help</a></li>
1731 1730 </ul>
1732 1731 </div>
1733 1732
1734 1733 <div class="main">
1735 1734 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1736 1735 <h3>Help: remove</h3>
1737 1736
1738 1737 <form class="search" action="/log">
1739 1738
1740 1739 <p><input name="rev" id="search1" type="text" size="30" /></p>
1741 1740 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1742 1741 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1743 1742 </form>
1744 1743 <div id="doc">
1745 1744 <p>
1746 1745 hg remove [OPTION]... FILE...
1747 1746 </p>
1748 1747 <p>
1749 1748 aliases: rm
1750 1749 </p>
1751 1750 <p>
1752 1751 remove the specified files on the next commit
1753 1752 </p>
1754 1753 <p>
1755 1754 Schedule the indicated files for removal from the current branch.
1756 1755 </p>
1757 1756 <p>
1758 1757 This command schedules the files to be removed at the next commit.
1759 1758 To undo a remove before that, see &quot;hg revert&quot;. To undo added
1760 1759 files, see &quot;hg forget&quot;.
1761 1760 </p>
1762 1761 <p>
1763 1762 -A/--after can be used to remove only files that have already
1764 1763 been deleted, -f/--force can be used to force deletion, and -Af
1765 1764 can be used to remove files from the next revision without
1766 1765 deleting them from the working directory.
1767 1766 </p>
1768 1767 <p>
1769 1768 The following table details the behavior of remove for different
1770 1769 file states (columns) and option combinations (rows). The file
1771 1770 states are Added [A], Clean [C], Modified [M] and Missing [!]
1772 1771 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
1773 1772 (from branch) and Delete (from disk):
1774 1773 </p>
1775 1774 <table>
1776 1775 <tr><td>opt/state</td>
1777 1776 <td>A</td>
1778 1777 <td>C</td>
1779 1778 <td>M</td>
1780 1779 <td>!</td></tr>
1781 1780 <tr><td>none</td>
1782 1781 <td>W</td>
1783 1782 <td>RD</td>
1784 1783 <td>W</td>
1785 1784 <td>R</td></tr>
1786 1785 <tr><td>-f</td>
1787 1786 <td>R</td>
1788 1787 <td>RD</td>
1789 1788 <td>RD</td>
1790 1789 <td>R</td></tr>
1791 1790 <tr><td>-A</td>
1792 1791 <td>W</td>
1793 1792 <td>W</td>
1794 1793 <td>W</td>
1795 1794 <td>R</td></tr>
1796 1795 <tr><td>-Af</td>
1797 1796 <td>R</td>
1798 1797 <td>R</td>
1799 1798 <td>R</td>
1800 1799 <td>R</td></tr>
1801 1800 </table>
1802 1801 <p>
1803 1802 Note that remove never deletes files in Added [A] state from the
1804 1803 working directory, not even if option --force is specified.
1805 1804 </p>
1806 1805 <p>
1807 1806 Returns 0 on success, 1 if any warnings encountered.
1808 1807 </p>
1809 1808 <p>
1810 1809 options:
1811 1810 </p>
1812 1811 <table>
1813 1812 <tr><td>-A</td>
1814 1813 <td>--after</td>
1815 1814 <td>record delete for missing files</td></tr>
1816 1815 <tr><td>-f</td>
1817 1816 <td>--force</td>
1818 1817 <td>remove (and delete) file even if added or modified</td></tr>
1819 1818 <tr><td>-I</td>
1820 1819 <td>--include PATTERN [+]</td>
1821 1820 <td>include names matching the given patterns</td></tr>
1822 1821 <tr><td>-X</td>
1823 1822 <td>--exclude PATTERN [+]</td>
1824 1823 <td>exclude names matching the given patterns</td></tr>
1825 1824 </table>
1826 1825 <p>
1827 1826 [+] marked option can be specified multiple times
1828 1827 </p>
1829 1828 <p>
1830 1829 global options:
1831 1830 </p>
1832 1831 <table>
1833 1832 <tr><td>-R</td>
1834 1833 <td>--repository REPO</td>
1835 1834 <td>repository root directory or name of overlay bundle file</td></tr>
1836 1835 <tr><td></td>
1837 1836 <td>--cwd DIR</td>
1838 1837 <td>change working directory</td></tr>
1839 1838 <tr><td>-y</td>
1840 1839 <td>--noninteractive</td>
1841 1840 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1842 1841 <tr><td>-q</td>
1843 1842 <td>--quiet</td>
1844 1843 <td>suppress output</td></tr>
1845 1844 <tr><td>-v</td>
1846 1845 <td>--verbose</td>
1847 1846 <td>enable additional output</td></tr>
1848 1847 <tr><td></td>
1849 1848 <td>--config CONFIG [+]</td>
1850 1849 <td>set/override config option (use 'section.name=value')</td></tr>
1851 1850 <tr><td></td>
1852 1851 <td>--debug</td>
1853 1852 <td>enable debugging output</td></tr>
1854 1853 <tr><td></td>
1855 1854 <td>--debugger</td>
1856 1855 <td>start debugger</td></tr>
1857 1856 <tr><td></td>
1858 1857 <td>--encoding ENCODE</td>
1859 1858 <td>set the charset encoding (default: ascii)</td></tr>
1860 1859 <tr><td></td>
1861 1860 <td>--encodingmode MODE</td>
1862 1861 <td>set the charset encoding mode (default: strict)</td></tr>
1863 1862 <tr><td></td>
1864 1863 <td>--traceback</td>
1865 1864 <td>always print a traceback on exception</td></tr>
1866 1865 <tr><td></td>
1867 1866 <td>--time</td>
1868 1867 <td>time how long the command takes</td></tr>
1869 1868 <tr><td></td>
1870 1869 <td>--profile</td>
1871 1870 <td>print command execution profile</td></tr>
1872 1871 <tr><td></td>
1873 1872 <td>--version</td>
1874 1873 <td>output version information and exit</td></tr>
1875 1874 <tr><td>-h</td>
1876 1875 <td>--help</td>
1877 1876 <td>display help and exit</td></tr>
1878 1877 <tr><td></td>
1879 1878 <td>--hidden</td>
1880 1879 <td>consider hidden changesets</td></tr>
1881 1880 </table>
1882 1881 <p>
1883 1882 [+] marked option can be specified multiple times
1884 1883 </p>
1885 1884
1886 1885 </div>
1887 1886 </div>
1888 1887 </div>
1889 1888
1890 1889 <script type="text/javascript">process_dates()</script>
1891 1890
1892 1891
1893 1892 </body>
1894 1893 </html>
1895 1894
1896 1895
1897 1896 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
1898 1897 200 Script output follows
1899 1898
1900 1899 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1901 1900 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1902 1901 <head>
1903 1902 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1904 1903 <meta name="robots" content="index, nofollow" />
1905 1904 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1906 1905 <script type="text/javascript" src="/static/mercurial.js"></script>
1907 1906
1908 1907 <title>Help: revisions</title>
1909 1908 </head>
1910 1909 <body>
1911 1910
1912 1911 <div class="container">
1913 1912 <div class="menu">
1914 1913 <div class="logo">
1915 1914 <a href="http://mercurial.selenic.com/">
1916 1915 <img src="/static/hglogo.png" alt="mercurial" /></a>
1917 1916 </div>
1918 1917 <ul>
1919 1918 <li><a href="/shortlog">log</a></li>
1920 1919 <li><a href="/graph">graph</a></li>
1921 1920 <li><a href="/tags">tags</a></li>
1922 1921 <li><a href="/bookmarks">bookmarks</a></li>
1923 1922 <li><a href="/branches">branches</a></li>
1924 1923 </ul>
1925 1924 <ul>
1926 1925 <li class="active"><a href="/help">help</a></li>
1927 1926 </ul>
1928 1927 </div>
1929 1928
1930 1929 <div class="main">
1931 1930 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1932 1931 <h3>Help: revisions</h3>
1933 1932
1934 1933 <form class="search" action="/log">
1935 1934
1936 1935 <p><input name="rev" id="search1" type="text" size="30" /></p>
1937 1936 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1938 1937 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1939 1938 </form>
1940 1939 <div id="doc">
1941 1940 <h1>Specifying Single Revisions</h1>
1942 1941 <p>
1943 1942 Mercurial supports several ways to specify individual revisions.
1944 1943 </p>
1945 1944 <p>
1946 1945 A plain integer is treated as a revision number. Negative integers are
1947 1946 treated as sequential offsets from the tip, with -1 denoting the tip,
1948 1947 -2 denoting the revision prior to the tip, and so forth.
1949 1948 </p>
1950 1949 <p>
1951 1950 A 40-digit hexadecimal string is treated as a unique revision
1952 1951 identifier.
1953 1952 </p>
1954 1953 <p>
1955 1954 A hexadecimal string less than 40 characters long is treated as a
1956 1955 unique revision identifier and is referred to as a short-form
1957 1956 identifier. A short-form identifier is only valid if it is the prefix
1958 1957 of exactly one full-length identifier.
1959 1958 </p>
1960 1959 <p>
1961 1960 Any other string is treated as a bookmark, tag, or branch name. A
1962 1961 bookmark is a movable pointer to a revision. A tag is a permanent name
1963 1962 associated with a revision. A branch name denotes the tipmost open branch head
1964 1963 of that branch - or if they are all closed, the tipmost closed head of the
1965 1964 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
1966 1965 </p>
1967 1966 <p>
1968 1967 The reserved name &quot;tip&quot; always identifies the most recent revision.
1969 1968 </p>
1970 1969 <p>
1971 1970 The reserved name &quot;null&quot; indicates the null revision. This is the
1972 1971 revision of an empty repository, and the parent of revision 0.
1973 1972 </p>
1974 1973 <p>
1975 1974 The reserved name &quot;.&quot; indicates the working directory parent. If no
1976 1975 working directory is checked out, it is equivalent to null. If an
1977 1976 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
1978 1977 parent.
1979 1978 </p>
1980 1979
1981 1980 </div>
1982 1981 </div>
1983 1982 </div>
1984 1983
1985 1984 <script type="text/javascript">process_dates()</script>
1986 1985
1987 1986
1988 1987 </body>
1989 1988 </html>
1990 1989
1991 1990
1992 1991 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
1993 1992
1994 1993 #endif
General Comments 0
You need to be logged in to leave comments. Login now