##// END OF EJS Templates
commands: use minirst parser when displaying help
Martin Geisler -
r9157:9261667e default
parent child Browse files
Show More
@@ -19,6 +19,7 b' def convert(ui, src, dest=None, revmapfi'
19 """convert a foreign SCM repository to a Mercurial one.
19 """convert a foreign SCM repository to a Mercurial one.
20
20
21 Accepted source formats [identifiers]:
21 Accepted source formats [identifiers]:
22
22 - Mercurial [hg]
23 - Mercurial [hg]
23 - CVS [cvs]
24 - CVS [cvs]
24 - Darcs [darcs]
25 - Darcs [darcs]
@@ -30,6 +31,7 b' def convert(ui, src, dest=None, revmapfi'
30 - Perforce [p4]
31 - Perforce [p4]
31
32
32 Accepted destination formats [identifiers]:
33 Accepted destination formats [identifiers]:
34
33 - Mercurial [hg]
35 - Mercurial [hg]
34 - Subversion [svn] (history on branches is not preserved)
36 - Subversion [svn] (history on branches is not preserved)
35
37
@@ -45,21 +47,23 b' def convert(ui, src, dest=None, revmapfi'
45 uses --sourcesort to preserve original revision numbers order. Sort modes
47 uses --sourcesort to preserve original revision numbers order. Sort modes
46 have the following effects:
48 have the following effects:
47
49
48 --branchsort: convert from parent to child revision when possible, which
50 --branchsort convert from parent to child revision when possible, which
49 means branches are usually converted one after the other. It generates
51 means branches are usually converted one after the other. It
50 more compact repositories.
52 generates more compact repositories.
51 --datesort: sort revisions by date. Converted repositories have
53
52 good-looking changelogs but are often an order of magnitude larger than
54 --datesort sort revisions by date. Converted repositories have
53 the same ones generated by --branchsort.
55 good-looking changelogs but are often an order of magnitude
54 --sourcesort: try to preserve source revisions order, only supported by
56 larger than the same ones generated by --branchsort.
55 Mercurial sources.
57
58 --sourcesort try to preserve source revisions order, only supported by
59 Mercurial sources.
56
60
57 If <REVMAP> isn't given, it will be put in a default location
61 If <REVMAP> isn't given, it will be put in a default location
58 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file that
62 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file that
59 maps each source commit ID to the destination ID for that revision, like
63 maps each source commit ID to the destination ID for that revision, like
60 so:
64 so::
61
65
62 <source ID> <destination ID>
66 <source ID> <destination ID>
63
67
64 If the file doesn't exist, it's automatically created. It's updated on
68 If the file doesn't exist, it's automatically created. It's updated on
65 each commit copied, so convert-repo can be interrupted and can be run
69 each commit copied, so convert-repo can be interrupted and can be run
@@ -72,7 +76,7 b' def convert(ui, src, dest=None, revmapfi'
72
76
73 The filemap is a file that allows filtering and remapping of files and
77 The filemap is a file that allows filtering and remapping of files and
74 directories. Comment lines start with '#'. Each line can contain one of
78 directories. Comment lines start with '#'. Each line can contain one of
75 the following directives:
79 the following directives::
76
80
77 include path/to/file
81 include path/to/file
78
82
@@ -134,17 +138,17 b' def convert(ui, src, dest=None, revmapfi'
134 Because CVS does not have changesets, it is necessary to collect
138 Because CVS does not have changesets, it is necessary to collect
135 individual commits to CVS and merge them into changesets. CVS source uses
139 individual commits to CVS and merge them into changesets. CVS source uses
136 its internal changeset merging code by default but can be configured to
140 its internal changeset merging code by default but can be configured to
137 call the external 'cvsps' program by setting:
141 call the external 'cvsps' program by setting::
138
142
139 --config convert.cvsps='cvsps -A -u --cvs-direct -q'
143 --config convert.cvsps='cvsps -A -u --cvs-direct -q'
140
144
141 This option is deprecated and will be removed in Mercurial 1.4.
145 This option is deprecated and will be removed in Mercurial 1.4.
142
146
143 The options shown are the defaults.
147 The options shown are the defaults.
144
148
145 Internal cvsps is selected by setting
149 Internal cvsps is selected by setting ::
146
150
147 --config convert.cvsps=builtin
151 --config convert.cvsps=builtin
148
152
149 and has a few more configurable options:
153 and has a few more configurable options:
150
154
@@ -38,7 +38,7 b' or for archive distribution.'
38 Configuration is done in the [keyword] and [keywordmaps] sections of hgrc
38 Configuration is done in the [keyword] and [keywordmaps] sections of hgrc
39 files.
39 files.
40
40
41 Example:
41 Example::
42
42
43 [keyword]
43 [keyword]
44 # expand keywords in every python file except those matching "x*"
44 # expand keywords in every python file except those matching "x*"
@@ -14,19 +14,19 b' patches (subset of known patches).'
14 Known patches are represented as patch files in the .hg/patches directory.
14 Known patches are represented as patch files in the .hg/patches directory.
15 Applied patches are both patch files and changesets.
15 Applied patches are both patch files and changesets.
16
16
17 Common tasks (use "hg help command" for more details):
17 Common tasks (use "hg help command" for more details)::
18
18
19 prepare repository to work with patches qinit
19 prepare repository to work with patches qinit
20 create new patch qnew
20 create new patch qnew
21 import existing patch qimport
21 import existing patch qimport
22
22
23 print patch series qseries
23 print patch series qseries
24 print applied patches qapplied
24 print applied patches qapplied
25 print name of top applied patch qtop
25 print name of top applied patch qtop
26
26
27 add known patch to applied stack qpush
27 add known patch to applied stack qpush
28 remove patch from applied stack qpop
28 remove patch from applied stack qpop
29 refresh contents of top applied patch qrefresh
29 refresh contents of top applied patch qrefresh
30 '''
30 '''
31
31
32 from mercurial.i18n import _
32 from mercurial.i18n import _
@@ -10,7 +10,7 b''
10 Subscriptions can be managed through a hgrc file. Default mode is to print
10 Subscriptions can be managed through a hgrc file. Default mode is to print
11 messages to stdout, for testing and configuring.
11 messages to stdout, for testing and configuring.
12
12
13 To use, configure the notify extension and enable it in hgrc like this:
13 To use, configure the notify extension and enable it in hgrc like this::
14
14
15 [extensions]
15 [extensions]
16 hgext.notify =
16 hgext.notify =
@@ -24,11 +24,11 b' To use, configure the notify extension a'
24 [notify]
24 [notify]
25 # config items go here
25 # config items go here
26
26
27 Required configuration items:
27 Required configuration items::
28
28
29 config = /path/to/file # file containing subscriptions
29 config = /path/to/file # file containing subscriptions
30
30
31 Optional configuration items:
31 Optional configuration items::
32
32
33 test = True # print messages to stdout for testing
33 test = True # print messages to stdout for testing
34 strip = 3 # number of slashes to strip for url paths
34 strip = 3 # number of slashes to strip for url paths
@@ -50,6 +50,8 b' Optional configuration items:'
50 The notify config file has same format as a regular hgrc file. It has two
50 The notify config file has same format as a regular hgrc file. It has two
51 sections so you can express subscriptions in whatever way is handier for you.
51 sections so you can express subscriptions in whatever way is handier for you.
52
52
53 ::
54
53 [usersubs]
55 [usersubs]
54 # key is subscriber email, value is ","-separated list of glob patterns
56 # key is subscriber email, value is ","-separated list of glob patterns
55 user@host = pattern
57 user@host = pattern
@@ -364,19 +364,19 b' def record(ui, repo, *pats, **opts):'
364
364
365 You will be prompted for whether to record changes to each modified file,
365 You will be prompted for whether to record changes to each modified file,
366 and for files with multiple changes, for each change to use. For each
366 and for files with multiple changes, for each change to use. For each
367 query, the following responses are possible:
367 query, the following responses are possible::
368
368
369 y - record this change
369 y - record this change
370 n - skip this change
370 n - skip this change
371
371
372 s - skip remaining changes to this file
372 s - skip remaining changes to this file
373 f - record remaining changes to this file
373 f - record remaining changes to this file
374
374
375 d - done, skip remaining changes and files
375 d - done, skip remaining changes and files
376 a - record all changes to all remaining files
376 a - record all changes to all remaining files
377 q - quit, recording no changes
377 q - quit, recording no changes
378
378
379 ? - display help'''
379 ? - display help'''
380
380
381 def record_committer(ui, repo, pats, opts):
381 def record_committer(ui, repo, pats, opts):
382 commands.commit(ui, repo, *pats, **opts)
382 commands.commit(ui, repo, *pats, **opts)
@@ -14,6 +14,7 b' import patch, help, mdiff, url, encoding'
14 import archival, changegroup, cmdutil, sshserver, hbisect
14 import archival, changegroup, cmdutil, sshserver, hbisect
15 from hgweb import server
15 from hgweb import server
16 import merge as merge_
16 import merge as merge_
17 import minirst
17
18
18 # Commands start here, listed alphabetically
19 # Commands start here, listed alphabetically
19
20
@@ -133,14 +134,14 b' def archive(ui, repo, dest, **opts):'
133 By default, the revision used is the parent of the working directory; use
134 By default, the revision used is the parent of the working directory; use
134 -r/--rev to specify a different revision.
135 -r/--rev to specify a different revision.
135
136
136 To specify the type of archive to create, use -t/--type. Valid types are:
137 To specify the type of archive to create, use -t/--type. Valid types are::
137
138
138 "files" (default): a directory full of files
139 "files" (default): a directory full of files
139 "tar": tar archive, uncompressed
140 "tar": tar archive, uncompressed
140 "tbz2": tar archive, compressed using bzip2
141 "tbz2": tar archive, compressed using bzip2
141 "tgz": tar archive, compressed using gzip
142 "tgz": tar archive, compressed using gzip
142 "uzip": zip archive, uncompressed
143 "uzip": zip archive, uncompressed
143 "zip": zip archive, compressed using deflate
144 "zip": zip archive, compressed using deflate
144
145
145 The exact name of the destination archive or directory is given using a
146 The exact name of the destination archive or directory is given using a
146 format string; see 'hg help export' for details.
147 format string; see 'hg help export' for details.
@@ -550,11 +551,11 b' def cat(ui, repo, file1, *pats, **opts):'
550
551
551 Output may be to a file, in which case the name of the file is given using
552 Output may be to a file, in which case the name of the file is given using
552 a format string. The formatting rules are the same as for the export
553 a format string. The formatting rules are the same as for the export
553 command, with the following additions:
554 command, with the following additions::
554
555
555 %s basename of file being printed
556 %s basename of file being printed
556 %d dirname of file being printed, or '.' if in repository root
557 %d dirname of file being printed, or '.' if in repository root
557 %p root-relative path name of file being printed
558 %p root-relative path name of file being printed
558 """
559 """
559 ctx = repo[opts.get('rev')]
560 ctx = repo[opts.get('rev')]
560 err = 1
561 err = 1
@@ -600,7 +601,7 b' def clone(ui, source, dest=None, **opts)'
600 cases, use the --pull option to avoid hardlinking.
601 cases, use the --pull option to avoid hardlinking.
601
602
602 In some cases, you can clone repositories and checked out files using full
603 In some cases, you can clone repositories and checked out files using full
603 hardlinks with
604 hardlinks with ::
604
605
605 $ cp -al REPO REPOCLONE
606 $ cp -al REPO REPOCLONE
606
607
@@ -1095,16 +1096,16 b' def export(ui, repo, *changesets, **opts'
1095 it will compare the merge changeset against its first parent only.
1096 it will compare the merge changeset against its first parent only.
1096
1097
1097 Output may be to a file, in which case the name of the file is given using
1098 Output may be to a file, in which case the name of the file is given using
1098 a format string. The formatting rules are as follows:
1099 a format string. The formatting rules are as follows::
1099
1100
1100 %% literal "%" character
1101 %% literal "%" character
1101 %H changeset hash (40 bytes of hexadecimal)
1102 %H changeset hash (40 bytes of hexadecimal)
1102 %N number of patches being generated
1103 %N number of patches being generated
1103 %R changeset revision number
1104 %R changeset revision number
1104 %b basename of the exporting repository
1105 %b basename of the exporting repository
1105 %h short-form changeset hash (12 bytes of hexadecimal)
1106 %h short-form changeset hash (12 bytes of hexadecimal)
1106 %n zero-padded sequence number, starting at 1
1107 %n zero-padded sequence number, starting at 1
1107 %r zero-padded changeset revision number
1108 %r zero-padded changeset revision number
1108
1109
1109 Without the -a/--text option, export will avoid generating diffs of files
1110 Without the -a/--text option, export will avoid generating diffs of files
1110 it detects as binary. With -a, export will generate a diff anyway,
1111 it detects as binary. With -a, export will generate a diff anyway,
@@ -1397,6 +1398,7 b' def help_(ui, name=None, with_version=Fa'
1397 Given a topic, extension, or command name, print help for that topic.
1398 Given a topic, extension, or command name, print help for that topic.
1398 """
1399 """
1399 option_lists = []
1400 option_lists = []
1401 textwidth = util.termwidth() - 2
1400
1402
1401 def addglobalopts(aliases):
1403 def addglobalopts(aliases):
1402 if ui.verbose:
1404 if ui.verbose:
@@ -1449,7 +1451,7 b' def help_(ui, name=None, with_version=Fa'
1449 doc = _("(no help text available)")
1451 doc = _("(no help text available)")
1450 if ui.quiet:
1452 if ui.quiet:
1451 doc = doc.splitlines()[0]
1453 doc = doc.splitlines()[0]
1452 ui.write("\n%s\n" % doc.rstrip())
1454 ui.write("\n%s\n" % minirst.format(doc, textwidth))
1453
1455
1454 if not ui.quiet:
1456 if not ui.quiet:
1455 # options
1457 # options
@@ -1498,7 +1500,9 b' def help_(ui, name=None, with_version=Fa'
1498
1500
1499 if name != 'shortlist':
1501 if name != 'shortlist':
1500 exts, maxlength = extensions.enabled()
1502 exts, maxlength = extensions.enabled()
1501 ui.write(help.listexts(_('enabled extensions:'), exts, maxlength))
1503 text = help.listexts(_('enabled extensions:'), exts, maxlength)
1504 if text:
1505 ui.write("\n%s\n" % minirst.format(text, textwidth))
1502
1506
1503 if not ui.quiet:
1507 if not ui.quiet:
1504 addglobalopts(True)
1508 addglobalopts(True)
@@ -1516,8 +1520,8 b' def help_(ui, name=None, with_version=Fa'
1516 if hasattr(doc, '__call__'):
1520 if hasattr(doc, '__call__'):
1517 doc = doc()
1521 doc = doc()
1518
1522
1519 ui.write("%s\n" % header)
1523 ui.write("%s\n\n" % header)
1520 ui.write("%s\n" % doc.rstrip())
1524 ui.write("%s\n" % minirst.format(doc, textwidth))
1521
1525
1522 def helpext(name):
1526 def helpext(name):
1523 try:
1527 try:
@@ -1526,12 +1530,11 b' def help_(ui, name=None, with_version=Fa'
1526 raise error.UnknownCommand(name)
1530 raise error.UnknownCommand(name)
1527
1531
1528 doc = gettext(mod.__doc__) or _('no help text available')
1532 doc = gettext(mod.__doc__) or _('no help text available')
1529 doc = doc.splitlines()
1533 head, tail = doc.split('\n', 1)
1530 ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0]))
1534 ui.write(_('%s extension - %s\n\n') % (name.split('.')[-1], head))
1531 for d in doc[1:]:
1535 if tail:
1532 ui.write(d, '\n')
1536 ui.write(minirst.format(tail, textwidth))
1533
1537 ui.status('\n\n')
1534 ui.status('\n')
1535
1538
1536 try:
1539 try:
1537 ct = mod.cmdtable
1540 ct = mod.cmdtable
@@ -2329,13 +2332,13 b' def remove(ui, repo, *pats, **opts):'
2329 The following table details the behavior of remove for different file
2332 The following table details the behavior of remove for different file
2330 states (columns) and option combinations (rows). The file states are Added
2333 states (columns) and option combinations (rows). The file states are Added
2331 [A], Clean [C], Modified [M] and Missing [!] (as reported by hg status).
2334 [A], Clean [C], Modified [M] and Missing [!] (as reported by hg status).
2332 The actions are Warn, Remove (from branch) and Delete (from disk).
2335 The actions are Warn, Remove (from branch) and Delete (from disk)::
2333
2336
2334 A C M !
2337 A C M !
2335 none W RD W R
2338 none W RD W R
2336 -f R RD RD R
2339 -f R RD RD R
2337 -A W W W R
2340 -A W W W R
2338 -Af R R R R
2341 -Af R R R R
2339
2342
2340 This command schedules the files to be removed at the next commit. To undo
2343 This command schedules the files to be removed at the next commit. To undo
2341 a remove before that, see hg revert.
2344 a remove before that, see hg revert.
@@ -2410,9 +2413,10 b' def resolve(ui, repo, *pats, **opts):'
2410 whether or not files are resolved. All files must be marked as resolved
2413 whether or not files are resolved. All files must be marked as resolved
2411 before a commit is permitted.
2414 before a commit is permitted.
2412
2415
2413 The codes used to show the status of files are:
2416 The codes used to show the status of files are::
2414 U = unresolved
2417
2415 R = resolved
2418 U = unresolved
2419 R = resolved
2416 """
2420 """
2417
2421
2418 all, mark, unmark, show = [opts.get(o) for o in 'all mark unmark list'.split()]
2422 all, mark, unmark, show = [opts.get(o) for o in 'all mark unmark list'.split()]
@@ -2675,7 +2679,7 b' def rollback(ui, repo):'
2675 Transactions are used to encapsulate the effects of all commands that
2679 Transactions are used to encapsulate the effects of all commands that
2676 create new changesets or propagate existing changesets into a repository.
2680 create new changesets or propagate existing changesets into a repository.
2677 For example, the following commands are transactional, and their effects
2681 For example, the following commands are transactional, and their effects
2678 can be rolled back:
2682 can be rolled back::
2679
2683
2680 commit
2684 commit
2681 import
2685 import
@@ -2783,15 +2787,16 b' def status(ui, repo, *pats, **opts):'
2783 If one revision is given, it is used as the base revision. If two
2787 If one revision is given, it is used as the base revision. If two
2784 revisions are given, the differences between them are shown.
2788 revisions are given, the differences between them are shown.
2785
2789
2786 The codes used to show the status of files are:
2790 The codes used to show the status of files are::
2787 M = modified
2791
2788 A = added
2792 M = modified
2789 R = removed
2793 A = added
2790 C = clean
2794 R = removed
2791 ! = missing (deleted by non-hg command, but still tracked)
2795 C = clean
2792 ? = not tracked
2796 ! = missing (deleted by non-hg command, but still tracked)
2793 I = ignored
2797 ? = not tracked
2794 = origin of the previous file listed as A (added)
2798 I = ignored
2799 = origin of the previous file listed as A (added)
2795 """
2800 """
2796
2801
2797 node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
2802 node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
@@ -43,10 +43,11 b' def listexts(header, exts, maxlength):'
43 '''return a text listing of the given extensions'''
43 '''return a text listing of the given extensions'''
44 if not exts:
44 if not exts:
45 return ''
45 return ''
46 result = '\n%s\n\n' % header
46 # TODO: literal block is wrong, should be a field list or a simple table.
47 result = '\n%s\n\n ::\n\n' % header
47 for name, desc in sorted(exts.iteritems()):
48 for name, desc in sorted(exts.iteritems()):
48 desc = util.wrap(desc, maxlength + 4)
49 desc = util.wrap(desc, maxlength + 5)
49 result += ' %s %s\n' % (name.ljust(maxlength), desc)
50 result += ' %s %s\n' % (name.ljust(maxlength), desc)
50 return result
51 return result
51
52
52 def extshelp():
53 def extshelp():
@@ -63,18 +64,18 b' def extshelp():'
63 to activate extensions as needed.
64 to activate extensions as needed.
64
65
65 To enable the "foo" extension, either shipped with Mercurial or in the
66 To enable the "foo" extension, either shipped with Mercurial or in the
66 Python search path, create an entry for it in your hgrc, like this:
67 Python search path, create an entry for it in your hgrc, like this::
67
68
68 [extensions]
69 [extensions]
69 foo =
70 foo =
70
71
71 You may also specify the full path to an extension:
72 You may also specify the full path to an extension::
72
73
73 [extensions]
74 [extensions]
74 myfeature = ~/.hgext/myfeature.py
75 myfeature = ~/.hgext/myfeature.py
75
76
76 To explicitly disable an extension enabled in an hgrc of broader scope,
77 To explicitly disable an extension enabled in an hgrc of broader scope,
77 prepend its path with !:
78 prepend its path with !::
78
79
79 [extensions]
80 [extensions]
80 # disabling extension bar residing in /path/to/extension/bar.py
81 # disabling extension bar residing in /path/to/extension/bar.py
@@ -95,24 +96,25 b' helptable = ('
95 (["dates"], _("Date Formats"),
96 (["dates"], _("Date Formats"),
96 _(r'''
97 _(r'''
97 Some commands allow the user to specify a date, e.g.:
98 Some commands allow the user to specify a date, e.g.:
98 * backout, commit, import, tag: Specify the commit date.
99 * log, revert, update: Select revision(s) by date.
100
99
101 Many date formats are valid. Here are some examples:
100 - backout, commit, import, tag: Specify the commit date.
101 - log, revert, update: Select revision(s) by date.
102
103 Many date formats are valid. Here are some examples::
102
104
103 "Wed Dec 6 13:18:29 2006" (local timezone assumed)
105 "Wed Dec 6 13:18:29 2006" (local timezone assumed)
104 "Dec 6 13:18 -0600" (year assumed, time offset provided)
106 "Dec 6 13:18 -0600" (year assumed, time offset provided)
105 "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
107 "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
106 "Dec 6" (midnight)
108 "Dec 6" (midnight)
107 "13:18" (today assumed)
109 "13:18" (today assumed)
108 "3:39" (3:39AM assumed)
110 "3:39" (3:39AM assumed)
109 "3:39pm" (15:39)
111 "3:39pm" (15:39)
110 "2006-12-06 13:18:29" (ISO 8601 format)
112 "2006-12-06 13:18:29" (ISO 8601 format)
111 "2006-12-6 13:18"
113 "2006-12-6 13:18"
112 "2006-12-6"
114 "2006-12-6"
113 "12-6"
115 "12-6"
114 "12/6"
116 "12/6"
115 "12/6/6" (Dec 6 2006)
117 "12/6/6" (Dec 6 2006)
116
118
117 Lastly, there is Mercurial's internal format:
119 Lastly, there is Mercurial's internal format:
118
120
@@ -123,12 +125,12 b' helptable = ('
123 offset of the local timezone, in seconds west of UTC (negative if the
125 offset of the local timezone, in seconds west of UTC (negative if the
124 timezone is east of UTC).
126 timezone is east of UTC).
125
127
126 The log command also accepts date ranges:
128 The log command also accepts date ranges::
127
129
128 "<{datetime}" - at or before a given date/time
130 "<{datetime}" - at or before a given date/time
129 ">{datetime}" - on or after a given date/time
131 ">{datetime}" - on or after a given date/time
130 "{datetime} to {datetime}" - a date range, inclusive
132 "{datetime} to {datetime}" - a date range, inclusive
131 "-{days}" - within a given number of days of today
133 "-{days}" - within a given number of days of today
132 ''')),
134 ''')),
133
135
134 (["patterns"], _("File Name Patterns"),
136 (["patterns"], _("File Name Patterns"),
@@ -155,100 +157,101 b' helptable = ('
155 To use a Perl/Python regular expression, start a name with "re:". Regexp
157 To use a Perl/Python regular expression, start a name with "re:". Regexp
156 pattern matching is anchored at the root of the repository.
158 pattern matching is anchored at the root of the repository.
157
159
158 Plain examples:
160 Plain examples::
159
161
160 path:foo/bar a name bar in a directory named foo in the root of
162 path:foo/bar a name bar in a directory named foo in the root of
161 the repository
163 the repository
162 path:path:name a file or directory named "path:name"
164 path:path:name a file or directory named "path:name"
163
165
164 Glob examples:
166 Glob examples::
165
167
166 glob:*.c any name ending in ".c" in the current directory
168 glob:*.c any name ending in ".c" in the current directory
167 *.c any name ending in ".c" in the current directory
169 *.c any name ending in ".c" in the current directory
168 **.c any name ending in ".c" in any subdirectory of the current
170 **.c any name ending in ".c" in any subdirectory of the
169 directory including itself.
171 current directory including itself.
170 foo/*.c any name ending in ".c" in the directory foo
172 foo/*.c any name ending in ".c" in the directory foo
171 foo/**.c any name ending in ".c" in any subdirectory of foo
173 foo/**.c any name ending in ".c" in any subdirectory of foo
172 including itself.
174 including itself.
173
175
174 Regexp examples:
176 Regexp examples::
175
177
176 re:.*\.c$ any name ending in ".c", anywhere in the repository
178 re:.*\.c$ any name ending in ".c", anywhere in the repository
177
179
178 ''')),
180 ''')),
179
181
180 (['environment', 'env'], _('Environment Variables'),
182 (['environment', 'env'], _('Environment Variables'),
181 _(r'''
183 _(r'''
182 HG::
184 HG
183 Path to the 'hg' executable, automatically passed when running hooks,
185 Path to the 'hg' executable, automatically passed when running hooks,
184 extensions or external tools. If unset or empty, this is the hg
186 extensions or external tools. If unset or empty, this is the hg
185 executable's name if it's frozen, or an executable named 'hg' (with
187 executable's name if it's frozen, or an executable named 'hg' (with
186 %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on Windows) is
188 %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on Windows) is
187 searched.
189 searched.
188
190
189 HGEDITOR::
191 HGEDITOR
190 This is the name of the editor to run when committing. See EDITOR.
192 This is the name of the editor to run when committing. See EDITOR.
191
193
192 (deprecated, use .hgrc)
194 (deprecated, use .hgrc)
193
195
194 HGENCODING::
196 HGENCODING
195 This overrides the default locale setting detected by Mercurial. This
197 This overrides the default locale setting detected by Mercurial. This
196 setting is used to convert data including usernames, changeset
198 setting is used to convert data including usernames, changeset
197 descriptions, tag names, and branches. This setting can be overridden with
199 descriptions, tag names, and branches. This setting can be overridden with
198 the --encoding command-line option.
200 the --encoding command-line option.
199
201
200 HGENCODINGMODE::
202 HGENCODINGMODE
201 This sets Mercurial's behavior for handling unknown characters while
203 This sets Mercurial's behavior for handling unknown characters while
202 transcoding user input. The default is "strict", which causes Mercurial to
204 transcoding user input. The default is "strict", which causes Mercurial to
203 abort if it can't map a character. Other settings include "replace", which
205 abort if it can't map a character. Other settings include "replace", which
204 replaces unknown characters, and "ignore", which drops them. This setting
206 replaces unknown characters, and "ignore", which drops them. This setting
205 can be overridden with the --encodingmode command-line option.
207 can be overridden with the --encodingmode command-line option.
206
208
207 HGMERGE::
209 HGMERGE
208 An executable to use for resolving merge conflicts. The program will be
210 An executable to use for resolving merge conflicts. The program will be
209 executed with three arguments: local file, remote file, ancestor file.
211 executed with three arguments: local file, remote file, ancestor file.
210
212
211 (deprecated, use .hgrc)
213 (deprecated, use .hgrc)
212
214
213 HGRCPATH::
215 HGRCPATH
214 A list of files or directories to search for hgrc files. Item separator is
216 A list of files or directories to search for hgrc files. Item separator is
215 ":" on Unix, ";" on Windows. If HGRCPATH is not set, platform default
217 ":" on Unix, ";" on Windows. If HGRCPATH is not set, platform default
216 search path is used. If empty, only the .hg/hgrc from the current
218 search path is used. If empty, only the .hg/hgrc from the current
217 repository is read.
219 repository is read.
218
220
219 For each element in HGRCPATH:
221 For each element in HGRCPATH:
220 * if it's a directory, all files ending with .rc are added
221 * otherwise, the file itself will be added
222
222
223 HGUSER::
223 - if it's a directory, all files ending with .rc are added
224 - otherwise, the file itself will be added
225
226 HGUSER
224 This is the string used as the author of a commit. If not set, available
227 This is the string used as the author of a commit. If not set, available
225 values will be considered in this order:
228 values will be considered in this order:
226
229
227 * HGUSER (deprecated)
230 - HGUSER (deprecated)
228 * hgrc files from the HGRCPATH
231 - hgrc files from the HGRCPATH
229 * EMAIL
232 - EMAIL
230 * interactive prompt
233 - interactive prompt
231 * LOGNAME (with '@hostname' appended)
234 - LOGNAME (with '@hostname' appended)
232
235
233 (deprecated, use .hgrc)
236 (deprecated, use .hgrc)
234
237
235 EMAIL::
238 EMAIL
236 May be used as the author of a commit; see HGUSER.
239 May be used as the author of a commit; see HGUSER.
237
240
238 LOGNAME::
241 LOGNAME
239 May be used as the author of a commit; see HGUSER.
242 May be used as the author of a commit; see HGUSER.
240
243
241 VISUAL::
244 VISUAL
242 This is the name of the editor to use when committing. See EDITOR.
245 This is the name of the editor to use when committing. See EDITOR.
243
246
244 EDITOR::
247 EDITOR
245 Sometimes Mercurial needs to open a text file in an editor for a user to
248 Sometimes Mercurial needs to open a text file in an editor for a user to
246 modify, for example when writing commit messages. The editor it uses is
249 modify, for example when writing commit messages. The editor it uses is
247 determined by looking at the environment variables HGEDITOR, VISUAL and
250 determined by looking at the environment variables HGEDITOR, VISUAL and
248 EDITOR, in that order. The first non-empty one is chosen. If all of them
251 EDITOR, in that order. The first non-empty one is chosen. If all of them
249 are empty, the editor defaults to 'vi'.
252 are empty, the editor defaults to 'vi'.
250
253
251 PYTHONPATH::
254 PYTHONPATH
252 This is used by Python to find imported modules and may need to be set
255 This is used by Python to find imported modules and may need to be set
253 appropriately if this Mercurial is not installed system-wide.
256 appropriately if this Mercurial is not installed system-wide.
254 ''')),
257 ''')),
@@ -431,7 +434,7 b' PYTHONPATH::'
431
434
432 (['urls'], _('URL Paths'),
435 (['urls'], _('URL Paths'),
433 _(r'''
436 _(r'''
434 Valid URLs are of the form:
437 Valid URLs are of the form::
435
438
436 local/filesystem/path[#revision]
439 local/filesystem/path[#revision]
437 file://local/filesystem/path[#revision]
440 file://local/filesystem/path[#revision]
@@ -450,26 +453,32 b' PYTHONPATH::'
450 server.
453 server.
451
454
452 Some notes about using SSH with Mercurial:
455 Some notes about using SSH with Mercurial:
456
453 - SSH requires an accessible shell account on the destination machine and
457 - SSH requires an accessible shell account on the destination machine and
454 a copy of hg in the remote path or specified with as remotecmd.
458 a copy of hg in the remote path or specified with as remotecmd.
455 - path is relative to the remote user's home directory by default. Use an
459 - path is relative to the remote user's home directory by default. Use an
456 extra slash at the start of a path to specify an absolute path:
460 extra slash at the start of a path to specify an absolute path::
461
457 ssh://example.com//tmp/repository
462 ssh://example.com//tmp/repository
463
458 - Mercurial doesn't use its own compression via SSH; the right thing to do
464 - Mercurial doesn't use its own compression via SSH; the right thing to do
459 is to configure it in your ~/.ssh/config, e.g.:
465 is to configure it in your ~/.ssh/config, e.g.::
466
460 Host *.mylocalnetwork.example.com
467 Host *.mylocalnetwork.example.com
461 Compression no
468 Compression no
462 Host *
469 Host *
463 Compression yes
470 Compression yes
471
464 Alternatively specify "ssh -C" as your ssh command in your hgrc or with
472 Alternatively specify "ssh -C" as your ssh command in your hgrc or with
465 the --ssh command line option.
473 the --ssh command line option.
466
474
467 These URLs can all be stored in your hgrc with path aliases under the
475 These URLs can all be stored in your hgrc with path aliases under the
468 [paths] section like so:
476 [paths] section like so::
469 [paths]
477
470 alias1 = URL1
478 [paths]
471 alias2 = URL2
479 alias1 = URL1
472 ...
480 alias2 = URL2
481 ...
473
482
474 You can then use the alias for any command that uses a URL (for example
483 You can then use the alias for any command that uses a URL (for example
475 'hg pull alias1' would pull from the 'alias1' path).
484 'hg pull alias1' would pull from the 'alias1' path).
@@ -3,6 +3,7 b' hg convert [OPTION]... SOURCE [DEST [REV'
3 convert a foreign SCM repository to a Mercurial one.
3 convert a foreign SCM repository to a Mercurial one.
4
4
5 Accepted source formats [identifiers]:
5 Accepted source formats [identifiers]:
6
6 - Mercurial [hg]
7 - Mercurial [hg]
7 - CVS [cvs]
8 - CVS [cvs]
8 - Darcs [darcs]
9 - Darcs [darcs]
@@ -14,6 +15,7 b' convert a foreign SCM repository to a Me'
14 - Perforce [p4]
15 - Perforce [p4]
15
16
16 Accepted destination formats [identifiers]:
17 Accepted destination formats [identifiers]:
18
17 - Mercurial [hg]
19 - Mercurial [hg]
18 - Subversion [svn] (history on branches is not preserved)
20 - Subversion [svn] (history on branches is not preserved)
19
21
@@ -29,14 +31,14 b' convert a foreign SCM repository to a Me'
29 uses --sourcesort to preserve original revision numbers order. Sort modes
31 uses --sourcesort to preserve original revision numbers order. Sort modes
30 have the following effects:
32 have the following effects:
31
33
32 --branchsort: convert from parent to child revision when possible, which
34 --branchsort convert from parent to child revision when possible, which
33 means branches are usually converted one after the other. It generates
35 means branches are usually converted one after the other. It
34 more compact repositories.
36 generates more compact repositories.
35 --datesort: sort revisions by date. Converted repositories have
37 --datesort sort revisions by date. Converted repositories have good-
36 good-looking changelogs but are often an order of magnitude larger than
38 looking changelogs but are often an order of magnitude
37 the same ones generated by --branchsort.
39 larger than the same ones generated by --branchsort.
38 --sourcesort: try to preserve source revisions order, only supported by
40 --sourcesort try to preserve source revisions order, only supported by
39 Mercurial sources.
41 Mercurial sources.
40
42
41 If <REVMAP> isn't given, it will be put in a default location
43 If <REVMAP> isn't given, it will be put in a default location
42 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file that
44 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file that
@@ -58,11 +60,11 b' convert a foreign SCM repository to a Me'
58 directories. Comment lines start with '#'. Each line can contain one of
60 directories. Comment lines start with '#'. Each line can contain one of
59 the following directives:
61 the following directives:
60
62
61 include path/to/file
63 include path/to/file
62
64
63 exclude path/to/file
65 exclude path/to/file
64
66
65 rename from/file to/file
67 rename from/file to/file
66
68
67 The 'include' directive causes a file, or all files under a directory, to
69 The 'include' directive causes a file, or all files under a directory, to
68 be included in the destination repository, and the exclusion of all other
70 be included in the destination repository, and the exclusion of all other
@@ -267,6 +267,7 b' show changed files in the working direct'
267 revisions are given, the differences between them are shown.
267 revisions are given, the differences between them are shown.
268
268
269 The codes used to show the status of files are:
269 The codes used to show the status of files are:
270
270 M = modified
271 M = modified
271 A = added
272 A = added
272 R = removed
273 R = removed
@@ -13,10 +13,10 b' files.'
13
13
14 Example:
14 Example:
15
15
16 [keyword]
16 [keyword]
17 # expand keywords in every python file except those matching "x*"
17 # expand keywords in every python file except those matching "x*"
18 **.py =
18 **.py =
19 x* = ignore
19 x* = ignore
20
20
21 NOTE: the more specific you are in your filename patterns the less you lose
21 NOTE: the more specific you are in your filename patterns the less you lose
22 speed in huge repositories.
22 speed in huge repositories.
@@ -5,51 +5,51 b' messages to stdout, for testing and conf'
5
5
6 To use, configure the notify extension and enable it in hgrc like this:
6 To use, configure the notify extension and enable it in hgrc like this:
7
7
8 [extensions]
8 [extensions]
9 hgext.notify =
9 hgext.notify =
10
10
11 [hooks]
11 [hooks]
12 # one email for each incoming changeset
12 # one email for each incoming changeset
13 incoming.notify = python:hgext.notify.hook
13 incoming.notify = python:hgext.notify.hook
14 # batch emails when many changesets incoming at one time
14 # batch emails when many changesets incoming at one time
15 changegroup.notify = python:hgext.notify.hook
15 changegroup.notify = python:hgext.notify.hook
16
16
17 [notify]
17 [notify]
18 # config items go here
18 # config items go here
19
19
20 Required configuration items:
20 Required configuration items:
21
21
22 config = /path/to/file # file containing subscriptions
22 config = /path/to/file # file containing subscriptions
23
23
24 Optional configuration items:
24 Optional configuration items:
25
25
26 test = True # print messages to stdout for testing
26 test = True # print messages to stdout for testing
27 strip = 3 # number of slashes to strip for url paths
27 strip = 3 # number of slashes to strip for url paths
28 domain = example.com # domain to use if committer missing domain
28 domain = example.com # domain to use if committer missing domain
29 style = ... # style file to use when formatting email
29 style = ... # style file to use when formatting email
30 template = ... # template to use when formatting email
30 template = ... # template to use when formatting email
31 incoming = ... # template to use when run as incoming hook
31 incoming = ... # template to use when run as incoming hook
32 changegroup = ... # template when run as changegroup hook
32 changegroup = ... # template when run as changegroup hook
33 maxdiff = 300 # max lines of diffs to include (0=none, -1=all)
33 maxdiff = 300 # max lines of diffs to include (0=none, -1=all)
34 maxsubject = 67 # truncate subject line longer than this
34 maxsubject = 67 # truncate subject line longer than this
35 diffstat = True # add a diffstat before the diff content
35 diffstat = True # add a diffstat before the diff content
36 sources = serve # notify if source of incoming changes in this list
36 sources = serve # notify if source of incoming changes in this list
37 # (serve == ssh or http, push, pull, bundle)
37 # (serve == ssh or http, push, pull, bundle)
38 [email]
38 [email]
39 from = user@host.com # email address to send as if none given
39 from = user@host.com # email address to send as if none given
40 [web]
40 [web]
41 baseurl = http://hgserver/... # root of hg web site for browsing commits
41 baseurl = http://hgserver/... # root of hg web site for browsing commits
42
42
43 The notify config file has same format as a regular hgrc file. It has two
43 The notify config file has same format as a regular hgrc file. It has two
44 sections so you can express subscriptions in whatever way is handier for you.
44 sections so you can express subscriptions in whatever way is handier for you.
45
45
46 [usersubs]
46 [usersubs]
47 # key is subscriber email, value is ","-separated list of glob patterns
47 # key is subscriber email, value is ","-separated list of glob patterns
48 user@host = pattern
48 user@host = pattern
49
49
50 [reposubs]
50 [reposubs]
51 # key is glob pattern, value is ","-separated list of subscriber emails
51 # key is glob pattern, value is ","-separated list of subscriber emails
52 pattern = user@host
52 pattern = user@host
53
53
54 Glob patterns are matched against path to repository root.
54 Glob patterns are matched against path to repository root.
55
55
General Comments 0
You need to be logged in to leave comments. Login now