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