Show More
@@ -0,0 +1,8 b'' | |||||
|
1 | .. Common link and substitution definitions. | |||
|
2 | ||||
|
3 | .. |hg(1)| replace:: **hg**\ (1) | |||
|
4 | .. _hg(1): hg.1.html | |||
|
5 | .. |hgrc(5)| replace:: **hgrc**\ (5) | |||
|
6 | .. _hgrc(5): hgrc.5.html | |||
|
7 | .. |hgignore(5)| replace:: **hgignore**\ (5) | |||
|
8 | .. _hgignore(5): hgignore.5.html |
@@ -0,0 +1,299 b'' | |||||
|
1 | # minirst.py - minimal reStructuredText parser | |||
|
2 | # | |||
|
3 | # Copyright 2009 Matt Mackall <mpm@selenic.com> and others | |||
|
4 | # | |||
|
5 | # This software may be used and distributed according to the terms of the | |||
|
6 | # GNU General Public License version 2, incorporated herein by reference. | |||
|
7 | ||||
|
8 | """simplified reStructuredText parser. | |||
|
9 | ||||
|
10 | This parser knows just enough about reStructuredText to parse the | |||
|
11 | Mercurial docstrings. | |||
|
12 | ||||
|
13 | It cheats in a major way: nested blocks are not really nested. They | |||
|
14 | are just indented blocks that look like they are nested. This relies | |||
|
15 | on the user to keep the right indentation for the blocks. | |||
|
16 | ||||
|
17 | It only supports a small subset of reStructuredText: | |||
|
18 | ||||
|
19 | - paragraphs | |||
|
20 | ||||
|
21 | - definition lists (must use ' ' to indent definitions) | |||
|
22 | ||||
|
23 | - lists (items must start with '-') | |||
|
24 | ||||
|
25 | - literal blocks | |||
|
26 | ||||
|
27 | - option lists (supports only long options without arguments) | |||
|
28 | ||||
|
29 | - inline markup is not recognized at all. | |||
|
30 | """ | |||
|
31 | ||||
|
32 | import re, sys, textwrap | |||
|
33 | ||||
|
34 | ||||
|
35 | def findblocks(text): | |||
|
36 | """Find continuous blocks of lines in text. | |||
|
37 | ||||
|
38 | Returns a list of dictionaries representing the blocks. Each block | |||
|
39 | has an 'indent' field and a 'lines' field. | |||
|
40 | """ | |||
|
41 | blocks = [[]] | |||
|
42 | lines = text.splitlines() | |||
|
43 | for line in lines: | |||
|
44 | if line.strip(): | |||
|
45 | blocks[-1].append(line) | |||
|
46 | elif blocks[-1]: | |||
|
47 | blocks.append([]) | |||
|
48 | if not blocks[-1]: | |||
|
49 | del blocks[-1] | |||
|
50 | ||||
|
51 | for i, block in enumerate(blocks): | |||
|
52 | indent = min((len(l) - len(l.lstrip())) for l in block) | |||
|
53 | blocks[i] = dict(indent=indent, lines=[l[indent:] for l in block]) | |||
|
54 | return blocks | |||
|
55 | ||||
|
56 | ||||
|
57 | def findliteralblocks(blocks): | |||
|
58 | """Finds literal blocks and adds a 'type' field to the blocks. | |||
|
59 | ||||
|
60 | Literal blocks are given the type 'literal', all other blocks are | |||
|
61 | given type the 'paragraph'. | |||
|
62 | """ | |||
|
63 | i = 0 | |||
|
64 | while i < len(blocks): | |||
|
65 | # Searching for a block that looks like this: | |||
|
66 | # | |||
|
67 | # +------------------------------+ | |||
|
68 | # | paragraph | | |||
|
69 | # | (ends with "::") | | |||
|
70 | # +------------------------------+ | |||
|
71 | # +---------------------------+ | |||
|
72 | # | indented literal block | | |||
|
73 | # +---------------------------+ | |||
|
74 | blocks[i]['type'] = 'paragraph' | |||
|
75 | if blocks[i]['lines'][-1].endswith('::') and i+1 < len(blocks): | |||
|
76 | indent = blocks[i]['indent'] | |||
|
77 | adjustment = blocks[i+1]['indent'] - indent | |||
|
78 | ||||
|
79 | if blocks[i]['lines'] == ['::']: | |||
|
80 | # Expanded form: remove block | |||
|
81 | del blocks[i] | |||
|
82 | i -= 1 | |||
|
83 | elif blocks[i]['lines'][-1].endswith(' ::'): | |||
|
84 | # Partially minimized form: remove space and both | |||
|
85 | # colons. | |||
|
86 | blocks[i]['lines'][-1] = blocks[i]['lines'][-1][:-3] | |||
|
87 | else: | |||
|
88 | # Fully minimized form: remove just one colon. | |||
|
89 | blocks[i]['lines'][-1] = blocks[i]['lines'][-1][:-1] | |||
|
90 | ||||
|
91 | # List items are formatted with a hanging indent. We must | |||
|
92 | # correct for this here while we still have the original | |||
|
93 | # information on the indentation of the subsequent literal | |||
|
94 | # blocks available. | |||
|
95 | if blocks[i]['lines'][0].startswith('- '): | |||
|
96 | indent += 2 | |||
|
97 | adjustment -= 2 | |||
|
98 | ||||
|
99 | # Mark the following indented blocks. | |||
|
100 | while i+1 < len(blocks) and blocks[i+1]['indent'] > indent: | |||
|
101 | blocks[i+1]['type'] = 'literal' | |||
|
102 | blocks[i+1]['indent'] -= adjustment | |||
|
103 | i += 1 | |||
|
104 | i += 1 | |||
|
105 | return blocks | |||
|
106 | ||||
|
107 | ||||
|
108 | def findsections(blocks): | |||
|
109 | """Finds sections. | |||
|
110 | ||||
|
111 | The blocks must have a 'type' field, i.e., they should have been | |||
|
112 | run through findliteralblocks first. | |||
|
113 | """ | |||
|
114 | for block in blocks: | |||
|
115 | # Searching for a block that looks like this: | |||
|
116 | # | |||
|
117 | # +------------------------------+ | |||
|
118 | # | Section title | | |||
|
119 | # | ------------- | | |||
|
120 | # +------------------------------+ | |||
|
121 | if (block['type'] == 'paragraph' and | |||
|
122 | len(block['lines']) == 2 and | |||
|
123 | block['lines'][1] == '-' * len(block['lines'][0])): | |||
|
124 | block['type'] = 'section' | |||
|
125 | return blocks | |||
|
126 | ||||
|
127 | ||||
|
128 | def findbulletlists(blocks): | |||
|
129 | """Finds bullet lists. | |||
|
130 | ||||
|
131 | The blocks must have a 'type' field, i.e., they should have been | |||
|
132 | run through findliteralblocks first. | |||
|
133 | """ | |||
|
134 | i = 0 | |||
|
135 | while i < len(blocks): | |||
|
136 | # Searching for a paragraph that looks like this: | |||
|
137 | # | |||
|
138 | # +------+-----------------------+ | |||
|
139 | # | "- " | list item | | |||
|
140 | # +------| (body elements)+ | | |||
|
141 | # +-----------------------+ | |||
|
142 | if (blocks[i]['type'] == 'paragraph' and | |||
|
143 | blocks[i]['lines'][0].startswith('- ')): | |||
|
144 | items = [] | |||
|
145 | for line in blocks[i]['lines']: | |||
|
146 | if line.startswith('- '): | |||
|
147 | items.append(dict(type='bullet', lines=[], | |||
|
148 | indent=blocks[i]['indent'] + 2)) | |||
|
149 | line = line[2:] | |||
|
150 | items[-1]['lines'].append(line) | |||
|
151 | blocks[i:i+1] = items | |||
|
152 | i += len(items) - 1 | |||
|
153 | i += 1 | |||
|
154 | return blocks | |||
|
155 | ||||
|
156 | ||||
|
157 | _optionre = re.compile(r'^(--[a-z-]+)((?:[ =][a-zA-Z][\w-]*)? +)(.*)$') | |||
|
158 | def findoptionlists(blocks): | |||
|
159 | """Finds option lists. | |||
|
160 | ||||
|
161 | The blocks must have a 'type' field, i.e., they should have been | |||
|
162 | run through findliteralblocks first. | |||
|
163 | """ | |||
|
164 | i = 0 | |||
|
165 | while i < len(blocks): | |||
|
166 | # Searching for a paragraph that looks like this: | |||
|
167 | # | |||
|
168 | # +----------------------------+-------------+ | |||
|
169 | # | "--" option " " | description | | |||
|
170 | # +-------+--------------------+ | | |||
|
171 | # | (body elements)+ | | |||
|
172 | # +----------------------------------+ | |||
|
173 | if (blocks[i]['type'] == 'paragraph' and | |||
|
174 | _optionre.match(blocks[i]['lines'][0])): | |||
|
175 | options = [] | |||
|
176 | for line in blocks[i]['lines']: | |||
|
177 | m = _optionre.match(line) | |||
|
178 | if m: | |||
|
179 | option, arg, rest = m.groups() | |||
|
180 | width = len(option) + len(arg) | |||
|
181 | options.append(dict(type='option', lines=[], | |||
|
182 | indent=blocks[i]['indent'], | |||
|
183 | width=width)) | |||
|
184 | options[-1]['lines'].append(line) | |||
|
185 | blocks[i:i+1] = options | |||
|
186 | i += len(options) - 1 | |||
|
187 | i += 1 | |||
|
188 | return blocks | |||
|
189 | ||||
|
190 | ||||
|
191 | def finddefinitionlists(blocks): | |||
|
192 | """Finds definition lists. | |||
|
193 | ||||
|
194 | The blocks must have a 'type' field, i.e., they should have been | |||
|
195 | run through findliteralblocks first. | |||
|
196 | """ | |||
|
197 | i = 0 | |||
|
198 | while i < len(blocks): | |||
|
199 | # Searching for a paragraph that looks like this: | |||
|
200 | # | |||
|
201 | # +----------------------------+ | |||
|
202 | # | term | | |||
|
203 | # +--+-------------------------+--+ | |||
|
204 | # | definition | | |||
|
205 | # | (body elements)+ | | |||
|
206 | # +----------------------------+ | |||
|
207 | if (blocks[i]['type'] == 'paragraph' and | |||
|
208 | len(blocks[i]['lines']) > 1 and | |||
|
209 | not blocks[i]['lines'][0].startswith(' ') and | |||
|
210 | blocks[i]['lines'][1].startswith(' ')): | |||
|
211 | definitions = [] | |||
|
212 | for line in blocks[i]['lines']: | |||
|
213 | if not line.startswith(' '): | |||
|
214 | definitions.append(dict(type='definition', lines=[], | |||
|
215 | indent=blocks[i]['indent'])) | |||
|
216 | definitions[-1]['lines'].append(line) | |||
|
217 | definitions[-1]['hang'] = len(line) - len(line.lstrip()) | |||
|
218 | blocks[i:i+1] = definitions | |||
|
219 | i += len(definitions) - 1 | |||
|
220 | i += 1 | |||
|
221 | return blocks | |||
|
222 | ||||
|
223 | ||||
|
224 | def addmargins(blocks): | |||
|
225 | """Adds empty blocks for vertical spacing. | |||
|
226 | ||||
|
227 | This groups bullets, options, and definitions together with no vertical | |||
|
228 | space between them, and adds an empty block between all other blocks. | |||
|
229 | """ | |||
|
230 | i = 1 | |||
|
231 | while i < len(blocks): | |||
|
232 | if (blocks[i]['type'] == blocks[i-1]['type'] and | |||
|
233 | blocks[i]['type'] in ('bullet', 'option', 'definition')): | |||
|
234 | i += 1 | |||
|
235 | else: | |||
|
236 | blocks.insert(i, dict(lines=[''], indent=0, type='margin')) | |||
|
237 | i += 2 | |||
|
238 | return blocks | |||
|
239 | ||||
|
240 | ||||
|
241 | def formatblock(block, width): | |||
|
242 | """Format a block according to width.""" | |||
|
243 | indent = ' ' * block['indent'] | |||
|
244 | if block['type'] == 'margin': | |||
|
245 | return '' | |||
|
246 | elif block['type'] in ('literal', 'section'): | |||
|
247 | return indent + ('\n' + indent).join(block['lines']) | |||
|
248 | elif block['type'] == 'definition': | |||
|
249 | term = indent + block['lines'][0] | |||
|
250 | defindent = indent + block['hang'] * ' ' | |||
|
251 | text = ' '.join(map(str.strip, block['lines'][1:])) | |||
|
252 | return "%s\n%s" % (term, textwrap.fill(text, width=width, | |||
|
253 | initial_indent=defindent, | |||
|
254 | subsequent_indent=defindent)) | |||
|
255 | else: | |||
|
256 | initindent = subindent = indent | |||
|
257 | text = ' '.join(map(str.strip, block['lines'])) | |||
|
258 | if block['type'] == 'bullet': | |||
|
259 | initindent = indent[:-2] + '- ' | |||
|
260 | subindent = indent | |||
|
261 | elif block['type'] == 'option': | |||
|
262 | subindent = indent + block['width'] * ' ' | |||
|
263 | ||||
|
264 | return textwrap.fill(text, width=width, | |||
|
265 | initial_indent=initindent, | |||
|
266 | subsequent_indent=subindent) | |||
|
267 | ||||
|
268 | ||||
|
269 | def format(text, width): | |||
|
270 | """Parse and format the text according to width.""" | |||
|
271 | blocks = findblocks(text) | |||
|
272 | blocks = findliteralblocks(blocks) | |||
|
273 | blocks = findsections(blocks) | |||
|
274 | blocks = findbulletlists(blocks) | |||
|
275 | blocks = findoptionlists(blocks) | |||
|
276 | blocks = finddefinitionlists(blocks) | |||
|
277 | blocks = addmargins(blocks) | |||
|
278 | return '\n'.join(formatblock(b, width) for b in blocks) | |||
|
279 | ||||
|
280 | ||||
|
281 | if __name__ == "__main__": | |||
|
282 | from pprint import pprint | |||
|
283 | ||||
|
284 | def debug(func, blocks): | |||
|
285 | blocks = func(blocks) | |||
|
286 | print "*** after %s:" % func.__name__ | |||
|
287 | pprint(blocks) | |||
|
288 | ||||
|
289 | return blocks | |||
|
290 | ||||
|
291 | text = open(sys.argv[1]).read() | |||
|
292 | blocks = debug(findblocks, text) | |||
|
293 | blocks = debug(findliteralblocks, blocks) | |||
|
294 | blocks = debug(findsections, blocks) | |||
|
295 | blocks = debug(findbulletlists, blocks) | |||
|
296 | blocks = debug(findoptionlists, blocks) | |||
|
297 | blocks = debug(finddefinitionlists, blocks) | |||
|
298 | blocks = debug(addmargins, blocks) | |||
|
299 | print '\n'.join(formatblock(b, 30) for b in blocks) |
@@ -0,0 +1,138 b'' | |||||
|
1 | #!/usr/bin/env python | |||
|
2 | ||||
|
3 | from mercurial import minirst | |||
|
4 | ||||
|
5 | def debugformat(title, text, width): | |||
|
6 | print "%s formatted to fit within %d characters:" % (title, width) | |||
|
7 | print "-" * 70 | |||
|
8 | print minirst.format(text, width) | |||
|
9 | print "-" * 70 | |||
|
10 | ||||
|
11 | ||||
|
12 | paragraphs = """ | |||
|
13 | This is some text in the first paragraph. | |||
|
14 | ||||
|
15 | An indented paragraph | |||
|
16 | with just two lines. | |||
|
17 | ||||
|
18 | ||||
|
19 | The third paragraph. It is followed by some | |||
|
20 | random lines with spurious spaces. | |||
|
21 | ||||
|
22 | ||||
|
23 | ||||
|
24 | ||||
|
25 | ||||
|
26 | No indention | |||
|
27 | here, despite | |||
|
28 | the uneven left | |||
|
29 | margin. | |||
|
30 | ||||
|
31 | Only the | |||
|
32 | left-most line | |||
|
33 | (this line!) | |||
|
34 | is significant | |||
|
35 | for the indentation | |||
|
36 | ||||
|
37 | """ | |||
|
38 | ||||
|
39 | debugformat('paragraphs', paragraphs, 60) | |||
|
40 | debugformat('paragraphs', paragraphs, 30) | |||
|
41 | ||||
|
42 | ||||
|
43 | definitions = """ | |||
|
44 | A Term | |||
|
45 | Definition. The indented | |||
|
46 | lines make up the definition. | |||
|
47 | Another Term | |||
|
48 | Another definition. The final line in the | |||
|
49 | definition determines the indentation, so | |||
|
50 | this will be indented with four spaces. | |||
|
51 | ||||
|
52 | A Nested/Indented Term | |||
|
53 | Definition. | |||
|
54 | """ | |||
|
55 | ||||
|
56 | debugformat('definitions', definitions, 60) | |||
|
57 | debugformat('definitions', definitions, 30) | |||
|
58 | ||||
|
59 | ||||
|
60 | literals = r""" | |||
|
61 | The fully minimized form is the most | |||
|
62 | convenient form:: | |||
|
63 | ||||
|
64 | Hello | |||
|
65 | literal | |||
|
66 | world | |||
|
67 | ||||
|
68 | In the partially minimized form a paragraph | |||
|
69 | simply ends with space-double-colon. :: | |||
|
70 | ||||
|
71 | //////////////////////////////////////// | |||
|
72 | long un-wrapped line in a literal block | |||
|
73 | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | |||
|
74 | ||||
|
75 | :: | |||
|
76 | ||||
|
77 | This literal block is started with '::', | |||
|
78 | the so-called expanded form. The paragraph | |||
|
79 | with '::' disappears in the final output. | |||
|
80 | """ | |||
|
81 | ||||
|
82 | debugformat('literals', literals, 60) | |||
|
83 | debugformat('literals', literals, 30) | |||
|
84 | ||||
|
85 | ||||
|
86 | lists = """ | |||
|
87 | - This is the first list item. | |||
|
88 | ||||
|
89 | Second paragraph in the first list item. | |||
|
90 | ||||
|
91 | - List items need not be separated | |||
|
92 | by a blank line. | |||
|
93 | - And will be rendered without | |||
|
94 | one in any case. | |||
|
95 | ||||
|
96 | We can have indented lists: | |||
|
97 | ||||
|
98 | - This is an indented list item | |||
|
99 | ||||
|
100 | - Another indented list item:: | |||
|
101 | ||||
|
102 | - A literal block in the middle | |||
|
103 | of an indented list. | |||
|
104 | ||||
|
105 | (The above is not a list item since we are in the literal block.) | |||
|
106 | ||||
|
107 | :: | |||
|
108 | ||||
|
109 | Literal block with no indentation. | |||
|
110 | """ | |||
|
111 | ||||
|
112 | debugformat('lists', lists, 60) | |||
|
113 | debugformat('lists', lists, 30) | |||
|
114 | ||||
|
115 | ||||
|
116 | options = """ | |||
|
117 | There is support for simple option lists, | |||
|
118 | but only with long options: | |||
|
119 | ||||
|
120 | --all Output all. | |||
|
121 | --both Output both (this description is | |||
|
122 | quite long). | |||
|
123 | --long Output all day long. | |||
|
124 | ||||
|
125 | --par This option has two paragraphs in its description. | |||
|
126 | This is the first. | |||
|
127 | ||||
|
128 | This is the second. Blank lines may be omitted between | |||
|
129 | options (as above) or left in (as here). | |||
|
130 | ||||
|
131 | The next paragraph looks like an option list, but lacks the two-space | |||
|
132 | marker after the option. It is treated as a normal paragraph: | |||
|
133 | ||||
|
134 | --foo bar baz | |||
|
135 | """ | |||
|
136 | ||||
|
137 | debugformat('options', options, 60) | |||
|
138 | debugformat('options', options, 30) |
@@ -0,0 +1,209 b'' | |||||
|
1 | paragraphs formatted to fit within 60 characters: | |||
|
2 | ---------------------------------------------------------------------- | |||
|
3 | This is some text in the first paragraph. | |||
|
4 | ||||
|
5 | An indented paragraph with just two lines. | |||
|
6 | ||||
|
7 | The third paragraph. It is followed by some random lines | |||
|
8 | with spurious spaces. | |||
|
9 | ||||
|
10 | No indention here, despite the uneven left margin. | |||
|
11 | ||||
|
12 | Only the left-most line (this line!) is significant for | |||
|
13 | the indentation | |||
|
14 | ---------------------------------------------------------------------- | |||
|
15 | ||||
|
16 | paragraphs formatted to fit within 30 characters: | |||
|
17 | ---------------------------------------------------------------------- | |||
|
18 | This is some text in the first | |||
|
19 | paragraph. | |||
|
20 | ||||
|
21 | An indented paragraph with | |||
|
22 | just two lines. | |||
|
23 | ||||
|
24 | The third paragraph. It is | |||
|
25 | followed by some random lines | |||
|
26 | with spurious spaces. | |||
|
27 | ||||
|
28 | No indention here, despite the | |||
|
29 | uneven left margin. | |||
|
30 | ||||
|
31 | Only the left-most line | |||
|
32 | (this line!) is significant | |||
|
33 | for the indentation | |||
|
34 | ---------------------------------------------------------------------- | |||
|
35 | ||||
|
36 | definitions formatted to fit within 60 characters: | |||
|
37 | ---------------------------------------------------------------------- | |||
|
38 | A Term | |||
|
39 | Definition. The indented lines make up the definition. | |||
|
40 | Another Term | |||
|
41 | Another definition. The final line in the definition | |||
|
42 | determines the indentation, so this will be indented | |||
|
43 | with four spaces. | |||
|
44 | A Nested/Indented Term | |||
|
45 | Definition. | |||
|
46 | ---------------------------------------------------------------------- | |||
|
47 | ||||
|
48 | definitions formatted to fit within 30 characters: | |||
|
49 | ---------------------------------------------------------------------- | |||
|
50 | A Term | |||
|
51 | Definition. The indented | |||
|
52 | lines make up the | |||
|
53 | definition. | |||
|
54 | Another Term | |||
|
55 | Another definition. The | |||
|
56 | final line in the | |||
|
57 | definition determines the | |||
|
58 | indentation, so this will | |||
|
59 | be indented with four | |||
|
60 | spaces. | |||
|
61 | A Nested/Indented Term | |||
|
62 | Definition. | |||
|
63 | ---------------------------------------------------------------------- | |||
|
64 | ||||
|
65 | literals formatted to fit within 60 characters: | |||
|
66 | ---------------------------------------------------------------------- | |||
|
67 | The fully minimized form is the most convenient form: | |||
|
68 | ||||
|
69 | Hello | |||
|
70 | literal | |||
|
71 | world | |||
|
72 | ||||
|
73 | In the partially minimized form a paragraph simply ends with | |||
|
74 | space-double-colon. | |||
|
75 | ||||
|
76 | //////////////////////////////////////// | |||
|
77 | long un-wrapped line in a literal block | |||
|
78 | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | |||
|
79 | ||||
|
80 | This literal block is started with '::', | |||
|
81 | the so-called expanded form. The paragraph | |||
|
82 | with '::' disappears in the final output. | |||
|
83 | ---------------------------------------------------------------------- | |||
|
84 | ||||
|
85 | literals formatted to fit within 30 characters: | |||
|
86 | ---------------------------------------------------------------------- | |||
|
87 | The fully minimized form is | |||
|
88 | the most convenient form: | |||
|
89 | ||||
|
90 | Hello | |||
|
91 | literal | |||
|
92 | world | |||
|
93 | ||||
|
94 | In the partially minimized | |||
|
95 | form a paragraph simply ends | |||
|
96 | with space-double-colon. | |||
|
97 | ||||
|
98 | //////////////////////////////////////// | |||
|
99 | long un-wrapped line in a literal block | |||
|
100 | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | |||
|
101 | ||||
|
102 | This literal block is started with '::', | |||
|
103 | the so-called expanded form. The paragraph | |||
|
104 | with '::' disappears in the final output. | |||
|
105 | ---------------------------------------------------------------------- | |||
|
106 | ||||
|
107 | lists formatted to fit within 60 characters: | |||
|
108 | ---------------------------------------------------------------------- | |||
|
109 | - This is the first list item. | |||
|
110 | ||||
|
111 | Second paragraph in the first list item. | |||
|
112 | ||||
|
113 | - List items need not be separated by a blank line. | |||
|
114 | - And will be rendered without one in any case. | |||
|
115 | ||||
|
116 | We can have indented lists: | |||
|
117 | ||||
|
118 | - This is an indented list item | |||
|
119 | - Another indented list item: | |||
|
120 | ||||
|
121 | - A literal block in the middle | |||
|
122 | of an indented list. | |||
|
123 | ||||
|
124 | (The above is not a list item since we are in the literal block.) | |||
|
125 | ||||
|
126 | Literal block with no indentation. | |||
|
127 | ---------------------------------------------------------------------- | |||
|
128 | ||||
|
129 | lists formatted to fit within 30 characters: | |||
|
130 | ---------------------------------------------------------------------- | |||
|
131 | - This is the first list item. | |||
|
132 | ||||
|
133 | Second paragraph in the | |||
|
134 | first list item. | |||
|
135 | ||||
|
136 | - List items need not be | |||
|
137 | separated by a blank line. | |||
|
138 | - And will be rendered without | |||
|
139 | one in any case. | |||
|
140 | ||||
|
141 | We can have indented lists: | |||
|
142 | ||||
|
143 | - This is an indented list | |||
|
144 | item | |||
|
145 | - Another indented list | |||
|
146 | item: | |||
|
147 | ||||
|
148 | - A literal block in the middle | |||
|
149 | of an indented list. | |||
|
150 | ||||
|
151 | (The above is not a list item since we are in the literal block.) | |||
|
152 | ||||
|
153 | Literal block with no indentation. | |||
|
154 | ---------------------------------------------------------------------- | |||
|
155 | ||||
|
156 | options formatted to fit within 60 characters: | |||
|
157 | ---------------------------------------------------------------------- | |||
|
158 | There is support for simple option lists, but only with long | |||
|
159 | options: | |||
|
160 | ||||
|
161 | --all Output all. | |||
|
162 | --both Output both (this description is quite long). | |||
|
163 | --long Output all day long. | |||
|
164 | --par This option has two paragraphs in its | |||
|
165 | description. This is the first. | |||
|
166 | ||||
|
167 | This is the second. Blank lines may be omitted | |||
|
168 | between options (as above) or left in (as here). | |||
|
169 | ||||
|
170 | The next paragraph looks like an option list, but lacks the | |||
|
171 | two-space marker after the option. It is treated as a normal | |||
|
172 | paragraph: | |||
|
173 | ||||
|
174 | --foo bar baz | |||
|
175 | ---------------------------------------------------------------------- | |||
|
176 | ||||
|
177 | options formatted to fit within 30 characters: | |||
|
178 | ---------------------------------------------------------------------- | |||
|
179 | There is support for simple | |||
|
180 | option lists, but only with | |||
|
181 | long options: | |||
|
182 | ||||
|
183 | --all Output all. | |||
|
184 | --both Output both (this | |||
|
185 | description is | |||
|
186 | quite long). | |||
|
187 | --long Output all day | |||
|
188 | long. | |||
|
189 | --par This option has two | |||
|
190 | paragraphs in its | |||
|
191 | description. This | |||
|
192 | is the first. | |||
|
193 | ||||
|
194 | This is the second. | |||
|
195 | Blank lines may be | |||
|
196 | omitted between | |||
|
197 | options (as above) | |||
|
198 | or left in (as | |||
|
199 | here). | |||
|
200 | ||||
|
201 | The next paragraph looks like | |||
|
202 | an option list, but lacks the | |||
|
203 | two-space marker after the | |||
|
204 | option. It is treated as a | |||
|
205 | normal paragraph: | |||
|
206 | ||||
|
207 | --foo bar baz | |||
|
208 | ---------------------------------------------------------------------- | |||
|
209 |
@@ -5,7 +5,8 b' PREFIX=/usr/local' | |||||
5 | MANDIR=$(PREFIX)/share/man |
|
5 | MANDIR=$(PREFIX)/share/man | |
6 | INSTALL=install -c -m 644 |
|
6 | INSTALL=install -c -m 644 | |
7 | PYTHON=python |
|
7 | PYTHON=python | |
8 | ASCIIDOC=asciidoc |
|
8 | RST2HTML=rst2html | |
|
9 | RST2MAN=rst2man | |||
9 |
|
10 | |||
10 | all: man html |
|
11 | all: man html | |
11 |
|
12 | |||
@@ -19,16 +20,15 b' hg.1.txt: hg.1.gendoc.txt' | |||||
19 | hg.1.gendoc.txt: gendoc.py ../mercurial/commands.py ../mercurial/help.py |
|
20 | hg.1.gendoc.txt: gendoc.py ../mercurial/commands.py ../mercurial/help.py | |
20 | ${PYTHON} gendoc.py > $@ |
|
21 | ${PYTHON} gendoc.py > $@ | |
21 |
|
22 | |||
22 | %: %.xml |
|
23 | %: %.txt common.txt | |
23 | xmlto man $*.xml && \ |
|
24 | # add newline after all literal blocks and fix backslash escape | |
24 | sed -e 's/^\.hg/\\\&.hg/' $* > $*~ && \ |
|
25 | $(RST2MAN) $*.txt \ | |
25 | mv $*~ $* |
|
26 | | sed -e 's/^\.fi$$/.fi\n/' \ | |
|
27 | | sed -e 's/\\fB\\\\fP/\\fB\\e\\fP/' \ | |||
|
28 | > $* | |||
26 |
|
29 | |||
27 |
%. |
|
30 | %.html: %.txt common.txt | |
28 | $(ASCIIDOC) -d manpage -b docbook $*.txt |
|
31 | $(RST2HTML) $*.txt > $*.html | |
29 |
|
||||
30 | %.html: %.txt |
|
|||
31 | $(ASCIIDOC) -b html4 $*.txt || $(ASCIIDOC) -b html $*.txt |
|
|||
32 |
|
32 | |||
33 | MANIFEST: man html |
|
33 | MANIFEST: man html | |
34 | # tracked files are already in the main MANIFEST |
|
34 | # tracked files are already in the main MANIFEST | |
@@ -45,4 +45,4 b' install: man' | |||||
45 | done |
|
45 | done | |
46 |
|
46 | |||
47 | clean: |
|
47 | clean: | |
48 |
$(RM) $(MAN |
|
48 | $(RM) $(MAN) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST |
@@ -62,7 +62,7 b' def show_doc(ui):' | |||||
62 | # print options |
|
62 | # print options | |
63 | underlined(_("OPTIONS")) |
|
63 | underlined(_("OPTIONS")) | |
64 | for optstr, desc in get_opts(globalopts): |
|
64 | for optstr, desc in get_opts(globalopts): | |
65 |
ui.write("%s |
|
65 | ui.write("%s\n %s\n\n" % (optstr, desc)) | |
66 |
|
66 | |||
67 | # print cmds |
|
67 | # print cmds | |
68 | underlined(_("COMMANDS")) |
|
68 | underlined(_("COMMANDS")) | |
@@ -78,15 +78,15 b' def show_doc(ui):' | |||||
78 | if f.startswith("debug"): continue |
|
78 | if f.startswith("debug"): continue | |
79 | d = get_cmd(h[f]) |
|
79 | d = get_cmd(h[f]) | |
80 | # synopsis |
|
80 | # synopsis | |
81 |
ui.write(" |
|
81 | ui.write(".. _%s:\n\n" % d['cmd']) | |
82 |
ui.write("%s |
|
82 | ui.write("``%s``\n" % d['synopsis'].replace("hg ","", 1)) | |
83 | # description |
|
83 | # description | |
84 | ui.write("%s\n\n" % d['desc'][1]) |
|
84 | ui.write("%s\n\n" % d['desc'][1]) | |
85 | # options |
|
85 | # options | |
86 | opt_output = list(d['opts']) |
|
86 | opt_output = list(d['opts']) | |
87 | if opt_output: |
|
87 | if opt_output: | |
88 | opts_len = max([len(line[0]) for line in opt_output]) |
|
88 | opts_len = max([len(line[0]) for line in opt_output]) | |
89 | ui.write(_(" options:\n")) |
|
89 | ui.write(_(" options:\n\n")) | |
90 | for optstr, desc in opt_output: |
|
90 | for optstr, desc in opt_output: | |
91 | if desc: |
|
91 | if desc: | |
92 | s = "%-*s %s" % (opts_len, optstr, desc) |
|
92 | s = "%-*s %s" % (opts_len, optstr, desc) |
@@ -1,64 +1,70 b'' | |||||
1 | HG(1) |
|
1 | ==== | |
2 | ===== |
|
2 | hg | |
3 | Matt Mackall <mpm@selenic.com> |
|
3 | ==== | |
4 | :man source: Mercurial |
|
|||
5 | :man manual: Mercurial Manual |
|
|||
6 |
|
4 | |||
7 | NAME |
|
5 | --------------------------------------- | |
8 | ---- |
|
6 | Mercurial source code management system | |
9 | hg - Mercurial source code management system |
|
7 | --------------------------------------- | |
|
8 | ||||
|
9 | :Author: Matt Mackall <mpm@selenic.com> | |||
|
10 | :Organization: Mercurial | |||
|
11 | :Manual section: 1 | |||
|
12 | :Manual group: Mercurial Manual | |||
|
13 | ||||
10 |
|
14 | |||
11 | SYNOPSIS |
|
15 | SYNOPSIS | |
12 | -------- |
|
16 | -------- | |
13 |
* |
|
17 | **hg** *command* [*option*]... [*argument*]... | |
14 |
|
18 | |||
15 | DESCRIPTION |
|
19 | DESCRIPTION | |
16 | ----------- |
|
20 | ----------- | |
17 | The *hg* command provides a command line interface to the Mercurial |
|
21 | The **hg** command provides a command line interface to the Mercurial | |
18 | system. |
|
22 | system. | |
19 |
|
23 | |||
20 | COMMAND ELEMENTS |
|
24 | COMMAND ELEMENTS | |
21 | ---------------- |
|
25 | ---------------- | |
22 |
|
26 | |||
23 |
files |
|
27 | files... | |
24 | indicates one or more filename or relative path filenames; see |
|
28 | indicates one or more filename or relative path filenames; see | |
25 | "FILE NAME PATTERNS" for information on pattern matching |
|
29 | "FILE NAME PATTERNS" for information on pattern matching | |
26 |
|
30 | |||
27 |
path |
|
31 | path | |
28 | indicates a path on the local machine |
|
32 | indicates a path on the local machine | |
29 |
|
33 | |||
30 |
revision |
|
34 | revision | |
31 | indicates a changeset which can be specified as a changeset |
|
35 | indicates a changeset which can be specified as a changeset | |
32 | revision number, a tag, or a unique substring of the changeset |
|
36 | revision number, a tag, or a unique substring of the changeset | |
33 | hash value |
|
37 | hash value | |
34 |
|
38 | |||
35 |
repository path |
|
39 | repository path | |
36 | either the pathname of a local repository or the URI of a remote |
|
40 | either the pathname of a local repository or the URI of a remote | |
37 | repository. |
|
41 | repository. | |
38 |
|
42 | |||
39 |
include::hg.1.gendoc.txt |
|
43 | .. include:: hg.1.gendoc.txt | |
40 |
|
44 | |||
41 | FILES |
|
45 | FILES | |
42 | ----- |
|
46 | ----- | |
43 | `.hgignore`:: |
|
47 | ||
|
48 | ``.hgignore`` | |||
44 | This file contains regular expressions (one per line) that |
|
49 | This file contains regular expressions (one per line) that | |
45 | describe file names that should be ignored by *hg*. For details, |
|
50 | describe file names that should be ignored by **hg**. For details, | |
46 |
see |
|
51 | see |hgignore(5)|_. | |
47 |
|
52 | |||
48 |
|
|
53 | ``.hgtags`` | |
49 | This file contains changeset hash values and text tag names (one |
|
54 | This file contains changeset hash values and text tag names (one | |
50 | of each separated by spaces) that correspond to tagged versions of |
|
55 | of each separated by spaces) that correspond to tagged versions of | |
51 | the repository contents. |
|
56 | the repository contents. | |
52 |
|
57 | |||
53 |
|
|
58 | ``/etc/mercurial/hgrc``, ``$HOME/.hgrc``, ``.hg/hgrc`` | |
54 |
This file contains defaults and configuration. Values in |
|
59 | This file contains defaults and configuration. Values in | |
55 |
override those in `$HOME/.hgrc`, and these override |
|
60 | ``.hg/hgrc`` override those in ``$HOME/.hgrc``, and these override | |
56 |
the global `/etc/mercurial/hgrc` configuration. |
|
61 | settings made in the global ``/etc/mercurial/hgrc`` configuration. | |
57 |
details of the contents and format of these |
|
62 | See |hgrc(5)|_ for details of the contents and format of these | |
|
63 | files. | |||
58 |
|
64 | |||
59 |
Some commands (e.g. revert) produce backup files ending in `.orig`, |
|
65 | Some commands (e.g. revert) produce backup files ending in ``.orig``, | |
60 |
the `.orig` file already exists and is not tracked by Mercurial, |
|
66 | if the ``.orig`` file already exists and is not tracked by Mercurial, | |
61 | be overwritten. |
|
67 | it will be overwritten. | |
62 |
|
68 | |||
63 | BUGS |
|
69 | BUGS | |
64 | ---- |
|
70 | ---- | |
@@ -67,7 +73,7 b' below) when you find them.' | |||||
67 |
|
73 | |||
68 | SEE ALSO |
|
74 | SEE ALSO | |
69 | -------- |
|
75 | -------- | |
70 |
|
|
76 | |hgignore(5)|_, |hgrc(5)|_ | |
71 |
|
77 | |||
72 | AUTHOR |
|
78 | AUTHOR | |
73 | ------ |
|
79 | ------ | |
@@ -75,14 +81,16 b' Written by Matt Mackall <mpm@selenic.com' | |||||
75 |
|
81 | |||
76 | RESOURCES |
|
82 | RESOURCES | |
77 | --------- |
|
83 | --------- | |
78 |
http://mercurial.selenic.com/ |
|
84 | Main Web Site: http://mercurial.selenic.com/ | |
79 |
|
85 | |||
80 | http://selenic.com/hg[Source code repository] |
|
86 | Source code repository: http://selenic.com/hg | |
81 |
|
87 | |||
82 |
http://selenic.com/mailman/listinfo/mercurial |
|
88 | Mailing list: http://selenic.com/mailman/listinfo/mercurial | |
83 |
|
89 | |||
84 | COPYING |
|
90 | COPYING | |
85 | ------- |
|
91 | ------- | |
86 | Copyright \(C) 2005-2009 Matt Mackall. |
|
92 | Copyright \(C) 2005-2009 Matt Mackall. | |
87 | Free use of this software is granted under the terms of the GNU General |
|
93 | Free use of this software is granted under the terms of the GNU General | |
88 | Public License (GPL). |
|
94 | Public License (GPL). | |
|
95 | ||||
|
96 | .. include:: common.txt |
@@ -1,17 +1,20 b'' | |||||
1 | HGIGNORE(5) |
|
1 | ========== | |
2 | =========== |
|
2 | hgignore | |
3 | Vadim Gelfer <vadim.gelfer@gmail.com> |
|
3 | ========== | |
4 | :man source: Mercurial |
|
|||
5 | :man manual: Mercurial Manual |
|
|||
6 |
|
4 | |||
7 | NAME |
|
5 | --------------------------------- | |
8 | ---- |
|
6 | syntax for Mercurial ignore files | |
9 | hgignore - syntax for Mercurial ignore files |
|
7 | --------------------------------- | |
|
8 | ||||
|
9 | :Author: Vadim Gelfer <vadim.gelfer@gmail.com> | |||
|
10 | :Organization: Mercurial | |||
|
11 | :Manual section: 5 | |||
|
12 | :Manual group: Mercurial Manual | |||
10 |
|
13 | |||
11 | SYNOPSIS |
|
14 | SYNOPSIS | |
12 | -------- |
|
15 | -------- | |
13 |
|
16 | |||
14 | The Mercurial system uses a file called `.hgignore` in the root |
|
17 | The Mercurial system uses a file called ``.hgignore`` in the root | |
15 | directory of a repository to control its behavior when it searches |
|
18 | directory of a repository to control its behavior when it searches | |
16 | for files that it is not currently tracking. |
|
19 | for files that it is not currently tracking. | |
17 |
|
20 | |||
@@ -22,52 +25,52 b' An untracked file is ignored if its path' | |||||
22 | root directory, or any prefix path of that path, is matched against |
|
25 | root directory, or any prefix path of that path, is matched against | |
23 | any pattern in `.hgignore`. |
|
26 | any pattern in `.hgignore`. | |
24 |
|
27 | |||
25 |
For example, say we have an an untracked file, `file.c`, at |
|
28 | For example, say we have an an untracked file, ``file.c``, at | |
26 |
`a/b/file.c` inside our repository. Mercurial will ignore `file.c` |
|
29 | ``a/b/file.c`` inside our repository. Mercurial will ignore ``file.c`` | |
27 | any pattern in `.hgignore` matches `a/b/file.c`, `a/b` or `a`. |
|
30 | if any pattern in ``.hgignore`` matches ``a/b/file.c``, ``a/b`` or ``a``. | |
28 |
|
31 | |||
29 | In addition, a Mercurial configuration file can reference a set of |
|
32 | In addition, a Mercurial configuration file can reference a set of | |
30 | per-user or global ignore files. See the hgrc(5) man page for details |
|
33 | per-user or global ignore files. See the |hgrc(5)|_ man page for details | |
31 | of how to configure these files. Look for the "ignore" entry in the |
|
34 | of how to configure these files. Look for the "ignore" entry in the | |
32 | "ui" section. |
|
35 | "ui" section. | |
33 |
|
36 | |||
34 | To control Mercurial's handling of files that it manages, see the |
|
37 | To control Mercurial's handling of files that it manages, see the | |
35 | hg(1) man page. Look for the "-I" and "-X" options. |
|
38 | |hg(1)|_ man page. Look for the "-I" and "-X" options. | |
36 |
|
39 | |||
37 | SYNTAX |
|
40 | SYNTAX | |
38 | ------ |
|
41 | ------ | |
39 |
|
42 | |||
40 | An ignore file is a plain text file consisting of a list of patterns, |
|
43 | An ignore file is a plain text file consisting of a list of patterns, | |
41 | with one pattern per line. Empty lines are skipped. The "`#`" |
|
44 | with one pattern per line. Empty lines are skipped. The "``#``" | |
42 | character is treated as a comment character, and the "`\`" character |
|
45 | character is treated as a comment character, and the "``\``" character | |
43 | is treated as an escape character. |
|
46 | is treated as an escape character. | |
44 |
|
47 | |||
45 | Mercurial supports several pattern syntaxes. The default syntax used |
|
48 | Mercurial supports several pattern syntaxes. The default syntax used | |
46 | is Python/Perl-style regular expressions. |
|
49 | is Python/Perl-style regular expressions. | |
47 |
|
50 | |||
48 | To change the syntax used, use a line of the following form: |
|
51 | To change the syntax used, use a line of the following form:: | |
49 |
|
52 | |||
50 | syntax: NAME |
|
53 | syntax: NAME | |
51 |
|
54 | |||
52 | where NAME is one of the following: |
|
55 | where ``NAME`` is one of the following: | |
53 |
|
56 | |||
54 |
regexp |
|
57 | ``regexp`` | |
55 | Regular expression, Python/Perl syntax. |
|
58 | Regular expression, Python/Perl syntax. | |
56 | glob:: |
|
59 | ``glob`` | |
57 | Shell-style glob. |
|
60 | Shell-style glob. | |
58 |
|
61 | |||
59 | The chosen syntax stays in effect when parsing all patterns that |
|
62 | The chosen syntax stays in effect when parsing all patterns that | |
60 | follow, until another syntax is selected. |
|
63 | follow, until another syntax is selected. | |
61 |
|
64 | |||
62 | Neither glob nor regexp patterns are rooted. A glob-syntax pattern of |
|
65 | Neither glob nor regexp patterns are rooted. A glob-syntax pattern of | |
63 | the form "`*.c`" will match a file ending in "`.c`" in any directory, |
|
66 | the form "``*.c``" will match a file ending in "``.c``" in any directory, | |
64 | and a regexp pattern of the form "`\.c$`" will do the same. To root a |
|
67 | and a regexp pattern of the form "``\.c$``" will do the same. To root a | |
65 | regexp pattern, start it with "`^`". |
|
68 | regexp pattern, start it with "``^``". | |
66 |
|
69 | |||
67 | EXAMPLE |
|
70 | EXAMPLE | |
68 | ------- |
|
71 | ------- | |
69 |
|
72 | |||
70 | Here is an example ignore file. |
|
73 | Here is an example ignore file. :: | |
71 |
|
74 | |||
72 | # use glob syntax. |
|
75 | # use glob syntax. | |
73 | syntax: glob |
|
76 | syntax: glob | |
@@ -88,7 +91,7 b' Mercurial was written by Matt Mackall <m' | |||||
88 |
|
91 | |||
89 | SEE ALSO |
|
92 | SEE ALSO | |
90 | -------- |
|
93 | -------- | |
91 | hg(1), hgrc(5) |
|
94 | |hg(1)|_, |hgrc(5)|_ | |
92 |
|
95 | |||
93 | COPYING |
|
96 | COPYING | |
94 | ------- |
|
97 | ------- | |
@@ -96,3 +99,5 b' This manual page is copyright 2006 Vadim' | |||||
96 | Mercurial is copyright 2005-2009 Matt Mackall. |
|
99 | Mercurial is copyright 2005-2009 Matt Mackall. | |
97 | Free use of this software is granted under the terms of the GNU General |
|
100 | Free use of this software is granted under the terms of the GNU General | |
98 | Public License (GPL). |
|
101 | Public License (GPL). | |
|
102 | ||||
|
103 | .. include:: common.txt |
This diff has been collapsed as it changes many lines, (721 lines changed) Show them Hide them | |||||
@@ -1,12 +1,16 b'' | |||||
1 | HGRC(5) |
|
1 | ====== | |
2 | ======= |
|
2 | hgrc | |
3 | Bryan O'Sullivan <bos@serpentine.com> |
|
3 | ====== | |
4 | :man source: Mercurial |
|
|||
5 | :man manual: Mercurial Manual |
|
|||
6 |
|
4 | |||
7 | NAME |
|
5 | --------------------------------- | |
8 | ---- |
|
6 | configuration files for Mercurial | |
9 | hgrc - configuration files for Mercurial |
|
7 | --------------------------------- | |
|
8 | ||||
|
9 | :Author: Bryan O'Sullivan <bos@serpentine.com> | |||
|
10 | :Organization: Mercurial | |||
|
11 | :Manual section: 5 | |||
|
12 | :Manual group: Mercurial Manual | |||
|
13 | ||||
10 |
|
14 | |||
11 | SYNOPSIS |
|
15 | SYNOPSIS | |
12 | -------- |
|
16 | -------- | |
@@ -19,51 +23,54 b' FILES' | |||||
19 |
|
23 | |||
20 | Mercurial reads configuration data from several files, if they exist. |
|
24 | Mercurial reads configuration data from several files, if they exist. | |
21 | The names of these files depend on the system on which Mercurial is |
|
25 | The names of these files depend on the system on which Mercurial is | |
22 | installed. `*.rc` files from a single directory are read in |
|
26 | installed. ``*.rc`` files from a single directory are read in | |
23 | alphabetical order, later ones overriding earlier ones. Where multiple |
|
27 | alphabetical order, later ones overriding earlier ones. Where multiple | |
24 | paths are given below, settings from later paths override earlier |
|
28 | paths are given below, settings from later paths override earlier | |
25 | ones. |
|
29 | ones. | |
26 |
|
30 | |||
27 |
(Unix) `<install-root>/etc/mercurial/hgrc.d/*.rc` |
|
31 | | (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc`` | |
28 |
(Unix) `<install-root>/etc/mercurial/hgrc` |
|
32 | | (Unix) ``<install-root>/etc/mercurial/hgrc`` | |
|
33 | ||||
29 | Per-installation configuration files, searched for in the |
|
34 | Per-installation configuration files, searched for in the | |
30 | directory where Mercurial is installed. `<install-root>` is the |
|
35 | directory where Mercurial is installed. ``<install-root>`` is the | |
31 | parent directory of the hg executable (or symlink) being run. For |
|
36 | parent directory of the **hg** executable (or symlink) being run. For | |
32 | example, if installed in `/shared/tools/bin/hg`, Mercurial will look |
|
37 | example, if installed in ``/shared/tools/bin/hg``, Mercurial will look | |
33 | in `/shared/tools/etc/mercurial/hgrc`. Options in these files apply |
|
38 | in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply | |
34 | to all Mercurial commands executed by any user in any directory. |
|
39 | to all Mercurial commands executed by any user in any directory. | |
35 |
|
40 | |||
36 |
(Unix) `/etc/mercurial/hgrc.d/*.rc` |
|
41 | | (Unix) ``/etc/mercurial/hgrc.d/*.rc`` | |
37 |
(Unix) `/etc/mercurial/hgrc` |
|
42 | | (Unix) ``/etc/mercurial/hgrc`` | |
|
43 | ||||
38 | Per-system configuration files, for the system on which Mercurial |
|
44 | Per-system configuration files, for the system on which Mercurial | |
39 | is running. Options in these files apply to all Mercurial commands |
|
45 | is running. Options in these files apply to all Mercurial commands | |
40 | executed by any user in any directory. Options in these files |
|
46 | executed by any user in any directory. Options in these files | |
41 | override per-installation options. |
|
47 | override per-installation options. | |
42 |
|
48 | |||
43 |
(Windows) `<install-dir>\Mercurial.ini` |
|
49 | | (Windows) ``<install-dir>\Mercurial.ini`` or else | |
44 | or else:: |
|
50 | | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` or else | |
45 | (Windows) `HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`:: |
|
51 | | (Windows) ``C:\Mercurial\Mercurial.ini`` | |
46 | or else:: |
|
52 | ||
47 | (Windows) `C:\Mercurial\Mercurial.ini`:: |
|
|||
48 | Per-installation/system configuration files, for the system on |
|
53 | Per-installation/system configuration files, for the system on | |
49 | which Mercurial is running. Options in these files apply to all |
|
54 | which Mercurial is running. Options in these files apply to all | |
50 | Mercurial commands executed by any user in any directory. Registry |
|
55 | Mercurial commands executed by any user in any directory. Registry | |
51 | keys contain PATH-like strings, every part of which must reference |
|
56 | keys contain PATH-like strings, every part of which must reference | |
52 | a `Mercurial.ini` file or be a directory where `*.rc` files will |
|
57 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will | |
53 | be read. |
|
58 | be read. | |
54 |
|
59 | |||
55 |
(Unix) `$HOME/.hgrc` |
|
60 | | (Unix) ``$HOME/.hgrc`` | |
56 |
(Windows) `%HOME%\Mercurial.ini` |
|
61 | | (Windows) ``%HOME%\Mercurial.ini`` | |
57 |
(Windows) `%HOME%\.hgrc` |
|
62 | | (Windows) ``%HOME%\.hgrc`` | |
58 |
(Windows) `%USERPROFILE%\Mercurial.ini` |
|
63 | | (Windows) ``%USERPROFILE%\Mercurial.ini`` | |
59 |
(Windows) `%USERPROFILE%\.hgrc` |
|
64 | | (Windows) ``%USERPROFILE%\.hgrc`` | |
|
65 | ||||
60 | Per-user configuration file(s), for the user running Mercurial. On |
|
66 | Per-user configuration file(s), for the user running Mercurial. On | |
61 | Windows 9x, `%HOME%` is replaced by `%APPDATA%`. Options in these |
|
67 | Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these | |
62 | files apply to all Mercurial commands executed by this user in any |
|
68 | files apply to all Mercurial commands executed by this user in any | |
63 | directory. Options in these files override per-installation and |
|
69 | directory. Options in these files override per-installation and | |
64 | per-system options. |
|
70 | per-system options. | |
65 |
|
71 | |||
66 |
(Unix, Windows) `<repo>/.hg/hgrc` |
|
72 | | (Unix, Windows) ``<repo>/.hg/hgrc`` | |
|
73 | ||||
67 | Per-repository configuration options that only apply in a |
|
74 | Per-repository configuration options that only apply in a | |
68 | particular repository. This file is not version-controlled, and |
|
75 | particular repository. This file is not version-controlled, and | |
69 | will not get transferred during a "clone" operation. Options in |
|
76 | will not get transferred during a "clone" operation. Options in | |
@@ -75,8 +82,10 b' ones.' | |||||
75 | SYNTAX |
|
82 | SYNTAX | |
76 | ------ |
|
83 | ------ | |
77 |
|
84 | |||
78 | A configuration file consists of sections, led by a "`[section]`" header |
|
85 | A configuration file consists of sections, led by a "``[section]``" header | |
79 | and followed by "`name: value`" entries; "`name=value`" is also accepted. |
|
86 | and followed by "``name: value``" entries; "``name=value``" is also accepted. | |
|
87 | ||||
|
88 | :: | |||
80 |
|
89 | |||
81 | [spam] |
|
90 | [spam] | |
82 | eggs=ham |
|
91 | eggs=ham | |
@@ -88,7 +97,7 b' they are treated as continuations of tha' | |||||
88 |
|
97 | |||
89 | Leading whitespace is removed from values. Empty lines are skipped. |
|
98 | Leading whitespace is removed from values. Empty lines are skipped. | |
90 |
|
99 | |||
91 | Lines beginning with "`#`" or "`;`" are ignored and may be used to provide |
|
100 | Lines beginning with "``#``" or "``;``" are ignored and may be used to provide | |
92 | comments. |
|
101 | comments. | |
93 |
|
102 | |||
94 | SECTIONS |
|
103 | SECTIONS | |
@@ -98,41 +107,39 b' This section describes the different sec' | |||||
98 | Mercurial "hgrc" file, the purpose of each section, its possible keys, |
|
107 | Mercurial "hgrc" file, the purpose of each section, its possible keys, | |
99 | and their possible values. |
|
108 | and their possible values. | |
100 |
|
109 | |||
101 | [[alias]] |
|
110 | ``alias`` | |
102 | alias:: |
|
111 | """"""""" | |
103 |
|
|
112 | Defines command aliases. | |
104 |
|
|
113 | Aliases allow you to define your own commands in terms of other | |
105 |
|
|
114 | commands (or aliases), optionally including arguments. | |
106 | + |
|
115 | ||
107 | -- |
|
116 | Alias definitions consist of lines of the form:: | |
108 | Alias definitions consist of lines of the form: |
|
|||
109 |
|
117 | |||
110 | <alias> = <command> [<argument]... |
|
118 | <alias> = <command> [<argument]... | |
111 |
|
119 | |||
112 | For example, this definition: |
|
120 | For example, this definition:: | |
113 |
|
121 | |||
114 | latest = log --limit 5 |
|
122 | latest = log --limit 5 | |
115 |
|
123 | |||
116 | creates a new command `latest` that shows only the five most recent |
|
124 | creates a new command ``latest`` that shows only the five most recent | |
117 | changesets. You can define subsequent aliases using earlier ones: |
|
125 | changesets. You can define subsequent aliases using earlier ones:: | |
118 |
|
126 | |||
119 | stable5 = latest -b stable |
|
127 | stable5 = latest -b stable | |
120 |
|
128 | |||
121 | NOTE: It is possible to create aliases with the same names as existing |
|
129 | NOTE: It is possible to create aliases with the same names as existing | |
122 | commands, which will then override the original definitions. This is |
|
130 | commands, which will then override the original definitions. This is | |
123 | almost always a bad idea! |
|
131 | almost always a bad idea! | |
124 | -- |
|
132 | ||
125 |
|
133 | |||
126 | [[auth]] |
|
134 | ``auth`` | |
127 | auth:: |
|
135 | """""""" | |
128 | Authentication credentials for HTTP authentication. Each line has |
|
136 | Authentication credentials for HTTP authentication. Each line has | |
129 | the following format: |
|
137 | the following format:: | |
130 |
|
138 | |||
131 | <name>.<argument> = <value> |
|
139 | <name>.<argument> = <value> | |
132 | + |
|
140 | ||
133 | -- |
|
|||
134 | where <name> is used to group arguments into authentication entries. |
|
141 | where <name> is used to group arguments into authentication entries. | |
135 | Example: |
|
142 | Example:: | |
136 |
|
143 | |||
137 | foo.prefix = hg.intevation.org/mercurial |
|
144 | foo.prefix = hg.intevation.org/mercurial | |
138 | foo.username = foo |
|
145 | foo.username = foo | |
@@ -146,26 +153,26 b' Example:' | |||||
146 |
|
153 | |||
147 | Supported arguments: |
|
154 | Supported arguments: | |
148 |
|
155 | |||
149 |
|
|
156 | ``prefix`` | |
150 |
Either " |
|
157 | Either "``*``" or a URI prefix with or without the scheme part. | |
151 | The authentication entry with the longest matching prefix is used |
|
158 | The authentication entry with the longest matching prefix is used | |
152 | (where "*" matches everything and counts as a match of length |
|
159 | (where "``*``" matches everything and counts as a match of length | |
153 | 1). If the prefix doesn't include a scheme, the match is performed |
|
160 | 1). If the prefix doesn't include a scheme, the match is performed | |
154 | against the URI with its scheme stripped as well, and the schemes |
|
161 | against the URI with its scheme stripped as well, and the schemes | |
155 | argument, q.v., is then subsequently consulted. |
|
162 | argument, q.v., is then subsequently consulted. | |
156 |
|
|
163 | ``username`` | |
157 | Optional. Username to authenticate with. If not given, and the |
|
164 | Optional. Username to authenticate with. If not given, and the | |
158 | remote site requires basic or digest authentication, the user |
|
165 | remote site requires basic or digest authentication, the user | |
159 | will be prompted for it. |
|
166 | will be prompted for it. | |
160 |
|
|
167 | ``password`` | |
161 | Optional. Password to authenticate with. If not given, and the |
|
168 | Optional. Password to authenticate with. If not given, and the | |
162 | remote site requires basic or digest authentication, the user |
|
169 | remote site requires basic or digest authentication, the user | |
163 | will be prompted for it. |
|
170 | will be prompted for it. | |
164 | key;; |
|
171 | ``key`` | |
165 | Optional. PEM encoded client certificate key file. |
|
172 | Optional. PEM encoded client certificate key file. | |
166 | cert;; |
|
173 | ``cert`` | |
167 | Optional. PEM encoded client certificate chain file. |
|
174 | Optional. PEM encoded client certificate chain file. | |
168 |
|
|
175 | ``schemes`` | |
169 | Optional. Space separated list of URI schemes to use this |
|
176 | Optional. Space separated list of URI schemes to use this | |
170 | authentication entry with. Only used if the prefix doesn't include |
|
177 | authentication entry with. Only used if the prefix doesn't include | |
171 | a scheme. Supported schemes are http and https. They will match |
|
178 | a scheme. Supported schemes are http and https. They will match | |
@@ -174,20 +181,19 b' Supported arguments:' | |||||
174 |
|
181 | |||
175 | If no suitable authentication entry is found, the user is prompted |
|
182 | If no suitable authentication entry is found, the user is prompted | |
176 | for credentials as usual if required by the remote. |
|
183 | for credentials as usual if required by the remote. | |
177 | -- |
|
184 | ||
178 |
|
185 | |||
179 | [[decode]] |
|
186 | ``decode/encode`` | |
180 | decode/encode:: |
|
187 | """"""""""""""""" | |
181 |
|
|
188 | Filters for transforming files on checkout/checkin. This would | |
182 |
|
|
189 | typically be used for newline processing or other | |
183 |
|
|
190 | localization/canonicalization of files. | |
184 | + |
|
191 | ||
185 | -- |
|
|||
186 | Filters consist of a filter pattern followed by a filter command. |
|
192 | Filters consist of a filter pattern followed by a filter command. | |
187 | Filter patterns are globs by default, rooted at the repository root. |
|
193 | Filter patterns are globs by default, rooted at the repository root. | |
188 | For example, to match any file ending in "`.txt`" in the root |
|
194 | For example, to match any file ending in "``.txt``" in the root | |
189 |
directory only, use the pattern " |
|
195 | directory only, use the pattern "``*.txt``". To match any file ending | |
190 |
in "`.c`" anywhere in the repository, use the pattern "** |
|
196 | in "``.c``" anywhere in the repository, use the pattern "``**.c``". | |
191 |
|
197 | |||
192 | The filter command can start with a specifier, either "pipe:" or |
|
198 | The filter command can start with a specifier, either "pipe:" or | |
193 | "tempfile:". If no specifier is given, "pipe:" is used by default. |
|
199 | "tempfile:". If no specifier is given, "pipe:" is used by default. | |
@@ -195,7 +201,7 b' The filter command can start with a spec' | |||||
195 | A "pipe:" command must accept data on stdin and return the transformed |
|
201 | A "pipe:" command must accept data on stdin and return the transformed | |
196 | data on stdout. |
|
202 | data on stdout. | |
197 |
|
203 | |||
198 | Pipe example: |
|
204 | Pipe example:: | |
199 |
|
205 | |||
200 | [encode] |
|
206 | [encode] | |
201 | # uncompress gzip files on checkin to improve delta compression |
|
207 | # uncompress gzip files on checkin to improve delta compression | |
@@ -218,7 +224,7 b' the standard shell I/O redirection opera' | |||||
218 | effects and may corrupt the contents of your files. |
|
224 | effects and may corrupt the contents of your files. | |
219 |
|
225 | |||
220 | The most common usage is for LF <-> CRLF translation on Windows. For |
|
226 | The most common usage is for LF <-> CRLF translation on Windows. For | |
221 | this, use the "smart" converters which check for binary files: |
|
227 | this, use the "smart" converters which check for binary files:: | |
222 |
|
228 | |||
223 | [extensions] |
|
229 | [extensions] | |
224 | hgext.win32text = |
|
230 | hgext.win32text = | |
@@ -227,7 +233,7 b' this, use the "smart" converters which c' | |||||
227 | [decode] |
|
233 | [decode] | |
228 | ** = cleverdecode: |
|
234 | ** = cleverdecode: | |
229 |
|
235 | |||
230 | or if you only want to translate certain files: |
|
236 | or if you only want to translate certain files:: | |
231 |
|
237 | |||
232 | [extensions] |
|
238 | [extensions] | |
233 | hgext.win32text = |
|
239 | hgext.win32text = | |
@@ -235,16 +241,16 b' or if you only want to translate certain' | |||||
235 | **.txt = dumbencode: |
|
241 | **.txt = dumbencode: | |
236 | [decode] |
|
242 | [decode] | |
237 | **.txt = dumbdecode: |
|
243 | **.txt = dumbdecode: | |
238 | -- |
|
244 | ||
|
245 | ||||
|
246 | ``defaults`` | |||
|
247 | """""""""""" | |||
239 |
|
248 | |||
240 | [[defaults]] |
|
249 | Use the [defaults] section to define command defaults, i.e. the | |
241 | defaults:: |
|
250 | default options/arguments to pass to the specified commands. | |
242 | Use the [defaults] section to define command defaults, i.e. the |
|
251 | ||
243 | default options/arguments to pass to the specified commands. |
|
|||
244 | + |
|
|||
245 | -- |
|
|||
246 | The following example makes 'hg log' run in verbose mode, and 'hg |
|
252 | The following example makes 'hg log' run in verbose mode, and 'hg | |
247 |
status' show only the modified files, by default |
|
253 | status' show only the modified files, by default:: | |
248 |
|
254 | |||
249 | [defaults] |
|
255 | [defaults] | |
250 | log = -v |
|
256 | log = -v | |
@@ -253,57 +259,59 b" status' show only the modified files, by" | |||||
253 | The actual commands, instead of their aliases, must be used when |
|
259 | The actual commands, instead of their aliases, must be used when | |
254 | defining command defaults. The command defaults will also be applied |
|
260 | defining command defaults. The command defaults will also be applied | |
255 | to the aliases of the commands defined. |
|
261 | to the aliases of the commands defined. | |
256 | -- |
|
262 | ||
|
263 | ||||
|
264 | ``diff`` | |||
|
265 | """""""" | |||
257 |
|
266 | |||
258 | [[diff]] |
|
267 | Settings used when displaying diffs. They are all Boolean and | |
259 | diff:: |
|
268 | defaults to False. | |
260 | Settings used when displaying diffs. They are all Boolean and |
|
269 | ||
261 | defaults to False. |
|
270 | ``git`` | |
262 | git;; |
|
|||
263 | Use git extended diff format. |
|
271 | Use git extended diff format. | |
264 |
|
|
272 | ``nodates`` | |
265 | Don't include dates in diff headers. |
|
273 | Don't include dates in diff headers. | |
266 |
|
|
274 | ``showfunc`` | |
267 | Show which function each change is in. |
|
275 | Show which function each change is in. | |
268 |
|
|
276 | ``ignorews`` | |
269 | Ignore white space when comparing lines. |
|
277 | Ignore white space when comparing lines. | |
270 |
|
|
278 | ``ignorewsamount`` | |
271 | Ignore changes in the amount of white space. |
|
279 | Ignore changes in the amount of white space. | |
272 |
|
|
280 | ``ignoreblanklines`` | |
273 | Ignore changes whose lines are all blank. |
|
281 | Ignore changes whose lines are all blank. | |
274 |
|
282 | |||
275 | [[email]] |
|
283 | ``email`` | |
276 | email:: |
|
284 | """"""""" | |
277 |
|
|
285 | Settings for extensions that send email messages. | |
278 | from;; |
|
286 | ||
|
287 | ``from`` | |||
279 | Optional. Email address to use in "From" header and SMTP envelope |
|
288 | Optional. Email address to use in "From" header and SMTP envelope | |
280 | of outgoing messages. |
|
289 | of outgoing messages. | |
281 | to;; |
|
290 | ``to`` | |
282 | Optional. Comma-separated list of recipients' email addresses. |
|
291 | Optional. Comma-separated list of recipients' email addresses. | |
283 | cc;; |
|
292 | ``cc`` | |
284 | Optional. Comma-separated list of carbon copy recipients' |
|
293 | Optional. Comma-separated list of carbon copy recipients' | |
285 | email addresses. |
|
294 | email addresses. | |
286 | bcc;; |
|
295 | ``bcc`` | |
287 | Optional. Comma-separated list of blind carbon copy recipients' |
|
296 | Optional. Comma-separated list of blind carbon copy recipients' | |
288 | email addresses. Cannot be set interactively. |
|
297 | email addresses. Cannot be set interactively. | |
289 |
|
|
298 | ``method`` | |
290 | Optional. Method to use to send email messages. If value is "smtp" |
|
299 | Optional. Method to use to send email messages. If value is "smtp" | |
291 | (default), use SMTP (see section "[smtp]" for configuration). |
|
300 | (default), use SMTP (see section "[smtp]" for configuration). | |
292 | Otherwise, use as name of program to run that acts like sendmail |
|
301 | Otherwise, use as name of program to run that acts like sendmail | |
293 | (takes "-f" option for sender, list of recipients on command line, |
|
302 | (takes "-f" option for sender, list of recipients on command line, | |
294 | message on stdin). Normally, setting this to "sendmail" or |
|
303 | message on stdin). Normally, setting this to "sendmail" or | |
295 | "/usr/sbin/sendmail" is enough to use sendmail to send messages. |
|
304 | "/usr/sbin/sendmail" is enough to use sendmail to send messages. | |
296 |
|
|
305 | ``charsets`` | |
297 | Optional. Comma-separated list of character sets considered |
|
306 | Optional. Comma-separated list of character sets considered | |
298 | convenient for recipients. Addresses, headers, and parts not |
|
307 | convenient for recipients. Addresses, headers, and parts not | |
299 | containing patches of outgoing messages will be encoded in the |
|
308 | containing patches of outgoing messages will be encoded in the | |
300 | first character set to which conversion from local encoding |
|
309 | first character set to which conversion from local encoding | |
301 | (`$HGENCODING`, `ui.fallbackencoding`) succeeds. If correct |
|
310 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct | |
302 | conversion fails, the text in question is sent as is. Defaults to |
|
311 | conversion fails, the text in question is sent as is. Defaults to | |
303 | empty (explicit) list. |
|
312 | empty (explicit) list. | |
304 | + |
|
313 | ||
305 | -- |
|
314 | Order of outgoing email character sets:: | |
306 | Order of outgoing email character sets: |
|
|||
307 |
|
315 | |||
308 | us-ascii always first, regardless of settings |
|
316 | us-ascii always first, regardless of settings | |
309 | email.charsets in order given by user |
|
317 | email.charsets in order given by user | |
@@ -311,7 +319,7 b' Order of outgoing email character sets:' | |||||
311 | $HGENCODING if not in email.charsets |
|
319 | $HGENCODING if not in email.charsets | |
312 | utf-8 always last, regardless of settings |
|
320 | utf-8 always last, regardless of settings | |
313 |
|
321 | |||
314 | Email example: |
|
322 | Email example:: | |
315 |
|
323 | |||
316 | [email] |
|
324 | [email] | |
317 | from = Joseph User <joe.user@example.com> |
|
325 | from = Joseph User <joe.user@example.com> | |
@@ -319,40 +327,40 b' Email example:' | |||||
319 | # charsets for western Europeans |
|
327 | # charsets for western Europeans | |
320 | # us-ascii, utf-8 omitted, as they are tried first and last |
|
328 | # us-ascii, utf-8 omitted, as they are tried first and last | |
321 | charsets = iso-8859-1, iso-8859-15, windows-1252 |
|
329 | charsets = iso-8859-1, iso-8859-15, windows-1252 | |
322 | -- |
|
330 | ||
|
331 | ||||
|
332 | ``extensions`` | |||
|
333 | """""""""""""" | |||
323 |
|
334 | |||
324 | [[extensions]] |
|
335 | Mercurial has an extension mechanism for adding new features. To | |
325 | extensions:: |
|
336 | enable an extension, create an entry for it in this section. | |
326 | Mercurial has an extension mechanism for adding new features. To |
|
337 | ||
327 | enable an extension, create an entry for it in this section. |
|
|||
328 | + |
|
|||
329 | -- |
|
|||
330 | If you know that the extension is already in Python's search path, |
|
338 | If you know that the extension is already in Python's search path, | |
331 | you can give the name of the module, followed by "`=`", with nothing |
|
339 | you can give the name of the module, followed by "``=``", with nothing | |
332 | after the "`=`". |
|
340 | after the "``=``". | |
333 |
|
341 | |||
334 | Otherwise, give a name that you choose, followed by "`=`", followed by |
|
342 | Otherwise, give a name that you choose, followed by "``=``", followed by | |
335 | the path to the "`.py`" file (including the file name extension) that |
|
343 | the path to the "``.py``" file (including the file name extension) that | |
336 | defines the extension. |
|
344 | defines the extension. | |
337 |
|
345 | |||
338 | To explicitly disable an extension that is enabled in an hgrc of |
|
346 | To explicitly disable an extension that is enabled in an hgrc of | |
339 | broader scope, prepend its path with "`!`", as in |
|
347 | broader scope, prepend its path with "``!``", as in | |
340 | "`hgext.foo = !/ext/path`" or "`hgext.foo = !`" when path is not |
|
348 | "``hgext.foo = !/ext/path``" or "``hgext.foo = !``" when path is not | |
341 | supplied. |
|
349 | supplied. | |
342 |
|
350 | |||
343 | Example for `~/.hgrc`: |
|
351 | Example for ``~/.hgrc``:: | |
344 |
|
352 | |||
345 | [extensions] |
|
353 | [extensions] | |
346 | # (the mq extension will get loaded from Mercurial's path) |
|
354 | # (the mq extension will get loaded from Mercurial's path) | |
347 | hgext.mq = |
|
355 | hgext.mq = | |
348 | # (this extension will get loaded from the file specified) |
|
356 | # (this extension will get loaded from the file specified) | |
349 | myfeature = ~/.hgext/myfeature.py |
|
357 | myfeature = ~/.hgext/myfeature.py | |
350 | -- |
|
358 | ||
351 |
|
359 | |||
352 |
|
|
360 | ``format`` | |
353 | format:: |
|
361 | """""""""" | |
354 |
|
362 | |||
355 |
|
|
363 | ``usestore`` | |
356 | Enable or disable the "store" repository format which improves |
|
364 | Enable or disable the "store" repository format which improves | |
357 | compatibility with systems that fold case or otherwise mangle |
|
365 | compatibility with systems that fold case or otherwise mangle | |
358 | filenames. Enabled by default. Disabling this option will allow |
|
366 | filenames. Enabled by default. Disabling this option will allow | |
@@ -360,7 +368,7 b' format::' | |||||
360 | compatibility and ensures that the on-disk format of newly created |
|
368 | compatibility and ensures that the on-disk format of newly created | |
361 | repositories will be compatible with Mercurial before version 0.9.4. |
|
369 | repositories will be compatible with Mercurial before version 0.9.4. | |
362 |
|
370 | |||
363 |
|
|
371 | ``usefncache`` | |
364 | Enable or disable the "fncache" repository format which enhances |
|
372 | Enable or disable the "fncache" repository format which enhances | |
365 | the "store" repository format (which has to be enabled to use |
|
373 | the "store" repository format (which has to be enabled to use | |
366 | fncache) to allow longer filenames and avoids using Windows |
|
374 | fncache) to allow longer filenames and avoids using Windows | |
@@ -368,26 +376,27 b' format::' | |||||
368 | option ensures that the on-disk format of newly created |
|
376 | option ensures that the on-disk format of newly created | |
369 | repositories will be compatible with Mercurial before version 1.1. |
|
377 | repositories will be compatible with Mercurial before version 1.1. | |
370 |
|
378 | |||
371 |
|
|
379 | ``merge-patterns`` | |
372 | merge-patterns:: |
|
380 | """""""""""""""""" | |
373 | This section specifies merge tools to associate with particular file |
|
381 | ||
374 | patterns. Tools matched here will take precedence over the default |
|
382 | This section specifies merge tools to associate with particular file | |
375 | merge tool. Patterns are globs by default, rooted at the repository |
|
383 | patterns. Tools matched here will take precedence over the default | |
376 | root. |
|
384 | merge tool. Patterns are globs by default, rooted at the repository | |
377 | + |
|
385 | root. | |
378 | Example: |
|
386 | ||
379 | + |
|
387 | Example:: | |
|
388 | ||||
380 | [merge-patterns] |
|
389 | [merge-patterns] | |
381 | **.c = kdiff3 |
|
390 | **.c = kdiff3 | |
382 | **.jpg = myimgmerge |
|
391 | **.jpg = myimgmerge | |
383 |
|
392 | |||
384 |
|
|
393 | ``merge-tools`` | |
385 | merge-tools:: |
|
394 | """"""""""""""" | |
386 | This section configures external merge tools to use for file-level |
|
395 | ||
387 | merges. |
|
396 | This section configures external merge tools to use for file-level | |
388 | + |
|
397 | merges. | |
389 | -- |
|
398 | ||
390 | Example `~/.hgrc`: |
|
399 | Example ``~/.hgrc``:: | |
391 |
|
400 | |||
392 | [merge-tools] |
|
401 | [merge-tools] | |
393 | # Override stock tool location |
|
402 | # Override stock tool location | |
@@ -404,64 +413,63 b' Example `~/.hgrc`:' | |||||
404 |
|
413 | |||
405 | Supported arguments: |
|
414 | Supported arguments: | |
406 |
|
415 | |||
407 |
priority |
|
416 | ``priority`` | |
408 | The priority in which to evaluate this tool. |
|
417 | The priority in which to evaluate this tool. | |
409 | Default: 0. |
|
418 | Default: 0. | |
410 |
executable |
|
419 | ``executable`` | |
411 | Either just the name of the executable or its pathname. |
|
420 | Either just the name of the executable or its pathname. | |
412 | Default: the tool name. |
|
421 | Default: the tool name. | |
413 | args;; |
|
422 | ``args`` | |
414 | The arguments to pass to the tool executable. You can refer to the |
|
423 | The arguments to pass to the tool executable. You can refer to the | |
415 | files being merged as well as the output file through these |
|
424 | files being merged as well as the output file through these | |
416 | variables: `$base`, `$local`, `$other`, `$output`. |
|
425 | variables: ``$base``, ``$local``, ``$other``, ``$output``. | |
417 | Default: `$local $base $other` |
|
426 | Default: ``$local $base $other`` | |
418 |
premerge |
|
427 | ``premerge`` | |
419 | Attempt to run internal non-interactive 3-way merge tool before |
|
428 | Attempt to run internal non-interactive 3-way merge tool before | |
420 | launching external tool. |
|
429 | launching external tool. | |
421 | Default: True |
|
430 | Default: True | |
422 |
binary |
|
431 | ``binary`` | |
423 | This tool can merge binary files. Defaults to False, unless tool |
|
432 | This tool can merge binary files. Defaults to False, unless tool | |
424 | was selected by file pattern match. |
|
433 | was selected by file pattern match. | |
425 |
symlink |
|
434 | ``symlink`` | |
426 | This tool can merge symlinks. Defaults to False, even if tool was |
|
435 | This tool can merge symlinks. Defaults to False, even if tool was | |
427 | selected by file pattern match. |
|
436 | selected by file pattern match. | |
428 |
checkconflicts |
|
437 | ``checkconflicts`` | |
429 | Check whether there are conflicts even though the tool reported |
|
438 | Check whether there are conflicts even though the tool reported | |
430 | success. |
|
439 | success. | |
431 | Default: False |
|
440 | Default: False | |
432 |
checkchanged |
|
441 | ``checkchanged`` | |
433 | Check whether outputs were written even though the tool reported |
|
442 | Check whether outputs were written even though the tool reported | |
434 | success. |
|
443 | success. | |
435 | Default: False |
|
444 | Default: False | |
436 |
fixeol |
|
445 | ``fixeol`` | |
437 | Attempt to fix up EOL changes caused by the merge tool. |
|
446 | Attempt to fix up EOL changes caused by the merge tool. | |
438 | Default: False |
|
447 | Default: False | |
439 | gui;; |
|
448 | ``gui`` | |
440 | This tool requires a graphical interface to run. Default: False |
|
449 | This tool requires a graphical interface to run. Default: False | |
441 |
regkey |
|
450 | ``regkey`` | |
442 | Windows registry key which describes install location of this |
|
451 | Windows registry key which describes install location of this | |
443 | tool. Mercurial will search for this key first under |
|
452 | tool. Mercurial will search for this key first under | |
444 | `HKEY_CURRENT_USER` and then under `HKEY_LOCAL_MACHINE`. |
|
453 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. | |
445 | Default: None |
|
454 | Default: None | |
446 |
regname |
|
455 | ``regname`` | |
447 | Name of value to read from specified registry key. Defaults to the |
|
456 | Name of value to read from specified registry key. Defaults to the | |
448 | unnamed (default) value. |
|
457 | unnamed (default) value. | |
449 |
regappend |
|
458 | ``regappend`` | |
450 | String to append to the value read from the registry, typically |
|
459 | String to append to the value read from the registry, typically | |
451 | the executable name of the tool. |
|
460 | the executable name of the tool. | |
452 | Default: None |
|
461 | Default: None | |
453 | -- |
|
462 | ||
454 |
|
463 | |||
455 | [[hooks]] |
|
464 | ``hooks`` | |
456 | hooks:: |
|
465 | """"""""" | |
457 |
|
|
466 | Commands or Python functions that get automatically executed by | |
458 |
|
|
467 | various actions such as starting or finishing a commit. Multiple | |
459 |
|
|
468 | hooks can be run for the same action by appending a suffix to the | |
460 |
|
|
469 | action. Overriding a site-wide hook can be done by changing its | |
461 |
|
|
470 | value or setting it to an empty string. | |
462 | + |
|
471 | ||
463 | -- |
|
472 | Example ``.hg/hgrc``:: | |
464 | Example `.hg/hgrc`: |
|
|||
465 |
|
473 | |||
466 | [hooks] |
|
474 | [hooks] | |
467 | # do not use the site-wide hook |
|
475 | # do not use the site-wide hook | |
@@ -473,84 +481,84 b' Most hooks are run with environment vari' | |||||
473 | additional information. For each hook below, the environment |
|
481 | additional information. For each hook below, the environment | |
474 | variables it is passed are listed with names of the form "$HG_foo". |
|
482 | variables it is passed are listed with names of the form "$HG_foo". | |
475 |
|
483 | |||
476 |
changegroup |
|
484 | ``changegroup`` | |
477 | Run after a changegroup has been added via push, pull or unbundle. |
|
485 | Run after a changegroup has been added via push, pull or unbundle. | |
478 | ID of the first new changeset is in `$HG_NODE`. URL from which |
|
486 | ID of the first new changeset is in ``$HG_NODE``. URL from which | |
479 | changes came is in `$HG_URL`. |
|
487 | changes came is in ``$HG_URL``. | |
480 |
commit |
|
488 | ``commit`` | |
481 | Run after a changeset has been created in the local repository. ID |
|
489 | Run after a changeset has been created in the local repository. ID | |
482 | of the newly created changeset is in `$HG_NODE`. Parent changeset |
|
490 | of the newly created changeset is in ``$HG_NODE``. Parent changeset | |
483 | IDs are in `$HG_PARENT1` and `$HG_PARENT2`. |
|
491 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
484 |
incoming |
|
492 | ``incoming`` | |
485 | Run after a changeset has been pulled, pushed, or unbundled into |
|
493 | Run after a changeset has been pulled, pushed, or unbundled into | |
486 | the local repository. The ID of the newly arrived changeset is in |
|
494 | the local repository. The ID of the newly arrived changeset is in | |
487 | `$HG_NODE`. URL that was source of changes came is in `$HG_URL`. |
|
495 | ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``. | |
488 |
outgoing |
|
496 | ``outgoing`` | |
489 | Run after sending changes from local repository to another. ID of |
|
497 | Run after sending changes from local repository to another. ID of | |
490 | first changeset sent is in `$HG_NODE`. Source of operation is in |
|
498 | first changeset sent is in ``$HG_NODE``. Source of operation is in | |
491 | `$HG_SOURCE`; see "preoutgoing" hook for description. |
|
499 | ``$HG_SOURCE``; see "preoutgoing" hook for description. | |
492 |
post-<command> |
|
500 | ``post-<command>`` | |
493 | Run after successful invocations of the associated command. The |
|
501 | Run after successful invocations of the associated command. The | |
494 | contents of the command line are passed as `$HG_ARGS` and the result |
|
502 | contents of the command line are passed as ``$HG_ARGS`` and the result | |
495 | code in `$HG_RESULT`. Hook failure is ignored. |
|
503 | code in ``$HG_RESULT``. Hook failure is ignored. | |
496 |
pre-<command> |
|
504 | ``pre-<command>`` | |
497 | Run before executing the associated command. The contents of the |
|
505 | Run before executing the associated command. The contents of the | |
498 | command line are passed as `$HG_ARGS`. If the hook returns failure, |
|
506 | command line are passed as ``$HG_ARGS``. If the hook returns failure, | |
499 | the command doesn't execute and Mercurial returns the failure |
|
507 | the command doesn't execute and Mercurial returns the failure | |
500 | code. |
|
508 | code. | |
501 |
prechangegroup |
|
509 | ``prechangegroup`` | |
502 | Run before a changegroup is added via push, pull or unbundle. Exit |
|
510 | Run before a changegroup is added via push, pull or unbundle. Exit | |
503 | status 0 allows the changegroup to proceed. Non-zero status will |
|
511 | status 0 allows the changegroup to proceed. Non-zero status will | |
504 | cause the push, pull or unbundle to fail. URL from which changes |
|
512 | cause the push, pull or unbundle to fail. URL from which changes | |
505 | will come is in `$HG_URL`. |
|
513 | will come is in ``$HG_URL``. | |
506 |
precommit |
|
514 | ``precommit`` | |
507 | Run before starting a local commit. Exit status 0 allows the |
|
515 | Run before starting a local commit. Exit status 0 allows the | |
508 | commit to proceed. Non-zero status will cause the commit to fail. |
|
516 | commit to proceed. Non-zero status will cause the commit to fail. | |
509 | Parent changeset IDs are in `$HG_PARENT1` and `$HG_PARENT2`. |
|
517 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
510 |
preoutgoing |
|
518 | ``preoutgoing`` | |
511 | Run before collecting changes to send from the local repository to |
|
519 | Run before collecting changes to send from the local repository to | |
512 | another. Non-zero status will cause failure. This lets you prevent |
|
520 | another. Non-zero status will cause failure. This lets you prevent | |
513 | pull over HTTP or SSH. Also prevents against local pull, push |
|
521 | pull over HTTP or SSH. Also prevents against local pull, push | |
514 | (outbound) or bundle commands, but not effective, since you can |
|
522 | (outbound) or bundle commands, but not effective, since you can | |
515 | just copy files instead then. Source of operation is in |
|
523 | just copy files instead then. Source of operation is in | |
516 | `$HG_SOURCE`. If "serve", operation is happening on behalf of remote |
|
524 | ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote | |
517 | SSH or HTTP repository. If "push", "pull" or "bundle", operation |
|
525 | SSH or HTTP repository. If "push", "pull" or "bundle", operation | |
518 | is happening on behalf of repository on same system. |
|
526 | is happening on behalf of repository on same system. | |
519 |
pretag |
|
527 | ``pretag`` | |
520 | Run before creating a tag. Exit status 0 allows the tag to be |
|
528 | Run before creating a tag. Exit status 0 allows the tag to be | |
521 | created. Non-zero status will cause the tag to fail. ID of |
|
529 | created. Non-zero status will cause the tag to fail. ID of | |
522 | changeset to tag is in `$HG_NODE`. Name of tag is in `$HG_TAG`. Tag is |
|
530 | changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is | |
523 | local if `$HG_LOCAL=1`, in repository if `$HG_LOCAL=0`. |
|
531 | local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. | |
524 |
pretxnchangegroup |
|
532 | ``pretxnchangegroup`` | |
525 | Run after a changegroup has been added via push, pull or unbundle, |
|
533 | Run after a changegroup has been added via push, pull or unbundle, | |
526 | but before the transaction has been committed. Changegroup is |
|
534 | but before the transaction has been committed. Changegroup is | |
527 | visible to hook program. This lets you validate incoming changes |
|
535 | visible to hook program. This lets you validate incoming changes | |
528 | before accepting them. Passed the ID of the first new changeset in |
|
536 | before accepting them. Passed the ID of the first new changeset in | |
529 | `$HG_NODE`. Exit status 0 allows the transaction to commit. Non-zero |
|
537 | ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero | |
530 | status will cause the transaction to be rolled back and the push, |
|
538 | status will cause the transaction to be rolled back and the push, | |
531 | pull or unbundle will fail. URL that was source of changes is in |
|
539 | pull or unbundle will fail. URL that was source of changes is in | |
532 | `$HG_URL`. |
|
540 | ``$HG_URL``. | |
533 |
pretxncommit |
|
541 | ``pretxncommit`` | |
534 | Run after a changeset has been created but the transaction not yet |
|
542 | Run after a changeset has been created but the transaction not yet | |
535 | committed. Changeset is visible to hook program. This lets you |
|
543 | committed. Changeset is visible to hook program. This lets you | |
536 | validate commit message and changes. Exit status 0 allows the |
|
544 | validate commit message and changes. Exit status 0 allows the | |
537 | commit to proceed. Non-zero status will cause the transaction to |
|
545 | commit to proceed. Non-zero status will cause the transaction to | |
538 | be rolled back. ID of changeset is in `$HG_NODE`. Parent changeset |
|
546 | be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset | |
539 | IDs are in `$HG_PARENT1` and `$HG_PARENT2`. |
|
547 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
540 |
preupdate |
|
548 | ``preupdate`` | |
541 | Run before updating the working directory. Exit status 0 allows |
|
549 | Run before updating the working directory. Exit status 0 allows | |
542 | the update to proceed. Non-zero status will prevent the update. |
|
550 | the update to proceed. Non-zero status will prevent the update. | |
543 | Changeset ID of first new parent is in `$HG_PARENT1`. If merge, ID |
|
551 | Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID | |
544 | of second new parent is in `$HG_PARENT2`. |
|
552 | of second new parent is in ``$HG_PARENT2``. | |
545 | tag;; |
|
553 | ``tag`` | |
546 | Run after a tag is created. ID of tagged changeset is in `$HG_NODE`. |
|
554 | Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``. | |
547 | Name of tag is in `$HG_TAG`. Tag is local if `$HG_LOCAL=1`, in |
|
555 | Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in | |
548 | repository if `$HG_LOCAL=0`. |
|
556 | repository if ``$HG_LOCAL=0``. | |
549 |
update |
|
557 | ``update`` | |
550 | Run after updating the working directory. Changeset ID of first |
|
558 | Run after updating the working directory. Changeset ID of first | |
551 | new parent is in `$HG_PARENT1`. If merge, ID of second new parent is |
|
559 | new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is | |
552 | in `$HG_PARENT2`. If the update succeeded, `$HG_ERROR=0`. If the |
|
560 | in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the | |
553 | update failed (e.g. because conflicts not resolved), `$HG_ERROR=1`. |
|
561 | update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``. | |
554 |
|
562 | |||
555 | NOTE: it is generally better to use standard hooks rather than the |
|
563 | NOTE: it is generally better to use standard hooks rather than the | |
556 | generic pre- and post- command hooks as they are guaranteed to be |
|
564 | generic pre- and post- command hooks as they are guaranteed to be | |
@@ -559,11 +567,11 b' Also, hooks like "commit" will be called' | |||||
559 | generate a commit (e.g. tag) and not just the commit command. |
|
567 | generate a commit (e.g. tag) and not just the commit command. | |
560 |
|
568 | |||
561 | NOTE: Environment variables with empty values may not be passed to |
|
569 | NOTE: Environment variables with empty values may not be passed to | |
562 | hooks on platforms such as Windows. As an example, `$HG_PARENT2` will |
|
570 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` will | |
563 | have an empty value under Unix-like platforms for non-merge |
|
571 | have an empty value under Unix-like platforms for non-merge | |
564 | changesets, while it will not be available at all under Windows. |
|
572 | changesets, while it will not be available at all under Windows. | |
565 |
|
573 | |||
566 | The syntax for Python hooks is as follows: |
|
574 | The syntax for Python hooks is as follows:: | |
567 |
|
575 | |||
568 | hookname = python:modulename.submodule.callable |
|
576 | hookname = python:modulename.submodule.callable | |
569 | hookname = python:/path/to/python/module.py:callable |
|
577 | hookname = python:/path/to/python/module.py:callable | |
@@ -573,101 +581,111 b' called with at least three keyword argum' | |||||
573 | "ui"), a repository object (keyword "repo"), and a "hooktype" |
|
581 | "ui"), a repository object (keyword "repo"), and a "hooktype" | |
574 | keyword that tells what kind of hook is used. Arguments listed as |
|
582 | keyword that tells what kind of hook is used. Arguments listed as | |
575 | environment variables above are passed as keyword arguments, with no |
|
583 | environment variables above are passed as keyword arguments, with no | |
576 | "HG_" prefix, and names in lower case. |
|
584 | "``HG_``" prefix, and names in lower case. | |
577 |
|
585 | |||
578 | If a Python hook returns a "true" value or raises an exception, this |
|
586 | If a Python hook returns a "true" value or raises an exception, this | |
579 | is treated as a failure. |
|
587 | is treated as a failure. | |
580 | -- |
|
588 | ||
581 |
|
589 | |||
582 |
|
|
590 | ``http_proxy`` | |
583 | http_proxy:: |
|
591 | """""""""""""" | |
584 |
|
|
592 | Used to access web-based Mercurial repositories through a HTTP | |
585 |
|
|
593 | proxy. | |
586 | host;; |
|
594 | ||
|
595 | ``host`` | |||
587 | Host name and (optional) port of the proxy server, for example |
|
596 | Host name and (optional) port of the proxy server, for example | |
588 | "myproxy:8000". |
|
597 | "myproxy:8000". | |
589 | no;; |
|
598 | ``no`` | |
590 | Optional. Comma-separated list of host names that should bypass |
|
599 | Optional. Comma-separated list of host names that should bypass | |
591 | the proxy. |
|
600 | the proxy. | |
592 |
|
|
601 | ``passwd`` | |
593 | Optional. Password to authenticate with at the proxy server. |
|
602 | Optional. Password to authenticate with at the proxy server. | |
594 | user;; |
|
603 | ``user`` | |
595 | Optional. User name to authenticate with at the proxy server. |
|
604 | Optional. User name to authenticate with at the proxy server. | |
596 |
|
605 | |||
597 | [[smtp]] |
|
606 | ``smtp`` | |
598 | smtp:: |
|
607 | """""""" | |
599 |
|
|
608 | Configuration for extensions that need to send email messages. | |
600 | host;; |
|
609 | ||
|
610 | ``host`` | |||
601 | Host name of mail server, e.g. "mail.example.com". |
|
611 | Host name of mail server, e.g. "mail.example.com". | |
602 | port;; |
|
612 | ``port`` | |
603 | Optional. Port to connect to on mail server. Default: 25. |
|
613 | Optional. Port to connect to on mail server. Default: 25. | |
604 | tls;; |
|
614 | ``tls`` | |
605 | Optional. Whether to connect to mail server using TLS. True or |
|
615 | Optional. Whether to connect to mail server using TLS. True or | |
606 | False. Default: False. |
|
616 | False. Default: False. | |
607 |
|
|
617 | ``username`` | |
608 | Optional. User name to authenticate to SMTP server with. If |
|
618 | Optional. User name to authenticate to SMTP server with. If | |
609 | username is specified, password must also be specified. |
|
619 | username is specified, password must also be specified. | |
610 | Default: none. |
|
620 | Default: none. | |
611 |
|
|
621 | ``password`` | |
612 | Optional. Password to authenticate to SMTP server with. If |
|
622 | Optional. Password to authenticate to SMTP server with. If | |
613 | username is specified, password must also be specified. |
|
623 | username is specified, password must also be specified. | |
614 | Default: none. |
|
624 | Default: none. | |
615 |
|
|
625 | ``local_hostname`` | |
616 | Optional. It's the hostname that the sender can use to identify |
|
626 | Optional. It's the hostname that the sender can use to identify | |
617 | itself to the MTA. |
|
627 | itself to the MTA. | |
618 |
|
628 | |||
619 | [[patch]] |
|
629 | ||
620 |
|
|
630 | ``patch`` | |
621 | Settings used when applying patches, for instance through the 'import' |
|
631 | """"""""" | |
622 | command or with Mercurial Queues extension. |
|
632 | Settings used when applying patches, for instance through the 'import' | |
623 | eol;; |
|
633 | command or with Mercurial Queues extension. | |
|
634 | ||||
|
635 | ``eol`` | |||
624 | When set to 'strict' patch content and patched files end of lines |
|
636 | When set to 'strict' patch content and patched files end of lines | |
625 | are preserved. When set to 'lf' or 'crlf', both files end of lines |
|
637 | are preserved. When set to 'lf' or 'crlf', both files end of lines | |
626 | are ignored when patching and the result line endings are |
|
638 | are ignored when patching and the result line endings are | |
627 | normalized to either LF (Unix) or CRLF (Windows). |
|
639 | normalized to either LF (Unix) or CRLF (Windows). | |
628 | Default: strict. |
|
640 | Default: strict. | |
629 |
|
641 | |||
630 | [[paths]] |
|
642 | ||
631 |
|
|
643 | ``paths`` | |
632 | Assigns symbolic names to repositories. The left side is the |
|
644 | """"""""" | |
633 | symbolic name, and the right gives the directory or URL that is the |
|
645 | Assigns symbolic names to repositories. The left side is the | |
634 | location of the repository. Default paths can be declared by setting |
|
646 | symbolic name, and the right gives the directory or URL that is the | |
635 | the following entries. |
|
647 | location of the repository. Default paths can be declared by setting | |
636 | default;; |
|
648 | the following entries. | |
|
649 | ||||
|
650 | ``default`` | |||
637 | Directory or URL to use when pulling if no source is specified. |
|
651 | Directory or URL to use when pulling if no source is specified. | |
638 | Default is set to repository from which the current repository was |
|
652 | Default is set to repository from which the current repository was | |
639 | cloned. |
|
653 | cloned. | |
640 |
|
|
654 | ``default-push`` | |
641 | Optional. Directory or URL to use when pushing if no destination |
|
655 | Optional. Directory or URL to use when pushing if no destination | |
642 | is specified. |
|
656 | is specified. | |
643 |
|
657 | |||
644 | [[profiling]] |
|
658 | ||
645 |
profiling |
|
659 | ``profiling`` | |
646 | Specifies profiling format and file output. In this section |
|
660 | """"""""""""" | |
647 | description, 'profiling data' stands for the raw data collected |
|
661 | Specifies profiling format and file output. In this section | |
648 | during profiling, while 'profiling report' stands for a statistical |
|
662 | description, 'profiling data' stands for the raw data collected | |
649 | text report generated from the profiling data. The profiling is done |
|
663 | during profiling, while 'profiling report' stands for a statistical | |
650 | using lsprof. |
|
664 | text report generated from the profiling data. The profiling is done | |
651 | format;; |
|
665 | using lsprof. | |
|
666 | ||||
|
667 | ``format`` | |||
652 | Profiling format. |
|
668 | Profiling format. | |
653 | Default: text. |
|
669 | Default: text. | |
654 | text;; |
|
670 | ||
|
671 | ``text`` | |||
655 | Generate a profiling report. When saving to a file, it should be |
|
672 | Generate a profiling report. When saving to a file, it should be | |
656 | noted that only the report is saved, and the profiling data is |
|
673 | noted that only the report is saved, and the profiling data is | |
657 | not kept. |
|
674 | not kept. | |
658 |
kcachegrind |
|
675 | ``kcachegrind`` | |
659 | Format profiling data for kcachegrind use: when saving to a |
|
676 | Format profiling data for kcachegrind use: when saving to a | |
660 | file, the generated file can directly be loaded into |
|
677 | file, the generated file can directly be loaded into | |
661 | kcachegrind. |
|
678 | kcachegrind. | |
662 |
|
|
679 | ``output`` | |
663 | File path where profiling data or report should be saved. If the |
|
680 | File path where profiling data or report should be saved. If the | |
664 | file exists, it is replaced. Default: None, data is printed on |
|
681 | file exists, it is replaced. Default: None, data is printed on | |
665 | stderr |
|
682 | stderr | |
666 |
|
683 | |||
667 |
|
|
684 | ``server`` | |
668 | server:: |
|
685 | """""""""" | |
669 |
|
|
686 | Controls generic server settings. | |
670 | uncompressed;; |
|
687 | ||
|
688 | ``uncompressed`` | |||
671 | Whether to allow clients to clone a repository using the |
|
689 | Whether to allow clients to clone a repository using the | |
672 | uncompressed streaming protocol. This transfers about 40% more |
|
690 | uncompressed streaming protocol. This transfers about 40% more | |
673 | data than a regular clone, but uses less memory and CPU on both |
|
691 | data than a regular clone, but uses less memory and CPU on both | |
@@ -677,174 +695,175 b' server::' | |||||
677 | about 6 Mbps), uncompressed streaming is slower, because of the |
|
695 | about 6 Mbps), uncompressed streaming is slower, because of the | |
678 | extra data transfer overhead. Default is False. |
|
696 | extra data transfer overhead. Default is False. | |
679 |
|
697 | |||
680 | [[trusted]] |
|
698 | ||
681 |
trusted |
|
699 | ``trusted`` | |
682 | For security reasons, Mercurial will not use the settings in the |
|
700 | """"""""""" | |
683 | `.hg/hgrc` file from a repository if it doesn't belong to a trusted |
|
701 | For security reasons, Mercurial will not use the settings in the | |
684 | user or to a trusted group. The main exception is the web interface, |
|
702 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted | |
685 | which automatically uses some safe settings, since it's common to |
|
703 | user or to a trusted group. The main exception is the web interface, | |
686 | serve repositories from different users. |
|
704 | which automatically uses some safe settings, since it's common to | |
687 | + |
|
705 | serve repositories from different users. | |
688 | -- |
|
706 | ||
689 | This section specifies what users and groups are trusted. The |
|
707 | This section specifies what users and groups are trusted. The | |
690 | current user is always trusted. To trust everybody, list a user or a |
|
708 | current user is always trusted. To trust everybody, list a user or a | |
691 | group with name "`*`". |
|
709 | group with name "``*``". | |
692 |
|
710 | |||
693 |
|
|
711 | ``users`` | |
694 | Comma-separated list of trusted users. |
|
712 | Comma-separated list of trusted users. | |
695 |
groups |
|
713 | ``groups`` | |
696 | Comma-separated list of trusted groups. |
|
714 | Comma-separated list of trusted groups. | |
697 | -- |
|
715 | ||
698 |
|
716 | |||
699 | [[ui]] |
|
717 | ``ui`` | |
700 | ui:: |
|
718 | """""" | |
701 | User interface controls. |
|
719 | ||
702 | + |
|
720 | User interface controls. | |
703 | -- |
|
721 | ||
704 |
|
|
722 | ``archivemeta`` | |
705 | Whether to include the .hg_archival.txt file containing meta data |
|
723 | Whether to include the .hg_archival.txt file containing meta data | |
706 | (hashes for the repository base and for tip) in archives created |
|
724 | (hashes for the repository base and for tip) in archives created | |
707 | by the hg archive command or downloaded via hgweb. |
|
725 | by the hg archive command or downloaded via hgweb. | |
708 | Default is true. |
|
726 | Default is true. | |
709 |
|
|
727 | ``askusername`` | |
710 | Whether to prompt for a username when committing. If True, and |
|
728 | Whether to prompt for a username when committing. If True, and | |
711 | neither `$HGUSER` nor `$EMAIL` has been specified, then the user will |
|
729 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will | |
712 | be prompted to enter a username. If no username is entered, the |
|
730 | be prompted to enter a username. If no username is entered, the | |
713 | default USER@HOST is used instead. |
|
731 | default USER@HOST is used instead. | |
714 | Default is False. |
|
732 | Default is False. | |
715 | debug;; |
|
733 | ``debug`` | |
716 | Print debugging information. True or False. Default is False. |
|
734 | Print debugging information. True or False. Default is False. | |
717 |
|
|
735 | ``editor`` | |
718 | The editor to use during a commit. Default is `$EDITOR` or "vi". |
|
736 | The editor to use during a commit. Default is ``$EDITOR`` or "vi". | |
719 |
|
|
737 | ``fallbackencoding`` | |
720 | Encoding to try if it's not possible to decode the changelog using |
|
738 | Encoding to try if it's not possible to decode the changelog using | |
721 | UTF-8. Default is ISO-8859-1. |
|
739 | UTF-8. Default is ISO-8859-1. | |
722 |
|
|
740 | ``ignore`` | |
723 | A file to read per-user ignore patterns from. This file should be |
|
741 | A file to read per-user ignore patterns from. This file should be | |
724 | in the same format as a repository-wide .hgignore file. This |
|
742 | in the same format as a repository-wide .hgignore file. This | |
725 | option supports hook syntax, so if you want to specify multiple |
|
743 | option supports hook syntax, so if you want to specify multiple | |
726 | ignore files, you can do so by setting something like |
|
744 | ignore files, you can do so by setting something like | |
727 | "ignore.other = ~/.hgignore2". For details of the ignore file |
|
745 | "``ignore.other = ~/.hgignore2``". For details of the ignore file | |
728 | format, see the hgignore(5) man page. |
|
746 | format, see the |hgignore(5)|_ man page. | |
729 |
|
|
747 | ``interactive`` | |
730 | Allow to prompt the user. True or False. Default is True. |
|
748 | Allow to prompt the user. True or False. Default is True. | |
731 |
|
|
749 | ``logtemplate`` | |
732 | Template string for commands that print changesets. |
|
750 | Template string for commands that print changesets. | |
733 | merge;; |
|
751 | ``merge`` | |
734 | The conflict resolution program to use during a manual merge. |
|
752 | The conflict resolution program to use during a manual merge. | |
735 | There are some internal tools available: |
|
753 | There are some internal tools available: | |
736 | + |
|
754 | ||
737 |
|
|
755 | ``internal:local`` | |
738 | keep the local version |
|
756 | keep the local version | |
739 |
|
|
757 | ``internal:other`` | |
740 | use the other version |
|
758 | use the other version | |
741 |
|
|
759 | ``internal:merge`` | |
742 | use the internal non-interactive merge tool |
|
760 | use the internal non-interactive merge tool | |
743 |
|
|
761 | ``internal:fail`` | |
744 | fail to merge |
|
762 | fail to merge | |
745 | + |
|
763 | ||
746 | For more information on configuring merge tools see the |
|
764 | For more information on configuring merge tools see the | |
747 | merge-tools section. |
|
765 | merge-tools section. | |
748 |
|
766 | |||
749 | patch;; |
|
767 | ``patch`` | |
750 | command to use to apply patches. Look for 'gpatch' or 'patch' in |
|
768 | command to use to apply patches. Look for 'gpatch' or 'patch' in | |
751 | PATH if unset. |
|
769 | PATH if unset. | |
752 | quiet;; |
|
770 | ``quiet`` | |
753 | Reduce the amount of output printed. True or False. Default is False. |
|
771 | Reduce the amount of output printed. True or False. Default is False. | |
754 |
|
|
772 | ``remotecmd`` | |
755 | remote command to use for clone/push/pull operations. Default is 'hg'. |
|
773 | remote command to use for clone/push/pull operations. Default is 'hg'. | |
756 |
|
|
774 | ``report_untrusted`` | |
757 | Warn if a `.hg/hgrc` file is ignored due to not being owned by a |
|
775 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a | |
758 | trusted user or group. True or False. Default is True. |
|
776 | trusted user or group. True or False. Default is True. | |
759 | slash;; |
|
777 | ``slash`` | |
760 | Display paths using a slash ("`/`") as the path separator. This |
|
778 | Display paths using a slash ("``/``") as the path separator. This | |
761 | only makes a difference on systems where the default path |
|
779 | only makes a difference on systems where the default path | |
762 | separator is not the slash character (e.g. Windows uses the |
|
780 | separator is not the slash character (e.g. Windows uses the | |
763 | backslash character ("`\`")). |
|
781 | backslash character ("``\``")). | |
764 | Default is False. |
|
782 | Default is False. | |
765 | ssh;; |
|
783 | ``ssh`` | |
766 | command to use for SSH connections. Default is 'ssh'. |
|
784 | command to use for SSH connections. Default is 'ssh'. | |
767 |
|
|
785 | ``strict`` | |
768 | Require exact command names, instead of allowing unambiguous |
|
786 | Require exact command names, instead of allowing unambiguous | |
769 | abbreviations. True or False. Default is False. |
|
787 | abbreviations. True or False. Default is False. | |
770 | style;; |
|
788 | ``style`` | |
771 | Name of style to use for command output. |
|
789 | Name of style to use for command output. | |
772 |
|
|
790 | ``timeout`` | |
773 | The timeout used when a lock is held (in seconds), a negative value |
|
791 | The timeout used when a lock is held (in seconds), a negative value | |
774 | means no timeout. Default is 600. |
|
792 | means no timeout. Default is 600. | |
775 |
|
|
793 | ``username`` | |
776 | The committer of a changeset created when running "commit". |
|
794 | The committer of a changeset created when running "commit". | |
777 | Typically a person's name and email address, e.g. "Fred Widget |
|
795 | Typically a person's name and email address, e.g. "Fred Widget | |
778 | <fred@example.com>". Default is `$EMAIL` or username@hostname. If |
|
796 | <fred@example.com>". Default is ``$EMAIL`` or username@hostname. If | |
779 | the username in hgrc is empty, it has to be specified manually or |
|
797 | the username in hgrc is empty, it has to be specified manually or | |
780 | in a different hgrc file (e.g. `$HOME/.hgrc`, if the admin set |
|
798 | in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set | |
781 | "username =" in the system hgrc). |
|
799 | "username =" in the system hgrc). | |
782 |
|
|
800 | ``verbose`` | |
783 | Increase the amount of output printed. True or False. Default is False. |
|
801 | Increase the amount of output printed. True or False. Default is False. | |
784 | -- |
|
802 | ||
785 |
|
803 | |||
786 | [[web]] |
|
804 | ``web`` | |
787 | web:: |
|
805 | """"""" | |
788 |
|
|
806 | Web interface configuration. | |
789 | accesslog;; |
|
807 | ||
|
808 | ``accesslog`` | |||
790 | Where to output the access log. Default is stdout. |
|
809 | Where to output the access log. Default is stdout. | |
791 |
|
|
810 | ``address`` | |
792 | Interface address to bind to. Default is all. |
|
811 | Interface address to bind to. Default is all. | |
793 |
|
|
812 | ``allow_archive`` | |
794 | List of archive format (bz2, gz, zip) allowed for downloading. |
|
813 | List of archive format (bz2, gz, zip) allowed for downloading. | |
795 | Default is empty. |
|
814 | Default is empty. | |
796 |
|
|
815 | ``allowbz2`` | |
797 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository |
|
816 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository | |
798 | revisions. |
|
817 | revisions. | |
799 | Default is false. |
|
818 | Default is false. | |
800 |
|
|
819 | ``allowgz`` | |
801 | (DEPRECATED) Whether to allow .tar.gz downloading of repository |
|
820 | (DEPRECATED) Whether to allow .tar.gz downloading of repository | |
802 | revisions. |
|
821 | revisions. | |
803 | Default is false. |
|
822 | Default is false. | |
804 |
|
|
823 | ``allowpull`` | |
805 | Whether to allow pulling from the repository. Default is true. |
|
824 | Whether to allow pulling from the repository. Default is true. | |
806 |
|
|
825 | ``allow_push`` | |
807 | Whether to allow pushing to the repository. If empty or not set, |
|
826 | Whether to allow pushing to the repository. If empty or not set, | |
808 | push is not allowed. If the special value "`*`", any remote user can |
|
827 | push is not allowed. If the special value "``*``", any remote user can | |
809 | push, including unauthenticated users. Otherwise, the remote user |
|
828 | push, including unauthenticated users. Otherwise, the remote user | |
810 | must have been authenticated, and the authenticated user name must |
|
829 | must have been authenticated, and the authenticated user name must | |
811 | be present in this list (separated by whitespace or ","). The |
|
830 | be present in this list (separated by whitespace or ","). The | |
812 | contents of the allow_push list are examined after the deny_push |
|
831 | contents of the allow_push list are examined after the deny_push | |
813 | list. |
|
832 | list. | |
814 |
|
|
833 | ``allow_read`` | |
815 | If the user has not already been denied repository access due to |
|
834 | If the user has not already been denied repository access due to | |
816 | the contents of deny_read, this list determines whether to grant |
|
835 | the contents of deny_read, this list determines whether to grant | |
817 | repository access to the user. If this list is not empty, and the |
|
836 | repository access to the user. If this list is not empty, and the | |
818 | user is unauthenticated or not present in the list (separated by |
|
837 | user is unauthenticated or not present in the list (separated by | |
819 | whitespace or ","), then access is denied for the user. If the |
|
838 | whitespace or ","), then access is denied for the user. If the | |
820 | list is empty or not set, then access is permitted to all users by |
|
839 | list is empty or not set, then access is permitted to all users by | |
821 | default. Setting allow_read to the special value "`*`" is equivalent |
|
840 | default. Setting allow_read to the special value "``*``" is equivalent | |
822 | to it not being set (i.e. access is permitted to all users). The |
|
841 | to it not being set (i.e. access is permitted to all users). The | |
823 | contents of the allow_read list are examined after the deny_read |
|
842 | contents of the allow_read list are examined after the deny_read | |
824 | list. |
|
843 | list. | |
825 |
|
|
844 | ``allowzip`` | |
826 | (DEPRECATED) Whether to allow .zip downloading of repository |
|
845 | (DEPRECATED) Whether to allow .zip downloading of repository | |
827 | revisions. Default is false. This feature creates temporary files. |
|
846 | revisions. Default is false. This feature creates temporary files. | |
828 |
|
|
847 | ``baseurl`` | |
829 | Base URL to use when publishing URLs in other locations, so |
|
848 | Base URL to use when publishing URLs in other locations, so | |
830 | third-party tools like email notification hooks can construct |
|
849 | third-party tools like email notification hooks can construct | |
831 | URLs. Example: "http://hgserver/repos/" |
|
850 | URLs. Example: "http://hgserver/repos/" | |
832 |
|
|
851 | ``contact`` | |
833 | Name or email address of the person in charge of the repository. |
|
852 | Name or email address of the person in charge of the repository. | |
834 | Defaults to ui.username or `$EMAIL` or "unknown" if unset or empty. |
|
853 | Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty. | |
835 |
|
|
854 | ``deny_push`` | |
836 | Whether to deny pushing to the repository. If empty or not set, |
|
855 | Whether to deny pushing to the repository. If empty or not set, | |
837 | push is not denied. If the special value "`*`", all remote users are |
|
856 | push is not denied. If the special value "``*``", all remote users are | |
838 | denied push. Otherwise, unauthenticated users are all denied, and |
|
857 | denied push. Otherwise, unauthenticated users are all denied, and | |
839 | any authenticated user name present in this list (separated by |
|
858 | any authenticated user name present in this list (separated by | |
840 | whitespace or ",") is also denied. The contents of the deny_push |
|
859 | whitespace or ",") is also denied. The contents of the deny_push | |
841 | list are examined before the allow_push list. |
|
860 | list are examined before the allow_push list. | |
842 |
|
|
861 | ``deny_read`` | |
843 | Whether to deny reading/viewing of the repository. If this list is |
|
862 | Whether to deny reading/viewing of the repository. If this list is | |
844 | not empty, unauthenticated users are all denied, and any |
|
863 | not empty, unauthenticated users are all denied, and any | |
845 | authenticated user name present in this list (separated by |
|
864 | authenticated user name present in this list (separated by | |
846 | whitespace or ",") is also denied access to the repository. If set |
|
865 | whitespace or ",") is also denied access to the repository. If set | |
847 | to the special value "`*`", all remote users are denied access |
|
866 | to the special value "``*``", all remote users are denied access | |
848 | (rarely needed ;). If deny_read is empty or not set, the |
|
867 | (rarely needed ;). If deny_read is empty or not set, the | |
849 | determination of repository access depends on the presence and |
|
868 | determination of repository access depends on the presence and | |
850 | content of the allow_read list (see description). If both |
|
869 | content of the allow_read list (see description). If both | |
@@ -854,44 +873,44 b' web::' | |||||
854 | the list of repositories. The contents of the deny_read list have |
|
873 | the list of repositories. The contents of the deny_read list have | |
855 | priority over (are examined before) the contents of the allow_read |
|
874 | priority over (are examined before) the contents of the allow_read | |
856 | list. |
|
875 | list. | |
857 |
|
|
876 | ``description`` | |
858 | Textual description of the repository's purpose or contents. |
|
877 | Textual description of the repository's purpose or contents. | |
859 | Default is "unknown". |
|
878 | Default is "unknown". | |
860 |
|
|
879 | ``encoding`` | |
861 | Character encoding name. |
|
880 | Character encoding name. | |
862 | Example: "UTF-8" |
|
881 | Example: "UTF-8" | |
863 |
|
|
882 | ``errorlog`` | |
864 | Where to output the error log. Default is stderr. |
|
883 | Where to output the error log. Default is stderr. | |
865 |
|
|
884 | ``hidden`` | |
866 | Whether to hide the repository in the hgwebdir index. |
|
885 | Whether to hide the repository in the hgwebdir index. | |
867 | Default is false. |
|
886 | Default is false. | |
868 | ipv6;; |
|
887 | ``ipv6`` | |
869 | Whether to use IPv6. Default is false. |
|
888 | Whether to use IPv6. Default is false. | |
870 | name;; |
|
889 | ``name`` | |
871 | Repository name to use in the web interface. Default is current |
|
890 | Repository name to use in the web interface. Default is current | |
872 | working directory. |
|
891 | working directory. | |
873 |
|
|
892 | ``maxchanges`` | |
874 | Maximum number of changes to list on the changelog. Default is 10. |
|
893 | Maximum number of changes to list on the changelog. Default is 10. | |
875 |
|
|
894 | ``maxfiles`` | |
876 | Maximum number of files to list per changeset. Default is 10. |
|
895 | Maximum number of files to list per changeset. Default is 10. | |
877 | port;; |
|
896 | ``port`` | |
878 | Port to listen on. Default is 8000. |
|
897 | Port to listen on. Default is 8000. | |
879 |
|
|
898 | ``prefix`` | |
880 | Prefix path to serve from. Default is '' (server root). |
|
899 | Prefix path to serve from. Default is '' (server root). | |
881 |
|
|
900 | ``push_ssl`` | |
882 | Whether to require that inbound pushes be transported over SSL to |
|
901 | Whether to require that inbound pushes be transported over SSL to | |
883 | prevent password sniffing. Default is true. |
|
902 | prevent password sniffing. Default is true. | |
884 |
|
|
903 | ``staticurl`` | |
885 | Base URL to use for static files. If unset, static files (e.g. the |
|
904 | Base URL to use for static files. If unset, static files (e.g. the | |
886 | hgicon.png favicon) will be served by the CGI script itself. Use |
|
905 | hgicon.png favicon) will be served by the CGI script itself. Use | |
887 | this setting to serve them directly with the HTTP server. |
|
906 | this setting to serve them directly with the HTTP server. | |
888 | Example: "http://hgserver/static/" |
|
907 | Example: "http://hgserver/static/" | |
889 |
|
|
908 | ``stripes`` | |
890 | How many lines a "zebra stripe" should span in multiline output. |
|
909 | How many lines a "zebra stripe" should span in multiline output. | |
891 | Default is 1; set to 0 to disable. |
|
910 | Default is 1; set to 0 to disable. | |
892 | style;; |
|
911 | ``style`` | |
893 | Which template map style to use. |
|
912 | Which template map style to use. | |
894 |
|
|
913 | ``templates`` | |
895 | Where to find the HTML templates. Default is install path. |
|
914 | Where to find the HTML templates. Default is install path. | |
896 |
|
915 | |||
897 |
|
916 | |||
@@ -903,7 +922,7 b' Mercurial was written by Matt Mackall <m' | |||||
903 |
|
922 | |||
904 | SEE ALSO |
|
923 | SEE ALSO | |
905 | -------- |
|
924 | -------- | |
906 | hg(1), hgignore(5) |
|
925 | |hg(1)|_, |hgignore(5)|_ | |
907 |
|
926 | |||
908 | COPYING |
|
927 | COPYING | |
909 | ------- |
|
928 | ------- | |
@@ -911,3 +930,5 b' This manual page is copyright 2005 Bryan' | |||||
911 | Mercurial is copyright 2005-2009 Matt Mackall. |
|
930 | Mercurial is copyright 2005-2009 Matt Mackall. | |
912 | Free use of this software is granted under the terms of the GNU General |
|
931 | Free use of this software is granted under the terms of the GNU General | |
913 | Public License (GPL). |
|
932 | Public License (GPL). | |
|
933 | ||||
|
934 | .. include:: common.txt |
@@ -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 |
|
50 | --branchsort convert from parent to child revision when possible, which | |
49 |
means branches are usually converted one after the other. It |
|
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 |
@@ -454,8 +454,9 b' class svn_source(converter_source):' | |||||
454 | # Here/tags/tag.1 discarded as well as its children. |
|
454 | # Here/tags/tag.1 discarded as well as its children. | |
455 | # It happens with tools like cvs2svn. Such tags cannot |
|
455 | # It happens with tools like cvs2svn. Such tags cannot | |
456 | # be represented in mercurial. |
|
456 | # be represented in mercurial. | |
457 | addeds = dict((p, e.copyfrom_path) for p, e |
|
457 | addeds = dict((p, e.copyfrom_path) for p, e | |
458 |
in origpaths.iteritems() |
|
458 | in origpaths.iteritems() | |
|
459 | if e.action == 'A' and e.copyfrom_path) | |||
459 | badroots = set() |
|
460 | badroots = set() | |
460 | for destroot in addeds: |
|
461 | for destroot in addeds: | |
461 | for source, sourcerev, dest in pendings: |
|
462 | for source, sourcerev, dest in pendings: |
@@ -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 |
|
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 |
|
|
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 |
|
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 |
|
|
1533 | head, tail = doc.split('\n', 1) | |
1530 |
ui.write(_('%s extension - %s\n') % (name.split('.')[-1], d |
|
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 |
|
|
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 |
|
|
2792 | M = modified | |
2789 |
|
|
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 |
|
|
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 + |
|
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"), | |
@@ -146,109 +148,110 b' helptable = (' | |||||
146 | repository root. |
|
148 | repository root. | |
147 |
|
149 | |||
148 | To use an extended glob, start a name with "glob:". Globs are rooted at |
|
150 | To use an extended glob, start a name with "glob:". Globs are rooted at | |
149 | the current directory; a glob such as "*.c" will only match files in the |
|
151 | the current directory; a glob such as "``*.c``" will only match files in the | |
150 | current directory ending with ".c". |
|
152 | current directory ending with ".c". | |
151 |
|
153 | |||
152 | The supported glob syntax extensions are "**" to match any string across |
|
154 | The supported glob syntax extensions are "``**``" to match any string across | |
153 | path separators and "{a,b}" to mean "a or b". |
|
155 | path separators and "{a,b}" to mean "a or b". | |
154 |
|
156 | |||
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 |
|
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 |
|
|
230 | - HGUSER (deprecated) | |
228 |
|
|
231 | - hgrc files from the HGRCPATH | |
229 |
|
|
232 | ||
230 |
|
|
233 | - interactive prompt | |
231 |
|
|
234 | - LOGNAME (with '@hostname' appended) | |
232 |
|
235 | |||
233 | (deprecated, use .hgrc) |
|
236 | (deprecated, use .hgrc) | |
234 |
|
237 | |||
235 |
EMAIL |
|
238 | ||
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 | ''')), | |
@@ -359,18 +362,18 b' PYTHONPATH::' | |||||
359 |
|
362 | |||
360 | - author: String. The unmodified author of the changeset. |
|
363 | - author: String. The unmodified author of the changeset. | |
361 | - branches: String. The name of the branch on which the changeset was |
|
364 | - branches: String. The name of the branch on which the changeset was | |
362 |
|
|
365 | committed. Will be empty if the branch name was default. | |
363 | - date: Date information. The date when the changeset was committed. |
|
366 | - date: Date information. The date when the changeset was committed. | |
364 | - desc: String. The text of the changeset description. |
|
367 | - desc: String. The text of the changeset description. | |
365 | - diffstat: String. Statistics of changes with the following format: |
|
368 | - diffstat: String. Statistics of changes with the following format: | |
366 |
|
|
369 | "modified files: +added/-removed lines" | |
367 | - files: List of strings. All files modified, added, or removed by this |
|
370 | - files: List of strings. All files modified, added, or removed by this | |
368 |
|
|
371 | changeset. | |
369 | - file_adds: List of strings. Files added by this changeset. |
|
372 | - file_adds: List of strings. Files added by this changeset. | |
370 | - file_mods: List of strings. Files modified by this changeset. |
|
373 | - file_mods: List of strings. Files modified by this changeset. | |
371 | - file_dels: List of strings. Files removed by this changeset. |
|
374 | - file_dels: List of strings. Files removed by this changeset. | |
372 | - node: String. The changeset identification hash, as a 40-character |
|
375 | - node: String. The changeset identification hash, as a 40-character | |
373 |
|
|
376 | hexadecimal string. | |
374 | - parents: List of strings. The parents of the changeset. |
|
377 | - parents: List of strings. The parents of the changeset. | |
375 | - rev: Integer. The repository-local changeset revision number. |
|
378 | - rev: Integer. The repository-local changeset revision number. | |
376 | - tags: List of strings. Any tags associated with the changeset. |
|
379 | - tags: List of strings. Any tags associated with the changeset. | |
@@ -386,52 +389,51 b' PYTHONPATH::' | |||||
386 | List of filters: |
|
389 | List of filters: | |
387 |
|
390 | |||
388 | - addbreaks: Any text. Add an XHTML "<br />" tag before the end of every |
|
391 | - addbreaks: Any text. Add an XHTML "<br />" tag before the end of every | |
389 |
|
|
392 | line except the last. | |
390 | - age: Date. Returns a human-readable date/time difference between the |
|
393 | - age: Date. Returns a human-readable date/time difference between the | |
391 |
|
|
394 | given date/time and the current date/time. | |
392 | - basename: Any text. Treats the text as a path, and returns the last |
|
395 | - basename: Any text. Treats the text as a path, and returns the last | |
393 |
|
|
396 | component of the path after splitting by the path separator (ignoring | |
394 |
|
|
397 | trailing separators). For example, "foo/bar/baz" becomes "baz" and | |
395 |
|
|
398 | "foo/bar//" becomes "bar". | |
396 | - stripdir: Treat the text as path and strip a directory level, if |
|
399 | - stripdir: Treat the text as path and strip a directory level, if | |
397 |
|
|
400 | possible. For example, "foo" and "foo/bar" becomes "foo". | |
398 | - date: Date. Returns a date in a Unix date format, including the |
|
401 | - date: Date. Returns a date in a Unix date format, including the | |
399 |
|
|
402 | timezone: "Mon Sep 04 15:13:13 2006 0700". | |
400 | - domain: Any text. Finds the first string that looks like an email |
|
403 | - domain: Any text. Finds the first string that looks like an email | |
401 |
|
|
404 | address, and extracts just the domain component. Example: 'User | |
402 |
|
|
405 | <user@example.com>' becomes 'example.com'. | |
403 | - email: Any text. Extracts the first string that looks like an email |
|
406 | - email: Any text. Extracts the first string that looks like an email | |
404 |
|
|
407 | address. Example: 'User <user@example.com>' becomes 'user@example.com'. | |
405 | 'user@example.com'. |
|
|||
406 | - escape: Any text. Replaces the special XML/XHTML characters "&", "<" and |
|
408 | - escape: Any text. Replaces the special XML/XHTML characters "&", "<" and | |
407 |
|
|
409 | ">" with XML entities. | |
408 | - fill68: Any text. Wraps the text to fit in 68 columns. |
|
410 | - fill68: Any text. Wraps the text to fit in 68 columns. | |
409 | - fill76: Any text. Wraps the text to fit in 76 columns. |
|
411 | - fill76: Any text. Wraps the text to fit in 76 columns. | |
410 | - firstline: Any text. Returns the first line of text. |
|
412 | - firstline: Any text. Returns the first line of text. | |
411 | - nonempty: Any text. Returns '(none)' if the string is empty. |
|
413 | - nonempty: Any text. Returns '(none)' if the string is empty. | |
412 | - hgdate: Date. Returns the date as a pair of numbers: "1157407993 25200" |
|
414 | - hgdate: Date. Returns the date as a pair of numbers: "1157407993 25200" | |
413 |
|
|
415 | (Unix timestamp, timezone offset). | |
414 | - isodate: Date. Returns the date in ISO 8601 format. |
|
416 | - isodate: Date. Returns the date in ISO 8601 format. | |
415 | - localdate: Date. Converts a date to local date. |
|
417 | - localdate: Date. Converts a date to local date. | |
416 | - obfuscate: Any text. Returns the input text rendered as a sequence of |
|
418 | - obfuscate: Any text. Returns the input text rendered as a sequence of | |
417 |
|
|
419 | XML entities. | |
418 | - person: Any text. Returns the text before an email address. |
|
420 | - person: Any text. Returns the text before an email address. | |
419 | - rfc822date: Date. Returns a date using the same format used in email |
|
421 | - rfc822date: Date. Returns a date using the same format used in email | |
420 |
|
|
422 | headers. | |
421 | - short: Changeset hash. Returns the short form of a changeset hash, i.e. |
|
423 | - short: Changeset hash. Returns the short form of a changeset hash, i.e. | |
422 |
|
|
424 | a 12-byte hexadecimal string. | |
423 | - shortdate: Date. Returns a date like "2006-09-18". |
|
425 | - shortdate: Date. Returns a date like "2006-09-18". | |
424 | - strip: Any text. Strips all leading and trailing whitespace. |
|
426 | - strip: Any text. Strips all leading and trailing whitespace. | |
425 | - tabindent: Any text. Returns the text, with every line except the first |
|
427 | - tabindent: Any text. Returns the text, with every line except the first | |
426 |
|
|
428 | starting with a tab character. | |
427 | - urlescape: Any text. Escapes all "special" characters. For example, "foo |
|
429 | - urlescape: Any text. Escapes all "special" characters. For example, "foo | |
428 |
|
|
430 | bar" becomes "foo%20bar". | |
429 | - user: Any text. Returns the user portion of an email address. |
|
431 | - user: Any text. Returns the user portion of an email address. | |
430 | ''')), |
|
432 | ''')), | |
431 |
|
433 | |||
432 | (['urls'], _('URL Paths'), |
|
434 | (['urls'], _('URL Paths'), | |
433 | _(r''' |
|
435 | _(r''' | |
434 | Valid URLs are of the form: |
|
436 | Valid URLs are of the form:: | |
435 |
|
437 | |||
436 | local/filesystem/path[#revision] |
|
438 | local/filesystem/path[#revision] | |
437 | file://local/filesystem/path[#revision] |
|
439 | file://local/filesystem/path[#revision] | |
@@ -450,26 +452,32 b' PYTHONPATH::' | |||||
450 | server. |
|
452 | server. | |
451 |
|
453 | |||
452 | Some notes about using SSH with Mercurial: |
|
454 | Some notes about using SSH with Mercurial: | |
|
455 | ||||
453 | - SSH requires an accessible shell account on the destination machine and |
|
456 | - 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. |
|
457 | 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 |
|
458 | - 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: |
|
459 | extra slash at the start of a path to specify an absolute path:: | |
|
460 | ||||
457 | ssh://example.com//tmp/repository |
|
461 | ssh://example.com//tmp/repository | |
|
462 | ||||
458 | - Mercurial doesn't use its own compression via SSH; the right thing to do |
|
463 | - 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.: |
|
464 | is to configure it in your ~/.ssh/config, e.g.:: | |
|
465 | ||||
460 | Host *.mylocalnetwork.example.com |
|
466 | Host *.mylocalnetwork.example.com | |
461 | Compression no |
|
467 | Compression no | |
462 | Host * |
|
468 | Host * | |
463 | Compression yes |
|
469 | Compression yes | |
|
470 | ||||
464 | Alternatively specify "ssh -C" as your ssh command in your hgrc or with |
|
471 | Alternatively specify "ssh -C" as your ssh command in your hgrc or with | |
465 | the --ssh command line option. |
|
472 | the --ssh command line option. | |
466 |
|
473 | |||
467 | These URLs can all be stored in your hgrc with path aliases under the |
|
474 | These URLs can all be stored in your hgrc with path aliases under the | |
468 | [paths] section like so: |
|
475 | [paths] section like so:: | |
469 | [paths] |
|
476 | ||
470 | alias1 = URL1 |
|
477 | [paths] | |
471 |
|
|
478 | alias1 = URL1 | |
472 | ... |
|
479 | alias2 = URL2 | |
|
480 | ... | |||
473 |
|
481 | |||
474 | You can then use the alias for any command that uses a URL (for example |
|
482 | 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). |
|
483 | 'hg pull alias1' would pull from the 'alias1' path). |
@@ -1272,7 +1272,9 b' def termwidth():' | |||||
1272 | pass |
|
1272 | pass | |
1273 | return 80 |
|
1273 | return 80 | |
1274 |
|
1274 | |||
1275 |
def wrap(line, hangindent, width= |
|
1275 | def wrap(line, hangindent, width=None): | |
|
1276 | if width is None: | |||
|
1277 | width = termwidth() - 2 | |||
1276 | padding = '\n' + ' ' * hangindent |
|
1278 | padding = '\n' + ' ' * hangindent | |
1277 | return padding.join(textwrap.wrap(line, width=width - hangindent)) |
|
1279 | return padding.join(textwrap.wrap(line, width=width - hangindent)) | |
1278 |
|
1280 |
@@ -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 |
|
34 | --branchsort convert from parent to child revision when possible, which | |
33 |
means branches are usually converted one after the other. It |
|
35 | means branches are usually converted one after the other. It | |
34 | more compact repositories. |
|
36 | generates more compact repositories. | |
35 |
--datesort |
|
37 | --datesort sort revisions by date. Converted repositories have good- | |
36 |
|
|
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 |
|
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 |
|
|
63 | include path/to/file | |
62 |
|
64 | |||
63 |
|
|
65 | exclude path/to/file | |
64 |
|
66 | |||
65 |
|
|
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 |
|
|
16 | [keyword] | |
17 |
|
|
17 | # expand keywords in every python file except those matching "x*" | |
18 |
|
|
18 | **.py = | |
19 |
|
|
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 |
|
|
8 | [extensions] | |
9 |
|
|
9 | hgext.notify = | |
10 |
|
10 | |||
11 |
|
|
11 | [hooks] | |
12 |
|
|
12 | # one email for each incoming changeset | |
13 |
|
|
13 | incoming.notify = python:hgext.notify.hook | |
14 |
|
|
14 | # batch emails when many changesets incoming at one time | |
15 |
|
|
15 | changegroup.notify = python:hgext.notify.hook | |
16 |
|
16 | |||
17 |
|
|
17 | [notify] | |
18 |
|
|
18 | # config items go here | |
19 |
|
19 | |||
20 | Required configuration items: |
|
20 | Required configuration items: | |
21 |
|
21 | |||
22 |
|
|
22 | config = /path/to/file # file containing subscriptions | |
23 |
|
23 | |||
24 | Optional configuration items: |
|
24 | Optional configuration items: | |
25 |
|
25 | |||
26 |
|
|
26 | test = True # print messages to stdout for testing | |
27 |
|
|
27 | strip = 3 # number of slashes to strip for url paths | |
28 |
|
|
28 | domain = example.com # domain to use if committer missing domain | |
29 |
|
|
29 | style = ... # style file to use when formatting email | |
30 |
|
|
30 | template = ... # template to use when formatting email | |
31 |
|
|
31 | incoming = ... # template to use when run as incoming hook | |
32 |
|
|
32 | changegroup = ... # template when run as changegroup hook | |
33 |
|
|
33 | maxdiff = 300 # max lines of diffs to include (0=none, -1=all) | |
34 |
|
|
34 | maxsubject = 67 # truncate subject line longer than this | |
35 |
|
|
35 | diffstat = True # add a diffstat before the diff content | |
36 |
|
|
36 | sources = serve # notify if source of incoming changes in this list | |
37 |
|
|
37 | # (serve == ssh or http, push, pull, bundle) | |
38 |
|
|
38 | [email] | |
39 |
|
|
39 | from = user@host.com # email address to send as if none given | |
40 |
|
|
40 | [web] | |
41 |
|
|
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 |
|
|
46 | [usersubs] | |
47 |
|
|
47 | # key is subscriber email, value is ","-separated list of glob patterns | |
48 |
|
|
48 | user@host = pattern | |
49 |
|
49 | |||
50 |
|
|
50 | [reposubs] | |
51 |
|
|
51 | # key is glob pattern, value is ","-separated list of subscriber emails | |
52 |
|
|
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