Show More
@@ -1,1160 +1,1160 | |||||
1 | # help.py - help data for mercurial |
|
1 | # help.py - help data for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import itertools |
|
10 | import itertools | |
11 | import re |
|
11 | import re | |
12 | import textwrap |
|
12 | import textwrap | |
13 |
|
13 | |||
14 | from .i18n import ( |
|
14 | from .i18n import ( | |
15 | _, |
|
15 | _, | |
16 | gettext, |
|
16 | gettext, | |
17 | ) |
|
17 | ) | |
18 | from .pycompat import getattr |
|
18 | from .pycompat import getattr | |
19 | from . import ( |
|
19 | from . import ( | |
20 | cmdutil, |
|
20 | cmdutil, | |
21 | encoding, |
|
21 | encoding, | |
22 | error, |
|
22 | error, | |
23 | extensions, |
|
23 | extensions, | |
24 | fancyopts, |
|
24 | fancyopts, | |
25 | filemerge, |
|
25 | filemerge, | |
26 | fileset, |
|
26 | fileset, | |
27 | minirst, |
|
27 | minirst, | |
28 | pycompat, |
|
28 | pycompat, | |
29 | registrar, |
|
29 | registrar, | |
30 | revset, |
|
30 | revset, | |
31 | templatefilters, |
|
31 | templatefilters, | |
32 | templatefuncs, |
|
32 | templatefuncs, | |
33 | templatekw, |
|
33 | templatekw, | |
34 | ui as uimod, |
|
34 | ui as uimod, | |
35 | util, |
|
35 | util, | |
36 | ) |
|
36 | ) | |
37 | from .hgweb import webcommands |
|
37 | from .hgweb import webcommands | |
38 | from .utils import ( |
|
38 | from .utils import ( | |
39 | compression, |
|
39 | compression, | |
40 | resourceutil, |
|
40 | resourceutil, | |
41 | ) |
|
41 | ) | |
42 |
|
42 | |||
43 | _exclkeywords = { |
|
43 | _exclkeywords = { | |
44 | b"(ADVANCED)", |
|
44 | b"(ADVANCED)", | |
45 | b"(DEPRECATED)", |
|
45 | b"(DEPRECATED)", | |
46 | b"(EXPERIMENTAL)", |
|
46 | b"(EXPERIMENTAL)", | |
47 | # i18n: "(ADVANCED)" is a keyword, must be translated consistently |
|
47 | # i18n: "(ADVANCED)" is a keyword, must be translated consistently | |
48 | _(b"(ADVANCED)"), |
|
48 | _(b"(ADVANCED)"), | |
49 | # i18n: "(DEPRECATED)" is a keyword, must be translated consistently |
|
49 | # i18n: "(DEPRECATED)" is a keyword, must be translated consistently | |
50 | _(b"(DEPRECATED)"), |
|
50 | _(b"(DEPRECATED)"), | |
51 | # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently |
|
51 | # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently | |
52 | _(b"(EXPERIMENTAL)"), |
|
52 | _(b"(EXPERIMENTAL)"), | |
53 | } |
|
53 | } | |
54 |
|
54 | |||
55 | # The order in which command categories will be displayed. |
|
55 | # The order in which command categories will be displayed. | |
56 | # Extensions with custom categories should insert them into this list |
|
56 | # Extensions with custom categories should insert them into this list | |
57 | # after/before the appropriate item, rather than replacing the list or |
|
57 | # after/before the appropriate item, rather than replacing the list or | |
58 | # assuming absolute positions. |
|
58 | # assuming absolute positions. | |
59 | CATEGORY_ORDER = [ |
|
59 | CATEGORY_ORDER = [ | |
60 | registrar.command.CATEGORY_REPO_CREATION, |
|
60 | registrar.command.CATEGORY_REPO_CREATION, | |
61 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT, |
|
61 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT, | |
62 | registrar.command.CATEGORY_COMMITTING, |
|
62 | registrar.command.CATEGORY_COMMITTING, | |
63 | registrar.command.CATEGORY_CHANGE_MANAGEMENT, |
|
63 | registrar.command.CATEGORY_CHANGE_MANAGEMENT, | |
64 | registrar.command.CATEGORY_CHANGE_ORGANIZATION, |
|
64 | registrar.command.CATEGORY_CHANGE_ORGANIZATION, | |
65 | registrar.command.CATEGORY_FILE_CONTENTS, |
|
65 | registrar.command.CATEGORY_FILE_CONTENTS, | |
66 | registrar.command.CATEGORY_CHANGE_NAVIGATION, |
|
66 | registrar.command.CATEGORY_CHANGE_NAVIGATION, | |
67 | registrar.command.CATEGORY_WORKING_DIRECTORY, |
|
67 | registrar.command.CATEGORY_WORKING_DIRECTORY, | |
68 | registrar.command.CATEGORY_IMPORT_EXPORT, |
|
68 | registrar.command.CATEGORY_IMPORT_EXPORT, | |
69 | registrar.command.CATEGORY_MAINTENANCE, |
|
69 | registrar.command.CATEGORY_MAINTENANCE, | |
70 | registrar.command.CATEGORY_HELP, |
|
70 | registrar.command.CATEGORY_HELP, | |
71 | registrar.command.CATEGORY_MISC, |
|
71 | registrar.command.CATEGORY_MISC, | |
72 | registrar.command.CATEGORY_NONE, |
|
72 | registrar.command.CATEGORY_NONE, | |
73 | ] |
|
73 | ] | |
74 |
|
74 | |||
75 | # Human-readable category names. These are translated. |
|
75 | # Human-readable category names. These are translated. | |
76 | # Extensions with custom categories should add their names here. |
|
76 | # Extensions with custom categories should add their names here. | |
77 | CATEGORY_NAMES = { |
|
77 | CATEGORY_NAMES = { | |
78 | registrar.command.CATEGORY_REPO_CREATION: b'Repository creation', |
|
78 | registrar.command.CATEGORY_REPO_CREATION: b'Repository creation', | |
79 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: b'Remote repository management', |
|
79 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: b'Remote repository management', | |
80 | registrar.command.CATEGORY_COMMITTING: b'Change creation', |
|
80 | registrar.command.CATEGORY_COMMITTING: b'Change creation', | |
81 | registrar.command.CATEGORY_CHANGE_NAVIGATION: b'Change navigation', |
|
81 | registrar.command.CATEGORY_CHANGE_NAVIGATION: b'Change navigation', | |
82 | registrar.command.CATEGORY_CHANGE_MANAGEMENT: b'Change manipulation', |
|
82 | registrar.command.CATEGORY_CHANGE_MANAGEMENT: b'Change manipulation', | |
83 | registrar.command.CATEGORY_CHANGE_ORGANIZATION: b'Change organization', |
|
83 | registrar.command.CATEGORY_CHANGE_ORGANIZATION: b'Change organization', | |
84 | registrar.command.CATEGORY_WORKING_DIRECTORY: b'Working directory management', |
|
84 | registrar.command.CATEGORY_WORKING_DIRECTORY: b'Working directory management', | |
85 | registrar.command.CATEGORY_FILE_CONTENTS: b'File content management', |
|
85 | registrar.command.CATEGORY_FILE_CONTENTS: b'File content management', | |
86 | registrar.command.CATEGORY_IMPORT_EXPORT: b'Change import/export', |
|
86 | registrar.command.CATEGORY_IMPORT_EXPORT: b'Change import/export', | |
87 | registrar.command.CATEGORY_MAINTENANCE: b'Repository maintenance', |
|
87 | registrar.command.CATEGORY_MAINTENANCE: b'Repository maintenance', | |
88 | registrar.command.CATEGORY_HELP: b'Help', |
|
88 | registrar.command.CATEGORY_HELP: b'Help', | |
89 | registrar.command.CATEGORY_MISC: b'Miscellaneous commands', |
|
89 | registrar.command.CATEGORY_MISC: b'Miscellaneous commands', | |
90 | registrar.command.CATEGORY_NONE: b'Uncategorized commands', |
|
90 | registrar.command.CATEGORY_NONE: b'Uncategorized commands', | |
91 | } |
|
91 | } | |
92 |
|
92 | |||
93 | # Topic categories. |
|
93 | # Topic categories. | |
94 | TOPIC_CATEGORY_IDS = b'ids' |
|
94 | TOPIC_CATEGORY_IDS = b'ids' | |
95 | TOPIC_CATEGORY_OUTPUT = b'output' |
|
95 | TOPIC_CATEGORY_OUTPUT = b'output' | |
96 | TOPIC_CATEGORY_CONFIG = b'config' |
|
96 | TOPIC_CATEGORY_CONFIG = b'config' | |
97 | TOPIC_CATEGORY_CONCEPTS = b'concepts' |
|
97 | TOPIC_CATEGORY_CONCEPTS = b'concepts' | |
98 | TOPIC_CATEGORY_MISC = b'misc' |
|
98 | TOPIC_CATEGORY_MISC = b'misc' | |
99 | TOPIC_CATEGORY_NONE = b'none' |
|
99 | TOPIC_CATEGORY_NONE = b'none' | |
100 |
|
100 | |||
101 | # The order in which topic categories will be displayed. |
|
101 | # The order in which topic categories will be displayed. | |
102 | # Extensions with custom categories should insert them into this list |
|
102 | # Extensions with custom categories should insert them into this list | |
103 | # after/before the appropriate item, rather than replacing the list or |
|
103 | # after/before the appropriate item, rather than replacing the list or | |
104 | # assuming absolute positions. |
|
104 | # assuming absolute positions. | |
105 | TOPIC_CATEGORY_ORDER = [ |
|
105 | TOPIC_CATEGORY_ORDER = [ | |
106 | TOPIC_CATEGORY_IDS, |
|
106 | TOPIC_CATEGORY_IDS, | |
107 | TOPIC_CATEGORY_OUTPUT, |
|
107 | TOPIC_CATEGORY_OUTPUT, | |
108 | TOPIC_CATEGORY_CONFIG, |
|
108 | TOPIC_CATEGORY_CONFIG, | |
109 | TOPIC_CATEGORY_CONCEPTS, |
|
109 | TOPIC_CATEGORY_CONCEPTS, | |
110 | TOPIC_CATEGORY_MISC, |
|
110 | TOPIC_CATEGORY_MISC, | |
111 | TOPIC_CATEGORY_NONE, |
|
111 | TOPIC_CATEGORY_NONE, | |
112 | ] |
|
112 | ] | |
113 |
|
113 | |||
114 | # Human-readable topic category names. These are translated. |
|
114 | # Human-readable topic category names. These are translated. | |
115 | TOPIC_CATEGORY_NAMES = { |
|
115 | TOPIC_CATEGORY_NAMES = { | |
116 | TOPIC_CATEGORY_IDS: b'Mercurial identifiers', |
|
116 | TOPIC_CATEGORY_IDS: b'Mercurial identifiers', | |
117 | TOPIC_CATEGORY_OUTPUT: b'Mercurial output', |
|
117 | TOPIC_CATEGORY_OUTPUT: b'Mercurial output', | |
118 | TOPIC_CATEGORY_CONFIG: b'Mercurial configuration', |
|
118 | TOPIC_CATEGORY_CONFIG: b'Mercurial configuration', | |
119 | TOPIC_CATEGORY_CONCEPTS: b'Concepts', |
|
119 | TOPIC_CATEGORY_CONCEPTS: b'Concepts', | |
120 | TOPIC_CATEGORY_MISC: b'Miscellaneous', |
|
120 | TOPIC_CATEGORY_MISC: b'Miscellaneous', | |
121 | TOPIC_CATEGORY_NONE: b'Uncategorized topics', |
|
121 | TOPIC_CATEGORY_NONE: b'Uncategorized topics', | |
122 | } |
|
122 | } | |
123 |
|
123 | |||
124 |
|
124 | |||
125 | def listexts(header, exts, indent=1, showdeprecated=False): |
|
125 | def listexts(header, exts, indent=1, showdeprecated=False): | |
126 | '''return a text listing of the given extensions''' |
|
126 | '''return a text listing of the given extensions''' | |
127 | rst = [] |
|
127 | rst = [] | |
128 | if exts: |
|
128 | if exts: | |
129 | for name, desc in sorted(pycompat.iteritems(exts)): |
|
129 | for name, desc in sorted(pycompat.iteritems(exts)): | |
130 | if not showdeprecated and any(w in desc for w in _exclkeywords): |
|
130 | if not showdeprecated and any(w in desc for w in _exclkeywords): | |
131 | continue |
|
131 | continue | |
132 | rst.append(b'%s:%s: %s\n' % (b' ' * indent, name, desc)) |
|
132 | rst.append(b'%s:%s: %s\n' % (b' ' * indent, name, desc)) | |
133 | if rst: |
|
133 | if rst: | |
134 | rst.insert(0, b'\n%s\n\n' % header) |
|
134 | rst.insert(0, b'\n%s\n\n' % header) | |
135 | return rst |
|
135 | return rst | |
136 |
|
136 | |||
137 |
|
137 | |||
138 | def extshelp(ui): |
|
138 | def extshelp(ui): | |
139 | rst = loaddoc(b'extensions')(ui).splitlines(True) |
|
139 | rst = loaddoc(b'extensions')(ui).splitlines(True) | |
140 | rst.extend( |
|
140 | rst.extend( | |
141 | listexts( |
|
141 | listexts( | |
142 | _(b'enabled extensions:'), extensions.enabled(), showdeprecated=True |
|
142 | _(b'enabled extensions:'), extensions.enabled(), showdeprecated=True | |
143 | ) |
|
143 | ) | |
144 | ) |
|
144 | ) | |
145 | rst.extend( |
|
145 | rst.extend( | |
146 | listexts( |
|
146 | listexts( | |
147 | _(b'disabled extensions:'), |
|
147 | _(b'disabled extensions:'), | |
148 | extensions.disabled(), |
|
148 | extensions.disabled(), | |
149 | showdeprecated=ui.verbose, |
|
149 | showdeprecated=ui.verbose, | |
150 | ) |
|
150 | ) | |
151 | ) |
|
151 | ) | |
152 | doc = b''.join(rst) |
|
152 | doc = b''.join(rst) | |
153 | return doc |
|
153 | return doc | |
154 |
|
154 | |||
155 |
|
155 | |||
156 | def parsedefaultmarker(text): |
|
156 | def parsedefaultmarker(text): | |
157 | """given a text 'abc (DEFAULT: def.ghi)', |
|
157 | """given a text 'abc (DEFAULT: def.ghi)', | |
158 | returns (b'abc', (b'def', b'ghi')). Otherwise return None""" |
|
158 | returns (b'abc', (b'def', b'ghi')). Otherwise return None""" | |
159 | if text[-1:] == b')': |
|
159 | if text[-1:] == b')': | |
160 | marker = b' (DEFAULT: ' |
|
160 | marker = b' (DEFAULT: ' | |
161 | pos = text.find(marker) |
|
161 | pos = text.find(marker) | |
162 | if pos >= 0: |
|
162 | if pos >= 0: | |
163 | item = text[pos + len(marker) : -1] |
|
163 | item = text[pos + len(marker) : -1] | |
164 | return text[:pos], item.split(b'.', 2) |
|
164 | return text[:pos], item.split(b'.', 2) | |
165 |
|
165 | |||
166 |
|
166 | |||
167 | def optrst(header, options, verbose, ui): |
|
167 | def optrst(header, options, verbose, ui): | |
168 | data = [] |
|
168 | data = [] | |
169 | multioccur = False |
|
169 | multioccur = False | |
170 | for option in options: |
|
170 | for option in options: | |
171 | if len(option) == 5: |
|
171 | if len(option) == 5: | |
172 | shortopt, longopt, default, desc, optlabel = option |
|
172 | shortopt, longopt, default, desc, optlabel = option | |
173 | else: |
|
173 | else: | |
174 | shortopt, longopt, default, desc = option |
|
174 | shortopt, longopt, default, desc = option | |
175 | optlabel = _(b"VALUE") # default label |
|
175 | optlabel = _(b"VALUE") # default label | |
176 |
|
176 | |||
177 | if not verbose and any(w in desc for w in _exclkeywords): |
|
177 | if not verbose and any(w in desc for w in _exclkeywords): | |
178 | continue |
|
178 | continue | |
179 | defaultstrsuffix = b'' |
|
179 | defaultstrsuffix = b'' | |
180 | if default is None: |
|
180 | if default is None: | |
181 | parseresult = parsedefaultmarker(desc) |
|
181 | parseresult = parsedefaultmarker(desc) | |
182 | if parseresult is not None: |
|
182 | if parseresult is not None: | |
183 | (desc, (section, name)) = parseresult |
|
183 | (desc, (section, name)) = parseresult | |
184 | if ui.configbool(section, name): |
|
184 | if ui.configbool(section, name): | |
185 | default = True |
|
185 | default = True | |
186 | defaultstrsuffix = _(b' from config') |
|
186 | defaultstrsuffix = _(b' from config') | |
187 | so = b'' |
|
187 | so = b'' | |
188 | if shortopt: |
|
188 | if shortopt: | |
189 | so = b'-' + shortopt |
|
189 | so = b'-' + shortopt | |
190 | lo = b'--' + longopt |
|
190 | lo = b'--' + longopt | |
191 | if default is True: |
|
191 | if default is True: | |
192 | lo = b'--[no-]' + longopt |
|
192 | lo = b'--[no-]' + longopt | |
193 |
|
193 | |||
194 | if isinstance(default, fancyopts.customopt): |
|
194 | if isinstance(default, fancyopts.customopt): | |
195 | default = default.getdefaultvalue() |
|
195 | default = default.getdefaultvalue() | |
196 | if default and not callable(default): |
|
196 | if default and not callable(default): | |
197 | # default is of unknown type, and in Python 2 we abused |
|
197 | # default is of unknown type, and in Python 2 we abused | |
198 | # the %s-shows-repr property to handle integers etc. To |
|
198 | # the %s-shows-repr property to handle integers etc. To | |
199 | # match that behavior on Python 3, we do str(default) and |
|
199 | # match that behavior on Python 3, we do str(default) and | |
200 | # then convert it to bytes. |
|
200 | # then convert it to bytes. | |
201 | defaultstr = pycompat.bytestr(default) |
|
201 | defaultstr = pycompat.bytestr(default) | |
202 | if default is True: |
|
202 | if default is True: | |
203 | defaultstr = _(b"on") |
|
203 | defaultstr = _(b"on") | |
204 | desc += _(b" (default: %s)") % (defaultstr + defaultstrsuffix) |
|
204 | desc += _(b" (default: %s)") % (defaultstr + defaultstrsuffix) | |
205 |
|
205 | |||
206 | if isinstance(default, list): |
|
206 | if isinstance(default, list): | |
207 | lo += b" %s [+]" % optlabel |
|
207 | lo += b" %s [+]" % optlabel | |
208 | multioccur = True |
|
208 | multioccur = True | |
209 | elif (default is not None) and not isinstance(default, bool): |
|
209 | elif (default is not None) and not isinstance(default, bool): | |
210 | lo += b" %s" % optlabel |
|
210 | lo += b" %s" % optlabel | |
211 |
|
211 | |||
212 | data.append((so, lo, desc)) |
|
212 | data.append((so, lo, desc)) | |
213 |
|
213 | |||
214 | if multioccur: |
|
214 | if multioccur: | |
215 | header += _(b" ([+] can be repeated)") |
|
215 | header += _(b" ([+] can be repeated)") | |
216 |
|
216 | |||
217 | rst = [b'\n%s:\n\n' % header] |
|
217 | rst = [b'\n%s:\n\n' % header] | |
218 | rst.extend(minirst.maketable(data, 1)) |
|
218 | rst.extend(minirst.maketable(data, 1)) | |
219 |
|
219 | |||
220 | return b''.join(rst) |
|
220 | return b''.join(rst) | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | def indicateomitted(rst, omitted, notomitted=None): |
|
223 | def indicateomitted(rst, omitted, notomitted=None): | |
224 | rst.append(b'\n\n.. container:: omitted\n\n %s\n\n' % omitted) |
|
224 | rst.append(b'\n\n.. container:: omitted\n\n %s\n\n' % omitted) | |
225 | if notomitted: |
|
225 | if notomitted: | |
226 | rst.append(b'\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) |
|
226 | rst.append(b'\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) | |
227 |
|
227 | |||
228 |
|
228 | |||
229 | def filtercmd(ui, cmd, func, kw, doc): |
|
229 | def filtercmd(ui, cmd, func, kw, doc): | |
230 | if not ui.debugflag and cmd.startswith(b"debug") and kw != b"debug": |
|
230 | if not ui.debugflag and cmd.startswith(b"debug") and kw != b"debug": | |
231 | # Debug command, and user is not looking for those. |
|
231 | # Debug command, and user is not looking for those. | |
232 | return True |
|
232 | return True | |
233 | if not ui.verbose: |
|
233 | if not ui.verbose: | |
234 | if not kw and not doc: |
|
234 | if not kw and not doc: | |
235 | # Command had no documentation, no point in showing it by default. |
|
235 | # Command had no documentation, no point in showing it by default. | |
236 | return True |
|
236 | return True | |
237 | if getattr(func, 'alias', False) and not getattr(func, 'owndoc', False): |
|
237 | if getattr(func, 'alias', False) and not getattr(func, 'owndoc', False): | |
238 | # Alias didn't have its own documentation. |
|
238 | # Alias didn't have its own documentation. | |
239 | return True |
|
239 | return True | |
240 | if doc and any(w in doc for w in _exclkeywords): |
|
240 | if doc and any(w in doc for w in _exclkeywords): | |
241 | # Documentation has excluded keywords. |
|
241 | # Documentation has excluded keywords. | |
242 | return True |
|
242 | return True | |
243 | if kw == b"shortlist" and not getattr(func, 'helpbasic', False): |
|
243 | if kw == b"shortlist" and not getattr(func, 'helpbasic', False): | |
244 | # We're presenting the short list but the command is not basic. |
|
244 | # We're presenting the short list but the command is not basic. | |
245 | return True |
|
245 | return True | |
246 | if ui.configbool(b'help', b'hidden-command.%s' % cmd): |
|
246 | if ui.configbool(b'help', b'hidden-command.%s' % cmd): | |
247 | # Configuration explicitly hides the command. |
|
247 | # Configuration explicitly hides the command. | |
248 | return True |
|
248 | return True | |
249 | return False |
|
249 | return False | |
250 |
|
250 | |||
251 |
|
251 | |||
252 | def filtertopic(ui, topic): |
|
252 | def filtertopic(ui, topic): | |
253 | return ui.configbool(b'help', b'hidden-topic.%s' % topic, False) |
|
253 | return ui.configbool(b'help', b'hidden-topic.%s' % topic, False) | |
254 |
|
254 | |||
255 |
|
255 | |||
256 | def topicmatch(ui, commands, kw): |
|
256 | def topicmatch(ui, commands, kw): | |
257 | """Return help topics matching kw. |
|
257 | """Return help topics matching kw. | |
258 |
|
258 | |||
259 | Returns {'section': [(name, summary), ...], ...} where section is |
|
259 | Returns {'section': [(name, summary), ...], ...} where section is | |
260 | one of topics, commands, extensions, or extensioncommands. |
|
260 | one of topics, commands, extensions, or extensioncommands. | |
261 | """ |
|
261 | """ | |
262 | kw = encoding.lower(kw) |
|
262 | kw = encoding.lower(kw) | |
263 |
|
263 | |||
264 | def lowercontains(container): |
|
264 | def lowercontains(container): | |
265 | return kw in encoding.lower(container) # translated in helptable |
|
265 | return kw in encoding.lower(container) # translated in helptable | |
266 |
|
266 | |||
267 | results = { |
|
267 | results = { | |
268 | b'topics': [], |
|
268 | b'topics': [], | |
269 | b'commands': [], |
|
269 | b'commands': [], | |
270 | b'extensions': [], |
|
270 | b'extensions': [], | |
271 | b'extensioncommands': [], |
|
271 | b'extensioncommands': [], | |
272 | } |
|
272 | } | |
273 | for topic in helptable: |
|
273 | for topic in helptable: | |
274 | names, header, doc = topic[0:3] |
|
274 | names, header, doc = topic[0:3] | |
275 | # Old extensions may use a str as doc. |
|
275 | # Old extensions may use a str as doc. | |
276 | if ( |
|
276 | if ( | |
277 | sum(map(lowercontains, names)) |
|
277 | sum(map(lowercontains, names)) | |
278 | or lowercontains(header) |
|
278 | or lowercontains(header) | |
279 | or (callable(doc) and lowercontains(doc(ui))) |
|
279 | or (callable(doc) and lowercontains(doc(ui))) | |
280 | ): |
|
280 | ): | |
281 | name = names[0] |
|
281 | name = names[0] | |
282 | if not filtertopic(ui, name): |
|
282 | if not filtertopic(ui, name): | |
283 | results[b'topics'].append((names[0], header)) |
|
283 | results[b'topics'].append((names[0], header)) | |
284 | for cmd, entry in pycompat.iteritems(commands.table): |
|
284 | for cmd, entry in pycompat.iteritems(commands.table): | |
285 | if len(entry) == 3: |
|
285 | if len(entry) == 3: | |
286 | summary = entry[2] |
|
286 | summary = entry[2] | |
287 | else: |
|
287 | else: | |
288 | summary = b'' |
|
288 | summary = b'' | |
289 | # translate docs *before* searching there |
|
289 | # translate docs *before* searching there | |
290 | func = entry[0] |
|
290 | func = entry[0] | |
291 | docs = _(pycompat.getdoc(func)) or b'' |
|
291 | docs = _(pycompat.getdoc(func)) or b'' | |
292 | if kw in cmd or lowercontains(summary) or lowercontains(docs): |
|
292 | if kw in cmd or lowercontains(summary) or lowercontains(docs): | |
293 | doclines = docs.splitlines() |
|
293 | doclines = docs.splitlines() | |
294 | if doclines: |
|
294 | if doclines: | |
295 | summary = doclines[0] |
|
295 | summary = doclines[0] | |
296 | cmdname = cmdutil.parsealiases(cmd)[0] |
|
296 | cmdname = cmdutil.parsealiases(cmd)[0] | |
297 | if filtercmd(ui, cmdname, func, kw, docs): |
|
297 | if filtercmd(ui, cmdname, func, kw, docs): | |
298 | continue |
|
298 | continue | |
299 | results[b'commands'].append((cmdname, summary)) |
|
299 | results[b'commands'].append((cmdname, summary)) | |
300 | for name, docs in itertools.chain( |
|
300 | for name, docs in itertools.chain( | |
301 | pycompat.iteritems(extensions.enabled(False)), |
|
301 | pycompat.iteritems(extensions.enabled(False)), | |
302 | pycompat.iteritems(extensions.disabled()), |
|
302 | pycompat.iteritems(extensions.disabled()), | |
303 | ): |
|
303 | ): | |
304 | if not docs: |
|
304 | if not docs: | |
305 | continue |
|
305 | continue | |
306 | name = name.rpartition(b'.')[-1] |
|
306 | name = name.rpartition(b'.')[-1] | |
307 | if lowercontains(name) or lowercontains(docs): |
|
307 | if lowercontains(name) or lowercontains(docs): | |
308 | # extension docs are already translated |
|
308 | # extension docs are already translated | |
309 | results[b'extensions'].append((name, docs.splitlines()[0])) |
|
309 | results[b'extensions'].append((name, docs.splitlines()[0])) | |
310 | try: |
|
310 | try: | |
311 | mod = extensions.load(ui, name, b'') |
|
311 | mod = extensions.load(ui, name, b'') | |
312 | except ImportError: |
|
312 | except ImportError: | |
313 | # debug message would be printed in extensions.load() |
|
313 | # debug message would be printed in extensions.load() | |
314 | continue |
|
314 | continue | |
315 | for cmd, entry in pycompat.iteritems(getattr(mod, 'cmdtable', {})): |
|
315 | for cmd, entry in pycompat.iteritems(getattr(mod, 'cmdtable', {})): | |
316 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): |
|
316 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): | |
317 | cmdname = cmdutil.parsealiases(cmd)[0] |
|
317 | cmdname = cmdutil.parsealiases(cmd)[0] | |
318 | func = entry[0] |
|
318 | func = entry[0] | |
319 | cmddoc = pycompat.getdoc(func) |
|
319 | cmddoc = pycompat.getdoc(func) | |
320 | if cmddoc: |
|
320 | if cmddoc: | |
321 | cmddoc = gettext(cmddoc).splitlines()[0] |
|
321 | cmddoc = gettext(cmddoc).splitlines()[0] | |
322 | else: |
|
322 | else: | |
323 | cmddoc = _(b'(no help text available)') |
|
323 | cmddoc = _(b'(no help text available)') | |
324 | if filtercmd(ui, cmdname, func, kw, cmddoc): |
|
324 | if filtercmd(ui, cmdname, func, kw, cmddoc): | |
325 | continue |
|
325 | continue | |
326 | results[b'extensioncommands'].append((cmdname, cmddoc)) |
|
326 | results[b'extensioncommands'].append((cmdname, cmddoc)) | |
327 | return results |
|
327 | return results | |
328 |
|
328 | |||
329 |
|
329 | |||
330 | def loaddoc(topic, subdir=None): |
|
330 | def loaddoc(topic, subdir=None): | |
331 | """Return a delayed loader for help/topic.txt.""" |
|
331 | """Return a delayed loader for help/topic.txt.""" | |
332 |
|
332 | |||
333 | def loader(ui): |
|
333 | def loader(ui): | |
334 | package = b'mercurial.helptext' |
|
334 | package = b'mercurial.helptext' | |
335 | if subdir: |
|
335 | if subdir: | |
336 | package += b'.' + subdir |
|
336 | package += b'.' + subdir | |
337 | with resourceutil.open_resource(package, topic + b'.txt') as fp: |
|
337 | with resourceutil.open_resource(package, topic + b'.txt') as fp: | |
338 | doc = gettext(fp.read()) |
|
338 | doc = gettext(fp.read()) | |
339 | for rewriter in helphooks.get(topic, []): |
|
339 | for rewriter in helphooks.get(topic, []): | |
340 | doc = rewriter(ui, topic, doc) |
|
340 | doc = rewriter(ui, topic, doc) | |
341 | return doc |
|
341 | return doc | |
342 |
|
342 | |||
343 | return loader |
|
343 | return loader | |
344 |
|
344 | |||
345 |
|
345 | |||
346 | internalstable = sorted( |
|
346 | internalstable = sorted( | |
347 | [ |
|
347 | [ | |
348 | ( |
|
348 | ( | |
349 | [b'bid-merge'], |
|
349 | [b'bid-merge'], | |
350 | _(b'Bid Merge Algorithm'), |
|
350 | _(b'Bid Merge Algorithm'), | |
351 | loaddoc(b'bid-merge', subdir=b'internals'), |
|
351 | loaddoc(b'bid-merge', subdir=b'internals'), | |
352 | ), |
|
352 | ), | |
353 | ([b'bundle2'], _(b'Bundle2'), loaddoc(b'bundle2', subdir=b'internals')), |
|
353 | ([b'bundle2'], _(b'Bundle2'), loaddoc(b'bundle2', subdir=b'internals')), | |
354 | ([b'bundles'], _(b'Bundles'), loaddoc(b'bundles', subdir=b'internals')), |
|
354 | ([b'bundles'], _(b'Bundles'), loaddoc(b'bundles', subdir=b'internals')), | |
355 | ([b'cbor'], _(b'CBOR'), loaddoc(b'cbor', subdir=b'internals')), |
|
355 | ([b'cbor'], _(b'CBOR'), loaddoc(b'cbor', subdir=b'internals')), | |
356 | ([b'censor'], _(b'Censor'), loaddoc(b'censor', subdir=b'internals')), |
|
356 | ([b'censor'], _(b'Censor'), loaddoc(b'censor', subdir=b'internals')), | |
357 | ( |
|
357 | ( | |
358 | [b'changegroups'], |
|
358 | [b'changegroups'], | |
359 | _(b'Changegroups'), |
|
359 | _(b'Changegroups'), | |
360 | loaddoc(b'changegroups', subdir=b'internals'), |
|
360 | loaddoc(b'changegroups', subdir=b'internals'), | |
361 | ), |
|
361 | ), | |
362 | ( |
|
362 | ( | |
363 | [b'config'], |
|
363 | [b'config'], | |
364 | _(b'Config Registrar'), |
|
364 | _(b'Config Registrar'), | |
365 | loaddoc(b'config', subdir=b'internals'), |
|
365 | loaddoc(b'config', subdir=b'internals'), | |
366 | ), |
|
366 | ), | |
367 | ( |
|
367 | ( | |
368 | [b'extensions', b'extension'], |
|
368 | [b'extensions', b'extension'], | |
369 | _(b'Extension API'), |
|
369 | _(b'Extension API'), | |
370 | loaddoc(b'extensions', subdir=b'internals'), |
|
370 | loaddoc(b'extensions', subdir=b'internals'), | |
371 | ), |
|
371 | ), | |
372 | ( |
|
372 | ( | |
373 | [b'mergestate'], |
|
373 | [b'mergestate'], | |
374 | _(b'Mergestate'), |
|
374 | _(b'Mergestate'), | |
375 | loaddoc(b'mergestate', subdir=b'internals'), |
|
375 | loaddoc(b'mergestate', subdir=b'internals'), | |
376 | ), |
|
376 | ), | |
377 | ( |
|
377 | ( | |
378 | [b'requirements'], |
|
378 | [b'requirements'], | |
379 | _(b'Repository Requirements'), |
|
379 | _(b'Repository Requirements'), | |
380 | loaddoc(b'requirements', subdir=b'internals'), |
|
380 | loaddoc(b'requirements', subdir=b'internals'), | |
381 | ), |
|
381 | ), | |
382 | ( |
|
382 | ( | |
383 | [b'revlogs'], |
|
383 | [b'revlogs'], | |
384 | _(b'Revision Logs'), |
|
384 | _(b'Revision Logs'), | |
385 | loaddoc(b'revlogs', subdir=b'internals'), |
|
385 | loaddoc(b'revlogs', subdir=b'internals'), | |
386 | ), |
|
386 | ), | |
387 | ( |
|
387 | ( | |
388 | [b'wireprotocol'], |
|
388 | [b'wireprotocol'], | |
389 | _(b'Wire Protocol'), |
|
389 | _(b'Wire Protocol'), | |
390 | loaddoc(b'wireprotocol', subdir=b'internals'), |
|
390 | loaddoc(b'wireprotocol', subdir=b'internals'), | |
391 | ), |
|
391 | ), | |
392 | ( |
|
392 | ( | |
393 | [b'wireprotocolrpc'], |
|
393 | [b'wireprotocolrpc'], | |
394 | _(b'Wire Protocol RPC'), |
|
394 | _(b'Wire Protocol RPC'), | |
395 | loaddoc(b'wireprotocolrpc', subdir=b'internals'), |
|
395 | loaddoc(b'wireprotocolrpc', subdir=b'internals'), | |
396 | ), |
|
396 | ), | |
397 | ( |
|
397 | ( | |
398 | [b'wireprotocolv2'], |
|
398 | [b'wireprotocolv2'], | |
399 | _(b'Wire Protocol Version 2'), |
|
399 | _(b'Wire Protocol Version 2'), | |
400 | loaddoc(b'wireprotocolv2', subdir=b'internals'), |
|
400 | loaddoc(b'wireprotocolv2', subdir=b'internals'), | |
401 | ), |
|
401 | ), | |
402 | ] |
|
402 | ] | |
403 | ) |
|
403 | ) | |
404 |
|
404 | |||
405 |
|
405 | |||
406 | def internalshelp(ui): |
|
406 | def internalshelp(ui): | |
407 | """Generate the index for the "internals" topic.""" |
|
407 | """Generate the index for the "internals" topic.""" | |
408 | lines = [ |
|
408 | lines = [ | |
409 | b'To access a subtopic, use "hg help internals.{subtopic-name}"\n', |
|
409 | b'To access a subtopic, use "hg help internals.{subtopic-name}"\n', | |
410 | b'\n', |
|
410 | b'\n', | |
411 | ] |
|
411 | ] | |
412 | for names, header, doc in internalstable: |
|
412 | for names, header, doc in internalstable: | |
413 | lines.append(b' :%s: %s\n' % (names[0], header)) |
|
413 | lines.append(b' :%s: %s\n' % (names[0], header)) | |
414 |
|
414 | |||
415 | return b''.join(lines) |
|
415 | return b''.join(lines) | |
416 |
|
416 | |||
417 |
|
417 | |||
418 | helptable = sorted( |
|
418 | helptable = sorted( | |
419 | [ |
|
419 | [ | |
420 | ( |
|
420 | ( | |
421 | [b'bundlespec'], |
|
421 | [b'bundlespec'], | |
422 | _(b"Bundle File Formats"), |
|
422 | _(b"Bundle File Formats"), | |
423 | loaddoc(b'bundlespec'), |
|
423 | loaddoc(b'bundlespec'), | |
424 | TOPIC_CATEGORY_CONCEPTS, |
|
424 | TOPIC_CATEGORY_CONCEPTS, | |
425 | ), |
|
425 | ), | |
426 | ( |
|
426 | ( | |
427 | [b'color'], |
|
427 | [b'color'], | |
428 | _(b"Colorizing Outputs"), |
|
428 | _(b"Colorizing Outputs"), | |
429 | loaddoc(b'color'), |
|
429 | loaddoc(b'color'), | |
430 | TOPIC_CATEGORY_OUTPUT, |
|
430 | TOPIC_CATEGORY_OUTPUT, | |
431 | ), |
|
431 | ), | |
432 | ( |
|
432 | ( | |
433 | [b"config", b"hgrc"], |
|
433 | [b"config", b"hgrc"], | |
434 | _(b"Configuration Files"), |
|
434 | _(b"Configuration Files"), | |
435 | loaddoc(b'config'), |
|
435 | loaddoc(b'config'), | |
436 | TOPIC_CATEGORY_CONFIG, |
|
436 | TOPIC_CATEGORY_CONFIG, | |
437 | ), |
|
437 | ), | |
438 | ( |
|
438 | ( | |
439 | [b'deprecated'], |
|
439 | [b'deprecated'], | |
440 | _(b"Deprecated Features"), |
|
440 | _(b"Deprecated Features"), | |
441 | loaddoc(b'deprecated'), |
|
441 | loaddoc(b'deprecated'), | |
442 | TOPIC_CATEGORY_MISC, |
|
442 | TOPIC_CATEGORY_MISC, | |
443 | ), |
|
443 | ), | |
444 | ( |
|
444 | ( | |
445 | [b"dates"], |
|
445 | [b"dates"], | |
446 | _(b"Date Formats"), |
|
446 | _(b"Date Formats"), | |
447 | loaddoc(b'dates'), |
|
447 | loaddoc(b'dates'), | |
448 | TOPIC_CATEGORY_OUTPUT, |
|
448 | TOPIC_CATEGORY_OUTPUT, | |
449 | ), |
|
449 | ), | |
450 | ( |
|
450 | ( | |
451 | [b"flags"], |
|
451 | [b"flags"], | |
452 | _(b"Command-line flags"), |
|
452 | _(b"Command-line flags"), | |
453 | loaddoc(b'flags'), |
|
453 | loaddoc(b'flags'), | |
454 | TOPIC_CATEGORY_CONFIG, |
|
454 | TOPIC_CATEGORY_CONFIG, | |
455 | ), |
|
455 | ), | |
456 | ( |
|
456 | ( | |
457 | [b"patterns"], |
|
457 | [b"patterns"], | |
458 | _(b"File Name Patterns"), |
|
458 | _(b"File Name Patterns"), | |
459 | loaddoc(b'patterns'), |
|
459 | loaddoc(b'patterns'), | |
460 | TOPIC_CATEGORY_IDS, |
|
460 | TOPIC_CATEGORY_IDS, | |
461 | ), |
|
461 | ), | |
462 | ( |
|
462 | ( | |
463 | [b'environment', b'env'], |
|
463 | [b'environment', b'env'], | |
464 | _(b'Environment Variables'), |
|
464 | _(b'Environment Variables'), | |
465 | loaddoc(b'environment'), |
|
465 | loaddoc(b'environment'), | |
466 | TOPIC_CATEGORY_CONFIG, |
|
466 | TOPIC_CATEGORY_CONFIG, | |
467 | ), |
|
467 | ), | |
468 | ( |
|
468 | ( | |
469 | [ |
|
469 | [ | |
470 | b'revisions', |
|
470 | b'revisions', | |
471 | b'revs', |
|
471 | b'revs', | |
472 | b'revsets', |
|
472 | b'revsets', | |
473 | b'revset', |
|
473 | b'revset', | |
474 | b'multirevs', |
|
474 | b'multirevs', | |
475 | b'mrevs', |
|
475 | b'mrevs', | |
476 | ], |
|
476 | ], | |
477 | _(b'Specifying Revisions'), |
|
477 | _(b'Specifying Revisions'), | |
478 | loaddoc(b'revisions'), |
|
478 | loaddoc(b'revisions'), | |
479 | TOPIC_CATEGORY_IDS, |
|
479 | TOPIC_CATEGORY_IDS, | |
480 | ), |
|
480 | ), | |
481 | ( |
|
481 | ( | |
482 | [b'filesets', b'fileset'], |
|
482 | [b'filesets', b'fileset'], | |
483 | _(b"Specifying File Sets"), |
|
483 | _(b"Specifying File Sets"), | |
484 | loaddoc(b'filesets'), |
|
484 | loaddoc(b'filesets'), | |
485 | TOPIC_CATEGORY_IDS, |
|
485 | TOPIC_CATEGORY_IDS, | |
486 | ), |
|
486 | ), | |
487 | ( |
|
487 | ( | |
488 | [b'diffs'], |
|
488 | [b'diffs'], | |
489 | _(b'Diff Formats'), |
|
489 | _(b'Diff Formats'), | |
490 | loaddoc(b'diffs'), |
|
490 | loaddoc(b'diffs'), | |
491 | TOPIC_CATEGORY_OUTPUT, |
|
491 | TOPIC_CATEGORY_OUTPUT, | |
492 | ), |
|
492 | ), | |
493 | ( |
|
493 | ( | |
494 | [b'merge-tools', b'mergetools', b'mergetool'], |
|
494 | [b'merge-tools', b'mergetools', b'mergetool'], | |
495 | _(b'Merge Tools'), |
|
495 | _(b'Merge Tools'), | |
496 | loaddoc(b'merge-tools'), |
|
496 | loaddoc(b'merge-tools'), | |
497 | TOPIC_CATEGORY_CONFIG, |
|
497 | TOPIC_CATEGORY_CONFIG, | |
498 | ), |
|
498 | ), | |
499 | ( |
|
499 | ( | |
500 | [b'templating', b'templates', b'template', b'style'], |
|
500 | [b'templating', b'templates', b'template', b'style'], | |
501 | _(b'Template Usage'), |
|
501 | _(b'Template Usage'), | |
502 | loaddoc(b'templates'), |
|
502 | loaddoc(b'templates'), | |
503 | TOPIC_CATEGORY_OUTPUT, |
|
503 | TOPIC_CATEGORY_OUTPUT, | |
504 | ), |
|
504 | ), | |
505 | ([b'urls'], _(b'URL Paths'), loaddoc(b'urls'), TOPIC_CATEGORY_IDS), |
|
505 | ([b'urls'], _(b'URL Paths'), loaddoc(b'urls'), TOPIC_CATEGORY_IDS), | |
506 | ( |
|
506 | ( | |
507 | [b"extensions"], |
|
507 | [b"extensions"], | |
508 | _(b"Using Additional Features"), |
|
508 | _(b"Using Additional Features"), | |
509 | extshelp, |
|
509 | extshelp, | |
510 | TOPIC_CATEGORY_CONFIG, |
|
510 | TOPIC_CATEGORY_CONFIG, | |
511 | ), |
|
511 | ), | |
512 | ( |
|
512 | ( | |
513 | [b"subrepos", b"subrepo"], |
|
513 | [b"subrepos", b"subrepo"], | |
514 | _(b"Subrepositories"), |
|
514 | _(b"Subrepositories"), | |
515 | loaddoc(b'subrepos'), |
|
515 | loaddoc(b'subrepos'), | |
516 | TOPIC_CATEGORY_CONCEPTS, |
|
516 | TOPIC_CATEGORY_CONCEPTS, | |
517 | ), |
|
517 | ), | |
518 | ( |
|
518 | ( | |
519 | [b"hgweb"], |
|
519 | [b"hgweb"], | |
520 | _(b"Configuring hgweb"), |
|
520 | _(b"Configuring hgweb"), | |
521 | loaddoc(b'hgweb'), |
|
521 | loaddoc(b'hgweb'), | |
522 | TOPIC_CATEGORY_CONFIG, |
|
522 | TOPIC_CATEGORY_CONFIG, | |
523 | ), |
|
523 | ), | |
524 | ( |
|
524 | ( | |
525 | [b"glossary"], |
|
525 | [b"glossary"], | |
526 | _(b"Glossary"), |
|
526 | _(b"Glossary"), | |
527 | loaddoc(b'glossary'), |
|
527 | loaddoc(b'glossary'), | |
528 | TOPIC_CATEGORY_CONCEPTS, |
|
528 | TOPIC_CATEGORY_CONCEPTS, | |
529 | ), |
|
529 | ), | |
530 | ( |
|
530 | ( | |
531 | [b"hgignore", b"ignore"], |
|
531 | [b"hgignore", b"ignore"], | |
532 | _(b"Syntax for Mercurial Ignore Files"), |
|
532 | _(b"Syntax for Mercurial Ignore Files"), | |
533 | loaddoc(b'hgignore'), |
|
533 | loaddoc(b'hgignore'), | |
534 | TOPIC_CATEGORY_IDS, |
|
534 | TOPIC_CATEGORY_IDS, | |
535 | ), |
|
535 | ), | |
536 | ( |
|
536 | ( | |
537 | [b"phases"], |
|
537 | [b"phases"], | |
538 | _(b"Working with Phases"), |
|
538 | _(b"Working with Phases"), | |
539 | loaddoc(b'phases'), |
|
539 | loaddoc(b'phases'), | |
540 | TOPIC_CATEGORY_CONCEPTS, |
|
540 | TOPIC_CATEGORY_CONCEPTS, | |
541 | ), |
|
541 | ), | |
542 | ( |
|
542 | ( | |
543 | [b'scripting'], |
|
543 | [b'scripting'], | |
544 | _(b'Using Mercurial from scripts and automation'), |
|
544 | _(b'Using Mercurial from scripts and automation'), | |
545 | loaddoc(b'scripting'), |
|
545 | loaddoc(b'scripting'), | |
546 | TOPIC_CATEGORY_MISC, |
|
546 | TOPIC_CATEGORY_MISC, | |
547 | ), |
|
547 | ), | |
548 | ( |
|
548 | ( | |
549 | [b'internals'], |
|
549 | [b'internals'], | |
550 | _(b"Technical implementation topics"), |
|
550 | _(b"Technical implementation topics"), | |
551 | internalshelp, |
|
551 | internalshelp, | |
552 | TOPIC_CATEGORY_MISC, |
|
552 | TOPIC_CATEGORY_MISC, | |
553 | ), |
|
553 | ), | |
554 | ( |
|
554 | ( | |
555 | [b'pager'], |
|
555 | [b'pager'], | |
556 | _(b"Pager Support"), |
|
556 | _(b"Pager Support"), | |
557 | loaddoc(b'pager'), |
|
557 | loaddoc(b'pager'), | |
558 | TOPIC_CATEGORY_CONFIG, |
|
558 | TOPIC_CATEGORY_CONFIG, | |
559 | ), |
|
559 | ), | |
560 | ] |
|
560 | ] | |
561 | ) |
|
561 | ) | |
562 |
|
562 | |||
563 | # Maps topics with sub-topics to a list of their sub-topics. |
|
563 | # Maps topics with sub-topics to a list of their sub-topics. | |
564 | subtopics = { |
|
564 | subtopics = { | |
565 | b'internals': internalstable, |
|
565 | b'internals': internalstable, | |
566 | } |
|
566 | } | |
567 |
|
567 | |||
568 | # Map topics to lists of callable taking the current topic help and |
|
568 | # Map topics to lists of callable taking the current topic help and | |
569 | # returning the updated version |
|
569 | # returning the updated version | |
570 | helphooks = {} |
|
570 | helphooks = {} | |
571 |
|
571 | |||
572 |
|
572 | |||
573 | def addtopichook(topic, rewriter): |
|
573 | def addtopichook(topic, rewriter): | |
574 | helphooks.setdefault(topic, []).append(rewriter) |
|
574 | helphooks.setdefault(topic, []).append(rewriter) | |
575 |
|
575 | |||
576 |
|
576 | |||
577 | def makeitemsdoc(ui, topic, doc, marker, items, dedent=False): |
|
577 | def makeitemsdoc(ui, topic, doc, marker, items, dedent=False): | |
578 | """Extract docstring from the items key to function mapping, build a |
|
578 | """Extract docstring from the items key to function mapping, build a | |
579 | single documentation block and use it to overwrite the marker in doc. |
|
579 | single documentation block and use it to overwrite the marker in doc. | |
580 | """ |
|
580 | """ | |
581 | entries = [] |
|
581 | entries = [] | |
582 | for name in sorted(items): |
|
582 | for name in sorted(items): | |
583 | text = (pycompat.getdoc(items[name]) or b'').rstrip() |
|
583 | text = (pycompat.getdoc(items[name]) or b'').rstrip() | |
584 | if not text or not ui.verbose and any(w in text for w in _exclkeywords): |
|
584 | if not text or not ui.verbose and any(w in text for w in _exclkeywords): | |
585 | continue |
|
585 | continue | |
586 | text = gettext(text) |
|
586 | text = gettext(text) | |
587 | if dedent: |
|
587 | if dedent: | |
588 | # Abuse latin1 to use textwrap.dedent() on bytes. |
|
588 | # Abuse latin1 to use textwrap.dedent() on bytes. | |
589 | text = textwrap.dedent(text.decode('latin1')).encode('latin1') |
|
589 | text = textwrap.dedent(text.decode('latin1')).encode('latin1') | |
590 | lines = text.splitlines() |
|
590 | lines = text.splitlines() | |
591 | doclines = [(lines[0])] |
|
591 | doclines = [(lines[0])] | |
592 | for l in lines[1:]: |
|
592 | for l in lines[1:]: | |
593 | # Stop once we find some Python doctest |
|
593 | # Stop once we find some Python doctest | |
594 | if l.strip().startswith(b'>>>'): |
|
594 | if l.strip().startswith(b'>>>'): | |
595 | break |
|
595 | break | |
596 | if dedent: |
|
596 | if dedent: | |
597 | doclines.append(l.rstrip()) |
|
597 | doclines.append(l.rstrip()) | |
598 | else: |
|
598 | else: | |
599 | doclines.append(b' ' + l.strip()) |
|
599 | doclines.append(b' ' + l.strip()) | |
600 | entries.append(b'\n'.join(doclines)) |
|
600 | entries.append(b'\n'.join(doclines)) | |
601 | entries = b'\n\n'.join(entries) |
|
601 | entries = b'\n\n'.join(entries) | |
602 | return doc.replace(marker, entries) |
|
602 | return doc.replace(marker, entries) | |
603 |
|
603 | |||
604 |
|
604 | |||
605 | def addtopicsymbols(topic, marker, symbols, dedent=False): |
|
605 | def addtopicsymbols(topic, marker, symbols, dedent=False): | |
606 | def add(ui, topic, doc): |
|
606 | def add(ui, topic, doc): | |
607 | return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent) |
|
607 | return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent) | |
608 |
|
608 | |||
609 | addtopichook(topic, add) |
|
609 | addtopichook(topic, add) | |
610 |
|
610 | |||
611 |
|
611 | |||
612 | addtopicsymbols( |
|
612 | addtopicsymbols( | |
613 | b'bundlespec', |
|
613 | b'bundlespec', | |
614 | b'.. bundlecompressionmarker', |
|
614 | b'.. bundlecompressionmarker', | |
615 | compression.bundlecompressiontopics(), |
|
615 | compression.bundlecompressiontopics(), | |
616 | ) |
|
616 | ) | |
617 | addtopicsymbols(b'filesets', b'.. predicatesmarker', fileset.symbols) |
|
617 | addtopicsymbols(b'filesets', b'.. predicatesmarker', fileset.symbols) | |
618 | addtopicsymbols( |
|
618 | addtopicsymbols( | |
619 | b'merge-tools', b'.. internaltoolsmarker', filemerge.internalsdoc |
|
619 | b'merge-tools', b'.. internaltoolsmarker', filemerge.internalsdoc | |
620 | ) |
|
620 | ) | |
621 | addtopicsymbols(b'revisions', b'.. predicatesmarker', revset.symbols) |
|
621 | addtopicsymbols(b'revisions', b'.. predicatesmarker', revset.symbols) | |
622 | addtopicsymbols(b'templates', b'.. keywordsmarker', templatekw.keywords) |
|
622 | addtopicsymbols(b'templates', b'.. keywordsmarker', templatekw.keywords) | |
623 | addtopicsymbols(b'templates', b'.. filtersmarker', templatefilters.filters) |
|
623 | addtopicsymbols(b'templates', b'.. filtersmarker', templatefilters.filters) | |
624 | addtopicsymbols(b'templates', b'.. functionsmarker', templatefuncs.funcs) |
|
624 | addtopicsymbols(b'templates', b'.. functionsmarker', templatefuncs.funcs) | |
625 | addtopicsymbols( |
|
625 | addtopicsymbols( | |
626 | b'hgweb', b'.. webcommandsmarker', webcommands.commands, dedent=True |
|
626 | b'hgweb', b'.. webcommandsmarker', webcommands.commands, dedent=True | |
627 | ) |
|
627 | ) | |
628 |
|
628 | |||
629 |
|
629 | |||
630 | def inserttweakrc(ui, topic, doc): |
|
630 | def inserttweakrc(ui, topic, doc): | |
631 | marker = b'.. tweakdefaultsmarker' |
|
631 | marker = b'.. tweakdefaultsmarker' | |
632 | repl = uimod.tweakrc |
|
632 | repl = uimod.tweakrc | |
633 |
|
633 | |||
634 | def sub(m): |
|
634 | def sub(m): | |
635 | lines = [m.group(1) + s for s in repl.splitlines()] |
|
635 | lines = [m.group(1) + s for s in repl.splitlines()] | |
636 | return b'\n'.join(lines) |
|
636 | return b'\n'.join(lines) | |
637 |
|
637 | |||
638 | return re.sub(br'( *)%s' % re.escape(marker), sub, doc) |
|
638 | return re.sub(br'( *)%s' % re.escape(marker), sub, doc) | |
639 |
|
639 | |||
640 |
|
640 | |||
641 | def _getcategorizedhelpcmds(ui, cmdtable, name, select=None): |
|
641 | def _getcategorizedhelpcmds(ui, cmdtable, name, select=None): | |
642 | # Category -> list of commands |
|
642 | # Category -> list of commands | |
643 | cats = {} |
|
643 | cats = {} | |
644 | # Command -> short description |
|
644 | # Command -> short description | |
645 | h = {} |
|
645 | h = {} | |
646 | # Command -> string showing synonyms |
|
646 | # Command -> string showing synonyms | |
647 | syns = {} |
|
647 | syns = {} | |
648 | for c, e in pycompat.iteritems(cmdtable): |
|
648 | for c, e in pycompat.iteritems(cmdtable): | |
649 | fs = cmdutil.parsealiases(c) |
|
649 | fs = cmdutil.parsealiases(c) | |
650 | f = fs[0] |
|
650 | f = fs[0] | |
651 | syns[f] = fs |
|
651 | syns[f] = fs | |
652 | func = e[0] |
|
652 | func = e[0] | |
653 | if select and not select(f): |
|
653 | if select and not select(f): | |
654 | continue |
|
654 | continue | |
655 | doc = pycompat.getdoc(func) |
|
655 | doc = pycompat.getdoc(func) | |
656 | if filtercmd(ui, f, func, name, doc): |
|
656 | if filtercmd(ui, f, func, name, doc): | |
657 | continue |
|
657 | continue | |
658 | doc = gettext(doc) |
|
658 | doc = gettext(doc) | |
659 | if not doc: |
|
659 | if not doc: | |
660 | doc = _(b"(no help text available)") |
|
660 | doc = _(b"(no help text available)") | |
661 | h[f] = doc.splitlines()[0].rstrip() |
|
661 | h[f] = doc.splitlines()[0].rstrip() | |
662 |
|
662 | |||
663 | cat = getattr(func, 'helpcategory', None) or ( |
|
663 | cat = getattr(func, 'helpcategory', None) or ( | |
664 | registrar.command.CATEGORY_NONE |
|
664 | registrar.command.CATEGORY_NONE | |
665 | ) |
|
665 | ) | |
666 | cats.setdefault(cat, []).append(f) |
|
666 | cats.setdefault(cat, []).append(f) | |
667 | return cats, h, syns |
|
667 | return cats, h, syns | |
668 |
|
668 | |||
669 |
|
669 | |||
670 | def _getcategorizedhelptopics(ui, topictable): |
|
670 | def _getcategorizedhelptopics(ui, topictable): | |
671 | # Group commands by category. |
|
671 | # Group commands by category. | |
672 | topiccats = {} |
|
672 | topiccats = {} | |
673 | syns = {} |
|
673 | syns = {} | |
674 | for topic in topictable: |
|
674 | for topic in topictable: | |
675 | names, header, doc = topic[0:3] |
|
675 | names, header, doc = topic[0:3] | |
676 | if len(topic) > 3 and topic[3]: |
|
676 | if len(topic) > 3 and topic[3]: | |
677 | category = topic[3] |
|
677 | category = topic[3] | |
678 | else: |
|
678 | else: | |
679 | category = TOPIC_CATEGORY_NONE |
|
679 | category = TOPIC_CATEGORY_NONE | |
680 |
|
680 | |||
681 | topicname = names[0] |
|
681 | topicname = names[0] | |
682 | syns[topicname] = list(names) |
|
682 | syns[topicname] = list(names) | |
683 | if not filtertopic(ui, topicname): |
|
683 | if not filtertopic(ui, topicname): | |
684 | topiccats.setdefault(category, []).append((topicname, header)) |
|
684 | topiccats.setdefault(category, []).append((topicname, header)) | |
685 | return topiccats, syns |
|
685 | return topiccats, syns | |
686 |
|
686 | |||
687 |
|
687 | |||
688 | addtopichook(b'config', inserttweakrc) |
|
688 | addtopichook(b'config', inserttweakrc) | |
689 |
|
689 | |||
690 |
|
690 | |||
691 | def help_( |
|
691 | def help_( | |
692 | ui, |
|
692 | ui, | |
693 | commands, |
|
693 | commands, | |
694 | name, |
|
694 | name, | |
695 | unknowncmd=False, |
|
695 | unknowncmd=False, | |
696 | full=True, |
|
696 | full=True, | |
697 | subtopic=None, |
|
697 | subtopic=None, | |
698 | fullname=None, |
|
698 | fullname=None, | |
699 | **opts |
|
699 | **opts | |
700 | ): |
|
700 | ): | |
701 | """ |
|
701 | """ | |
702 | Generate the help for 'name' as unformatted restructured text. If |
|
702 | Generate the help for 'name' as unformatted restructured text. If | |
703 | 'name' is None, describe the commands available. |
|
703 | 'name' is None, describe the commands available. | |
704 | """ |
|
704 | """ | |
705 |
|
705 | |||
706 | opts = pycompat.byteskwargs(opts) |
|
706 | opts = pycompat.byteskwargs(opts) | |
707 |
|
707 | |||
708 | def helpcmd(name, subtopic=None): |
|
708 | def helpcmd(name, subtopic=None): | |
709 | try: |
|
709 | try: | |
710 | aliases, entry = cmdutil.findcmd( |
|
710 | aliases, entry = cmdutil.findcmd( | |
711 | name, commands.table, strict=unknowncmd |
|
711 | name, commands.table, strict=unknowncmd | |
712 | ) |
|
712 | ) | |
713 | except error.AmbiguousCommand as inst: |
|
713 | except error.AmbiguousCommand as inst: | |
714 | # py3 fix: except vars can't be used outside the scope of the |
|
714 | # py3 fix: except vars can't be used outside the scope of the | |
715 | # except block, nor can be used inside a lambda. python issue4617 |
|
715 | # except block, nor can be used inside a lambda. python issue4617 | |
716 | prefix = inst.prefix |
|
716 | prefix = inst.prefix | |
717 | select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix) |
|
717 | select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix) | |
718 | rst = helplist(select) |
|
718 | rst = helplist(select) | |
719 | return rst |
|
719 | return rst | |
720 |
|
720 | |||
721 | rst = [] |
|
721 | rst = [] | |
722 |
|
722 | |||
723 | # check if it's an invalid alias and display its error if it is |
|
723 | # check if it's an invalid alias and display its error if it is | |
724 | if getattr(entry[0], 'badalias', None): |
|
724 | if getattr(entry[0], 'badalias', None): | |
725 | rst.append(entry[0].badalias + b'\n') |
|
725 | rst.append(entry[0].badalias + b'\n') | |
726 | if entry[0].unknowncmd: |
|
726 | if entry[0].unknowncmd: | |
727 | try: |
|
727 | try: | |
728 | rst.extend(helpextcmd(entry[0].cmdname)) |
|
728 | rst.extend(helpextcmd(entry[0].cmdname)) | |
729 | except error.UnknownCommand: |
|
729 | except error.UnknownCommand: | |
730 | pass |
|
730 | pass | |
731 | return rst |
|
731 | return rst | |
732 |
|
732 | |||
733 | # synopsis |
|
733 | # synopsis | |
734 | if len(entry) > 2: |
|
734 | if len(entry) > 2: | |
735 | if entry[2].startswith(b'hg'): |
|
735 | if entry[2].startswith(b'hg'): | |
736 | rst.append(b"%s\n" % entry[2]) |
|
736 | rst.append(b"%s\n" % entry[2]) | |
737 | else: |
|
737 | else: | |
738 | rst.append(b'hg %s %s\n' % (aliases[0], entry[2])) |
|
738 | rst.append(b'hg %s %s\n' % (aliases[0], entry[2])) | |
739 | else: |
|
739 | else: | |
740 | rst.append(b'hg %s\n' % aliases[0]) |
|
740 | rst.append(b'hg %s\n' % aliases[0]) | |
741 | # aliases |
|
741 | # aliases | |
742 | if full and not ui.quiet and len(aliases) > 1: |
|
742 | if full and not ui.quiet and len(aliases) > 1: | |
743 | rst.append(_(b"\naliases: %s\n") % b', '.join(aliases[1:])) |
|
743 | rst.append(_(b"\naliases: %s\n") % b', '.join(aliases[1:])) | |
744 | rst.append(b'\n') |
|
744 | rst.append(b'\n') | |
745 |
|
745 | |||
746 | # description |
|
746 | # description | |
747 | doc = gettext(pycompat.getdoc(entry[0])) |
|
747 | doc = gettext(pycompat.getdoc(entry[0])) | |
748 | if not doc: |
|
748 | if not doc: | |
749 | doc = _(b"(no help text available)") |
|
749 | doc = _(b"(no help text available)") | |
750 | if util.safehasattr(entry[0], b'definition'): # aliased command |
|
750 | if util.safehasattr(entry[0], b'definition'): # aliased command | |
751 | source = entry[0].source |
|
751 | source = entry[0].source | |
752 | if entry[0].definition.startswith(b'!'): # shell alias |
|
752 | if entry[0].definition.startswith(b'!'): # shell alias | |
753 | doc = _(b'shell alias for: %s\n\n%s\n\ndefined by: %s\n') % ( |
|
753 | doc = _(b'shell alias for: %s\n\n%s\n\ndefined by: %s\n') % ( | |
754 | entry[0].definition[1:], |
|
754 | entry[0].definition[1:], | |
755 | doc, |
|
755 | doc, | |
756 | source, |
|
756 | source, | |
757 | ) |
|
757 | ) | |
758 | else: |
|
758 | else: | |
759 | doc = _(b'alias for: hg %s\n\n%s\n\ndefined by: %s\n') % ( |
|
759 | doc = _(b'alias for: hg %s\n\n%s\n\ndefined by: %s\n') % ( | |
760 | entry[0].definition, |
|
760 | entry[0].definition, | |
761 | doc, |
|
761 | doc, | |
762 | source, |
|
762 | source, | |
763 | ) |
|
763 | ) | |
764 | doc = doc.splitlines(True) |
|
764 | doc = doc.splitlines(True) | |
765 | if ui.quiet or not full: |
|
765 | if ui.quiet or not full: | |
766 | rst.append(doc[0]) |
|
766 | rst.append(doc[0]) | |
767 | else: |
|
767 | else: | |
768 | rst.extend(doc) |
|
768 | rst.extend(doc) | |
769 | rst.append(b'\n') |
|
769 | rst.append(b'\n') | |
770 |
|
770 | |||
771 | # check if this command shadows a non-trivial (multi-line) |
|
771 | # check if this command shadows a non-trivial (multi-line) | |
772 | # extension help text |
|
772 | # extension help text | |
773 | try: |
|
773 | try: | |
774 | mod = extensions.find(name) |
|
774 | mod = extensions.find(name) | |
775 | doc = gettext(pycompat.getdoc(mod)) or b'' |
|
775 | doc = gettext(pycompat.getdoc(mod)) or b'' | |
776 | if b'\n' in doc.strip(): |
|
776 | if b'\n' in doc.strip(): | |
777 | msg = _( |
|
777 | msg = _( | |
778 | b"(use 'hg help -e %s' to show help for " |
|
778 | b"(use 'hg help -e %s' to show help for " | |
779 | b"the %s extension)" |
|
779 | b"the %s extension)" | |
780 | ) % (name, name) |
|
780 | ) % (name, name) | |
781 | rst.append(b'\n%s\n' % msg) |
|
781 | rst.append(b'\n%s\n' % msg) | |
782 | except KeyError: |
|
782 | except KeyError: | |
783 | pass |
|
783 | pass | |
784 |
|
784 | |||
785 | # options |
|
785 | # options | |
786 | if not ui.quiet and entry[1]: |
|
786 | if not ui.quiet and entry[1]: | |
787 | rst.append(optrst(_(b"options"), entry[1], ui.verbose, ui)) |
|
787 | rst.append(optrst(_(b"options"), entry[1], ui.verbose, ui)) | |
788 |
|
788 | |||
789 | if ui.verbose: |
|
789 | if ui.verbose: | |
790 | rst.append( |
|
790 | rst.append( | |
791 | optrst( |
|
791 | optrst( | |
792 | _(b"global options"), commands.globalopts, ui.verbose, ui |
|
792 | _(b"global options"), commands.globalopts, ui.verbose, ui | |
793 | ) |
|
793 | ) | |
794 | ) |
|
794 | ) | |
795 |
|
795 | |||
796 | if not ui.verbose: |
|
796 | if not ui.verbose: | |
797 | if not full: |
|
797 | if not full: | |
798 | rst.append(_(b"\n(use 'hg %s -h' to show more help)\n") % name) |
|
798 | rst.append(_(b"\n(use 'hg %s -h' to show more help)\n") % name) | |
799 | elif not ui.quiet: |
|
799 | elif not ui.quiet: | |
800 | rst.append( |
|
800 | rst.append( | |
801 | _( |
|
801 | _( | |
802 | b'\n(some details hidden, use --verbose ' |
|
802 | b'\n(some details hidden, use --verbose ' | |
803 | b'to show complete help)' |
|
803 | b'to show complete help)' | |
804 | ) |
|
804 | ) | |
805 | ) |
|
805 | ) | |
806 |
|
806 | |||
807 | return rst |
|
807 | return rst | |
808 |
|
808 | |||
809 | def helplist(select=None, **opts): |
|
809 | def helplist(select=None, **opts): | |
810 | cats, h, syns = _getcategorizedhelpcmds( |
|
810 | cats, h, syns = _getcategorizedhelpcmds( | |
811 | ui, commands.table, name, select |
|
811 | ui, commands.table, name, select | |
812 | ) |
|
812 | ) | |
813 |
|
813 | |||
814 | rst = [] |
|
814 | rst = [] | |
815 | if not h: |
|
815 | if not h: | |
816 | if not ui.quiet: |
|
816 | if not ui.quiet: | |
817 | rst.append(_(b'no commands defined\n')) |
|
817 | rst.append(_(b'no commands defined\n')) | |
818 | return rst |
|
818 | return rst | |
819 |
|
819 | |||
820 | # Output top header. |
|
820 | # Output top header. | |
821 | if not ui.quiet: |
|
821 | if not ui.quiet: | |
822 | if name == b"shortlist": |
|
822 | if name == b"shortlist": | |
823 | rst.append(_(b'basic commands:\n\n')) |
|
823 | rst.append(_(b'basic commands:\n\n')) | |
824 | elif name == b"debug": |
|
824 | elif name == b"debug": | |
825 | rst.append(_(b'debug commands (internal and unsupported):\n\n')) |
|
825 | rst.append(_(b'debug commands (internal and unsupported):\n\n')) | |
826 | else: |
|
826 | else: | |
827 | rst.append(_(b'list of commands:\n')) |
|
827 | rst.append(_(b'list of commands:\n')) | |
828 |
|
828 | |||
829 | def appendcmds(cmds): |
|
829 | def appendcmds(cmds): | |
830 | cmds = sorted(cmds) |
|
830 | cmds = sorted(cmds) | |
831 | for c in cmds: |
|
831 | for c in cmds: | |
832 | if ui.verbose: |
|
832 | if ui.verbose: | |
833 | rst.append(b" :%s: %s\n" % (b', '.join(syns[c]), h[c])) |
|
833 | rst.append(b" :%s: %s\n" % (b', '.join(syns[c]), h[c])) | |
834 | else: |
|
834 | else: | |
835 | rst.append(b' :%s: %s\n' % (c, h[c])) |
|
835 | rst.append(b' :%s: %s\n' % (c, h[c])) | |
836 |
|
836 | |||
837 | if name in (b'shortlist', b'debug'): |
|
837 | if name in (b'shortlist', b'debug'): | |
838 | # List without categories. |
|
838 | # List without categories. | |
839 | appendcmds(h) |
|
839 | appendcmds(h) | |
840 | else: |
|
840 | else: | |
841 | # Check that all categories have an order. |
|
841 | # Check that all categories have an order. | |
842 | missing_order = set(cats.keys()) - set(CATEGORY_ORDER) |
|
842 | missing_order = set(cats.keys()) - set(CATEGORY_ORDER) | |
843 | if missing_order: |
|
843 | if missing_order: | |
844 | ui.develwarn( |
|
844 | ui.develwarn( | |
845 | b'help categories missing from CATEGORY_ORDER: %s' |
|
845 | b'help categories missing from CATEGORY_ORDER: %s' | |
846 | % missing_order |
|
846 | % missing_order | |
847 | ) |
|
847 | ) | |
848 |
|
848 | |||
849 | # List per category. |
|
849 | # List per category. | |
850 | for cat in CATEGORY_ORDER: |
|
850 | for cat in CATEGORY_ORDER: | |
851 | catfns = cats.get(cat, []) |
|
851 | catfns = cats.get(cat, []) | |
852 | if catfns: |
|
852 | if catfns: | |
853 | if len(cats) > 1: |
|
853 | if len(cats) > 1: | |
854 | catname = gettext(CATEGORY_NAMES[cat]) |
|
854 | catname = gettext(CATEGORY_NAMES[cat]) | |
855 | rst.append(b"\n%s:\n" % catname) |
|
855 | rst.append(b"\n%s:\n" % catname) | |
856 | rst.append(b"\n") |
|
856 | rst.append(b"\n") | |
857 | appendcmds(catfns) |
|
857 | appendcmds(catfns) | |
858 |
|
858 | |||
859 | ex = opts.get |
|
859 | ex = opts.get | |
860 | anyopts = ex('keyword') or not (ex('command') or ex('extension')) |
|
860 | anyopts = ex('keyword') or not (ex('command') or ex('extension')) | |
861 | if not name and anyopts: |
|
861 | if not name and anyopts: | |
862 | exts = listexts( |
|
862 | exts = listexts( | |
863 | _(b'enabled extensions:'), |
|
863 | _(b'enabled extensions:'), | |
864 | extensions.enabled(), |
|
864 | extensions.enabled(), | |
865 | showdeprecated=ui.verbose, |
|
865 | showdeprecated=ui.verbose, | |
866 | ) |
|
866 | ) | |
867 | if exts: |
|
867 | if exts: | |
868 | rst.append(b'\n') |
|
868 | rst.append(b'\n') | |
869 | rst.extend(exts) |
|
869 | rst.extend(exts) | |
870 |
|
870 | |||
871 | rst.append(_(b"\nadditional help topics:\n")) |
|
871 | rst.append(_(b"\nadditional help topics:\n")) | |
872 | topiccats, topicsyns = _getcategorizedhelptopics(ui, helptable) |
|
872 | topiccats, topicsyns = _getcategorizedhelptopics(ui, helptable) | |
873 |
|
873 | |||
874 | # Check that all categories have an order. |
|
874 | # Check that all categories have an order. | |
875 | missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER) |
|
875 | missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER) | |
876 | if missing_order: |
|
876 | if missing_order: | |
877 | ui.develwarn( |
|
877 | ui.develwarn( | |
878 | b'help categories missing from TOPIC_CATEGORY_ORDER: %s' |
|
878 | b'help categories missing from TOPIC_CATEGORY_ORDER: %s' | |
879 | % missing_order |
|
879 | % missing_order | |
880 | ) |
|
880 | ) | |
881 |
|
881 | |||
882 | # Output topics per category. |
|
882 | # Output topics per category. | |
883 | for cat in TOPIC_CATEGORY_ORDER: |
|
883 | for cat in TOPIC_CATEGORY_ORDER: | |
884 | topics = topiccats.get(cat, []) |
|
884 | topics = topiccats.get(cat, []) | |
885 | if topics: |
|
885 | if topics: | |
886 | if len(topiccats) > 1: |
|
886 | if len(topiccats) > 1: | |
887 | catname = gettext(TOPIC_CATEGORY_NAMES[cat]) |
|
887 | catname = gettext(TOPIC_CATEGORY_NAMES[cat]) | |
888 | rst.append(b"\n%s:\n" % catname) |
|
888 | rst.append(b"\n%s:\n" % catname) | |
889 | rst.append(b"\n") |
|
889 | rst.append(b"\n") | |
890 | for t, desc in topics: |
|
890 | for t, desc in topics: | |
891 | rst.append(b" :%s: %s\n" % (t, desc)) |
|
891 | rst.append(b" :%s: %s\n" % (t, desc)) | |
892 |
|
892 | |||
893 | if ui.quiet: |
|
893 | if ui.quiet: | |
894 | pass |
|
894 | pass | |
895 | elif ui.verbose: |
|
895 | elif ui.verbose: | |
896 | rst.append( |
|
896 | rst.append( | |
897 | b'\n%s\n' |
|
897 | b'\n%s\n' | |
898 | % optrst( |
|
898 | % optrst( | |
899 | _(b"global options"), commands.globalopts, ui.verbose, ui |
|
899 | _(b"global options"), commands.globalopts, ui.verbose, ui | |
900 | ) |
|
900 | ) | |
901 | ) |
|
901 | ) | |
902 | if name == b'shortlist': |
|
902 | if name == b'shortlist': | |
903 | rst.append( |
|
903 | rst.append( | |
904 | _(b"\n(use 'hg help' for the full list of commands)\n") |
|
904 | _(b"\n(use 'hg help' for the full list of commands)\n") | |
905 | ) |
|
905 | ) | |
906 | else: |
|
906 | else: | |
907 | if name == b'shortlist': |
|
907 | if name == b'shortlist': | |
908 | rst.append( |
|
908 | rst.append( | |
909 | _( |
|
909 | _( | |
910 | b"\n(use 'hg help' for the full list of commands " |
|
910 | b"\n(use 'hg help' for the full list of commands " | |
911 | b"or 'hg -v' for details)\n" |
|
911 | b"or 'hg -v' for details)\n" | |
912 | ) |
|
912 | ) | |
913 | ) |
|
913 | ) | |
914 | elif name and not full: |
|
914 | elif name and not full: | |
915 | rst.append( |
|
915 | rst.append( | |
916 | _(b"\n(use 'hg help %s' to show the full help text)\n") |
|
916 | _(b"\n(use 'hg help %s' to show the full help text)\n") | |
917 | % name |
|
917 | % name | |
918 | ) |
|
918 | ) | |
919 | elif name and syns and name in syns.keys(): |
|
919 | elif name and syns and name in syns.keys(): | |
920 | rst.append( |
|
920 | rst.append( | |
921 | _( |
|
921 | _( | |
922 | b"\n(use 'hg help -v -e %s' to show built-in " |
|
922 | b"\n(use 'hg help -v -e %s' to show built-in " | |
923 | b"aliases and global options)\n" |
|
923 | b"aliases and global options)\n" | |
924 | ) |
|
924 | ) | |
925 | % name |
|
925 | % name | |
926 | ) |
|
926 | ) | |
927 | else: |
|
927 | else: | |
928 | rst.append( |
|
928 | rst.append( | |
929 | _( |
|
929 | _( | |
930 | b"\n(use 'hg help -v%s' to show built-in aliases " |
|
930 | b"\n(use 'hg help -v%s' to show built-in aliases " | |
931 | b"and global options)\n" |
|
931 | b"and global options)\n" | |
932 | ) |
|
932 | ) | |
933 | % (name and b" " + name or b"") |
|
933 | % (name and b" " + name or b"") | |
934 | ) |
|
934 | ) | |
935 | return rst |
|
935 | return rst | |
936 |
|
936 | |||
937 | def helptopic(name, subtopic=None): |
|
937 | def helptopic(name, subtopic=None): | |
938 | # Look for sub-topic entry first. |
|
938 | # Look for sub-topic entry first. | |
939 | header, doc = None, None |
|
939 | header, doc = None, None | |
940 | if subtopic and name in subtopics: |
|
940 | if subtopic and name in subtopics: | |
941 | for names, header, doc in subtopics[name]: |
|
941 | for names, header, doc in subtopics[name]: | |
942 | if subtopic in names: |
|
942 | if subtopic in names: | |
943 | break |
|
943 | break | |
944 | if not any(subtopic in s[0] for s in subtopics[name]): |
|
944 | if not any(subtopic in s[0] for s in subtopics[name]): | |
945 | raise error.UnknownCommand(name) |
|
945 | raise error.UnknownCommand(name) | |
946 |
|
946 | |||
947 | if not header: |
|
947 | if not header: | |
948 | for topic in helptable: |
|
948 | for topic in helptable: | |
949 | names, header, doc = topic[0:3] |
|
949 | names, header, doc = topic[0:3] | |
950 | if name in names: |
|
950 | if name in names: | |
951 | break |
|
951 | break | |
952 | else: |
|
952 | else: | |
953 | raise error.UnknownCommand(name) |
|
953 | raise error.UnknownCommand(name) | |
954 |
|
954 | |||
955 | rst = [minirst.section(header)] |
|
955 | rst = [minirst.section(header)] | |
956 |
|
956 | |||
957 | # description |
|
957 | # description | |
958 | if not doc: |
|
958 | if not doc: | |
959 | rst.append(b" %s\n" % _(b"(no help text available)")) |
|
959 | rst.append(b" %s\n" % _(b"(no help text available)")) | |
960 | if callable(doc): |
|
960 | if callable(doc): | |
961 | rst += [b" %s\n" % l for l in doc(ui).splitlines()] |
|
961 | rst += [b" %s\n" % l for l in doc(ui).splitlines()] | |
962 |
|
962 | |||
963 | if not ui.verbose: |
|
963 | if not ui.verbose: | |
964 | omitted = _( |
|
964 | omitted = _( | |
965 | b'(some details hidden, use --verbose' |
|
965 | b'(some details hidden, use --verbose' | |
966 | b' to show complete help)' |
|
966 | b' to show complete help)' | |
967 | ) |
|
967 | ) | |
968 | indicateomitted(rst, omitted) |
|
968 | indicateomitted(rst, omitted) | |
969 |
|
969 | |||
970 | try: |
|
970 | try: | |
971 | cmdutil.findcmd(name, commands.table) |
|
971 | cmdutil.findcmd(name, commands.table) | |
972 | rst.append( |
|
972 | rst.append( | |
973 | _(b"\nuse 'hg help -c %s' to see help for the %s command\n") |
|
973 | _(b"\nuse 'hg help -c %s' to see help for the %s command\n") | |
974 | % (name, name) |
|
974 | % (name, name) | |
975 | ) |
|
975 | ) | |
976 | except error.UnknownCommand: |
|
976 | except error.UnknownCommand: | |
977 | pass |
|
977 | pass | |
978 | return rst |
|
978 | return rst | |
979 |
|
979 | |||
980 | def helpext(name, subtopic=None): |
|
980 | def helpext(name, subtopic=None): | |
981 | try: |
|
981 | try: | |
982 | mod = extensions.find(name) |
|
982 | mod = extensions.find(name) | |
983 | doc = gettext(pycompat.getdoc(mod)) or _(b'no help text available') |
|
983 | doc = gettext(pycompat.getdoc(mod)) or _(b'no help text available') | |
984 | except KeyError: |
|
984 | except KeyError: | |
985 | mod = None |
|
985 | mod = None | |
986 | doc = extensions.disabled_help(name) |
|
986 | doc = extensions.disabled_help(name) | |
987 | if not doc: |
|
987 | if not doc: | |
988 | raise error.UnknownCommand(name) |
|
988 | raise error.UnknownCommand(name) | |
989 |
|
989 | |||
990 | if b'\n' not in doc: |
|
990 | if b'\n' not in doc: | |
991 | head, tail = doc, b"" |
|
991 | head, tail = doc, b"" | |
992 | else: |
|
992 | else: | |
993 | head, tail = doc.split(b'\n', 1) |
|
993 | head, tail = doc.split(b'\n', 1) | |
994 | rst = [_(b'%s extension - %s\n\n') % (name.rpartition(b'.')[-1], head)] |
|
994 | rst = [_(b'%s extension - %s\n\n') % (name.rpartition(b'.')[-1], head)] | |
995 | if tail: |
|
995 | if tail: | |
996 | rst.extend(tail.splitlines(True)) |
|
996 | rst.extend(tail.splitlines(True)) | |
997 | rst.append(b'\n') |
|
997 | rst.append(b'\n') | |
998 |
|
998 | |||
999 | if not ui.verbose: |
|
999 | if not ui.verbose: | |
1000 | omitted = _( |
|
1000 | omitted = _( | |
1001 | b'(some details hidden, use --verbose' |
|
1001 | b'(some details hidden, use --verbose' | |
1002 | b' to show complete help)' |
|
1002 | b' to show complete help)' | |
1003 | ) |
|
1003 | ) | |
1004 | indicateomitted(rst, omitted) |
|
1004 | indicateomitted(rst, omitted) | |
1005 |
|
1005 | |||
1006 | if mod: |
|
1006 | if mod: | |
1007 | try: |
|
1007 | try: | |
1008 | ct = mod.cmdtable |
|
1008 | ct = mod.cmdtable | |
1009 | except AttributeError: |
|
1009 | except AttributeError: | |
1010 | ct = {} |
|
1010 | ct = {} | |
1011 | modcmds = {c.partition(b'|')[0] for c in ct} |
|
1011 | modcmds = {c.partition(b'|')[0] for c in ct} | |
1012 | rst.extend(helplist(modcmds.__contains__)) |
|
1012 | rst.extend(helplist(modcmds.__contains__)) | |
1013 | else: |
|
1013 | else: | |
1014 | rst.append( |
|
1014 | rst.append( | |
1015 | _( |
|
1015 | _( | |
1016 | b"(use 'hg help extensions' for information on enabling" |
|
1016 | b"(use 'hg help extensions' for information on enabling" | |
1017 | b" extensions)\n" |
|
1017 | b" extensions)\n" | |
1018 | ) |
|
1018 | ) | |
1019 | ) |
|
1019 | ) | |
1020 | return rst |
|
1020 | return rst | |
1021 |
|
1021 | |||
1022 | def helpextcmd(name, subtopic=None): |
|
1022 | def helpextcmd(name, subtopic=None): | |
1023 | cmd, ext, doc = extensions.disabledcmd( |
|
1023 | cmd, ext, doc = extensions.disabledcmd( | |
1024 | ui, name, ui.configbool(b'ui', b'strict') |
|
1024 | ui, name, ui.configbool(b'ui', b'strict') | |
1025 | ) |
|
1025 | ) | |
1026 | doc = doc.splitlines()[0] |
|
1026 | doc = doc.splitlines()[0] | |
1027 |
|
1027 | |||
1028 | rst = listexts( |
|
1028 | rst = listexts( | |
1029 | _(b"'%s' is provided by the following extension:") % cmd, |
|
1029 | _(b"'%s' is provided by the following extension:") % cmd, | |
1030 | {ext: doc}, |
|
1030 | {ext: doc}, | |
1031 | indent=4, |
|
1031 | indent=4, | |
1032 | showdeprecated=True, |
|
1032 | showdeprecated=True, | |
1033 | ) |
|
1033 | ) | |
1034 | rst.append(b'\n') |
|
1034 | rst.append(b'\n') | |
1035 | rst.append( |
|
1035 | rst.append( | |
1036 | _( |
|
1036 | _( | |
1037 | b"(use 'hg help extensions' for information on enabling " |
|
1037 | b"(use 'hg help extensions' for information on enabling " | |
1038 | b"extensions)\n" |
|
1038 | b"extensions)\n" | |
1039 | ) |
|
1039 | ) | |
1040 | ) |
|
1040 | ) | |
1041 | return rst |
|
1041 | return rst | |
1042 |
|
1042 | |||
1043 | rst = [] |
|
1043 | rst = [] | |
1044 | kw = opts.get(b'keyword') |
|
1044 | kw = opts.get(b'keyword') | |
1045 | if kw or name is None and any(opts[o] for o in opts): |
|
1045 | if kw or name is None and any(opts[o] for o in opts): | |
1046 | matches = topicmatch(ui, commands, name or b'') |
|
1046 | matches = topicmatch(ui, commands, name or b'') | |
1047 | helpareas = [] |
|
1047 | helpareas = [] | |
1048 | if opts.get(b'extension'): |
|
1048 | if opts.get(b'extension'): | |
1049 | helpareas += [(b'extensions', _(b'Extensions'))] |
|
1049 | helpareas += [(b'extensions', _(b'Extensions'))] | |
1050 | if opts.get(b'command'): |
|
1050 | if opts.get(b'command'): | |
1051 | helpareas += [(b'commands', _(b'Commands'))] |
|
1051 | helpareas += [(b'commands', _(b'Commands'))] | |
1052 | if not helpareas: |
|
1052 | if not helpareas: | |
1053 | helpareas = [ |
|
1053 | helpareas = [ | |
1054 | (b'topics', _(b'Topics')), |
|
1054 | (b'topics', _(b'Topics')), | |
1055 | (b'commands', _(b'Commands')), |
|
1055 | (b'commands', _(b'Commands')), | |
1056 | (b'extensions', _(b'Extensions')), |
|
1056 | (b'extensions', _(b'Extensions')), | |
1057 | (b'extensioncommands', _(b'Extension Commands')), |
|
1057 | (b'extensioncommands', _(b'Extension Commands')), | |
1058 | ] |
|
1058 | ] | |
1059 | for t, title in helpareas: |
|
1059 | for t, title in helpareas: | |
1060 | if matches[t]: |
|
1060 | if matches[t]: | |
1061 | rst.append(b'%s:\n\n' % title) |
|
1061 | rst.append(b'%s:\n\n' % title) | |
1062 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) |
|
1062 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) | |
1063 | rst.append(b'\n') |
|
1063 | rst.append(b'\n') | |
1064 | if not rst: |
|
1064 | if not rst: | |
1065 | msg = _(b'no matches') |
|
1065 | msg = _(b'no matches') | |
1066 | hint = _(b"try 'hg help' for a list of topics") |
|
1066 | hint = _(b"try 'hg help' for a list of topics") | |
1067 |
raise error. |
|
1067 | raise error.InputError(msg, hint=hint) | |
1068 | elif name and name != b'shortlist': |
|
1068 | elif name and name != b'shortlist': | |
1069 | queries = [] |
|
1069 | queries = [] | |
1070 | if unknowncmd: |
|
1070 | if unknowncmd: | |
1071 | queries += [helpextcmd] |
|
1071 | queries += [helpextcmd] | |
1072 | if opts.get(b'extension'): |
|
1072 | if opts.get(b'extension'): | |
1073 | queries += [helpext] |
|
1073 | queries += [helpext] | |
1074 | if opts.get(b'command'): |
|
1074 | if opts.get(b'command'): | |
1075 | queries += [helpcmd] |
|
1075 | queries += [helpcmd] | |
1076 | if not queries: |
|
1076 | if not queries: | |
1077 | queries = (helptopic, helpcmd, helpext, helpextcmd) |
|
1077 | queries = (helptopic, helpcmd, helpext, helpextcmd) | |
1078 | for f in queries: |
|
1078 | for f in queries: | |
1079 | try: |
|
1079 | try: | |
1080 | rst = f(name, subtopic) |
|
1080 | rst = f(name, subtopic) | |
1081 | break |
|
1081 | break | |
1082 | except error.UnknownCommand: |
|
1082 | except error.UnknownCommand: | |
1083 | pass |
|
1083 | pass | |
1084 | else: |
|
1084 | else: | |
1085 | if unknowncmd: |
|
1085 | if unknowncmd: | |
1086 | raise error.UnknownCommand(name) |
|
1086 | raise error.UnknownCommand(name) | |
1087 | else: |
|
1087 | else: | |
1088 | if fullname: |
|
1088 | if fullname: | |
1089 | formatname = fullname |
|
1089 | formatname = fullname | |
1090 | else: |
|
1090 | else: | |
1091 | formatname = name |
|
1091 | formatname = name | |
1092 | if subtopic: |
|
1092 | if subtopic: | |
1093 | hintname = subtopic |
|
1093 | hintname = subtopic | |
1094 | else: |
|
1094 | else: | |
1095 | hintname = name |
|
1095 | hintname = name | |
1096 | msg = _(b'no such help topic: %s') % formatname |
|
1096 | msg = _(b'no such help topic: %s') % formatname | |
1097 | hint = _(b"try 'hg help --keyword %s'") % hintname |
|
1097 | hint = _(b"try 'hg help --keyword %s'") % hintname | |
1098 |
raise error. |
|
1098 | raise error.InputError(msg, hint=hint) | |
1099 | else: |
|
1099 | else: | |
1100 | # program name |
|
1100 | # program name | |
1101 | if not ui.quiet: |
|
1101 | if not ui.quiet: | |
1102 | rst = [_(b"Mercurial Distributed SCM\n"), b'\n'] |
|
1102 | rst = [_(b"Mercurial Distributed SCM\n"), b'\n'] | |
1103 | rst.extend(helplist(None, **pycompat.strkwargs(opts))) |
|
1103 | rst.extend(helplist(None, **pycompat.strkwargs(opts))) | |
1104 |
|
1104 | |||
1105 | return b''.join(rst) |
|
1105 | return b''.join(rst) | |
1106 |
|
1106 | |||
1107 |
|
1107 | |||
1108 | def formattedhelp( |
|
1108 | def formattedhelp( | |
1109 | ui, commands, fullname, keep=None, unknowncmd=False, full=True, **opts |
|
1109 | ui, commands, fullname, keep=None, unknowncmd=False, full=True, **opts | |
1110 | ): |
|
1110 | ): | |
1111 | """get help for a given topic (as a dotted name) as rendered rst |
|
1111 | """get help for a given topic (as a dotted name) as rendered rst | |
1112 |
|
1112 | |||
1113 | Either returns the rendered help text or raises an exception. |
|
1113 | Either returns the rendered help text or raises an exception. | |
1114 | """ |
|
1114 | """ | |
1115 | if keep is None: |
|
1115 | if keep is None: | |
1116 | keep = [] |
|
1116 | keep = [] | |
1117 | else: |
|
1117 | else: | |
1118 | keep = list(keep) # make a copy so we can mutate this later |
|
1118 | keep = list(keep) # make a copy so we can mutate this later | |
1119 |
|
1119 | |||
1120 | # <fullname> := <name>[.<subtopic][.<section>] |
|
1120 | # <fullname> := <name>[.<subtopic][.<section>] | |
1121 | name = subtopic = section = None |
|
1121 | name = subtopic = section = None | |
1122 | if fullname is not None: |
|
1122 | if fullname is not None: | |
1123 | nameparts = fullname.split(b'.') |
|
1123 | nameparts = fullname.split(b'.') | |
1124 | name = nameparts.pop(0) |
|
1124 | name = nameparts.pop(0) | |
1125 | if nameparts and name in subtopics: |
|
1125 | if nameparts and name in subtopics: | |
1126 | subtopic = nameparts.pop(0) |
|
1126 | subtopic = nameparts.pop(0) | |
1127 | if nameparts: |
|
1127 | if nameparts: | |
1128 | section = encoding.lower(b'.'.join(nameparts)) |
|
1128 | section = encoding.lower(b'.'.join(nameparts)) | |
1129 |
|
1129 | |||
1130 | textwidth = ui.configint(b'ui', b'textwidth') |
|
1130 | textwidth = ui.configint(b'ui', b'textwidth') | |
1131 | termwidth = ui.termwidth() - 2 |
|
1131 | termwidth = ui.termwidth() - 2 | |
1132 | if textwidth <= 0 or termwidth < textwidth: |
|
1132 | if textwidth <= 0 or termwidth < textwidth: | |
1133 | textwidth = termwidth |
|
1133 | textwidth = termwidth | |
1134 | text = help_( |
|
1134 | text = help_( | |
1135 | ui, |
|
1135 | ui, | |
1136 | commands, |
|
1136 | commands, | |
1137 | name, |
|
1137 | name, | |
1138 | fullname=fullname, |
|
1138 | fullname=fullname, | |
1139 | subtopic=subtopic, |
|
1139 | subtopic=subtopic, | |
1140 | unknowncmd=unknowncmd, |
|
1140 | unknowncmd=unknowncmd, | |
1141 | full=full, |
|
1141 | full=full, | |
1142 | **opts |
|
1142 | **opts | |
1143 | ) |
|
1143 | ) | |
1144 |
|
1144 | |||
1145 | blocks, pruned = minirst.parse(text, keep=keep) |
|
1145 | blocks, pruned = minirst.parse(text, keep=keep) | |
1146 | if b'verbose' in pruned: |
|
1146 | if b'verbose' in pruned: | |
1147 | keep.append(b'omitted') |
|
1147 | keep.append(b'omitted') | |
1148 | else: |
|
1148 | else: | |
1149 | keep.append(b'notomitted') |
|
1149 | keep.append(b'notomitted') | |
1150 | blocks, pruned = minirst.parse(text, keep=keep) |
|
1150 | blocks, pruned = minirst.parse(text, keep=keep) | |
1151 | if section: |
|
1151 | if section: | |
1152 | blocks = minirst.filtersections(blocks, section) |
|
1152 | blocks = minirst.filtersections(blocks, section) | |
1153 |
|
1153 | |||
1154 | # We could have been given a weird ".foo" section without a name |
|
1154 | # We could have been given a weird ".foo" section without a name | |
1155 | # to look for, or we could have simply failed to found "foo.bar" |
|
1155 | # to look for, or we could have simply failed to found "foo.bar" | |
1156 | # because bar isn't a section of foo |
|
1156 | # because bar isn't a section of foo | |
1157 | if section and not (blocks and name): |
|
1157 | if section and not (blocks and name): | |
1158 |
raise error. |
|
1158 | raise error.InputError(_(b"help section not found: %s") % fullname) | |
1159 |
|
1159 | |||
1160 | return minirst.formatplain(blocks, textwidth) |
|
1160 | return minirst.formatplain(blocks, textwidth) |
@@ -1,555 +1,555 | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
2 | $ echo "extdiff=" >> $HGRCPATH |
|
2 | $ echo "extdiff=" >> $HGRCPATH | |
3 |
|
3 | |||
4 | $ hg init a |
|
4 | $ hg init a | |
5 | $ cd a |
|
5 | $ cd a | |
6 | $ echo a > a |
|
6 | $ echo a > a | |
7 | $ echo b > b |
|
7 | $ echo b > b | |
8 | $ hg add |
|
8 | $ hg add | |
9 | adding a |
|
9 | adding a | |
10 | adding b |
|
10 | adding b | |
11 |
|
11 | |||
12 | Should diff cloned directories: |
|
12 | Should diff cloned directories: | |
13 |
|
13 | |||
14 | $ hg extdiff -o -r |
|
14 | $ hg extdiff -o -r | |
15 | Only in a: a |
|
15 | Only in a: a | |
16 | Only in a: b |
|
16 | Only in a: b | |
17 | [1] |
|
17 | [1] | |
18 |
|
18 | |||
19 | $ cat <<EOF >> $HGRCPATH |
|
19 | $ cat <<EOF >> $HGRCPATH | |
20 | > [extdiff] |
|
20 | > [extdiff] | |
21 | > cmd.falabala = echo |
|
21 | > cmd.falabala = echo | |
22 | > opts.falabala = diffing |
|
22 | > opts.falabala = diffing | |
23 | > cmd.edspace = echo |
|
23 | > cmd.edspace = echo | |
24 | > opts.edspace = "name <user@example.com>" |
|
24 | > opts.edspace = "name <user@example.com>" | |
25 | > alabalaf = |
|
25 | > alabalaf = | |
26 | > [merge-tools] |
|
26 | > [merge-tools] | |
27 | > alabalaf.executable = echo |
|
27 | > alabalaf.executable = echo | |
28 | > alabalaf.diffargs = diffing |
|
28 | > alabalaf.diffargs = diffing | |
29 | > EOF |
|
29 | > EOF | |
30 |
|
30 | |||
31 | $ hg falabala |
|
31 | $ hg falabala | |
32 | diffing a.000000000000 a |
|
32 | diffing a.000000000000 a | |
33 | [1] |
|
33 | [1] | |
34 |
|
34 | |||
35 | $ hg help falabala |
|
35 | $ hg help falabala | |
36 | hg falabala [OPTION]... [FILE]... |
|
36 | hg falabala [OPTION]... [FILE]... | |
37 |
|
37 | |||
38 | use external program to diff repository (or selected files) |
|
38 | use external program to diff repository (or selected files) | |
39 |
|
39 | |||
40 | Show differences between revisions for the specified files, using the |
|
40 | Show differences between revisions for the specified files, using the | |
41 | following program: |
|
41 | following program: | |
42 |
|
42 | |||
43 | 'echo' |
|
43 | 'echo' | |
44 |
|
44 | |||
45 | When two revision arguments are given, then changes are shown between |
|
45 | When two revision arguments are given, then changes are shown between | |
46 | those revisions. If only one revision is specified then that revision is |
|
46 | those revisions. If only one revision is specified then that revision is | |
47 | compared to the working directory, and, when no revisions are specified, |
|
47 | compared to the working directory, and, when no revisions are specified, | |
48 | the working directory files are compared to its parent. |
|
48 | the working directory files are compared to its parent. | |
49 |
|
49 | |||
50 | options ([+] can be repeated): |
|
50 | options ([+] can be repeated): | |
51 |
|
51 | |||
52 | -o --option OPT [+] pass option to comparison program |
|
52 | -o --option OPT [+] pass option to comparison program | |
53 | --from REV1 revision to diff from |
|
53 | --from REV1 revision to diff from | |
54 | --to REV2 revision to diff to |
|
54 | --to REV2 revision to diff to | |
55 | -c --change REV change made by revision |
|
55 | -c --change REV change made by revision | |
56 | --per-file compare each file instead of revision snapshots |
|
56 | --per-file compare each file instead of revision snapshots | |
57 | --confirm prompt user before each external program invocation |
|
57 | --confirm prompt user before each external program invocation | |
58 | --patch compare patches for two revisions |
|
58 | --patch compare patches for two revisions | |
59 | -I --include PATTERN [+] include names matching the given patterns |
|
59 | -I --include PATTERN [+] include names matching the given patterns | |
60 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
60 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
61 | -S --subrepos recurse into subrepositories |
|
61 | -S --subrepos recurse into subrepositories | |
62 |
|
62 | |||
63 | (some details hidden, use --verbose to show complete help) |
|
63 | (some details hidden, use --verbose to show complete help) | |
64 |
|
64 | |||
65 | $ hg ci -d '0 0' -mtest1 |
|
65 | $ hg ci -d '0 0' -mtest1 | |
66 |
|
66 | |||
67 | $ echo b >> a |
|
67 | $ echo b >> a | |
68 | $ hg ci -d '1 0' -mtest2 |
|
68 | $ hg ci -d '1 0' -mtest2 | |
69 |
|
69 | |||
70 | Should diff cloned files directly: |
|
70 | Should diff cloned files directly: | |
71 |
|
71 | |||
72 | $ hg falabala --from 0 --to 1 |
|
72 | $ hg falabala --from 0 --to 1 | |
73 | diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
73 | diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
74 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) |
|
74 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) | |
75 | [1] |
|
75 | [1] | |
76 |
|
76 | |||
77 | Can show diff from working copy: |
|
77 | Can show diff from working copy: | |
78 | $ echo c >> a |
|
78 | $ echo c >> a | |
79 | $ hg falabala --to 1 |
|
79 | $ hg falabala --to 1 | |
80 | diffing "*\\extdiff.*\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
80 | diffing "*\\extdiff.*\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
81 | diffing */extdiff.*/a a.34eed99112ab/a (glob) (no-windows !) |
|
81 | diffing */extdiff.*/a a.34eed99112ab/a (glob) (no-windows !) | |
82 | [1] |
|
82 | [1] | |
83 | $ hg revert a |
|
83 | $ hg revert a | |
84 | $ rm a.orig |
|
84 | $ rm a.orig | |
85 |
|
85 | |||
86 | Specifying an empty revision should abort. |
|
86 | Specifying an empty revision should abort. | |
87 |
|
87 | |||
88 | $ hg extdiff -p diff --patch --rev 'ancestor()' --rev 1 |
|
88 | $ hg extdiff -p diff --patch --rev 'ancestor()' --rev 1 | |
89 | abort: empty revision on one side of range |
|
89 | abort: empty revision on one side of range | |
90 | [255] |
|
90 | [255] | |
91 |
|
91 | |||
92 | Test diff during merge: |
|
92 | Test diff during merge: | |
93 |
|
93 | |||
94 | $ hg update -C 0 |
|
94 | $ hg update -C 0 | |
95 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
95 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
96 | $ echo c >> c |
|
96 | $ echo c >> c | |
97 | $ hg add c |
|
97 | $ hg add c | |
98 | $ hg ci -m "new branch" -d '1 0' |
|
98 | $ hg ci -m "new branch" -d '1 0' | |
99 | created new head |
|
99 | created new head | |
100 | $ hg merge 1 |
|
100 | $ hg merge 1 | |
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 | (branch merge, don't forget to commit) |
|
102 | (branch merge, don't forget to commit) | |
103 |
|
103 | |||
104 | Should diff cloned file against wc file: |
|
104 | Should diff cloned file against wc file: | |
105 |
|
105 | |||
106 | $ hg falabala |
|
106 | $ hg falabala | |
107 | diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "*\\a\\a" (glob) (windows !) |
|
107 | diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "*\\a\\a" (glob) (windows !) | |
108 | diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob) (no-windows !) |
|
108 | diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob) (no-windows !) | |
109 | [1] |
|
109 | [1] | |
110 |
|
110 | |||
111 |
|
111 | |||
112 | Test --change option: |
|
112 | Test --change option: | |
113 |
|
113 | |||
114 | $ hg ci -d '2 0' -mtest3 |
|
114 | $ hg ci -d '2 0' -mtest3 | |
115 |
|
115 | |||
116 | $ hg falabala -c 1 |
|
116 | $ hg falabala -c 1 | |
117 | diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
117 | diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
118 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) |
|
118 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) | |
119 | [1] |
|
119 | [1] | |
120 |
|
120 | |||
121 | Check diff are made from the first parent: |
|
121 | Check diff are made from the first parent: | |
122 |
|
122 | |||
123 | $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code" |
|
123 | $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code" | |
124 | diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "a.46c0e4daeb72\\a" (glob) (windows !) |
|
124 | diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "a.46c0e4daeb72\\a" (glob) (windows !) | |
125 | diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob) (no-windows !) |
|
125 | diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob) (no-windows !) | |
126 | diff-like tools yield a non-zero exit code |
|
126 | diff-like tools yield a non-zero exit code | |
127 |
|
127 | |||
128 | issue3153: ensure using extdiff with removed subrepos doesn't crash: |
|
128 | issue3153: ensure using extdiff with removed subrepos doesn't crash: | |
129 |
|
129 | |||
130 | $ hg init suba |
|
130 | $ hg init suba | |
131 | $ cd suba |
|
131 | $ cd suba | |
132 | $ echo suba > suba |
|
132 | $ echo suba > suba | |
133 | $ hg add |
|
133 | $ hg add | |
134 | adding suba |
|
134 | adding suba | |
135 | $ hg ci -m "adding suba file" |
|
135 | $ hg ci -m "adding suba file" | |
136 | $ cd .. |
|
136 | $ cd .. | |
137 | $ echo suba=suba > .hgsub |
|
137 | $ echo suba=suba > .hgsub | |
138 | $ hg add |
|
138 | $ hg add | |
139 | adding .hgsub |
|
139 | adding .hgsub | |
140 | $ hg ci -Sm "adding subrepo" |
|
140 | $ hg ci -Sm "adding subrepo" | |
141 | $ echo > .hgsub |
|
141 | $ echo > .hgsub | |
142 | $ hg ci -m "removing subrepo" |
|
142 | $ hg ci -m "removing subrepo" | |
143 | $ hg falabala --from 4 --to 5 -S |
|
143 | $ hg falabala --from 4 --to 5 -S | |
144 | diffing a.398e36faf9c6 a.5ab95fb166c4 |
|
144 | diffing a.398e36faf9c6 a.5ab95fb166c4 | |
145 | [1] |
|
145 | [1] | |
146 |
|
146 | |||
147 | Test --per-file option: |
|
147 | Test --per-file option: | |
148 |
|
148 | |||
149 | $ hg up -q -C 3 |
|
149 | $ hg up -q -C 3 | |
150 | $ echo a2 > a |
|
150 | $ echo a2 > a | |
151 | $ echo b2 > b |
|
151 | $ echo b2 > b | |
152 | $ hg ci -d '3 0' -mtestmode1 |
|
152 | $ hg ci -d '3 0' -mtestmode1 | |
153 | created new head |
|
153 | created new head | |
154 | $ hg falabala -c 6 --per-file |
|
154 | $ hg falabala -c 6 --per-file | |
155 | diffing "*\\extdiff.*\\a.46c0e4daeb72\\a" "a.81906f2b98ac\\a" (glob) (windows !) |
|
155 | diffing "*\\extdiff.*\\a.46c0e4daeb72\\a" "a.81906f2b98ac\\a" (glob) (windows !) | |
156 | diffing */extdiff.*/a.46c0e4daeb72/a a.81906f2b98ac/a (glob) (no-windows !) |
|
156 | diffing */extdiff.*/a.46c0e4daeb72/a a.81906f2b98ac/a (glob) (no-windows !) | |
157 | diffing "*\\extdiff.*\\a.46c0e4daeb72\\b" "a.81906f2b98ac\\b" (glob) (windows !) |
|
157 | diffing "*\\extdiff.*\\a.46c0e4daeb72\\b" "a.81906f2b98ac\\b" (glob) (windows !) | |
158 | diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) (no-windows !) |
|
158 | diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) (no-windows !) | |
159 | [1] |
|
159 | [1] | |
160 |
|
160 | |||
161 | Test --per-file option for gui tool: |
|
161 | Test --per-file option for gui tool: | |
162 |
|
162 | |||
163 | $ hg --config extdiff.gui.alabalaf=True alabalaf -c 6 --per-file --debug |
|
163 | $ hg --config extdiff.gui.alabalaf=True alabalaf -c 6 --per-file --debug | |
164 | diffing */extdiff.*/a.46c0e4daeb72/* a.81906f2b98ac/* (glob) |
|
164 | diffing */extdiff.*/a.46c0e4daeb72/* a.81906f2b98ac/* (glob) | |
165 | diffing */extdiff.*/a.46c0e4daeb72/* a.81906f2b98ac/* (glob) |
|
165 | diffing */extdiff.*/a.46c0e4daeb72/* a.81906f2b98ac/* (glob) | |
166 | making snapshot of 2 files from rev 46c0e4daeb72 |
|
166 | making snapshot of 2 files from rev 46c0e4daeb72 | |
167 | a |
|
167 | a | |
168 | b |
|
168 | b | |
169 | making snapshot of 2 files from rev 81906f2b98ac |
|
169 | making snapshot of 2 files from rev 81906f2b98ac | |
170 | a |
|
170 | a | |
171 | b |
|
171 | b | |
172 | running '* diffing * *' in * (backgrounded) (glob) |
|
172 | running '* diffing * *' in * (backgrounded) (glob) | |
173 | running '* diffing * *' in * (backgrounded) (glob) |
|
173 | running '* diffing * *' in * (backgrounded) (glob) | |
174 | cleaning up temp directory |
|
174 | cleaning up temp directory | |
175 | [1] |
|
175 | [1] | |
176 |
|
176 | |||
177 | Test --per-file option for gui tool again: |
|
177 | Test --per-file option for gui tool again: | |
178 |
|
178 | |||
179 | $ hg --config merge-tools.alabalaf.gui=True alabalaf -c 6 --per-file --debug |
|
179 | $ hg --config merge-tools.alabalaf.gui=True alabalaf -c 6 --per-file --debug | |
180 | diffing */extdiff.*/a.46c0e4daeb72/* a.81906f2b98ac/* (glob) |
|
180 | diffing */extdiff.*/a.46c0e4daeb72/* a.81906f2b98ac/* (glob) | |
181 | diffing */extdiff.*/a.46c0e4daeb72/* a.81906f2b98ac/* (glob) |
|
181 | diffing */extdiff.*/a.46c0e4daeb72/* a.81906f2b98ac/* (glob) | |
182 | making snapshot of 2 files from rev 46c0e4daeb72 |
|
182 | making snapshot of 2 files from rev 46c0e4daeb72 | |
183 | a |
|
183 | a | |
184 | b |
|
184 | b | |
185 | making snapshot of 2 files from rev 81906f2b98ac |
|
185 | making snapshot of 2 files from rev 81906f2b98ac | |
186 | a |
|
186 | a | |
187 | b |
|
187 | b | |
188 | running '* diffing * *' in * (backgrounded) (glob) |
|
188 | running '* diffing * *' in * (backgrounded) (glob) | |
189 | running '* diffing * *' in * (backgrounded) (glob) |
|
189 | running '* diffing * *' in * (backgrounded) (glob) | |
190 | cleaning up temp directory |
|
190 | cleaning up temp directory | |
191 | [1] |
|
191 | [1] | |
192 |
|
192 | |||
193 | Test --per-file and --confirm options: |
|
193 | Test --per-file and --confirm options: | |
194 |
|
194 | |||
195 | $ hg --config ui.interactive=True falabala -c 6 --per-file --confirm <<EOF |
|
195 | $ hg --config ui.interactive=True falabala -c 6 --per-file --confirm <<EOF | |
196 | > n |
|
196 | > n | |
197 | > y |
|
197 | > y | |
198 | > EOF |
|
198 | > EOF | |
199 | diff a (1 of 2) [Yns?] n |
|
199 | diff a (1 of 2) [Yns?] n | |
200 | diff b (2 of 2) [Yns?] y |
|
200 | diff b (2 of 2) [Yns?] y | |
201 | diffing "*\\extdiff.*\\a.46c0e4daeb72\\b" "a.81906f2b98ac\\b" (glob) (windows !) |
|
201 | diffing "*\\extdiff.*\\a.46c0e4daeb72\\b" "a.81906f2b98ac\\b" (glob) (windows !) | |
202 | diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) (no-windows !) |
|
202 | diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) (no-windows !) | |
203 | [1] |
|
203 | [1] | |
204 |
|
204 | |||
205 | Test --per-file and --confirm options with skipping: |
|
205 | Test --per-file and --confirm options with skipping: | |
206 |
|
206 | |||
207 | $ hg --config ui.interactive=True falabala -c 6 --per-file --confirm <<EOF |
|
207 | $ hg --config ui.interactive=True falabala -c 6 --per-file --confirm <<EOF | |
208 | > s |
|
208 | > s | |
209 | > EOF |
|
209 | > EOF | |
210 | diff a (1 of 2) [Yns?] s |
|
210 | diff a (1 of 2) [Yns?] s | |
211 | [1] |
|
211 | [1] | |
212 |
|
212 | |||
213 | issue4463: usage of command line configuration without additional quoting |
|
213 | issue4463: usage of command line configuration without additional quoting | |
214 |
|
214 | |||
215 | $ cat <<EOF >> $HGRCPATH |
|
215 | $ cat <<EOF >> $HGRCPATH | |
216 | > [extdiff] |
|
216 | > [extdiff] | |
217 | > cmd.4463a = echo |
|
217 | > cmd.4463a = echo | |
218 | > opts.4463a = a-naked 'single quoted' "double quoted" |
|
218 | > opts.4463a = a-naked 'single quoted' "double quoted" | |
219 | > 4463b = echo b-naked 'single quoted' "double quoted" |
|
219 | > 4463b = echo b-naked 'single quoted' "double quoted" | |
220 | > echo = |
|
220 | > echo = | |
221 | > EOF |
|
221 | > EOF | |
222 | $ hg update -q -C 0 |
|
222 | $ hg update -q -C 0 | |
223 | $ echo a >> a |
|
223 | $ echo a >> a | |
224 |
|
224 | |||
225 | $ hg --debug 4463a | grep '^running' |
|
225 | $ hg --debug 4463a | grep '^running' | |
226 | running 'echo a-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) |
|
226 | running 'echo a-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) | |
227 | running 'echo a-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) |
|
227 | running 'echo a-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) | |
228 | $ hg --debug 4463b | grep '^running' |
|
228 | $ hg --debug 4463b | grep '^running' | |
229 | running 'echo b-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) |
|
229 | running 'echo b-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) | |
230 | running 'echo b-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) |
|
230 | running 'echo b-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) | |
231 | $ hg --debug echo | grep '^running' |
|
231 | $ hg --debug echo | grep '^running' | |
232 | running '*echo* "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) |
|
232 | running '*echo* "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) | |
233 | running '*echo */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) |
|
233 | running '*echo */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) | |
234 |
|
234 | |||
235 | (getting options from other than extdiff section) |
|
235 | (getting options from other than extdiff section) | |
236 |
|
236 | |||
237 | $ cat <<EOF >> $HGRCPATH |
|
237 | $ cat <<EOF >> $HGRCPATH | |
238 | > [extdiff] |
|
238 | > [extdiff] | |
239 | > # using diff-tools diffargs |
|
239 | > # using diff-tools diffargs | |
240 | > 4463b2 = echo |
|
240 | > 4463b2 = echo | |
241 | > # using merge-tools diffargs |
|
241 | > # using merge-tools diffargs | |
242 | > 4463b3 = echo |
|
242 | > 4463b3 = echo | |
243 | > # no diffargs |
|
243 | > # no diffargs | |
244 | > 4463b4 = echo |
|
244 | > 4463b4 = echo | |
245 | > [diff-tools] |
|
245 | > [diff-tools] | |
246 | > 4463b2.diffargs = b2-naked 'single quoted' "double quoted" |
|
246 | > 4463b2.diffargs = b2-naked 'single quoted' "double quoted" | |
247 | > [merge-tools] |
|
247 | > [merge-tools] | |
248 | > 4463b3.diffargs = b3-naked 'single quoted' "double quoted" |
|
248 | > 4463b3.diffargs = b3-naked 'single quoted' "double quoted" | |
249 | > EOF |
|
249 | > EOF | |
250 |
|
250 | |||
251 | $ hg --debug 4463b2 | grep '^running' |
|
251 | $ hg --debug 4463b2 | grep '^running' | |
252 | running 'echo b2-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) |
|
252 | running 'echo b2-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) | |
253 | running 'echo b2-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) |
|
253 | running 'echo b2-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) | |
254 | $ hg --debug 4463b3 | grep '^running' |
|
254 | $ hg --debug 4463b3 | grep '^running' | |
255 | running 'echo b3-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) |
|
255 | running 'echo b3-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) | |
256 | running 'echo b3-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) |
|
256 | running 'echo b3-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) | |
257 | $ hg --debug 4463b4 | grep '^running' |
|
257 | $ hg --debug 4463b4 | grep '^running' | |
258 | running 'echo "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) |
|
258 | running 'echo "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) | |
259 | running 'echo */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) |
|
259 | running 'echo */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !) | |
260 | $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running' |
|
260 | $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running' | |
261 | running 'echo b4-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) |
|
261 | running 'echo b4-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) | |
262 | running "echo b4-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob) (no-windows !) |
|
262 | running "echo b4-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob) (no-windows !) | |
263 | $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running' |
|
263 | $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running' | |
264 | running 'echo echo-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) |
|
264 | running 'echo echo-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !) | |
265 | running "echo echo-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob) (no-windows !) |
|
265 | running "echo echo-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob) (no-windows !) | |
266 |
|
266 | |||
267 | $ touch 'sp ace' |
|
267 | $ touch 'sp ace' | |
268 | $ hg add 'sp ace' |
|
268 | $ hg add 'sp ace' | |
269 | $ hg ci -m 'sp ace' |
|
269 | $ hg ci -m 'sp ace' | |
270 | created new head |
|
270 | created new head | |
271 | $ echo > 'sp ace' |
|
271 | $ echo > 'sp ace' | |
272 |
|
272 | |||
273 | Test pre-72a89cf86fcd backward compatibility with half-baked manual quoting |
|
273 | Test pre-72a89cf86fcd backward compatibility with half-baked manual quoting | |
274 |
|
274 | |||
275 | $ cat <<EOF >> $HGRCPATH |
|
275 | $ cat <<EOF >> $HGRCPATH | |
276 | > [extdiff] |
|
276 | > [extdiff] | |
277 | > odd = |
|
277 | > odd = | |
278 | > [merge-tools] |
|
278 | > [merge-tools] | |
279 | > odd.diffargs = --foo='\$clabel' '\$clabel' "--bar=\$clabel" "\$clabel" |
|
279 | > odd.diffargs = --foo='\$clabel' '\$clabel' "--bar=\$clabel" "\$clabel" | |
280 | > odd.executable = echo |
|
280 | > odd.executable = echo | |
281 | > EOF |
|
281 | > EOF | |
282 |
|
282 | |||
283 | $ hg --debug odd | grep '^running' |
|
283 | $ hg --debug odd | grep '^running' | |
284 | running '"*\\echo.exe" --foo="sp ace" "sp ace" --bar="sp ace" "sp ace"' in * (glob) (windows !) |
|
284 | running '"*\\echo.exe" --foo="sp ace" "sp ace" --bar="sp ace" "sp ace"' in * (glob) (windows !) | |
285 | running "*/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob) (no-windows !) |
|
285 | running "*/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob) (no-windows !) | |
286 |
|
286 | |||
287 | Empty argument must be quoted |
|
287 | Empty argument must be quoted | |
288 |
|
288 | |||
289 | $ cat <<EOF >> $HGRCPATH |
|
289 | $ cat <<EOF >> $HGRCPATH | |
290 | > [extdiff] |
|
290 | > [extdiff] | |
291 | > kdiff3 = echo |
|
291 | > kdiff3 = echo | |
292 | > [merge-tools] |
|
292 | > [merge-tools] | |
293 | > kdiff3.diffargs=--L1 \$plabel1 --L2 \$clabel \$parent \$child |
|
293 | > kdiff3.diffargs=--L1 \$plabel1 --L2 \$clabel \$parent \$child | |
294 | > EOF |
|
294 | > EOF | |
295 |
|
295 | |||
296 | $ hg --debug kdiff3 --from 0 | grep '^running' |
|
296 | $ hg --debug kdiff3 --from 0 | grep '^running' | |
297 | running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob) (windows !) |
|
297 | running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob) (windows !) | |
298 | running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob) (no-windows !) |
|
298 | running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob) (no-windows !) | |
299 |
|
299 | |||
300 |
|
300 | |||
301 | Test extdiff of multiple files in tmp dir: |
|
301 | Test extdiff of multiple files in tmp dir: | |
302 |
|
302 | |||
303 | $ hg update -C 0 > /dev/null |
|
303 | $ hg update -C 0 > /dev/null | |
304 | $ echo changed > a |
|
304 | $ echo changed > a | |
305 | $ echo changed > b |
|
305 | $ echo changed > b | |
306 | #if execbit |
|
306 | #if execbit | |
307 | $ chmod +x b |
|
307 | $ chmod +x b | |
308 | #endif |
|
308 | #endif | |
309 |
|
309 | |||
310 | Diff in working directory, before: |
|
310 | Diff in working directory, before: | |
311 |
|
311 | |||
312 | $ hg diff --git |
|
312 | $ hg diff --git | |
313 | diff --git a/a b/a |
|
313 | diff --git a/a b/a | |
314 | --- a/a |
|
314 | --- a/a | |
315 | +++ b/a |
|
315 | +++ b/a | |
316 | @@ -1,1 +1,1 @@ |
|
316 | @@ -1,1 +1,1 @@ | |
317 | -a |
|
317 | -a | |
318 | +changed |
|
318 | +changed | |
319 | diff --git a/b b/b |
|
319 | diff --git a/b b/b | |
320 | old mode 100644 (execbit !) |
|
320 | old mode 100644 (execbit !) | |
321 | new mode 100755 (execbit !) |
|
321 | new mode 100755 (execbit !) | |
322 | --- a/b |
|
322 | --- a/b | |
323 | +++ b/b |
|
323 | +++ b/b | |
324 | @@ -1,1 +1,1 @@ |
|
324 | @@ -1,1 +1,1 @@ | |
325 | -b |
|
325 | -b | |
326 | +changed |
|
326 | +changed | |
327 |
|
327 | |||
328 |
|
328 | |||
329 | Edit with extdiff -p: |
|
329 | Edit with extdiff -p: | |
330 |
|
330 | |||
331 | Prepare custom diff/edit tool: |
|
331 | Prepare custom diff/edit tool: | |
332 |
|
332 | |||
333 | $ cat > 'diff tool.py' << EOT |
|
333 | $ cat > 'diff tool.py' << EOT | |
334 | > #!$PYTHON |
|
334 | > #!$PYTHON | |
335 | > import time |
|
335 | > import time | |
336 | > time.sleep(1) # avoid unchanged-timestamp problems |
|
336 | > time.sleep(1) # avoid unchanged-timestamp problems | |
337 | > open('a/a', 'ab').write(b'edited\n') |
|
337 | > open('a/a', 'ab').write(b'edited\n') | |
338 | > open('a/b', 'ab').write(b'edited\n') |
|
338 | > open('a/b', 'ab').write(b'edited\n') | |
339 | > EOT |
|
339 | > EOT | |
340 |
|
340 | |||
341 | #if execbit |
|
341 | #if execbit | |
342 | $ chmod +x 'diff tool.py' |
|
342 | $ chmod +x 'diff tool.py' | |
343 | #endif |
|
343 | #endif | |
344 |
|
344 | |||
345 | will change to /tmp/extdiff.TMP and populate directories a.TMP and a |
|
345 | will change to /tmp/extdiff.TMP and populate directories a.TMP and a | |
346 | and start tool |
|
346 | and start tool | |
347 |
|
347 | |||
348 | #if windows |
|
348 | #if windows | |
349 | $ cat > 'diff tool.bat' << EOF |
|
349 | $ cat > 'diff tool.bat' << EOF | |
350 | > @"$PYTHON" "`pwd`/diff tool.py" |
|
350 | > @"$PYTHON" "`pwd`/diff tool.py" | |
351 | > EOF |
|
351 | > EOF | |
352 | $ hg extdiff -p "`pwd`/diff tool.bat" |
|
352 | $ hg extdiff -p "`pwd`/diff tool.bat" | |
353 | [1] |
|
353 | [1] | |
354 | #else |
|
354 | #else | |
355 | $ hg extdiff -p "`pwd`/diff tool.py" |
|
355 | $ hg extdiff -p "`pwd`/diff tool.py" | |
356 | [1] |
|
356 | [1] | |
357 | #endif |
|
357 | #endif | |
358 |
|
358 | |||
359 | Diff in working directory, after: |
|
359 | Diff in working directory, after: | |
360 |
|
360 | |||
361 | $ hg diff --git |
|
361 | $ hg diff --git | |
362 | diff --git a/a b/a |
|
362 | diff --git a/a b/a | |
363 | --- a/a |
|
363 | --- a/a | |
364 | +++ b/a |
|
364 | +++ b/a | |
365 | @@ -1,1 +1,2 @@ |
|
365 | @@ -1,1 +1,2 @@ | |
366 | -a |
|
366 | -a | |
367 | +changed |
|
367 | +changed | |
368 | +edited |
|
368 | +edited | |
369 | diff --git a/b b/b |
|
369 | diff --git a/b b/b | |
370 | old mode 100644 (execbit !) |
|
370 | old mode 100644 (execbit !) | |
371 | new mode 100755 (execbit !) |
|
371 | new mode 100755 (execbit !) | |
372 | --- a/b |
|
372 | --- a/b | |
373 | +++ b/b |
|
373 | +++ b/b | |
374 | @@ -1,1 +1,2 @@ |
|
374 | @@ -1,1 +1,2 @@ | |
375 | -b |
|
375 | -b | |
376 | +changed |
|
376 | +changed | |
377 | +edited |
|
377 | +edited | |
378 |
|
378 | |||
379 | Test extdiff with --option: |
|
379 | Test extdiff with --option: | |
380 |
|
380 | |||
381 | $ hg extdiff -p echo -o this -c 1 |
|
381 | $ hg extdiff -p echo -o this -c 1 | |
382 | this "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
382 | this "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
383 | this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) |
|
383 | this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) | |
384 | [1] |
|
384 | [1] | |
385 |
|
385 | |||
386 | $ hg falabala -o this -c 1 |
|
386 | $ hg falabala -o this -c 1 | |
387 | diffing this "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
387 | diffing this "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
388 | diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) |
|
388 | diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) | |
389 | [1] |
|
389 | [1] | |
390 |
|
390 | |||
391 | Test extdiff's handling of options with spaces in them: |
|
391 | Test extdiff's handling of options with spaces in them: | |
392 |
|
392 | |||
393 | $ hg edspace -c 1 |
|
393 | $ hg edspace -c 1 | |
394 | "name <user@example.com>" "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
394 | "name <user@example.com>" "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
395 | name <user@example.com> */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) |
|
395 | name <user@example.com> */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) | |
396 | [1] |
|
396 | [1] | |
397 |
|
397 | |||
398 | $ hg extdiff -p echo -o "name <user@example.com>" -c 1 |
|
398 | $ hg extdiff -p echo -o "name <user@example.com>" -c 1 | |
399 | "name <user@example.com>" "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
399 | "name <user@example.com>" "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
400 | name <user@example.com> */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) |
|
400 | name <user@example.com> */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) | |
401 | [1] |
|
401 | [1] | |
402 |
|
402 | |||
403 | Test with revsets: |
|
403 | Test with revsets: | |
404 |
|
404 | |||
405 | $ hg extdif -p echo -c "rev(1)" |
|
405 | $ hg extdif -p echo -c "rev(1)" | |
406 | "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
406 | "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
407 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) |
|
407 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) | |
408 | [1] |
|
408 | [1] | |
409 |
|
409 | |||
410 | $ hg extdif -p echo -r "0::1" |
|
410 | $ hg extdif -p echo -r "0::1" | |
411 | "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) |
|
411 | "*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !) | |
412 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) |
|
412 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !) | |
413 | [1] |
|
413 | [1] | |
414 |
|
414 | |||
415 | Fallback to merge-tools.tool.executable|regkey |
|
415 | Fallback to merge-tools.tool.executable|regkey | |
416 | $ mkdir dir |
|
416 | $ mkdir dir | |
417 | $ cat > 'dir/tool.sh' << 'EOF' |
|
417 | $ cat > 'dir/tool.sh' << 'EOF' | |
418 | > #!/bin/sh |
|
418 | > #!/bin/sh | |
419 | > # Mimic a tool that syncs all attrs, including mtime |
|
419 | > # Mimic a tool that syncs all attrs, including mtime | |
420 | > cp $1/a $2/a |
|
420 | > cp $1/a $2/a | |
421 | > touch -r $1/a $2/a |
|
421 | > touch -r $1/a $2/a | |
422 | > chmod +x $2/a |
|
422 | > chmod +x $2/a | |
423 | > echo "** custom diff **" |
|
423 | > echo "** custom diff **" | |
424 | > EOF |
|
424 | > EOF | |
425 | #if execbit |
|
425 | #if execbit | |
426 | $ chmod +x dir/tool.sh |
|
426 | $ chmod +x dir/tool.sh | |
427 | #endif |
|
427 | #endif | |
428 |
|
428 | |||
429 | Windows can't run *.sh directly, so create a shim executable that can be. |
|
429 | Windows can't run *.sh directly, so create a shim executable that can be. | |
430 | Without something executable, the next hg command will try to run `tl` instead |
|
430 | Without something executable, the next hg command will try to run `tl` instead | |
431 | of $tool (and fail). |
|
431 | of $tool (and fail). | |
432 | #if windows |
|
432 | #if windows | |
433 | $ cat > dir/tool.bat <<EOF |
|
433 | $ cat > dir/tool.bat <<EOF | |
434 | > @sh -c "`pwd`/dir/tool.sh %1 %2" |
|
434 | > @sh -c "`pwd`/dir/tool.sh %1 %2" | |
435 | > EOF |
|
435 | > EOF | |
436 | $ tool=`pwd`/dir/tool.bat |
|
436 | $ tool=`pwd`/dir/tool.bat | |
437 | #else |
|
437 | #else | |
438 | $ tool=`pwd`/dir/tool.sh |
|
438 | $ tool=`pwd`/dir/tool.sh | |
439 | #endif |
|
439 | #endif | |
440 |
|
440 | |||
441 | $ cat a |
|
441 | $ cat a | |
442 | changed |
|
442 | changed | |
443 | edited |
|
443 | edited | |
444 | $ hg --debug tl --config extdiff.tl= --config merge-tools.tl.executable=$tool |
|
444 | $ hg --debug tl --config extdiff.tl= --config merge-tools.tl.executable=$tool | |
445 | making snapshot of 2 files from rev * (glob) |
|
445 | making snapshot of 2 files from rev * (glob) | |
446 | a |
|
446 | a | |
447 | b |
|
447 | b | |
448 | making snapshot of 2 files from working directory |
|
448 | making snapshot of 2 files from working directory | |
449 | a |
|
449 | a | |
450 | b |
|
450 | b | |
451 | running '$TESTTMP/a/dir/tool.bat a.* a' in */extdiff.* (glob) (windows !) |
|
451 | running '$TESTTMP/a/dir/tool.bat a.* a' in */extdiff.* (glob) (windows !) | |
452 | running '$TESTTMP/a/dir/tool.sh a.* a' in */extdiff.* (glob) (no-windows !) |
|
452 | running '$TESTTMP/a/dir/tool.sh a.* a' in */extdiff.* (glob) (no-windows !) | |
453 | ** custom diff ** |
|
453 | ** custom diff ** | |
454 | file changed while diffing. Overwriting: $TESTTMP/a/a (src: */extdiff.*/a/a) (glob) |
|
454 | file changed while diffing. Overwriting: $TESTTMP/a/a (src: */extdiff.*/a/a) (glob) | |
455 | cleaning up temp directory |
|
455 | cleaning up temp directory | |
456 | [1] |
|
456 | [1] | |
457 | $ cat a |
|
457 | $ cat a | |
458 | a |
|
458 | a | |
459 |
|
459 | |||
460 | #if execbit |
|
460 | #if execbit | |
461 | $ [ -x a ] |
|
461 | $ [ -x a ] | |
462 |
|
462 | |||
463 | $ cat > 'dir/tool.sh' << 'EOF' |
|
463 | $ cat > 'dir/tool.sh' << 'EOF' | |
464 | > #!/bin/sh |
|
464 | > #!/bin/sh | |
465 | > chmod -x $2/a |
|
465 | > chmod -x $2/a | |
466 | > echo "** custom diff **" |
|
466 | > echo "** custom diff **" | |
467 | > EOF |
|
467 | > EOF | |
468 |
|
468 | |||
469 | $ hg --debug tl --config extdiff.tl= --config merge-tools.tl.executable=$tool |
|
469 | $ hg --debug tl --config extdiff.tl= --config merge-tools.tl.executable=$tool | |
470 | making snapshot of 2 files from rev * (glob) |
|
470 | making snapshot of 2 files from rev * (glob) | |
471 | a |
|
471 | a | |
472 | b |
|
472 | b | |
473 | making snapshot of 2 files from working directory |
|
473 | making snapshot of 2 files from working directory | |
474 | a |
|
474 | a | |
475 | b |
|
475 | b | |
476 | running '$TESTTMP/a/dir/tool.sh a.* a' in */extdiff.* (glob) |
|
476 | running '$TESTTMP/a/dir/tool.sh a.* a' in */extdiff.* (glob) | |
477 | ** custom diff ** |
|
477 | ** custom diff ** | |
478 | file changed while diffing. Overwriting: $TESTTMP/a/a (src: */extdiff.*/a/a) (glob) |
|
478 | file changed while diffing. Overwriting: $TESTTMP/a/a (src: */extdiff.*/a/a) (glob) | |
479 | cleaning up temp directory |
|
479 | cleaning up temp directory | |
480 | [1] |
|
480 | [1] | |
481 |
|
481 | |||
482 | $ [ -x a ] |
|
482 | $ [ -x a ] | |
483 | [1] |
|
483 | [1] | |
484 | #endif |
|
484 | #endif | |
485 |
|
485 | |||
486 | $ cd .. |
|
486 | $ cd .. | |
487 |
|
487 | |||
488 | #if symlink |
|
488 | #if symlink | |
489 |
|
489 | |||
490 | Test symlinks handling (issue1909) |
|
490 | Test symlinks handling (issue1909) | |
491 |
|
491 | |||
492 | $ hg init testsymlinks |
|
492 | $ hg init testsymlinks | |
493 | $ cd testsymlinks |
|
493 | $ cd testsymlinks | |
494 | $ echo a > a |
|
494 | $ echo a > a | |
495 | $ hg ci -Am adda |
|
495 | $ hg ci -Am adda | |
496 | adding a |
|
496 | adding a | |
497 | $ echo a >> a |
|
497 | $ echo a >> a | |
498 | $ ln -s missing linka |
|
498 | $ ln -s missing linka | |
499 | $ hg add linka |
|
499 | $ hg add linka | |
500 | $ hg falabala --from 0 --traceback |
|
500 | $ hg falabala --from 0 --traceback | |
501 | diffing testsymlinks.07f494440405 testsymlinks |
|
501 | diffing testsymlinks.07f494440405 testsymlinks | |
502 | [1] |
|
502 | [1] | |
503 | $ cd .. |
|
503 | $ cd .. | |
504 |
|
504 | |||
505 | #endif |
|
505 | #endif | |
506 |
|
506 | |||
507 | Test handling of non-ASCII paths in generated docstrings (issue5301) |
|
507 | Test handling of non-ASCII paths in generated docstrings (issue5301) | |
508 |
|
508 | |||
509 | >>> with open("u", "wb") as f: |
|
509 | >>> with open("u", "wb") as f: | |
510 | ... n = f.write(b"\xa5\xa5") |
|
510 | ... n = f.write(b"\xa5\xa5") | |
511 | $ U=`cat u` |
|
511 | $ U=`cat u` | |
512 |
|
512 | |||
513 | $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help -k xyzzy |
|
513 | $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help -k xyzzy | |
514 | abort: no matches |
|
514 | abort: no matches | |
515 | (try 'hg help' for a list of topics) |
|
515 | (try 'hg help' for a list of topics) | |
516 |
[ |
|
516 | [10] | |
517 |
|
517 | |||
518 | $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help td > /dev/null |
|
518 | $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help td > /dev/null | |
519 |
|
519 | |||
520 | $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help -k xyzzy |
|
520 | $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help -k xyzzy | |
521 | abort: no matches |
|
521 | abort: no matches | |
522 | (try 'hg help' for a list of topics) |
|
522 | (try 'hg help' for a list of topics) | |
523 |
[ |
|
523 | [10] | |
524 |
|
524 | |||
525 | $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td \ |
|
525 | $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td \ | |
526 | > | grep "^ '" |
|
526 | > | grep "^ '" | |
527 | '\xa5\xa5' |
|
527 | '\xa5\xa5' | |
528 |
|
528 | |||
529 | $ cd $TESTTMP |
|
529 | $ cd $TESTTMP | |
530 |
|
530 | |||
531 | Test that diffing a single file works, even if that file is new |
|
531 | Test that diffing a single file works, even if that file is new | |
532 |
|
532 | |||
533 | $ hg init testsinglefile |
|
533 | $ hg init testsinglefile | |
534 | $ cd testsinglefile |
|
534 | $ cd testsinglefile | |
535 | $ echo a > a |
|
535 | $ echo a > a | |
536 | $ hg add a |
|
536 | $ hg add a | |
537 | $ hg falabala |
|
537 | $ hg falabala | |
538 | diffing nul "*\\a" (glob) (windows !) |
|
538 | diffing nul "*\\a" (glob) (windows !) | |
539 | diffing /dev/null */a (glob) (no-windows !) |
|
539 | diffing /dev/null */a (glob) (no-windows !) | |
540 | [1] |
|
540 | [1] | |
541 | $ hg ci -qm a |
|
541 | $ hg ci -qm a | |
542 | $ hg falabala -c . |
|
542 | $ hg falabala -c . | |
543 | diffing nul "*\\a" (glob) (windows !) |
|
543 | diffing nul "*\\a" (glob) (windows !) | |
544 | diffing /dev/null */a (glob) (no-windows !) |
|
544 | diffing /dev/null */a (glob) (no-windows !) | |
545 | [1] |
|
545 | [1] | |
546 | $ echo a >> a |
|
546 | $ echo a >> a | |
547 | $ hg falabala |
|
547 | $ hg falabala | |
548 | diffing "*\\a" "*\\a" (glob) (windows !) |
|
548 | diffing "*\\a" "*\\a" (glob) (windows !) | |
549 | diffing */a */a (glob) (no-windows !) |
|
549 | diffing */a */a (glob) (no-windows !) | |
550 | [1] |
|
550 | [1] | |
551 | $ hg ci -qm 2a |
|
551 | $ hg ci -qm 2a | |
552 | $ hg falabala -c . |
|
552 | $ hg falabala -c . | |
553 | diffing "*\\a" "*\\a" (glob) (windows !) |
|
553 | diffing "*\\a" "*\\a" (glob) (windows !) | |
554 | diffing */a */a (glob) (no-windows !) |
|
554 | diffing */a */a (glob) (no-windows !) | |
555 | [1] |
|
555 | [1] |
@@ -1,3932 +1,3932 | |||||
1 | Short help: |
|
1 | Short help: | |
2 |
|
2 | |||
3 | $ hg |
|
3 | $ hg | |
4 | Mercurial Distributed SCM |
|
4 | Mercurial Distributed SCM | |
5 |
|
5 | |||
6 | basic commands: |
|
6 | basic commands: | |
7 |
|
7 | |||
8 | add add the specified files on the next commit |
|
8 | add add the specified files on the next commit | |
9 | annotate show changeset information by line for each file |
|
9 | annotate show changeset information by line for each file | |
10 | clone make a copy of an existing repository |
|
10 | clone make a copy of an existing repository | |
11 | commit commit the specified files or all outstanding changes |
|
11 | commit commit the specified files or all outstanding changes | |
12 | diff diff repository (or selected files) |
|
12 | diff diff repository (or selected files) | |
13 | export dump the header and diffs for one or more changesets |
|
13 | export dump the header and diffs for one or more changesets | |
14 | forget forget the specified files on the next commit |
|
14 | forget forget the specified files on the next commit | |
15 | init create a new repository in the given directory |
|
15 | init create a new repository in the given directory | |
16 | log show revision history of entire repository or files |
|
16 | log show revision history of entire repository or files | |
17 | merge merge another revision into working directory |
|
17 | merge merge another revision into working directory | |
18 | pull pull changes from the specified source |
|
18 | pull pull changes from the specified source | |
19 | push push changes to the specified destination |
|
19 | push push changes to the specified destination | |
20 | remove remove the specified files on the next commit |
|
20 | remove remove the specified files on the next commit | |
21 | serve start stand-alone webserver |
|
21 | serve start stand-alone webserver | |
22 | status show changed files in the working directory |
|
22 | status show changed files in the working directory | |
23 | summary summarize working directory state |
|
23 | summary summarize working directory state | |
24 | update update working directory (or switch revisions) |
|
24 | update update working directory (or switch revisions) | |
25 |
|
25 | |||
26 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
26 | (use 'hg help' for the full list of commands or 'hg -v' for details) | |
27 |
|
27 | |||
28 | $ hg -q |
|
28 | $ hg -q | |
29 | add add the specified files on the next commit |
|
29 | add add the specified files on the next commit | |
30 | annotate show changeset information by line for each file |
|
30 | annotate show changeset information by line for each file | |
31 | clone make a copy of an existing repository |
|
31 | clone make a copy of an existing repository | |
32 | commit commit the specified files or all outstanding changes |
|
32 | commit commit the specified files or all outstanding changes | |
33 | diff diff repository (or selected files) |
|
33 | diff diff repository (or selected files) | |
34 | export dump the header and diffs for one or more changesets |
|
34 | export dump the header and diffs for one or more changesets | |
35 | forget forget the specified files on the next commit |
|
35 | forget forget the specified files on the next commit | |
36 | init create a new repository in the given directory |
|
36 | init create a new repository in the given directory | |
37 | log show revision history of entire repository or files |
|
37 | log show revision history of entire repository or files | |
38 | merge merge another revision into working directory |
|
38 | merge merge another revision into working directory | |
39 | pull pull changes from the specified source |
|
39 | pull pull changes from the specified source | |
40 | push push changes to the specified destination |
|
40 | push push changes to the specified destination | |
41 | remove remove the specified files on the next commit |
|
41 | remove remove the specified files on the next commit | |
42 | serve start stand-alone webserver |
|
42 | serve start stand-alone webserver | |
43 | status show changed files in the working directory |
|
43 | status show changed files in the working directory | |
44 | summary summarize working directory state |
|
44 | summary summarize working directory state | |
45 | update update working directory (or switch revisions) |
|
45 | update update working directory (or switch revisions) | |
46 |
|
46 | |||
47 | Extra extensions will be printed in help output in a non-reliable order since |
|
47 | Extra extensions will be printed in help output in a non-reliable order since | |
48 | the extension is unknown. |
|
48 | the extension is unknown. | |
49 | #if no-extraextensions |
|
49 | #if no-extraextensions | |
50 |
|
50 | |||
51 | $ hg help |
|
51 | $ hg help | |
52 | Mercurial Distributed SCM |
|
52 | Mercurial Distributed SCM | |
53 |
|
53 | |||
54 | list of commands: |
|
54 | list of commands: | |
55 |
|
55 | |||
56 | Repository creation: |
|
56 | Repository creation: | |
57 |
|
57 | |||
58 | clone make a copy of an existing repository |
|
58 | clone make a copy of an existing repository | |
59 | init create a new repository in the given directory |
|
59 | init create a new repository in the given directory | |
60 |
|
60 | |||
61 | Remote repository management: |
|
61 | Remote repository management: | |
62 |
|
62 | |||
63 | incoming show new changesets found in source |
|
63 | incoming show new changesets found in source | |
64 | outgoing show changesets not found in the destination |
|
64 | outgoing show changesets not found in the destination | |
65 | paths show aliases for remote repositories |
|
65 | paths show aliases for remote repositories | |
66 | pull pull changes from the specified source |
|
66 | pull pull changes from the specified source | |
67 | push push changes to the specified destination |
|
67 | push push changes to the specified destination | |
68 | serve start stand-alone webserver |
|
68 | serve start stand-alone webserver | |
69 |
|
69 | |||
70 | Change creation: |
|
70 | Change creation: | |
71 |
|
71 | |||
72 | commit commit the specified files or all outstanding changes |
|
72 | commit commit the specified files or all outstanding changes | |
73 |
|
73 | |||
74 | Change manipulation: |
|
74 | Change manipulation: | |
75 |
|
75 | |||
76 | backout reverse effect of earlier changeset |
|
76 | backout reverse effect of earlier changeset | |
77 | graft copy changes from other branches onto the current branch |
|
77 | graft copy changes from other branches onto the current branch | |
78 | merge merge another revision into working directory |
|
78 | merge merge another revision into working directory | |
79 |
|
79 | |||
80 | Change organization: |
|
80 | Change organization: | |
81 |
|
81 | |||
82 | bookmarks create a new bookmark or list existing bookmarks |
|
82 | bookmarks create a new bookmark or list existing bookmarks | |
83 | branch set or show the current branch name |
|
83 | branch set or show the current branch name | |
84 | branches list repository named branches |
|
84 | branches list repository named branches | |
85 | phase set or show the current phase name |
|
85 | phase set or show the current phase name | |
86 | tag add one or more tags for the current or given revision |
|
86 | tag add one or more tags for the current or given revision | |
87 | tags list repository tags |
|
87 | tags list repository tags | |
88 |
|
88 | |||
89 | File content management: |
|
89 | File content management: | |
90 |
|
90 | |||
91 | annotate show changeset information by line for each file |
|
91 | annotate show changeset information by line for each file | |
92 | cat output the current or given revision of files |
|
92 | cat output the current or given revision of files | |
93 | copy mark files as copied for the next commit |
|
93 | copy mark files as copied for the next commit | |
94 | diff diff repository (or selected files) |
|
94 | diff diff repository (or selected files) | |
95 | grep search for a pattern in specified files |
|
95 | grep search for a pattern in specified files | |
96 |
|
96 | |||
97 | Change navigation: |
|
97 | Change navigation: | |
98 |
|
98 | |||
99 | bisect subdivision search of changesets |
|
99 | bisect subdivision search of changesets | |
100 | heads show branch heads |
|
100 | heads show branch heads | |
101 | identify identify the working directory or specified revision |
|
101 | identify identify the working directory or specified revision | |
102 | log show revision history of entire repository or files |
|
102 | log show revision history of entire repository or files | |
103 |
|
103 | |||
104 | Working directory management: |
|
104 | Working directory management: | |
105 |
|
105 | |||
106 | add add the specified files on the next commit |
|
106 | add add the specified files on the next commit | |
107 | addremove add all new files, delete all missing files |
|
107 | addremove add all new files, delete all missing files | |
108 | files list tracked files |
|
108 | files list tracked files | |
109 | forget forget the specified files on the next commit |
|
109 | forget forget the specified files on the next commit | |
110 | remove remove the specified files on the next commit |
|
110 | remove remove the specified files on the next commit | |
111 | rename rename files; equivalent of copy + remove |
|
111 | rename rename files; equivalent of copy + remove | |
112 | resolve redo merges or set/view the merge status of files |
|
112 | resolve redo merges or set/view the merge status of files | |
113 | revert restore files to their checkout state |
|
113 | revert restore files to their checkout state | |
114 | root print the root (top) of the current working directory |
|
114 | root print the root (top) of the current working directory | |
115 | shelve save and set aside changes from the working directory |
|
115 | shelve save and set aside changes from the working directory | |
116 | status show changed files in the working directory |
|
116 | status show changed files in the working directory | |
117 | summary summarize working directory state |
|
117 | summary summarize working directory state | |
118 | unshelve restore a shelved change to the working directory |
|
118 | unshelve restore a shelved change to the working directory | |
119 | update update working directory (or switch revisions) |
|
119 | update update working directory (or switch revisions) | |
120 |
|
120 | |||
121 | Change import/export: |
|
121 | Change import/export: | |
122 |
|
122 | |||
123 | archive create an unversioned archive of a repository revision |
|
123 | archive create an unversioned archive of a repository revision | |
124 | bundle create a bundle file |
|
124 | bundle create a bundle file | |
125 | export dump the header and diffs for one or more changesets |
|
125 | export dump the header and diffs for one or more changesets | |
126 | import import an ordered set of patches |
|
126 | import import an ordered set of patches | |
127 | unbundle apply one or more bundle files |
|
127 | unbundle apply one or more bundle files | |
128 |
|
128 | |||
129 | Repository maintenance: |
|
129 | Repository maintenance: | |
130 |
|
130 | |||
131 | manifest output the current or given revision of the project manifest |
|
131 | manifest output the current or given revision of the project manifest | |
132 | recover roll back an interrupted transaction |
|
132 | recover roll back an interrupted transaction | |
133 | verify verify the integrity of the repository |
|
133 | verify verify the integrity of the repository | |
134 |
|
134 | |||
135 | Help: |
|
135 | Help: | |
136 |
|
136 | |||
137 | config show combined config settings from all hgrc files |
|
137 | config show combined config settings from all hgrc files | |
138 | help show help for a given topic or a help overview |
|
138 | help show help for a given topic or a help overview | |
139 | version output version and copyright information |
|
139 | version output version and copyright information | |
140 |
|
140 | |||
141 | additional help topics: |
|
141 | additional help topics: | |
142 |
|
142 | |||
143 | Mercurial identifiers: |
|
143 | Mercurial identifiers: | |
144 |
|
144 | |||
145 | filesets Specifying File Sets |
|
145 | filesets Specifying File Sets | |
146 | hgignore Syntax for Mercurial Ignore Files |
|
146 | hgignore Syntax for Mercurial Ignore Files | |
147 | patterns File Name Patterns |
|
147 | patterns File Name Patterns | |
148 | revisions Specifying Revisions |
|
148 | revisions Specifying Revisions | |
149 | urls URL Paths |
|
149 | urls URL Paths | |
150 |
|
150 | |||
151 | Mercurial output: |
|
151 | Mercurial output: | |
152 |
|
152 | |||
153 | color Colorizing Outputs |
|
153 | color Colorizing Outputs | |
154 | dates Date Formats |
|
154 | dates Date Formats | |
155 | diffs Diff Formats |
|
155 | diffs Diff Formats | |
156 | templating Template Usage |
|
156 | templating Template Usage | |
157 |
|
157 | |||
158 | Mercurial configuration: |
|
158 | Mercurial configuration: | |
159 |
|
159 | |||
160 | config Configuration Files |
|
160 | config Configuration Files | |
161 | environment Environment Variables |
|
161 | environment Environment Variables | |
162 | extensions Using Additional Features |
|
162 | extensions Using Additional Features | |
163 | flags Command-line flags |
|
163 | flags Command-line flags | |
164 | hgweb Configuring hgweb |
|
164 | hgweb Configuring hgweb | |
165 | merge-tools Merge Tools |
|
165 | merge-tools Merge Tools | |
166 | pager Pager Support |
|
166 | pager Pager Support | |
167 |
|
167 | |||
168 | Concepts: |
|
168 | Concepts: | |
169 |
|
169 | |||
170 | bundlespec Bundle File Formats |
|
170 | bundlespec Bundle File Formats | |
171 | glossary Glossary |
|
171 | glossary Glossary | |
172 | phases Working with Phases |
|
172 | phases Working with Phases | |
173 | subrepos Subrepositories |
|
173 | subrepos Subrepositories | |
174 |
|
174 | |||
175 | Miscellaneous: |
|
175 | Miscellaneous: | |
176 |
|
176 | |||
177 | deprecated Deprecated Features |
|
177 | deprecated Deprecated Features | |
178 | internals Technical implementation topics |
|
178 | internals Technical implementation topics | |
179 | scripting Using Mercurial from scripts and automation |
|
179 | scripting Using Mercurial from scripts and automation | |
180 |
|
180 | |||
181 | (use 'hg help -v' to show built-in aliases and global options) |
|
181 | (use 'hg help -v' to show built-in aliases and global options) | |
182 |
|
182 | |||
183 | $ hg -q help |
|
183 | $ hg -q help | |
184 | Repository creation: |
|
184 | Repository creation: | |
185 |
|
185 | |||
186 | clone make a copy of an existing repository |
|
186 | clone make a copy of an existing repository | |
187 | init create a new repository in the given directory |
|
187 | init create a new repository in the given directory | |
188 |
|
188 | |||
189 | Remote repository management: |
|
189 | Remote repository management: | |
190 |
|
190 | |||
191 | incoming show new changesets found in source |
|
191 | incoming show new changesets found in source | |
192 | outgoing show changesets not found in the destination |
|
192 | outgoing show changesets not found in the destination | |
193 | paths show aliases for remote repositories |
|
193 | paths show aliases for remote repositories | |
194 | pull pull changes from the specified source |
|
194 | pull pull changes from the specified source | |
195 | push push changes to the specified destination |
|
195 | push push changes to the specified destination | |
196 | serve start stand-alone webserver |
|
196 | serve start stand-alone webserver | |
197 |
|
197 | |||
198 | Change creation: |
|
198 | Change creation: | |
199 |
|
199 | |||
200 | commit commit the specified files or all outstanding changes |
|
200 | commit commit the specified files or all outstanding changes | |
201 |
|
201 | |||
202 | Change manipulation: |
|
202 | Change manipulation: | |
203 |
|
203 | |||
204 | backout reverse effect of earlier changeset |
|
204 | backout reverse effect of earlier changeset | |
205 | graft copy changes from other branches onto the current branch |
|
205 | graft copy changes from other branches onto the current branch | |
206 | merge merge another revision into working directory |
|
206 | merge merge another revision into working directory | |
207 |
|
207 | |||
208 | Change organization: |
|
208 | Change organization: | |
209 |
|
209 | |||
210 | bookmarks create a new bookmark or list existing bookmarks |
|
210 | bookmarks create a new bookmark or list existing bookmarks | |
211 | branch set or show the current branch name |
|
211 | branch set or show the current branch name | |
212 | branches list repository named branches |
|
212 | branches list repository named branches | |
213 | phase set or show the current phase name |
|
213 | phase set or show the current phase name | |
214 | tag add one or more tags for the current or given revision |
|
214 | tag add one or more tags for the current or given revision | |
215 | tags list repository tags |
|
215 | tags list repository tags | |
216 |
|
216 | |||
217 | File content management: |
|
217 | File content management: | |
218 |
|
218 | |||
219 | annotate show changeset information by line for each file |
|
219 | annotate show changeset information by line for each file | |
220 | cat output the current or given revision of files |
|
220 | cat output the current or given revision of files | |
221 | copy mark files as copied for the next commit |
|
221 | copy mark files as copied for the next commit | |
222 | diff diff repository (or selected files) |
|
222 | diff diff repository (or selected files) | |
223 | grep search for a pattern in specified files |
|
223 | grep search for a pattern in specified files | |
224 |
|
224 | |||
225 | Change navigation: |
|
225 | Change navigation: | |
226 |
|
226 | |||
227 | bisect subdivision search of changesets |
|
227 | bisect subdivision search of changesets | |
228 | heads show branch heads |
|
228 | heads show branch heads | |
229 | identify identify the working directory or specified revision |
|
229 | identify identify the working directory or specified revision | |
230 | log show revision history of entire repository or files |
|
230 | log show revision history of entire repository or files | |
231 |
|
231 | |||
232 | Working directory management: |
|
232 | Working directory management: | |
233 |
|
233 | |||
234 | add add the specified files on the next commit |
|
234 | add add the specified files on the next commit | |
235 | addremove add all new files, delete all missing files |
|
235 | addremove add all new files, delete all missing files | |
236 | files list tracked files |
|
236 | files list tracked files | |
237 | forget forget the specified files on the next commit |
|
237 | forget forget the specified files on the next commit | |
238 | remove remove the specified files on the next commit |
|
238 | remove remove the specified files on the next commit | |
239 | rename rename files; equivalent of copy + remove |
|
239 | rename rename files; equivalent of copy + remove | |
240 | resolve redo merges or set/view the merge status of files |
|
240 | resolve redo merges or set/view the merge status of files | |
241 | revert restore files to their checkout state |
|
241 | revert restore files to their checkout state | |
242 | root print the root (top) of the current working directory |
|
242 | root print the root (top) of the current working directory | |
243 | shelve save and set aside changes from the working directory |
|
243 | shelve save and set aside changes from the working directory | |
244 | status show changed files in the working directory |
|
244 | status show changed files in the working directory | |
245 | summary summarize working directory state |
|
245 | summary summarize working directory state | |
246 | unshelve restore a shelved change to the working directory |
|
246 | unshelve restore a shelved change to the working directory | |
247 | update update working directory (or switch revisions) |
|
247 | update update working directory (or switch revisions) | |
248 |
|
248 | |||
249 | Change import/export: |
|
249 | Change import/export: | |
250 |
|
250 | |||
251 | archive create an unversioned archive of a repository revision |
|
251 | archive create an unversioned archive of a repository revision | |
252 | bundle create a bundle file |
|
252 | bundle create a bundle file | |
253 | export dump the header and diffs for one or more changesets |
|
253 | export dump the header and diffs for one or more changesets | |
254 | import import an ordered set of patches |
|
254 | import import an ordered set of patches | |
255 | unbundle apply one or more bundle files |
|
255 | unbundle apply one or more bundle files | |
256 |
|
256 | |||
257 | Repository maintenance: |
|
257 | Repository maintenance: | |
258 |
|
258 | |||
259 | manifest output the current or given revision of the project manifest |
|
259 | manifest output the current or given revision of the project manifest | |
260 | recover roll back an interrupted transaction |
|
260 | recover roll back an interrupted transaction | |
261 | verify verify the integrity of the repository |
|
261 | verify verify the integrity of the repository | |
262 |
|
262 | |||
263 | Help: |
|
263 | Help: | |
264 |
|
264 | |||
265 | config show combined config settings from all hgrc files |
|
265 | config show combined config settings from all hgrc files | |
266 | help show help for a given topic or a help overview |
|
266 | help show help for a given topic or a help overview | |
267 | version output version and copyright information |
|
267 | version output version and copyright information | |
268 |
|
268 | |||
269 | additional help topics: |
|
269 | additional help topics: | |
270 |
|
270 | |||
271 | Mercurial identifiers: |
|
271 | Mercurial identifiers: | |
272 |
|
272 | |||
273 | filesets Specifying File Sets |
|
273 | filesets Specifying File Sets | |
274 | hgignore Syntax for Mercurial Ignore Files |
|
274 | hgignore Syntax for Mercurial Ignore Files | |
275 | patterns File Name Patterns |
|
275 | patterns File Name Patterns | |
276 | revisions Specifying Revisions |
|
276 | revisions Specifying Revisions | |
277 | urls URL Paths |
|
277 | urls URL Paths | |
278 |
|
278 | |||
279 | Mercurial output: |
|
279 | Mercurial output: | |
280 |
|
280 | |||
281 | color Colorizing Outputs |
|
281 | color Colorizing Outputs | |
282 | dates Date Formats |
|
282 | dates Date Formats | |
283 | diffs Diff Formats |
|
283 | diffs Diff Formats | |
284 | templating Template Usage |
|
284 | templating Template Usage | |
285 |
|
285 | |||
286 | Mercurial configuration: |
|
286 | Mercurial configuration: | |
287 |
|
287 | |||
288 | config Configuration Files |
|
288 | config Configuration Files | |
289 | environment Environment Variables |
|
289 | environment Environment Variables | |
290 | extensions Using Additional Features |
|
290 | extensions Using Additional Features | |
291 | flags Command-line flags |
|
291 | flags Command-line flags | |
292 | hgweb Configuring hgweb |
|
292 | hgweb Configuring hgweb | |
293 | merge-tools Merge Tools |
|
293 | merge-tools Merge Tools | |
294 | pager Pager Support |
|
294 | pager Pager Support | |
295 |
|
295 | |||
296 | Concepts: |
|
296 | Concepts: | |
297 |
|
297 | |||
298 | bundlespec Bundle File Formats |
|
298 | bundlespec Bundle File Formats | |
299 | glossary Glossary |
|
299 | glossary Glossary | |
300 | phases Working with Phases |
|
300 | phases Working with Phases | |
301 | subrepos Subrepositories |
|
301 | subrepos Subrepositories | |
302 |
|
302 | |||
303 | Miscellaneous: |
|
303 | Miscellaneous: | |
304 |
|
304 | |||
305 | deprecated Deprecated Features |
|
305 | deprecated Deprecated Features | |
306 | internals Technical implementation topics |
|
306 | internals Technical implementation topics | |
307 | scripting Using Mercurial from scripts and automation |
|
307 | scripting Using Mercurial from scripts and automation | |
308 |
|
308 | |||
309 | Test extension help: |
|
309 | Test extension help: | |
310 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
310 | $ hg help extensions --config extensions.rebase= --config extensions.children= | |
311 | Using Additional Features |
|
311 | Using Additional Features | |
312 | """"""""""""""""""""""""" |
|
312 | """"""""""""""""""""""""" | |
313 |
|
313 | |||
314 | Mercurial has the ability to add new features through the use of |
|
314 | Mercurial has the ability to add new features through the use of | |
315 | extensions. Extensions may add new commands, add options to existing |
|
315 | extensions. Extensions may add new commands, add options to existing | |
316 | commands, change the default behavior of commands, or implement hooks. |
|
316 | commands, change the default behavior of commands, or implement hooks. | |
317 |
|
317 | |||
318 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
318 | To enable the "foo" extension, either shipped with Mercurial or in the | |
319 | Python search path, create an entry for it in your configuration file, |
|
319 | Python search path, create an entry for it in your configuration file, | |
320 | like this: |
|
320 | like this: | |
321 |
|
321 | |||
322 | [extensions] |
|
322 | [extensions] | |
323 | foo = |
|
323 | foo = | |
324 |
|
324 | |||
325 | You may also specify the full path to an extension: |
|
325 | You may also specify the full path to an extension: | |
326 |
|
326 | |||
327 | [extensions] |
|
327 | [extensions] | |
328 | myfeature = ~/.hgext/myfeature.py |
|
328 | myfeature = ~/.hgext/myfeature.py | |
329 |
|
329 | |||
330 | See 'hg help config' for more information on configuration files. |
|
330 | See 'hg help config' for more information on configuration files. | |
331 |
|
331 | |||
332 | Extensions are not loaded by default for a variety of reasons: they can |
|
332 | Extensions are not loaded by default for a variety of reasons: they can | |
333 | increase startup overhead; they may be meant for advanced usage only; they |
|
333 | increase startup overhead; they may be meant for advanced usage only; they | |
334 | may provide potentially dangerous abilities (such as letting you destroy |
|
334 | may provide potentially dangerous abilities (such as letting you destroy | |
335 | or modify history); they might not be ready for prime time; or they may |
|
335 | or modify history); they might not be ready for prime time; or they may | |
336 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
336 | alter some usual behaviors of stock Mercurial. It is thus up to the user | |
337 | to activate extensions as needed. |
|
337 | to activate extensions as needed. | |
338 |
|
338 | |||
339 | To explicitly disable an extension enabled in a configuration file of |
|
339 | To explicitly disable an extension enabled in a configuration file of | |
340 | broader scope, prepend its path with !: |
|
340 | broader scope, prepend its path with !: | |
341 |
|
341 | |||
342 | [extensions] |
|
342 | [extensions] | |
343 | # disabling extension bar residing in /path/to/extension/bar.py |
|
343 | # disabling extension bar residing in /path/to/extension/bar.py | |
344 | bar = !/path/to/extension/bar.py |
|
344 | bar = !/path/to/extension/bar.py | |
345 | # ditto, but no path was supplied for extension baz |
|
345 | # ditto, but no path was supplied for extension baz | |
346 | baz = ! |
|
346 | baz = ! | |
347 |
|
347 | |||
348 | enabled extensions: |
|
348 | enabled extensions: | |
349 |
|
349 | |||
350 | children command to display child changesets (DEPRECATED) |
|
350 | children command to display child changesets (DEPRECATED) | |
351 | rebase command to move sets of revisions to a different ancestor |
|
351 | rebase command to move sets of revisions to a different ancestor | |
352 |
|
352 | |||
353 | disabled extensions: |
|
353 | disabled extensions: | |
354 |
|
354 | |||
355 | acl hooks for controlling repository access |
|
355 | acl hooks for controlling repository access | |
356 | blackbox log repository events to a blackbox for debugging |
|
356 | blackbox log repository events to a blackbox for debugging | |
357 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
357 | bugzilla hooks for integrating with the Bugzilla bug tracker | |
358 | censor erase file content at a given revision |
|
358 | censor erase file content at a given revision | |
359 | churn command to display statistics about repository history |
|
359 | churn command to display statistics about repository history | |
360 | clonebundles advertise pre-generated bundles to seed clones |
|
360 | clonebundles advertise pre-generated bundles to seed clones | |
361 | closehead close arbitrary heads without checking them out first |
|
361 | closehead close arbitrary heads without checking them out first | |
362 | convert import revisions from foreign VCS repositories into |
|
362 | convert import revisions from foreign VCS repositories into | |
363 | Mercurial |
|
363 | Mercurial | |
364 | eol automatically manage newlines in repository files |
|
364 | eol automatically manage newlines in repository files | |
365 | extdiff command to allow external programs to compare revisions |
|
365 | extdiff command to allow external programs to compare revisions | |
366 | factotum http authentication with factotum |
|
366 | factotum http authentication with factotum | |
367 | fastexport export repositories as git fast-import stream |
|
367 | fastexport export repositories as git fast-import stream | |
368 | githelp try mapping git commands to Mercurial commands |
|
368 | githelp try mapping git commands to Mercurial commands | |
369 | gpg commands to sign and verify changesets |
|
369 | gpg commands to sign and verify changesets | |
370 | hgk browse the repository in a graphical way |
|
370 | hgk browse the repository in a graphical way | |
371 | highlight syntax highlighting for hgweb (requires Pygments) |
|
371 | highlight syntax highlighting for hgweb (requires Pygments) | |
372 | histedit interactive history editing |
|
372 | histedit interactive history editing | |
373 | keyword expand keywords in tracked files |
|
373 | keyword expand keywords in tracked files | |
374 | largefiles track large binary files |
|
374 | largefiles track large binary files | |
375 | mq manage a stack of patches |
|
375 | mq manage a stack of patches | |
376 | notify hooks for sending email push notifications |
|
376 | notify hooks for sending email push notifications | |
377 | patchbomb command to send changesets as (a series of) patch emails |
|
377 | patchbomb command to send changesets as (a series of) patch emails | |
378 | purge command to delete untracked files from the working |
|
378 | purge command to delete untracked files from the working | |
379 | directory |
|
379 | directory | |
380 | relink recreates hardlinks between repository clones |
|
380 | relink recreates hardlinks between repository clones | |
381 | schemes extend schemes with shortcuts to repository swarms |
|
381 | schemes extend schemes with shortcuts to repository swarms | |
382 | share share a common history between several working directories |
|
382 | share share a common history between several working directories | |
383 | transplant command to transplant changesets from another branch |
|
383 | transplant command to transplant changesets from another branch | |
384 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
384 | win32mbcs allow the use of MBCS paths with problematic encodings | |
385 | zeroconf discover and advertise repositories on the local network |
|
385 | zeroconf discover and advertise repositories on the local network | |
386 |
|
386 | |||
387 | #endif |
|
387 | #endif | |
388 |
|
388 | |||
389 | Verify that deprecated extensions are included if --verbose: |
|
389 | Verify that deprecated extensions are included if --verbose: | |
390 |
|
390 | |||
391 | $ hg -v help extensions | grep children |
|
391 | $ hg -v help extensions | grep children | |
392 | children command to display child changesets (DEPRECATED) |
|
392 | children command to display child changesets (DEPRECATED) | |
393 |
|
393 | |||
394 | Verify that extension keywords appear in help templates |
|
394 | Verify that extension keywords appear in help templates | |
395 |
|
395 | |||
396 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null |
|
396 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null | |
397 |
|
397 | |||
398 | Test short command list with verbose option |
|
398 | Test short command list with verbose option | |
399 |
|
399 | |||
400 | $ hg -v help shortlist |
|
400 | $ hg -v help shortlist | |
401 | Mercurial Distributed SCM |
|
401 | Mercurial Distributed SCM | |
402 |
|
402 | |||
403 | basic commands: |
|
403 | basic commands: | |
404 |
|
404 | |||
405 | abort abort an unfinished operation (EXPERIMENTAL) |
|
405 | abort abort an unfinished operation (EXPERIMENTAL) | |
406 | add add the specified files on the next commit |
|
406 | add add the specified files on the next commit | |
407 | annotate, blame |
|
407 | annotate, blame | |
408 | show changeset information by line for each file |
|
408 | show changeset information by line for each file | |
409 | clone make a copy of an existing repository |
|
409 | clone make a copy of an existing repository | |
410 | commit, ci commit the specified files or all outstanding changes |
|
410 | commit, ci commit the specified files or all outstanding changes | |
411 | continue resumes an interrupted operation (EXPERIMENTAL) |
|
411 | continue resumes an interrupted operation (EXPERIMENTAL) | |
412 | diff diff repository (or selected files) |
|
412 | diff diff repository (or selected files) | |
413 | export dump the header and diffs for one or more changesets |
|
413 | export dump the header and diffs for one or more changesets | |
414 | forget forget the specified files on the next commit |
|
414 | forget forget the specified files on the next commit | |
415 | init create a new repository in the given directory |
|
415 | init create a new repository in the given directory | |
416 | log, history show revision history of entire repository or files |
|
416 | log, history show revision history of entire repository or files | |
417 | merge merge another revision into working directory |
|
417 | merge merge another revision into working directory | |
418 | pull pull changes from the specified source |
|
418 | pull pull changes from the specified source | |
419 | push push changes to the specified destination |
|
419 | push push changes to the specified destination | |
420 | remove, rm remove the specified files on the next commit |
|
420 | remove, rm remove the specified files on the next commit | |
421 | serve start stand-alone webserver |
|
421 | serve start stand-alone webserver | |
422 | status, st show changed files in the working directory |
|
422 | status, st show changed files in the working directory | |
423 | summary, sum summarize working directory state |
|
423 | summary, sum summarize working directory state | |
424 | update, up, checkout, co |
|
424 | update, up, checkout, co | |
425 | update working directory (or switch revisions) |
|
425 | update working directory (or switch revisions) | |
426 |
|
426 | |||
427 | global options ([+] can be repeated): |
|
427 | global options ([+] can be repeated): | |
428 |
|
428 | |||
429 | -R --repository REPO repository root directory or name of overlay bundle |
|
429 | -R --repository REPO repository root directory or name of overlay bundle | |
430 | file |
|
430 | file | |
431 | --cwd DIR change working directory |
|
431 | --cwd DIR change working directory | |
432 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
432 | -y --noninteractive do not prompt, automatically pick the first choice for | |
433 | all prompts |
|
433 | all prompts | |
434 | -q --quiet suppress output |
|
434 | -q --quiet suppress output | |
435 | -v --verbose enable additional output |
|
435 | -v --verbose enable additional output | |
436 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
436 | --color TYPE when to colorize (boolean, always, auto, never, or | |
437 | debug) |
|
437 | debug) | |
438 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
438 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
439 | --debug enable debugging output |
|
439 | --debug enable debugging output | |
440 | --debugger start debugger |
|
440 | --debugger start debugger | |
441 | --encoding ENCODE set the charset encoding (default: ascii) |
|
441 | --encoding ENCODE set the charset encoding (default: ascii) | |
442 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
442 | --encodingmode MODE set the charset encoding mode (default: strict) | |
443 | --traceback always print a traceback on exception |
|
443 | --traceback always print a traceback on exception | |
444 | --time time how long the command takes |
|
444 | --time time how long the command takes | |
445 | --profile print command execution profile |
|
445 | --profile print command execution profile | |
446 | --version output version information and exit |
|
446 | --version output version information and exit | |
447 | -h --help display help and exit |
|
447 | -h --help display help and exit | |
448 | --hidden consider hidden changesets |
|
448 | --hidden consider hidden changesets | |
449 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
449 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
450 | (default: auto) |
|
450 | (default: auto) | |
451 |
|
451 | |||
452 | (use 'hg help' for the full list of commands) |
|
452 | (use 'hg help' for the full list of commands) | |
453 |
|
453 | |||
454 | $ hg add -h |
|
454 | $ hg add -h | |
455 | hg add [OPTION]... [FILE]... |
|
455 | hg add [OPTION]... [FILE]... | |
456 |
|
456 | |||
457 | add the specified files on the next commit |
|
457 | add the specified files on the next commit | |
458 |
|
458 | |||
459 | Schedule files to be version controlled and added to the repository. |
|
459 | Schedule files to be version controlled and added to the repository. | |
460 |
|
460 | |||
461 | The files will be added to the repository at the next commit. To undo an |
|
461 | The files will be added to the repository at the next commit. To undo an | |
462 | add before that, see 'hg forget'. |
|
462 | add before that, see 'hg forget'. | |
463 |
|
463 | |||
464 | If no names are given, add all files to the repository (except files |
|
464 | If no names are given, add all files to the repository (except files | |
465 | matching ".hgignore"). |
|
465 | matching ".hgignore"). | |
466 |
|
466 | |||
467 | Returns 0 if all files are successfully added. |
|
467 | Returns 0 if all files are successfully added. | |
468 |
|
468 | |||
469 | options ([+] can be repeated): |
|
469 | options ([+] can be repeated): | |
470 |
|
470 | |||
471 | -I --include PATTERN [+] include names matching the given patterns |
|
471 | -I --include PATTERN [+] include names matching the given patterns | |
472 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
472 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
473 | -S --subrepos recurse into subrepositories |
|
473 | -S --subrepos recurse into subrepositories | |
474 | -n --dry-run do not perform actions, just print output |
|
474 | -n --dry-run do not perform actions, just print output | |
475 |
|
475 | |||
476 | (some details hidden, use --verbose to show complete help) |
|
476 | (some details hidden, use --verbose to show complete help) | |
477 |
|
477 | |||
478 | Verbose help for add |
|
478 | Verbose help for add | |
479 |
|
479 | |||
480 | $ hg add -hv |
|
480 | $ hg add -hv | |
481 | hg add [OPTION]... [FILE]... |
|
481 | hg add [OPTION]... [FILE]... | |
482 |
|
482 | |||
483 | add the specified files on the next commit |
|
483 | add the specified files on the next commit | |
484 |
|
484 | |||
485 | Schedule files to be version controlled and added to the repository. |
|
485 | Schedule files to be version controlled and added to the repository. | |
486 |
|
486 | |||
487 | The files will be added to the repository at the next commit. To undo an |
|
487 | The files will be added to the repository at the next commit. To undo an | |
488 | add before that, see 'hg forget'. |
|
488 | add before that, see 'hg forget'. | |
489 |
|
489 | |||
490 | If no names are given, add all files to the repository (except files |
|
490 | If no names are given, add all files to the repository (except files | |
491 | matching ".hgignore"). |
|
491 | matching ".hgignore"). | |
492 |
|
492 | |||
493 | Examples: |
|
493 | Examples: | |
494 |
|
494 | |||
495 | - New (unknown) files are added automatically by 'hg add': |
|
495 | - New (unknown) files are added automatically by 'hg add': | |
496 |
|
496 | |||
497 | $ ls |
|
497 | $ ls | |
498 | foo.c |
|
498 | foo.c | |
499 | $ hg status |
|
499 | $ hg status | |
500 | ? foo.c |
|
500 | ? foo.c | |
501 | $ hg add |
|
501 | $ hg add | |
502 | adding foo.c |
|
502 | adding foo.c | |
503 | $ hg status |
|
503 | $ hg status | |
504 | A foo.c |
|
504 | A foo.c | |
505 |
|
505 | |||
506 | - Specific files to be added can be specified: |
|
506 | - Specific files to be added can be specified: | |
507 |
|
507 | |||
508 | $ ls |
|
508 | $ ls | |
509 | bar.c foo.c |
|
509 | bar.c foo.c | |
510 | $ hg status |
|
510 | $ hg status | |
511 | ? bar.c |
|
511 | ? bar.c | |
512 | ? foo.c |
|
512 | ? foo.c | |
513 | $ hg add bar.c |
|
513 | $ hg add bar.c | |
514 | $ hg status |
|
514 | $ hg status | |
515 | A bar.c |
|
515 | A bar.c | |
516 | ? foo.c |
|
516 | ? foo.c | |
517 |
|
517 | |||
518 | Returns 0 if all files are successfully added. |
|
518 | Returns 0 if all files are successfully added. | |
519 |
|
519 | |||
520 | options ([+] can be repeated): |
|
520 | options ([+] can be repeated): | |
521 |
|
521 | |||
522 | -I --include PATTERN [+] include names matching the given patterns |
|
522 | -I --include PATTERN [+] include names matching the given patterns | |
523 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
523 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
524 | -S --subrepos recurse into subrepositories |
|
524 | -S --subrepos recurse into subrepositories | |
525 | -n --dry-run do not perform actions, just print output |
|
525 | -n --dry-run do not perform actions, just print output | |
526 |
|
526 | |||
527 | global options ([+] can be repeated): |
|
527 | global options ([+] can be repeated): | |
528 |
|
528 | |||
529 | -R --repository REPO repository root directory or name of overlay bundle |
|
529 | -R --repository REPO repository root directory or name of overlay bundle | |
530 | file |
|
530 | file | |
531 | --cwd DIR change working directory |
|
531 | --cwd DIR change working directory | |
532 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
532 | -y --noninteractive do not prompt, automatically pick the first choice for | |
533 | all prompts |
|
533 | all prompts | |
534 | -q --quiet suppress output |
|
534 | -q --quiet suppress output | |
535 | -v --verbose enable additional output |
|
535 | -v --verbose enable additional output | |
536 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
536 | --color TYPE when to colorize (boolean, always, auto, never, or | |
537 | debug) |
|
537 | debug) | |
538 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
538 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
539 | --debug enable debugging output |
|
539 | --debug enable debugging output | |
540 | --debugger start debugger |
|
540 | --debugger start debugger | |
541 | --encoding ENCODE set the charset encoding (default: ascii) |
|
541 | --encoding ENCODE set the charset encoding (default: ascii) | |
542 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
542 | --encodingmode MODE set the charset encoding mode (default: strict) | |
543 | --traceback always print a traceback on exception |
|
543 | --traceback always print a traceback on exception | |
544 | --time time how long the command takes |
|
544 | --time time how long the command takes | |
545 | --profile print command execution profile |
|
545 | --profile print command execution profile | |
546 | --version output version information and exit |
|
546 | --version output version information and exit | |
547 | -h --help display help and exit |
|
547 | -h --help display help and exit | |
548 | --hidden consider hidden changesets |
|
548 | --hidden consider hidden changesets | |
549 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
549 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
550 | (default: auto) |
|
550 | (default: auto) | |
551 |
|
551 | |||
552 | Test the textwidth config option |
|
552 | Test the textwidth config option | |
553 |
|
553 | |||
554 | $ hg root -h --config ui.textwidth=50 |
|
554 | $ hg root -h --config ui.textwidth=50 | |
555 | hg root |
|
555 | hg root | |
556 |
|
556 | |||
557 | print the root (top) of the current working |
|
557 | print the root (top) of the current working | |
558 | directory |
|
558 | directory | |
559 |
|
559 | |||
560 | Print the root directory of the current |
|
560 | Print the root directory of the current | |
561 | repository. |
|
561 | repository. | |
562 |
|
562 | |||
563 | Returns 0 on success. |
|
563 | Returns 0 on success. | |
564 |
|
564 | |||
565 | options: |
|
565 | options: | |
566 |
|
566 | |||
567 | -T --template TEMPLATE display with template |
|
567 | -T --template TEMPLATE display with template | |
568 |
|
568 | |||
569 | (some details hidden, use --verbose to show |
|
569 | (some details hidden, use --verbose to show | |
570 | complete help) |
|
570 | complete help) | |
571 |
|
571 | |||
572 | Test help option with version option |
|
572 | Test help option with version option | |
573 |
|
573 | |||
574 | $ hg add -h --version |
|
574 | $ hg add -h --version | |
575 | Mercurial Distributed SCM (version *) (glob) |
|
575 | Mercurial Distributed SCM (version *) (glob) | |
576 | (see https://mercurial-scm.org for more information) |
|
576 | (see https://mercurial-scm.org for more information) | |
577 |
|
577 | |||
578 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
578 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
579 | This is free software; see the source for copying conditions. There is NO |
|
579 | This is free software; see the source for copying conditions. There is NO | |
580 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
580 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
581 |
|
581 | |||
582 | $ hg add --skjdfks |
|
582 | $ hg add --skjdfks | |
583 | hg add: option --skjdfks not recognized |
|
583 | hg add: option --skjdfks not recognized | |
584 | hg add [OPTION]... [FILE]... |
|
584 | hg add [OPTION]... [FILE]... | |
585 |
|
585 | |||
586 | add the specified files on the next commit |
|
586 | add the specified files on the next commit | |
587 |
|
587 | |||
588 | options ([+] can be repeated): |
|
588 | options ([+] can be repeated): | |
589 |
|
589 | |||
590 | -I --include PATTERN [+] include names matching the given patterns |
|
590 | -I --include PATTERN [+] include names matching the given patterns | |
591 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
591 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
592 | -S --subrepos recurse into subrepositories |
|
592 | -S --subrepos recurse into subrepositories | |
593 | -n --dry-run do not perform actions, just print output |
|
593 | -n --dry-run do not perform actions, just print output | |
594 |
|
594 | |||
595 | (use 'hg add -h' to show more help) |
|
595 | (use 'hg add -h' to show more help) | |
596 | [255] |
|
596 | [255] | |
597 |
|
597 | |||
598 | Test ambiguous command help |
|
598 | Test ambiguous command help | |
599 |
|
599 | |||
600 | $ hg help ad |
|
600 | $ hg help ad | |
601 | list of commands: |
|
601 | list of commands: | |
602 |
|
602 | |||
603 | add add the specified files on the next commit |
|
603 | add add the specified files on the next commit | |
604 | addremove add all new files, delete all missing files |
|
604 | addremove add all new files, delete all missing files | |
605 |
|
605 | |||
606 | (use 'hg help -v ad' to show built-in aliases and global options) |
|
606 | (use 'hg help -v ad' to show built-in aliases and global options) | |
607 |
|
607 | |||
608 | Test command without options |
|
608 | Test command without options | |
609 |
|
609 | |||
610 | $ hg help verify |
|
610 | $ hg help verify | |
611 | hg verify |
|
611 | hg verify | |
612 |
|
612 | |||
613 | verify the integrity of the repository |
|
613 | verify the integrity of the repository | |
614 |
|
614 | |||
615 | Verify the integrity of the current repository. |
|
615 | Verify the integrity of the current repository. | |
616 |
|
616 | |||
617 | This will perform an extensive check of the repository's integrity, |
|
617 | This will perform an extensive check of the repository's integrity, | |
618 | validating the hashes and checksums of each entry in the changelog, |
|
618 | validating the hashes and checksums of each entry in the changelog, | |
619 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
619 | manifest, and tracked files, as well as the integrity of their crosslinks | |
620 | and indices. |
|
620 | and indices. | |
621 |
|
621 | |||
622 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more |
|
622 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more | |
623 | information about recovery from corruption of the repository. |
|
623 | information about recovery from corruption of the repository. | |
624 |
|
624 | |||
625 | Returns 0 on success, 1 if errors are encountered. |
|
625 | Returns 0 on success, 1 if errors are encountered. | |
626 |
|
626 | |||
627 | options: |
|
627 | options: | |
628 |
|
628 | |||
629 | (some details hidden, use --verbose to show complete help) |
|
629 | (some details hidden, use --verbose to show complete help) | |
630 |
|
630 | |||
631 | $ hg help diff |
|
631 | $ hg help diff | |
632 | hg diff [OPTION]... ([-c REV] | [--from REV1] [--to REV2]) [FILE]... |
|
632 | hg diff [OPTION]... ([-c REV] | [--from REV1] [--to REV2]) [FILE]... | |
633 |
|
633 | |||
634 | diff repository (or selected files) |
|
634 | diff repository (or selected files) | |
635 |
|
635 | |||
636 | Show differences between revisions for the specified files. |
|
636 | Show differences between revisions for the specified files. | |
637 |
|
637 | |||
638 | Differences between files are shown using the unified diff format. |
|
638 | Differences between files are shown using the unified diff format. | |
639 |
|
639 | |||
640 | Note: |
|
640 | Note: | |
641 | 'hg diff' may generate unexpected results for merges, as it will |
|
641 | 'hg diff' may generate unexpected results for merges, as it will | |
642 | default to comparing against the working directory's first parent |
|
642 | default to comparing against the working directory's first parent | |
643 | changeset if no revisions are specified. |
|
643 | changeset if no revisions are specified. | |
644 |
|
644 | |||
645 | By default, the working directory files are compared to its first parent. |
|
645 | By default, the working directory files are compared to its first parent. | |
646 | To see the differences from another revision, use --from. To see the |
|
646 | To see the differences from another revision, use --from. To see the | |
647 | difference to another revision, use --to. For example, 'hg diff --from .^' |
|
647 | difference to another revision, use --to. For example, 'hg diff --from .^' | |
648 | will show the differences from the working copy's grandparent to the |
|
648 | will show the differences from the working copy's grandparent to the | |
649 | working copy, 'hg diff --to .' will show the diff from the working copy to |
|
649 | working copy, 'hg diff --to .' will show the diff from the working copy to | |
650 | its parent (i.e. the reverse of the default), and 'hg diff --from 1.0 --to |
|
650 | its parent (i.e. the reverse of the default), and 'hg diff --from 1.0 --to | |
651 | 1.2' will show the diff between those two revisions. |
|
651 | 1.2' will show the diff between those two revisions. | |
652 |
|
652 | |||
653 | Alternatively you can specify -c/--change with a revision to see the |
|
653 | Alternatively you can specify -c/--change with a revision to see the | |
654 | changes in that changeset relative to its first parent (i.e. 'hg diff -c |
|
654 | changes in that changeset relative to its first parent (i.e. 'hg diff -c | |
655 | 42' is equivalent to 'hg diff --from 42^ --to 42') |
|
655 | 42' is equivalent to 'hg diff --from 42^ --to 42') | |
656 |
|
656 | |||
657 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
657 | Without the -a/--text option, diff will avoid generating diffs of files it | |
658 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
658 | detects as binary. With -a, diff will generate a diff anyway, probably | |
659 | with undesirable results. |
|
659 | with undesirable results. | |
660 |
|
660 | |||
661 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
661 | Use the -g/--git option to generate diffs in the git extended diff format. | |
662 | For more information, read 'hg help diffs'. |
|
662 | For more information, read 'hg help diffs'. | |
663 |
|
663 | |||
664 | Returns 0 on success. |
|
664 | Returns 0 on success. | |
665 |
|
665 | |||
666 | options ([+] can be repeated): |
|
666 | options ([+] can be repeated): | |
667 |
|
667 | |||
668 | --from REV1 revision to diff from |
|
668 | --from REV1 revision to diff from | |
669 | --to REV2 revision to diff to |
|
669 | --to REV2 revision to diff to | |
670 | -c --change REV change made by revision |
|
670 | -c --change REV change made by revision | |
671 | -a --text treat all files as text |
|
671 | -a --text treat all files as text | |
672 | -g --git use git extended diff format |
|
672 | -g --git use git extended diff format | |
673 | --binary generate binary diffs in git mode (default) |
|
673 | --binary generate binary diffs in git mode (default) | |
674 | --nodates omit dates from diff headers |
|
674 | --nodates omit dates from diff headers | |
675 | --noprefix omit a/ and b/ prefixes from filenames |
|
675 | --noprefix omit a/ and b/ prefixes from filenames | |
676 | -p --show-function show which function each change is in |
|
676 | -p --show-function show which function each change is in | |
677 | --reverse produce a diff that undoes the changes |
|
677 | --reverse produce a diff that undoes the changes | |
678 | -w --ignore-all-space ignore white space when comparing lines |
|
678 | -w --ignore-all-space ignore white space when comparing lines | |
679 | -b --ignore-space-change ignore changes in the amount of white space |
|
679 | -b --ignore-space-change ignore changes in the amount of white space | |
680 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
680 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
681 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL |
|
681 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL | |
682 | -U --unified NUM number of lines of context to show |
|
682 | -U --unified NUM number of lines of context to show | |
683 | --stat output diffstat-style summary of changes |
|
683 | --stat output diffstat-style summary of changes | |
684 | --root DIR produce diffs relative to subdirectory |
|
684 | --root DIR produce diffs relative to subdirectory | |
685 | -I --include PATTERN [+] include names matching the given patterns |
|
685 | -I --include PATTERN [+] include names matching the given patterns | |
686 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
686 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
687 | -S --subrepos recurse into subrepositories |
|
687 | -S --subrepos recurse into subrepositories | |
688 |
|
688 | |||
689 | (some details hidden, use --verbose to show complete help) |
|
689 | (some details hidden, use --verbose to show complete help) | |
690 |
|
690 | |||
691 | $ hg help status |
|
691 | $ hg help status | |
692 | hg status [OPTION]... [FILE]... |
|
692 | hg status [OPTION]... [FILE]... | |
693 |
|
693 | |||
694 | aliases: st |
|
694 | aliases: st | |
695 |
|
695 | |||
696 | show changed files in the working directory |
|
696 | show changed files in the working directory | |
697 |
|
697 | |||
698 | Show status of files in the repository. If names are given, only files |
|
698 | Show status of files in the repository. If names are given, only files | |
699 | that match are shown. Files that are clean or ignored or the source of a |
|
699 | that match are shown. Files that are clean or ignored or the source of a | |
700 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
700 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
701 | -C/--copies or -A/--all are given. Unless options described with "show |
|
701 | -C/--copies or -A/--all are given. Unless options described with "show | |
702 | only ..." are given, the options -mardu are used. |
|
702 | only ..." are given, the options -mardu are used. | |
703 |
|
703 | |||
704 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
704 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
705 | explicitly requested with -u/--unknown or -i/--ignored. |
|
705 | explicitly requested with -u/--unknown or -i/--ignored. | |
706 |
|
706 | |||
707 | Note: |
|
707 | Note: | |
708 | 'hg status' may appear to disagree with diff if permissions have |
|
708 | 'hg status' may appear to disagree with diff if permissions have | |
709 | changed or a merge has occurred. The standard diff format does not |
|
709 | changed or a merge has occurred. The standard diff format does not | |
710 | report permission changes and diff only reports changes relative to one |
|
710 | report permission changes and diff only reports changes relative to one | |
711 | merge parent. |
|
711 | merge parent. | |
712 |
|
712 | |||
713 | If one revision is given, it is used as the base revision. If two |
|
713 | If one revision is given, it is used as the base revision. If two | |
714 | revisions are given, the differences between them are shown. The --change |
|
714 | revisions are given, the differences between them are shown. The --change | |
715 | option can also be used as a shortcut to list the changed files of a |
|
715 | option can also be used as a shortcut to list the changed files of a | |
716 | revision from its first parent. |
|
716 | revision from its first parent. | |
717 |
|
717 | |||
718 | The codes used to show the status of files are: |
|
718 | The codes used to show the status of files are: | |
719 |
|
719 | |||
720 | M = modified |
|
720 | M = modified | |
721 | A = added |
|
721 | A = added | |
722 | R = removed |
|
722 | R = removed | |
723 | C = clean |
|
723 | C = clean | |
724 | ! = missing (deleted by non-hg command, but still tracked) |
|
724 | ! = missing (deleted by non-hg command, but still tracked) | |
725 | ? = not tracked |
|
725 | ? = not tracked | |
726 | I = ignored |
|
726 | I = ignored | |
727 | = origin of the previous file (with --copies) |
|
727 | = origin of the previous file (with --copies) | |
728 |
|
728 | |||
729 | Returns 0 on success. |
|
729 | Returns 0 on success. | |
730 |
|
730 | |||
731 | options ([+] can be repeated): |
|
731 | options ([+] can be repeated): | |
732 |
|
732 | |||
733 | -A --all show status of all files |
|
733 | -A --all show status of all files | |
734 | -m --modified show only modified files |
|
734 | -m --modified show only modified files | |
735 | -a --added show only added files |
|
735 | -a --added show only added files | |
736 | -r --removed show only removed files |
|
736 | -r --removed show only removed files | |
737 | -d --deleted show only missing files |
|
737 | -d --deleted show only missing files | |
738 | -c --clean show only files without changes |
|
738 | -c --clean show only files without changes | |
739 | -u --unknown show only unknown (not tracked) files |
|
739 | -u --unknown show only unknown (not tracked) files | |
740 | -i --ignored show only ignored files |
|
740 | -i --ignored show only ignored files | |
741 | -n --no-status hide status prefix |
|
741 | -n --no-status hide status prefix | |
742 | -C --copies show source of copied files |
|
742 | -C --copies show source of copied files | |
743 | -0 --print0 end filenames with NUL, for use with xargs |
|
743 | -0 --print0 end filenames with NUL, for use with xargs | |
744 | --rev REV [+] show difference from revision |
|
744 | --rev REV [+] show difference from revision | |
745 | --change REV list the changed files of a revision |
|
745 | --change REV list the changed files of a revision | |
746 | -I --include PATTERN [+] include names matching the given patterns |
|
746 | -I --include PATTERN [+] include names matching the given patterns | |
747 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
747 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
748 | -S --subrepos recurse into subrepositories |
|
748 | -S --subrepos recurse into subrepositories | |
749 | -T --template TEMPLATE display with template |
|
749 | -T --template TEMPLATE display with template | |
750 |
|
750 | |||
751 | (some details hidden, use --verbose to show complete help) |
|
751 | (some details hidden, use --verbose to show complete help) | |
752 |
|
752 | |||
753 | $ hg -q help status |
|
753 | $ hg -q help status | |
754 | hg status [OPTION]... [FILE]... |
|
754 | hg status [OPTION]... [FILE]... | |
755 |
|
755 | |||
756 | show changed files in the working directory |
|
756 | show changed files in the working directory | |
757 |
|
757 | |||
758 | $ hg help foo |
|
758 | $ hg help foo | |
759 | abort: no such help topic: foo |
|
759 | abort: no such help topic: foo | |
760 | (try 'hg help --keyword foo') |
|
760 | (try 'hg help --keyword foo') | |
761 |
[ |
|
761 | [10] | |
762 |
|
762 | |||
763 | $ hg skjdfks |
|
763 | $ hg skjdfks | |
764 | hg: unknown command 'skjdfks' |
|
764 | hg: unknown command 'skjdfks' | |
765 | (use 'hg help' for a list of commands) |
|
765 | (use 'hg help' for a list of commands) | |
766 | [255] |
|
766 | [255] | |
767 |
|
767 | |||
768 | Typoed command gives suggestion |
|
768 | Typoed command gives suggestion | |
769 | $ hg puls |
|
769 | $ hg puls | |
770 | hg: unknown command 'puls' |
|
770 | hg: unknown command 'puls' | |
771 | (did you mean one of pull, push?) |
|
771 | (did you mean one of pull, push?) | |
772 | [255] |
|
772 | [255] | |
773 |
|
773 | |||
774 | Not enabled extension gets suggested |
|
774 | Not enabled extension gets suggested | |
775 |
|
775 | |||
776 | $ hg rebase |
|
776 | $ hg rebase | |
777 | hg: unknown command 'rebase' |
|
777 | hg: unknown command 'rebase' | |
778 | 'rebase' is provided by the following extension: |
|
778 | 'rebase' is provided by the following extension: | |
779 |
|
779 | |||
780 | rebase command to move sets of revisions to a different ancestor |
|
780 | rebase command to move sets of revisions to a different ancestor | |
781 |
|
781 | |||
782 | (use 'hg help extensions' for information on enabling extensions) |
|
782 | (use 'hg help extensions' for information on enabling extensions) | |
783 | [255] |
|
783 | [255] | |
784 |
|
784 | |||
785 | Disabled extension gets suggested |
|
785 | Disabled extension gets suggested | |
786 | $ hg --config extensions.rebase=! rebase |
|
786 | $ hg --config extensions.rebase=! rebase | |
787 | hg: unknown command 'rebase' |
|
787 | hg: unknown command 'rebase' | |
788 | 'rebase' is provided by the following extension: |
|
788 | 'rebase' is provided by the following extension: | |
789 |
|
789 | |||
790 | rebase command to move sets of revisions to a different ancestor |
|
790 | rebase command to move sets of revisions to a different ancestor | |
791 |
|
791 | |||
792 | (use 'hg help extensions' for information on enabling extensions) |
|
792 | (use 'hg help extensions' for information on enabling extensions) | |
793 | [255] |
|
793 | [255] | |
794 |
|
794 | |||
795 | Checking that help adapts based on the config: |
|
795 | Checking that help adapts based on the config: | |
796 |
|
796 | |||
797 | $ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)' |
|
797 | $ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)' | |
798 | -g --[no-]git use git extended diff format (default: on from |
|
798 | -g --[no-]git use git extended diff format (default: on from | |
799 | config) |
|
799 | config) | |
800 |
|
800 | |||
801 | Make sure that we don't run afoul of the help system thinking that |
|
801 | Make sure that we don't run afoul of the help system thinking that | |
802 | this is a section and erroring out weirdly. |
|
802 | this is a section and erroring out weirdly. | |
803 |
|
803 | |||
804 | $ hg .log |
|
804 | $ hg .log | |
805 | hg: unknown command '.log' |
|
805 | hg: unknown command '.log' | |
806 | (did you mean log?) |
|
806 | (did you mean log?) | |
807 | [255] |
|
807 | [255] | |
808 |
|
808 | |||
809 | $ hg log. |
|
809 | $ hg log. | |
810 | hg: unknown command 'log.' |
|
810 | hg: unknown command 'log.' | |
811 | (did you mean log?) |
|
811 | (did you mean log?) | |
812 | [255] |
|
812 | [255] | |
813 | $ hg pu.lh |
|
813 | $ hg pu.lh | |
814 | hg: unknown command 'pu.lh' |
|
814 | hg: unknown command 'pu.lh' | |
815 | (did you mean one of pull, push?) |
|
815 | (did you mean one of pull, push?) | |
816 | [255] |
|
816 | [255] | |
817 |
|
817 | |||
818 | $ cat > helpext.py <<EOF |
|
818 | $ cat > helpext.py <<EOF | |
819 | > import os |
|
819 | > import os | |
820 | > from mercurial import commands, fancyopts, registrar |
|
820 | > from mercurial import commands, fancyopts, registrar | |
821 | > |
|
821 | > | |
822 | > def func(arg): |
|
822 | > def func(arg): | |
823 | > return '%sfoo' % arg |
|
823 | > return '%sfoo' % arg | |
824 | > class customopt(fancyopts.customopt): |
|
824 | > class customopt(fancyopts.customopt): | |
825 | > def newstate(self, oldstate, newparam, abort): |
|
825 | > def newstate(self, oldstate, newparam, abort): | |
826 | > return '%sbar' % oldstate |
|
826 | > return '%sbar' % oldstate | |
827 | > cmdtable = {} |
|
827 | > cmdtable = {} | |
828 | > command = registrar.command(cmdtable) |
|
828 | > command = registrar.command(cmdtable) | |
829 | > |
|
829 | > | |
830 | > @command(b'nohelp', |
|
830 | > @command(b'nohelp', | |
831 | > [(b'', b'longdesc', 3, b'x'*67), |
|
831 | > [(b'', b'longdesc', 3, b'x'*67), | |
832 | > (b'n', b'', None, b'normal desc'), |
|
832 | > (b'n', b'', None, b'normal desc'), | |
833 | > (b'', b'newline', b'', b'line1\nline2'), |
|
833 | > (b'', b'newline', b'', b'line1\nline2'), | |
834 | > (b'', b'default-off', False, b'enable X'), |
|
834 | > (b'', b'default-off', False, b'enable X'), | |
835 | > (b'', b'default-on', True, b'enable Y'), |
|
835 | > (b'', b'default-on', True, b'enable Y'), | |
836 | > (b'', b'callableopt', func, b'adds foo'), |
|
836 | > (b'', b'callableopt', func, b'adds foo'), | |
837 | > (b'', b'customopt', customopt(''), b'adds bar'), |
|
837 | > (b'', b'customopt', customopt(''), b'adds bar'), | |
838 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], |
|
838 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], | |
839 | > b'hg nohelp', |
|
839 | > b'hg nohelp', | |
840 | > norepo=True) |
|
840 | > norepo=True) | |
841 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) |
|
841 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) | |
842 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) |
|
842 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) | |
843 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) |
|
843 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) | |
844 | > def nohelp(ui, *args, **kwargs): |
|
844 | > def nohelp(ui, *args, **kwargs): | |
845 | > pass |
|
845 | > pass | |
846 | > |
|
846 | > | |
847 | > @command(b'hashelp', [], b'hg hashelp', norepo=True) |
|
847 | > @command(b'hashelp', [], b'hg hashelp', norepo=True) | |
848 | > def hashelp(ui, *args, **kwargs): |
|
848 | > def hashelp(ui, *args, **kwargs): | |
849 | > """Extension command's help""" |
|
849 | > """Extension command's help""" | |
850 | > |
|
850 | > | |
851 | > def uisetup(ui): |
|
851 | > def uisetup(ui): | |
852 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') |
|
852 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') | |
853 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') |
|
853 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') | |
854 | > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext') |
|
854 | > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext') | |
855 | > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext') |
|
855 | > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext') | |
856 | > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext') |
|
856 | > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext') | |
857 | > |
|
857 | > | |
858 | > EOF |
|
858 | > EOF | |
859 | $ echo '[extensions]' >> $HGRCPATH |
|
859 | $ echo '[extensions]' >> $HGRCPATH | |
860 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
860 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
861 |
|
861 | |||
862 | Test for aliases |
|
862 | Test for aliases | |
863 |
|
863 | |||
864 | $ hg help | grep hgalias |
|
864 | $ hg help | grep hgalias | |
865 | hgalias My doc |
|
865 | hgalias My doc | |
866 |
|
866 | |||
867 | $ hg help hgalias |
|
867 | $ hg help hgalias | |
868 | hg hgalias [--remote] |
|
868 | hg hgalias [--remote] | |
869 |
|
869 | |||
870 | alias for: hg summary |
|
870 | alias for: hg summary | |
871 |
|
871 | |||
872 | My doc |
|
872 | My doc | |
873 |
|
873 | |||
874 | defined by: helpext |
|
874 | defined by: helpext | |
875 |
|
875 | |||
876 | options: |
|
876 | options: | |
877 |
|
877 | |||
878 | --remote check for push and pull |
|
878 | --remote check for push and pull | |
879 |
|
879 | |||
880 | (some details hidden, use --verbose to show complete help) |
|
880 | (some details hidden, use --verbose to show complete help) | |
881 | $ hg help hgaliasnodoc |
|
881 | $ hg help hgaliasnodoc | |
882 | hg hgaliasnodoc [--remote] |
|
882 | hg hgaliasnodoc [--remote] | |
883 |
|
883 | |||
884 | alias for: hg summary |
|
884 | alias for: hg summary | |
885 |
|
885 | |||
886 | summarize working directory state |
|
886 | summarize working directory state | |
887 |
|
887 | |||
888 | This generates a brief summary of the working directory state, including |
|
888 | This generates a brief summary of the working directory state, including | |
889 | parents, branch, commit status, phase and available updates. |
|
889 | parents, branch, commit status, phase and available updates. | |
890 |
|
890 | |||
891 | With the --remote option, this will check the default paths for incoming |
|
891 | With the --remote option, this will check the default paths for incoming | |
892 | and outgoing changes. This can be time-consuming. |
|
892 | and outgoing changes. This can be time-consuming. | |
893 |
|
893 | |||
894 | Returns 0 on success. |
|
894 | Returns 0 on success. | |
895 |
|
895 | |||
896 | defined by: helpext |
|
896 | defined by: helpext | |
897 |
|
897 | |||
898 | options: |
|
898 | options: | |
899 |
|
899 | |||
900 | --remote check for push and pull |
|
900 | --remote check for push and pull | |
901 |
|
901 | |||
902 | (some details hidden, use --verbose to show complete help) |
|
902 | (some details hidden, use --verbose to show complete help) | |
903 |
|
903 | |||
904 | $ hg help shellalias |
|
904 | $ hg help shellalias | |
905 | hg shellalias |
|
905 | hg shellalias | |
906 |
|
906 | |||
907 | shell alias for: echo hi |
|
907 | shell alias for: echo hi | |
908 |
|
908 | |||
909 | (no help text available) |
|
909 | (no help text available) | |
910 |
|
910 | |||
911 | defined by: helpext |
|
911 | defined by: helpext | |
912 |
|
912 | |||
913 | (some details hidden, use --verbose to show complete help) |
|
913 | (some details hidden, use --verbose to show complete help) | |
914 |
|
914 | |||
915 | Test command with no help text |
|
915 | Test command with no help text | |
916 |
|
916 | |||
917 | $ hg help nohelp |
|
917 | $ hg help nohelp | |
918 | hg nohelp |
|
918 | hg nohelp | |
919 |
|
919 | |||
920 | (no help text available) |
|
920 | (no help text available) | |
921 |
|
921 | |||
922 | options: |
|
922 | options: | |
923 |
|
923 | |||
924 | --longdesc VALUE |
|
924 | --longdesc VALUE | |
925 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
925 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
926 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
926 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) | |
927 | -n -- normal desc |
|
927 | -n -- normal desc | |
928 | --newline VALUE line1 line2 |
|
928 | --newline VALUE line1 line2 | |
929 | --default-off enable X |
|
929 | --default-off enable X | |
930 | --[no-]default-on enable Y (default: on) |
|
930 | --[no-]default-on enable Y (default: on) | |
931 | --callableopt VALUE adds foo |
|
931 | --callableopt VALUE adds foo | |
932 | --customopt VALUE adds bar |
|
932 | --customopt VALUE adds bar | |
933 | --customopt-withdefault VALUE adds bar (default: foo) |
|
933 | --customopt-withdefault VALUE adds bar (default: foo) | |
934 |
|
934 | |||
935 | (some details hidden, use --verbose to show complete help) |
|
935 | (some details hidden, use --verbose to show complete help) | |
936 |
|
936 | |||
937 | Test that default list of commands includes extension commands that have help, |
|
937 | Test that default list of commands includes extension commands that have help, | |
938 | but not those that don't, except in verbose mode, when a keyword is passed, or |
|
938 | but not those that don't, except in verbose mode, when a keyword is passed, or | |
939 | when help about the extension is requested. |
|
939 | when help about the extension is requested. | |
940 |
|
940 | |||
941 | #if no-extraextensions |
|
941 | #if no-extraextensions | |
942 |
|
942 | |||
943 | $ hg help | grep hashelp |
|
943 | $ hg help | grep hashelp | |
944 | hashelp Extension command's help |
|
944 | hashelp Extension command's help | |
945 | $ hg help | grep nohelp |
|
945 | $ hg help | grep nohelp | |
946 | [1] |
|
946 | [1] | |
947 | $ hg help -v | grep nohelp |
|
947 | $ hg help -v | grep nohelp | |
948 | nohelp (no help text available) |
|
948 | nohelp (no help text available) | |
949 |
|
949 | |||
950 | $ hg help -k nohelp |
|
950 | $ hg help -k nohelp | |
951 | Commands: |
|
951 | Commands: | |
952 |
|
952 | |||
953 | nohelp hg nohelp |
|
953 | nohelp hg nohelp | |
954 |
|
954 | |||
955 | Extension Commands: |
|
955 | Extension Commands: | |
956 |
|
956 | |||
957 | nohelp (no help text available) |
|
957 | nohelp (no help text available) | |
958 |
|
958 | |||
959 | $ hg help helpext |
|
959 | $ hg help helpext | |
960 | helpext extension - no help text available |
|
960 | helpext extension - no help text available | |
961 |
|
961 | |||
962 | list of commands: |
|
962 | list of commands: | |
963 |
|
963 | |||
964 | hashelp Extension command's help |
|
964 | hashelp Extension command's help | |
965 | nohelp (no help text available) |
|
965 | nohelp (no help text available) | |
966 |
|
966 | |||
967 | (use 'hg help -v helpext' to show built-in aliases and global options) |
|
967 | (use 'hg help -v helpext' to show built-in aliases and global options) | |
968 |
|
968 | |||
969 | #endif |
|
969 | #endif | |
970 |
|
970 | |||
971 | Test list of internal help commands |
|
971 | Test list of internal help commands | |
972 |
|
972 | |||
973 | $ hg help debug |
|
973 | $ hg help debug | |
974 | debug commands (internal and unsupported): |
|
974 | debug commands (internal and unsupported): | |
975 |
|
975 | |||
976 | debugancestor |
|
976 | debugancestor | |
977 | find the ancestor revision of two revisions in a given index |
|
977 | find the ancestor revision of two revisions in a given index | |
978 | debugantivirusrunning |
|
978 | debugantivirusrunning | |
979 | attempt to trigger an antivirus scanner to see if one is active |
|
979 | attempt to trigger an antivirus scanner to see if one is active | |
980 | debugapplystreamclonebundle |
|
980 | debugapplystreamclonebundle | |
981 | apply a stream clone bundle file |
|
981 | apply a stream clone bundle file | |
982 | debugbackupbundle |
|
982 | debugbackupbundle | |
983 | lists the changesets available in backup bundles |
|
983 | lists the changesets available in backup bundles | |
984 | debugbuilddag |
|
984 | debugbuilddag | |
985 | builds a repo with a given DAG from scratch in the current |
|
985 | builds a repo with a given DAG from scratch in the current | |
986 | empty repo |
|
986 | empty repo | |
987 | debugbundle lists the contents of a bundle |
|
987 | debugbundle lists the contents of a bundle | |
988 | debugcapabilities |
|
988 | debugcapabilities | |
989 | lists the capabilities of a remote peer |
|
989 | lists the capabilities of a remote peer | |
990 | debugchangedfiles |
|
990 | debugchangedfiles | |
991 | list the stored files changes for a revision |
|
991 | list the stored files changes for a revision | |
992 | debugcheckstate |
|
992 | debugcheckstate | |
993 | validate the correctness of the current dirstate |
|
993 | validate the correctness of the current dirstate | |
994 | debugcolor show available color, effects or style |
|
994 | debugcolor show available color, effects or style | |
995 | debugcommands |
|
995 | debugcommands | |
996 | list all available commands and options |
|
996 | list all available commands and options | |
997 | debugcomplete |
|
997 | debugcomplete | |
998 | returns the completion list associated with the given command |
|
998 | returns the completion list associated with the given command | |
999 | debugcreatestreamclonebundle |
|
999 | debugcreatestreamclonebundle | |
1000 | create a stream clone bundle file |
|
1000 | create a stream clone bundle file | |
1001 | debugdag format the changelog or an index DAG as a concise textual |
|
1001 | debugdag format the changelog or an index DAG as a concise textual | |
1002 | description |
|
1002 | description | |
1003 | debugdata dump the contents of a data file revision |
|
1003 | debugdata dump the contents of a data file revision | |
1004 | debugdate parse and display a date |
|
1004 | debugdate parse and display a date | |
1005 | debugdeltachain |
|
1005 | debugdeltachain | |
1006 | dump information about delta chains in a revlog |
|
1006 | dump information about delta chains in a revlog | |
1007 | debugdirstate |
|
1007 | debugdirstate | |
1008 | show the contents of the current dirstate |
|
1008 | show the contents of the current dirstate | |
1009 | debugdiscovery |
|
1009 | debugdiscovery | |
1010 | runs the changeset discovery protocol in isolation |
|
1010 | runs the changeset discovery protocol in isolation | |
1011 | debugdownload |
|
1011 | debugdownload | |
1012 | download a resource using Mercurial logic and config |
|
1012 | download a resource using Mercurial logic and config | |
1013 | debugextensions |
|
1013 | debugextensions | |
1014 | show information about active extensions |
|
1014 | show information about active extensions | |
1015 | debugfileset parse and apply a fileset specification |
|
1015 | debugfileset parse and apply a fileset specification | |
1016 | debugformat display format information about the current repository |
|
1016 | debugformat display format information about the current repository | |
1017 | debugfsinfo show information detected about current filesystem |
|
1017 | debugfsinfo show information detected about current filesystem | |
1018 | debuggetbundle |
|
1018 | debuggetbundle | |
1019 | retrieves a bundle from a repo |
|
1019 | retrieves a bundle from a repo | |
1020 | debugignore display the combined ignore pattern and information about |
|
1020 | debugignore display the combined ignore pattern and information about | |
1021 | ignored files |
|
1021 | ignored files | |
1022 | debugindex dump index data for a storage primitive |
|
1022 | debugindex dump index data for a storage primitive | |
1023 | debugindexdot |
|
1023 | debugindexdot | |
1024 | dump an index DAG as a graphviz dot file |
|
1024 | dump an index DAG as a graphviz dot file | |
1025 | debugindexstats |
|
1025 | debugindexstats | |
1026 | show stats related to the changelog index |
|
1026 | show stats related to the changelog index | |
1027 | debuginstall test Mercurial installation |
|
1027 | debuginstall test Mercurial installation | |
1028 | debugknown test whether node ids are known to a repo |
|
1028 | debugknown test whether node ids are known to a repo | |
1029 | debuglocks show or modify state of locks |
|
1029 | debuglocks show or modify state of locks | |
1030 | debugmanifestfulltextcache |
|
1030 | debugmanifestfulltextcache | |
1031 | show, clear or amend the contents of the manifest fulltext |
|
1031 | show, clear or amend the contents of the manifest fulltext | |
1032 | cache |
|
1032 | cache | |
1033 | debugmergestate |
|
1033 | debugmergestate | |
1034 | print merge state |
|
1034 | print merge state | |
1035 | debugnamecomplete |
|
1035 | debugnamecomplete | |
1036 | complete "names" - tags, open branch names, bookmark names |
|
1036 | complete "names" - tags, open branch names, bookmark names | |
1037 | debugnodemap write and inspect on disk nodemap |
|
1037 | debugnodemap write and inspect on disk nodemap | |
1038 | debugobsolete |
|
1038 | debugobsolete | |
1039 | create arbitrary obsolete marker |
|
1039 | create arbitrary obsolete marker | |
1040 | debugoptADV (no help text available) |
|
1040 | debugoptADV (no help text available) | |
1041 | debugoptDEP (no help text available) |
|
1041 | debugoptDEP (no help text available) | |
1042 | debugoptEXP (no help text available) |
|
1042 | debugoptEXP (no help text available) | |
1043 | debugp1copies |
|
1043 | debugp1copies | |
1044 | dump copy information compared to p1 |
|
1044 | dump copy information compared to p1 | |
1045 | debugp2copies |
|
1045 | debugp2copies | |
1046 | dump copy information compared to p2 |
|
1046 | dump copy information compared to p2 | |
1047 | debugpathcomplete |
|
1047 | debugpathcomplete | |
1048 | complete part or all of a tracked path |
|
1048 | complete part or all of a tracked path | |
1049 | debugpathcopies |
|
1049 | debugpathcopies | |
1050 | show copies between two revisions |
|
1050 | show copies between two revisions | |
1051 | debugpeer establish a connection to a peer repository |
|
1051 | debugpeer establish a connection to a peer repository | |
1052 | debugpickmergetool |
|
1052 | debugpickmergetool | |
1053 | examine which merge tool is chosen for specified file |
|
1053 | examine which merge tool is chosen for specified file | |
1054 | debugpushkey access the pushkey key/value protocol |
|
1054 | debugpushkey access the pushkey key/value protocol | |
1055 | debugpvec (no help text available) |
|
1055 | debugpvec (no help text available) | |
1056 | debugrebuilddirstate |
|
1056 | debugrebuilddirstate | |
1057 | rebuild the dirstate as it would look like for the given |
|
1057 | rebuild the dirstate as it would look like for the given | |
1058 | revision |
|
1058 | revision | |
1059 | debugrebuildfncache |
|
1059 | debugrebuildfncache | |
1060 | rebuild the fncache file |
|
1060 | rebuild the fncache file | |
1061 | debugrename dump rename information |
|
1061 | debugrename dump rename information | |
1062 | debugrequires |
|
1062 | debugrequires | |
1063 | print the current repo requirements |
|
1063 | print the current repo requirements | |
1064 | debugrevlog show data and statistics about a revlog |
|
1064 | debugrevlog show data and statistics about a revlog | |
1065 | debugrevlogindex |
|
1065 | debugrevlogindex | |
1066 | dump the contents of a revlog index |
|
1066 | dump the contents of a revlog index | |
1067 | debugrevspec parse and apply a revision specification |
|
1067 | debugrevspec parse and apply a revision specification | |
1068 | debugserve run a server with advanced settings |
|
1068 | debugserve run a server with advanced settings | |
1069 | debugsetparents |
|
1069 | debugsetparents | |
1070 | manually set the parents of the current working directory |
|
1070 | manually set the parents of the current working directory | |
1071 | (DANGEROUS) |
|
1071 | (DANGEROUS) | |
1072 | debugsidedata |
|
1072 | debugsidedata | |
1073 | dump the side data for a cl/manifest/file revision |
|
1073 | dump the side data for a cl/manifest/file revision | |
1074 | debugssl test a secure connection to a server |
|
1074 | debugssl test a secure connection to a server | |
1075 | debugstrip strip changesets and all their descendants from the repository |
|
1075 | debugstrip strip changesets and all their descendants from the repository | |
1076 | debugsub (no help text available) |
|
1076 | debugsub (no help text available) | |
1077 | debugsuccessorssets |
|
1077 | debugsuccessorssets | |
1078 | show set of successors for revision |
|
1078 | show set of successors for revision | |
1079 | debugtagscache |
|
1079 | debugtagscache | |
1080 | display the contents of .hg/cache/hgtagsfnodes1 |
|
1080 | display the contents of .hg/cache/hgtagsfnodes1 | |
1081 | debugtemplate |
|
1081 | debugtemplate | |
1082 | parse and apply a template |
|
1082 | parse and apply a template | |
1083 | debuguigetpass |
|
1083 | debuguigetpass | |
1084 | show prompt to type password |
|
1084 | show prompt to type password | |
1085 | debuguiprompt |
|
1085 | debuguiprompt | |
1086 | show plain prompt |
|
1086 | show plain prompt | |
1087 | debugupdatecaches |
|
1087 | debugupdatecaches | |
1088 | warm all known caches in the repository |
|
1088 | warm all known caches in the repository | |
1089 | debugupgraderepo |
|
1089 | debugupgraderepo | |
1090 | upgrade a repository to use different features |
|
1090 | upgrade a repository to use different features | |
1091 | debugwalk show how files match on given patterns |
|
1091 | debugwalk show how files match on given patterns | |
1092 | debugwhyunstable |
|
1092 | debugwhyunstable | |
1093 | explain instabilities of a changeset |
|
1093 | explain instabilities of a changeset | |
1094 | debugwireargs |
|
1094 | debugwireargs | |
1095 | (no help text available) |
|
1095 | (no help text available) | |
1096 | debugwireproto |
|
1096 | debugwireproto | |
1097 | send wire protocol commands to a server |
|
1097 | send wire protocol commands to a server | |
1098 |
|
1098 | |||
1099 | (use 'hg help -v debug' to show built-in aliases and global options) |
|
1099 | (use 'hg help -v debug' to show built-in aliases and global options) | |
1100 |
|
1100 | |||
1101 | internals topic renders index of available sub-topics |
|
1101 | internals topic renders index of available sub-topics | |
1102 |
|
1102 | |||
1103 | $ hg help internals |
|
1103 | $ hg help internals | |
1104 | Technical implementation topics |
|
1104 | Technical implementation topics | |
1105 | """"""""""""""""""""""""""""""" |
|
1105 | """"""""""""""""""""""""""""""" | |
1106 |
|
1106 | |||
1107 | To access a subtopic, use "hg help internals.{subtopic-name}" |
|
1107 | To access a subtopic, use "hg help internals.{subtopic-name}" | |
1108 |
|
1108 | |||
1109 | bid-merge Bid Merge Algorithm |
|
1109 | bid-merge Bid Merge Algorithm | |
1110 | bundle2 Bundle2 |
|
1110 | bundle2 Bundle2 | |
1111 | bundles Bundles |
|
1111 | bundles Bundles | |
1112 | cbor CBOR |
|
1112 | cbor CBOR | |
1113 | censor Censor |
|
1113 | censor Censor | |
1114 | changegroups Changegroups |
|
1114 | changegroups Changegroups | |
1115 | config Config Registrar |
|
1115 | config Config Registrar | |
1116 | extensions Extension API |
|
1116 | extensions Extension API | |
1117 | mergestate Mergestate |
|
1117 | mergestate Mergestate | |
1118 | requirements Repository Requirements |
|
1118 | requirements Repository Requirements | |
1119 | revlogs Revision Logs |
|
1119 | revlogs Revision Logs | |
1120 | wireprotocol Wire Protocol |
|
1120 | wireprotocol Wire Protocol | |
1121 | wireprotocolrpc |
|
1121 | wireprotocolrpc | |
1122 | Wire Protocol RPC |
|
1122 | Wire Protocol RPC | |
1123 | wireprotocolv2 |
|
1123 | wireprotocolv2 | |
1124 | Wire Protocol Version 2 |
|
1124 | Wire Protocol Version 2 | |
1125 |
|
1125 | |||
1126 | sub-topics can be accessed |
|
1126 | sub-topics can be accessed | |
1127 |
|
1127 | |||
1128 | $ hg help internals.changegroups |
|
1128 | $ hg help internals.changegroups | |
1129 | Changegroups |
|
1129 | Changegroups | |
1130 | """""""""""" |
|
1130 | """""""""""" | |
1131 |
|
1131 | |||
1132 | Changegroups are representations of repository revlog data, specifically |
|
1132 | Changegroups are representations of repository revlog data, specifically | |
1133 | the changelog data, root/flat manifest data, treemanifest data, and |
|
1133 | the changelog data, root/flat manifest data, treemanifest data, and | |
1134 | filelogs. |
|
1134 | filelogs. | |
1135 |
|
1135 | |||
1136 | There are 3 versions of changegroups: "1", "2", and "3". From a high- |
|
1136 | There are 3 versions of changegroups: "1", "2", and "3". From a high- | |
1137 | level, versions "1" and "2" are almost exactly the same, with the only |
|
1137 | level, versions "1" and "2" are almost exactly the same, with the only | |
1138 | difference being an additional item in the *delta header*. Version "3" |
|
1138 | difference being an additional item in the *delta header*. Version "3" | |
1139 | adds support for storage flags in the *delta header* and optionally |
|
1139 | adds support for storage flags in the *delta header* and optionally | |
1140 | exchanging treemanifests (enabled by setting an option on the |
|
1140 | exchanging treemanifests (enabled by setting an option on the | |
1141 | "changegroup" part in the bundle2). |
|
1141 | "changegroup" part in the bundle2). | |
1142 |
|
1142 | |||
1143 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
1143 | Changegroups when not exchanging treemanifests consist of 3 logical | |
1144 | segments: |
|
1144 | segments: | |
1145 |
|
1145 | |||
1146 | +---------------------------------+ |
|
1146 | +---------------------------------+ | |
1147 | | | | | |
|
1147 | | | | | | |
1148 | | changeset | manifest | filelogs | |
|
1148 | | changeset | manifest | filelogs | | |
1149 | | | | | |
|
1149 | | | | | | |
1150 | | | | | |
|
1150 | | | | | | |
1151 | +---------------------------------+ |
|
1151 | +---------------------------------+ | |
1152 |
|
1152 | |||
1153 | When exchanging treemanifests, there are 4 logical segments: |
|
1153 | When exchanging treemanifests, there are 4 logical segments: | |
1154 |
|
1154 | |||
1155 | +-------------------------------------------------+ |
|
1155 | +-------------------------------------------------+ | |
1156 | | | | | | |
|
1156 | | | | | | | |
1157 | | changeset | root | treemanifests | filelogs | |
|
1157 | | changeset | root | treemanifests | filelogs | | |
1158 | | | manifest | | | |
|
1158 | | | manifest | | | | |
1159 | | | | | | |
|
1159 | | | | | | | |
1160 | +-------------------------------------------------+ |
|
1160 | +-------------------------------------------------+ | |
1161 |
|
1161 | |||
1162 | The principle building block of each segment is a *chunk*. A *chunk* is a |
|
1162 | The principle building block of each segment is a *chunk*. A *chunk* is a | |
1163 | framed piece of data: |
|
1163 | framed piece of data: | |
1164 |
|
1164 | |||
1165 | +---------------------------------------+ |
|
1165 | +---------------------------------------+ | |
1166 | | | | |
|
1166 | | | | | |
1167 | | length | data | |
|
1167 | | length | data | | |
1168 | | (4 bytes) | (<length - 4> bytes) | |
|
1168 | | (4 bytes) | (<length - 4> bytes) | | |
1169 | | | | |
|
1169 | | | | | |
1170 | +---------------------------------------+ |
|
1170 | +---------------------------------------+ | |
1171 |
|
1171 | |||
1172 | All integers are big-endian signed integers. Each chunk starts with a |
|
1172 | All integers are big-endian signed integers. Each chunk starts with a | |
1173 | 32-bit integer indicating the length of the entire chunk (including the |
|
1173 | 32-bit integer indicating the length of the entire chunk (including the | |
1174 | length field itself). |
|
1174 | length field itself). | |
1175 |
|
1175 | |||
1176 | There is a special case chunk that has a value of 0 for the length |
|
1176 | There is a special case chunk that has a value of 0 for the length | |
1177 | ("0x00000000"). We call this an *empty chunk*. |
|
1177 | ("0x00000000"). We call this an *empty chunk*. | |
1178 |
|
1178 | |||
1179 | Delta Groups |
|
1179 | Delta Groups | |
1180 | ============ |
|
1180 | ============ | |
1181 |
|
1181 | |||
1182 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
1182 | A *delta group* expresses the content of a revlog as a series of deltas, | |
1183 | or patches against previous revisions. |
|
1183 | or patches against previous revisions. | |
1184 |
|
1184 | |||
1185 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
1185 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
1186 | to signal the end of the delta group: |
|
1186 | to signal the end of the delta group: | |
1187 |
|
1187 | |||
1188 | +------------------------------------------------------------------------+ |
|
1188 | +------------------------------------------------------------------------+ | |
1189 | | | | | | | |
|
1189 | | | | | | | | |
1190 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
1190 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
1191 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
1191 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
1192 | | | | | | | |
|
1192 | | | | | | | | |
1193 | +------------------------------------------------------------------------+ |
|
1193 | +------------------------------------------------------------------------+ | |
1194 |
|
1194 | |||
1195 | Each *chunk*'s data consists of the following: |
|
1195 | Each *chunk*'s data consists of the following: | |
1196 |
|
1196 | |||
1197 | +---------------------------------------+ |
|
1197 | +---------------------------------------+ | |
1198 | | | | |
|
1198 | | | | | |
1199 | | delta header | delta data | |
|
1199 | | delta header | delta data | | |
1200 | | (various by version) | (various) | |
|
1200 | | (various by version) | (various) | | |
1201 | | | | |
|
1201 | | | | | |
1202 | +---------------------------------------+ |
|
1202 | +---------------------------------------+ | |
1203 |
|
1203 | |||
1204 | The *delta data* is a series of *delta*s that describe a diff from an |
|
1204 | The *delta data* is a series of *delta*s that describe a diff from an | |
1205 | existing entry (either that the recipient already has, or previously |
|
1205 | existing entry (either that the recipient already has, or previously | |
1206 | specified in the bundle/changegroup). |
|
1206 | specified in the bundle/changegroup). | |
1207 |
|
1207 | |||
1208 | The *delta header* is different between versions "1", "2", and "3" of the |
|
1208 | The *delta header* is different between versions "1", "2", and "3" of the | |
1209 | changegroup format. |
|
1209 | changegroup format. | |
1210 |
|
1210 | |||
1211 | Version 1 (headerlen=80): |
|
1211 | Version 1 (headerlen=80): | |
1212 |
|
1212 | |||
1213 | +------------------------------------------------------+ |
|
1213 | +------------------------------------------------------+ | |
1214 | | | | | | |
|
1214 | | | | | | | |
1215 | | node | p1 node | p2 node | link node | |
|
1215 | | node | p1 node | p2 node | link node | | |
1216 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1216 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1217 | | | | | | |
|
1217 | | | | | | | |
1218 | +------------------------------------------------------+ |
|
1218 | +------------------------------------------------------+ | |
1219 |
|
1219 | |||
1220 | Version 2 (headerlen=100): |
|
1220 | Version 2 (headerlen=100): | |
1221 |
|
1221 | |||
1222 | +------------------------------------------------------------------+ |
|
1222 | +------------------------------------------------------------------+ | |
1223 | | | | | | | |
|
1223 | | | | | | | | |
1224 | | node | p1 node | p2 node | base node | link node | |
|
1224 | | node | p1 node | p2 node | base node | link node | | |
1225 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1225 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1226 | | | | | | | |
|
1226 | | | | | | | | |
1227 | +------------------------------------------------------------------+ |
|
1227 | +------------------------------------------------------------------+ | |
1228 |
|
1228 | |||
1229 | Version 3 (headerlen=102): |
|
1229 | Version 3 (headerlen=102): | |
1230 |
|
1230 | |||
1231 | +------------------------------------------------------------------------------+ |
|
1231 | +------------------------------------------------------------------------------+ | |
1232 | | | | | | | | |
|
1232 | | | | | | | | | |
1233 | | node | p1 node | p2 node | base node | link node | flags | |
|
1233 | | node | p1 node | p2 node | base node | link node | flags | | |
1234 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
1234 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
1235 | | | | | | | | |
|
1235 | | | | | | | | | |
1236 | +------------------------------------------------------------------------------+ |
|
1236 | +------------------------------------------------------------------------------+ | |
1237 |
|
1237 | |||
1238 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which |
|
1238 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which | |
1239 | contain a series of *delta*s, densely packed (no separators). These deltas |
|
1239 | contain a series of *delta*s, densely packed (no separators). These deltas | |
1240 | describe a diff from an existing entry (either that the recipient already |
|
1240 | describe a diff from an existing entry (either that the recipient already | |
1241 | has, or previously specified in the bundle/changegroup). The format is |
|
1241 | has, or previously specified in the bundle/changegroup). The format is | |
1242 | described more fully in "hg help internals.bdiff", but briefly: |
|
1242 | described more fully in "hg help internals.bdiff", but briefly: | |
1243 |
|
1243 | |||
1244 | +---------------------------------------------------------------+ |
|
1244 | +---------------------------------------------------------------+ | |
1245 | | | | | | |
|
1245 | | | | | | | |
1246 | | start offset | end offset | new length | content | |
|
1246 | | start offset | end offset | new length | content | | |
1247 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
1247 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
1248 | | | | | | |
|
1248 | | | | | | | |
1249 | +---------------------------------------------------------------+ |
|
1249 | +---------------------------------------------------------------+ | |
1250 |
|
1250 | |||
1251 | Please note that the length field in the delta data does *not* include |
|
1251 | Please note that the length field in the delta data does *not* include | |
1252 | itself. |
|
1252 | itself. | |
1253 |
|
1253 | |||
1254 | In version 1, the delta is always applied against the previous node from |
|
1254 | In version 1, the delta is always applied against the previous node from | |
1255 | the changegroup or the first parent if this is the first entry in the |
|
1255 | the changegroup or the first parent if this is the first entry in the | |
1256 | changegroup. |
|
1256 | changegroup. | |
1257 |
|
1257 | |||
1258 | In version 2 and up, the delta base node is encoded in the entry in the |
|
1258 | In version 2 and up, the delta base node is encoded in the entry in the | |
1259 | changegroup. This allows the delta to be expressed against any parent, |
|
1259 | changegroup. This allows the delta to be expressed against any parent, | |
1260 | which can result in smaller deltas and more efficient encoding of data. |
|
1260 | which can result in smaller deltas and more efficient encoding of data. | |
1261 |
|
1261 | |||
1262 | The *flags* field holds bitwise flags affecting the processing of revision |
|
1262 | The *flags* field holds bitwise flags affecting the processing of revision | |
1263 | data. The following flags are defined: |
|
1263 | data. The following flags are defined: | |
1264 |
|
1264 | |||
1265 | 32768 |
|
1265 | 32768 | |
1266 | Censored revision. The revision's fulltext has been replaced by censor |
|
1266 | Censored revision. The revision's fulltext has been replaced by censor | |
1267 | metadata. May only occur on file revisions. |
|
1267 | metadata. May only occur on file revisions. | |
1268 |
|
1268 | |||
1269 | 16384 |
|
1269 | 16384 | |
1270 | Ellipsis revision. Revision hash does not match data (likely due to |
|
1270 | Ellipsis revision. Revision hash does not match data (likely due to | |
1271 | rewritten parents). |
|
1271 | rewritten parents). | |
1272 |
|
1272 | |||
1273 | 8192 |
|
1273 | 8192 | |
1274 | Externally stored. The revision fulltext contains "key:value" "\n" |
|
1274 | Externally stored. The revision fulltext contains "key:value" "\n" | |
1275 | delimited metadata defining an object stored elsewhere. Used by the LFS |
|
1275 | delimited metadata defining an object stored elsewhere. Used by the LFS | |
1276 | extension. |
|
1276 | extension. | |
1277 |
|
1277 | |||
1278 | For historical reasons, the integer values are identical to revlog version |
|
1278 | For historical reasons, the integer values are identical to revlog version | |
1279 | 1 per-revision storage flags and correspond to bits being set in this |
|
1279 | 1 per-revision storage flags and correspond to bits being set in this | |
1280 | 2-byte field. Bits were allocated starting from the most-significant bit, |
|
1280 | 2-byte field. Bits were allocated starting from the most-significant bit, | |
1281 | hence the reverse ordering and allocation of these flags. |
|
1281 | hence the reverse ordering and allocation of these flags. | |
1282 |
|
1282 | |||
1283 | Changeset Segment |
|
1283 | Changeset Segment | |
1284 | ================= |
|
1284 | ================= | |
1285 |
|
1285 | |||
1286 | The *changeset segment* consists of a single *delta group* holding |
|
1286 | The *changeset segment* consists of a single *delta group* holding | |
1287 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
1287 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
1288 | the boundary to the *manifest segment*. |
|
1288 | the boundary to the *manifest segment*. | |
1289 |
|
1289 | |||
1290 | Manifest Segment |
|
1290 | Manifest Segment | |
1291 | ================ |
|
1291 | ================ | |
1292 |
|
1292 | |||
1293 | The *manifest segment* consists of a single *delta group* holding manifest |
|
1293 | The *manifest segment* consists of a single *delta group* holding manifest | |
1294 | data. If treemanifests are in use, it contains only the manifest for the |
|
1294 | data. If treemanifests are in use, it contains only the manifest for the | |
1295 | root directory of the repository. Otherwise, it contains the entire |
|
1295 | root directory of the repository. Otherwise, it contains the entire | |
1296 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
1296 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
1297 | the boundary to the next segment (either the *treemanifests segment* or |
|
1297 | the boundary to the next segment (either the *treemanifests segment* or | |
1298 | the *filelogs segment*, depending on version and the request options). |
|
1298 | the *filelogs segment*, depending on version and the request options). | |
1299 |
|
1299 | |||
1300 | Treemanifests Segment |
|
1300 | Treemanifests Segment | |
1301 | --------------------- |
|
1301 | --------------------- | |
1302 |
|
1302 | |||
1303 | The *treemanifests segment* only exists in changegroup version "3", and |
|
1303 | The *treemanifests segment* only exists in changegroup version "3", and | |
1304 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
1304 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
1305 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
1305 | (it is not possible to use changegroup version 3 outside of bundle2). | |
1306 | Aside from the filenames in the *treemanifests segment* containing a |
|
1306 | Aside from the filenames in the *treemanifests segment* containing a | |
1307 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
1307 | trailing "/" character, it behaves identically to the *filelogs segment* | |
1308 | (see below). The final sub-segment is followed by an *empty chunk* |
|
1308 | (see below). The final sub-segment is followed by an *empty chunk* | |
1309 | (logically, a sub-segment with filename size 0). This denotes the boundary |
|
1309 | (logically, a sub-segment with filename size 0). This denotes the boundary | |
1310 | to the *filelogs segment*. |
|
1310 | to the *filelogs segment*. | |
1311 |
|
1311 | |||
1312 | Filelogs Segment |
|
1312 | Filelogs Segment | |
1313 | ================ |
|
1313 | ================ | |
1314 |
|
1314 | |||
1315 | The *filelogs segment* consists of multiple sub-segments, each |
|
1315 | The *filelogs segment* consists of multiple sub-segments, each | |
1316 | corresponding to an individual file whose data is being described: |
|
1316 | corresponding to an individual file whose data is being described: | |
1317 |
|
1317 | |||
1318 | +--------------------------------------------------+ |
|
1318 | +--------------------------------------------------+ | |
1319 | | | | | | | |
|
1319 | | | | | | | | |
1320 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
1320 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
1321 | | | | | | (4 bytes) | |
|
1321 | | | | | | (4 bytes) | | |
1322 | | | | | | | |
|
1322 | | | | | | | | |
1323 | +--------------------------------------------------+ |
|
1323 | +--------------------------------------------------+ | |
1324 |
|
1324 | |||
1325 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
1325 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
1326 | a sub-segment with filename size 0). This denotes the end of the segment |
|
1326 | a sub-segment with filename size 0). This denotes the end of the segment | |
1327 | and of the overall changegroup. |
|
1327 | and of the overall changegroup. | |
1328 |
|
1328 | |||
1329 | Each filelog sub-segment consists of the following: |
|
1329 | Each filelog sub-segment consists of the following: | |
1330 |
|
1330 | |||
1331 | +------------------------------------------------------+ |
|
1331 | +------------------------------------------------------+ | |
1332 | | | | | |
|
1332 | | | | | | |
1333 | | filename length | filename | delta group | |
|
1333 | | filename length | filename | delta group | | |
1334 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
1334 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
1335 | | | | | |
|
1335 | | | | | | |
1336 | +------------------------------------------------------+ |
|
1336 | +------------------------------------------------------+ | |
1337 |
|
1337 | |||
1338 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
1338 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
1339 | followed by N chunks constituting the *delta group* for this file. The |
|
1339 | followed by N chunks constituting the *delta group* for this file. The | |
1340 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
1340 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
1341 | next filelog sub-segment. |
|
1341 | next filelog sub-segment. | |
1342 |
|
1342 | |||
1343 | non-existent subtopics print an error |
|
1343 | non-existent subtopics print an error | |
1344 |
|
1344 | |||
1345 | $ hg help internals.foo |
|
1345 | $ hg help internals.foo | |
1346 | abort: no such help topic: internals.foo |
|
1346 | abort: no such help topic: internals.foo | |
1347 | (try 'hg help --keyword foo') |
|
1347 | (try 'hg help --keyword foo') | |
1348 |
[ |
|
1348 | [10] | |
1349 |
|
1349 | |||
1350 | test advanced, deprecated and experimental options are hidden in command help |
|
1350 | test advanced, deprecated and experimental options are hidden in command help | |
1351 | $ hg help debugoptADV |
|
1351 | $ hg help debugoptADV | |
1352 | hg debugoptADV |
|
1352 | hg debugoptADV | |
1353 |
|
1353 | |||
1354 | (no help text available) |
|
1354 | (no help text available) | |
1355 |
|
1355 | |||
1356 | options: |
|
1356 | options: | |
1357 |
|
1357 | |||
1358 | (some details hidden, use --verbose to show complete help) |
|
1358 | (some details hidden, use --verbose to show complete help) | |
1359 | $ hg help debugoptDEP |
|
1359 | $ hg help debugoptDEP | |
1360 | hg debugoptDEP |
|
1360 | hg debugoptDEP | |
1361 |
|
1361 | |||
1362 | (no help text available) |
|
1362 | (no help text available) | |
1363 |
|
1363 | |||
1364 | options: |
|
1364 | options: | |
1365 |
|
1365 | |||
1366 | (some details hidden, use --verbose to show complete help) |
|
1366 | (some details hidden, use --verbose to show complete help) | |
1367 |
|
1367 | |||
1368 | $ hg help debugoptEXP |
|
1368 | $ hg help debugoptEXP | |
1369 | hg debugoptEXP |
|
1369 | hg debugoptEXP | |
1370 |
|
1370 | |||
1371 | (no help text available) |
|
1371 | (no help text available) | |
1372 |
|
1372 | |||
1373 | options: |
|
1373 | options: | |
1374 |
|
1374 | |||
1375 | (some details hidden, use --verbose to show complete help) |
|
1375 | (some details hidden, use --verbose to show complete help) | |
1376 |
|
1376 | |||
1377 | test advanced, deprecated and experimental options are shown with -v |
|
1377 | test advanced, deprecated and experimental options are shown with -v | |
1378 | $ hg help -v debugoptADV | grep aopt |
|
1378 | $ hg help -v debugoptADV | grep aopt | |
1379 | --aopt option is (ADVANCED) |
|
1379 | --aopt option is (ADVANCED) | |
1380 | $ hg help -v debugoptDEP | grep dopt |
|
1380 | $ hg help -v debugoptDEP | grep dopt | |
1381 | --dopt option is (DEPRECATED) |
|
1381 | --dopt option is (DEPRECATED) | |
1382 | $ hg help -v debugoptEXP | grep eopt |
|
1382 | $ hg help -v debugoptEXP | grep eopt | |
1383 | --eopt option is (EXPERIMENTAL) |
|
1383 | --eopt option is (EXPERIMENTAL) | |
1384 |
|
1384 | |||
1385 | #if gettext |
|
1385 | #if gettext | |
1386 | test deprecated option is hidden with translation with untranslated description |
|
1386 | test deprecated option is hidden with translation with untranslated description | |
1387 | (use many globy for not failing on changed transaction) |
|
1387 | (use many globy for not failing on changed transaction) | |
1388 | $ LANGUAGE=sv hg help debugoptDEP |
|
1388 | $ LANGUAGE=sv hg help debugoptDEP | |
1389 | hg debugoptDEP |
|
1389 | hg debugoptDEP | |
1390 |
|
1390 | |||
1391 | (*) (glob) |
|
1391 | (*) (glob) | |
1392 |
|
1392 | |||
1393 | options: |
|
1393 | options: | |
1394 |
|
1394 | |||
1395 | (some details hidden, use --verbose to show complete help) |
|
1395 | (some details hidden, use --verbose to show complete help) | |
1396 | #endif |
|
1396 | #endif | |
1397 |
|
1397 | |||
1398 | Test commands that collide with topics (issue4240) |
|
1398 | Test commands that collide with topics (issue4240) | |
1399 |
|
1399 | |||
1400 | $ hg config -hq |
|
1400 | $ hg config -hq | |
1401 | hg config [-u] [NAME]... |
|
1401 | hg config [-u] [NAME]... | |
1402 |
|
1402 | |||
1403 | show combined config settings from all hgrc files |
|
1403 | show combined config settings from all hgrc files | |
1404 | $ hg showconfig -hq |
|
1404 | $ hg showconfig -hq | |
1405 | hg config [-u] [NAME]... |
|
1405 | hg config [-u] [NAME]... | |
1406 |
|
1406 | |||
1407 | show combined config settings from all hgrc files |
|
1407 | show combined config settings from all hgrc files | |
1408 |
|
1408 | |||
1409 | Test a help topic |
|
1409 | Test a help topic | |
1410 |
|
1410 | |||
1411 | $ hg help dates |
|
1411 | $ hg help dates | |
1412 | Date Formats |
|
1412 | Date Formats | |
1413 | """""""""""" |
|
1413 | """""""""""" | |
1414 |
|
1414 | |||
1415 | Some commands allow the user to specify a date, e.g.: |
|
1415 | Some commands allow the user to specify a date, e.g.: | |
1416 |
|
1416 | |||
1417 | - backout, commit, import, tag: Specify the commit date. |
|
1417 | - backout, commit, import, tag: Specify the commit date. | |
1418 | - log, revert, update: Select revision(s) by date. |
|
1418 | - log, revert, update: Select revision(s) by date. | |
1419 |
|
1419 | |||
1420 | Many date formats are valid. Here are some examples: |
|
1420 | Many date formats are valid. Here are some examples: | |
1421 |
|
1421 | |||
1422 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
1422 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
1423 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
1423 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
1424 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
1424 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
1425 | - "Dec 6" (midnight) |
|
1425 | - "Dec 6" (midnight) | |
1426 | - "13:18" (today assumed) |
|
1426 | - "13:18" (today assumed) | |
1427 | - "3:39" (3:39AM assumed) |
|
1427 | - "3:39" (3:39AM assumed) | |
1428 | - "3:39pm" (15:39) |
|
1428 | - "3:39pm" (15:39) | |
1429 | - "2006-12-06 13:18:29" (ISO 8601 format) |
|
1429 | - "2006-12-06 13:18:29" (ISO 8601 format) | |
1430 | - "2006-12-6 13:18" |
|
1430 | - "2006-12-6 13:18" | |
1431 | - "2006-12-6" |
|
1431 | - "2006-12-6" | |
1432 | - "12-6" |
|
1432 | - "12-6" | |
1433 | - "12/6" |
|
1433 | - "12/6" | |
1434 | - "12/6/6" (Dec 6 2006) |
|
1434 | - "12/6/6" (Dec 6 2006) | |
1435 | - "today" (midnight) |
|
1435 | - "today" (midnight) | |
1436 | - "yesterday" (midnight) |
|
1436 | - "yesterday" (midnight) | |
1437 | - "now" - right now |
|
1437 | - "now" - right now | |
1438 |
|
1438 | |||
1439 | Lastly, there is Mercurial's internal format: |
|
1439 | Lastly, there is Mercurial's internal format: | |
1440 |
|
1440 | |||
1441 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
1441 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
1442 |
|
1442 | |||
1443 | This is the internal representation format for dates. The first number is |
|
1443 | This is the internal representation format for dates. The first number is | |
1444 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second |
|
1444 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second | |
1445 | is the offset of the local timezone, in seconds west of UTC (negative if |
|
1445 | is the offset of the local timezone, in seconds west of UTC (negative if | |
1446 | the timezone is east of UTC). |
|
1446 | the timezone is east of UTC). | |
1447 |
|
1447 | |||
1448 | The log command also accepts date ranges: |
|
1448 | The log command also accepts date ranges: | |
1449 |
|
1449 | |||
1450 | - "<DATE" - at or before a given date/time |
|
1450 | - "<DATE" - at or before a given date/time | |
1451 | - ">DATE" - on or after a given date/time |
|
1451 | - ">DATE" - on or after a given date/time | |
1452 | - "DATE to DATE" - a date range, inclusive |
|
1452 | - "DATE to DATE" - a date range, inclusive | |
1453 | - "-DAYS" - within a given number of days from today |
|
1453 | - "-DAYS" - within a given number of days from today | |
1454 |
|
1454 | |||
1455 | Test repeated config section name |
|
1455 | Test repeated config section name | |
1456 |
|
1456 | |||
1457 | $ hg help config.host |
|
1457 | $ hg help config.host | |
1458 | "http_proxy.host" |
|
1458 | "http_proxy.host" | |
1459 | Host name and (optional) port of the proxy server, for example |
|
1459 | Host name and (optional) port of the proxy server, for example | |
1460 | "myproxy:8000". |
|
1460 | "myproxy:8000". | |
1461 |
|
1461 | |||
1462 | "smtp.host" |
|
1462 | "smtp.host" | |
1463 | Host name of mail server, e.g. "mail.example.com". |
|
1463 | Host name of mail server, e.g. "mail.example.com". | |
1464 |
|
1464 | |||
1465 |
|
1465 | |||
1466 | Test section name with dot |
|
1466 | Test section name with dot | |
1467 |
|
1467 | |||
1468 | $ hg help config.ui.username |
|
1468 | $ hg help config.ui.username | |
1469 | "ui.username" |
|
1469 | "ui.username" | |
1470 | The committer of a changeset created when running "commit". Typically |
|
1470 | The committer of a changeset created when running "commit". Typically | |
1471 | a person's name and email address, e.g. "Fred Widget |
|
1471 | a person's name and email address, e.g. "Fred Widget | |
1472 | <fred@example.com>". Environment variables in the username are |
|
1472 | <fred@example.com>". Environment variables in the username are | |
1473 | expanded. |
|
1473 | expanded. | |
1474 |
|
1474 | |||
1475 | (default: "$EMAIL" or "username@hostname". If the username in hgrc is |
|
1475 | (default: "$EMAIL" or "username@hostname". If the username in hgrc is | |
1476 | empty, e.g. if the system admin set "username =" in the system hgrc, |
|
1476 | empty, e.g. if the system admin set "username =" in the system hgrc, | |
1477 | it has to be specified manually or in a different hgrc file) |
|
1477 | it has to be specified manually or in a different hgrc file) | |
1478 |
|
1478 | |||
1479 |
|
1479 | |||
1480 | $ hg help config.annotate.git |
|
1480 | $ hg help config.annotate.git | |
1481 | abort: help section not found: config.annotate.git |
|
1481 | abort: help section not found: config.annotate.git | |
1482 |
[ |
|
1482 | [10] | |
1483 |
|
1483 | |||
1484 | $ hg help config.update.check |
|
1484 | $ hg help config.update.check | |
1485 | "commands.update.check" |
|
1485 | "commands.update.check" | |
1486 | Determines what level of checking 'hg update' will perform before |
|
1486 | Determines what level of checking 'hg update' will perform before | |
1487 | moving to a destination revision. Valid values are "abort", "none", |
|
1487 | moving to a destination revision. Valid values are "abort", "none", | |
1488 | "linear", and "noconflict". "abort" always fails if the working |
|
1488 | "linear", and "noconflict". "abort" always fails if the working | |
1489 | directory has uncommitted changes. "none" performs no checking, and |
|
1489 | directory has uncommitted changes. "none" performs no checking, and | |
1490 | may result in a merge with uncommitted changes. "linear" allows any |
|
1490 | may result in a merge with uncommitted changes. "linear" allows any | |
1491 | update as long as it follows a straight line in the revision history, |
|
1491 | update as long as it follows a straight line in the revision history, | |
1492 | and may trigger a merge with uncommitted changes. "noconflict" will |
|
1492 | and may trigger a merge with uncommitted changes. "noconflict" will | |
1493 | allow any update which would not trigger a merge with uncommitted |
|
1493 | allow any update which would not trigger a merge with uncommitted | |
1494 | changes, if any are present. (default: "linear") |
|
1494 | changes, if any are present. (default: "linear") | |
1495 |
|
1495 | |||
1496 |
|
1496 | |||
1497 | $ hg help config.commands.update.check |
|
1497 | $ hg help config.commands.update.check | |
1498 | "commands.update.check" |
|
1498 | "commands.update.check" | |
1499 | Determines what level of checking 'hg update' will perform before |
|
1499 | Determines what level of checking 'hg update' will perform before | |
1500 | moving to a destination revision. Valid values are "abort", "none", |
|
1500 | moving to a destination revision. Valid values are "abort", "none", | |
1501 | "linear", and "noconflict". "abort" always fails if the working |
|
1501 | "linear", and "noconflict". "abort" always fails if the working | |
1502 | directory has uncommitted changes. "none" performs no checking, and |
|
1502 | directory has uncommitted changes. "none" performs no checking, and | |
1503 | may result in a merge with uncommitted changes. "linear" allows any |
|
1503 | may result in a merge with uncommitted changes. "linear" allows any | |
1504 | update as long as it follows a straight line in the revision history, |
|
1504 | update as long as it follows a straight line in the revision history, | |
1505 | and may trigger a merge with uncommitted changes. "noconflict" will |
|
1505 | and may trigger a merge with uncommitted changes. "noconflict" will | |
1506 | allow any update which would not trigger a merge with uncommitted |
|
1506 | allow any update which would not trigger a merge with uncommitted | |
1507 | changes, if any are present. (default: "linear") |
|
1507 | changes, if any are present. (default: "linear") | |
1508 |
|
1508 | |||
1509 |
|
1509 | |||
1510 | $ hg help config.ommands.update.check |
|
1510 | $ hg help config.ommands.update.check | |
1511 | abort: help section not found: config.ommands.update.check |
|
1511 | abort: help section not found: config.ommands.update.check | |
1512 |
[ |
|
1512 | [10] | |
1513 |
|
1513 | |||
1514 | Unrelated trailing paragraphs shouldn't be included |
|
1514 | Unrelated trailing paragraphs shouldn't be included | |
1515 |
|
1515 | |||
1516 | $ hg help config.extramsg | grep '^$' |
|
1516 | $ hg help config.extramsg | grep '^$' | |
1517 |
|
1517 | |||
1518 |
|
1518 | |||
1519 | Test capitalized section name |
|
1519 | Test capitalized section name | |
1520 |
|
1520 | |||
1521 | $ hg help scripting.HGPLAIN > /dev/null |
|
1521 | $ hg help scripting.HGPLAIN > /dev/null | |
1522 |
|
1522 | |||
1523 | Help subsection: |
|
1523 | Help subsection: | |
1524 |
|
1524 | |||
1525 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
1525 | $ hg help config.charsets |grep "Email example:" > /dev/null | |
1526 | [1] |
|
1526 | [1] | |
1527 |
|
1527 | |||
1528 | Show nested definitions |
|
1528 | Show nested definitions | |
1529 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
1529 | ("profiling.type"[break]"ls"[break]"stat"[break]) | |
1530 |
|
1530 | |||
1531 | $ hg help config.type | egrep '^$'|wc -l |
|
1531 | $ hg help config.type | egrep '^$'|wc -l | |
1532 | \s*3 (re) |
|
1532 | \s*3 (re) | |
1533 |
|
1533 | |||
1534 | $ hg help config.profiling.type.ls |
|
1534 | $ hg help config.profiling.type.ls | |
1535 | "profiling.type.ls" |
|
1535 | "profiling.type.ls" | |
1536 | Use Python's built-in instrumenting profiler. This profiler works on |
|
1536 | Use Python's built-in instrumenting profiler. This profiler works on | |
1537 | all platforms, but each line number it reports is the first line of |
|
1537 | all platforms, but each line number it reports is the first line of | |
1538 | a function. This restriction makes it difficult to identify the |
|
1538 | a function. This restriction makes it difficult to identify the | |
1539 | expensive parts of a non-trivial function. |
|
1539 | expensive parts of a non-trivial function. | |
1540 |
|
1540 | |||
1541 |
|
1541 | |||
1542 | Separate sections from subsections |
|
1542 | Separate sections from subsections | |
1543 |
|
1543 | |||
1544 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq |
|
1544 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq | |
1545 | "format" |
|
1545 | "format" | |
1546 | -------- |
|
1546 | -------- | |
1547 |
|
1547 | |||
1548 | "usegeneraldelta" |
|
1548 | "usegeneraldelta" | |
1549 |
|
1549 | |||
1550 | "dotencode" |
|
1550 | "dotencode" | |
1551 |
|
1551 | |||
1552 | "usefncache" |
|
1552 | "usefncache" | |
1553 |
|
1553 | |||
1554 | "usestore" |
|
1554 | "usestore" | |
1555 |
|
1555 | |||
1556 | "sparse-revlog" |
|
1556 | "sparse-revlog" | |
1557 |
|
1557 | |||
1558 | "revlog-compression" |
|
1558 | "revlog-compression" | |
1559 |
|
1559 | |||
1560 | "bookmarks-in-store" |
|
1560 | "bookmarks-in-store" | |
1561 |
|
1561 | |||
1562 | "profiling" |
|
1562 | "profiling" | |
1563 | ----------- |
|
1563 | ----------- | |
1564 |
|
1564 | |||
1565 | "format" |
|
1565 | "format" | |
1566 |
|
1566 | |||
1567 | "progress" |
|
1567 | "progress" | |
1568 | ---------- |
|
1568 | ---------- | |
1569 |
|
1569 | |||
1570 | "format" |
|
1570 | "format" | |
1571 |
|
1571 | |||
1572 |
|
1572 | |||
1573 | Last item in help config.*: |
|
1573 | Last item in help config.*: | |
1574 |
|
1574 | |||
1575 | $ hg help config.`hg help config|grep '^ "'| \ |
|
1575 | $ hg help config.`hg help config|grep '^ "'| \ | |
1576 | > tail -1|sed 's![ "]*!!g'`| \ |
|
1576 | > tail -1|sed 's![ "]*!!g'`| \ | |
1577 | > grep 'hg help -c config' > /dev/null |
|
1577 | > grep 'hg help -c config' > /dev/null | |
1578 | [1] |
|
1578 | [1] | |
1579 |
|
1579 | |||
1580 | note to use help -c for general hg help config: |
|
1580 | note to use help -c for general hg help config: | |
1581 |
|
1581 | |||
1582 | $ hg help config |grep 'hg help -c config' > /dev/null |
|
1582 | $ hg help config |grep 'hg help -c config' > /dev/null | |
1583 |
|
1583 | |||
1584 | Test templating help |
|
1584 | Test templating help | |
1585 |
|
1585 | |||
1586 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
1586 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
1587 | desc String. The text of the changeset description. |
|
1587 | desc String. The text of the changeset description. | |
1588 | diffstat String. Statistics of changes with the following format: |
|
1588 | diffstat String. Statistics of changes with the following format: | |
1589 | firstline Any text. Returns the first line of text. |
|
1589 | firstline Any text. Returns the first line of text. | |
1590 | nonempty Any text. Returns '(none)' if the string is empty. |
|
1590 | nonempty Any text. Returns '(none)' if the string is empty. | |
1591 |
|
1591 | |||
1592 | Test deprecated items |
|
1592 | Test deprecated items | |
1593 |
|
1593 | |||
1594 | $ hg help -v templating | grep currentbookmark |
|
1594 | $ hg help -v templating | grep currentbookmark | |
1595 | currentbookmark |
|
1595 | currentbookmark | |
1596 | $ hg help templating | (grep currentbookmark || true) |
|
1596 | $ hg help templating | (grep currentbookmark || true) | |
1597 |
|
1597 | |||
1598 | Test help hooks |
|
1598 | Test help hooks | |
1599 |
|
1599 | |||
1600 | $ cat > helphook1.py <<EOF |
|
1600 | $ cat > helphook1.py <<EOF | |
1601 | > from mercurial import help |
|
1601 | > from mercurial import help | |
1602 | > |
|
1602 | > | |
1603 | > def rewrite(ui, topic, doc): |
|
1603 | > def rewrite(ui, topic, doc): | |
1604 | > return doc + b'\nhelphook1\n' |
|
1604 | > return doc + b'\nhelphook1\n' | |
1605 | > |
|
1605 | > | |
1606 | > def extsetup(ui): |
|
1606 | > def extsetup(ui): | |
1607 | > help.addtopichook(b'revisions', rewrite) |
|
1607 | > help.addtopichook(b'revisions', rewrite) | |
1608 | > EOF |
|
1608 | > EOF | |
1609 | $ cat > helphook2.py <<EOF |
|
1609 | $ cat > helphook2.py <<EOF | |
1610 | > from mercurial import help |
|
1610 | > from mercurial import help | |
1611 | > |
|
1611 | > | |
1612 | > def rewrite(ui, topic, doc): |
|
1612 | > def rewrite(ui, topic, doc): | |
1613 | > return doc + b'\nhelphook2\n' |
|
1613 | > return doc + b'\nhelphook2\n' | |
1614 | > |
|
1614 | > | |
1615 | > def extsetup(ui): |
|
1615 | > def extsetup(ui): | |
1616 | > help.addtopichook(b'revisions', rewrite) |
|
1616 | > help.addtopichook(b'revisions', rewrite) | |
1617 | > EOF |
|
1617 | > EOF | |
1618 | $ echo '[extensions]' >> $HGRCPATH |
|
1618 | $ echo '[extensions]' >> $HGRCPATH | |
1619 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
1619 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
1620 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
1620 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
1621 | $ hg help revsets | grep helphook |
|
1621 | $ hg help revsets | grep helphook | |
1622 | helphook1 |
|
1622 | helphook1 | |
1623 | helphook2 |
|
1623 | helphook2 | |
1624 |
|
1624 | |||
1625 | help -c should only show debug --debug |
|
1625 | help -c should only show debug --debug | |
1626 |
|
1626 | |||
1627 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' |
|
1627 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' | |
1628 | [1] |
|
1628 | [1] | |
1629 |
|
1629 | |||
1630 | help -c should only show deprecated for -v |
|
1630 | help -c should only show deprecated for -v | |
1631 |
|
1631 | |||
1632 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1632 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' | |
1633 | [1] |
|
1633 | [1] | |
1634 |
|
1634 | |||
1635 | Test -s / --system |
|
1635 | Test -s / --system | |
1636 |
|
1636 | |||
1637 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ |
|
1637 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ | |
1638 | > wc -l | sed -e 's/ //g' |
|
1638 | > wc -l | sed -e 's/ //g' | |
1639 | 0 |
|
1639 | 0 | |
1640 | $ hg help config.files --system unix | grep 'USER' | \ |
|
1640 | $ hg help config.files --system unix | grep 'USER' | \ | |
1641 | > wc -l | sed -e 's/ //g' |
|
1641 | > wc -l | sed -e 's/ //g' | |
1642 | 0 |
|
1642 | 0 | |
1643 |
|
1643 | |||
1644 | Test -e / -c / -k combinations |
|
1644 | Test -e / -c / -k combinations | |
1645 |
|
1645 | |||
1646 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1646 | $ hg help -c|egrep '^[A-Z].*:|^ debug' | |
1647 | Commands: |
|
1647 | Commands: | |
1648 | $ hg help -e|egrep '^[A-Z].*:|^ debug' |
|
1648 | $ hg help -e|egrep '^[A-Z].*:|^ debug' | |
1649 | Extensions: |
|
1649 | Extensions: | |
1650 | $ hg help -k|egrep '^[A-Z].*:|^ debug' |
|
1650 | $ hg help -k|egrep '^[A-Z].*:|^ debug' | |
1651 | Topics: |
|
1651 | Topics: | |
1652 | Commands: |
|
1652 | Commands: | |
1653 | Extensions: |
|
1653 | Extensions: | |
1654 | Extension Commands: |
|
1654 | Extension Commands: | |
1655 | $ hg help -c schemes |
|
1655 | $ hg help -c schemes | |
1656 | abort: no such help topic: schemes |
|
1656 | abort: no such help topic: schemes | |
1657 | (try 'hg help --keyword schemes') |
|
1657 | (try 'hg help --keyword schemes') | |
1658 |
[ |
|
1658 | [10] | |
1659 | $ hg help -e schemes |head -1 |
|
1659 | $ hg help -e schemes |head -1 | |
1660 | schemes extension - extend schemes with shortcuts to repository swarms |
|
1660 | schemes extension - extend schemes with shortcuts to repository swarms | |
1661 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1661 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' | |
1662 | Commands: |
|
1662 | Commands: | |
1663 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1663 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' | |
1664 | Extensions: |
|
1664 | Extensions: | |
1665 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1665 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' | |
1666 | Extensions: |
|
1666 | Extensions: | |
1667 | Commands: |
|
1667 | Commands: | |
1668 | $ hg help -c commit > /dev/null |
|
1668 | $ hg help -c commit > /dev/null | |
1669 | $ hg help -e -c commit > /dev/null |
|
1669 | $ hg help -e -c commit > /dev/null | |
1670 | $ hg help -e commit |
|
1670 | $ hg help -e commit | |
1671 | abort: no such help topic: commit |
|
1671 | abort: no such help topic: commit | |
1672 | (try 'hg help --keyword commit') |
|
1672 | (try 'hg help --keyword commit') | |
1673 |
[ |
|
1673 | [10] | |
1674 |
|
1674 | |||
1675 | Test keyword search help |
|
1675 | Test keyword search help | |
1676 |
|
1676 | |||
1677 | $ cat > prefixedname.py <<EOF |
|
1677 | $ cat > prefixedname.py <<EOF | |
1678 | > '''matched against word "clone" |
|
1678 | > '''matched against word "clone" | |
1679 | > ''' |
|
1679 | > ''' | |
1680 | > EOF |
|
1680 | > EOF | |
1681 | $ echo '[extensions]' >> $HGRCPATH |
|
1681 | $ echo '[extensions]' >> $HGRCPATH | |
1682 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
1682 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH | |
1683 | $ hg help -k clone |
|
1683 | $ hg help -k clone | |
1684 | Topics: |
|
1684 | Topics: | |
1685 |
|
1685 | |||
1686 | config Configuration Files |
|
1686 | config Configuration Files | |
1687 | extensions Using Additional Features |
|
1687 | extensions Using Additional Features | |
1688 | glossary Glossary |
|
1688 | glossary Glossary | |
1689 | phases Working with Phases |
|
1689 | phases Working with Phases | |
1690 | subrepos Subrepositories |
|
1690 | subrepos Subrepositories | |
1691 | urls URL Paths |
|
1691 | urls URL Paths | |
1692 |
|
1692 | |||
1693 | Commands: |
|
1693 | Commands: | |
1694 |
|
1694 | |||
1695 | bookmarks create a new bookmark or list existing bookmarks |
|
1695 | bookmarks create a new bookmark or list existing bookmarks | |
1696 | clone make a copy of an existing repository |
|
1696 | clone make a copy of an existing repository | |
1697 | paths show aliases for remote repositories |
|
1697 | paths show aliases for remote repositories | |
1698 | pull pull changes from the specified source |
|
1698 | pull pull changes from the specified source | |
1699 | update update working directory (or switch revisions) |
|
1699 | update update working directory (or switch revisions) | |
1700 |
|
1700 | |||
1701 | Extensions: |
|
1701 | Extensions: | |
1702 |
|
1702 | |||
1703 | clonebundles advertise pre-generated bundles to seed clones |
|
1703 | clonebundles advertise pre-generated bundles to seed clones | |
1704 | narrow create clones which fetch history data for subset of files |
|
1704 | narrow create clones which fetch history data for subset of files | |
1705 | (EXPERIMENTAL) |
|
1705 | (EXPERIMENTAL) | |
1706 | prefixedname matched against word "clone" |
|
1706 | prefixedname matched against word "clone" | |
1707 | relink recreates hardlinks between repository clones |
|
1707 | relink recreates hardlinks between repository clones | |
1708 |
|
1708 | |||
1709 | Extension Commands: |
|
1709 | Extension Commands: | |
1710 |
|
1710 | |||
1711 | qclone clone main and patch repository at same time |
|
1711 | qclone clone main and patch repository at same time | |
1712 |
|
1712 | |||
1713 | Test unfound topic |
|
1713 | Test unfound topic | |
1714 |
|
1714 | |||
1715 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1715 | $ hg help nonexistingtopicthatwillneverexisteverever | |
1716 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1716 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever | |
1717 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') |
|
1717 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') | |
1718 |
[ |
|
1718 | [10] | |
1719 |
|
1719 | |||
1720 | Test unfound keyword |
|
1720 | Test unfound keyword | |
1721 |
|
1721 | |||
1722 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1722 | $ hg help --keyword nonexistingwordthatwillneverexisteverever | |
1723 | abort: no matches |
|
1723 | abort: no matches | |
1724 | (try 'hg help' for a list of topics) |
|
1724 | (try 'hg help' for a list of topics) | |
1725 |
[ |
|
1725 | [10] | |
1726 |
|
1726 | |||
1727 | Test omit indicating for help |
|
1727 | Test omit indicating for help | |
1728 |
|
1728 | |||
1729 | $ cat > addverboseitems.py <<EOF |
|
1729 | $ cat > addverboseitems.py <<EOF | |
1730 | > r'''extension to test omit indicating. |
|
1730 | > r'''extension to test omit indicating. | |
1731 | > |
|
1731 | > | |
1732 | > This paragraph is never omitted (for extension) |
|
1732 | > This paragraph is never omitted (for extension) | |
1733 | > |
|
1733 | > | |
1734 | > .. container:: verbose |
|
1734 | > .. container:: verbose | |
1735 | > |
|
1735 | > | |
1736 | > This paragraph is omitted, |
|
1736 | > This paragraph is omitted, | |
1737 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1737 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | |
1738 | > |
|
1738 | > | |
1739 | > This paragraph is never omitted, too (for extension) |
|
1739 | > This paragraph is never omitted, too (for extension) | |
1740 | > ''' |
|
1740 | > ''' | |
1741 | > from __future__ import absolute_import |
|
1741 | > from __future__ import absolute_import | |
1742 | > from mercurial import commands, help |
|
1742 | > from mercurial import commands, help | |
1743 | > testtopic = br"""This paragraph is never omitted (for topic). |
|
1743 | > testtopic = br"""This paragraph is never omitted (for topic). | |
1744 | > |
|
1744 | > | |
1745 | > .. container:: verbose |
|
1745 | > .. container:: verbose | |
1746 | > |
|
1746 | > | |
1747 | > This paragraph is omitted, |
|
1747 | > This paragraph is omitted, | |
1748 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1748 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | |
1749 | > |
|
1749 | > | |
1750 | > This paragraph is never omitted, too (for topic) |
|
1750 | > This paragraph is never omitted, too (for topic) | |
1751 | > """ |
|
1751 | > """ | |
1752 | > def extsetup(ui): |
|
1752 | > def extsetup(ui): | |
1753 | > help.helptable.append(([b"topic-containing-verbose"], |
|
1753 | > help.helptable.append(([b"topic-containing-verbose"], | |
1754 | > b"This is the topic to test omit indicating.", |
|
1754 | > b"This is the topic to test omit indicating.", | |
1755 | > lambda ui: testtopic)) |
|
1755 | > lambda ui: testtopic)) | |
1756 | > EOF |
|
1756 | > EOF | |
1757 | $ echo '[extensions]' >> $HGRCPATH |
|
1757 | $ echo '[extensions]' >> $HGRCPATH | |
1758 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1758 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | |
1759 | $ hg help addverboseitems |
|
1759 | $ hg help addverboseitems | |
1760 | addverboseitems extension - extension to test omit indicating. |
|
1760 | addverboseitems extension - extension to test omit indicating. | |
1761 |
|
1761 | |||
1762 | This paragraph is never omitted (for extension) |
|
1762 | This paragraph is never omitted (for extension) | |
1763 |
|
1763 | |||
1764 | This paragraph is never omitted, too (for extension) |
|
1764 | This paragraph is never omitted, too (for extension) | |
1765 |
|
1765 | |||
1766 | (some details hidden, use --verbose to show complete help) |
|
1766 | (some details hidden, use --verbose to show complete help) | |
1767 |
|
1767 | |||
1768 | no commands defined |
|
1768 | no commands defined | |
1769 | $ hg help -v addverboseitems |
|
1769 | $ hg help -v addverboseitems | |
1770 | addverboseitems extension - extension to test omit indicating. |
|
1770 | addverboseitems extension - extension to test omit indicating. | |
1771 |
|
1771 | |||
1772 | This paragraph is never omitted (for extension) |
|
1772 | This paragraph is never omitted (for extension) | |
1773 |
|
1773 | |||
1774 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1774 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1775 | extension) |
|
1775 | extension) | |
1776 |
|
1776 | |||
1777 | This paragraph is never omitted, too (for extension) |
|
1777 | This paragraph is never omitted, too (for extension) | |
1778 |
|
1778 | |||
1779 | no commands defined |
|
1779 | no commands defined | |
1780 | $ hg help topic-containing-verbose |
|
1780 | $ hg help topic-containing-verbose | |
1781 | This is the topic to test omit indicating. |
|
1781 | This is the topic to test omit indicating. | |
1782 | """""""""""""""""""""""""""""""""""""""""" |
|
1782 | """""""""""""""""""""""""""""""""""""""""" | |
1783 |
|
1783 | |||
1784 | This paragraph is never omitted (for topic). |
|
1784 | This paragraph is never omitted (for topic). | |
1785 |
|
1785 | |||
1786 | This paragraph is never omitted, too (for topic) |
|
1786 | This paragraph is never omitted, too (for topic) | |
1787 |
|
1787 | |||
1788 | (some details hidden, use --verbose to show complete help) |
|
1788 | (some details hidden, use --verbose to show complete help) | |
1789 | $ hg help -v topic-containing-verbose |
|
1789 | $ hg help -v topic-containing-verbose | |
1790 | This is the topic to test omit indicating. |
|
1790 | This is the topic to test omit indicating. | |
1791 | """""""""""""""""""""""""""""""""""""""""" |
|
1791 | """""""""""""""""""""""""""""""""""""""""" | |
1792 |
|
1792 | |||
1793 | This paragraph is never omitted (for topic). |
|
1793 | This paragraph is never omitted (for topic). | |
1794 |
|
1794 | |||
1795 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1795 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1796 | topic) |
|
1796 | topic) | |
1797 |
|
1797 | |||
1798 | This paragraph is never omitted, too (for topic) |
|
1798 | This paragraph is never omitted, too (for topic) | |
1799 |
|
1799 | |||
1800 | Test section lookup |
|
1800 | Test section lookup | |
1801 |
|
1801 | |||
1802 | $ hg help revset.merge |
|
1802 | $ hg help revset.merge | |
1803 | "merge()" |
|
1803 | "merge()" | |
1804 | Changeset is a merge changeset. |
|
1804 | Changeset is a merge changeset. | |
1805 |
|
1805 | |||
1806 | $ hg help glossary.dag |
|
1806 | $ hg help glossary.dag | |
1807 | DAG |
|
1807 | DAG | |
1808 | The repository of changesets of a distributed version control system |
|
1808 | The repository of changesets of a distributed version control system | |
1809 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1809 | (DVCS) can be described as a directed acyclic graph (DAG), consisting | |
1810 | of nodes and edges, where nodes correspond to changesets and edges |
|
1810 | of nodes and edges, where nodes correspond to changesets and edges | |
1811 | imply a parent -> child relation. This graph can be visualized by |
|
1811 | imply a parent -> child relation. This graph can be visualized by | |
1812 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is |
|
1812 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is | |
1813 | limited by the requirement for children to have at most two parents. |
|
1813 | limited by the requirement for children to have at most two parents. | |
1814 |
|
1814 | |||
1815 |
|
1815 | |||
1816 | $ hg help hgrc.paths |
|
1816 | $ hg help hgrc.paths | |
1817 | "paths" |
|
1817 | "paths" | |
1818 | ------- |
|
1818 | ------- | |
1819 |
|
1819 | |||
1820 | Assigns symbolic names and behavior to repositories. |
|
1820 | Assigns symbolic names and behavior to repositories. | |
1821 |
|
1821 | |||
1822 | Options are symbolic names defining the URL or directory that is the |
|
1822 | Options are symbolic names defining the URL or directory that is the | |
1823 | location of the repository. Example: |
|
1823 | location of the repository. Example: | |
1824 |
|
1824 | |||
1825 | [paths] |
|
1825 | [paths] | |
1826 | my_server = https://example.com/my_repo |
|
1826 | my_server = https://example.com/my_repo | |
1827 | local_path = /home/me/repo |
|
1827 | local_path = /home/me/repo | |
1828 |
|
1828 | |||
1829 | These symbolic names can be used from the command line. To pull from |
|
1829 | These symbolic names can be used from the command line. To pull from | |
1830 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push |
|
1830 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push | |
1831 | local_path'. |
|
1831 | local_path'. | |
1832 |
|
1832 | |||
1833 | Options containing colons (":") denote sub-options that can influence |
|
1833 | Options containing colons (":") denote sub-options that can influence | |
1834 | behavior for that specific path. Example: |
|
1834 | behavior for that specific path. Example: | |
1835 |
|
1835 | |||
1836 | [paths] |
|
1836 | [paths] | |
1837 | my_server = https://example.com/my_path |
|
1837 | my_server = https://example.com/my_path | |
1838 | my_server:pushurl = ssh://example.com/my_path |
|
1838 | my_server:pushurl = ssh://example.com/my_path | |
1839 |
|
1839 | |||
1840 | The following sub-options can be defined: |
|
1840 | The following sub-options can be defined: | |
1841 |
|
1841 | |||
1842 | "pushurl" |
|
1842 | "pushurl" | |
1843 | The URL to use for push operations. If not defined, the location |
|
1843 | The URL to use for push operations. If not defined, the location | |
1844 | defined by the path's main entry is used. |
|
1844 | defined by the path's main entry is used. | |
1845 |
|
1845 | |||
1846 | "pushrev" |
|
1846 | "pushrev" | |
1847 | A revset defining which revisions to push by default. |
|
1847 | A revset defining which revisions to push by default. | |
1848 |
|
1848 | |||
1849 | When 'hg push' is executed without a "-r" argument, the revset defined |
|
1849 | When 'hg push' is executed without a "-r" argument, the revset defined | |
1850 | by this sub-option is evaluated to determine what to push. |
|
1850 | by this sub-option is evaluated to determine what to push. | |
1851 |
|
1851 | |||
1852 | For example, a value of "." will push the working directory's revision |
|
1852 | For example, a value of "." will push the working directory's revision | |
1853 | by default. |
|
1853 | by default. | |
1854 |
|
1854 | |||
1855 | Revsets specifying bookmarks will not result in the bookmark being |
|
1855 | Revsets specifying bookmarks will not result in the bookmark being | |
1856 | pushed. |
|
1856 | pushed. | |
1857 |
|
1857 | |||
1858 | The following special named paths exist: |
|
1858 | The following special named paths exist: | |
1859 |
|
1859 | |||
1860 | "default" |
|
1860 | "default" | |
1861 | The URL or directory to use when no source or remote is specified. |
|
1861 | The URL or directory to use when no source or remote is specified. | |
1862 |
|
1862 | |||
1863 | 'hg clone' will automatically define this path to the location the |
|
1863 | 'hg clone' will automatically define this path to the location the | |
1864 | repository was cloned from. |
|
1864 | repository was cloned from. | |
1865 |
|
1865 | |||
1866 | "default-push" |
|
1866 | "default-push" | |
1867 | (deprecated) The URL or directory for the default 'hg push' location. |
|
1867 | (deprecated) The URL or directory for the default 'hg push' location. | |
1868 | "default:pushurl" should be used instead. |
|
1868 | "default:pushurl" should be used instead. | |
1869 |
|
1869 | |||
1870 | $ hg help glossary.mcguffin |
|
1870 | $ hg help glossary.mcguffin | |
1871 | abort: help section not found: glossary.mcguffin |
|
1871 | abort: help section not found: glossary.mcguffin | |
1872 |
[ |
|
1872 | [10] | |
1873 |
|
1873 | |||
1874 | $ hg help glossary.mc.guffin |
|
1874 | $ hg help glossary.mc.guffin | |
1875 | abort: help section not found: glossary.mc.guffin |
|
1875 | abort: help section not found: glossary.mc.guffin | |
1876 |
[ |
|
1876 | [10] | |
1877 |
|
1877 | |||
1878 | $ hg help template.files |
|
1878 | $ hg help template.files | |
1879 | files List of strings. All files modified, added, or removed by |
|
1879 | files List of strings. All files modified, added, or removed by | |
1880 | this changeset. |
|
1880 | this changeset. | |
1881 | files(pattern) |
|
1881 | files(pattern) | |
1882 | All files of the current changeset matching the pattern. See |
|
1882 | All files of the current changeset matching the pattern. See | |
1883 | 'hg help patterns'. |
|
1883 | 'hg help patterns'. | |
1884 |
|
1884 | |||
1885 | Test section lookup by translated message |
|
1885 | Test section lookup by translated message | |
1886 |
|
1886 | |||
1887 | str.lower() instead of encoding.lower(str) on translated message might |
|
1887 | str.lower() instead of encoding.lower(str) on translated message might | |
1888 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) |
|
1888 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) | |
1889 | as the second or later byte of multi-byte character. |
|
1889 | as the second or later byte of multi-byte character. | |
1890 |
|
1890 | |||
1891 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) |
|
1891 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) | |
1892 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this |
|
1892 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this | |
1893 | replacement makes message meaningless. |
|
1893 | replacement makes message meaningless. | |
1894 |
|
1894 | |||
1895 | This tests that section lookup by translated string isn't broken by |
|
1895 | This tests that section lookup by translated string isn't broken by | |
1896 | such str.lower(). |
|
1896 | such str.lower(). | |
1897 |
|
1897 | |||
1898 | $ "$PYTHON" <<EOF |
|
1898 | $ "$PYTHON" <<EOF | |
1899 | > def escape(s): |
|
1899 | > def escape(s): | |
1900 | > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932')) |
|
1900 | > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932')) | |
1901 | > # translation of "record" in ja_JP.cp932 |
|
1901 | > # translation of "record" in ja_JP.cp932 | |
1902 | > upper = b"\x8bL\x98^" |
|
1902 | > upper = b"\x8bL\x98^" | |
1903 | > # str.lower()-ed section name should be treated as different one |
|
1903 | > # str.lower()-ed section name should be treated as different one | |
1904 | > lower = b"\x8bl\x98^" |
|
1904 | > lower = b"\x8bl\x98^" | |
1905 | > with open('ambiguous.py', 'wb') as fp: |
|
1905 | > with open('ambiguous.py', 'wb') as fp: | |
1906 | > fp.write(b"""# ambiguous section names in ja_JP.cp932 |
|
1906 | > fp.write(b"""# ambiguous section names in ja_JP.cp932 | |
1907 | > u'''summary of extension |
|
1907 | > u'''summary of extension | |
1908 | > |
|
1908 | > | |
1909 | > %s |
|
1909 | > %s | |
1910 | > ---- |
|
1910 | > ---- | |
1911 | > |
|
1911 | > | |
1912 | > Upper name should show only this message |
|
1912 | > Upper name should show only this message | |
1913 | > |
|
1913 | > | |
1914 | > %s |
|
1914 | > %s | |
1915 | > ---- |
|
1915 | > ---- | |
1916 | > |
|
1916 | > | |
1917 | > Lower name should show only this message |
|
1917 | > Lower name should show only this message | |
1918 | > |
|
1918 | > | |
1919 | > subsequent section |
|
1919 | > subsequent section | |
1920 | > ------------------ |
|
1920 | > ------------------ | |
1921 | > |
|
1921 | > | |
1922 | > This should be hidden at 'hg help ambiguous' with section name. |
|
1922 | > This should be hidden at 'hg help ambiguous' with section name. | |
1923 | > ''' |
|
1923 | > ''' | |
1924 | > """ % (escape(upper), escape(lower))) |
|
1924 | > """ % (escape(upper), escape(lower))) | |
1925 | > EOF |
|
1925 | > EOF | |
1926 |
|
1926 | |||
1927 | $ cat >> $HGRCPATH <<EOF |
|
1927 | $ cat >> $HGRCPATH <<EOF | |
1928 | > [extensions] |
|
1928 | > [extensions] | |
1929 | > ambiguous = ./ambiguous.py |
|
1929 | > ambiguous = ./ambiguous.py | |
1930 | > EOF |
|
1930 | > EOF | |
1931 |
|
1931 | |||
1932 | $ "$PYTHON" <<EOF | sh |
|
1932 | $ "$PYTHON" <<EOF | sh | |
1933 | > from mercurial.utils import procutil |
|
1933 | > from mercurial.utils import procutil | |
1934 | > upper = b"\x8bL\x98^" |
|
1934 | > upper = b"\x8bL\x98^" | |
1935 | > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper) |
|
1935 | > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper) | |
1936 | > EOF |
|
1936 | > EOF | |
1937 | \x8bL\x98^ (esc) |
|
1937 | \x8bL\x98^ (esc) | |
1938 | ---- |
|
1938 | ---- | |
1939 |
|
1939 | |||
1940 | Upper name should show only this message |
|
1940 | Upper name should show only this message | |
1941 |
|
1941 | |||
1942 |
|
1942 | |||
1943 | $ "$PYTHON" <<EOF | sh |
|
1943 | $ "$PYTHON" <<EOF | sh | |
1944 | > from mercurial.utils import procutil |
|
1944 | > from mercurial.utils import procutil | |
1945 | > lower = b"\x8bl\x98^" |
|
1945 | > lower = b"\x8bl\x98^" | |
1946 | > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower) |
|
1946 | > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower) | |
1947 | > EOF |
|
1947 | > EOF | |
1948 | \x8bl\x98^ (esc) |
|
1948 | \x8bl\x98^ (esc) | |
1949 | ---- |
|
1949 | ---- | |
1950 |
|
1950 | |||
1951 | Lower name should show only this message |
|
1951 | Lower name should show only this message | |
1952 |
|
1952 | |||
1953 |
|
1953 | |||
1954 | $ cat >> $HGRCPATH <<EOF |
|
1954 | $ cat >> $HGRCPATH <<EOF | |
1955 | > [extensions] |
|
1955 | > [extensions] | |
1956 | > ambiguous = ! |
|
1956 | > ambiguous = ! | |
1957 | > EOF |
|
1957 | > EOF | |
1958 |
|
1958 | |||
1959 | Show help content of disabled extensions |
|
1959 | Show help content of disabled extensions | |
1960 |
|
1960 | |||
1961 | $ cat >> $HGRCPATH <<EOF |
|
1961 | $ cat >> $HGRCPATH <<EOF | |
1962 | > [extensions] |
|
1962 | > [extensions] | |
1963 | > ambiguous = !./ambiguous.py |
|
1963 | > ambiguous = !./ambiguous.py | |
1964 | > EOF |
|
1964 | > EOF | |
1965 | $ hg help -e ambiguous |
|
1965 | $ hg help -e ambiguous | |
1966 | ambiguous extension - (no help text available) |
|
1966 | ambiguous extension - (no help text available) | |
1967 |
|
1967 | |||
1968 | (use 'hg help extensions' for information on enabling extensions) |
|
1968 | (use 'hg help extensions' for information on enabling extensions) | |
1969 |
|
1969 | |||
1970 | Test dynamic list of merge tools only shows up once |
|
1970 | Test dynamic list of merge tools only shows up once | |
1971 | $ hg help merge-tools |
|
1971 | $ hg help merge-tools | |
1972 | Merge Tools |
|
1972 | Merge Tools | |
1973 | """"""""""" |
|
1973 | """"""""""" | |
1974 |
|
1974 | |||
1975 | To merge files Mercurial uses merge tools. |
|
1975 | To merge files Mercurial uses merge tools. | |
1976 |
|
1976 | |||
1977 | A merge tool combines two different versions of a file into a merged file. |
|
1977 | A merge tool combines two different versions of a file into a merged file. | |
1978 | Merge tools are given the two files and the greatest common ancestor of |
|
1978 | Merge tools are given the two files and the greatest common ancestor of | |
1979 | the two file versions, so they can determine the changes made on both |
|
1979 | the two file versions, so they can determine the changes made on both | |
1980 | branches. |
|
1980 | branches. | |
1981 |
|
1981 | |||
1982 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg |
|
1982 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg | |
1983 | backout' and in several extensions. |
|
1983 | backout' and in several extensions. | |
1984 |
|
1984 | |||
1985 | Usually, the merge tool tries to automatically reconcile the files by |
|
1985 | Usually, the merge tool tries to automatically reconcile the files by | |
1986 | combining all non-overlapping changes that occurred separately in the two |
|
1986 | combining all non-overlapping changes that occurred separately in the two | |
1987 | different evolutions of the same initial base file. Furthermore, some |
|
1987 | different evolutions of the same initial base file. Furthermore, some | |
1988 | interactive merge programs make it easier to manually resolve conflicting |
|
1988 | interactive merge programs make it easier to manually resolve conflicting | |
1989 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1989 | merges, either in a graphical way, or by inserting some conflict markers. | |
1990 | Mercurial does not include any interactive merge programs but relies on |
|
1990 | Mercurial does not include any interactive merge programs but relies on | |
1991 | external tools for that. |
|
1991 | external tools for that. | |
1992 |
|
1992 | |||
1993 | Available merge tools |
|
1993 | Available merge tools | |
1994 | ===================== |
|
1994 | ===================== | |
1995 |
|
1995 | |||
1996 | External merge tools and their properties are configured in the merge- |
|
1996 | External merge tools and their properties are configured in the merge- | |
1997 | tools configuration section - see hgrc(5) - but they can often just be |
|
1997 | tools configuration section - see hgrc(5) - but they can often just be | |
1998 | named by their executable. |
|
1998 | named by their executable. | |
1999 |
|
1999 | |||
2000 | A merge tool is generally usable if its executable can be found on the |
|
2000 | A merge tool is generally usable if its executable can be found on the | |
2001 | system and if it can handle the merge. The executable is found if it is an |
|
2001 | system and if it can handle the merge. The executable is found if it is an | |
2002 | absolute or relative executable path or the name of an application in the |
|
2002 | absolute or relative executable path or the name of an application in the | |
2003 | executable search path. The tool is assumed to be able to handle the merge |
|
2003 | executable search path. The tool is assumed to be able to handle the merge | |
2004 | if it can handle symlinks if the file is a symlink, if it can handle |
|
2004 | if it can handle symlinks if the file is a symlink, if it can handle | |
2005 | binary files if the file is binary, and if a GUI is available if the tool |
|
2005 | binary files if the file is binary, and if a GUI is available if the tool | |
2006 | requires a GUI. |
|
2006 | requires a GUI. | |
2007 |
|
2007 | |||
2008 | There are some internal merge tools which can be used. The internal merge |
|
2008 | There are some internal merge tools which can be used. The internal merge | |
2009 | tools are: |
|
2009 | tools are: | |
2010 |
|
2010 | |||
2011 | ":dump" |
|
2011 | ":dump" | |
2012 | Creates three versions of the files to merge, containing the contents of |
|
2012 | Creates three versions of the files to merge, containing the contents of | |
2013 | local, other and base. These files can then be used to perform a merge |
|
2013 | local, other and base. These files can then be used to perform a merge | |
2014 | manually. If the file to be merged is named "a.txt", these files will |
|
2014 | manually. If the file to be merged is named "a.txt", these files will | |
2015 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
2015 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and | |
2016 | they will be placed in the same directory as "a.txt". |
|
2016 | they will be placed in the same directory as "a.txt". | |
2017 |
|
2017 | |||
2018 | This implies premerge. Therefore, files aren't dumped, if premerge runs |
|
2018 | This implies premerge. Therefore, files aren't dumped, if premerge runs | |
2019 | successfully. Use :forcedump to forcibly write files out. |
|
2019 | successfully. Use :forcedump to forcibly write files out. | |
2020 |
|
2020 | |||
2021 | (actual capabilities: binary, symlink) |
|
2021 | (actual capabilities: binary, symlink) | |
2022 |
|
2022 | |||
2023 | ":fail" |
|
2023 | ":fail" | |
2024 | Rather than attempting to merge files that were modified on both |
|
2024 | Rather than attempting to merge files that were modified on both | |
2025 | branches, it marks them as unresolved. The resolve command must be used |
|
2025 | branches, it marks them as unresolved. The resolve command must be used | |
2026 | to resolve these conflicts. |
|
2026 | to resolve these conflicts. | |
2027 |
|
2027 | |||
2028 | (actual capabilities: binary, symlink) |
|
2028 | (actual capabilities: binary, symlink) | |
2029 |
|
2029 | |||
2030 | ":forcedump" |
|
2030 | ":forcedump" | |
2031 | Creates three versions of the files as same as :dump, but omits |
|
2031 | Creates three versions of the files as same as :dump, but omits | |
2032 | premerge. |
|
2032 | premerge. | |
2033 |
|
2033 | |||
2034 | (actual capabilities: binary, symlink) |
|
2034 | (actual capabilities: binary, symlink) | |
2035 |
|
2035 | |||
2036 | ":local" |
|
2036 | ":local" | |
2037 | Uses the local 'p1()' version of files as the merged version. |
|
2037 | Uses the local 'p1()' version of files as the merged version. | |
2038 |
|
2038 | |||
2039 | (actual capabilities: binary, symlink) |
|
2039 | (actual capabilities: binary, symlink) | |
2040 |
|
2040 | |||
2041 | ":merge" |
|
2041 | ":merge" | |
2042 | Uses the internal non-interactive simple merge algorithm for merging |
|
2042 | Uses the internal non-interactive simple merge algorithm for merging | |
2043 | files. It will fail if there are any conflicts and leave markers in the |
|
2043 | files. It will fail if there are any conflicts and leave markers in the | |
2044 | partially merged file. Markers will have two sections, one for each side |
|
2044 | partially merged file. Markers will have two sections, one for each side | |
2045 | of merge. |
|
2045 | of merge. | |
2046 |
|
2046 | |||
2047 | ":merge-local" |
|
2047 | ":merge-local" | |
2048 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
2048 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
2049 | local 'p1()' changes. |
|
2049 | local 'p1()' changes. | |
2050 |
|
2050 | |||
2051 | ":merge-other" |
|
2051 | ":merge-other" | |
2052 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
2052 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
2053 | other 'p2()' changes. |
|
2053 | other 'p2()' changes. | |
2054 |
|
2054 | |||
2055 | ":merge3" |
|
2055 | ":merge3" | |
2056 | Uses the internal non-interactive simple merge algorithm for merging |
|
2056 | Uses the internal non-interactive simple merge algorithm for merging | |
2057 | files. It will fail if there are any conflicts and leave markers in the |
|
2057 | files. It will fail if there are any conflicts and leave markers in the | |
2058 | partially merged file. Marker will have three sections, one from each |
|
2058 | partially merged file. Marker will have three sections, one from each | |
2059 | side of the merge and one for the base content. |
|
2059 | side of the merge and one for the base content. | |
2060 |
|
2060 | |||
2061 | ":mergediff" |
|
2061 | ":mergediff" | |
2062 | Uses the internal non-interactive simple merge algorithm for merging |
|
2062 | Uses the internal non-interactive simple merge algorithm for merging | |
2063 | files. It will fail if there are any conflicts and leave markers in the |
|
2063 | files. It will fail if there are any conflicts and leave markers in the | |
2064 | partially merged file. The marker will have two sections, one with the |
|
2064 | partially merged file. The marker will have two sections, one with the | |
2065 | content from one side of the merge, and one with a diff from the base |
|
2065 | content from one side of the merge, and one with a diff from the base | |
2066 | content to the content on the other side. (experimental) |
|
2066 | content to the content on the other side. (experimental) | |
2067 |
|
2067 | |||
2068 | ":other" |
|
2068 | ":other" | |
2069 | Uses the other 'p2()' version of files as the merged version. |
|
2069 | Uses the other 'p2()' version of files as the merged version. | |
2070 |
|
2070 | |||
2071 | (actual capabilities: binary, symlink) |
|
2071 | (actual capabilities: binary, symlink) | |
2072 |
|
2072 | |||
2073 | ":prompt" |
|
2073 | ":prompt" | |
2074 | Asks the user which of the local 'p1()' or the other 'p2()' version to |
|
2074 | Asks the user which of the local 'p1()' or the other 'p2()' version to | |
2075 | keep as the merged version. |
|
2075 | keep as the merged version. | |
2076 |
|
2076 | |||
2077 | (actual capabilities: binary, symlink) |
|
2077 | (actual capabilities: binary, symlink) | |
2078 |
|
2078 | |||
2079 | ":tagmerge" |
|
2079 | ":tagmerge" | |
2080 | Uses the internal tag merge algorithm (experimental). |
|
2080 | Uses the internal tag merge algorithm (experimental). | |
2081 |
|
2081 | |||
2082 | ":union" |
|
2082 | ":union" | |
2083 | Uses the internal non-interactive simple merge algorithm for merging |
|
2083 | Uses the internal non-interactive simple merge algorithm for merging | |
2084 | files. It will use both left and right sides for conflict regions. No |
|
2084 | files. It will use both left and right sides for conflict regions. No | |
2085 | markers are inserted. |
|
2085 | markers are inserted. | |
2086 |
|
2086 | |||
2087 | Internal tools are always available and do not require a GUI but will by |
|
2087 | Internal tools are always available and do not require a GUI but will by | |
2088 | default not handle symlinks or binary files. See next section for detail |
|
2088 | default not handle symlinks or binary files. See next section for detail | |
2089 | about "actual capabilities" described above. |
|
2089 | about "actual capabilities" described above. | |
2090 |
|
2090 | |||
2091 | Choosing a merge tool |
|
2091 | Choosing a merge tool | |
2092 | ===================== |
|
2092 | ===================== | |
2093 |
|
2093 | |||
2094 | Mercurial uses these rules when deciding which merge tool to use: |
|
2094 | Mercurial uses these rules when deciding which merge tool to use: | |
2095 |
|
2095 | |||
2096 | 1. If a tool has been specified with the --tool option to merge or |
|
2096 | 1. If a tool has been specified with the --tool option to merge or | |
2097 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
2097 | resolve, it is used. If it is the name of a tool in the merge-tools | |
2098 | configuration, its configuration is used. Otherwise the specified tool |
|
2098 | configuration, its configuration is used. Otherwise the specified tool | |
2099 | must be executable by the shell. |
|
2099 | must be executable by the shell. | |
2100 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
2100 | 2. If the "HGMERGE" environment variable is present, its value is used and | |
2101 | must be executable by the shell. |
|
2101 | must be executable by the shell. | |
2102 | 3. If the filename of the file to be merged matches any of the patterns in |
|
2102 | 3. If the filename of the file to be merged matches any of the patterns in | |
2103 | the merge-patterns configuration section, the first usable merge tool |
|
2103 | the merge-patterns configuration section, the first usable merge tool | |
2104 | corresponding to a matching pattern is used. |
|
2104 | corresponding to a matching pattern is used. | |
2105 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
2105 | 4. If ui.merge is set it will be considered next. If the value is not the | |
2106 | name of a configured tool, the specified value is used and must be |
|
2106 | name of a configured tool, the specified value is used and must be | |
2107 | executable by the shell. Otherwise the named tool is used if it is |
|
2107 | executable by the shell. Otherwise the named tool is used if it is | |
2108 | usable. |
|
2108 | usable. | |
2109 | 5. If any usable merge tools are present in the merge-tools configuration |
|
2109 | 5. If any usable merge tools are present in the merge-tools configuration | |
2110 | section, the one with the highest priority is used. |
|
2110 | section, the one with the highest priority is used. | |
2111 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
2111 | 6. If a program named "hgmerge" can be found on the system, it is used - | |
2112 | but it will by default not be used for symlinks and binary files. |
|
2112 | but it will by default not be used for symlinks and binary files. | |
2113 | 7. If the file to be merged is not binary and is not a symlink, then |
|
2113 | 7. If the file to be merged is not binary and is not a symlink, then | |
2114 | internal ":merge" is used. |
|
2114 | internal ":merge" is used. | |
2115 | 8. Otherwise, ":prompt" is used. |
|
2115 | 8. Otherwise, ":prompt" is used. | |
2116 |
|
2116 | |||
2117 | For historical reason, Mercurial treats merge tools as below while |
|
2117 | For historical reason, Mercurial treats merge tools as below while | |
2118 | examining rules above. |
|
2118 | examining rules above. | |
2119 |
|
2119 | |||
2120 | step specified via binary symlink |
|
2120 | step specified via binary symlink | |
2121 | ---------------------------------- |
|
2121 | ---------------------------------- | |
2122 | 1. --tool o/o o/o |
|
2122 | 1. --tool o/o o/o | |
2123 | 2. HGMERGE o/o o/o |
|
2123 | 2. HGMERGE o/o o/o | |
2124 | 3. merge-patterns o/o(*) x/?(*) |
|
2124 | 3. merge-patterns o/o(*) x/?(*) | |
2125 | 4. ui.merge x/?(*) x/?(*) |
|
2125 | 4. ui.merge x/?(*) x/?(*) | |
2126 |
|
2126 | |||
2127 | Each capability column indicates Mercurial behavior for internal/external |
|
2127 | Each capability column indicates Mercurial behavior for internal/external | |
2128 | merge tools at examining each rule. |
|
2128 | merge tools at examining each rule. | |
2129 |
|
2129 | |||
2130 | - "o": "assume that a tool has capability" |
|
2130 | - "o": "assume that a tool has capability" | |
2131 | - "x": "assume that a tool does not have capability" |
|
2131 | - "x": "assume that a tool does not have capability" | |
2132 | - "?": "check actual capability of a tool" |
|
2132 | - "?": "check actual capability of a tool" | |
2133 |
|
2133 | |||
2134 | If "merge.strict-capability-check" configuration is true, Mercurial checks |
|
2134 | If "merge.strict-capability-check" configuration is true, Mercurial checks | |
2135 | capabilities of merge tools strictly in (*) cases above (= each capability |
|
2135 | capabilities of merge tools strictly in (*) cases above (= each capability | |
2136 | column becomes "?/?"). It is false by default for backward compatibility. |
|
2136 | column becomes "?/?"). It is false by default for backward compatibility. | |
2137 |
|
2137 | |||
2138 | Note: |
|
2138 | Note: | |
2139 | After selecting a merge program, Mercurial will by default attempt to |
|
2139 | After selecting a merge program, Mercurial will by default attempt to | |
2140 | merge the files using a simple merge algorithm first. Only if it |
|
2140 | merge the files using a simple merge algorithm first. Only if it | |
2141 | doesn't succeed because of conflicting changes will Mercurial actually |
|
2141 | doesn't succeed because of conflicting changes will Mercurial actually | |
2142 | execute the merge program. Whether to use the simple merge algorithm |
|
2142 | execute the merge program. Whether to use the simple merge algorithm | |
2143 | first can be controlled by the premerge setting of the merge tool. |
|
2143 | first can be controlled by the premerge setting of the merge tool. | |
2144 | Premerge is enabled by default unless the file is binary or a symlink. |
|
2144 | Premerge is enabled by default unless the file is binary or a symlink. | |
2145 |
|
2145 | |||
2146 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
2146 | See the merge-tools and ui sections of hgrc(5) for details on the | |
2147 | configuration of merge tools. |
|
2147 | configuration of merge tools. | |
2148 |
|
2148 | |||
2149 | Compression engines listed in `hg help bundlespec` |
|
2149 | Compression engines listed in `hg help bundlespec` | |
2150 |
|
2150 | |||
2151 | $ hg help bundlespec | grep gzip |
|
2151 | $ hg help bundlespec | grep gzip | |
2152 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression |
|
2152 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression | |
2153 | An algorithm that produces smaller bundles than "gzip". |
|
2153 | An algorithm that produces smaller bundles than "gzip". | |
2154 | This engine will likely produce smaller bundles than "gzip" but will be |
|
2154 | This engine will likely produce smaller bundles than "gzip" but will be | |
2155 | "gzip" |
|
2155 | "gzip" | |
2156 | better compression than "gzip". It also frequently yields better (?) |
|
2156 | better compression than "gzip". It also frequently yields better (?) | |
2157 |
|
2157 | |||
2158 | Test usage of section marks in help documents |
|
2158 | Test usage of section marks in help documents | |
2159 |
|
2159 | |||
2160 | $ cd "$TESTDIR"/../doc |
|
2160 | $ cd "$TESTDIR"/../doc | |
2161 | $ "$PYTHON" check-seclevel.py |
|
2161 | $ "$PYTHON" check-seclevel.py | |
2162 | $ cd $TESTTMP |
|
2162 | $ cd $TESTTMP | |
2163 |
|
2163 | |||
2164 | #if serve |
|
2164 | #if serve | |
2165 |
|
2165 | |||
2166 | Test the help pages in hgweb. |
|
2166 | Test the help pages in hgweb. | |
2167 |
|
2167 | |||
2168 | Dish up an empty repo; serve it cold. |
|
2168 | Dish up an empty repo; serve it cold. | |
2169 |
|
2169 | |||
2170 | $ hg init "$TESTTMP/test" |
|
2170 | $ hg init "$TESTTMP/test" | |
2171 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
2171 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid | |
2172 | $ cat hg.pid >> $DAEMON_PIDS |
|
2172 | $ cat hg.pid >> $DAEMON_PIDS | |
2173 |
|
2173 | |||
2174 | $ get-with-headers.py $LOCALIP:$HGPORT "help" |
|
2174 | $ get-with-headers.py $LOCALIP:$HGPORT "help" | |
2175 | 200 Script output follows |
|
2175 | 200 Script output follows | |
2176 |
|
2176 | |||
2177 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2177 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2178 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2178 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2179 | <head> |
|
2179 | <head> | |
2180 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2180 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2181 | <meta name="robots" content="index, nofollow" /> |
|
2181 | <meta name="robots" content="index, nofollow" /> | |
2182 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2182 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2183 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2183 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2184 |
|
2184 | |||
2185 | <title>Help: Index</title> |
|
2185 | <title>Help: Index</title> | |
2186 | </head> |
|
2186 | </head> | |
2187 | <body> |
|
2187 | <body> | |
2188 |
|
2188 | |||
2189 | <div class="container"> |
|
2189 | <div class="container"> | |
2190 | <div class="menu"> |
|
2190 | <div class="menu"> | |
2191 | <div class="logo"> |
|
2191 | <div class="logo"> | |
2192 | <a href="https://mercurial-scm.org/"> |
|
2192 | <a href="https://mercurial-scm.org/"> | |
2193 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2193 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2194 | </div> |
|
2194 | </div> | |
2195 | <ul> |
|
2195 | <ul> | |
2196 | <li><a href="/shortlog">log</a></li> |
|
2196 | <li><a href="/shortlog">log</a></li> | |
2197 | <li><a href="/graph">graph</a></li> |
|
2197 | <li><a href="/graph">graph</a></li> | |
2198 | <li><a href="/tags">tags</a></li> |
|
2198 | <li><a href="/tags">tags</a></li> | |
2199 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2199 | <li><a href="/bookmarks">bookmarks</a></li> | |
2200 | <li><a href="/branches">branches</a></li> |
|
2200 | <li><a href="/branches">branches</a></li> | |
2201 | </ul> |
|
2201 | </ul> | |
2202 | <ul> |
|
2202 | <ul> | |
2203 | <li class="active">help</li> |
|
2203 | <li class="active">help</li> | |
2204 | </ul> |
|
2204 | </ul> | |
2205 | </div> |
|
2205 | </div> | |
2206 |
|
2206 | |||
2207 | <div class="main"> |
|
2207 | <div class="main"> | |
2208 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2208 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2209 |
|
2209 | |||
2210 | <form class="search" action="/log"> |
|
2210 | <form class="search" action="/log"> | |
2211 |
|
2211 | |||
2212 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2212 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2213 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2213 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2214 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2214 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2215 | </form> |
|
2215 | </form> | |
2216 | <table class="bigtable"> |
|
2216 | <table class="bigtable"> | |
2217 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
2217 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
2218 |
|
2218 | |||
2219 | <tr><td> |
|
2219 | <tr><td> | |
2220 | <a href="/help/bundlespec"> |
|
2220 | <a href="/help/bundlespec"> | |
2221 | bundlespec |
|
2221 | bundlespec | |
2222 | </a> |
|
2222 | </a> | |
2223 | </td><td> |
|
2223 | </td><td> | |
2224 | Bundle File Formats |
|
2224 | Bundle File Formats | |
2225 | </td></tr> |
|
2225 | </td></tr> | |
2226 | <tr><td> |
|
2226 | <tr><td> | |
2227 | <a href="/help/color"> |
|
2227 | <a href="/help/color"> | |
2228 | color |
|
2228 | color | |
2229 | </a> |
|
2229 | </a> | |
2230 | </td><td> |
|
2230 | </td><td> | |
2231 | Colorizing Outputs |
|
2231 | Colorizing Outputs | |
2232 | </td></tr> |
|
2232 | </td></tr> | |
2233 | <tr><td> |
|
2233 | <tr><td> | |
2234 | <a href="/help/config"> |
|
2234 | <a href="/help/config"> | |
2235 | config |
|
2235 | config | |
2236 | </a> |
|
2236 | </a> | |
2237 | </td><td> |
|
2237 | </td><td> | |
2238 | Configuration Files |
|
2238 | Configuration Files | |
2239 | </td></tr> |
|
2239 | </td></tr> | |
2240 | <tr><td> |
|
2240 | <tr><td> | |
2241 | <a href="/help/dates"> |
|
2241 | <a href="/help/dates"> | |
2242 | dates |
|
2242 | dates | |
2243 | </a> |
|
2243 | </a> | |
2244 | </td><td> |
|
2244 | </td><td> | |
2245 | Date Formats |
|
2245 | Date Formats | |
2246 | </td></tr> |
|
2246 | </td></tr> | |
2247 | <tr><td> |
|
2247 | <tr><td> | |
2248 | <a href="/help/deprecated"> |
|
2248 | <a href="/help/deprecated"> | |
2249 | deprecated |
|
2249 | deprecated | |
2250 | </a> |
|
2250 | </a> | |
2251 | </td><td> |
|
2251 | </td><td> | |
2252 | Deprecated Features |
|
2252 | Deprecated Features | |
2253 | </td></tr> |
|
2253 | </td></tr> | |
2254 | <tr><td> |
|
2254 | <tr><td> | |
2255 | <a href="/help/diffs"> |
|
2255 | <a href="/help/diffs"> | |
2256 | diffs |
|
2256 | diffs | |
2257 | </a> |
|
2257 | </a> | |
2258 | </td><td> |
|
2258 | </td><td> | |
2259 | Diff Formats |
|
2259 | Diff Formats | |
2260 | </td></tr> |
|
2260 | </td></tr> | |
2261 | <tr><td> |
|
2261 | <tr><td> | |
2262 | <a href="/help/environment"> |
|
2262 | <a href="/help/environment"> | |
2263 | environment |
|
2263 | environment | |
2264 | </a> |
|
2264 | </a> | |
2265 | </td><td> |
|
2265 | </td><td> | |
2266 | Environment Variables |
|
2266 | Environment Variables | |
2267 | </td></tr> |
|
2267 | </td></tr> | |
2268 | <tr><td> |
|
2268 | <tr><td> | |
2269 | <a href="/help/extensions"> |
|
2269 | <a href="/help/extensions"> | |
2270 | extensions |
|
2270 | extensions | |
2271 | </a> |
|
2271 | </a> | |
2272 | </td><td> |
|
2272 | </td><td> | |
2273 | Using Additional Features |
|
2273 | Using Additional Features | |
2274 | </td></tr> |
|
2274 | </td></tr> | |
2275 | <tr><td> |
|
2275 | <tr><td> | |
2276 | <a href="/help/filesets"> |
|
2276 | <a href="/help/filesets"> | |
2277 | filesets |
|
2277 | filesets | |
2278 | </a> |
|
2278 | </a> | |
2279 | </td><td> |
|
2279 | </td><td> | |
2280 | Specifying File Sets |
|
2280 | Specifying File Sets | |
2281 | </td></tr> |
|
2281 | </td></tr> | |
2282 | <tr><td> |
|
2282 | <tr><td> | |
2283 | <a href="/help/flags"> |
|
2283 | <a href="/help/flags"> | |
2284 | flags |
|
2284 | flags | |
2285 | </a> |
|
2285 | </a> | |
2286 | </td><td> |
|
2286 | </td><td> | |
2287 | Command-line flags |
|
2287 | Command-line flags | |
2288 | </td></tr> |
|
2288 | </td></tr> | |
2289 | <tr><td> |
|
2289 | <tr><td> | |
2290 | <a href="/help/glossary"> |
|
2290 | <a href="/help/glossary"> | |
2291 | glossary |
|
2291 | glossary | |
2292 | </a> |
|
2292 | </a> | |
2293 | </td><td> |
|
2293 | </td><td> | |
2294 | Glossary |
|
2294 | Glossary | |
2295 | </td></tr> |
|
2295 | </td></tr> | |
2296 | <tr><td> |
|
2296 | <tr><td> | |
2297 | <a href="/help/hgignore"> |
|
2297 | <a href="/help/hgignore"> | |
2298 | hgignore |
|
2298 | hgignore | |
2299 | </a> |
|
2299 | </a> | |
2300 | </td><td> |
|
2300 | </td><td> | |
2301 | Syntax for Mercurial Ignore Files |
|
2301 | Syntax for Mercurial Ignore Files | |
2302 | </td></tr> |
|
2302 | </td></tr> | |
2303 | <tr><td> |
|
2303 | <tr><td> | |
2304 | <a href="/help/hgweb"> |
|
2304 | <a href="/help/hgweb"> | |
2305 | hgweb |
|
2305 | hgweb | |
2306 | </a> |
|
2306 | </a> | |
2307 | </td><td> |
|
2307 | </td><td> | |
2308 | Configuring hgweb |
|
2308 | Configuring hgweb | |
2309 | </td></tr> |
|
2309 | </td></tr> | |
2310 | <tr><td> |
|
2310 | <tr><td> | |
2311 | <a href="/help/internals"> |
|
2311 | <a href="/help/internals"> | |
2312 | internals |
|
2312 | internals | |
2313 | </a> |
|
2313 | </a> | |
2314 | </td><td> |
|
2314 | </td><td> | |
2315 | Technical implementation topics |
|
2315 | Technical implementation topics | |
2316 | </td></tr> |
|
2316 | </td></tr> | |
2317 | <tr><td> |
|
2317 | <tr><td> | |
2318 | <a href="/help/merge-tools"> |
|
2318 | <a href="/help/merge-tools"> | |
2319 | merge-tools |
|
2319 | merge-tools | |
2320 | </a> |
|
2320 | </a> | |
2321 | </td><td> |
|
2321 | </td><td> | |
2322 | Merge Tools |
|
2322 | Merge Tools | |
2323 | </td></tr> |
|
2323 | </td></tr> | |
2324 | <tr><td> |
|
2324 | <tr><td> | |
2325 | <a href="/help/pager"> |
|
2325 | <a href="/help/pager"> | |
2326 | pager |
|
2326 | pager | |
2327 | </a> |
|
2327 | </a> | |
2328 | </td><td> |
|
2328 | </td><td> | |
2329 | Pager Support |
|
2329 | Pager Support | |
2330 | </td></tr> |
|
2330 | </td></tr> | |
2331 | <tr><td> |
|
2331 | <tr><td> | |
2332 | <a href="/help/patterns"> |
|
2332 | <a href="/help/patterns"> | |
2333 | patterns |
|
2333 | patterns | |
2334 | </a> |
|
2334 | </a> | |
2335 | </td><td> |
|
2335 | </td><td> | |
2336 | File Name Patterns |
|
2336 | File Name Patterns | |
2337 | </td></tr> |
|
2337 | </td></tr> | |
2338 | <tr><td> |
|
2338 | <tr><td> | |
2339 | <a href="/help/phases"> |
|
2339 | <a href="/help/phases"> | |
2340 | phases |
|
2340 | phases | |
2341 | </a> |
|
2341 | </a> | |
2342 | </td><td> |
|
2342 | </td><td> | |
2343 | Working with Phases |
|
2343 | Working with Phases | |
2344 | </td></tr> |
|
2344 | </td></tr> | |
2345 | <tr><td> |
|
2345 | <tr><td> | |
2346 | <a href="/help/revisions"> |
|
2346 | <a href="/help/revisions"> | |
2347 | revisions |
|
2347 | revisions | |
2348 | </a> |
|
2348 | </a> | |
2349 | </td><td> |
|
2349 | </td><td> | |
2350 | Specifying Revisions |
|
2350 | Specifying Revisions | |
2351 | </td></tr> |
|
2351 | </td></tr> | |
2352 | <tr><td> |
|
2352 | <tr><td> | |
2353 | <a href="/help/scripting"> |
|
2353 | <a href="/help/scripting"> | |
2354 | scripting |
|
2354 | scripting | |
2355 | </a> |
|
2355 | </a> | |
2356 | </td><td> |
|
2356 | </td><td> | |
2357 | Using Mercurial from scripts and automation |
|
2357 | Using Mercurial from scripts and automation | |
2358 | </td></tr> |
|
2358 | </td></tr> | |
2359 | <tr><td> |
|
2359 | <tr><td> | |
2360 | <a href="/help/subrepos"> |
|
2360 | <a href="/help/subrepos"> | |
2361 | subrepos |
|
2361 | subrepos | |
2362 | </a> |
|
2362 | </a> | |
2363 | </td><td> |
|
2363 | </td><td> | |
2364 | Subrepositories |
|
2364 | Subrepositories | |
2365 | </td></tr> |
|
2365 | </td></tr> | |
2366 | <tr><td> |
|
2366 | <tr><td> | |
2367 | <a href="/help/templating"> |
|
2367 | <a href="/help/templating"> | |
2368 | templating |
|
2368 | templating | |
2369 | </a> |
|
2369 | </a> | |
2370 | </td><td> |
|
2370 | </td><td> | |
2371 | Template Usage |
|
2371 | Template Usage | |
2372 | </td></tr> |
|
2372 | </td></tr> | |
2373 | <tr><td> |
|
2373 | <tr><td> | |
2374 | <a href="/help/urls"> |
|
2374 | <a href="/help/urls"> | |
2375 | urls |
|
2375 | urls | |
2376 | </a> |
|
2376 | </a> | |
2377 | </td><td> |
|
2377 | </td><td> | |
2378 | URL Paths |
|
2378 | URL Paths | |
2379 | </td></tr> |
|
2379 | </td></tr> | |
2380 | <tr><td> |
|
2380 | <tr><td> | |
2381 | <a href="/help/topic-containing-verbose"> |
|
2381 | <a href="/help/topic-containing-verbose"> | |
2382 | topic-containing-verbose |
|
2382 | topic-containing-verbose | |
2383 | </a> |
|
2383 | </a> | |
2384 | </td><td> |
|
2384 | </td><td> | |
2385 | This is the topic to test omit indicating. |
|
2385 | This is the topic to test omit indicating. | |
2386 | </td></tr> |
|
2386 | </td></tr> | |
2387 |
|
2387 | |||
2388 |
|
2388 | |||
2389 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
2389 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> | |
2390 |
|
2390 | |||
2391 | <tr><td> |
|
2391 | <tr><td> | |
2392 | <a href="/help/abort"> |
|
2392 | <a href="/help/abort"> | |
2393 | abort |
|
2393 | abort | |
2394 | </a> |
|
2394 | </a> | |
2395 | </td><td> |
|
2395 | </td><td> | |
2396 | abort an unfinished operation (EXPERIMENTAL) |
|
2396 | abort an unfinished operation (EXPERIMENTAL) | |
2397 | </td></tr> |
|
2397 | </td></tr> | |
2398 | <tr><td> |
|
2398 | <tr><td> | |
2399 | <a href="/help/add"> |
|
2399 | <a href="/help/add"> | |
2400 | add |
|
2400 | add | |
2401 | </a> |
|
2401 | </a> | |
2402 | </td><td> |
|
2402 | </td><td> | |
2403 | add the specified files on the next commit |
|
2403 | add the specified files on the next commit | |
2404 | </td></tr> |
|
2404 | </td></tr> | |
2405 | <tr><td> |
|
2405 | <tr><td> | |
2406 | <a href="/help/annotate"> |
|
2406 | <a href="/help/annotate"> | |
2407 | annotate |
|
2407 | annotate | |
2408 | </a> |
|
2408 | </a> | |
2409 | </td><td> |
|
2409 | </td><td> | |
2410 | show changeset information by line for each file |
|
2410 | show changeset information by line for each file | |
2411 | </td></tr> |
|
2411 | </td></tr> | |
2412 | <tr><td> |
|
2412 | <tr><td> | |
2413 | <a href="/help/clone"> |
|
2413 | <a href="/help/clone"> | |
2414 | clone |
|
2414 | clone | |
2415 | </a> |
|
2415 | </a> | |
2416 | </td><td> |
|
2416 | </td><td> | |
2417 | make a copy of an existing repository |
|
2417 | make a copy of an existing repository | |
2418 | </td></tr> |
|
2418 | </td></tr> | |
2419 | <tr><td> |
|
2419 | <tr><td> | |
2420 | <a href="/help/commit"> |
|
2420 | <a href="/help/commit"> | |
2421 | commit |
|
2421 | commit | |
2422 | </a> |
|
2422 | </a> | |
2423 | </td><td> |
|
2423 | </td><td> | |
2424 | commit the specified files or all outstanding changes |
|
2424 | commit the specified files or all outstanding changes | |
2425 | </td></tr> |
|
2425 | </td></tr> | |
2426 | <tr><td> |
|
2426 | <tr><td> | |
2427 | <a href="/help/continue"> |
|
2427 | <a href="/help/continue"> | |
2428 | continue |
|
2428 | continue | |
2429 | </a> |
|
2429 | </a> | |
2430 | </td><td> |
|
2430 | </td><td> | |
2431 | resumes an interrupted operation (EXPERIMENTAL) |
|
2431 | resumes an interrupted operation (EXPERIMENTAL) | |
2432 | </td></tr> |
|
2432 | </td></tr> | |
2433 | <tr><td> |
|
2433 | <tr><td> | |
2434 | <a href="/help/diff"> |
|
2434 | <a href="/help/diff"> | |
2435 | diff |
|
2435 | diff | |
2436 | </a> |
|
2436 | </a> | |
2437 | </td><td> |
|
2437 | </td><td> | |
2438 | diff repository (or selected files) |
|
2438 | diff repository (or selected files) | |
2439 | </td></tr> |
|
2439 | </td></tr> | |
2440 | <tr><td> |
|
2440 | <tr><td> | |
2441 | <a href="/help/export"> |
|
2441 | <a href="/help/export"> | |
2442 | export |
|
2442 | export | |
2443 | </a> |
|
2443 | </a> | |
2444 | </td><td> |
|
2444 | </td><td> | |
2445 | dump the header and diffs for one or more changesets |
|
2445 | dump the header and diffs for one or more changesets | |
2446 | </td></tr> |
|
2446 | </td></tr> | |
2447 | <tr><td> |
|
2447 | <tr><td> | |
2448 | <a href="/help/forget"> |
|
2448 | <a href="/help/forget"> | |
2449 | forget |
|
2449 | forget | |
2450 | </a> |
|
2450 | </a> | |
2451 | </td><td> |
|
2451 | </td><td> | |
2452 | forget the specified files on the next commit |
|
2452 | forget the specified files on the next commit | |
2453 | </td></tr> |
|
2453 | </td></tr> | |
2454 | <tr><td> |
|
2454 | <tr><td> | |
2455 | <a href="/help/init"> |
|
2455 | <a href="/help/init"> | |
2456 | init |
|
2456 | init | |
2457 | </a> |
|
2457 | </a> | |
2458 | </td><td> |
|
2458 | </td><td> | |
2459 | create a new repository in the given directory |
|
2459 | create a new repository in the given directory | |
2460 | </td></tr> |
|
2460 | </td></tr> | |
2461 | <tr><td> |
|
2461 | <tr><td> | |
2462 | <a href="/help/log"> |
|
2462 | <a href="/help/log"> | |
2463 | log |
|
2463 | log | |
2464 | </a> |
|
2464 | </a> | |
2465 | </td><td> |
|
2465 | </td><td> | |
2466 | show revision history of entire repository or files |
|
2466 | show revision history of entire repository or files | |
2467 | </td></tr> |
|
2467 | </td></tr> | |
2468 | <tr><td> |
|
2468 | <tr><td> | |
2469 | <a href="/help/merge"> |
|
2469 | <a href="/help/merge"> | |
2470 | merge |
|
2470 | merge | |
2471 | </a> |
|
2471 | </a> | |
2472 | </td><td> |
|
2472 | </td><td> | |
2473 | merge another revision into working directory |
|
2473 | merge another revision into working directory | |
2474 | </td></tr> |
|
2474 | </td></tr> | |
2475 | <tr><td> |
|
2475 | <tr><td> | |
2476 | <a href="/help/pull"> |
|
2476 | <a href="/help/pull"> | |
2477 | pull |
|
2477 | pull | |
2478 | </a> |
|
2478 | </a> | |
2479 | </td><td> |
|
2479 | </td><td> | |
2480 | pull changes from the specified source |
|
2480 | pull changes from the specified source | |
2481 | </td></tr> |
|
2481 | </td></tr> | |
2482 | <tr><td> |
|
2482 | <tr><td> | |
2483 | <a href="/help/push"> |
|
2483 | <a href="/help/push"> | |
2484 | push |
|
2484 | push | |
2485 | </a> |
|
2485 | </a> | |
2486 | </td><td> |
|
2486 | </td><td> | |
2487 | push changes to the specified destination |
|
2487 | push changes to the specified destination | |
2488 | </td></tr> |
|
2488 | </td></tr> | |
2489 | <tr><td> |
|
2489 | <tr><td> | |
2490 | <a href="/help/remove"> |
|
2490 | <a href="/help/remove"> | |
2491 | remove |
|
2491 | remove | |
2492 | </a> |
|
2492 | </a> | |
2493 | </td><td> |
|
2493 | </td><td> | |
2494 | remove the specified files on the next commit |
|
2494 | remove the specified files on the next commit | |
2495 | </td></tr> |
|
2495 | </td></tr> | |
2496 | <tr><td> |
|
2496 | <tr><td> | |
2497 | <a href="/help/serve"> |
|
2497 | <a href="/help/serve"> | |
2498 | serve |
|
2498 | serve | |
2499 | </a> |
|
2499 | </a> | |
2500 | </td><td> |
|
2500 | </td><td> | |
2501 | start stand-alone webserver |
|
2501 | start stand-alone webserver | |
2502 | </td></tr> |
|
2502 | </td></tr> | |
2503 | <tr><td> |
|
2503 | <tr><td> | |
2504 | <a href="/help/status"> |
|
2504 | <a href="/help/status"> | |
2505 | status |
|
2505 | status | |
2506 | </a> |
|
2506 | </a> | |
2507 | </td><td> |
|
2507 | </td><td> | |
2508 | show changed files in the working directory |
|
2508 | show changed files in the working directory | |
2509 | </td></tr> |
|
2509 | </td></tr> | |
2510 | <tr><td> |
|
2510 | <tr><td> | |
2511 | <a href="/help/summary"> |
|
2511 | <a href="/help/summary"> | |
2512 | summary |
|
2512 | summary | |
2513 | </a> |
|
2513 | </a> | |
2514 | </td><td> |
|
2514 | </td><td> | |
2515 | summarize working directory state |
|
2515 | summarize working directory state | |
2516 | </td></tr> |
|
2516 | </td></tr> | |
2517 | <tr><td> |
|
2517 | <tr><td> | |
2518 | <a href="/help/update"> |
|
2518 | <a href="/help/update"> | |
2519 | update |
|
2519 | update | |
2520 | </a> |
|
2520 | </a> | |
2521 | </td><td> |
|
2521 | </td><td> | |
2522 | update working directory (or switch revisions) |
|
2522 | update working directory (or switch revisions) | |
2523 | </td></tr> |
|
2523 | </td></tr> | |
2524 |
|
2524 | |||
2525 |
|
2525 | |||
2526 |
|
2526 | |||
2527 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
2527 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> | |
2528 |
|
2528 | |||
2529 | <tr><td> |
|
2529 | <tr><td> | |
2530 | <a href="/help/addremove"> |
|
2530 | <a href="/help/addremove"> | |
2531 | addremove |
|
2531 | addremove | |
2532 | </a> |
|
2532 | </a> | |
2533 | </td><td> |
|
2533 | </td><td> | |
2534 | add all new files, delete all missing files |
|
2534 | add all new files, delete all missing files | |
2535 | </td></tr> |
|
2535 | </td></tr> | |
2536 | <tr><td> |
|
2536 | <tr><td> | |
2537 | <a href="/help/archive"> |
|
2537 | <a href="/help/archive"> | |
2538 | archive |
|
2538 | archive | |
2539 | </a> |
|
2539 | </a> | |
2540 | </td><td> |
|
2540 | </td><td> | |
2541 | create an unversioned archive of a repository revision |
|
2541 | create an unversioned archive of a repository revision | |
2542 | </td></tr> |
|
2542 | </td></tr> | |
2543 | <tr><td> |
|
2543 | <tr><td> | |
2544 | <a href="/help/backout"> |
|
2544 | <a href="/help/backout"> | |
2545 | backout |
|
2545 | backout | |
2546 | </a> |
|
2546 | </a> | |
2547 | </td><td> |
|
2547 | </td><td> | |
2548 | reverse effect of earlier changeset |
|
2548 | reverse effect of earlier changeset | |
2549 | </td></tr> |
|
2549 | </td></tr> | |
2550 | <tr><td> |
|
2550 | <tr><td> | |
2551 | <a href="/help/bisect"> |
|
2551 | <a href="/help/bisect"> | |
2552 | bisect |
|
2552 | bisect | |
2553 | </a> |
|
2553 | </a> | |
2554 | </td><td> |
|
2554 | </td><td> | |
2555 | subdivision search of changesets |
|
2555 | subdivision search of changesets | |
2556 | </td></tr> |
|
2556 | </td></tr> | |
2557 | <tr><td> |
|
2557 | <tr><td> | |
2558 | <a href="/help/bookmarks"> |
|
2558 | <a href="/help/bookmarks"> | |
2559 | bookmarks |
|
2559 | bookmarks | |
2560 | </a> |
|
2560 | </a> | |
2561 | </td><td> |
|
2561 | </td><td> | |
2562 | create a new bookmark or list existing bookmarks |
|
2562 | create a new bookmark or list existing bookmarks | |
2563 | </td></tr> |
|
2563 | </td></tr> | |
2564 | <tr><td> |
|
2564 | <tr><td> | |
2565 | <a href="/help/branch"> |
|
2565 | <a href="/help/branch"> | |
2566 | branch |
|
2566 | branch | |
2567 | </a> |
|
2567 | </a> | |
2568 | </td><td> |
|
2568 | </td><td> | |
2569 | set or show the current branch name |
|
2569 | set or show the current branch name | |
2570 | </td></tr> |
|
2570 | </td></tr> | |
2571 | <tr><td> |
|
2571 | <tr><td> | |
2572 | <a href="/help/branches"> |
|
2572 | <a href="/help/branches"> | |
2573 | branches |
|
2573 | branches | |
2574 | </a> |
|
2574 | </a> | |
2575 | </td><td> |
|
2575 | </td><td> | |
2576 | list repository named branches |
|
2576 | list repository named branches | |
2577 | </td></tr> |
|
2577 | </td></tr> | |
2578 | <tr><td> |
|
2578 | <tr><td> | |
2579 | <a href="/help/bundle"> |
|
2579 | <a href="/help/bundle"> | |
2580 | bundle |
|
2580 | bundle | |
2581 | </a> |
|
2581 | </a> | |
2582 | </td><td> |
|
2582 | </td><td> | |
2583 | create a bundle file |
|
2583 | create a bundle file | |
2584 | </td></tr> |
|
2584 | </td></tr> | |
2585 | <tr><td> |
|
2585 | <tr><td> | |
2586 | <a href="/help/cat"> |
|
2586 | <a href="/help/cat"> | |
2587 | cat |
|
2587 | cat | |
2588 | </a> |
|
2588 | </a> | |
2589 | </td><td> |
|
2589 | </td><td> | |
2590 | output the current or given revision of files |
|
2590 | output the current or given revision of files | |
2591 | </td></tr> |
|
2591 | </td></tr> | |
2592 | <tr><td> |
|
2592 | <tr><td> | |
2593 | <a href="/help/config"> |
|
2593 | <a href="/help/config"> | |
2594 | config |
|
2594 | config | |
2595 | </a> |
|
2595 | </a> | |
2596 | </td><td> |
|
2596 | </td><td> | |
2597 | show combined config settings from all hgrc files |
|
2597 | show combined config settings from all hgrc files | |
2598 | </td></tr> |
|
2598 | </td></tr> | |
2599 | <tr><td> |
|
2599 | <tr><td> | |
2600 | <a href="/help/copy"> |
|
2600 | <a href="/help/copy"> | |
2601 | copy |
|
2601 | copy | |
2602 | </a> |
|
2602 | </a> | |
2603 | </td><td> |
|
2603 | </td><td> | |
2604 | mark files as copied for the next commit |
|
2604 | mark files as copied for the next commit | |
2605 | </td></tr> |
|
2605 | </td></tr> | |
2606 | <tr><td> |
|
2606 | <tr><td> | |
2607 | <a href="/help/files"> |
|
2607 | <a href="/help/files"> | |
2608 | files |
|
2608 | files | |
2609 | </a> |
|
2609 | </a> | |
2610 | </td><td> |
|
2610 | </td><td> | |
2611 | list tracked files |
|
2611 | list tracked files | |
2612 | </td></tr> |
|
2612 | </td></tr> | |
2613 | <tr><td> |
|
2613 | <tr><td> | |
2614 | <a href="/help/graft"> |
|
2614 | <a href="/help/graft"> | |
2615 | graft |
|
2615 | graft | |
2616 | </a> |
|
2616 | </a> | |
2617 | </td><td> |
|
2617 | </td><td> | |
2618 | copy changes from other branches onto the current branch |
|
2618 | copy changes from other branches onto the current branch | |
2619 | </td></tr> |
|
2619 | </td></tr> | |
2620 | <tr><td> |
|
2620 | <tr><td> | |
2621 | <a href="/help/grep"> |
|
2621 | <a href="/help/grep"> | |
2622 | grep |
|
2622 | grep | |
2623 | </a> |
|
2623 | </a> | |
2624 | </td><td> |
|
2624 | </td><td> | |
2625 | search for a pattern in specified files |
|
2625 | search for a pattern in specified files | |
2626 | </td></tr> |
|
2626 | </td></tr> | |
2627 | <tr><td> |
|
2627 | <tr><td> | |
2628 | <a href="/help/hashelp"> |
|
2628 | <a href="/help/hashelp"> | |
2629 | hashelp |
|
2629 | hashelp | |
2630 | </a> |
|
2630 | </a> | |
2631 | </td><td> |
|
2631 | </td><td> | |
2632 | Extension command's help |
|
2632 | Extension command's help | |
2633 | </td></tr> |
|
2633 | </td></tr> | |
2634 | <tr><td> |
|
2634 | <tr><td> | |
2635 | <a href="/help/heads"> |
|
2635 | <a href="/help/heads"> | |
2636 | heads |
|
2636 | heads | |
2637 | </a> |
|
2637 | </a> | |
2638 | </td><td> |
|
2638 | </td><td> | |
2639 | show branch heads |
|
2639 | show branch heads | |
2640 | </td></tr> |
|
2640 | </td></tr> | |
2641 | <tr><td> |
|
2641 | <tr><td> | |
2642 | <a href="/help/help"> |
|
2642 | <a href="/help/help"> | |
2643 | help |
|
2643 | help | |
2644 | </a> |
|
2644 | </a> | |
2645 | </td><td> |
|
2645 | </td><td> | |
2646 | show help for a given topic or a help overview |
|
2646 | show help for a given topic or a help overview | |
2647 | </td></tr> |
|
2647 | </td></tr> | |
2648 | <tr><td> |
|
2648 | <tr><td> | |
2649 | <a href="/help/hgalias"> |
|
2649 | <a href="/help/hgalias"> | |
2650 | hgalias |
|
2650 | hgalias | |
2651 | </a> |
|
2651 | </a> | |
2652 | </td><td> |
|
2652 | </td><td> | |
2653 | My doc |
|
2653 | My doc | |
2654 | </td></tr> |
|
2654 | </td></tr> | |
2655 | <tr><td> |
|
2655 | <tr><td> | |
2656 | <a href="/help/hgaliasnodoc"> |
|
2656 | <a href="/help/hgaliasnodoc"> | |
2657 | hgaliasnodoc |
|
2657 | hgaliasnodoc | |
2658 | </a> |
|
2658 | </a> | |
2659 | </td><td> |
|
2659 | </td><td> | |
2660 | summarize working directory state |
|
2660 | summarize working directory state | |
2661 | </td></tr> |
|
2661 | </td></tr> | |
2662 | <tr><td> |
|
2662 | <tr><td> | |
2663 | <a href="/help/identify"> |
|
2663 | <a href="/help/identify"> | |
2664 | identify |
|
2664 | identify | |
2665 | </a> |
|
2665 | </a> | |
2666 | </td><td> |
|
2666 | </td><td> | |
2667 | identify the working directory or specified revision |
|
2667 | identify the working directory or specified revision | |
2668 | </td></tr> |
|
2668 | </td></tr> | |
2669 | <tr><td> |
|
2669 | <tr><td> | |
2670 | <a href="/help/import"> |
|
2670 | <a href="/help/import"> | |
2671 | import |
|
2671 | import | |
2672 | </a> |
|
2672 | </a> | |
2673 | </td><td> |
|
2673 | </td><td> | |
2674 | import an ordered set of patches |
|
2674 | import an ordered set of patches | |
2675 | </td></tr> |
|
2675 | </td></tr> | |
2676 | <tr><td> |
|
2676 | <tr><td> | |
2677 | <a href="/help/incoming"> |
|
2677 | <a href="/help/incoming"> | |
2678 | incoming |
|
2678 | incoming | |
2679 | </a> |
|
2679 | </a> | |
2680 | </td><td> |
|
2680 | </td><td> | |
2681 | show new changesets found in source |
|
2681 | show new changesets found in source | |
2682 | </td></tr> |
|
2682 | </td></tr> | |
2683 | <tr><td> |
|
2683 | <tr><td> | |
2684 | <a href="/help/manifest"> |
|
2684 | <a href="/help/manifest"> | |
2685 | manifest |
|
2685 | manifest | |
2686 | </a> |
|
2686 | </a> | |
2687 | </td><td> |
|
2687 | </td><td> | |
2688 | output the current or given revision of the project manifest |
|
2688 | output the current or given revision of the project manifest | |
2689 | </td></tr> |
|
2689 | </td></tr> | |
2690 | <tr><td> |
|
2690 | <tr><td> | |
2691 | <a href="/help/nohelp"> |
|
2691 | <a href="/help/nohelp"> | |
2692 | nohelp |
|
2692 | nohelp | |
2693 | </a> |
|
2693 | </a> | |
2694 | </td><td> |
|
2694 | </td><td> | |
2695 | (no help text available) |
|
2695 | (no help text available) | |
2696 | </td></tr> |
|
2696 | </td></tr> | |
2697 | <tr><td> |
|
2697 | <tr><td> | |
2698 | <a href="/help/outgoing"> |
|
2698 | <a href="/help/outgoing"> | |
2699 | outgoing |
|
2699 | outgoing | |
2700 | </a> |
|
2700 | </a> | |
2701 | </td><td> |
|
2701 | </td><td> | |
2702 | show changesets not found in the destination |
|
2702 | show changesets not found in the destination | |
2703 | </td></tr> |
|
2703 | </td></tr> | |
2704 | <tr><td> |
|
2704 | <tr><td> | |
2705 | <a href="/help/paths"> |
|
2705 | <a href="/help/paths"> | |
2706 | paths |
|
2706 | paths | |
2707 | </a> |
|
2707 | </a> | |
2708 | </td><td> |
|
2708 | </td><td> | |
2709 | show aliases for remote repositories |
|
2709 | show aliases for remote repositories | |
2710 | </td></tr> |
|
2710 | </td></tr> | |
2711 | <tr><td> |
|
2711 | <tr><td> | |
2712 | <a href="/help/phase"> |
|
2712 | <a href="/help/phase"> | |
2713 | phase |
|
2713 | phase | |
2714 | </a> |
|
2714 | </a> | |
2715 | </td><td> |
|
2715 | </td><td> | |
2716 | set or show the current phase name |
|
2716 | set or show the current phase name | |
2717 | </td></tr> |
|
2717 | </td></tr> | |
2718 | <tr><td> |
|
2718 | <tr><td> | |
2719 | <a href="/help/recover"> |
|
2719 | <a href="/help/recover"> | |
2720 | recover |
|
2720 | recover | |
2721 | </a> |
|
2721 | </a> | |
2722 | </td><td> |
|
2722 | </td><td> | |
2723 | roll back an interrupted transaction |
|
2723 | roll back an interrupted transaction | |
2724 | </td></tr> |
|
2724 | </td></tr> | |
2725 | <tr><td> |
|
2725 | <tr><td> | |
2726 | <a href="/help/rename"> |
|
2726 | <a href="/help/rename"> | |
2727 | rename |
|
2727 | rename | |
2728 | </a> |
|
2728 | </a> | |
2729 | </td><td> |
|
2729 | </td><td> | |
2730 | rename files; equivalent of copy + remove |
|
2730 | rename files; equivalent of copy + remove | |
2731 | </td></tr> |
|
2731 | </td></tr> | |
2732 | <tr><td> |
|
2732 | <tr><td> | |
2733 | <a href="/help/resolve"> |
|
2733 | <a href="/help/resolve"> | |
2734 | resolve |
|
2734 | resolve | |
2735 | </a> |
|
2735 | </a> | |
2736 | </td><td> |
|
2736 | </td><td> | |
2737 | redo merges or set/view the merge status of files |
|
2737 | redo merges or set/view the merge status of files | |
2738 | </td></tr> |
|
2738 | </td></tr> | |
2739 | <tr><td> |
|
2739 | <tr><td> | |
2740 | <a href="/help/revert"> |
|
2740 | <a href="/help/revert"> | |
2741 | revert |
|
2741 | revert | |
2742 | </a> |
|
2742 | </a> | |
2743 | </td><td> |
|
2743 | </td><td> | |
2744 | restore files to their checkout state |
|
2744 | restore files to their checkout state | |
2745 | </td></tr> |
|
2745 | </td></tr> | |
2746 | <tr><td> |
|
2746 | <tr><td> | |
2747 | <a href="/help/root"> |
|
2747 | <a href="/help/root"> | |
2748 | root |
|
2748 | root | |
2749 | </a> |
|
2749 | </a> | |
2750 | </td><td> |
|
2750 | </td><td> | |
2751 | print the root (top) of the current working directory |
|
2751 | print the root (top) of the current working directory | |
2752 | </td></tr> |
|
2752 | </td></tr> | |
2753 | <tr><td> |
|
2753 | <tr><td> | |
2754 | <a href="/help/shellalias"> |
|
2754 | <a href="/help/shellalias"> | |
2755 | shellalias |
|
2755 | shellalias | |
2756 | </a> |
|
2756 | </a> | |
2757 | </td><td> |
|
2757 | </td><td> | |
2758 | (no help text available) |
|
2758 | (no help text available) | |
2759 | </td></tr> |
|
2759 | </td></tr> | |
2760 | <tr><td> |
|
2760 | <tr><td> | |
2761 | <a href="/help/shelve"> |
|
2761 | <a href="/help/shelve"> | |
2762 | shelve |
|
2762 | shelve | |
2763 | </a> |
|
2763 | </a> | |
2764 | </td><td> |
|
2764 | </td><td> | |
2765 | save and set aside changes from the working directory |
|
2765 | save and set aside changes from the working directory | |
2766 | </td></tr> |
|
2766 | </td></tr> | |
2767 | <tr><td> |
|
2767 | <tr><td> | |
2768 | <a href="/help/tag"> |
|
2768 | <a href="/help/tag"> | |
2769 | tag |
|
2769 | tag | |
2770 | </a> |
|
2770 | </a> | |
2771 | </td><td> |
|
2771 | </td><td> | |
2772 | add one or more tags for the current or given revision |
|
2772 | add one or more tags for the current or given revision | |
2773 | </td></tr> |
|
2773 | </td></tr> | |
2774 | <tr><td> |
|
2774 | <tr><td> | |
2775 | <a href="/help/tags"> |
|
2775 | <a href="/help/tags"> | |
2776 | tags |
|
2776 | tags | |
2777 | </a> |
|
2777 | </a> | |
2778 | </td><td> |
|
2778 | </td><td> | |
2779 | list repository tags |
|
2779 | list repository tags | |
2780 | </td></tr> |
|
2780 | </td></tr> | |
2781 | <tr><td> |
|
2781 | <tr><td> | |
2782 | <a href="/help/unbundle"> |
|
2782 | <a href="/help/unbundle"> | |
2783 | unbundle |
|
2783 | unbundle | |
2784 | </a> |
|
2784 | </a> | |
2785 | </td><td> |
|
2785 | </td><td> | |
2786 | apply one or more bundle files |
|
2786 | apply one or more bundle files | |
2787 | </td></tr> |
|
2787 | </td></tr> | |
2788 | <tr><td> |
|
2788 | <tr><td> | |
2789 | <a href="/help/unshelve"> |
|
2789 | <a href="/help/unshelve"> | |
2790 | unshelve |
|
2790 | unshelve | |
2791 | </a> |
|
2791 | </a> | |
2792 | </td><td> |
|
2792 | </td><td> | |
2793 | restore a shelved change to the working directory |
|
2793 | restore a shelved change to the working directory | |
2794 | </td></tr> |
|
2794 | </td></tr> | |
2795 | <tr><td> |
|
2795 | <tr><td> | |
2796 | <a href="/help/verify"> |
|
2796 | <a href="/help/verify"> | |
2797 | verify |
|
2797 | verify | |
2798 | </a> |
|
2798 | </a> | |
2799 | </td><td> |
|
2799 | </td><td> | |
2800 | verify the integrity of the repository |
|
2800 | verify the integrity of the repository | |
2801 | </td></tr> |
|
2801 | </td></tr> | |
2802 | <tr><td> |
|
2802 | <tr><td> | |
2803 | <a href="/help/version"> |
|
2803 | <a href="/help/version"> | |
2804 | version |
|
2804 | version | |
2805 | </a> |
|
2805 | </a> | |
2806 | </td><td> |
|
2806 | </td><td> | |
2807 | output version and copyright information |
|
2807 | output version and copyright information | |
2808 | </td></tr> |
|
2808 | </td></tr> | |
2809 |
|
2809 | |||
2810 |
|
2810 | |||
2811 | </table> |
|
2811 | </table> | |
2812 | </div> |
|
2812 | </div> | |
2813 | </div> |
|
2813 | </div> | |
2814 |
|
2814 | |||
2815 |
|
2815 | |||
2816 |
|
2816 | |||
2817 | </body> |
|
2817 | </body> | |
2818 | </html> |
|
2818 | </html> | |
2819 |
|
2819 | |||
2820 |
|
2820 | |||
2821 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" |
|
2821 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" | |
2822 | 200 Script output follows |
|
2822 | 200 Script output follows | |
2823 |
|
2823 | |||
2824 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2824 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2825 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2825 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2826 | <head> |
|
2826 | <head> | |
2827 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2827 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2828 | <meta name="robots" content="index, nofollow" /> |
|
2828 | <meta name="robots" content="index, nofollow" /> | |
2829 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2829 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2830 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2830 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2831 |
|
2831 | |||
2832 | <title>Help: add</title> |
|
2832 | <title>Help: add</title> | |
2833 | </head> |
|
2833 | </head> | |
2834 | <body> |
|
2834 | <body> | |
2835 |
|
2835 | |||
2836 | <div class="container"> |
|
2836 | <div class="container"> | |
2837 | <div class="menu"> |
|
2837 | <div class="menu"> | |
2838 | <div class="logo"> |
|
2838 | <div class="logo"> | |
2839 | <a href="https://mercurial-scm.org/"> |
|
2839 | <a href="https://mercurial-scm.org/"> | |
2840 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2840 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2841 | </div> |
|
2841 | </div> | |
2842 | <ul> |
|
2842 | <ul> | |
2843 | <li><a href="/shortlog">log</a></li> |
|
2843 | <li><a href="/shortlog">log</a></li> | |
2844 | <li><a href="/graph">graph</a></li> |
|
2844 | <li><a href="/graph">graph</a></li> | |
2845 | <li><a href="/tags">tags</a></li> |
|
2845 | <li><a href="/tags">tags</a></li> | |
2846 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2846 | <li><a href="/bookmarks">bookmarks</a></li> | |
2847 | <li><a href="/branches">branches</a></li> |
|
2847 | <li><a href="/branches">branches</a></li> | |
2848 | </ul> |
|
2848 | </ul> | |
2849 | <ul> |
|
2849 | <ul> | |
2850 | <li class="active"><a href="/help">help</a></li> |
|
2850 | <li class="active"><a href="/help">help</a></li> | |
2851 | </ul> |
|
2851 | </ul> | |
2852 | </div> |
|
2852 | </div> | |
2853 |
|
2853 | |||
2854 | <div class="main"> |
|
2854 | <div class="main"> | |
2855 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2855 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2856 | <h3>Help: add</h3> |
|
2856 | <h3>Help: add</h3> | |
2857 |
|
2857 | |||
2858 | <form class="search" action="/log"> |
|
2858 | <form class="search" action="/log"> | |
2859 |
|
2859 | |||
2860 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2860 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2861 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2861 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2862 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2862 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2863 | </form> |
|
2863 | </form> | |
2864 | <div id="doc"> |
|
2864 | <div id="doc"> | |
2865 | <p> |
|
2865 | <p> | |
2866 | hg add [OPTION]... [FILE]... |
|
2866 | hg add [OPTION]... [FILE]... | |
2867 | </p> |
|
2867 | </p> | |
2868 | <p> |
|
2868 | <p> | |
2869 | add the specified files on the next commit |
|
2869 | add the specified files on the next commit | |
2870 | </p> |
|
2870 | </p> | |
2871 | <p> |
|
2871 | <p> | |
2872 | Schedule files to be version controlled and added to the |
|
2872 | Schedule files to be version controlled and added to the | |
2873 | repository. |
|
2873 | repository. | |
2874 | </p> |
|
2874 | </p> | |
2875 | <p> |
|
2875 | <p> | |
2876 | The files will be added to the repository at the next commit. To |
|
2876 | The files will be added to the repository at the next commit. To | |
2877 | undo an add before that, see 'hg forget'. |
|
2877 | undo an add before that, see 'hg forget'. | |
2878 | </p> |
|
2878 | </p> | |
2879 | <p> |
|
2879 | <p> | |
2880 | If no names are given, add all files to the repository (except |
|
2880 | If no names are given, add all files to the repository (except | |
2881 | files matching ".hgignore"). |
|
2881 | files matching ".hgignore"). | |
2882 | </p> |
|
2882 | </p> | |
2883 | <p> |
|
2883 | <p> | |
2884 | Examples: |
|
2884 | Examples: | |
2885 | </p> |
|
2885 | </p> | |
2886 | <ul> |
|
2886 | <ul> | |
2887 | <li> New (unknown) files are added automatically by 'hg add': |
|
2887 | <li> New (unknown) files are added automatically by 'hg add': | |
2888 | <pre> |
|
2888 | <pre> | |
2889 | \$ ls (re) |
|
2889 | \$ ls (re) | |
2890 | foo.c |
|
2890 | foo.c | |
2891 | \$ hg status (re) |
|
2891 | \$ hg status (re) | |
2892 | ? foo.c |
|
2892 | ? foo.c | |
2893 | \$ hg add (re) |
|
2893 | \$ hg add (re) | |
2894 | adding foo.c |
|
2894 | adding foo.c | |
2895 | \$ hg status (re) |
|
2895 | \$ hg status (re) | |
2896 | A foo.c |
|
2896 | A foo.c | |
2897 | </pre> |
|
2897 | </pre> | |
2898 | <li> Specific files to be added can be specified: |
|
2898 | <li> Specific files to be added can be specified: | |
2899 | <pre> |
|
2899 | <pre> | |
2900 | \$ ls (re) |
|
2900 | \$ ls (re) | |
2901 | bar.c foo.c |
|
2901 | bar.c foo.c | |
2902 | \$ hg status (re) |
|
2902 | \$ hg status (re) | |
2903 | ? bar.c |
|
2903 | ? bar.c | |
2904 | ? foo.c |
|
2904 | ? foo.c | |
2905 | \$ hg add bar.c (re) |
|
2905 | \$ hg add bar.c (re) | |
2906 | \$ hg status (re) |
|
2906 | \$ hg status (re) | |
2907 | A bar.c |
|
2907 | A bar.c | |
2908 | ? foo.c |
|
2908 | ? foo.c | |
2909 | </pre> |
|
2909 | </pre> | |
2910 | </ul> |
|
2910 | </ul> | |
2911 | <p> |
|
2911 | <p> | |
2912 | Returns 0 if all files are successfully added. |
|
2912 | Returns 0 if all files are successfully added. | |
2913 | </p> |
|
2913 | </p> | |
2914 | <p> |
|
2914 | <p> | |
2915 | options ([+] can be repeated): |
|
2915 | options ([+] can be repeated): | |
2916 | </p> |
|
2916 | </p> | |
2917 | <table> |
|
2917 | <table> | |
2918 | <tr><td>-I</td> |
|
2918 | <tr><td>-I</td> | |
2919 | <td>--include PATTERN [+]</td> |
|
2919 | <td>--include PATTERN [+]</td> | |
2920 | <td>include names matching the given patterns</td></tr> |
|
2920 | <td>include names matching the given patterns</td></tr> | |
2921 | <tr><td>-X</td> |
|
2921 | <tr><td>-X</td> | |
2922 | <td>--exclude PATTERN [+]</td> |
|
2922 | <td>--exclude PATTERN [+]</td> | |
2923 | <td>exclude names matching the given patterns</td></tr> |
|
2923 | <td>exclude names matching the given patterns</td></tr> | |
2924 | <tr><td>-S</td> |
|
2924 | <tr><td>-S</td> | |
2925 | <td>--subrepos</td> |
|
2925 | <td>--subrepos</td> | |
2926 | <td>recurse into subrepositories</td></tr> |
|
2926 | <td>recurse into subrepositories</td></tr> | |
2927 | <tr><td>-n</td> |
|
2927 | <tr><td>-n</td> | |
2928 | <td>--dry-run</td> |
|
2928 | <td>--dry-run</td> | |
2929 | <td>do not perform actions, just print output</td></tr> |
|
2929 | <td>do not perform actions, just print output</td></tr> | |
2930 | </table> |
|
2930 | </table> | |
2931 | <p> |
|
2931 | <p> | |
2932 | global options ([+] can be repeated): |
|
2932 | global options ([+] can be repeated): | |
2933 | </p> |
|
2933 | </p> | |
2934 | <table> |
|
2934 | <table> | |
2935 | <tr><td>-R</td> |
|
2935 | <tr><td>-R</td> | |
2936 | <td>--repository REPO</td> |
|
2936 | <td>--repository REPO</td> | |
2937 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2937 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2938 | <tr><td></td> |
|
2938 | <tr><td></td> | |
2939 | <td>--cwd DIR</td> |
|
2939 | <td>--cwd DIR</td> | |
2940 | <td>change working directory</td></tr> |
|
2940 | <td>change working directory</td></tr> | |
2941 | <tr><td>-y</td> |
|
2941 | <tr><td>-y</td> | |
2942 | <td>--noninteractive</td> |
|
2942 | <td>--noninteractive</td> | |
2943 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2943 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2944 | <tr><td>-q</td> |
|
2944 | <tr><td>-q</td> | |
2945 | <td>--quiet</td> |
|
2945 | <td>--quiet</td> | |
2946 | <td>suppress output</td></tr> |
|
2946 | <td>suppress output</td></tr> | |
2947 | <tr><td>-v</td> |
|
2947 | <tr><td>-v</td> | |
2948 | <td>--verbose</td> |
|
2948 | <td>--verbose</td> | |
2949 | <td>enable additional output</td></tr> |
|
2949 | <td>enable additional output</td></tr> | |
2950 | <tr><td></td> |
|
2950 | <tr><td></td> | |
2951 | <td>--color TYPE</td> |
|
2951 | <td>--color TYPE</td> | |
2952 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2952 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
2953 | <tr><td></td> |
|
2953 | <tr><td></td> | |
2954 | <td>--config CONFIG [+]</td> |
|
2954 | <td>--config CONFIG [+]</td> | |
2955 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2955 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2956 | <tr><td></td> |
|
2956 | <tr><td></td> | |
2957 | <td>--debug</td> |
|
2957 | <td>--debug</td> | |
2958 | <td>enable debugging output</td></tr> |
|
2958 | <td>enable debugging output</td></tr> | |
2959 | <tr><td></td> |
|
2959 | <tr><td></td> | |
2960 | <td>--debugger</td> |
|
2960 | <td>--debugger</td> | |
2961 | <td>start debugger</td></tr> |
|
2961 | <td>start debugger</td></tr> | |
2962 | <tr><td></td> |
|
2962 | <tr><td></td> | |
2963 | <td>--encoding ENCODE</td> |
|
2963 | <td>--encoding ENCODE</td> | |
2964 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2964 | <td>set the charset encoding (default: ascii)</td></tr> | |
2965 | <tr><td></td> |
|
2965 | <tr><td></td> | |
2966 | <td>--encodingmode MODE</td> |
|
2966 | <td>--encodingmode MODE</td> | |
2967 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2967 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2968 | <tr><td></td> |
|
2968 | <tr><td></td> | |
2969 | <td>--traceback</td> |
|
2969 | <td>--traceback</td> | |
2970 | <td>always print a traceback on exception</td></tr> |
|
2970 | <td>always print a traceback on exception</td></tr> | |
2971 | <tr><td></td> |
|
2971 | <tr><td></td> | |
2972 | <td>--time</td> |
|
2972 | <td>--time</td> | |
2973 | <td>time how long the command takes</td></tr> |
|
2973 | <td>time how long the command takes</td></tr> | |
2974 | <tr><td></td> |
|
2974 | <tr><td></td> | |
2975 | <td>--profile</td> |
|
2975 | <td>--profile</td> | |
2976 | <td>print command execution profile</td></tr> |
|
2976 | <td>print command execution profile</td></tr> | |
2977 | <tr><td></td> |
|
2977 | <tr><td></td> | |
2978 | <td>--version</td> |
|
2978 | <td>--version</td> | |
2979 | <td>output version information and exit</td></tr> |
|
2979 | <td>output version information and exit</td></tr> | |
2980 | <tr><td>-h</td> |
|
2980 | <tr><td>-h</td> | |
2981 | <td>--help</td> |
|
2981 | <td>--help</td> | |
2982 | <td>display help and exit</td></tr> |
|
2982 | <td>display help and exit</td></tr> | |
2983 | <tr><td></td> |
|
2983 | <tr><td></td> | |
2984 | <td>--hidden</td> |
|
2984 | <td>--hidden</td> | |
2985 | <td>consider hidden changesets</td></tr> |
|
2985 | <td>consider hidden changesets</td></tr> | |
2986 | <tr><td></td> |
|
2986 | <tr><td></td> | |
2987 | <td>--pager TYPE</td> |
|
2987 | <td>--pager TYPE</td> | |
2988 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2988 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
2989 | </table> |
|
2989 | </table> | |
2990 |
|
2990 | |||
2991 | </div> |
|
2991 | </div> | |
2992 | </div> |
|
2992 | </div> | |
2993 | </div> |
|
2993 | </div> | |
2994 |
|
2994 | |||
2995 |
|
2995 | |||
2996 |
|
2996 | |||
2997 | </body> |
|
2997 | </body> | |
2998 | </html> |
|
2998 | </html> | |
2999 |
|
2999 | |||
3000 |
|
3000 | |||
3001 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" |
|
3001 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" | |
3002 | 200 Script output follows |
|
3002 | 200 Script output follows | |
3003 |
|
3003 | |||
3004 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3004 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3005 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3005 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3006 | <head> |
|
3006 | <head> | |
3007 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3007 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3008 | <meta name="robots" content="index, nofollow" /> |
|
3008 | <meta name="robots" content="index, nofollow" /> | |
3009 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3009 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3010 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3010 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3011 |
|
3011 | |||
3012 | <title>Help: remove</title> |
|
3012 | <title>Help: remove</title> | |
3013 | </head> |
|
3013 | </head> | |
3014 | <body> |
|
3014 | <body> | |
3015 |
|
3015 | |||
3016 | <div class="container"> |
|
3016 | <div class="container"> | |
3017 | <div class="menu"> |
|
3017 | <div class="menu"> | |
3018 | <div class="logo"> |
|
3018 | <div class="logo"> | |
3019 | <a href="https://mercurial-scm.org/"> |
|
3019 | <a href="https://mercurial-scm.org/"> | |
3020 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3020 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3021 | </div> |
|
3021 | </div> | |
3022 | <ul> |
|
3022 | <ul> | |
3023 | <li><a href="/shortlog">log</a></li> |
|
3023 | <li><a href="/shortlog">log</a></li> | |
3024 | <li><a href="/graph">graph</a></li> |
|
3024 | <li><a href="/graph">graph</a></li> | |
3025 | <li><a href="/tags">tags</a></li> |
|
3025 | <li><a href="/tags">tags</a></li> | |
3026 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3026 | <li><a href="/bookmarks">bookmarks</a></li> | |
3027 | <li><a href="/branches">branches</a></li> |
|
3027 | <li><a href="/branches">branches</a></li> | |
3028 | </ul> |
|
3028 | </ul> | |
3029 | <ul> |
|
3029 | <ul> | |
3030 | <li class="active"><a href="/help">help</a></li> |
|
3030 | <li class="active"><a href="/help">help</a></li> | |
3031 | </ul> |
|
3031 | </ul> | |
3032 | </div> |
|
3032 | </div> | |
3033 |
|
3033 | |||
3034 | <div class="main"> |
|
3034 | <div class="main"> | |
3035 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3035 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3036 | <h3>Help: remove</h3> |
|
3036 | <h3>Help: remove</h3> | |
3037 |
|
3037 | |||
3038 | <form class="search" action="/log"> |
|
3038 | <form class="search" action="/log"> | |
3039 |
|
3039 | |||
3040 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3040 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3041 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3041 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3042 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3042 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3043 | </form> |
|
3043 | </form> | |
3044 | <div id="doc"> |
|
3044 | <div id="doc"> | |
3045 | <p> |
|
3045 | <p> | |
3046 | hg remove [OPTION]... FILE... |
|
3046 | hg remove [OPTION]... FILE... | |
3047 | </p> |
|
3047 | </p> | |
3048 | <p> |
|
3048 | <p> | |
3049 | aliases: rm |
|
3049 | aliases: rm | |
3050 | </p> |
|
3050 | </p> | |
3051 | <p> |
|
3051 | <p> | |
3052 | remove the specified files on the next commit |
|
3052 | remove the specified files on the next commit | |
3053 | </p> |
|
3053 | </p> | |
3054 | <p> |
|
3054 | <p> | |
3055 | Schedule the indicated files for removal from the current branch. |
|
3055 | Schedule the indicated files for removal from the current branch. | |
3056 | </p> |
|
3056 | </p> | |
3057 | <p> |
|
3057 | <p> | |
3058 | This command schedules the files to be removed at the next commit. |
|
3058 | This command schedules the files to be removed at the next commit. | |
3059 | To undo a remove before that, see 'hg revert'. To undo added |
|
3059 | To undo a remove before that, see 'hg revert'. To undo added | |
3060 | files, see 'hg forget'. |
|
3060 | files, see 'hg forget'. | |
3061 | </p> |
|
3061 | </p> | |
3062 | <p> |
|
3062 | <p> | |
3063 | -A/--after can be used to remove only files that have already |
|
3063 | -A/--after can be used to remove only files that have already | |
3064 | been deleted, -f/--force can be used to force deletion, and -Af |
|
3064 | been deleted, -f/--force can be used to force deletion, and -Af | |
3065 | can be used to remove files from the next revision without |
|
3065 | can be used to remove files from the next revision without | |
3066 | deleting them from the working directory. |
|
3066 | deleting them from the working directory. | |
3067 | </p> |
|
3067 | </p> | |
3068 | <p> |
|
3068 | <p> | |
3069 | The following table details the behavior of remove for different |
|
3069 | The following table details the behavior of remove for different | |
3070 | file states (columns) and option combinations (rows). The file |
|
3070 | file states (columns) and option combinations (rows). The file | |
3071 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
3071 | states are Added [A], Clean [C], Modified [M] and Missing [!] | |
3072 | (as reported by 'hg status'). The actions are Warn, Remove |
|
3072 | (as reported by 'hg status'). The actions are Warn, Remove | |
3073 | (from branch) and Delete (from disk): |
|
3073 | (from branch) and Delete (from disk): | |
3074 | </p> |
|
3074 | </p> | |
3075 | <table> |
|
3075 | <table> | |
3076 | <tr><td>opt/state</td> |
|
3076 | <tr><td>opt/state</td> | |
3077 | <td>A</td> |
|
3077 | <td>A</td> | |
3078 | <td>C</td> |
|
3078 | <td>C</td> | |
3079 | <td>M</td> |
|
3079 | <td>M</td> | |
3080 | <td>!</td></tr> |
|
3080 | <td>!</td></tr> | |
3081 | <tr><td>none</td> |
|
3081 | <tr><td>none</td> | |
3082 | <td>W</td> |
|
3082 | <td>W</td> | |
3083 | <td>RD</td> |
|
3083 | <td>RD</td> | |
3084 | <td>W</td> |
|
3084 | <td>W</td> | |
3085 | <td>R</td></tr> |
|
3085 | <td>R</td></tr> | |
3086 | <tr><td>-f</td> |
|
3086 | <tr><td>-f</td> | |
3087 | <td>R</td> |
|
3087 | <td>R</td> | |
3088 | <td>RD</td> |
|
3088 | <td>RD</td> | |
3089 | <td>RD</td> |
|
3089 | <td>RD</td> | |
3090 | <td>R</td></tr> |
|
3090 | <td>R</td></tr> | |
3091 | <tr><td>-A</td> |
|
3091 | <tr><td>-A</td> | |
3092 | <td>W</td> |
|
3092 | <td>W</td> | |
3093 | <td>W</td> |
|
3093 | <td>W</td> | |
3094 | <td>W</td> |
|
3094 | <td>W</td> | |
3095 | <td>R</td></tr> |
|
3095 | <td>R</td></tr> | |
3096 | <tr><td>-Af</td> |
|
3096 | <tr><td>-Af</td> | |
3097 | <td>R</td> |
|
3097 | <td>R</td> | |
3098 | <td>R</td> |
|
3098 | <td>R</td> | |
3099 | <td>R</td> |
|
3099 | <td>R</td> | |
3100 | <td>R</td></tr> |
|
3100 | <td>R</td></tr> | |
3101 | </table> |
|
3101 | </table> | |
3102 | <p> |
|
3102 | <p> | |
3103 | <b>Note:</b> |
|
3103 | <b>Note:</b> | |
3104 | </p> |
|
3104 | </p> | |
3105 | <p> |
|
3105 | <p> | |
3106 | 'hg remove' never deletes files in Added [A] state from the |
|
3106 | 'hg remove' never deletes files in Added [A] state from the | |
3107 | working directory, not even if "--force" is specified. |
|
3107 | working directory, not even if "--force" is specified. | |
3108 | </p> |
|
3108 | </p> | |
3109 | <p> |
|
3109 | <p> | |
3110 | Returns 0 on success, 1 if any warnings encountered. |
|
3110 | Returns 0 on success, 1 if any warnings encountered. | |
3111 | </p> |
|
3111 | </p> | |
3112 | <p> |
|
3112 | <p> | |
3113 | options ([+] can be repeated): |
|
3113 | options ([+] can be repeated): | |
3114 | </p> |
|
3114 | </p> | |
3115 | <table> |
|
3115 | <table> | |
3116 | <tr><td>-A</td> |
|
3116 | <tr><td>-A</td> | |
3117 | <td>--after</td> |
|
3117 | <td>--after</td> | |
3118 | <td>record delete for missing files</td></tr> |
|
3118 | <td>record delete for missing files</td></tr> | |
3119 | <tr><td>-f</td> |
|
3119 | <tr><td>-f</td> | |
3120 | <td>--force</td> |
|
3120 | <td>--force</td> | |
3121 | <td>forget added files, delete modified files</td></tr> |
|
3121 | <td>forget added files, delete modified files</td></tr> | |
3122 | <tr><td>-S</td> |
|
3122 | <tr><td>-S</td> | |
3123 | <td>--subrepos</td> |
|
3123 | <td>--subrepos</td> | |
3124 | <td>recurse into subrepositories</td></tr> |
|
3124 | <td>recurse into subrepositories</td></tr> | |
3125 | <tr><td>-I</td> |
|
3125 | <tr><td>-I</td> | |
3126 | <td>--include PATTERN [+]</td> |
|
3126 | <td>--include PATTERN [+]</td> | |
3127 | <td>include names matching the given patterns</td></tr> |
|
3127 | <td>include names matching the given patterns</td></tr> | |
3128 | <tr><td>-X</td> |
|
3128 | <tr><td>-X</td> | |
3129 | <td>--exclude PATTERN [+]</td> |
|
3129 | <td>--exclude PATTERN [+]</td> | |
3130 | <td>exclude names matching the given patterns</td></tr> |
|
3130 | <td>exclude names matching the given patterns</td></tr> | |
3131 | <tr><td>-n</td> |
|
3131 | <tr><td>-n</td> | |
3132 | <td>--dry-run</td> |
|
3132 | <td>--dry-run</td> | |
3133 | <td>do not perform actions, just print output</td></tr> |
|
3133 | <td>do not perform actions, just print output</td></tr> | |
3134 | </table> |
|
3134 | </table> | |
3135 | <p> |
|
3135 | <p> | |
3136 | global options ([+] can be repeated): |
|
3136 | global options ([+] can be repeated): | |
3137 | </p> |
|
3137 | </p> | |
3138 | <table> |
|
3138 | <table> | |
3139 | <tr><td>-R</td> |
|
3139 | <tr><td>-R</td> | |
3140 | <td>--repository REPO</td> |
|
3140 | <td>--repository REPO</td> | |
3141 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
3141 | <td>repository root directory or name of overlay bundle file</td></tr> | |
3142 | <tr><td></td> |
|
3142 | <tr><td></td> | |
3143 | <td>--cwd DIR</td> |
|
3143 | <td>--cwd DIR</td> | |
3144 | <td>change working directory</td></tr> |
|
3144 | <td>change working directory</td></tr> | |
3145 | <tr><td>-y</td> |
|
3145 | <tr><td>-y</td> | |
3146 | <td>--noninteractive</td> |
|
3146 | <td>--noninteractive</td> | |
3147 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
3147 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
3148 | <tr><td>-q</td> |
|
3148 | <tr><td>-q</td> | |
3149 | <td>--quiet</td> |
|
3149 | <td>--quiet</td> | |
3150 | <td>suppress output</td></tr> |
|
3150 | <td>suppress output</td></tr> | |
3151 | <tr><td>-v</td> |
|
3151 | <tr><td>-v</td> | |
3152 | <td>--verbose</td> |
|
3152 | <td>--verbose</td> | |
3153 | <td>enable additional output</td></tr> |
|
3153 | <td>enable additional output</td></tr> | |
3154 | <tr><td></td> |
|
3154 | <tr><td></td> | |
3155 | <td>--color TYPE</td> |
|
3155 | <td>--color TYPE</td> | |
3156 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
3156 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
3157 | <tr><td></td> |
|
3157 | <tr><td></td> | |
3158 | <td>--config CONFIG [+]</td> |
|
3158 | <td>--config CONFIG [+]</td> | |
3159 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
3159 | <td>set/override config option (use 'section.name=value')</td></tr> | |
3160 | <tr><td></td> |
|
3160 | <tr><td></td> | |
3161 | <td>--debug</td> |
|
3161 | <td>--debug</td> | |
3162 | <td>enable debugging output</td></tr> |
|
3162 | <td>enable debugging output</td></tr> | |
3163 | <tr><td></td> |
|
3163 | <tr><td></td> | |
3164 | <td>--debugger</td> |
|
3164 | <td>--debugger</td> | |
3165 | <td>start debugger</td></tr> |
|
3165 | <td>start debugger</td></tr> | |
3166 | <tr><td></td> |
|
3166 | <tr><td></td> | |
3167 | <td>--encoding ENCODE</td> |
|
3167 | <td>--encoding ENCODE</td> | |
3168 | <td>set the charset encoding (default: ascii)</td></tr> |
|
3168 | <td>set the charset encoding (default: ascii)</td></tr> | |
3169 | <tr><td></td> |
|
3169 | <tr><td></td> | |
3170 | <td>--encodingmode MODE</td> |
|
3170 | <td>--encodingmode MODE</td> | |
3171 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
3171 | <td>set the charset encoding mode (default: strict)</td></tr> | |
3172 | <tr><td></td> |
|
3172 | <tr><td></td> | |
3173 | <td>--traceback</td> |
|
3173 | <td>--traceback</td> | |
3174 | <td>always print a traceback on exception</td></tr> |
|
3174 | <td>always print a traceback on exception</td></tr> | |
3175 | <tr><td></td> |
|
3175 | <tr><td></td> | |
3176 | <td>--time</td> |
|
3176 | <td>--time</td> | |
3177 | <td>time how long the command takes</td></tr> |
|
3177 | <td>time how long the command takes</td></tr> | |
3178 | <tr><td></td> |
|
3178 | <tr><td></td> | |
3179 | <td>--profile</td> |
|
3179 | <td>--profile</td> | |
3180 | <td>print command execution profile</td></tr> |
|
3180 | <td>print command execution profile</td></tr> | |
3181 | <tr><td></td> |
|
3181 | <tr><td></td> | |
3182 | <td>--version</td> |
|
3182 | <td>--version</td> | |
3183 | <td>output version information and exit</td></tr> |
|
3183 | <td>output version information and exit</td></tr> | |
3184 | <tr><td>-h</td> |
|
3184 | <tr><td>-h</td> | |
3185 | <td>--help</td> |
|
3185 | <td>--help</td> | |
3186 | <td>display help and exit</td></tr> |
|
3186 | <td>display help and exit</td></tr> | |
3187 | <tr><td></td> |
|
3187 | <tr><td></td> | |
3188 | <td>--hidden</td> |
|
3188 | <td>--hidden</td> | |
3189 | <td>consider hidden changesets</td></tr> |
|
3189 | <td>consider hidden changesets</td></tr> | |
3190 | <tr><td></td> |
|
3190 | <tr><td></td> | |
3191 | <td>--pager TYPE</td> |
|
3191 | <td>--pager TYPE</td> | |
3192 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
3192 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
3193 | </table> |
|
3193 | </table> | |
3194 |
|
3194 | |||
3195 | </div> |
|
3195 | </div> | |
3196 | </div> |
|
3196 | </div> | |
3197 | </div> |
|
3197 | </div> | |
3198 |
|
3198 | |||
3199 |
|
3199 | |||
3200 |
|
3200 | |||
3201 | </body> |
|
3201 | </body> | |
3202 | </html> |
|
3202 | </html> | |
3203 |
|
3203 | |||
3204 |
|
3204 | |||
3205 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" |
|
3205 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" | |
3206 | 200 Script output follows |
|
3206 | 200 Script output follows | |
3207 |
|
3207 | |||
3208 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3208 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3209 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3209 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3210 | <head> |
|
3210 | <head> | |
3211 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3211 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3212 | <meta name="robots" content="index, nofollow" /> |
|
3212 | <meta name="robots" content="index, nofollow" /> | |
3213 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3213 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3214 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3214 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3215 |
|
3215 | |||
3216 | <title>Help: dates</title> |
|
3216 | <title>Help: dates</title> | |
3217 | </head> |
|
3217 | </head> | |
3218 | <body> |
|
3218 | <body> | |
3219 |
|
3219 | |||
3220 | <div class="container"> |
|
3220 | <div class="container"> | |
3221 | <div class="menu"> |
|
3221 | <div class="menu"> | |
3222 | <div class="logo"> |
|
3222 | <div class="logo"> | |
3223 | <a href="https://mercurial-scm.org/"> |
|
3223 | <a href="https://mercurial-scm.org/"> | |
3224 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3224 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3225 | </div> |
|
3225 | </div> | |
3226 | <ul> |
|
3226 | <ul> | |
3227 | <li><a href="/shortlog">log</a></li> |
|
3227 | <li><a href="/shortlog">log</a></li> | |
3228 | <li><a href="/graph">graph</a></li> |
|
3228 | <li><a href="/graph">graph</a></li> | |
3229 | <li><a href="/tags">tags</a></li> |
|
3229 | <li><a href="/tags">tags</a></li> | |
3230 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3230 | <li><a href="/bookmarks">bookmarks</a></li> | |
3231 | <li><a href="/branches">branches</a></li> |
|
3231 | <li><a href="/branches">branches</a></li> | |
3232 | </ul> |
|
3232 | </ul> | |
3233 | <ul> |
|
3233 | <ul> | |
3234 | <li class="active"><a href="/help">help</a></li> |
|
3234 | <li class="active"><a href="/help">help</a></li> | |
3235 | </ul> |
|
3235 | </ul> | |
3236 | </div> |
|
3236 | </div> | |
3237 |
|
3237 | |||
3238 | <div class="main"> |
|
3238 | <div class="main"> | |
3239 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3239 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3240 | <h3>Help: dates</h3> |
|
3240 | <h3>Help: dates</h3> | |
3241 |
|
3241 | |||
3242 | <form class="search" action="/log"> |
|
3242 | <form class="search" action="/log"> | |
3243 |
|
3243 | |||
3244 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3244 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3245 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3245 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3246 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3246 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3247 | </form> |
|
3247 | </form> | |
3248 | <div id="doc"> |
|
3248 | <div id="doc"> | |
3249 | <h1>Date Formats</h1> |
|
3249 | <h1>Date Formats</h1> | |
3250 | <p> |
|
3250 | <p> | |
3251 | Some commands allow the user to specify a date, e.g.: |
|
3251 | Some commands allow the user to specify a date, e.g.: | |
3252 | </p> |
|
3252 | </p> | |
3253 | <ul> |
|
3253 | <ul> | |
3254 | <li> backout, commit, import, tag: Specify the commit date. |
|
3254 | <li> backout, commit, import, tag: Specify the commit date. | |
3255 | <li> log, revert, update: Select revision(s) by date. |
|
3255 | <li> log, revert, update: Select revision(s) by date. | |
3256 | </ul> |
|
3256 | </ul> | |
3257 | <p> |
|
3257 | <p> | |
3258 | Many date formats are valid. Here are some examples: |
|
3258 | Many date formats are valid. Here are some examples: | |
3259 | </p> |
|
3259 | </p> | |
3260 | <ul> |
|
3260 | <ul> | |
3261 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
3261 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
3262 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
3262 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
3263 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
3263 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
3264 | <li> "Dec 6" (midnight) |
|
3264 | <li> "Dec 6" (midnight) | |
3265 | <li> "13:18" (today assumed) |
|
3265 | <li> "13:18" (today assumed) | |
3266 | <li> "3:39" (3:39AM assumed) |
|
3266 | <li> "3:39" (3:39AM assumed) | |
3267 | <li> "3:39pm" (15:39) |
|
3267 | <li> "3:39pm" (15:39) | |
3268 | <li> "2006-12-06 13:18:29" (ISO 8601 format) |
|
3268 | <li> "2006-12-06 13:18:29" (ISO 8601 format) | |
3269 | <li> "2006-12-6 13:18" |
|
3269 | <li> "2006-12-6 13:18" | |
3270 | <li> "2006-12-6" |
|
3270 | <li> "2006-12-6" | |
3271 | <li> "12-6" |
|
3271 | <li> "12-6" | |
3272 | <li> "12/6" |
|
3272 | <li> "12/6" | |
3273 | <li> "12/6/6" (Dec 6 2006) |
|
3273 | <li> "12/6/6" (Dec 6 2006) | |
3274 | <li> "today" (midnight) |
|
3274 | <li> "today" (midnight) | |
3275 | <li> "yesterday" (midnight) |
|
3275 | <li> "yesterday" (midnight) | |
3276 | <li> "now" - right now |
|
3276 | <li> "now" - right now | |
3277 | </ul> |
|
3277 | </ul> | |
3278 | <p> |
|
3278 | <p> | |
3279 | Lastly, there is Mercurial's internal format: |
|
3279 | Lastly, there is Mercurial's internal format: | |
3280 | </p> |
|
3280 | </p> | |
3281 | <ul> |
|
3281 | <ul> | |
3282 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
3282 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
3283 | </ul> |
|
3283 | </ul> | |
3284 | <p> |
|
3284 | <p> | |
3285 | This is the internal representation format for dates. The first number |
|
3285 | This is the internal representation format for dates. The first number | |
3286 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The |
|
3286 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The | |
3287 | second is the offset of the local timezone, in seconds west of UTC |
|
3287 | second is the offset of the local timezone, in seconds west of UTC | |
3288 | (negative if the timezone is east of UTC). |
|
3288 | (negative if the timezone is east of UTC). | |
3289 | </p> |
|
3289 | </p> | |
3290 | <p> |
|
3290 | <p> | |
3291 | The log command also accepts date ranges: |
|
3291 | The log command also accepts date ranges: | |
3292 | </p> |
|
3292 | </p> | |
3293 | <ul> |
|
3293 | <ul> | |
3294 | <li> "<DATE" - at or before a given date/time |
|
3294 | <li> "<DATE" - at or before a given date/time | |
3295 | <li> ">DATE" - on or after a given date/time |
|
3295 | <li> ">DATE" - on or after a given date/time | |
3296 | <li> "DATE to DATE" - a date range, inclusive |
|
3296 | <li> "DATE to DATE" - a date range, inclusive | |
3297 | <li> "-DAYS" - within a given number of days from today |
|
3297 | <li> "-DAYS" - within a given number of days from today | |
3298 | </ul> |
|
3298 | </ul> | |
3299 |
|
3299 | |||
3300 | </div> |
|
3300 | </div> | |
3301 | </div> |
|
3301 | </div> | |
3302 | </div> |
|
3302 | </div> | |
3303 |
|
3303 | |||
3304 |
|
3304 | |||
3305 |
|
3305 | |||
3306 | </body> |
|
3306 | </body> | |
3307 | </html> |
|
3307 | </html> | |
3308 |
|
3308 | |||
3309 |
|
3309 | |||
3310 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" |
|
3310 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" | |
3311 | 200 Script output follows |
|
3311 | 200 Script output follows | |
3312 |
|
3312 | |||
3313 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3313 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3314 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3314 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3315 | <head> |
|
3315 | <head> | |
3316 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3316 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3317 | <meta name="robots" content="index, nofollow" /> |
|
3317 | <meta name="robots" content="index, nofollow" /> | |
3318 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3318 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3319 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3319 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3320 |
|
3320 | |||
3321 | <title>Help: pager</title> |
|
3321 | <title>Help: pager</title> | |
3322 | </head> |
|
3322 | </head> | |
3323 | <body> |
|
3323 | <body> | |
3324 |
|
3324 | |||
3325 | <div class="container"> |
|
3325 | <div class="container"> | |
3326 | <div class="menu"> |
|
3326 | <div class="menu"> | |
3327 | <div class="logo"> |
|
3327 | <div class="logo"> | |
3328 | <a href="https://mercurial-scm.org/"> |
|
3328 | <a href="https://mercurial-scm.org/"> | |
3329 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3329 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3330 | </div> |
|
3330 | </div> | |
3331 | <ul> |
|
3331 | <ul> | |
3332 | <li><a href="/shortlog">log</a></li> |
|
3332 | <li><a href="/shortlog">log</a></li> | |
3333 | <li><a href="/graph">graph</a></li> |
|
3333 | <li><a href="/graph">graph</a></li> | |
3334 | <li><a href="/tags">tags</a></li> |
|
3334 | <li><a href="/tags">tags</a></li> | |
3335 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3335 | <li><a href="/bookmarks">bookmarks</a></li> | |
3336 | <li><a href="/branches">branches</a></li> |
|
3336 | <li><a href="/branches">branches</a></li> | |
3337 | </ul> |
|
3337 | </ul> | |
3338 | <ul> |
|
3338 | <ul> | |
3339 | <li class="active"><a href="/help">help</a></li> |
|
3339 | <li class="active"><a href="/help">help</a></li> | |
3340 | </ul> |
|
3340 | </ul> | |
3341 | </div> |
|
3341 | </div> | |
3342 |
|
3342 | |||
3343 | <div class="main"> |
|
3343 | <div class="main"> | |
3344 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3344 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3345 | <h3>Help: pager</h3> |
|
3345 | <h3>Help: pager</h3> | |
3346 |
|
3346 | |||
3347 | <form class="search" action="/log"> |
|
3347 | <form class="search" action="/log"> | |
3348 |
|
3348 | |||
3349 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3349 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3350 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3350 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3351 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3351 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3352 | </form> |
|
3352 | </form> | |
3353 | <div id="doc"> |
|
3353 | <div id="doc"> | |
3354 | <h1>Pager Support</h1> |
|
3354 | <h1>Pager Support</h1> | |
3355 | <p> |
|
3355 | <p> | |
3356 | Some Mercurial commands can produce a lot of output, and Mercurial will |
|
3356 | Some Mercurial commands can produce a lot of output, and Mercurial will | |
3357 | attempt to use a pager to make those commands more pleasant. |
|
3357 | attempt to use a pager to make those commands more pleasant. | |
3358 | </p> |
|
3358 | </p> | |
3359 | <p> |
|
3359 | <p> | |
3360 | To set the pager that should be used, set the application variable: |
|
3360 | To set the pager that should be used, set the application variable: | |
3361 | </p> |
|
3361 | </p> | |
3362 | <pre> |
|
3362 | <pre> | |
3363 | [pager] |
|
3363 | [pager] | |
3364 | pager = less -FRX |
|
3364 | pager = less -FRX | |
3365 | </pre> |
|
3365 | </pre> | |
3366 | <p> |
|
3366 | <p> | |
3367 | If no pager is set in the user or repository configuration, Mercurial uses the |
|
3367 | If no pager is set in the user or repository configuration, Mercurial uses the | |
3368 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default |
|
3368 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default | |
3369 | or system configuration is used. If none of these are set, a default pager will |
|
3369 | or system configuration is used. If none of these are set, a default pager will | |
3370 | be used, typically 'less' on Unix and 'more' on Windows. |
|
3370 | be used, typically 'less' on Unix and 'more' on Windows. | |
3371 | </p> |
|
3371 | </p> | |
3372 | <p> |
|
3372 | <p> | |
3373 | You can disable the pager for certain commands by adding them to the |
|
3373 | You can disable the pager for certain commands by adding them to the | |
3374 | pager.ignore list: |
|
3374 | pager.ignore list: | |
3375 | </p> |
|
3375 | </p> | |
3376 | <pre> |
|
3376 | <pre> | |
3377 | [pager] |
|
3377 | [pager] | |
3378 | ignore = version, help, update |
|
3378 | ignore = version, help, update | |
3379 | </pre> |
|
3379 | </pre> | |
3380 | <p> |
|
3380 | <p> | |
3381 | To ignore global commands like 'hg version' or 'hg help', you have |
|
3381 | To ignore global commands like 'hg version' or 'hg help', you have | |
3382 | to specify them in your user configuration file. |
|
3382 | to specify them in your user configuration file. | |
3383 | </p> |
|
3383 | </p> | |
3384 | <p> |
|
3384 | <p> | |
3385 | To control whether the pager is used at all for an individual command, |
|
3385 | To control whether the pager is used at all for an individual command, | |
3386 | you can use --pager=<value>: |
|
3386 | you can use --pager=<value>: | |
3387 | </p> |
|
3387 | </p> | |
3388 | <ul> |
|
3388 | <ul> | |
3389 | <li> use as needed: 'auto'. |
|
3389 | <li> use as needed: 'auto'. | |
3390 | <li> require the pager: 'yes' or 'on'. |
|
3390 | <li> require the pager: 'yes' or 'on'. | |
3391 | <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). |
|
3391 | <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). | |
3392 | </ul> |
|
3392 | </ul> | |
3393 | <p> |
|
3393 | <p> | |
3394 | To globally turn off all attempts to use a pager, set: |
|
3394 | To globally turn off all attempts to use a pager, set: | |
3395 | </p> |
|
3395 | </p> | |
3396 | <pre> |
|
3396 | <pre> | |
3397 | [ui] |
|
3397 | [ui] | |
3398 | paginate = never |
|
3398 | paginate = never | |
3399 | </pre> |
|
3399 | </pre> | |
3400 | <p> |
|
3400 | <p> | |
3401 | which will prevent the pager from running. |
|
3401 | which will prevent the pager from running. | |
3402 | </p> |
|
3402 | </p> | |
3403 |
|
3403 | |||
3404 | </div> |
|
3404 | </div> | |
3405 | </div> |
|
3405 | </div> | |
3406 | </div> |
|
3406 | </div> | |
3407 |
|
3407 | |||
3408 |
|
3408 | |||
3409 |
|
3409 | |||
3410 | </body> |
|
3410 | </body> | |
3411 | </html> |
|
3411 | </html> | |
3412 |
|
3412 | |||
3413 |
|
3413 | |||
3414 | Sub-topic indexes rendered properly |
|
3414 | Sub-topic indexes rendered properly | |
3415 |
|
3415 | |||
3416 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" |
|
3416 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" | |
3417 | 200 Script output follows |
|
3417 | 200 Script output follows | |
3418 |
|
3418 | |||
3419 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3419 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3420 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3420 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3421 | <head> |
|
3421 | <head> | |
3422 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3422 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3423 | <meta name="robots" content="index, nofollow" /> |
|
3423 | <meta name="robots" content="index, nofollow" /> | |
3424 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3424 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3425 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3425 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3426 |
|
3426 | |||
3427 | <title>Help: internals</title> |
|
3427 | <title>Help: internals</title> | |
3428 | </head> |
|
3428 | </head> | |
3429 | <body> |
|
3429 | <body> | |
3430 |
|
3430 | |||
3431 | <div class="container"> |
|
3431 | <div class="container"> | |
3432 | <div class="menu"> |
|
3432 | <div class="menu"> | |
3433 | <div class="logo"> |
|
3433 | <div class="logo"> | |
3434 | <a href="https://mercurial-scm.org/"> |
|
3434 | <a href="https://mercurial-scm.org/"> | |
3435 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3435 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3436 | </div> |
|
3436 | </div> | |
3437 | <ul> |
|
3437 | <ul> | |
3438 | <li><a href="/shortlog">log</a></li> |
|
3438 | <li><a href="/shortlog">log</a></li> | |
3439 | <li><a href="/graph">graph</a></li> |
|
3439 | <li><a href="/graph">graph</a></li> | |
3440 | <li><a href="/tags">tags</a></li> |
|
3440 | <li><a href="/tags">tags</a></li> | |
3441 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3441 | <li><a href="/bookmarks">bookmarks</a></li> | |
3442 | <li><a href="/branches">branches</a></li> |
|
3442 | <li><a href="/branches">branches</a></li> | |
3443 | </ul> |
|
3443 | </ul> | |
3444 | <ul> |
|
3444 | <ul> | |
3445 | <li><a href="/help">help</a></li> |
|
3445 | <li><a href="/help">help</a></li> | |
3446 | </ul> |
|
3446 | </ul> | |
3447 | </div> |
|
3447 | </div> | |
3448 |
|
3448 | |||
3449 | <div class="main"> |
|
3449 | <div class="main"> | |
3450 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3450 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3451 |
|
3451 | |||
3452 | <form class="search" action="/log"> |
|
3452 | <form class="search" action="/log"> | |
3453 |
|
3453 | |||
3454 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3454 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3455 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3455 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3456 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3456 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3457 | </form> |
|
3457 | </form> | |
3458 | <table class="bigtable"> |
|
3458 | <table class="bigtable"> | |
3459 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
3459 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
3460 |
|
3460 | |||
3461 | <tr><td> |
|
3461 | <tr><td> | |
3462 | <a href="/help/internals.bid-merge"> |
|
3462 | <a href="/help/internals.bid-merge"> | |
3463 | bid-merge |
|
3463 | bid-merge | |
3464 | </a> |
|
3464 | </a> | |
3465 | </td><td> |
|
3465 | </td><td> | |
3466 | Bid Merge Algorithm |
|
3466 | Bid Merge Algorithm | |
3467 | </td></tr> |
|
3467 | </td></tr> | |
3468 | <tr><td> |
|
3468 | <tr><td> | |
3469 | <a href="/help/internals.bundle2"> |
|
3469 | <a href="/help/internals.bundle2"> | |
3470 | bundle2 |
|
3470 | bundle2 | |
3471 | </a> |
|
3471 | </a> | |
3472 | </td><td> |
|
3472 | </td><td> | |
3473 | Bundle2 |
|
3473 | Bundle2 | |
3474 | </td></tr> |
|
3474 | </td></tr> | |
3475 | <tr><td> |
|
3475 | <tr><td> | |
3476 | <a href="/help/internals.bundles"> |
|
3476 | <a href="/help/internals.bundles"> | |
3477 | bundles |
|
3477 | bundles | |
3478 | </a> |
|
3478 | </a> | |
3479 | </td><td> |
|
3479 | </td><td> | |
3480 | Bundles |
|
3480 | Bundles | |
3481 | </td></tr> |
|
3481 | </td></tr> | |
3482 | <tr><td> |
|
3482 | <tr><td> | |
3483 | <a href="/help/internals.cbor"> |
|
3483 | <a href="/help/internals.cbor"> | |
3484 | cbor |
|
3484 | cbor | |
3485 | </a> |
|
3485 | </a> | |
3486 | </td><td> |
|
3486 | </td><td> | |
3487 | CBOR |
|
3487 | CBOR | |
3488 | </td></tr> |
|
3488 | </td></tr> | |
3489 | <tr><td> |
|
3489 | <tr><td> | |
3490 | <a href="/help/internals.censor"> |
|
3490 | <a href="/help/internals.censor"> | |
3491 | censor |
|
3491 | censor | |
3492 | </a> |
|
3492 | </a> | |
3493 | </td><td> |
|
3493 | </td><td> | |
3494 | Censor |
|
3494 | Censor | |
3495 | </td></tr> |
|
3495 | </td></tr> | |
3496 | <tr><td> |
|
3496 | <tr><td> | |
3497 | <a href="/help/internals.changegroups"> |
|
3497 | <a href="/help/internals.changegroups"> | |
3498 | changegroups |
|
3498 | changegroups | |
3499 | </a> |
|
3499 | </a> | |
3500 | </td><td> |
|
3500 | </td><td> | |
3501 | Changegroups |
|
3501 | Changegroups | |
3502 | </td></tr> |
|
3502 | </td></tr> | |
3503 | <tr><td> |
|
3503 | <tr><td> | |
3504 | <a href="/help/internals.config"> |
|
3504 | <a href="/help/internals.config"> | |
3505 | config |
|
3505 | config | |
3506 | </a> |
|
3506 | </a> | |
3507 | </td><td> |
|
3507 | </td><td> | |
3508 | Config Registrar |
|
3508 | Config Registrar | |
3509 | </td></tr> |
|
3509 | </td></tr> | |
3510 | <tr><td> |
|
3510 | <tr><td> | |
3511 | <a href="/help/internals.extensions"> |
|
3511 | <a href="/help/internals.extensions"> | |
3512 | extensions |
|
3512 | extensions | |
3513 | </a> |
|
3513 | </a> | |
3514 | </td><td> |
|
3514 | </td><td> | |
3515 | Extension API |
|
3515 | Extension API | |
3516 | </td></tr> |
|
3516 | </td></tr> | |
3517 | <tr><td> |
|
3517 | <tr><td> | |
3518 | <a href="/help/internals.mergestate"> |
|
3518 | <a href="/help/internals.mergestate"> | |
3519 | mergestate |
|
3519 | mergestate | |
3520 | </a> |
|
3520 | </a> | |
3521 | </td><td> |
|
3521 | </td><td> | |
3522 | Mergestate |
|
3522 | Mergestate | |
3523 | </td></tr> |
|
3523 | </td></tr> | |
3524 | <tr><td> |
|
3524 | <tr><td> | |
3525 | <a href="/help/internals.requirements"> |
|
3525 | <a href="/help/internals.requirements"> | |
3526 | requirements |
|
3526 | requirements | |
3527 | </a> |
|
3527 | </a> | |
3528 | </td><td> |
|
3528 | </td><td> | |
3529 | Repository Requirements |
|
3529 | Repository Requirements | |
3530 | </td></tr> |
|
3530 | </td></tr> | |
3531 | <tr><td> |
|
3531 | <tr><td> | |
3532 | <a href="/help/internals.revlogs"> |
|
3532 | <a href="/help/internals.revlogs"> | |
3533 | revlogs |
|
3533 | revlogs | |
3534 | </a> |
|
3534 | </a> | |
3535 | </td><td> |
|
3535 | </td><td> | |
3536 | Revision Logs |
|
3536 | Revision Logs | |
3537 | </td></tr> |
|
3537 | </td></tr> | |
3538 | <tr><td> |
|
3538 | <tr><td> | |
3539 | <a href="/help/internals.wireprotocol"> |
|
3539 | <a href="/help/internals.wireprotocol"> | |
3540 | wireprotocol |
|
3540 | wireprotocol | |
3541 | </a> |
|
3541 | </a> | |
3542 | </td><td> |
|
3542 | </td><td> | |
3543 | Wire Protocol |
|
3543 | Wire Protocol | |
3544 | </td></tr> |
|
3544 | </td></tr> | |
3545 | <tr><td> |
|
3545 | <tr><td> | |
3546 | <a href="/help/internals.wireprotocolrpc"> |
|
3546 | <a href="/help/internals.wireprotocolrpc"> | |
3547 | wireprotocolrpc |
|
3547 | wireprotocolrpc | |
3548 | </a> |
|
3548 | </a> | |
3549 | </td><td> |
|
3549 | </td><td> | |
3550 | Wire Protocol RPC |
|
3550 | Wire Protocol RPC | |
3551 | </td></tr> |
|
3551 | </td></tr> | |
3552 | <tr><td> |
|
3552 | <tr><td> | |
3553 | <a href="/help/internals.wireprotocolv2"> |
|
3553 | <a href="/help/internals.wireprotocolv2"> | |
3554 | wireprotocolv2 |
|
3554 | wireprotocolv2 | |
3555 | </a> |
|
3555 | </a> | |
3556 | </td><td> |
|
3556 | </td><td> | |
3557 | Wire Protocol Version 2 |
|
3557 | Wire Protocol Version 2 | |
3558 | </td></tr> |
|
3558 | </td></tr> | |
3559 |
|
3559 | |||
3560 |
|
3560 | |||
3561 |
|
3561 | |||
3562 |
|
3562 | |||
3563 |
|
3563 | |||
3564 | </table> |
|
3564 | </table> | |
3565 | </div> |
|
3565 | </div> | |
3566 | </div> |
|
3566 | </div> | |
3567 |
|
3567 | |||
3568 |
|
3568 | |||
3569 |
|
3569 | |||
3570 | </body> |
|
3570 | </body> | |
3571 | </html> |
|
3571 | </html> | |
3572 |
|
3572 | |||
3573 |
|
3573 | |||
3574 | Sub-topic topics rendered properly |
|
3574 | Sub-topic topics rendered properly | |
3575 |
|
3575 | |||
3576 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" |
|
3576 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" | |
3577 | 200 Script output follows |
|
3577 | 200 Script output follows | |
3578 |
|
3578 | |||
3579 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3579 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3580 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3580 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3581 | <head> |
|
3581 | <head> | |
3582 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3582 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3583 | <meta name="robots" content="index, nofollow" /> |
|
3583 | <meta name="robots" content="index, nofollow" /> | |
3584 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3584 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3585 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3585 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3586 |
|
3586 | |||
3587 | <title>Help: internals.changegroups</title> |
|
3587 | <title>Help: internals.changegroups</title> | |
3588 | </head> |
|
3588 | </head> | |
3589 | <body> |
|
3589 | <body> | |
3590 |
|
3590 | |||
3591 | <div class="container"> |
|
3591 | <div class="container"> | |
3592 | <div class="menu"> |
|
3592 | <div class="menu"> | |
3593 | <div class="logo"> |
|
3593 | <div class="logo"> | |
3594 | <a href="https://mercurial-scm.org/"> |
|
3594 | <a href="https://mercurial-scm.org/"> | |
3595 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3595 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3596 | </div> |
|
3596 | </div> | |
3597 | <ul> |
|
3597 | <ul> | |
3598 | <li><a href="/shortlog">log</a></li> |
|
3598 | <li><a href="/shortlog">log</a></li> | |
3599 | <li><a href="/graph">graph</a></li> |
|
3599 | <li><a href="/graph">graph</a></li> | |
3600 | <li><a href="/tags">tags</a></li> |
|
3600 | <li><a href="/tags">tags</a></li> | |
3601 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3601 | <li><a href="/bookmarks">bookmarks</a></li> | |
3602 | <li><a href="/branches">branches</a></li> |
|
3602 | <li><a href="/branches">branches</a></li> | |
3603 | </ul> |
|
3603 | </ul> | |
3604 | <ul> |
|
3604 | <ul> | |
3605 | <li class="active"><a href="/help">help</a></li> |
|
3605 | <li class="active"><a href="/help">help</a></li> | |
3606 | </ul> |
|
3606 | </ul> | |
3607 | </div> |
|
3607 | </div> | |
3608 |
|
3608 | |||
3609 | <div class="main"> |
|
3609 | <div class="main"> | |
3610 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3610 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3611 | <h3>Help: internals.changegroups</h3> |
|
3611 | <h3>Help: internals.changegroups</h3> | |
3612 |
|
3612 | |||
3613 | <form class="search" action="/log"> |
|
3613 | <form class="search" action="/log"> | |
3614 |
|
3614 | |||
3615 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3615 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3616 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3616 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3617 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3617 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3618 | </form> |
|
3618 | </form> | |
3619 | <div id="doc"> |
|
3619 | <div id="doc"> | |
3620 | <h1>Changegroups</h1> |
|
3620 | <h1>Changegroups</h1> | |
3621 | <p> |
|
3621 | <p> | |
3622 | Changegroups are representations of repository revlog data, specifically |
|
3622 | Changegroups are representations of repository revlog data, specifically | |
3623 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3623 | the changelog data, root/flat manifest data, treemanifest data, and | |
3624 | filelogs. |
|
3624 | filelogs. | |
3625 | </p> |
|
3625 | </p> | |
3626 | <p> |
|
3626 | <p> | |
3627 | There are 3 versions of changegroups: "1", "2", and "3". From a |
|
3627 | There are 3 versions of changegroups: "1", "2", and "3". From a | |
3628 | high-level, versions "1" and "2" are almost exactly the same, with the |
|
3628 | high-level, versions "1" and "2" are almost exactly the same, with the | |
3629 | only difference being an additional item in the *delta header*. Version |
|
3629 | only difference being an additional item in the *delta header*. Version | |
3630 | "3" adds support for storage flags in the *delta header* and optionally |
|
3630 | "3" adds support for storage flags in the *delta header* and optionally | |
3631 | exchanging treemanifests (enabled by setting an option on the |
|
3631 | exchanging treemanifests (enabled by setting an option on the | |
3632 | "changegroup" part in the bundle2). |
|
3632 | "changegroup" part in the bundle2). | |
3633 | </p> |
|
3633 | </p> | |
3634 | <p> |
|
3634 | <p> | |
3635 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
3635 | Changegroups when not exchanging treemanifests consist of 3 logical | |
3636 | segments: |
|
3636 | segments: | |
3637 | </p> |
|
3637 | </p> | |
3638 | <pre> |
|
3638 | <pre> | |
3639 | +---------------------------------+ |
|
3639 | +---------------------------------+ | |
3640 | | | | | |
|
3640 | | | | | | |
3641 | | changeset | manifest | filelogs | |
|
3641 | | changeset | manifest | filelogs | | |
3642 | | | | | |
|
3642 | | | | | | |
3643 | | | | | |
|
3643 | | | | | | |
3644 | +---------------------------------+ |
|
3644 | +---------------------------------+ | |
3645 | </pre> |
|
3645 | </pre> | |
3646 | <p> |
|
3646 | <p> | |
3647 | When exchanging treemanifests, there are 4 logical segments: |
|
3647 | When exchanging treemanifests, there are 4 logical segments: | |
3648 | </p> |
|
3648 | </p> | |
3649 | <pre> |
|
3649 | <pre> | |
3650 | +-------------------------------------------------+ |
|
3650 | +-------------------------------------------------+ | |
3651 | | | | | | |
|
3651 | | | | | | | |
3652 | | changeset | root | treemanifests | filelogs | |
|
3652 | | changeset | root | treemanifests | filelogs | | |
3653 | | | manifest | | | |
|
3653 | | | manifest | | | | |
3654 | | | | | | |
|
3654 | | | | | | | |
3655 | +-------------------------------------------------+ |
|
3655 | +-------------------------------------------------+ | |
3656 | </pre> |
|
3656 | </pre> | |
3657 | <p> |
|
3657 | <p> | |
3658 | The principle building block of each segment is a *chunk*. A *chunk* |
|
3658 | The principle building block of each segment is a *chunk*. A *chunk* | |
3659 | is a framed piece of data: |
|
3659 | is a framed piece of data: | |
3660 | </p> |
|
3660 | </p> | |
3661 | <pre> |
|
3661 | <pre> | |
3662 | +---------------------------------------+ |
|
3662 | +---------------------------------------+ | |
3663 | | | | |
|
3663 | | | | | |
3664 | | length | data | |
|
3664 | | length | data | | |
3665 | | (4 bytes) | (<length - 4> bytes) | |
|
3665 | | (4 bytes) | (<length - 4> bytes) | | |
3666 | | | | |
|
3666 | | | | | |
3667 | +---------------------------------------+ |
|
3667 | +---------------------------------------+ | |
3668 | </pre> |
|
3668 | </pre> | |
3669 | <p> |
|
3669 | <p> | |
3670 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
3670 | All integers are big-endian signed integers. Each chunk starts with a 32-bit | |
3671 | integer indicating the length of the entire chunk (including the length field |
|
3671 | integer indicating the length of the entire chunk (including the length field | |
3672 | itself). |
|
3672 | itself). | |
3673 | </p> |
|
3673 | </p> | |
3674 | <p> |
|
3674 | <p> | |
3675 | There is a special case chunk that has a value of 0 for the length |
|
3675 | There is a special case chunk that has a value of 0 for the length | |
3676 | ("0x00000000"). We call this an *empty chunk*. |
|
3676 | ("0x00000000"). We call this an *empty chunk*. | |
3677 | </p> |
|
3677 | </p> | |
3678 | <h2>Delta Groups</h2> |
|
3678 | <h2>Delta Groups</h2> | |
3679 | <p> |
|
3679 | <p> | |
3680 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
3680 | A *delta group* expresses the content of a revlog as a series of deltas, | |
3681 | or patches against previous revisions. |
|
3681 | or patches against previous revisions. | |
3682 | </p> |
|
3682 | </p> | |
3683 | <p> |
|
3683 | <p> | |
3684 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
3684 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
3685 | to signal the end of the delta group: |
|
3685 | to signal the end of the delta group: | |
3686 | </p> |
|
3686 | </p> | |
3687 | <pre> |
|
3687 | <pre> | |
3688 | +------------------------------------------------------------------------+ |
|
3688 | +------------------------------------------------------------------------+ | |
3689 | | | | | | | |
|
3689 | | | | | | | | |
3690 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
3690 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
3691 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
3691 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
3692 | | | | | | | |
|
3692 | | | | | | | | |
3693 | +------------------------------------------------------------------------+ |
|
3693 | +------------------------------------------------------------------------+ | |
3694 | </pre> |
|
3694 | </pre> | |
3695 | <p> |
|
3695 | <p> | |
3696 | Each *chunk*'s data consists of the following: |
|
3696 | Each *chunk*'s data consists of the following: | |
3697 | </p> |
|
3697 | </p> | |
3698 | <pre> |
|
3698 | <pre> | |
3699 | +---------------------------------------+ |
|
3699 | +---------------------------------------+ | |
3700 | | | | |
|
3700 | | | | | |
3701 | | delta header | delta data | |
|
3701 | | delta header | delta data | | |
3702 | | (various by version) | (various) | |
|
3702 | | (various by version) | (various) | | |
3703 | | | | |
|
3703 | | | | | |
3704 | +---------------------------------------+ |
|
3704 | +---------------------------------------+ | |
3705 | </pre> |
|
3705 | </pre> | |
3706 | <p> |
|
3706 | <p> | |
3707 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
3707 | The *delta data* is a series of *delta*s that describe a diff from an existing | |
3708 | entry (either that the recipient already has, or previously specified in the |
|
3708 | entry (either that the recipient already has, or previously specified in the | |
3709 | bundle/changegroup). |
|
3709 | bundle/changegroup). | |
3710 | </p> |
|
3710 | </p> | |
3711 | <p> |
|
3711 | <p> | |
3712 | The *delta header* is different between versions "1", "2", and |
|
3712 | The *delta header* is different between versions "1", "2", and | |
3713 | "3" of the changegroup format. |
|
3713 | "3" of the changegroup format. | |
3714 | </p> |
|
3714 | </p> | |
3715 | <p> |
|
3715 | <p> | |
3716 | Version 1 (headerlen=80): |
|
3716 | Version 1 (headerlen=80): | |
3717 | </p> |
|
3717 | </p> | |
3718 | <pre> |
|
3718 | <pre> | |
3719 | +------------------------------------------------------+ |
|
3719 | +------------------------------------------------------+ | |
3720 | | | | | | |
|
3720 | | | | | | | |
3721 | | node | p1 node | p2 node | link node | |
|
3721 | | node | p1 node | p2 node | link node | | |
3722 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3722 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3723 | | | | | | |
|
3723 | | | | | | | |
3724 | +------------------------------------------------------+ |
|
3724 | +------------------------------------------------------+ | |
3725 | </pre> |
|
3725 | </pre> | |
3726 | <p> |
|
3726 | <p> | |
3727 | Version 2 (headerlen=100): |
|
3727 | Version 2 (headerlen=100): | |
3728 | </p> |
|
3728 | </p> | |
3729 | <pre> |
|
3729 | <pre> | |
3730 | +------------------------------------------------------------------+ |
|
3730 | +------------------------------------------------------------------+ | |
3731 | | | | | | | |
|
3731 | | | | | | | | |
3732 | | node | p1 node | p2 node | base node | link node | |
|
3732 | | node | p1 node | p2 node | base node | link node | | |
3733 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3733 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3734 | | | | | | | |
|
3734 | | | | | | | | |
3735 | +------------------------------------------------------------------+ |
|
3735 | +------------------------------------------------------------------+ | |
3736 | </pre> |
|
3736 | </pre> | |
3737 | <p> |
|
3737 | <p> | |
3738 | Version 3 (headerlen=102): |
|
3738 | Version 3 (headerlen=102): | |
3739 | </p> |
|
3739 | </p> | |
3740 | <pre> |
|
3740 | <pre> | |
3741 | +------------------------------------------------------------------------------+ |
|
3741 | +------------------------------------------------------------------------------+ | |
3742 | | | | | | | | |
|
3742 | | | | | | | | | |
3743 | | node | p1 node | p2 node | base node | link node | flags | |
|
3743 | | node | p1 node | p2 node | base node | link node | flags | | |
3744 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
3744 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
3745 | | | | | | | | |
|
3745 | | | | | | | | | |
3746 | +------------------------------------------------------------------------------+ |
|
3746 | +------------------------------------------------------------------------------+ | |
3747 | </pre> |
|
3747 | </pre> | |
3748 | <p> |
|
3748 | <p> | |
3749 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a |
|
3749 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a | |
3750 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
3750 | series of *delta*s, densely packed (no separators). These deltas describe a diff | |
3751 | from an existing entry (either that the recipient already has, or previously |
|
3751 | from an existing entry (either that the recipient already has, or previously | |
3752 | specified in the bundle/changegroup). The format is described more fully in |
|
3752 | specified in the bundle/changegroup). The format is described more fully in | |
3753 | "hg help internals.bdiff", but briefly: |
|
3753 | "hg help internals.bdiff", but briefly: | |
3754 | </p> |
|
3754 | </p> | |
3755 | <pre> |
|
3755 | <pre> | |
3756 | +---------------------------------------------------------------+ |
|
3756 | +---------------------------------------------------------------+ | |
3757 | | | | | | |
|
3757 | | | | | | | |
3758 | | start offset | end offset | new length | content | |
|
3758 | | start offset | end offset | new length | content | | |
3759 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
3759 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
3760 | | | | | | |
|
3760 | | | | | | | |
3761 | +---------------------------------------------------------------+ |
|
3761 | +---------------------------------------------------------------+ | |
3762 | </pre> |
|
3762 | </pre> | |
3763 | <p> |
|
3763 | <p> | |
3764 | Please note that the length field in the delta data does *not* include itself. |
|
3764 | Please note that the length field in the delta data does *not* include itself. | |
3765 | </p> |
|
3765 | </p> | |
3766 | <p> |
|
3766 | <p> | |
3767 | In version 1, the delta is always applied against the previous node from |
|
3767 | In version 1, the delta is always applied against the previous node from | |
3768 | the changegroup or the first parent if this is the first entry in the |
|
3768 | the changegroup or the first parent if this is the first entry in the | |
3769 | changegroup. |
|
3769 | changegroup. | |
3770 | </p> |
|
3770 | </p> | |
3771 | <p> |
|
3771 | <p> | |
3772 | In version 2 and up, the delta base node is encoded in the entry in the |
|
3772 | In version 2 and up, the delta base node is encoded in the entry in the | |
3773 | changegroup. This allows the delta to be expressed against any parent, |
|
3773 | changegroup. This allows the delta to be expressed against any parent, | |
3774 | which can result in smaller deltas and more efficient encoding of data. |
|
3774 | which can result in smaller deltas and more efficient encoding of data. | |
3775 | </p> |
|
3775 | </p> | |
3776 | <p> |
|
3776 | <p> | |
3777 | The *flags* field holds bitwise flags affecting the processing of revision |
|
3777 | The *flags* field holds bitwise flags affecting the processing of revision | |
3778 | data. The following flags are defined: |
|
3778 | data. The following flags are defined: | |
3779 | </p> |
|
3779 | </p> | |
3780 | <dl> |
|
3780 | <dl> | |
3781 | <dt>32768 |
|
3781 | <dt>32768 | |
3782 | <dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions. |
|
3782 | <dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions. | |
3783 | <dt>16384 |
|
3783 | <dt>16384 | |
3784 | <dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents). |
|
3784 | <dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents). | |
3785 | <dt>8192 |
|
3785 | <dt>8192 | |
3786 | <dd>Externally stored. The revision fulltext contains "key:value" "\n" delimited metadata defining an object stored elsewhere. Used by the LFS extension. |
|
3786 | <dd>Externally stored. The revision fulltext contains "key:value" "\n" delimited metadata defining an object stored elsewhere. Used by the LFS extension. | |
3787 | </dl> |
|
3787 | </dl> | |
3788 | <p> |
|
3788 | <p> | |
3789 | For historical reasons, the integer values are identical to revlog version 1 |
|
3789 | For historical reasons, the integer values are identical to revlog version 1 | |
3790 | per-revision storage flags and correspond to bits being set in this 2-byte |
|
3790 | per-revision storage flags and correspond to bits being set in this 2-byte | |
3791 | field. Bits were allocated starting from the most-significant bit, hence the |
|
3791 | field. Bits were allocated starting from the most-significant bit, hence the | |
3792 | reverse ordering and allocation of these flags. |
|
3792 | reverse ordering and allocation of these flags. | |
3793 | </p> |
|
3793 | </p> | |
3794 | <h2>Changeset Segment</h2> |
|
3794 | <h2>Changeset Segment</h2> | |
3795 | <p> |
|
3795 | <p> | |
3796 | The *changeset segment* consists of a single *delta group* holding |
|
3796 | The *changeset segment* consists of a single *delta group* holding | |
3797 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
3797 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
3798 | the boundary to the *manifest segment*. |
|
3798 | the boundary to the *manifest segment*. | |
3799 | </p> |
|
3799 | </p> | |
3800 | <h2>Manifest Segment</h2> |
|
3800 | <h2>Manifest Segment</h2> | |
3801 | <p> |
|
3801 | <p> | |
3802 | The *manifest segment* consists of a single *delta group* holding manifest |
|
3802 | The *manifest segment* consists of a single *delta group* holding manifest | |
3803 | data. If treemanifests are in use, it contains only the manifest for the |
|
3803 | data. If treemanifests are in use, it contains only the manifest for the | |
3804 | root directory of the repository. Otherwise, it contains the entire |
|
3804 | root directory of the repository. Otherwise, it contains the entire | |
3805 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
3805 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
3806 | the boundary to the next segment (either the *treemanifests segment* or the |
|
3806 | the boundary to the next segment (either the *treemanifests segment* or the | |
3807 | *filelogs segment*, depending on version and the request options). |
|
3807 | *filelogs segment*, depending on version and the request options). | |
3808 | </p> |
|
3808 | </p> | |
3809 | <h3>Treemanifests Segment</h3> |
|
3809 | <h3>Treemanifests Segment</h3> | |
3810 | <p> |
|
3810 | <p> | |
3811 | The *treemanifests segment* only exists in changegroup version "3", and |
|
3811 | The *treemanifests segment* only exists in changegroup version "3", and | |
3812 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
3812 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
3813 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
3813 | (it is not possible to use changegroup version 3 outside of bundle2). | |
3814 | Aside from the filenames in the *treemanifests segment* containing a |
|
3814 | Aside from the filenames in the *treemanifests segment* containing a | |
3815 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
3815 | trailing "/" character, it behaves identically to the *filelogs segment* | |
3816 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
3816 | (see below). The final sub-segment is followed by an *empty chunk* (logically, | |
3817 | a sub-segment with filename size 0). This denotes the boundary to the |
|
3817 | a sub-segment with filename size 0). This denotes the boundary to the | |
3818 | *filelogs segment*. |
|
3818 | *filelogs segment*. | |
3819 | </p> |
|
3819 | </p> | |
3820 | <h2>Filelogs Segment</h2> |
|
3820 | <h2>Filelogs Segment</h2> | |
3821 | <p> |
|
3821 | <p> | |
3822 | The *filelogs segment* consists of multiple sub-segments, each |
|
3822 | The *filelogs segment* consists of multiple sub-segments, each | |
3823 | corresponding to an individual file whose data is being described: |
|
3823 | corresponding to an individual file whose data is being described: | |
3824 | </p> |
|
3824 | </p> | |
3825 | <pre> |
|
3825 | <pre> | |
3826 | +--------------------------------------------------+ |
|
3826 | +--------------------------------------------------+ | |
3827 | | | | | | | |
|
3827 | | | | | | | | |
3828 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
3828 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
3829 | | | | | | (4 bytes) | |
|
3829 | | | | | | (4 bytes) | | |
3830 | | | | | | | |
|
3830 | | | | | | | | |
3831 | +--------------------------------------------------+ |
|
3831 | +--------------------------------------------------+ | |
3832 | </pre> |
|
3832 | </pre> | |
3833 | <p> |
|
3833 | <p> | |
3834 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
3834 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
3835 | a sub-segment with filename size 0). This denotes the end of the segment |
|
3835 | a sub-segment with filename size 0). This denotes the end of the segment | |
3836 | and of the overall changegroup. |
|
3836 | and of the overall changegroup. | |
3837 | </p> |
|
3837 | </p> | |
3838 | <p> |
|
3838 | <p> | |
3839 | Each filelog sub-segment consists of the following: |
|
3839 | Each filelog sub-segment consists of the following: | |
3840 | </p> |
|
3840 | </p> | |
3841 | <pre> |
|
3841 | <pre> | |
3842 | +------------------------------------------------------+ |
|
3842 | +------------------------------------------------------+ | |
3843 | | | | | |
|
3843 | | | | | | |
3844 | | filename length | filename | delta group | |
|
3844 | | filename length | filename | delta group | | |
3845 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
3845 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
3846 | | | | | |
|
3846 | | | | | | |
3847 | +------------------------------------------------------+ |
|
3847 | +------------------------------------------------------+ | |
3848 | </pre> |
|
3848 | </pre> | |
3849 | <p> |
|
3849 | <p> | |
3850 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
3850 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
3851 | followed by N chunks constituting the *delta group* for this file. The |
|
3851 | followed by N chunks constituting the *delta group* for this file. The | |
3852 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
3852 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
3853 | next filelog sub-segment. |
|
3853 | next filelog sub-segment. | |
3854 | </p> |
|
3854 | </p> | |
3855 |
|
3855 | |||
3856 | </div> |
|
3856 | </div> | |
3857 | </div> |
|
3857 | </div> | |
3858 | </div> |
|
3858 | </div> | |
3859 |
|
3859 | |||
3860 |
|
3860 | |||
3861 |
|
3861 | |||
3862 | </body> |
|
3862 | </body> | |
3863 | </html> |
|
3863 | </html> | |
3864 |
|
3864 | |||
3865 |
|
3865 | |||
3866 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" |
|
3866 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" | |
3867 | 404 Not Found |
|
3867 | 404 Not Found | |
3868 |
|
3868 | |||
3869 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3869 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3870 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3870 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3871 | <head> |
|
3871 | <head> | |
3872 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3872 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3873 | <meta name="robots" content="index, nofollow" /> |
|
3873 | <meta name="robots" content="index, nofollow" /> | |
3874 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3874 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3875 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3875 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3876 |
|
3876 | |||
3877 | <title>test: error</title> |
|
3877 | <title>test: error</title> | |
3878 | </head> |
|
3878 | </head> | |
3879 | <body> |
|
3879 | <body> | |
3880 |
|
3880 | |||
3881 | <div class="container"> |
|
3881 | <div class="container"> | |
3882 | <div class="menu"> |
|
3882 | <div class="menu"> | |
3883 | <div class="logo"> |
|
3883 | <div class="logo"> | |
3884 | <a href="https://mercurial-scm.org/"> |
|
3884 | <a href="https://mercurial-scm.org/"> | |
3885 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
3885 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
3886 | </div> |
|
3886 | </div> | |
3887 | <ul> |
|
3887 | <ul> | |
3888 | <li><a href="/shortlog">log</a></li> |
|
3888 | <li><a href="/shortlog">log</a></li> | |
3889 | <li><a href="/graph">graph</a></li> |
|
3889 | <li><a href="/graph">graph</a></li> | |
3890 | <li><a href="/tags">tags</a></li> |
|
3890 | <li><a href="/tags">tags</a></li> | |
3891 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3891 | <li><a href="/bookmarks">bookmarks</a></li> | |
3892 | <li><a href="/branches">branches</a></li> |
|
3892 | <li><a href="/branches">branches</a></li> | |
3893 | </ul> |
|
3893 | </ul> | |
3894 | <ul> |
|
3894 | <ul> | |
3895 | <li><a href="/help">help</a></li> |
|
3895 | <li><a href="/help">help</a></li> | |
3896 | </ul> |
|
3896 | </ul> | |
3897 | </div> |
|
3897 | </div> | |
3898 |
|
3898 | |||
3899 | <div class="main"> |
|
3899 | <div class="main"> | |
3900 |
|
3900 | |||
3901 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3901 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3902 | <h3>error</h3> |
|
3902 | <h3>error</h3> | |
3903 |
|
3903 | |||
3904 |
|
3904 | |||
3905 | <form class="search" action="/log"> |
|
3905 | <form class="search" action="/log"> | |
3906 |
|
3906 | |||
3907 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3907 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3908 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3908 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3909 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3909 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3910 | </form> |
|
3910 | </form> | |
3911 |
|
3911 | |||
3912 | <div class="description"> |
|
3912 | <div class="description"> | |
3913 | <p> |
|
3913 | <p> | |
3914 | An error occurred while processing your request: |
|
3914 | An error occurred while processing your request: | |
3915 | </p> |
|
3915 | </p> | |
3916 | <p> |
|
3916 | <p> | |
3917 | Not Found |
|
3917 | Not Found | |
3918 | </p> |
|
3918 | </p> | |
3919 | </div> |
|
3919 | </div> | |
3920 | </div> |
|
3920 | </div> | |
3921 | </div> |
|
3921 | </div> | |
3922 |
|
3922 | |||
3923 |
|
3923 | |||
3924 |
|
3924 | |||
3925 | </body> |
|
3925 | </body> | |
3926 | </html> |
|
3926 | </html> | |
3927 |
|
3927 | |||
3928 | [1] |
|
3928 | [1] | |
3929 |
|
3929 | |||
3930 | $ killdaemons.py |
|
3930 | $ killdaemons.py | |
3931 |
|
3931 | |||
3932 | #endif |
|
3932 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now