##// END OF EJS Templates
help: also hide options marked EXPERIMENTAL...
Siddharth Agarwal -
r24871:117b9a10 stable
parent child Browse files
Show More
@@ -1,515 +1,517 b''
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 i18n import gettext, _
8 from i18n import gettext, _
9 import itertools, os, textwrap
9 import itertools, os, textwrap
10 import error
10 import error
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
12 import templater
12 import templater
13 import encoding, util, minirst
13 import encoding, util, minirst
14 import cmdutil
14 import cmdutil
15 import hgweb.webcommands as webcommands
15 import hgweb.webcommands as webcommands
16
16
17 def listexts(header, exts, indent=1, showdeprecated=False):
17 def listexts(header, exts, indent=1, showdeprecated=False):
18 '''return a text listing of the given extensions'''
18 '''return a text listing of the given extensions'''
19 rst = []
19 rst = []
20 if exts:
20 if exts:
21 rst.append('\n%s\n\n' % header)
21 rst.append('\n%s\n\n' % header)
22 for name, desc in sorted(exts.iteritems()):
22 for name, desc in sorted(exts.iteritems()):
23 if '(DEPRECATED)' in desc and not showdeprecated:
23 if '(DEPRECATED)' in desc and not showdeprecated:
24 continue
24 continue
25 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
25 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
26 return rst
26 return rst
27
27
28 def extshelp():
28 def extshelp():
29 rst = loaddoc('extensions')().splitlines(True)
29 rst = loaddoc('extensions')().splitlines(True)
30 rst.extend(listexts(
30 rst.extend(listexts(
31 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
31 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
32 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
32 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
33 doc = ''.join(rst)
33 doc = ''.join(rst)
34 return doc
34 return doc
35
35
36 def optrst(header, options, verbose):
36 def optrst(header, options, verbose):
37 data = []
37 data = []
38 multioccur = False
38 multioccur = False
39 for option in options:
39 for option in options:
40 if len(option) == 5:
40 if len(option) == 5:
41 shortopt, longopt, default, desc, optlabel = option
41 shortopt, longopt, default, desc, optlabel = option
42 else:
42 else:
43 shortopt, longopt, default, desc = option
43 shortopt, longopt, default, desc = option
44 optlabel = _("VALUE") # default label
44 optlabel = _("VALUE") # default label
45
45
46 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc):
46 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc or
47 "EXPERIMENTAL" in desc or
48 _("EXPERIMENTAL") in desc):
47 continue
49 continue
48
50
49 so = ''
51 so = ''
50 if shortopt:
52 if shortopt:
51 so = '-' + shortopt
53 so = '-' + shortopt
52 lo = '--' + longopt
54 lo = '--' + longopt
53 if default:
55 if default:
54 desc += _(" (default: %s)") % default
56 desc += _(" (default: %s)") % default
55
57
56 if isinstance(default, list):
58 if isinstance(default, list):
57 lo += " %s [+]" % optlabel
59 lo += " %s [+]" % optlabel
58 multioccur = True
60 multioccur = True
59 elif (default is not None) and not isinstance(default, bool):
61 elif (default is not None) and not isinstance(default, bool):
60 lo += " %s" % optlabel
62 lo += " %s" % optlabel
61
63
62 data.append((so, lo, desc))
64 data.append((so, lo, desc))
63
65
64 if multioccur:
66 if multioccur:
65 header += (_(" ([+] can be repeated)"))
67 header += (_(" ([+] can be repeated)"))
66
68
67 rst = ['\n%s:\n\n' % header]
69 rst = ['\n%s:\n\n' % header]
68 rst.extend(minirst.maketable(data, 1))
70 rst.extend(minirst.maketable(data, 1))
69
71
70 return ''.join(rst)
72 return ''.join(rst)
71
73
72 def indicateomitted(rst, omitted, notomitted=None):
74 def indicateomitted(rst, omitted, notomitted=None):
73 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
75 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
74 if notomitted:
76 if notomitted:
75 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
77 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
76
78
77 def topicmatch(kw):
79 def topicmatch(kw):
78 """Return help topics matching kw.
80 """Return help topics matching kw.
79
81
80 Returns {'section': [(name, summary), ...], ...} where section is
82 Returns {'section': [(name, summary), ...], ...} where section is
81 one of topics, commands, extensions, or extensioncommands.
83 one of topics, commands, extensions, or extensioncommands.
82 """
84 """
83 kw = encoding.lower(kw)
85 kw = encoding.lower(kw)
84 def lowercontains(container):
86 def lowercontains(container):
85 return kw in encoding.lower(container) # translated in helptable
87 return kw in encoding.lower(container) # translated in helptable
86 results = {'topics': [],
88 results = {'topics': [],
87 'commands': [],
89 'commands': [],
88 'extensions': [],
90 'extensions': [],
89 'extensioncommands': [],
91 'extensioncommands': [],
90 }
92 }
91 for names, header, doc in helptable:
93 for names, header, doc in helptable:
92 # Old extensions may use a str as doc.
94 # Old extensions may use a str as doc.
93 if (sum(map(lowercontains, names))
95 if (sum(map(lowercontains, names))
94 or lowercontains(header)
96 or lowercontains(header)
95 or (callable(doc) and lowercontains(doc()))):
97 or (callable(doc) and lowercontains(doc()))):
96 results['topics'].append((names[0], header))
98 results['topics'].append((names[0], header))
97 import commands # avoid cycle
99 import commands # avoid cycle
98 for cmd, entry in commands.table.iteritems():
100 for cmd, entry in commands.table.iteritems():
99 if len(entry) == 3:
101 if len(entry) == 3:
100 summary = entry[2]
102 summary = entry[2]
101 else:
103 else:
102 summary = ''
104 summary = ''
103 # translate docs *before* searching there
105 # translate docs *before* searching there
104 docs = _(getattr(entry[0], '__doc__', None)) or ''
106 docs = _(getattr(entry[0], '__doc__', None)) or ''
105 if kw in cmd or lowercontains(summary) or lowercontains(docs):
107 if kw in cmd or lowercontains(summary) or lowercontains(docs):
106 doclines = docs.splitlines()
108 doclines = docs.splitlines()
107 if doclines:
109 if doclines:
108 summary = doclines[0]
110 summary = doclines[0]
109 cmdname = cmd.split('|')[0].lstrip('^')
111 cmdname = cmd.split('|')[0].lstrip('^')
110 results['commands'].append((cmdname, summary))
112 results['commands'].append((cmdname, summary))
111 for name, docs in itertools.chain(
113 for name, docs in itertools.chain(
112 extensions.enabled(False).iteritems(),
114 extensions.enabled(False).iteritems(),
113 extensions.disabled().iteritems()):
115 extensions.disabled().iteritems()):
114 # extensions.load ignores the UI argument
116 # extensions.load ignores the UI argument
115 mod = extensions.load(None, name, '')
117 mod = extensions.load(None, name, '')
116 name = name.split('.')[-1]
118 name = name.split('.')[-1]
117 if lowercontains(name) or lowercontains(docs):
119 if lowercontains(name) or lowercontains(docs):
118 # extension docs are already translated
120 # extension docs are already translated
119 results['extensions'].append((name, docs.splitlines()[0]))
121 results['extensions'].append((name, docs.splitlines()[0]))
120 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
122 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
121 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
123 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
122 cmdname = cmd.split('|')[0].lstrip('^')
124 cmdname = cmd.split('|')[0].lstrip('^')
123 if entry[0].__doc__:
125 if entry[0].__doc__:
124 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
126 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
125 else:
127 else:
126 cmddoc = _('(no help text available)')
128 cmddoc = _('(no help text available)')
127 results['extensioncommands'].append((cmdname, cmddoc))
129 results['extensioncommands'].append((cmdname, cmddoc))
128 return results
130 return results
129
131
130 def loaddoc(topic):
132 def loaddoc(topic):
131 """Return a delayed loader for help/topic.txt."""
133 """Return a delayed loader for help/topic.txt."""
132
134
133 def loader():
135 def loader():
134 docdir = os.path.join(util.datapath, 'help')
136 docdir = os.path.join(util.datapath, 'help')
135 path = os.path.join(docdir, topic + ".txt")
137 path = os.path.join(docdir, topic + ".txt")
136 doc = gettext(util.readfile(path))
138 doc = gettext(util.readfile(path))
137 for rewriter in helphooks.get(topic, []):
139 for rewriter in helphooks.get(topic, []):
138 doc = rewriter(topic, doc)
140 doc = rewriter(topic, doc)
139 return doc
141 return doc
140
142
141 return loader
143 return loader
142
144
143 helptable = sorted([
145 helptable = sorted([
144 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
146 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
145 (["dates"], _("Date Formats"), loaddoc('dates')),
147 (["dates"], _("Date Formats"), loaddoc('dates')),
146 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
148 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
147 (['environment', 'env'], _('Environment Variables'),
149 (['environment', 'env'], _('Environment Variables'),
148 loaddoc('environment')),
150 loaddoc('environment')),
149 (['revisions', 'revs'], _('Specifying Single Revisions'),
151 (['revisions', 'revs'], _('Specifying Single Revisions'),
150 loaddoc('revisions')),
152 loaddoc('revisions')),
151 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
153 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
152 loaddoc('multirevs')),
154 loaddoc('multirevs')),
153 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
155 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
154 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
156 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
155 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
157 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
156 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
158 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
157 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
159 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
158 loaddoc('templates')),
160 loaddoc('templates')),
159 (['urls'], _('URL Paths'), loaddoc('urls')),
161 (['urls'], _('URL Paths'), loaddoc('urls')),
160 (["extensions"], _("Using Additional Features"), extshelp),
162 (["extensions"], _("Using Additional Features"), extshelp),
161 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
163 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
162 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
164 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
163 (["glossary"], _("Glossary"), loaddoc('glossary')),
165 (["glossary"], _("Glossary"), loaddoc('glossary')),
164 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
166 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
165 loaddoc('hgignore')),
167 loaddoc('hgignore')),
166 (["phases"], _("Working with Phases"), loaddoc('phases')),
168 (["phases"], _("Working with Phases"), loaddoc('phases')),
167 ])
169 ])
168
170
169 # Map topics to lists of callable taking the current topic help and
171 # Map topics to lists of callable taking the current topic help and
170 # returning the updated version
172 # returning the updated version
171 helphooks = {}
173 helphooks = {}
172
174
173 def addtopichook(topic, rewriter):
175 def addtopichook(topic, rewriter):
174 helphooks.setdefault(topic, []).append(rewriter)
176 helphooks.setdefault(topic, []).append(rewriter)
175
177
176 def makeitemsdoc(topic, doc, marker, items, dedent=False):
178 def makeitemsdoc(topic, doc, marker, items, dedent=False):
177 """Extract docstring from the items key to function mapping, build a
179 """Extract docstring from the items key to function mapping, build a
178 .single documentation block and use it to overwrite the marker in doc
180 .single documentation block and use it to overwrite the marker in doc
179 """
181 """
180 entries = []
182 entries = []
181 for name in sorted(items):
183 for name in sorted(items):
182 text = (items[name].__doc__ or '').rstrip()
184 text = (items[name].__doc__ or '').rstrip()
183 if not text:
185 if not text:
184 continue
186 continue
185 text = gettext(text)
187 text = gettext(text)
186 if dedent:
188 if dedent:
187 text = textwrap.dedent(text)
189 text = textwrap.dedent(text)
188 lines = text.splitlines()
190 lines = text.splitlines()
189 doclines = [(lines[0])]
191 doclines = [(lines[0])]
190 for l in lines[1:]:
192 for l in lines[1:]:
191 # Stop once we find some Python doctest
193 # Stop once we find some Python doctest
192 if l.strip().startswith('>>>'):
194 if l.strip().startswith('>>>'):
193 break
195 break
194 if dedent:
196 if dedent:
195 doclines.append(l.rstrip())
197 doclines.append(l.rstrip())
196 else:
198 else:
197 doclines.append(' ' + l.strip())
199 doclines.append(' ' + l.strip())
198 entries.append('\n'.join(doclines))
200 entries.append('\n'.join(doclines))
199 entries = '\n\n'.join(entries)
201 entries = '\n\n'.join(entries)
200 return doc.replace(marker, entries)
202 return doc.replace(marker, entries)
201
203
202 def addtopicsymbols(topic, marker, symbols, dedent=False):
204 def addtopicsymbols(topic, marker, symbols, dedent=False):
203 def add(topic, doc):
205 def add(topic, doc):
204 return makeitemsdoc(topic, doc, marker, symbols, dedent=dedent)
206 return makeitemsdoc(topic, doc, marker, symbols, dedent=dedent)
205 addtopichook(topic, add)
207 addtopichook(topic, add)
206
208
207 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
209 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
208 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
210 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
209 filemerge.internalsdoc)
211 filemerge.internalsdoc)
210 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
212 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
211 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
213 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
212 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
214 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
213 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
215 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
214 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
216 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
215 dedent=True)
217 dedent=True)
216
218
217 def help_(ui, name, unknowncmd=False, full=True, **opts):
219 def help_(ui, name, unknowncmd=False, full=True, **opts):
218 '''
220 '''
219 Generate the help for 'name' as unformatted restructured text. If
221 Generate the help for 'name' as unformatted restructured text. If
220 'name' is None, describe the commands available.
222 'name' is None, describe the commands available.
221 '''
223 '''
222
224
223 import commands # avoid cycle
225 import commands # avoid cycle
224
226
225 def helpcmd(name):
227 def helpcmd(name):
226 try:
228 try:
227 aliases, entry = cmdutil.findcmd(name, commands.table,
229 aliases, entry = cmdutil.findcmd(name, commands.table,
228 strict=unknowncmd)
230 strict=unknowncmd)
229 except error.AmbiguousCommand, inst:
231 except error.AmbiguousCommand, inst:
230 # py3k fix: except vars can't be used outside the scope of the
232 # py3k fix: except vars can't be used outside the scope of the
231 # except block, nor can be used inside a lambda. python issue4617
233 # except block, nor can be used inside a lambda. python issue4617
232 prefix = inst.args[0]
234 prefix = inst.args[0]
233 select = lambda c: c.lstrip('^').startswith(prefix)
235 select = lambda c: c.lstrip('^').startswith(prefix)
234 rst = helplist(select)
236 rst = helplist(select)
235 return rst
237 return rst
236
238
237 rst = []
239 rst = []
238
240
239 # check if it's an invalid alias and display its error if it is
241 # check if it's an invalid alias and display its error if it is
240 if getattr(entry[0], 'badalias', None):
242 if getattr(entry[0], 'badalias', None):
241 rst.append(entry[0].badalias + '\n')
243 rst.append(entry[0].badalias + '\n')
242 if entry[0].unknowncmd:
244 if entry[0].unknowncmd:
243 try:
245 try:
244 rst.extend(helpextcmd(entry[0].cmdname))
246 rst.extend(helpextcmd(entry[0].cmdname))
245 except error.UnknownCommand:
247 except error.UnknownCommand:
246 pass
248 pass
247 return rst
249 return rst
248
250
249 # synopsis
251 # synopsis
250 if len(entry) > 2:
252 if len(entry) > 2:
251 if entry[2].startswith('hg'):
253 if entry[2].startswith('hg'):
252 rst.append("%s\n" % entry[2])
254 rst.append("%s\n" % entry[2])
253 else:
255 else:
254 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
256 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
255 else:
257 else:
256 rst.append('hg %s\n' % aliases[0])
258 rst.append('hg %s\n' % aliases[0])
257 # aliases
259 # aliases
258 if full and not ui.quiet and len(aliases) > 1:
260 if full and not ui.quiet and len(aliases) > 1:
259 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
261 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
260 rst.append('\n')
262 rst.append('\n')
261
263
262 # description
264 # description
263 doc = gettext(entry[0].__doc__)
265 doc = gettext(entry[0].__doc__)
264 if not doc:
266 if not doc:
265 doc = _("(no help text available)")
267 doc = _("(no help text available)")
266 if util.safehasattr(entry[0], 'definition'): # aliased command
268 if util.safehasattr(entry[0], 'definition'): # aliased command
267 if entry[0].definition.startswith('!'): # shell alias
269 if entry[0].definition.startswith('!'): # shell alias
268 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
270 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
269 else:
271 else:
270 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
272 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
271 doc = doc.splitlines(True)
273 doc = doc.splitlines(True)
272 if ui.quiet or not full:
274 if ui.quiet or not full:
273 rst.append(doc[0])
275 rst.append(doc[0])
274 else:
276 else:
275 rst.extend(doc)
277 rst.extend(doc)
276 rst.append('\n')
278 rst.append('\n')
277
279
278 # check if this command shadows a non-trivial (multi-line)
280 # check if this command shadows a non-trivial (multi-line)
279 # extension help text
281 # extension help text
280 try:
282 try:
281 mod = extensions.find(name)
283 mod = extensions.find(name)
282 doc = gettext(mod.__doc__) or ''
284 doc = gettext(mod.__doc__) or ''
283 if '\n' in doc.strip():
285 if '\n' in doc.strip():
284 msg = _('(use "hg help -e %s" to show help for '
286 msg = _('(use "hg help -e %s" to show help for '
285 'the %s extension)') % (name, name)
287 'the %s extension)') % (name, name)
286 rst.append('\n%s\n' % msg)
288 rst.append('\n%s\n' % msg)
287 except KeyError:
289 except KeyError:
288 pass
290 pass
289
291
290 # options
292 # options
291 if not ui.quiet and entry[1]:
293 if not ui.quiet and entry[1]:
292 rst.append(optrst(_("options"), entry[1], ui.verbose))
294 rst.append(optrst(_("options"), entry[1], ui.verbose))
293
295
294 if ui.verbose:
296 if ui.verbose:
295 rst.append(optrst(_("global options"),
297 rst.append(optrst(_("global options"),
296 commands.globalopts, ui.verbose))
298 commands.globalopts, ui.verbose))
297
299
298 if not ui.verbose:
300 if not ui.verbose:
299 if not full:
301 if not full:
300 rst.append(_('\n(use "hg %s -h" to show more help)\n')
302 rst.append(_('\n(use "hg %s -h" to show more help)\n')
301 % name)
303 % name)
302 elif not ui.quiet:
304 elif not ui.quiet:
303 rst.append(_('\n(some details hidden, use --verbose '
305 rst.append(_('\n(some details hidden, use --verbose '
304 'to show complete help)'))
306 'to show complete help)'))
305
307
306 return rst
308 return rst
307
309
308
310
309 def helplist(select=None):
311 def helplist(select=None):
310 # list of commands
312 # list of commands
311 if name == "shortlist":
313 if name == "shortlist":
312 header = _('basic commands:\n\n')
314 header = _('basic commands:\n\n')
313 elif name == "debug":
315 elif name == "debug":
314 header = _('debug commands (internal and unsupported):\n\n')
316 header = _('debug commands (internal and unsupported):\n\n')
315 else:
317 else:
316 header = _('list of commands:\n\n')
318 header = _('list of commands:\n\n')
317
319
318 h = {}
320 h = {}
319 cmds = {}
321 cmds = {}
320 for c, e in commands.table.iteritems():
322 for c, e in commands.table.iteritems():
321 f = c.split("|", 1)[0]
323 f = c.split("|", 1)[0]
322 if select and not select(f):
324 if select and not select(f):
323 continue
325 continue
324 if (not select and name != 'shortlist' and
326 if (not select and name != 'shortlist' and
325 e[0].__module__ != commands.__name__):
327 e[0].__module__ != commands.__name__):
326 continue
328 continue
327 if name == "shortlist" and not f.startswith("^"):
329 if name == "shortlist" and not f.startswith("^"):
328 continue
330 continue
329 f = f.lstrip("^")
331 f = f.lstrip("^")
330 if not ui.debugflag and f.startswith("debug") and name != "debug":
332 if not ui.debugflag and f.startswith("debug") and name != "debug":
331 continue
333 continue
332 doc = e[0].__doc__
334 doc = e[0].__doc__
333 if doc and 'DEPRECATED' in doc and not ui.verbose:
335 if doc and 'DEPRECATED' in doc and not ui.verbose:
334 continue
336 continue
335 doc = gettext(doc)
337 doc = gettext(doc)
336 if not doc:
338 if not doc:
337 doc = _("(no help text available)")
339 doc = _("(no help text available)")
338 h[f] = doc.splitlines()[0].rstrip()
340 h[f] = doc.splitlines()[0].rstrip()
339 cmds[f] = c.lstrip("^")
341 cmds[f] = c.lstrip("^")
340
342
341 rst = []
343 rst = []
342 if not h:
344 if not h:
343 if not ui.quiet:
345 if not ui.quiet:
344 rst.append(_('no commands defined\n'))
346 rst.append(_('no commands defined\n'))
345 return rst
347 return rst
346
348
347 if not ui.quiet:
349 if not ui.quiet:
348 rst.append(header)
350 rst.append(header)
349 fns = sorted(h)
351 fns = sorted(h)
350 for f in fns:
352 for f in fns:
351 if ui.verbose:
353 if ui.verbose:
352 commacmds = cmds[f].replace("|",", ")
354 commacmds = cmds[f].replace("|",", ")
353 rst.append(" :%s: %s\n" % (commacmds, h[f]))
355 rst.append(" :%s: %s\n" % (commacmds, h[f]))
354 else:
356 else:
355 rst.append(' :%s: %s\n' % (f, h[f]))
357 rst.append(' :%s: %s\n' % (f, h[f]))
356
358
357 if not name:
359 if not name:
358 exts = listexts(_('enabled extensions:'), extensions.enabled())
360 exts = listexts(_('enabled extensions:'), extensions.enabled())
359 if exts:
361 if exts:
360 rst.append('\n')
362 rst.append('\n')
361 rst.extend(exts)
363 rst.extend(exts)
362
364
363 rst.append(_("\nadditional help topics:\n\n"))
365 rst.append(_("\nadditional help topics:\n\n"))
364 topics = []
366 topics = []
365 for names, header, doc in helptable:
367 for names, header, doc in helptable:
366 topics.append((names[0], header))
368 topics.append((names[0], header))
367 for t, desc in topics:
369 for t, desc in topics:
368 rst.append(" :%s: %s\n" % (t, desc))
370 rst.append(" :%s: %s\n" % (t, desc))
369
371
370 if ui.quiet:
372 if ui.quiet:
371 pass
373 pass
372 elif ui.verbose:
374 elif ui.verbose:
373 rst.append('\n%s\n' % optrst(_("global options"),
375 rst.append('\n%s\n' % optrst(_("global options"),
374 commands.globalopts, ui.verbose))
376 commands.globalopts, ui.verbose))
375 if name == 'shortlist':
377 if name == 'shortlist':
376 rst.append(_('\n(use "hg help" for the full list '
378 rst.append(_('\n(use "hg help" for the full list '
377 'of commands)\n'))
379 'of commands)\n'))
378 else:
380 else:
379 if name == 'shortlist':
381 if name == 'shortlist':
380 rst.append(_('\n(use "hg help" for the full list of commands '
382 rst.append(_('\n(use "hg help" for the full list of commands '
381 'or "hg -v" for details)\n'))
383 'or "hg -v" for details)\n'))
382 elif name and not full:
384 elif name and not full:
383 rst.append(_('\n(use "hg help %s" to show the full help '
385 rst.append(_('\n(use "hg help %s" to show the full help '
384 'text)\n') % name)
386 'text)\n') % name)
385 elif name and cmds and name in cmds.keys():
387 elif name and cmds and name in cmds.keys():
386 rst.append(_('\n(use "hg help -v -e %s" to show built-in '
388 rst.append(_('\n(use "hg help -v -e %s" to show built-in '
387 'aliases and global options)\n') % name)
389 'aliases and global options)\n') % name)
388 else:
390 else:
389 rst.append(_('\n(use "hg help -v%s" to show built-in aliases '
391 rst.append(_('\n(use "hg help -v%s" to show built-in aliases '
390 'and global options)\n')
392 'and global options)\n')
391 % (name and " " + name or ""))
393 % (name and " " + name or ""))
392 return rst
394 return rst
393
395
394 def helptopic(name):
396 def helptopic(name):
395 for names, header, doc in helptable:
397 for names, header, doc in helptable:
396 if name in names:
398 if name in names:
397 break
399 break
398 else:
400 else:
399 raise error.UnknownCommand(name)
401 raise error.UnknownCommand(name)
400
402
401 rst = [minirst.section(header)]
403 rst = [minirst.section(header)]
402
404
403 # description
405 # description
404 if not doc:
406 if not doc:
405 rst.append(" %s\n" % _("(no help text available)"))
407 rst.append(" %s\n" % _("(no help text available)"))
406 if callable(doc):
408 if callable(doc):
407 rst += [" %s\n" % l for l in doc().splitlines()]
409 rst += [" %s\n" % l for l in doc().splitlines()]
408
410
409 if not ui.verbose:
411 if not ui.verbose:
410 omitted = _('(some details hidden, use --verbose'
412 omitted = _('(some details hidden, use --verbose'
411 ' to show complete help)')
413 ' to show complete help)')
412 indicateomitted(rst, omitted)
414 indicateomitted(rst, omitted)
413
415
414 try:
416 try:
415 cmdutil.findcmd(name, commands.table)
417 cmdutil.findcmd(name, commands.table)
416 rst.append(_('\nuse "hg help -c %s" to see help for '
418 rst.append(_('\nuse "hg help -c %s" to see help for '
417 'the %s command\n') % (name, name))
419 'the %s command\n') % (name, name))
418 except error.UnknownCommand:
420 except error.UnknownCommand:
419 pass
421 pass
420 return rst
422 return rst
421
423
422 def helpext(name):
424 def helpext(name):
423 try:
425 try:
424 mod = extensions.find(name)
426 mod = extensions.find(name)
425 doc = gettext(mod.__doc__) or _('no help text available')
427 doc = gettext(mod.__doc__) or _('no help text available')
426 except KeyError:
428 except KeyError:
427 mod = None
429 mod = None
428 doc = extensions.disabledext(name)
430 doc = extensions.disabledext(name)
429 if not doc:
431 if not doc:
430 raise error.UnknownCommand(name)
432 raise error.UnknownCommand(name)
431
433
432 if '\n' not in doc:
434 if '\n' not in doc:
433 head, tail = doc, ""
435 head, tail = doc, ""
434 else:
436 else:
435 head, tail = doc.split('\n', 1)
437 head, tail = doc.split('\n', 1)
436 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)]
438 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)]
437 if tail:
439 if tail:
438 rst.extend(tail.splitlines(True))
440 rst.extend(tail.splitlines(True))
439 rst.append('\n')
441 rst.append('\n')
440
442
441 if not ui.verbose:
443 if not ui.verbose:
442 omitted = _('(some details hidden, use --verbose'
444 omitted = _('(some details hidden, use --verbose'
443 ' to show complete help)')
445 ' to show complete help)')
444 indicateomitted(rst, omitted)
446 indicateomitted(rst, omitted)
445
447
446 if mod:
448 if mod:
447 try:
449 try:
448 ct = mod.cmdtable
450 ct = mod.cmdtable
449 except AttributeError:
451 except AttributeError:
450 ct = {}
452 ct = {}
451 modcmds = set([c.split('|', 1)[0] for c in ct])
453 modcmds = set([c.split('|', 1)[0] for c in ct])
452 rst.extend(helplist(modcmds.__contains__))
454 rst.extend(helplist(modcmds.__contains__))
453 else:
455 else:
454 rst.append(_('(use "hg help extensions" for information on enabling'
456 rst.append(_('(use "hg help extensions" for information on enabling'
455 ' extensions)\n'))
457 ' extensions)\n'))
456 return rst
458 return rst
457
459
458 def helpextcmd(name):
460 def helpextcmd(name):
459 cmd, ext, mod = extensions.disabledcmd(ui, name,
461 cmd, ext, mod = extensions.disabledcmd(ui, name,
460 ui.configbool('ui', 'strict'))
462 ui.configbool('ui', 'strict'))
461 doc = gettext(mod.__doc__).splitlines()[0]
463 doc = gettext(mod.__doc__).splitlines()[0]
462
464
463 rst = listexts(_("'%s' is provided by the following "
465 rst = listexts(_("'%s' is provided by the following "
464 "extension:") % cmd, {ext: doc}, indent=4)
466 "extension:") % cmd, {ext: doc}, indent=4)
465 rst.append('\n')
467 rst.append('\n')
466 rst.append(_('(use "hg help extensions" for information on enabling '
468 rst.append(_('(use "hg help extensions" for information on enabling '
467 'extensions)\n'))
469 'extensions)\n'))
468 return rst
470 return rst
469
471
470
472
471 rst = []
473 rst = []
472 kw = opts.get('keyword')
474 kw = opts.get('keyword')
473 if kw:
475 if kw:
474 matches = topicmatch(kw)
476 matches = topicmatch(kw)
475 for t, title in (('topics', _('Topics')),
477 for t, title in (('topics', _('Topics')),
476 ('commands', _('Commands')),
478 ('commands', _('Commands')),
477 ('extensions', _('Extensions')),
479 ('extensions', _('Extensions')),
478 ('extensioncommands', _('Extension Commands'))):
480 ('extensioncommands', _('Extension Commands'))):
479 if matches[t]:
481 if matches[t]:
480 rst.append('%s:\n\n' % title)
482 rst.append('%s:\n\n' % title)
481 rst.extend(minirst.maketable(sorted(matches[t]), 1))
483 rst.extend(minirst.maketable(sorted(matches[t]), 1))
482 rst.append('\n')
484 rst.append('\n')
483 if not rst:
485 if not rst:
484 msg = _('no matches')
486 msg = _('no matches')
485 hint = _('try "hg help" for a list of topics')
487 hint = _('try "hg help" for a list of topics')
486 raise util.Abort(msg, hint=hint)
488 raise util.Abort(msg, hint=hint)
487 elif name and name != 'shortlist':
489 elif name and name != 'shortlist':
488 if unknowncmd:
490 if unknowncmd:
489 queries = (helpextcmd,)
491 queries = (helpextcmd,)
490 elif opts.get('extension'):
492 elif opts.get('extension'):
491 queries = (helpext,)
493 queries = (helpext,)
492 elif opts.get('command'):
494 elif opts.get('command'):
493 queries = (helpcmd,)
495 queries = (helpcmd,)
494 else:
496 else:
495 queries = (helptopic, helpcmd, helpext, helpextcmd)
497 queries = (helptopic, helpcmd, helpext, helpextcmd)
496 for f in queries:
498 for f in queries:
497 try:
499 try:
498 rst = f(name)
500 rst = f(name)
499 break
501 break
500 except error.UnknownCommand:
502 except error.UnknownCommand:
501 pass
503 pass
502 else:
504 else:
503 if unknowncmd:
505 if unknowncmd:
504 raise error.UnknownCommand(name)
506 raise error.UnknownCommand(name)
505 else:
507 else:
506 msg = _('no such help topic: %s') % name
508 msg = _('no such help topic: %s') % name
507 hint = _('try "hg help --keyword %s"') % name
509 hint = _('try "hg help --keyword %s"') % name
508 raise util.Abort(msg, hint=hint)
510 raise util.Abort(msg, hint=hint)
509 else:
511 else:
510 # program name
512 # program name
511 if not ui.quiet:
513 if not ui.quiet:
512 rst = [_("Mercurial Distributed SCM\n"), '\n']
514 rst = [_("Mercurial Distributed SCM\n"), '\n']
513 rst.extend(helplist())
515 rst.extend(helplist())
514
516
515 return ''.join(rst)
517 return ''.join(rst)
@@ -1,2242 +1,2255 b''
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 $ hg help
47 $ hg help
48 Mercurial Distributed SCM
48 Mercurial Distributed SCM
49
49
50 list of commands:
50 list of commands:
51
51
52 add add the specified files on the next commit
52 add add the specified files on the next commit
53 addremove add all new files, delete all missing files
53 addremove add all new files, delete all missing files
54 annotate show changeset information by line for each file
54 annotate show changeset information by line for each file
55 archive create an unversioned archive of a repository revision
55 archive create an unversioned archive of a repository revision
56 backout reverse effect of earlier changeset
56 backout reverse effect of earlier changeset
57 bisect subdivision search of changesets
57 bisect subdivision search of changesets
58 bookmarks create a new bookmark or list existing bookmarks
58 bookmarks create a new bookmark or list existing bookmarks
59 branch set or show the current branch name
59 branch set or show the current branch name
60 branches list repository named branches
60 branches list repository named branches
61 bundle create a changegroup file
61 bundle create a changegroup file
62 cat output the current or given revision of files
62 cat output the current or given revision of files
63 clone make a copy of an existing repository
63 clone make a copy of an existing repository
64 commit commit the specified files or all outstanding changes
64 commit commit the specified files or all outstanding changes
65 config show combined config settings from all hgrc files
65 config show combined config settings from all hgrc files
66 copy mark files as copied for the next commit
66 copy mark files as copied for the next commit
67 diff diff repository (or selected files)
67 diff diff repository (or selected files)
68 export dump the header and diffs for one or more changesets
68 export dump the header and diffs for one or more changesets
69 files list tracked files
69 files list tracked files
70 forget forget the specified files on the next commit
70 forget forget the specified files on the next commit
71 graft copy changes from other branches onto the current branch
71 graft copy changes from other branches onto the current branch
72 grep search for a pattern in specified files and revisions
72 grep search for a pattern in specified files and revisions
73 heads show branch heads
73 heads show branch heads
74 help show help for a given topic or a help overview
74 help show help for a given topic or a help overview
75 identify identify the working directory or specified revision
75 identify identify the working directory or specified revision
76 import import an ordered set of patches
76 import import an ordered set of patches
77 incoming show new changesets found in source
77 incoming show new changesets found in source
78 init create a new repository in the given directory
78 init create a new repository in the given directory
79 log show revision history of entire repository or files
79 log show revision history of entire repository or files
80 manifest output the current or given revision of the project manifest
80 manifest output the current or given revision of the project manifest
81 merge merge another revision into working directory
81 merge merge another revision into working directory
82 outgoing show changesets not found in the destination
82 outgoing show changesets not found in the destination
83 paths show aliases for remote repositories
83 paths show aliases for remote repositories
84 phase set or show the current phase name
84 phase set or show the current phase name
85 pull pull changes from the specified source
85 pull pull changes from the specified source
86 push push changes to the specified destination
86 push push changes to the specified destination
87 recover roll back an interrupted transaction
87 recover roll back an interrupted transaction
88 remove remove the specified files on the next commit
88 remove remove the specified files on the next commit
89 rename rename files; equivalent of copy + remove
89 rename rename files; equivalent of copy + remove
90 resolve redo merges or set/view the merge status of files
90 resolve redo merges or set/view the merge status of files
91 revert restore files to their checkout state
91 revert restore files to their checkout state
92 root print the root (top) of the current working directory
92 root print the root (top) of the current working directory
93 serve start stand-alone webserver
93 serve start stand-alone webserver
94 status show changed files in the working directory
94 status show changed files in the working directory
95 summary summarize working directory state
95 summary summarize working directory state
96 tag add one or more tags for the current or given revision
96 tag add one or more tags for the current or given revision
97 tags list repository tags
97 tags list repository tags
98 unbundle apply one or more changegroup files
98 unbundle apply one or more changegroup files
99 update update working directory (or switch revisions)
99 update update working directory (or switch revisions)
100 verify verify the integrity of the repository
100 verify verify the integrity of the repository
101 version output version and copyright information
101 version output version and copyright information
102
102
103 additional help topics:
103 additional help topics:
104
104
105 config Configuration Files
105 config Configuration Files
106 dates Date Formats
106 dates Date Formats
107 diffs Diff Formats
107 diffs Diff Formats
108 environment Environment Variables
108 environment Environment Variables
109 extensions Using Additional Features
109 extensions Using Additional Features
110 filesets Specifying File Sets
110 filesets Specifying File Sets
111 glossary Glossary
111 glossary Glossary
112 hgignore Syntax for Mercurial Ignore Files
112 hgignore Syntax for Mercurial Ignore Files
113 hgweb Configuring hgweb
113 hgweb Configuring hgweb
114 merge-tools Merge Tools
114 merge-tools Merge Tools
115 multirevs Specifying Multiple Revisions
115 multirevs Specifying Multiple Revisions
116 patterns File Name Patterns
116 patterns File Name Patterns
117 phases Working with Phases
117 phases Working with Phases
118 revisions Specifying Single Revisions
118 revisions Specifying Single Revisions
119 revsets Specifying Revision Sets
119 revsets Specifying Revision Sets
120 subrepos Subrepositories
120 subrepos Subrepositories
121 templating Template Usage
121 templating Template Usage
122 urls URL Paths
122 urls URL Paths
123
123
124 (use "hg help -v" to show built-in aliases and global options)
124 (use "hg help -v" to show built-in aliases and global options)
125
125
126 $ hg -q help
126 $ hg -q help
127 add add the specified files on the next commit
127 add add the specified files on the next commit
128 addremove add all new files, delete all missing files
128 addremove add all new files, delete all missing files
129 annotate show changeset information by line for each file
129 annotate show changeset information by line for each file
130 archive create an unversioned archive of a repository revision
130 archive create an unversioned archive of a repository revision
131 backout reverse effect of earlier changeset
131 backout reverse effect of earlier changeset
132 bisect subdivision search of changesets
132 bisect subdivision search of changesets
133 bookmarks create a new bookmark or list existing bookmarks
133 bookmarks create a new bookmark or list existing bookmarks
134 branch set or show the current branch name
134 branch set or show the current branch name
135 branches list repository named branches
135 branches list repository named branches
136 bundle create a changegroup file
136 bundle create a changegroup file
137 cat output the current or given revision of files
137 cat output the current or given revision of files
138 clone make a copy of an existing repository
138 clone make a copy of an existing repository
139 commit commit the specified files or all outstanding changes
139 commit commit the specified files or all outstanding changes
140 config show combined config settings from all hgrc files
140 config show combined config settings from all hgrc files
141 copy mark files as copied for the next commit
141 copy mark files as copied for the next commit
142 diff diff repository (or selected files)
142 diff diff repository (or selected files)
143 export dump the header and diffs for one or more changesets
143 export dump the header and diffs for one or more changesets
144 files list tracked files
144 files list tracked files
145 forget forget the specified files on the next commit
145 forget forget the specified files on the next commit
146 graft copy changes from other branches onto the current branch
146 graft copy changes from other branches onto the current branch
147 grep search for a pattern in specified files and revisions
147 grep search for a pattern in specified files and revisions
148 heads show branch heads
148 heads show branch heads
149 help show help for a given topic or a help overview
149 help show help for a given topic or a help overview
150 identify identify the working directory or specified revision
150 identify identify the working directory or specified revision
151 import import an ordered set of patches
151 import import an ordered set of patches
152 incoming show new changesets found in source
152 incoming show new changesets found in source
153 init create a new repository in the given directory
153 init create a new repository in the given directory
154 log show revision history of entire repository or files
154 log show revision history of entire repository or files
155 manifest output the current or given revision of the project manifest
155 manifest output the current or given revision of the project manifest
156 merge merge another revision into working directory
156 merge merge another revision into working directory
157 outgoing show changesets not found in the destination
157 outgoing show changesets not found in the destination
158 paths show aliases for remote repositories
158 paths show aliases for remote repositories
159 phase set or show the current phase name
159 phase set or show the current phase name
160 pull pull changes from the specified source
160 pull pull changes from the specified source
161 push push changes to the specified destination
161 push push changes to the specified destination
162 recover roll back an interrupted transaction
162 recover roll back an interrupted transaction
163 remove remove the specified files on the next commit
163 remove remove the specified files on the next commit
164 rename rename files; equivalent of copy + remove
164 rename rename files; equivalent of copy + remove
165 resolve redo merges or set/view the merge status of files
165 resolve redo merges or set/view the merge status of files
166 revert restore files to their checkout state
166 revert restore files to their checkout state
167 root print the root (top) of the current working directory
167 root print the root (top) of the current working directory
168 serve start stand-alone webserver
168 serve start stand-alone webserver
169 status show changed files in the working directory
169 status show changed files in the working directory
170 summary summarize working directory state
170 summary summarize working directory state
171 tag add one or more tags for the current or given revision
171 tag add one or more tags for the current or given revision
172 tags list repository tags
172 tags list repository tags
173 unbundle apply one or more changegroup files
173 unbundle apply one or more changegroup files
174 update update working directory (or switch revisions)
174 update update working directory (or switch revisions)
175 verify verify the integrity of the repository
175 verify verify the integrity of the repository
176 version output version and copyright information
176 version output version and copyright information
177
177
178 additional help topics:
178 additional help topics:
179
179
180 config Configuration Files
180 config Configuration Files
181 dates Date Formats
181 dates Date Formats
182 diffs Diff Formats
182 diffs Diff Formats
183 environment Environment Variables
183 environment Environment Variables
184 extensions Using Additional Features
184 extensions Using Additional Features
185 filesets Specifying File Sets
185 filesets Specifying File Sets
186 glossary Glossary
186 glossary Glossary
187 hgignore Syntax for Mercurial Ignore Files
187 hgignore Syntax for Mercurial Ignore Files
188 hgweb Configuring hgweb
188 hgweb Configuring hgweb
189 merge-tools Merge Tools
189 merge-tools Merge Tools
190 multirevs Specifying Multiple Revisions
190 multirevs Specifying Multiple Revisions
191 patterns File Name Patterns
191 patterns File Name Patterns
192 phases Working with Phases
192 phases Working with Phases
193 revisions Specifying Single Revisions
193 revisions Specifying Single Revisions
194 revsets Specifying Revision Sets
194 revsets Specifying Revision Sets
195 subrepos Subrepositories
195 subrepos Subrepositories
196 templating Template Usage
196 templating Template Usage
197 urls URL Paths
197 urls URL Paths
198
198
199 Test extension help:
199 Test extension help:
200 $ hg help extensions --config extensions.rebase= --config extensions.children=
200 $ hg help extensions --config extensions.rebase= --config extensions.children=
201 Using Additional Features
201 Using Additional Features
202 """""""""""""""""""""""""
202 """""""""""""""""""""""""
203
203
204 Mercurial has the ability to add new features through the use of
204 Mercurial has the ability to add new features through the use of
205 extensions. Extensions may add new commands, add options to existing
205 extensions. Extensions may add new commands, add options to existing
206 commands, change the default behavior of commands, or implement hooks.
206 commands, change the default behavior of commands, or implement hooks.
207
207
208 To enable the "foo" extension, either shipped with Mercurial or in the
208 To enable the "foo" extension, either shipped with Mercurial or in the
209 Python search path, create an entry for it in your configuration file,
209 Python search path, create an entry for it in your configuration file,
210 like this:
210 like this:
211
211
212 [extensions]
212 [extensions]
213 foo =
213 foo =
214
214
215 You may also specify the full path to an extension:
215 You may also specify the full path to an extension:
216
216
217 [extensions]
217 [extensions]
218 myfeature = ~/.hgext/myfeature.py
218 myfeature = ~/.hgext/myfeature.py
219
219
220 See "hg help config" for more information on configuration files.
220 See "hg help config" for more information on configuration files.
221
221
222 Extensions are not loaded by default for a variety of reasons: they can
222 Extensions are not loaded by default for a variety of reasons: they can
223 increase startup overhead; they may be meant for advanced usage only; they
223 increase startup overhead; they may be meant for advanced usage only; they
224 may provide potentially dangerous abilities (such as letting you destroy
224 may provide potentially dangerous abilities (such as letting you destroy
225 or modify history); they might not be ready for prime time; or they may
225 or modify history); they might not be ready for prime time; or they may
226 alter some usual behaviors of stock Mercurial. It is thus up to the user
226 alter some usual behaviors of stock Mercurial. It is thus up to the user
227 to activate extensions as needed.
227 to activate extensions as needed.
228
228
229 To explicitly disable an extension enabled in a configuration file of
229 To explicitly disable an extension enabled in a configuration file of
230 broader scope, prepend its path with !:
230 broader scope, prepend its path with !:
231
231
232 [extensions]
232 [extensions]
233 # disabling extension bar residing in /path/to/extension/bar.py
233 # disabling extension bar residing in /path/to/extension/bar.py
234 bar = !/path/to/extension/bar.py
234 bar = !/path/to/extension/bar.py
235 # ditto, but no path was supplied for extension baz
235 # ditto, but no path was supplied for extension baz
236 baz = !
236 baz = !
237
237
238 enabled extensions:
238 enabled extensions:
239
239
240 children command to display child changesets (DEPRECATED)
240 children command to display child changesets (DEPRECATED)
241 rebase command to move sets of revisions to a different ancestor
241 rebase command to move sets of revisions to a different ancestor
242
242
243 disabled extensions:
243 disabled extensions:
244
244
245 acl hooks for controlling repository access
245 acl hooks for controlling repository access
246 blackbox log repository events to a blackbox for debugging
246 blackbox log repository events to a blackbox for debugging
247 bugzilla hooks for integrating with the Bugzilla bug tracker
247 bugzilla hooks for integrating with the Bugzilla bug tracker
248 censor erase file content at a given revision
248 censor erase file content at a given revision
249 churn command to display statistics about repository history
249 churn command to display statistics about repository history
250 color colorize output from some commands
250 color colorize output from some commands
251 convert import revisions from foreign VCS repositories into
251 convert import revisions from foreign VCS repositories into
252 Mercurial
252 Mercurial
253 eol automatically manage newlines in repository files
253 eol automatically manage newlines in repository files
254 extdiff command to allow external programs to compare revisions
254 extdiff command to allow external programs to compare revisions
255 factotum http authentication with factotum
255 factotum http authentication with factotum
256 gpg commands to sign and verify changesets
256 gpg commands to sign and verify changesets
257 hgcia hooks for integrating with the CIA.vc notification service
257 hgcia hooks for integrating with the CIA.vc notification service
258 hgk browse the repository in a graphical way
258 hgk browse the repository in a graphical way
259 highlight syntax highlighting for hgweb (requires Pygments)
259 highlight syntax highlighting for hgweb (requires Pygments)
260 histedit interactive history editing
260 histedit interactive history editing
261 keyword expand keywords in tracked files
261 keyword expand keywords in tracked files
262 largefiles track large binary files
262 largefiles track large binary files
263 mq manage a stack of patches
263 mq manage a stack of patches
264 notify hooks for sending email push notifications
264 notify hooks for sending email push notifications
265 pager browse command output with an external pager
265 pager browse command output with an external pager
266 patchbomb command to send changesets as (a series of) patch emails
266 patchbomb command to send changesets as (a series of) patch emails
267 progress show progress bars for some actions
267 progress show progress bars for some actions
268 purge command to delete untracked files from the working
268 purge command to delete untracked files from the working
269 directory
269 directory
270 record commands to interactively select changes for
270 record commands to interactively select changes for
271 commit/qrefresh
271 commit/qrefresh
272 relink recreates hardlinks between repository clones
272 relink recreates hardlinks between repository clones
273 schemes extend schemes with shortcuts to repository swarms
273 schemes extend schemes with shortcuts to repository swarms
274 share share a common history between several working directories
274 share share a common history between several working directories
275 shelve save and restore changes to the working directory
275 shelve save and restore changes to the working directory
276 strip strip changesets and their descendants from history
276 strip strip changesets and their descendants from history
277 transplant command to transplant changesets from another branch
277 transplant command to transplant changesets from another branch
278 win32mbcs allow the use of MBCS paths with problematic encodings
278 win32mbcs allow the use of MBCS paths with problematic encodings
279 zeroconf discover and advertise repositories on the local network
279 zeroconf discover and advertise repositories on the local network
280 Test short command list with verbose option
280 Test short command list with verbose option
281
281
282 $ hg -v help shortlist
282 $ hg -v help shortlist
283 Mercurial Distributed SCM
283 Mercurial Distributed SCM
284
284
285 basic commands:
285 basic commands:
286
286
287 add add the specified files on the next commit
287 add add the specified files on the next commit
288 annotate, blame
288 annotate, blame
289 show changeset information by line for each file
289 show changeset information by line for each file
290 clone make a copy of an existing repository
290 clone make a copy of an existing repository
291 commit, ci commit the specified files or all outstanding changes
291 commit, ci commit the specified files or all outstanding changes
292 diff diff repository (or selected files)
292 diff diff repository (or selected files)
293 export dump the header and diffs for one or more changesets
293 export dump the header and diffs for one or more changesets
294 forget forget the specified files on the next commit
294 forget forget the specified files on the next commit
295 init create a new repository in the given directory
295 init create a new repository in the given directory
296 log, history show revision history of entire repository or files
296 log, history show revision history of entire repository or files
297 merge merge another revision into working directory
297 merge merge another revision into working directory
298 pull pull changes from the specified source
298 pull pull changes from the specified source
299 push push changes to the specified destination
299 push push changes to the specified destination
300 remove, rm remove the specified files on the next commit
300 remove, rm remove the specified files on the next commit
301 serve start stand-alone webserver
301 serve start stand-alone webserver
302 status, st show changed files in the working directory
302 status, st show changed files in the working directory
303 summary, sum summarize working directory state
303 summary, sum summarize working directory state
304 update, up, checkout, co
304 update, up, checkout, co
305 update working directory (or switch revisions)
305 update working directory (or switch revisions)
306
306
307 global options ([+] can be repeated):
307 global options ([+] can be repeated):
308
308
309 -R --repository REPO repository root directory or name of overlay bundle
309 -R --repository REPO repository root directory or name of overlay bundle
310 file
310 file
311 --cwd DIR change working directory
311 --cwd DIR change working directory
312 -y --noninteractive do not prompt, automatically pick the first choice for
312 -y --noninteractive do not prompt, automatically pick the first choice for
313 all prompts
313 all prompts
314 -q --quiet suppress output
314 -q --quiet suppress output
315 -v --verbose enable additional output
315 -v --verbose enable additional output
316 --config CONFIG [+] set/override config option (use 'section.name=value')
316 --config CONFIG [+] set/override config option (use 'section.name=value')
317 --debug enable debugging output
317 --debug enable debugging output
318 --debugger start debugger
318 --debugger start debugger
319 --encoding ENCODE set the charset encoding (default: ascii)
319 --encoding ENCODE set the charset encoding (default: ascii)
320 --encodingmode MODE set the charset encoding mode (default: strict)
320 --encodingmode MODE set the charset encoding mode (default: strict)
321 --traceback always print a traceback on exception
321 --traceback always print a traceback on exception
322 --time time how long the command takes
322 --time time how long the command takes
323 --profile print command execution profile
323 --profile print command execution profile
324 --version output version information and exit
324 --version output version information and exit
325 -h --help display help and exit
325 -h --help display help and exit
326 --hidden consider hidden changesets
326 --hidden consider hidden changesets
327
327
328 (use "hg help" for the full list of commands)
328 (use "hg help" for the full list of commands)
329
329
330 $ hg add -h
330 $ hg add -h
331 hg add [OPTION]... [FILE]...
331 hg add [OPTION]... [FILE]...
332
332
333 add the specified files on the next commit
333 add the specified files on the next commit
334
334
335 Schedule files to be version controlled and added to the repository.
335 Schedule files to be version controlled and added to the repository.
336
336
337 The files will be added to the repository at the next commit. To undo an
337 The files will be added to the repository at the next commit. To undo an
338 add before that, see "hg forget".
338 add before that, see "hg forget".
339
339
340 If no names are given, add all files to the repository.
340 If no names are given, add all files to the repository.
341
341
342 Returns 0 if all files are successfully added.
342 Returns 0 if all files are successfully added.
343
343
344 options ([+] can be repeated):
344 options ([+] can be repeated):
345
345
346 -I --include PATTERN [+] include names matching the given patterns
346 -I --include PATTERN [+] include names matching the given patterns
347 -X --exclude PATTERN [+] exclude names matching the given patterns
347 -X --exclude PATTERN [+] exclude names matching the given patterns
348 -S --subrepos recurse into subrepositories
348 -S --subrepos recurse into subrepositories
349 -n --dry-run do not perform actions, just print output
349 -n --dry-run do not perform actions, just print output
350
350
351 (some details hidden, use --verbose to show complete help)
351 (some details hidden, use --verbose to show complete help)
352
352
353 Verbose help for add
353 Verbose help for add
354
354
355 $ hg add -hv
355 $ hg add -hv
356 hg add [OPTION]... [FILE]...
356 hg add [OPTION]... [FILE]...
357
357
358 add the specified files on the next commit
358 add the specified files on the next commit
359
359
360 Schedule files to be version controlled and added to the repository.
360 Schedule files to be version controlled and added to the repository.
361
361
362 The files will be added to the repository at the next commit. To undo an
362 The files will be added to the repository at the next commit. To undo an
363 add before that, see "hg forget".
363 add before that, see "hg forget".
364
364
365 If no names are given, add all files to the repository.
365 If no names are given, add all files to the repository.
366
366
367 An example showing how new (unknown) files are added automatically by "hg
367 An example showing how new (unknown) files are added automatically by "hg
368 add":
368 add":
369
369
370 $ ls
370 $ ls
371 foo.c
371 foo.c
372 $ hg status
372 $ hg status
373 ? foo.c
373 ? foo.c
374 $ hg add
374 $ hg add
375 adding foo.c
375 adding foo.c
376 $ hg status
376 $ hg status
377 A foo.c
377 A foo.c
378
378
379 Returns 0 if all files are successfully added.
379 Returns 0 if all files are successfully added.
380
380
381 options ([+] can be repeated):
381 options ([+] can be repeated):
382
382
383 -I --include PATTERN [+] include names matching the given patterns
383 -I --include PATTERN [+] include names matching the given patterns
384 -X --exclude PATTERN [+] exclude names matching the given patterns
384 -X --exclude PATTERN [+] exclude names matching the given patterns
385 -S --subrepos recurse into subrepositories
385 -S --subrepos recurse into subrepositories
386 -n --dry-run do not perform actions, just print output
386 -n --dry-run do not perform actions, just print output
387
387
388 global options ([+] can be repeated):
388 global options ([+] can be repeated):
389
389
390 -R --repository REPO repository root directory or name of overlay bundle
390 -R --repository REPO repository root directory or name of overlay bundle
391 file
391 file
392 --cwd DIR change working directory
392 --cwd DIR change working directory
393 -y --noninteractive do not prompt, automatically pick the first choice for
393 -y --noninteractive do not prompt, automatically pick the first choice for
394 all prompts
394 all prompts
395 -q --quiet suppress output
395 -q --quiet suppress output
396 -v --verbose enable additional output
396 -v --verbose enable additional output
397 --config CONFIG [+] set/override config option (use 'section.name=value')
397 --config CONFIG [+] set/override config option (use 'section.name=value')
398 --debug enable debugging output
398 --debug enable debugging output
399 --debugger start debugger
399 --debugger start debugger
400 --encoding ENCODE set the charset encoding (default: ascii)
400 --encoding ENCODE set the charset encoding (default: ascii)
401 --encodingmode MODE set the charset encoding mode (default: strict)
401 --encodingmode MODE set the charset encoding mode (default: strict)
402 --traceback always print a traceback on exception
402 --traceback always print a traceback on exception
403 --time time how long the command takes
403 --time time how long the command takes
404 --profile print command execution profile
404 --profile print command execution profile
405 --version output version information and exit
405 --version output version information and exit
406 -h --help display help and exit
406 -h --help display help and exit
407 --hidden consider hidden changesets
407 --hidden consider hidden changesets
408
408
409 Test help option with version option
409 Test help option with version option
410
410
411 $ hg add -h --version
411 $ hg add -h --version
412 Mercurial Distributed SCM (version *) (glob)
412 Mercurial Distributed SCM (version *) (glob)
413 (see http://mercurial.selenic.com for more information)
413 (see http://mercurial.selenic.com for more information)
414
414
415 Copyright (C) 2005-2015 Matt Mackall and others
415 Copyright (C) 2005-2015 Matt Mackall and others
416 This is free software; see the source for copying conditions. There is NO
416 This is free software; see the source for copying conditions. There is NO
417 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
417 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
418
418
419 $ hg add --skjdfks
419 $ hg add --skjdfks
420 hg add: option --skjdfks not recognized
420 hg add: option --skjdfks not recognized
421 hg add [OPTION]... [FILE]...
421 hg add [OPTION]... [FILE]...
422
422
423 add the specified files on the next commit
423 add the specified files on the next commit
424
424
425 options ([+] can be repeated):
425 options ([+] can be repeated):
426
426
427 -I --include PATTERN [+] include names matching the given patterns
427 -I --include PATTERN [+] include names matching the given patterns
428 -X --exclude PATTERN [+] exclude names matching the given patterns
428 -X --exclude PATTERN [+] exclude names matching the given patterns
429 -S --subrepos recurse into subrepositories
429 -S --subrepos recurse into subrepositories
430 -n --dry-run do not perform actions, just print output
430 -n --dry-run do not perform actions, just print output
431
431
432 (use "hg add -h" to show more help)
432 (use "hg add -h" to show more help)
433 [255]
433 [255]
434
434
435 Test ambiguous command help
435 Test ambiguous command help
436
436
437 $ hg help ad
437 $ hg help ad
438 list of commands:
438 list of commands:
439
439
440 add add the specified files on the next commit
440 add add the specified files on the next commit
441 addremove add all new files, delete all missing files
441 addremove add all new files, delete all missing files
442
442
443 (use "hg help -v ad" to show built-in aliases and global options)
443 (use "hg help -v ad" to show built-in aliases and global options)
444
444
445 Test command without options
445 Test command without options
446
446
447 $ hg help verify
447 $ hg help verify
448 hg verify
448 hg verify
449
449
450 verify the integrity of the repository
450 verify the integrity of the repository
451
451
452 Verify the integrity of the current repository.
452 Verify the integrity of the current repository.
453
453
454 This will perform an extensive check of the repository's integrity,
454 This will perform an extensive check of the repository's integrity,
455 validating the hashes and checksums of each entry in the changelog,
455 validating the hashes and checksums of each entry in the changelog,
456 manifest, and tracked files, as well as the integrity of their crosslinks
456 manifest, and tracked files, as well as the integrity of their crosslinks
457 and indices.
457 and indices.
458
458
459 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
459 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
460 information about recovery from corruption of the repository.
460 information about recovery from corruption of the repository.
461
461
462 Returns 0 on success, 1 if errors are encountered.
462 Returns 0 on success, 1 if errors are encountered.
463
463
464 (some details hidden, use --verbose to show complete help)
464 (some details hidden, use --verbose to show complete help)
465
465
466 $ hg help diff
466 $ hg help diff
467 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
467 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
468
468
469 diff repository (or selected files)
469 diff repository (or selected files)
470
470
471 Show differences between revisions for the specified files.
471 Show differences between revisions for the specified files.
472
472
473 Differences between files are shown using the unified diff format.
473 Differences between files are shown using the unified diff format.
474
474
475 Note:
475 Note:
476 diff may generate unexpected results for merges, as it will default to
476 diff may generate unexpected results for merges, as it will default to
477 comparing against the working directory's first parent changeset if no
477 comparing against the working directory's first parent changeset if no
478 revisions are specified.
478 revisions are specified.
479
479
480 When two revision arguments are given, then changes are shown between
480 When two revision arguments are given, then changes are shown between
481 those revisions. If only one revision is specified then that revision is
481 those revisions. If only one revision is specified then that revision is
482 compared to the working directory, and, when no revisions are specified,
482 compared to the working directory, and, when no revisions are specified,
483 the working directory files are compared to its parent.
483 the working directory files are compared to its parent.
484
484
485 Alternatively you can specify -c/--change with a revision to see the
485 Alternatively you can specify -c/--change with a revision to see the
486 changes in that changeset relative to its first parent.
486 changes in that changeset relative to its first parent.
487
487
488 Without the -a/--text option, diff will avoid generating diffs of files it
488 Without the -a/--text option, diff will avoid generating diffs of files it
489 detects as binary. With -a, diff will generate a diff anyway, probably
489 detects as binary. With -a, diff will generate a diff anyway, probably
490 with undesirable results.
490 with undesirable results.
491
491
492 Use the -g/--git option to generate diffs in the git extended diff format.
492 Use the -g/--git option to generate diffs in the git extended diff format.
493 For more information, read "hg help diffs".
493 For more information, read "hg help diffs".
494
494
495 Returns 0 on success.
495 Returns 0 on success.
496
496
497 options ([+] can be repeated):
497 options ([+] can be repeated):
498
498
499 -r --rev REV [+] revision
499 -r --rev REV [+] revision
500 -c --change REV change made by revision
500 -c --change REV change made by revision
501 -a --text treat all files as text
501 -a --text treat all files as text
502 -g --git use git extended diff format
502 -g --git use git extended diff format
503 --nodates omit dates from diff headers
503 --nodates omit dates from diff headers
504 --noprefix omit a/ and b/ prefixes from filenames
504 --noprefix omit a/ and b/ prefixes from filenames
505 -p --show-function show which function each change is in
505 -p --show-function show which function each change is in
506 --reverse produce a diff that undoes the changes
506 --reverse produce a diff that undoes the changes
507 -w --ignore-all-space ignore white space when comparing lines
507 -w --ignore-all-space ignore white space when comparing lines
508 -b --ignore-space-change ignore changes in the amount of white space
508 -b --ignore-space-change ignore changes in the amount of white space
509 -B --ignore-blank-lines ignore changes whose lines are all blank
509 -B --ignore-blank-lines ignore changes whose lines are all blank
510 -U --unified NUM number of lines of context to show
510 -U --unified NUM number of lines of context to show
511 --stat output diffstat-style summary of changes
511 --stat output diffstat-style summary of changes
512 --root DIR produce diffs relative to subdirectory
512 --root DIR produce diffs relative to subdirectory
513 -I --include PATTERN [+] include names matching the given patterns
513 -I --include PATTERN [+] include names matching the given patterns
514 -X --exclude PATTERN [+] exclude names matching the given patterns
514 -X --exclude PATTERN [+] exclude names matching the given patterns
515 -S --subrepos recurse into subrepositories
515 -S --subrepos recurse into subrepositories
516
516
517 (some details hidden, use --verbose to show complete help)
517 (some details hidden, use --verbose to show complete help)
518
518
519 $ hg help status
519 $ hg help status
520 hg status [OPTION]... [FILE]...
520 hg status [OPTION]... [FILE]...
521
521
522 aliases: st
522 aliases: st
523
523
524 show changed files in the working directory
524 show changed files in the working directory
525
525
526 Show status of files in the repository. If names are given, only files
526 Show status of files in the repository. If names are given, only files
527 that match are shown. Files that are clean or ignored or the source of a
527 that match are shown. Files that are clean or ignored or the source of a
528 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
528 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
529 -C/--copies or -A/--all are given. Unless options described with "show
529 -C/--copies or -A/--all are given. Unless options described with "show
530 only ..." are given, the options -mardu are used.
530 only ..." are given, the options -mardu are used.
531
531
532 Option -q/--quiet hides untracked (unknown and ignored) files unless
532 Option -q/--quiet hides untracked (unknown and ignored) files unless
533 explicitly requested with -u/--unknown or -i/--ignored.
533 explicitly requested with -u/--unknown or -i/--ignored.
534
534
535 Note:
535 Note:
536 status may appear to disagree with diff if permissions have changed or
536 status may appear to disagree with diff if permissions have changed or
537 a merge has occurred. The standard diff format does not report
537 a merge has occurred. The standard diff format does not report
538 permission changes and diff only reports changes relative to one merge
538 permission changes and diff only reports changes relative to one merge
539 parent.
539 parent.
540
540
541 If one revision is given, it is used as the base revision. If two
541 If one revision is given, it is used as the base revision. If two
542 revisions are given, the differences between them are shown. The --change
542 revisions are given, the differences between them are shown. The --change
543 option can also be used as a shortcut to list the changed files of a
543 option can also be used as a shortcut to list the changed files of a
544 revision from its first parent.
544 revision from its first parent.
545
545
546 The codes used to show the status of files are:
546 The codes used to show the status of files are:
547
547
548 M = modified
548 M = modified
549 A = added
549 A = added
550 R = removed
550 R = removed
551 C = clean
551 C = clean
552 ! = missing (deleted by non-hg command, but still tracked)
552 ! = missing (deleted by non-hg command, but still tracked)
553 ? = not tracked
553 ? = not tracked
554 I = ignored
554 I = ignored
555 = origin of the previous file (with --copies)
555 = origin of the previous file (with --copies)
556
556
557 Returns 0 on success.
557 Returns 0 on success.
558
558
559 options ([+] can be repeated):
559 options ([+] can be repeated):
560
560
561 -A --all show status of all files
561 -A --all show status of all files
562 -m --modified show only modified files
562 -m --modified show only modified files
563 -a --added show only added files
563 -a --added show only added files
564 -r --removed show only removed files
564 -r --removed show only removed files
565 -d --deleted show only deleted (but tracked) files
565 -d --deleted show only deleted (but tracked) files
566 -c --clean show only files without changes
566 -c --clean show only files without changes
567 -u --unknown show only unknown (not tracked) files
567 -u --unknown show only unknown (not tracked) files
568 -i --ignored show only ignored files
568 -i --ignored show only ignored files
569 -n --no-status hide status prefix
569 -n --no-status hide status prefix
570 -C --copies show source of copied files
570 -C --copies show source of copied files
571 -0 --print0 end filenames with NUL, for use with xargs
571 -0 --print0 end filenames with NUL, for use with xargs
572 --rev REV [+] show difference from revision
572 --rev REV [+] show difference from revision
573 --change REV list the changed files of a revision
573 --change REV list the changed files of a revision
574 -I --include PATTERN [+] include names matching the given patterns
574 -I --include PATTERN [+] include names matching the given patterns
575 -X --exclude PATTERN [+] exclude names matching the given patterns
575 -X --exclude PATTERN [+] exclude names matching the given patterns
576 -S --subrepos recurse into subrepositories
576 -S --subrepos recurse into subrepositories
577
577
578 (some details hidden, use --verbose to show complete help)
578 (some details hidden, use --verbose to show complete help)
579
579
580 $ hg -q help status
580 $ hg -q help status
581 hg status [OPTION]... [FILE]...
581 hg status [OPTION]... [FILE]...
582
582
583 show changed files in the working directory
583 show changed files in the working directory
584
584
585 $ hg help foo
585 $ hg help foo
586 abort: no such help topic: foo
586 abort: no such help topic: foo
587 (try "hg help --keyword foo")
587 (try "hg help --keyword foo")
588 [255]
588 [255]
589
589
590 $ hg skjdfks
590 $ hg skjdfks
591 hg: unknown command 'skjdfks'
591 hg: unknown command 'skjdfks'
592 Mercurial Distributed SCM
592 Mercurial Distributed SCM
593
593
594 basic commands:
594 basic commands:
595
595
596 add add the specified files on the next commit
596 add add the specified files on the next commit
597 annotate show changeset information by line for each file
597 annotate show changeset information by line for each file
598 clone make a copy of an existing repository
598 clone make a copy of an existing repository
599 commit commit the specified files or all outstanding changes
599 commit commit the specified files or all outstanding changes
600 diff diff repository (or selected files)
600 diff diff repository (or selected files)
601 export dump the header and diffs for one or more changesets
601 export dump the header and diffs for one or more changesets
602 forget forget the specified files on the next commit
602 forget forget the specified files on the next commit
603 init create a new repository in the given directory
603 init create a new repository in the given directory
604 log show revision history of entire repository or files
604 log show revision history of entire repository or files
605 merge merge another revision into working directory
605 merge merge another revision into working directory
606 pull pull changes from the specified source
606 pull pull changes from the specified source
607 push push changes to the specified destination
607 push push changes to the specified destination
608 remove remove the specified files on the next commit
608 remove remove the specified files on the next commit
609 serve start stand-alone webserver
609 serve start stand-alone webserver
610 status show changed files in the working directory
610 status show changed files in the working directory
611 summary summarize working directory state
611 summary summarize working directory state
612 update update working directory (or switch revisions)
612 update update working directory (or switch revisions)
613
613
614 (use "hg help" for the full list of commands or "hg -v" for details)
614 (use "hg help" for the full list of commands or "hg -v" for details)
615 [255]
615 [255]
616
616
617
617
618 $ cat > helpext.py <<EOF
618 $ cat > helpext.py <<EOF
619 > import os
619 > import os
620 > from mercurial import cmdutil, commands
620 > from mercurial import cmdutil, commands
621 >
621 >
622 > cmdtable = {}
622 > cmdtable = {}
623 > command = cmdutil.command(cmdtable)
623 > command = cmdutil.command(cmdtable)
624 >
624 >
625 > @command('nohelp',
625 > @command('nohelp',
626 > [('', 'longdesc', 3, 'x'*90),
626 > [('', 'longdesc', 3, 'x'*90),
627 > ('n', '', None, 'normal desc'),
627 > ('n', '', None, 'normal desc'),
628 > ('', 'newline', '', 'line1\nline2')],
628 > ('', 'newline', '', 'line1\nline2')],
629 > 'hg nohelp',
629 > 'hg nohelp',
630 > norepo=True)
630 > norepo=True)
631 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
631 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
632 > @command('debugoptEXP', [('', 'eopt', None, 'option is EXPERIMENTAL')])
632 > def nohelp(ui, *args, **kwargs):
633 > def nohelp(ui, *args, **kwargs):
633 > pass
634 > pass
634 >
635 >
635 > EOF
636 > EOF
636 $ echo '[extensions]' >> $HGRCPATH
637 $ echo '[extensions]' >> $HGRCPATH
637 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
638 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
638
639
639 Test command with no help text
640 Test command with no help text
640
641
641 $ hg help nohelp
642 $ hg help nohelp
642 hg nohelp
643 hg nohelp
643
644
644 (no help text available)
645 (no help text available)
645
646
646 options:
647 options:
647
648
648 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
649 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
649 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
650 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
650 -n -- normal desc
651 -n -- normal desc
651 --newline VALUE line1 line2
652 --newline VALUE line1 line2
652
653
653 (some details hidden, use --verbose to show complete help)
654 (some details hidden, use --verbose to show complete help)
654
655
655 $ hg help -k nohelp
656 $ hg help -k nohelp
656 Commands:
657 Commands:
657
658
658 nohelp hg nohelp
659 nohelp hg nohelp
659
660
660 Extension Commands:
661 Extension Commands:
661
662
662 nohelp (no help text available)
663 nohelp (no help text available)
663
664
664 Test that default list of commands omits extension commands
665 Test that default list of commands omits extension commands
665
666
666 $ hg help
667 $ hg help
667 Mercurial Distributed SCM
668 Mercurial Distributed SCM
668
669
669 list of commands:
670 list of commands:
670
671
671 add add the specified files on the next commit
672 add add the specified files on the next commit
672 addremove add all new files, delete all missing files
673 addremove add all new files, delete all missing files
673 annotate show changeset information by line for each file
674 annotate show changeset information by line for each file
674 archive create an unversioned archive of a repository revision
675 archive create an unversioned archive of a repository revision
675 backout reverse effect of earlier changeset
676 backout reverse effect of earlier changeset
676 bisect subdivision search of changesets
677 bisect subdivision search of changesets
677 bookmarks create a new bookmark or list existing bookmarks
678 bookmarks create a new bookmark or list existing bookmarks
678 branch set or show the current branch name
679 branch set or show the current branch name
679 branches list repository named branches
680 branches list repository named branches
680 bundle create a changegroup file
681 bundle create a changegroup file
681 cat output the current or given revision of files
682 cat output the current or given revision of files
682 clone make a copy of an existing repository
683 clone make a copy of an existing repository
683 commit commit the specified files or all outstanding changes
684 commit commit the specified files or all outstanding changes
684 config show combined config settings from all hgrc files
685 config show combined config settings from all hgrc files
685 copy mark files as copied for the next commit
686 copy mark files as copied for the next commit
686 diff diff repository (or selected files)
687 diff diff repository (or selected files)
687 export dump the header and diffs for one or more changesets
688 export dump the header and diffs for one or more changesets
688 files list tracked files
689 files list tracked files
689 forget forget the specified files on the next commit
690 forget forget the specified files on the next commit
690 graft copy changes from other branches onto the current branch
691 graft copy changes from other branches onto the current branch
691 grep search for a pattern in specified files and revisions
692 grep search for a pattern in specified files and revisions
692 heads show branch heads
693 heads show branch heads
693 help show help for a given topic or a help overview
694 help show help for a given topic or a help overview
694 identify identify the working directory or specified revision
695 identify identify the working directory or specified revision
695 import import an ordered set of patches
696 import import an ordered set of patches
696 incoming show new changesets found in source
697 incoming show new changesets found in source
697 init create a new repository in the given directory
698 init create a new repository in the given directory
698 log show revision history of entire repository or files
699 log show revision history of entire repository or files
699 manifest output the current or given revision of the project manifest
700 manifest output the current or given revision of the project manifest
700 merge merge another revision into working directory
701 merge merge another revision into working directory
701 outgoing show changesets not found in the destination
702 outgoing show changesets not found in the destination
702 paths show aliases for remote repositories
703 paths show aliases for remote repositories
703 phase set or show the current phase name
704 phase set or show the current phase name
704 pull pull changes from the specified source
705 pull pull changes from the specified source
705 push push changes to the specified destination
706 push push changes to the specified destination
706 recover roll back an interrupted transaction
707 recover roll back an interrupted transaction
707 remove remove the specified files on the next commit
708 remove remove the specified files on the next commit
708 rename rename files; equivalent of copy + remove
709 rename rename files; equivalent of copy + remove
709 resolve redo merges or set/view the merge status of files
710 resolve redo merges or set/view the merge status of files
710 revert restore files to their checkout state
711 revert restore files to their checkout state
711 root print the root (top) of the current working directory
712 root print the root (top) of the current working directory
712 serve start stand-alone webserver
713 serve start stand-alone webserver
713 status show changed files in the working directory
714 status show changed files in the working directory
714 summary summarize working directory state
715 summary summarize working directory state
715 tag add one or more tags for the current or given revision
716 tag add one or more tags for the current or given revision
716 tags list repository tags
717 tags list repository tags
717 unbundle apply one or more changegroup files
718 unbundle apply one or more changegroup files
718 update update working directory (or switch revisions)
719 update update working directory (or switch revisions)
719 verify verify the integrity of the repository
720 verify verify the integrity of the repository
720 version output version and copyright information
721 version output version and copyright information
721
722
722 enabled extensions:
723 enabled extensions:
723
724
724 helpext (no help text available)
725 helpext (no help text available)
725
726
726 additional help topics:
727 additional help topics:
727
728
728 config Configuration Files
729 config Configuration Files
729 dates Date Formats
730 dates Date Formats
730 diffs Diff Formats
731 diffs Diff Formats
731 environment Environment Variables
732 environment Environment Variables
732 extensions Using Additional Features
733 extensions Using Additional Features
733 filesets Specifying File Sets
734 filesets Specifying File Sets
734 glossary Glossary
735 glossary Glossary
735 hgignore Syntax for Mercurial Ignore Files
736 hgignore Syntax for Mercurial Ignore Files
736 hgweb Configuring hgweb
737 hgweb Configuring hgweb
737 merge-tools Merge Tools
738 merge-tools Merge Tools
738 multirevs Specifying Multiple Revisions
739 multirevs Specifying Multiple Revisions
739 patterns File Name Patterns
740 patterns File Name Patterns
740 phases Working with Phases
741 phases Working with Phases
741 revisions Specifying Single Revisions
742 revisions Specifying Single Revisions
742 revsets Specifying Revision Sets
743 revsets Specifying Revision Sets
743 subrepos Subrepositories
744 subrepos Subrepositories
744 templating Template Usage
745 templating Template Usage
745 urls URL Paths
746 urls URL Paths
746
747
747 (use "hg help -v" to show built-in aliases and global options)
748 (use "hg help -v" to show built-in aliases and global options)
748
749
749
750
750 Test list of internal help commands
751 Test list of internal help commands
751
752
752 $ hg help debug
753 $ hg help debug
753 debug commands (internal and unsupported):
754 debug commands (internal and unsupported):
754
755
755 debugancestor
756 debugancestor
756 find the ancestor revision of two revisions in a given index
757 find the ancestor revision of two revisions in a given index
757 debugbuilddag
758 debugbuilddag
758 builds a repo with a given DAG from scratch in the current
759 builds a repo with a given DAG from scratch in the current
759 empty repo
760 empty repo
760 debugbundle lists the contents of a bundle
761 debugbundle lists the contents of a bundle
761 debugcheckstate
762 debugcheckstate
762 validate the correctness of the current dirstate
763 validate the correctness of the current dirstate
763 debugcommands
764 debugcommands
764 list all available commands and options
765 list all available commands and options
765 debugcomplete
766 debugcomplete
766 returns the completion list associated with the given command
767 returns the completion list associated with the given command
767 debugdag format the changelog or an index DAG as a concise textual
768 debugdag format the changelog or an index DAG as a concise textual
768 description
769 description
769 debugdata dump the contents of a data file revision
770 debugdata dump the contents of a data file revision
770 debugdate parse and display a date
771 debugdate parse and display a date
771 debugdirstate
772 debugdirstate
772 show the contents of the current dirstate
773 show the contents of the current dirstate
773 debugdiscovery
774 debugdiscovery
774 runs the changeset discovery protocol in isolation
775 runs the changeset discovery protocol in isolation
775 debugfileset parse and apply a fileset specification
776 debugfileset parse and apply a fileset specification
776 debugfsinfo show information detected about current filesystem
777 debugfsinfo show information detected about current filesystem
777 debuggetbundle
778 debuggetbundle
778 retrieves a bundle from a repo
779 retrieves a bundle from a repo
779 debugignore display the combined ignore pattern
780 debugignore display the combined ignore pattern
780 debugindex dump the contents of an index file
781 debugindex dump the contents of an index file
781 debugindexdot
782 debugindexdot
782 dump an index DAG as a graphviz dot file
783 dump an index DAG as a graphviz dot file
783 debuginstall test Mercurial installation
784 debuginstall test Mercurial installation
784 debugknown test whether node ids are known to a repo
785 debugknown test whether node ids are known to a repo
785 debuglocks show or modify state of locks
786 debuglocks show or modify state of locks
786 debugnamecomplete
787 debugnamecomplete
787 complete "names" - tags, open branch names, bookmark names
788 complete "names" - tags, open branch names, bookmark names
788 debugobsolete
789 debugobsolete
789 create arbitrary obsolete marker
790 create arbitrary obsolete marker
790 debugoptDEP (no help text available)
791 debugoptDEP (no help text available)
792 debugoptEXP (no help text available)
791 debugpathcomplete
793 debugpathcomplete
792 complete part or all of a tracked path
794 complete part or all of a tracked path
793 debugpushkey access the pushkey key/value protocol
795 debugpushkey access the pushkey key/value protocol
794 debugpvec (no help text available)
796 debugpvec (no help text available)
795 debugrebuilddirstate
797 debugrebuilddirstate
796 rebuild the dirstate as it would look like for the given
798 rebuild the dirstate as it would look like for the given
797 revision
799 revision
798 debugrename dump rename information
800 debugrename dump rename information
799 debugrevlog show data and statistics about a revlog
801 debugrevlog show data and statistics about a revlog
800 debugrevspec parse and apply a revision specification
802 debugrevspec parse and apply a revision specification
801 debugsetparents
803 debugsetparents
802 manually set the parents of the current working directory
804 manually set the parents of the current working directory
803 debugsub (no help text available)
805 debugsub (no help text available)
804 debugsuccessorssets
806 debugsuccessorssets
805 show set of successors for revision
807 show set of successors for revision
806 debugwalk show how files match on given patterns
808 debugwalk show how files match on given patterns
807 debugwireargs
809 debugwireargs
808 (no help text available)
810 (no help text available)
809
811
810 (use "hg help -v debug" to show built-in aliases and global options)
812 (use "hg help -v debug" to show built-in aliases and global options)
811
813
812
814
813 Test list of commands with command with no help text
815 Test list of commands with command with no help text
814
816
815 $ hg help helpext
817 $ hg help helpext
816 helpext extension - no help text available
818 helpext extension - no help text available
817
819
818 list of commands:
820 list of commands:
819
821
820 nohelp (no help text available)
822 nohelp (no help text available)
821
823
822 (use "hg help -v helpext" to show built-in aliases and global options)
824 (use "hg help -v helpext" to show built-in aliases and global options)
823
825
824
826
825 test deprecated option is hidden in command help
827 test deprecated and experimental options are hidden in command help
826 $ hg help debugoptDEP
828 $ hg help debugoptDEP
827 hg debugoptDEP
829 hg debugoptDEP
828
830
829 (no help text available)
831 (no help text available)
830
832
831 options:
833 options:
832
834
833 (some details hidden, use --verbose to show complete help)
835 (some details hidden, use --verbose to show complete help)
834
836
835 test deprecated option is shown with -v
837 $ hg help debugoptEXP
838 hg debugoptEXP
839
840 (no help text available)
841
842 options:
843
844 (some details hidden, use --verbose to show complete help)
845
846 test deprecated and experimental options is shown with -v
836 $ hg help -v debugoptDEP | grep dopt
847 $ hg help -v debugoptDEP | grep dopt
837 --dopt option is DEPRECATED
848 --dopt option is DEPRECATED
849 $ hg help -v debugoptEXP | grep eopt
850 --eopt option is EXPERIMENTAL
838
851
839 #if gettext
852 #if gettext
840 test deprecated option is hidden with translation with untranslated description
853 test deprecated option is hidden with translation with untranslated description
841 (use many globy for not failing on changed transaction)
854 (use many globy for not failing on changed transaction)
842 $ LANGUAGE=sv hg help debugoptDEP
855 $ LANGUAGE=sv hg help debugoptDEP
843 hg debugoptDEP
856 hg debugoptDEP
844
857
845 (*) (glob)
858 (*) (glob)
846
859
847 options:
860 options:
848
861
849 (some details hidden, use --verbose to show complete help)
862 (some details hidden, use --verbose to show complete help)
850 #endif
863 #endif
851
864
852 Test commands that collide with topics (issue4240)
865 Test commands that collide with topics (issue4240)
853
866
854 $ hg config -hq
867 $ hg config -hq
855 hg config [-u] [NAME]...
868 hg config [-u] [NAME]...
856
869
857 show combined config settings from all hgrc files
870 show combined config settings from all hgrc files
858 $ hg showconfig -hq
871 $ hg showconfig -hq
859 hg config [-u] [NAME]...
872 hg config [-u] [NAME]...
860
873
861 show combined config settings from all hgrc files
874 show combined config settings from all hgrc files
862
875
863 Test a help topic
876 Test a help topic
864
877
865 $ hg help revs
878 $ hg help revs
866 Specifying Single Revisions
879 Specifying Single Revisions
867 """""""""""""""""""""""""""
880 """""""""""""""""""""""""""
868
881
869 Mercurial supports several ways to specify individual revisions.
882 Mercurial supports several ways to specify individual revisions.
870
883
871 A plain integer is treated as a revision number. Negative integers are
884 A plain integer is treated as a revision number. Negative integers are
872 treated as sequential offsets from the tip, with -1 denoting the tip, -2
885 treated as sequential offsets from the tip, with -1 denoting the tip, -2
873 denoting the revision prior to the tip, and so forth.
886 denoting the revision prior to the tip, and so forth.
874
887
875 A 40-digit hexadecimal string is treated as a unique revision identifier.
888 A 40-digit hexadecimal string is treated as a unique revision identifier.
876
889
877 A hexadecimal string less than 40 characters long is treated as a unique
890 A hexadecimal string less than 40 characters long is treated as a unique
878 revision identifier and is referred to as a short-form identifier. A
891 revision identifier and is referred to as a short-form identifier. A
879 short-form identifier is only valid if it is the prefix of exactly one
892 short-form identifier is only valid if it is the prefix of exactly one
880 full-length identifier.
893 full-length identifier.
881
894
882 Any other string is treated as a bookmark, tag, or branch name. A bookmark
895 Any other string is treated as a bookmark, tag, or branch name. A bookmark
883 is a movable pointer to a revision. A tag is a permanent name associated
896 is a movable pointer to a revision. A tag is a permanent name associated
884 with a revision. A branch name denotes the tipmost open branch head of
897 with a revision. A branch name denotes the tipmost open branch head of
885 that branch - or if they are all closed, the tipmost closed head of the
898 that branch - or if they are all closed, the tipmost closed head of the
886 branch. Bookmark, tag, and branch names must not contain the ":"
899 branch. Bookmark, tag, and branch names must not contain the ":"
887 character.
900 character.
888
901
889 The reserved name "tip" always identifies the most recent revision.
902 The reserved name "tip" always identifies the most recent revision.
890
903
891 The reserved name "null" indicates the null revision. This is the revision
904 The reserved name "null" indicates the null revision. This is the revision
892 of an empty repository, and the parent of revision 0.
905 of an empty repository, and the parent of revision 0.
893
906
894 The reserved name "." indicates the working directory parent. If no
907 The reserved name "." indicates the working directory parent. If no
895 working directory is checked out, it is equivalent to null. If an
908 working directory is checked out, it is equivalent to null. If an
896 uncommitted merge is in progress, "." is the revision of the first parent.
909 uncommitted merge is in progress, "." is the revision of the first parent.
897
910
898 Test templating help
911 Test templating help
899
912
900 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
913 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
901 desc String. The text of the changeset description.
914 desc String. The text of the changeset description.
902 diffstat String. Statistics of changes with the following format:
915 diffstat String. Statistics of changes with the following format:
903 firstline Any text. Returns the first line of text.
916 firstline Any text. Returns the first line of text.
904 nonempty Any text. Returns '(none)' if the string is empty.
917 nonempty Any text. Returns '(none)' if the string is empty.
905
918
906 Test help hooks
919 Test help hooks
907
920
908 $ cat > helphook1.py <<EOF
921 $ cat > helphook1.py <<EOF
909 > from mercurial import help
922 > from mercurial import help
910 >
923 >
911 > def rewrite(topic, doc):
924 > def rewrite(topic, doc):
912 > return doc + '\nhelphook1\n'
925 > return doc + '\nhelphook1\n'
913 >
926 >
914 > def extsetup(ui):
927 > def extsetup(ui):
915 > help.addtopichook('revsets', rewrite)
928 > help.addtopichook('revsets', rewrite)
916 > EOF
929 > EOF
917 $ cat > helphook2.py <<EOF
930 $ cat > helphook2.py <<EOF
918 > from mercurial import help
931 > from mercurial import help
919 >
932 >
920 > def rewrite(topic, doc):
933 > def rewrite(topic, doc):
921 > return doc + '\nhelphook2\n'
934 > return doc + '\nhelphook2\n'
922 >
935 >
923 > def extsetup(ui):
936 > def extsetup(ui):
924 > help.addtopichook('revsets', rewrite)
937 > help.addtopichook('revsets', rewrite)
925 > EOF
938 > EOF
926 $ echo '[extensions]' >> $HGRCPATH
939 $ echo '[extensions]' >> $HGRCPATH
927 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
940 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
928 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
941 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
929 $ hg help revsets | grep helphook
942 $ hg help revsets | grep helphook
930 helphook1
943 helphook1
931 helphook2
944 helphook2
932
945
933 Test keyword search help
946 Test keyword search help
934
947
935 $ cat > prefixedname.py <<EOF
948 $ cat > prefixedname.py <<EOF
936 > '''matched against word "clone"
949 > '''matched against word "clone"
937 > '''
950 > '''
938 > EOF
951 > EOF
939 $ echo '[extensions]' >> $HGRCPATH
952 $ echo '[extensions]' >> $HGRCPATH
940 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
953 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
941 $ hg help -k clone
954 $ hg help -k clone
942 Topics:
955 Topics:
943
956
944 config Configuration Files
957 config Configuration Files
945 extensions Using Additional Features
958 extensions Using Additional Features
946 glossary Glossary
959 glossary Glossary
947 phases Working with Phases
960 phases Working with Phases
948 subrepos Subrepositories
961 subrepos Subrepositories
949 urls URL Paths
962 urls URL Paths
950
963
951 Commands:
964 Commands:
952
965
953 bookmarks create a new bookmark or list existing bookmarks
966 bookmarks create a new bookmark or list existing bookmarks
954 clone make a copy of an existing repository
967 clone make a copy of an existing repository
955 paths show aliases for remote repositories
968 paths show aliases for remote repositories
956 update update working directory (or switch revisions)
969 update update working directory (or switch revisions)
957
970
958 Extensions:
971 Extensions:
959
972
960 prefixedname matched against word "clone"
973 prefixedname matched against word "clone"
961 relink recreates hardlinks between repository clones
974 relink recreates hardlinks between repository clones
962
975
963 Extension Commands:
976 Extension Commands:
964
977
965 qclone clone main and patch repository at same time
978 qclone clone main and patch repository at same time
966
979
967 Test unfound topic
980 Test unfound topic
968
981
969 $ hg help nonexistingtopicthatwillneverexisteverever
982 $ hg help nonexistingtopicthatwillneverexisteverever
970 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
983 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
971 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
984 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
972 [255]
985 [255]
973
986
974 Test unfound keyword
987 Test unfound keyword
975
988
976 $ hg help --keyword nonexistingwordthatwillneverexisteverever
989 $ hg help --keyword nonexistingwordthatwillneverexisteverever
977 abort: no matches
990 abort: no matches
978 (try "hg help" for a list of topics)
991 (try "hg help" for a list of topics)
979 [255]
992 [255]
980
993
981 Test omit indicating for help
994 Test omit indicating for help
982
995
983 $ cat > addverboseitems.py <<EOF
996 $ cat > addverboseitems.py <<EOF
984 > '''extension to test omit indicating.
997 > '''extension to test omit indicating.
985 >
998 >
986 > This paragraph is never omitted (for extension)
999 > This paragraph is never omitted (for extension)
987 >
1000 >
988 > .. container:: verbose
1001 > .. container:: verbose
989 >
1002 >
990 > This paragraph is omitted,
1003 > This paragraph is omitted,
991 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1004 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
992 >
1005 >
993 > This paragraph is never omitted, too (for extension)
1006 > This paragraph is never omitted, too (for extension)
994 > '''
1007 > '''
995 >
1008 >
996 > from mercurial import help, commands
1009 > from mercurial import help, commands
997 > testtopic = """This paragraph is never omitted (for topic).
1010 > testtopic = """This paragraph is never omitted (for topic).
998 >
1011 >
999 > .. container:: verbose
1012 > .. container:: verbose
1000 >
1013 >
1001 > This paragraph is omitted,
1014 > This paragraph is omitted,
1002 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1015 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1003 >
1016 >
1004 > This paragraph is never omitted, too (for topic)
1017 > This paragraph is never omitted, too (for topic)
1005 > """
1018 > """
1006 > def extsetup(ui):
1019 > def extsetup(ui):
1007 > help.helptable.append((["topic-containing-verbose"],
1020 > help.helptable.append((["topic-containing-verbose"],
1008 > "This is the topic to test omit indicating.",
1021 > "This is the topic to test omit indicating.",
1009 > lambda : testtopic))
1022 > lambda : testtopic))
1010 > EOF
1023 > EOF
1011 $ echo '[extensions]' >> $HGRCPATH
1024 $ echo '[extensions]' >> $HGRCPATH
1012 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1025 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1013 $ hg help addverboseitems
1026 $ hg help addverboseitems
1014 addverboseitems extension - extension to test omit indicating.
1027 addverboseitems extension - extension to test omit indicating.
1015
1028
1016 This paragraph is never omitted (for extension)
1029 This paragraph is never omitted (for extension)
1017
1030
1018 This paragraph is never omitted, too (for extension)
1031 This paragraph is never omitted, too (for extension)
1019
1032
1020 (some details hidden, use --verbose to show complete help)
1033 (some details hidden, use --verbose to show complete help)
1021
1034
1022 no commands defined
1035 no commands defined
1023 $ hg help -v addverboseitems
1036 $ hg help -v addverboseitems
1024 addverboseitems extension - extension to test omit indicating.
1037 addverboseitems extension - extension to test omit indicating.
1025
1038
1026 This paragraph is never omitted (for extension)
1039 This paragraph is never omitted (for extension)
1027
1040
1028 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1041 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1029 extension)
1042 extension)
1030
1043
1031 This paragraph is never omitted, too (for extension)
1044 This paragraph is never omitted, too (for extension)
1032
1045
1033 no commands defined
1046 no commands defined
1034 $ hg help topic-containing-verbose
1047 $ hg help topic-containing-verbose
1035 This is the topic to test omit indicating.
1048 This is the topic to test omit indicating.
1036 """"""""""""""""""""""""""""""""""""""""""
1049 """"""""""""""""""""""""""""""""""""""""""
1037
1050
1038 This paragraph is never omitted (for topic).
1051 This paragraph is never omitted (for topic).
1039
1052
1040 This paragraph is never omitted, too (for topic)
1053 This paragraph is never omitted, too (for topic)
1041
1054
1042 (some details hidden, use --verbose to show complete help)
1055 (some details hidden, use --verbose to show complete help)
1043 $ hg help -v topic-containing-verbose
1056 $ hg help -v topic-containing-verbose
1044 This is the topic to test omit indicating.
1057 This is the topic to test omit indicating.
1045 """"""""""""""""""""""""""""""""""""""""""
1058 """"""""""""""""""""""""""""""""""""""""""
1046
1059
1047 This paragraph is never omitted (for topic).
1060 This paragraph is never omitted (for topic).
1048
1061
1049 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1062 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1050 topic)
1063 topic)
1051
1064
1052 This paragraph is never omitted, too (for topic)
1065 This paragraph is never omitted, too (for topic)
1053
1066
1054 Test section lookup
1067 Test section lookup
1055
1068
1056 $ hg help revset.merge
1069 $ hg help revset.merge
1057 "merge()"
1070 "merge()"
1058 Changeset is a merge changeset.
1071 Changeset is a merge changeset.
1059
1072
1060 $ hg help glossary.dag
1073 $ hg help glossary.dag
1061 DAG
1074 DAG
1062 The repository of changesets of a distributed version control system
1075 The repository of changesets of a distributed version control system
1063 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1076 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1064 of nodes and edges, where nodes correspond to changesets and edges
1077 of nodes and edges, where nodes correspond to changesets and edges
1065 imply a parent -> child relation. This graph can be visualized by
1078 imply a parent -> child relation. This graph can be visualized by
1066 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1079 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1067 limited by the requirement for children to have at most two parents.
1080 limited by the requirement for children to have at most two parents.
1068
1081
1069
1082
1070 $ hg help hgrc.paths
1083 $ hg help hgrc.paths
1071 "paths"
1084 "paths"
1072 -------
1085 -------
1073
1086
1074 Assigns symbolic names to repositories. The left side is the symbolic
1087 Assigns symbolic names to repositories. The left side is the symbolic
1075 name, and the right gives the directory or URL that is the location of the
1088 name, and the right gives the directory or URL that is the location of the
1076 repository. Default paths can be declared by setting the following
1089 repository. Default paths can be declared by setting the following
1077 entries.
1090 entries.
1078
1091
1079 "default"
1092 "default"
1080 Directory or URL to use when pulling if no source is specified.
1093 Directory or URL to use when pulling if no source is specified.
1081 Default is set to repository from which the current repository was
1094 Default is set to repository from which the current repository was
1082 cloned.
1095 cloned.
1083
1096
1084 "default-push"
1097 "default-push"
1085 Optional. Directory or URL to use when pushing if no destination is
1098 Optional. Directory or URL to use when pushing if no destination is
1086 specified.
1099 specified.
1087
1100
1088 Custom paths can be defined by assigning the path to a name that later can
1101 Custom paths can be defined by assigning the path to a name that later can
1089 be used from the command line. Example:
1102 be used from the command line. Example:
1090
1103
1091 [paths]
1104 [paths]
1092 my_path = http://example.com/path
1105 my_path = http://example.com/path
1093
1106
1094 To push to the path defined in "my_path" run the command:
1107 To push to the path defined in "my_path" run the command:
1095
1108
1096 hg push my_path
1109 hg push my_path
1097
1110
1098 $ hg help glossary.mcguffin
1111 $ hg help glossary.mcguffin
1099 abort: help section not found
1112 abort: help section not found
1100 [255]
1113 [255]
1101
1114
1102 $ hg help glossary.mc.guffin
1115 $ hg help glossary.mc.guffin
1103 abort: help section not found
1116 abort: help section not found
1104 [255]
1117 [255]
1105
1118
1106 Test dynamic list of merge tools only shows up once
1119 Test dynamic list of merge tools only shows up once
1107 $ hg help merge-tools
1120 $ hg help merge-tools
1108 Merge Tools
1121 Merge Tools
1109 """""""""""
1122 """""""""""
1110
1123
1111 To merge files Mercurial uses merge tools.
1124 To merge files Mercurial uses merge tools.
1112
1125
1113 A merge tool combines two different versions of a file into a merged file.
1126 A merge tool combines two different versions of a file into a merged file.
1114 Merge tools are given the two files and the greatest common ancestor of
1127 Merge tools are given the two files and the greatest common ancestor of
1115 the two file versions, so they can determine the changes made on both
1128 the two file versions, so they can determine the changes made on both
1116 branches.
1129 branches.
1117
1130
1118 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1131 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1119 backout" and in several extensions.
1132 backout" and in several extensions.
1120
1133
1121 Usually, the merge tool tries to automatically reconcile the files by
1134 Usually, the merge tool tries to automatically reconcile the files by
1122 combining all non-overlapping changes that occurred separately in the two
1135 combining all non-overlapping changes that occurred separately in the two
1123 different evolutions of the same initial base file. Furthermore, some
1136 different evolutions of the same initial base file. Furthermore, some
1124 interactive merge programs make it easier to manually resolve conflicting
1137 interactive merge programs make it easier to manually resolve conflicting
1125 merges, either in a graphical way, or by inserting some conflict markers.
1138 merges, either in a graphical way, or by inserting some conflict markers.
1126 Mercurial does not include any interactive merge programs but relies on
1139 Mercurial does not include any interactive merge programs but relies on
1127 external tools for that.
1140 external tools for that.
1128
1141
1129 Available merge tools
1142 Available merge tools
1130 =====================
1143 =====================
1131
1144
1132 External merge tools and their properties are configured in the merge-
1145 External merge tools and their properties are configured in the merge-
1133 tools configuration section - see hgrc(5) - but they can often just be
1146 tools configuration section - see hgrc(5) - but they can often just be
1134 named by their executable.
1147 named by their executable.
1135
1148
1136 A merge tool is generally usable if its executable can be found on the
1149 A merge tool is generally usable if its executable can be found on the
1137 system and if it can handle the merge. The executable is found if it is an
1150 system and if it can handle the merge. The executable is found if it is an
1138 absolute or relative executable path or the name of an application in the
1151 absolute or relative executable path or the name of an application in the
1139 executable search path. The tool is assumed to be able to handle the merge
1152 executable search path. The tool is assumed to be able to handle the merge
1140 if it can handle symlinks if the file is a symlink, if it can handle
1153 if it can handle symlinks if the file is a symlink, if it can handle
1141 binary files if the file is binary, and if a GUI is available if the tool
1154 binary files if the file is binary, and if a GUI is available if the tool
1142 requires a GUI.
1155 requires a GUI.
1143
1156
1144 There are some internal merge tools which can be used. The internal merge
1157 There are some internal merge tools which can be used. The internal merge
1145 tools are:
1158 tools are:
1146
1159
1147 ":dump"
1160 ":dump"
1148 Creates three versions of the files to merge, containing the contents of
1161 Creates three versions of the files to merge, containing the contents of
1149 local, other and base. These files can then be used to perform a merge
1162 local, other and base. These files can then be used to perform a merge
1150 manually. If the file to be merged is named "a.txt", these files will
1163 manually. If the file to be merged is named "a.txt", these files will
1151 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1164 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1152 they will be placed in the same directory as "a.txt".
1165 they will be placed in the same directory as "a.txt".
1153
1166
1154 ":fail"
1167 ":fail"
1155 Rather than attempting to merge files that were modified on both
1168 Rather than attempting to merge files that were modified on both
1156 branches, it marks them as unresolved. The resolve command must be used
1169 branches, it marks them as unresolved. The resolve command must be used
1157 to resolve these conflicts.
1170 to resolve these conflicts.
1158
1171
1159 ":local"
1172 ":local"
1160 Uses the local version of files as the merged version.
1173 Uses the local version of files as the merged version.
1161
1174
1162 ":merge"
1175 ":merge"
1163 Uses the internal non-interactive simple merge algorithm for merging
1176 Uses the internal non-interactive simple merge algorithm for merging
1164 files. It will fail if there are any conflicts and leave markers in the
1177 files. It will fail if there are any conflicts and leave markers in the
1165 partially merged file. Markers will have two sections, one for each side
1178 partially merged file. Markers will have two sections, one for each side
1166 of merge.
1179 of merge.
1167
1180
1168 ":merge3"
1181 ":merge3"
1169 Uses the internal non-interactive simple merge algorithm for merging
1182 Uses the internal non-interactive simple merge algorithm for merging
1170 files. It will fail if there are any conflicts and leave markers in the
1183 files. It will fail if there are any conflicts and leave markers in the
1171 partially merged file. Marker will have three sections, one from each
1184 partially merged file. Marker will have three sections, one from each
1172 side of the merge and one for the base content.
1185 side of the merge and one for the base content.
1173
1186
1174 ":other"
1187 ":other"
1175 Uses the other version of files as the merged version.
1188 Uses the other version of files as the merged version.
1176
1189
1177 ":prompt"
1190 ":prompt"
1178 Asks the user which of the local or the other version to keep as the
1191 Asks the user which of the local or the other version to keep as the
1179 merged version.
1192 merged version.
1180
1193
1181 ":tagmerge"
1194 ":tagmerge"
1182 Uses the internal tag merge algorithm (experimental).
1195 Uses the internal tag merge algorithm (experimental).
1183
1196
1184 Internal tools are always available and do not require a GUI but will by
1197 Internal tools are always available and do not require a GUI but will by
1185 default not handle symlinks or binary files.
1198 default not handle symlinks or binary files.
1186
1199
1187 Choosing a merge tool
1200 Choosing a merge tool
1188 =====================
1201 =====================
1189
1202
1190 Mercurial uses these rules when deciding which merge tool to use:
1203 Mercurial uses these rules when deciding which merge tool to use:
1191
1204
1192 1. If a tool has been specified with the --tool option to merge or
1205 1. If a tool has been specified with the --tool option to merge or
1193 resolve, it is used. If it is the name of a tool in the merge-tools
1206 resolve, it is used. If it is the name of a tool in the merge-tools
1194 configuration, its configuration is used. Otherwise the specified tool
1207 configuration, its configuration is used. Otherwise the specified tool
1195 must be executable by the shell.
1208 must be executable by the shell.
1196 2. If the "HGMERGE" environment variable is present, its value is used and
1209 2. If the "HGMERGE" environment variable is present, its value is used and
1197 must be executable by the shell.
1210 must be executable by the shell.
1198 3. If the filename of the file to be merged matches any of the patterns in
1211 3. If the filename of the file to be merged matches any of the patterns in
1199 the merge-patterns configuration section, the first usable merge tool
1212 the merge-patterns configuration section, the first usable merge tool
1200 corresponding to a matching pattern is used. Here, binary capabilities
1213 corresponding to a matching pattern is used. Here, binary capabilities
1201 of the merge tool are not considered.
1214 of the merge tool are not considered.
1202 4. If ui.merge is set it will be considered next. If the value is not the
1215 4. If ui.merge is set it will be considered next. If the value is not the
1203 name of a configured tool, the specified value is used and must be
1216 name of a configured tool, the specified value is used and must be
1204 executable by the shell. Otherwise the named tool is used if it is
1217 executable by the shell. Otherwise the named tool is used if it is
1205 usable.
1218 usable.
1206 5. If any usable merge tools are present in the merge-tools configuration
1219 5. If any usable merge tools are present in the merge-tools configuration
1207 section, the one with the highest priority is used.
1220 section, the one with the highest priority is used.
1208 6. If a program named "hgmerge" can be found on the system, it is used -
1221 6. If a program named "hgmerge" can be found on the system, it is used -
1209 but it will by default not be used for symlinks and binary files.
1222 but it will by default not be used for symlinks and binary files.
1210 7. If the file to be merged is not binary and is not a symlink, then
1223 7. If the file to be merged is not binary and is not a symlink, then
1211 internal ":merge" is used.
1224 internal ":merge" is used.
1212 8. The merge of the file fails and must be resolved before commit.
1225 8. The merge of the file fails and must be resolved before commit.
1213
1226
1214 Note:
1227 Note:
1215 After selecting a merge program, Mercurial will by default attempt to
1228 After selecting a merge program, Mercurial will by default attempt to
1216 merge the files using a simple merge algorithm first. Only if it
1229 merge the files using a simple merge algorithm first. Only if it
1217 doesn't succeed because of conflicting changes Mercurial will actually
1230 doesn't succeed because of conflicting changes Mercurial will actually
1218 execute the merge program. Whether to use the simple merge algorithm
1231 execute the merge program. Whether to use the simple merge algorithm
1219 first can be controlled by the premerge setting of the merge tool.
1232 first can be controlled by the premerge setting of the merge tool.
1220 Premerge is enabled by default unless the file is binary or a symlink.
1233 Premerge is enabled by default unless the file is binary or a symlink.
1221
1234
1222 See the merge-tools and ui sections of hgrc(5) for details on the
1235 See the merge-tools and ui sections of hgrc(5) for details on the
1223 configuration of merge tools.
1236 configuration of merge tools.
1224
1237
1225 Test usage of section marks in help documents
1238 Test usage of section marks in help documents
1226
1239
1227 $ cd "$TESTDIR"/../doc
1240 $ cd "$TESTDIR"/../doc
1228 $ python check-seclevel.py
1241 $ python check-seclevel.py
1229 $ cd $TESTTMP
1242 $ cd $TESTTMP
1230
1243
1231 #if serve
1244 #if serve
1232
1245
1233 Test the help pages in hgweb.
1246 Test the help pages in hgweb.
1234
1247
1235 Dish up an empty repo; serve it cold.
1248 Dish up an empty repo; serve it cold.
1236
1249
1237 $ hg init "$TESTTMP/test"
1250 $ hg init "$TESTTMP/test"
1238 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1251 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1239 $ cat hg.pid >> $DAEMON_PIDS
1252 $ cat hg.pid >> $DAEMON_PIDS
1240
1253
1241 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
1254 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
1242 200 Script output follows
1255 200 Script output follows
1243
1256
1244 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1257 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1245 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1258 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1246 <head>
1259 <head>
1247 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1260 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1248 <meta name="robots" content="index, nofollow" />
1261 <meta name="robots" content="index, nofollow" />
1249 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1262 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1250 <script type="text/javascript" src="/static/mercurial.js"></script>
1263 <script type="text/javascript" src="/static/mercurial.js"></script>
1251
1264
1252 <title>Help: Index</title>
1265 <title>Help: Index</title>
1253 </head>
1266 </head>
1254 <body>
1267 <body>
1255
1268
1256 <div class="container">
1269 <div class="container">
1257 <div class="menu">
1270 <div class="menu">
1258 <div class="logo">
1271 <div class="logo">
1259 <a href="http://mercurial.selenic.com/">
1272 <a href="http://mercurial.selenic.com/">
1260 <img src="/static/hglogo.png" alt="mercurial" /></a>
1273 <img src="/static/hglogo.png" alt="mercurial" /></a>
1261 </div>
1274 </div>
1262 <ul>
1275 <ul>
1263 <li><a href="/shortlog">log</a></li>
1276 <li><a href="/shortlog">log</a></li>
1264 <li><a href="/graph">graph</a></li>
1277 <li><a href="/graph">graph</a></li>
1265 <li><a href="/tags">tags</a></li>
1278 <li><a href="/tags">tags</a></li>
1266 <li><a href="/bookmarks">bookmarks</a></li>
1279 <li><a href="/bookmarks">bookmarks</a></li>
1267 <li><a href="/branches">branches</a></li>
1280 <li><a href="/branches">branches</a></li>
1268 </ul>
1281 </ul>
1269 <ul>
1282 <ul>
1270 <li class="active">help</li>
1283 <li class="active">help</li>
1271 </ul>
1284 </ul>
1272 </div>
1285 </div>
1273
1286
1274 <div class="main">
1287 <div class="main">
1275 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1288 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1276 <form class="search" action="/log">
1289 <form class="search" action="/log">
1277
1290
1278 <p><input name="rev" id="search1" type="text" size="30" /></p>
1291 <p><input name="rev" id="search1" type="text" size="30" /></p>
1279 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1292 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1280 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1293 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1281 </form>
1294 </form>
1282 <table class="bigtable">
1295 <table class="bigtable">
1283 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1296 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1284
1297
1285 <tr><td>
1298 <tr><td>
1286 <a href="/help/config">
1299 <a href="/help/config">
1287 config
1300 config
1288 </a>
1301 </a>
1289 </td><td>
1302 </td><td>
1290 Configuration Files
1303 Configuration Files
1291 </td></tr>
1304 </td></tr>
1292 <tr><td>
1305 <tr><td>
1293 <a href="/help/dates">
1306 <a href="/help/dates">
1294 dates
1307 dates
1295 </a>
1308 </a>
1296 </td><td>
1309 </td><td>
1297 Date Formats
1310 Date Formats
1298 </td></tr>
1311 </td></tr>
1299 <tr><td>
1312 <tr><td>
1300 <a href="/help/diffs">
1313 <a href="/help/diffs">
1301 diffs
1314 diffs
1302 </a>
1315 </a>
1303 </td><td>
1316 </td><td>
1304 Diff Formats
1317 Diff Formats
1305 </td></tr>
1318 </td></tr>
1306 <tr><td>
1319 <tr><td>
1307 <a href="/help/environment">
1320 <a href="/help/environment">
1308 environment
1321 environment
1309 </a>
1322 </a>
1310 </td><td>
1323 </td><td>
1311 Environment Variables
1324 Environment Variables
1312 </td></tr>
1325 </td></tr>
1313 <tr><td>
1326 <tr><td>
1314 <a href="/help/extensions">
1327 <a href="/help/extensions">
1315 extensions
1328 extensions
1316 </a>
1329 </a>
1317 </td><td>
1330 </td><td>
1318 Using Additional Features
1331 Using Additional Features
1319 </td></tr>
1332 </td></tr>
1320 <tr><td>
1333 <tr><td>
1321 <a href="/help/filesets">
1334 <a href="/help/filesets">
1322 filesets
1335 filesets
1323 </a>
1336 </a>
1324 </td><td>
1337 </td><td>
1325 Specifying File Sets
1338 Specifying File Sets
1326 </td></tr>
1339 </td></tr>
1327 <tr><td>
1340 <tr><td>
1328 <a href="/help/glossary">
1341 <a href="/help/glossary">
1329 glossary
1342 glossary
1330 </a>
1343 </a>
1331 </td><td>
1344 </td><td>
1332 Glossary
1345 Glossary
1333 </td></tr>
1346 </td></tr>
1334 <tr><td>
1347 <tr><td>
1335 <a href="/help/hgignore">
1348 <a href="/help/hgignore">
1336 hgignore
1349 hgignore
1337 </a>
1350 </a>
1338 </td><td>
1351 </td><td>
1339 Syntax for Mercurial Ignore Files
1352 Syntax for Mercurial Ignore Files
1340 </td></tr>
1353 </td></tr>
1341 <tr><td>
1354 <tr><td>
1342 <a href="/help/hgweb">
1355 <a href="/help/hgweb">
1343 hgweb
1356 hgweb
1344 </a>
1357 </a>
1345 </td><td>
1358 </td><td>
1346 Configuring hgweb
1359 Configuring hgweb
1347 </td></tr>
1360 </td></tr>
1348 <tr><td>
1361 <tr><td>
1349 <a href="/help/merge-tools">
1362 <a href="/help/merge-tools">
1350 merge-tools
1363 merge-tools
1351 </a>
1364 </a>
1352 </td><td>
1365 </td><td>
1353 Merge Tools
1366 Merge Tools
1354 </td></tr>
1367 </td></tr>
1355 <tr><td>
1368 <tr><td>
1356 <a href="/help/multirevs">
1369 <a href="/help/multirevs">
1357 multirevs
1370 multirevs
1358 </a>
1371 </a>
1359 </td><td>
1372 </td><td>
1360 Specifying Multiple Revisions
1373 Specifying Multiple Revisions
1361 </td></tr>
1374 </td></tr>
1362 <tr><td>
1375 <tr><td>
1363 <a href="/help/patterns">
1376 <a href="/help/patterns">
1364 patterns
1377 patterns
1365 </a>
1378 </a>
1366 </td><td>
1379 </td><td>
1367 File Name Patterns
1380 File Name Patterns
1368 </td></tr>
1381 </td></tr>
1369 <tr><td>
1382 <tr><td>
1370 <a href="/help/phases">
1383 <a href="/help/phases">
1371 phases
1384 phases
1372 </a>
1385 </a>
1373 </td><td>
1386 </td><td>
1374 Working with Phases
1387 Working with Phases
1375 </td></tr>
1388 </td></tr>
1376 <tr><td>
1389 <tr><td>
1377 <a href="/help/revisions">
1390 <a href="/help/revisions">
1378 revisions
1391 revisions
1379 </a>
1392 </a>
1380 </td><td>
1393 </td><td>
1381 Specifying Single Revisions
1394 Specifying Single Revisions
1382 </td></tr>
1395 </td></tr>
1383 <tr><td>
1396 <tr><td>
1384 <a href="/help/revsets">
1397 <a href="/help/revsets">
1385 revsets
1398 revsets
1386 </a>
1399 </a>
1387 </td><td>
1400 </td><td>
1388 Specifying Revision Sets
1401 Specifying Revision Sets
1389 </td></tr>
1402 </td></tr>
1390 <tr><td>
1403 <tr><td>
1391 <a href="/help/subrepos">
1404 <a href="/help/subrepos">
1392 subrepos
1405 subrepos
1393 </a>
1406 </a>
1394 </td><td>
1407 </td><td>
1395 Subrepositories
1408 Subrepositories
1396 </td></tr>
1409 </td></tr>
1397 <tr><td>
1410 <tr><td>
1398 <a href="/help/templating">
1411 <a href="/help/templating">
1399 templating
1412 templating
1400 </a>
1413 </a>
1401 </td><td>
1414 </td><td>
1402 Template Usage
1415 Template Usage
1403 </td></tr>
1416 </td></tr>
1404 <tr><td>
1417 <tr><td>
1405 <a href="/help/urls">
1418 <a href="/help/urls">
1406 urls
1419 urls
1407 </a>
1420 </a>
1408 </td><td>
1421 </td><td>
1409 URL Paths
1422 URL Paths
1410 </td></tr>
1423 </td></tr>
1411 <tr><td>
1424 <tr><td>
1412 <a href="/help/topic-containing-verbose">
1425 <a href="/help/topic-containing-verbose">
1413 topic-containing-verbose
1426 topic-containing-verbose
1414 </a>
1427 </a>
1415 </td><td>
1428 </td><td>
1416 This is the topic to test omit indicating.
1429 This is the topic to test omit indicating.
1417 </td></tr>
1430 </td></tr>
1418
1431
1419 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1432 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1420
1433
1421 <tr><td>
1434 <tr><td>
1422 <a href="/help/add">
1435 <a href="/help/add">
1423 add
1436 add
1424 </a>
1437 </a>
1425 </td><td>
1438 </td><td>
1426 add the specified files on the next commit
1439 add the specified files on the next commit
1427 </td></tr>
1440 </td></tr>
1428 <tr><td>
1441 <tr><td>
1429 <a href="/help/annotate">
1442 <a href="/help/annotate">
1430 annotate
1443 annotate
1431 </a>
1444 </a>
1432 </td><td>
1445 </td><td>
1433 show changeset information by line for each file
1446 show changeset information by line for each file
1434 </td></tr>
1447 </td></tr>
1435 <tr><td>
1448 <tr><td>
1436 <a href="/help/clone">
1449 <a href="/help/clone">
1437 clone
1450 clone
1438 </a>
1451 </a>
1439 </td><td>
1452 </td><td>
1440 make a copy of an existing repository
1453 make a copy of an existing repository
1441 </td></tr>
1454 </td></tr>
1442 <tr><td>
1455 <tr><td>
1443 <a href="/help/commit">
1456 <a href="/help/commit">
1444 commit
1457 commit
1445 </a>
1458 </a>
1446 </td><td>
1459 </td><td>
1447 commit the specified files or all outstanding changes
1460 commit the specified files or all outstanding changes
1448 </td></tr>
1461 </td></tr>
1449 <tr><td>
1462 <tr><td>
1450 <a href="/help/diff">
1463 <a href="/help/diff">
1451 diff
1464 diff
1452 </a>
1465 </a>
1453 </td><td>
1466 </td><td>
1454 diff repository (or selected files)
1467 diff repository (or selected files)
1455 </td></tr>
1468 </td></tr>
1456 <tr><td>
1469 <tr><td>
1457 <a href="/help/export">
1470 <a href="/help/export">
1458 export
1471 export
1459 </a>
1472 </a>
1460 </td><td>
1473 </td><td>
1461 dump the header and diffs for one or more changesets
1474 dump the header and diffs for one or more changesets
1462 </td></tr>
1475 </td></tr>
1463 <tr><td>
1476 <tr><td>
1464 <a href="/help/forget">
1477 <a href="/help/forget">
1465 forget
1478 forget
1466 </a>
1479 </a>
1467 </td><td>
1480 </td><td>
1468 forget the specified files on the next commit
1481 forget the specified files on the next commit
1469 </td></tr>
1482 </td></tr>
1470 <tr><td>
1483 <tr><td>
1471 <a href="/help/init">
1484 <a href="/help/init">
1472 init
1485 init
1473 </a>
1486 </a>
1474 </td><td>
1487 </td><td>
1475 create a new repository in the given directory
1488 create a new repository in the given directory
1476 </td></tr>
1489 </td></tr>
1477 <tr><td>
1490 <tr><td>
1478 <a href="/help/log">
1491 <a href="/help/log">
1479 log
1492 log
1480 </a>
1493 </a>
1481 </td><td>
1494 </td><td>
1482 show revision history of entire repository or files
1495 show revision history of entire repository or files
1483 </td></tr>
1496 </td></tr>
1484 <tr><td>
1497 <tr><td>
1485 <a href="/help/merge">
1498 <a href="/help/merge">
1486 merge
1499 merge
1487 </a>
1500 </a>
1488 </td><td>
1501 </td><td>
1489 merge another revision into working directory
1502 merge another revision into working directory
1490 </td></tr>
1503 </td></tr>
1491 <tr><td>
1504 <tr><td>
1492 <a href="/help/pull">
1505 <a href="/help/pull">
1493 pull
1506 pull
1494 </a>
1507 </a>
1495 </td><td>
1508 </td><td>
1496 pull changes from the specified source
1509 pull changes from the specified source
1497 </td></tr>
1510 </td></tr>
1498 <tr><td>
1511 <tr><td>
1499 <a href="/help/push">
1512 <a href="/help/push">
1500 push
1513 push
1501 </a>
1514 </a>
1502 </td><td>
1515 </td><td>
1503 push changes to the specified destination
1516 push changes to the specified destination
1504 </td></tr>
1517 </td></tr>
1505 <tr><td>
1518 <tr><td>
1506 <a href="/help/remove">
1519 <a href="/help/remove">
1507 remove
1520 remove
1508 </a>
1521 </a>
1509 </td><td>
1522 </td><td>
1510 remove the specified files on the next commit
1523 remove the specified files on the next commit
1511 </td></tr>
1524 </td></tr>
1512 <tr><td>
1525 <tr><td>
1513 <a href="/help/serve">
1526 <a href="/help/serve">
1514 serve
1527 serve
1515 </a>
1528 </a>
1516 </td><td>
1529 </td><td>
1517 start stand-alone webserver
1530 start stand-alone webserver
1518 </td></tr>
1531 </td></tr>
1519 <tr><td>
1532 <tr><td>
1520 <a href="/help/status">
1533 <a href="/help/status">
1521 status
1534 status
1522 </a>
1535 </a>
1523 </td><td>
1536 </td><td>
1524 show changed files in the working directory
1537 show changed files in the working directory
1525 </td></tr>
1538 </td></tr>
1526 <tr><td>
1539 <tr><td>
1527 <a href="/help/summary">
1540 <a href="/help/summary">
1528 summary
1541 summary
1529 </a>
1542 </a>
1530 </td><td>
1543 </td><td>
1531 summarize working directory state
1544 summarize working directory state
1532 </td></tr>
1545 </td></tr>
1533 <tr><td>
1546 <tr><td>
1534 <a href="/help/update">
1547 <a href="/help/update">
1535 update
1548 update
1536 </a>
1549 </a>
1537 </td><td>
1550 </td><td>
1538 update working directory (or switch revisions)
1551 update working directory (or switch revisions)
1539 </td></tr>
1552 </td></tr>
1540
1553
1541 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1554 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1542
1555
1543 <tr><td>
1556 <tr><td>
1544 <a href="/help/addremove">
1557 <a href="/help/addremove">
1545 addremove
1558 addremove
1546 </a>
1559 </a>
1547 </td><td>
1560 </td><td>
1548 add all new files, delete all missing files
1561 add all new files, delete all missing files
1549 </td></tr>
1562 </td></tr>
1550 <tr><td>
1563 <tr><td>
1551 <a href="/help/archive">
1564 <a href="/help/archive">
1552 archive
1565 archive
1553 </a>
1566 </a>
1554 </td><td>
1567 </td><td>
1555 create an unversioned archive of a repository revision
1568 create an unversioned archive of a repository revision
1556 </td></tr>
1569 </td></tr>
1557 <tr><td>
1570 <tr><td>
1558 <a href="/help/backout">
1571 <a href="/help/backout">
1559 backout
1572 backout
1560 </a>
1573 </a>
1561 </td><td>
1574 </td><td>
1562 reverse effect of earlier changeset
1575 reverse effect of earlier changeset
1563 </td></tr>
1576 </td></tr>
1564 <tr><td>
1577 <tr><td>
1565 <a href="/help/bisect">
1578 <a href="/help/bisect">
1566 bisect
1579 bisect
1567 </a>
1580 </a>
1568 </td><td>
1581 </td><td>
1569 subdivision search of changesets
1582 subdivision search of changesets
1570 </td></tr>
1583 </td></tr>
1571 <tr><td>
1584 <tr><td>
1572 <a href="/help/bookmarks">
1585 <a href="/help/bookmarks">
1573 bookmarks
1586 bookmarks
1574 </a>
1587 </a>
1575 </td><td>
1588 </td><td>
1576 create a new bookmark or list existing bookmarks
1589 create a new bookmark or list existing bookmarks
1577 </td></tr>
1590 </td></tr>
1578 <tr><td>
1591 <tr><td>
1579 <a href="/help/branch">
1592 <a href="/help/branch">
1580 branch
1593 branch
1581 </a>
1594 </a>
1582 </td><td>
1595 </td><td>
1583 set or show the current branch name
1596 set or show the current branch name
1584 </td></tr>
1597 </td></tr>
1585 <tr><td>
1598 <tr><td>
1586 <a href="/help/branches">
1599 <a href="/help/branches">
1587 branches
1600 branches
1588 </a>
1601 </a>
1589 </td><td>
1602 </td><td>
1590 list repository named branches
1603 list repository named branches
1591 </td></tr>
1604 </td></tr>
1592 <tr><td>
1605 <tr><td>
1593 <a href="/help/bundle">
1606 <a href="/help/bundle">
1594 bundle
1607 bundle
1595 </a>
1608 </a>
1596 </td><td>
1609 </td><td>
1597 create a changegroup file
1610 create a changegroup file
1598 </td></tr>
1611 </td></tr>
1599 <tr><td>
1612 <tr><td>
1600 <a href="/help/cat">
1613 <a href="/help/cat">
1601 cat
1614 cat
1602 </a>
1615 </a>
1603 </td><td>
1616 </td><td>
1604 output the current or given revision of files
1617 output the current or given revision of files
1605 </td></tr>
1618 </td></tr>
1606 <tr><td>
1619 <tr><td>
1607 <a href="/help/config">
1620 <a href="/help/config">
1608 config
1621 config
1609 </a>
1622 </a>
1610 </td><td>
1623 </td><td>
1611 show combined config settings from all hgrc files
1624 show combined config settings from all hgrc files
1612 </td></tr>
1625 </td></tr>
1613 <tr><td>
1626 <tr><td>
1614 <a href="/help/copy">
1627 <a href="/help/copy">
1615 copy
1628 copy
1616 </a>
1629 </a>
1617 </td><td>
1630 </td><td>
1618 mark files as copied for the next commit
1631 mark files as copied for the next commit
1619 </td></tr>
1632 </td></tr>
1620 <tr><td>
1633 <tr><td>
1621 <a href="/help/files">
1634 <a href="/help/files">
1622 files
1635 files
1623 </a>
1636 </a>
1624 </td><td>
1637 </td><td>
1625 list tracked files
1638 list tracked files
1626 </td></tr>
1639 </td></tr>
1627 <tr><td>
1640 <tr><td>
1628 <a href="/help/graft">
1641 <a href="/help/graft">
1629 graft
1642 graft
1630 </a>
1643 </a>
1631 </td><td>
1644 </td><td>
1632 copy changes from other branches onto the current branch
1645 copy changes from other branches onto the current branch
1633 </td></tr>
1646 </td></tr>
1634 <tr><td>
1647 <tr><td>
1635 <a href="/help/grep">
1648 <a href="/help/grep">
1636 grep
1649 grep
1637 </a>
1650 </a>
1638 </td><td>
1651 </td><td>
1639 search for a pattern in specified files and revisions
1652 search for a pattern in specified files and revisions
1640 </td></tr>
1653 </td></tr>
1641 <tr><td>
1654 <tr><td>
1642 <a href="/help/heads">
1655 <a href="/help/heads">
1643 heads
1656 heads
1644 </a>
1657 </a>
1645 </td><td>
1658 </td><td>
1646 show branch heads
1659 show branch heads
1647 </td></tr>
1660 </td></tr>
1648 <tr><td>
1661 <tr><td>
1649 <a href="/help/help">
1662 <a href="/help/help">
1650 help
1663 help
1651 </a>
1664 </a>
1652 </td><td>
1665 </td><td>
1653 show help for a given topic or a help overview
1666 show help for a given topic or a help overview
1654 </td></tr>
1667 </td></tr>
1655 <tr><td>
1668 <tr><td>
1656 <a href="/help/identify">
1669 <a href="/help/identify">
1657 identify
1670 identify
1658 </a>
1671 </a>
1659 </td><td>
1672 </td><td>
1660 identify the working directory or specified revision
1673 identify the working directory or specified revision
1661 </td></tr>
1674 </td></tr>
1662 <tr><td>
1675 <tr><td>
1663 <a href="/help/import">
1676 <a href="/help/import">
1664 import
1677 import
1665 </a>
1678 </a>
1666 </td><td>
1679 </td><td>
1667 import an ordered set of patches
1680 import an ordered set of patches
1668 </td></tr>
1681 </td></tr>
1669 <tr><td>
1682 <tr><td>
1670 <a href="/help/incoming">
1683 <a href="/help/incoming">
1671 incoming
1684 incoming
1672 </a>
1685 </a>
1673 </td><td>
1686 </td><td>
1674 show new changesets found in source
1687 show new changesets found in source
1675 </td></tr>
1688 </td></tr>
1676 <tr><td>
1689 <tr><td>
1677 <a href="/help/manifest">
1690 <a href="/help/manifest">
1678 manifest
1691 manifest
1679 </a>
1692 </a>
1680 </td><td>
1693 </td><td>
1681 output the current or given revision of the project manifest
1694 output the current or given revision of the project manifest
1682 </td></tr>
1695 </td></tr>
1683 <tr><td>
1696 <tr><td>
1684 <a href="/help/nohelp">
1697 <a href="/help/nohelp">
1685 nohelp
1698 nohelp
1686 </a>
1699 </a>
1687 </td><td>
1700 </td><td>
1688 (no help text available)
1701 (no help text available)
1689 </td></tr>
1702 </td></tr>
1690 <tr><td>
1703 <tr><td>
1691 <a href="/help/outgoing">
1704 <a href="/help/outgoing">
1692 outgoing
1705 outgoing
1693 </a>
1706 </a>
1694 </td><td>
1707 </td><td>
1695 show changesets not found in the destination
1708 show changesets not found in the destination
1696 </td></tr>
1709 </td></tr>
1697 <tr><td>
1710 <tr><td>
1698 <a href="/help/paths">
1711 <a href="/help/paths">
1699 paths
1712 paths
1700 </a>
1713 </a>
1701 </td><td>
1714 </td><td>
1702 show aliases for remote repositories
1715 show aliases for remote repositories
1703 </td></tr>
1716 </td></tr>
1704 <tr><td>
1717 <tr><td>
1705 <a href="/help/phase">
1718 <a href="/help/phase">
1706 phase
1719 phase
1707 </a>
1720 </a>
1708 </td><td>
1721 </td><td>
1709 set or show the current phase name
1722 set or show the current phase name
1710 </td></tr>
1723 </td></tr>
1711 <tr><td>
1724 <tr><td>
1712 <a href="/help/recover">
1725 <a href="/help/recover">
1713 recover
1726 recover
1714 </a>
1727 </a>
1715 </td><td>
1728 </td><td>
1716 roll back an interrupted transaction
1729 roll back an interrupted transaction
1717 </td></tr>
1730 </td></tr>
1718 <tr><td>
1731 <tr><td>
1719 <a href="/help/rename">
1732 <a href="/help/rename">
1720 rename
1733 rename
1721 </a>
1734 </a>
1722 </td><td>
1735 </td><td>
1723 rename files; equivalent of copy + remove
1736 rename files; equivalent of copy + remove
1724 </td></tr>
1737 </td></tr>
1725 <tr><td>
1738 <tr><td>
1726 <a href="/help/resolve">
1739 <a href="/help/resolve">
1727 resolve
1740 resolve
1728 </a>
1741 </a>
1729 </td><td>
1742 </td><td>
1730 redo merges or set/view the merge status of files
1743 redo merges or set/view the merge status of files
1731 </td></tr>
1744 </td></tr>
1732 <tr><td>
1745 <tr><td>
1733 <a href="/help/revert">
1746 <a href="/help/revert">
1734 revert
1747 revert
1735 </a>
1748 </a>
1736 </td><td>
1749 </td><td>
1737 restore files to their checkout state
1750 restore files to their checkout state
1738 </td></tr>
1751 </td></tr>
1739 <tr><td>
1752 <tr><td>
1740 <a href="/help/root">
1753 <a href="/help/root">
1741 root
1754 root
1742 </a>
1755 </a>
1743 </td><td>
1756 </td><td>
1744 print the root (top) of the current working directory
1757 print the root (top) of the current working directory
1745 </td></tr>
1758 </td></tr>
1746 <tr><td>
1759 <tr><td>
1747 <a href="/help/tag">
1760 <a href="/help/tag">
1748 tag
1761 tag
1749 </a>
1762 </a>
1750 </td><td>
1763 </td><td>
1751 add one or more tags for the current or given revision
1764 add one or more tags for the current or given revision
1752 </td></tr>
1765 </td></tr>
1753 <tr><td>
1766 <tr><td>
1754 <a href="/help/tags">
1767 <a href="/help/tags">
1755 tags
1768 tags
1756 </a>
1769 </a>
1757 </td><td>
1770 </td><td>
1758 list repository tags
1771 list repository tags
1759 </td></tr>
1772 </td></tr>
1760 <tr><td>
1773 <tr><td>
1761 <a href="/help/unbundle">
1774 <a href="/help/unbundle">
1762 unbundle
1775 unbundle
1763 </a>
1776 </a>
1764 </td><td>
1777 </td><td>
1765 apply one or more changegroup files
1778 apply one or more changegroup files
1766 </td></tr>
1779 </td></tr>
1767 <tr><td>
1780 <tr><td>
1768 <a href="/help/verify">
1781 <a href="/help/verify">
1769 verify
1782 verify
1770 </a>
1783 </a>
1771 </td><td>
1784 </td><td>
1772 verify the integrity of the repository
1785 verify the integrity of the repository
1773 </td></tr>
1786 </td></tr>
1774 <tr><td>
1787 <tr><td>
1775 <a href="/help/version">
1788 <a href="/help/version">
1776 version
1789 version
1777 </a>
1790 </a>
1778 </td><td>
1791 </td><td>
1779 output version and copyright information
1792 output version and copyright information
1780 </td></tr>
1793 </td></tr>
1781 </table>
1794 </table>
1782 </div>
1795 </div>
1783 </div>
1796 </div>
1784
1797
1785 <script type="text/javascript">process_dates()</script>
1798 <script type="text/javascript">process_dates()</script>
1786
1799
1787
1800
1788 </body>
1801 </body>
1789 </html>
1802 </html>
1790
1803
1791
1804
1792 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1805 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1793 200 Script output follows
1806 200 Script output follows
1794
1807
1795 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1808 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1796 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1809 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1797 <head>
1810 <head>
1798 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1811 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1799 <meta name="robots" content="index, nofollow" />
1812 <meta name="robots" content="index, nofollow" />
1800 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1813 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1801 <script type="text/javascript" src="/static/mercurial.js"></script>
1814 <script type="text/javascript" src="/static/mercurial.js"></script>
1802
1815
1803 <title>Help: add</title>
1816 <title>Help: add</title>
1804 </head>
1817 </head>
1805 <body>
1818 <body>
1806
1819
1807 <div class="container">
1820 <div class="container">
1808 <div class="menu">
1821 <div class="menu">
1809 <div class="logo">
1822 <div class="logo">
1810 <a href="http://mercurial.selenic.com/">
1823 <a href="http://mercurial.selenic.com/">
1811 <img src="/static/hglogo.png" alt="mercurial" /></a>
1824 <img src="/static/hglogo.png" alt="mercurial" /></a>
1812 </div>
1825 </div>
1813 <ul>
1826 <ul>
1814 <li><a href="/shortlog">log</a></li>
1827 <li><a href="/shortlog">log</a></li>
1815 <li><a href="/graph">graph</a></li>
1828 <li><a href="/graph">graph</a></li>
1816 <li><a href="/tags">tags</a></li>
1829 <li><a href="/tags">tags</a></li>
1817 <li><a href="/bookmarks">bookmarks</a></li>
1830 <li><a href="/bookmarks">bookmarks</a></li>
1818 <li><a href="/branches">branches</a></li>
1831 <li><a href="/branches">branches</a></li>
1819 </ul>
1832 </ul>
1820 <ul>
1833 <ul>
1821 <li class="active"><a href="/help">help</a></li>
1834 <li class="active"><a href="/help">help</a></li>
1822 </ul>
1835 </ul>
1823 </div>
1836 </div>
1824
1837
1825 <div class="main">
1838 <div class="main">
1826 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1839 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1827 <h3>Help: add</h3>
1840 <h3>Help: add</h3>
1828
1841
1829 <form class="search" action="/log">
1842 <form class="search" action="/log">
1830
1843
1831 <p><input name="rev" id="search1" type="text" size="30" /></p>
1844 <p><input name="rev" id="search1" type="text" size="30" /></p>
1832 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1845 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1833 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1846 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1834 </form>
1847 </form>
1835 <div id="doc">
1848 <div id="doc">
1836 <p>
1849 <p>
1837 hg add [OPTION]... [FILE]...
1850 hg add [OPTION]... [FILE]...
1838 </p>
1851 </p>
1839 <p>
1852 <p>
1840 add the specified files on the next commit
1853 add the specified files on the next commit
1841 </p>
1854 </p>
1842 <p>
1855 <p>
1843 Schedule files to be version controlled and added to the
1856 Schedule files to be version controlled and added to the
1844 repository.
1857 repository.
1845 </p>
1858 </p>
1846 <p>
1859 <p>
1847 The files will be added to the repository at the next commit. To
1860 The files will be added to the repository at the next commit. To
1848 undo an add before that, see &quot;hg forget&quot;.
1861 undo an add before that, see &quot;hg forget&quot;.
1849 </p>
1862 </p>
1850 <p>
1863 <p>
1851 If no names are given, add all files to the repository.
1864 If no names are given, add all files to the repository.
1852 </p>
1865 </p>
1853 <p>
1866 <p>
1854 An example showing how new (unknown) files are added
1867 An example showing how new (unknown) files are added
1855 automatically by &quot;hg add&quot;:
1868 automatically by &quot;hg add&quot;:
1856 </p>
1869 </p>
1857 <pre>
1870 <pre>
1858 \$ ls (re)
1871 \$ ls (re)
1859 foo.c
1872 foo.c
1860 \$ hg status (re)
1873 \$ hg status (re)
1861 ? foo.c
1874 ? foo.c
1862 \$ hg add (re)
1875 \$ hg add (re)
1863 adding foo.c
1876 adding foo.c
1864 \$ hg status (re)
1877 \$ hg status (re)
1865 A foo.c
1878 A foo.c
1866 </pre>
1879 </pre>
1867 <p>
1880 <p>
1868 Returns 0 if all files are successfully added.
1881 Returns 0 if all files are successfully added.
1869 </p>
1882 </p>
1870 <p>
1883 <p>
1871 options ([+] can be repeated):
1884 options ([+] can be repeated):
1872 </p>
1885 </p>
1873 <table>
1886 <table>
1874 <tr><td>-I</td>
1887 <tr><td>-I</td>
1875 <td>--include PATTERN [+]</td>
1888 <td>--include PATTERN [+]</td>
1876 <td>include names matching the given patterns</td></tr>
1889 <td>include names matching the given patterns</td></tr>
1877 <tr><td>-X</td>
1890 <tr><td>-X</td>
1878 <td>--exclude PATTERN [+]</td>
1891 <td>--exclude PATTERN [+]</td>
1879 <td>exclude names matching the given patterns</td></tr>
1892 <td>exclude names matching the given patterns</td></tr>
1880 <tr><td>-S</td>
1893 <tr><td>-S</td>
1881 <td>--subrepos</td>
1894 <td>--subrepos</td>
1882 <td>recurse into subrepositories</td></tr>
1895 <td>recurse into subrepositories</td></tr>
1883 <tr><td>-n</td>
1896 <tr><td>-n</td>
1884 <td>--dry-run</td>
1897 <td>--dry-run</td>
1885 <td>do not perform actions, just print output</td></tr>
1898 <td>do not perform actions, just print output</td></tr>
1886 </table>
1899 </table>
1887 <p>
1900 <p>
1888 global options ([+] can be repeated):
1901 global options ([+] can be repeated):
1889 </p>
1902 </p>
1890 <table>
1903 <table>
1891 <tr><td>-R</td>
1904 <tr><td>-R</td>
1892 <td>--repository REPO</td>
1905 <td>--repository REPO</td>
1893 <td>repository root directory or name of overlay bundle file</td></tr>
1906 <td>repository root directory or name of overlay bundle file</td></tr>
1894 <tr><td></td>
1907 <tr><td></td>
1895 <td>--cwd DIR</td>
1908 <td>--cwd DIR</td>
1896 <td>change working directory</td></tr>
1909 <td>change working directory</td></tr>
1897 <tr><td>-y</td>
1910 <tr><td>-y</td>
1898 <td>--noninteractive</td>
1911 <td>--noninteractive</td>
1899 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1912 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1900 <tr><td>-q</td>
1913 <tr><td>-q</td>
1901 <td>--quiet</td>
1914 <td>--quiet</td>
1902 <td>suppress output</td></tr>
1915 <td>suppress output</td></tr>
1903 <tr><td>-v</td>
1916 <tr><td>-v</td>
1904 <td>--verbose</td>
1917 <td>--verbose</td>
1905 <td>enable additional output</td></tr>
1918 <td>enable additional output</td></tr>
1906 <tr><td></td>
1919 <tr><td></td>
1907 <td>--config CONFIG [+]</td>
1920 <td>--config CONFIG [+]</td>
1908 <td>set/override config option (use 'section.name=value')</td></tr>
1921 <td>set/override config option (use 'section.name=value')</td></tr>
1909 <tr><td></td>
1922 <tr><td></td>
1910 <td>--debug</td>
1923 <td>--debug</td>
1911 <td>enable debugging output</td></tr>
1924 <td>enable debugging output</td></tr>
1912 <tr><td></td>
1925 <tr><td></td>
1913 <td>--debugger</td>
1926 <td>--debugger</td>
1914 <td>start debugger</td></tr>
1927 <td>start debugger</td></tr>
1915 <tr><td></td>
1928 <tr><td></td>
1916 <td>--encoding ENCODE</td>
1929 <td>--encoding ENCODE</td>
1917 <td>set the charset encoding (default: ascii)</td></tr>
1930 <td>set the charset encoding (default: ascii)</td></tr>
1918 <tr><td></td>
1931 <tr><td></td>
1919 <td>--encodingmode MODE</td>
1932 <td>--encodingmode MODE</td>
1920 <td>set the charset encoding mode (default: strict)</td></tr>
1933 <td>set the charset encoding mode (default: strict)</td></tr>
1921 <tr><td></td>
1934 <tr><td></td>
1922 <td>--traceback</td>
1935 <td>--traceback</td>
1923 <td>always print a traceback on exception</td></tr>
1936 <td>always print a traceback on exception</td></tr>
1924 <tr><td></td>
1937 <tr><td></td>
1925 <td>--time</td>
1938 <td>--time</td>
1926 <td>time how long the command takes</td></tr>
1939 <td>time how long the command takes</td></tr>
1927 <tr><td></td>
1940 <tr><td></td>
1928 <td>--profile</td>
1941 <td>--profile</td>
1929 <td>print command execution profile</td></tr>
1942 <td>print command execution profile</td></tr>
1930 <tr><td></td>
1943 <tr><td></td>
1931 <td>--version</td>
1944 <td>--version</td>
1932 <td>output version information and exit</td></tr>
1945 <td>output version information and exit</td></tr>
1933 <tr><td>-h</td>
1946 <tr><td>-h</td>
1934 <td>--help</td>
1947 <td>--help</td>
1935 <td>display help and exit</td></tr>
1948 <td>display help and exit</td></tr>
1936 <tr><td></td>
1949 <tr><td></td>
1937 <td>--hidden</td>
1950 <td>--hidden</td>
1938 <td>consider hidden changesets</td></tr>
1951 <td>consider hidden changesets</td></tr>
1939 </table>
1952 </table>
1940
1953
1941 </div>
1954 </div>
1942 </div>
1955 </div>
1943 </div>
1956 </div>
1944
1957
1945 <script type="text/javascript">process_dates()</script>
1958 <script type="text/javascript">process_dates()</script>
1946
1959
1947
1960
1948 </body>
1961 </body>
1949 </html>
1962 </html>
1950
1963
1951
1964
1952 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1965 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1953 200 Script output follows
1966 200 Script output follows
1954
1967
1955 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1968 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1956 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1969 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1957 <head>
1970 <head>
1958 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1971 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1959 <meta name="robots" content="index, nofollow" />
1972 <meta name="robots" content="index, nofollow" />
1960 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1973 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1961 <script type="text/javascript" src="/static/mercurial.js"></script>
1974 <script type="text/javascript" src="/static/mercurial.js"></script>
1962
1975
1963 <title>Help: remove</title>
1976 <title>Help: remove</title>
1964 </head>
1977 </head>
1965 <body>
1978 <body>
1966
1979
1967 <div class="container">
1980 <div class="container">
1968 <div class="menu">
1981 <div class="menu">
1969 <div class="logo">
1982 <div class="logo">
1970 <a href="http://mercurial.selenic.com/">
1983 <a href="http://mercurial.selenic.com/">
1971 <img src="/static/hglogo.png" alt="mercurial" /></a>
1984 <img src="/static/hglogo.png" alt="mercurial" /></a>
1972 </div>
1985 </div>
1973 <ul>
1986 <ul>
1974 <li><a href="/shortlog">log</a></li>
1987 <li><a href="/shortlog">log</a></li>
1975 <li><a href="/graph">graph</a></li>
1988 <li><a href="/graph">graph</a></li>
1976 <li><a href="/tags">tags</a></li>
1989 <li><a href="/tags">tags</a></li>
1977 <li><a href="/bookmarks">bookmarks</a></li>
1990 <li><a href="/bookmarks">bookmarks</a></li>
1978 <li><a href="/branches">branches</a></li>
1991 <li><a href="/branches">branches</a></li>
1979 </ul>
1992 </ul>
1980 <ul>
1993 <ul>
1981 <li class="active"><a href="/help">help</a></li>
1994 <li class="active"><a href="/help">help</a></li>
1982 </ul>
1995 </ul>
1983 </div>
1996 </div>
1984
1997
1985 <div class="main">
1998 <div class="main">
1986 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1999 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1987 <h3>Help: remove</h3>
2000 <h3>Help: remove</h3>
1988
2001
1989 <form class="search" action="/log">
2002 <form class="search" action="/log">
1990
2003
1991 <p><input name="rev" id="search1" type="text" size="30" /></p>
2004 <p><input name="rev" id="search1" type="text" size="30" /></p>
1992 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2005 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1993 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2006 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1994 </form>
2007 </form>
1995 <div id="doc">
2008 <div id="doc">
1996 <p>
2009 <p>
1997 hg remove [OPTION]... FILE...
2010 hg remove [OPTION]... FILE...
1998 </p>
2011 </p>
1999 <p>
2012 <p>
2000 aliases: rm
2013 aliases: rm
2001 </p>
2014 </p>
2002 <p>
2015 <p>
2003 remove the specified files on the next commit
2016 remove the specified files on the next commit
2004 </p>
2017 </p>
2005 <p>
2018 <p>
2006 Schedule the indicated files for removal from the current branch.
2019 Schedule the indicated files for removal from the current branch.
2007 </p>
2020 </p>
2008 <p>
2021 <p>
2009 This command schedules the files to be removed at the next commit.
2022 This command schedules the files to be removed at the next commit.
2010 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2023 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2011 files, see &quot;hg forget&quot;.
2024 files, see &quot;hg forget&quot;.
2012 </p>
2025 </p>
2013 <p>
2026 <p>
2014 -A/--after can be used to remove only files that have already
2027 -A/--after can be used to remove only files that have already
2015 been deleted, -f/--force can be used to force deletion, and -Af
2028 been deleted, -f/--force can be used to force deletion, and -Af
2016 can be used to remove files from the next revision without
2029 can be used to remove files from the next revision without
2017 deleting them from the working directory.
2030 deleting them from the working directory.
2018 </p>
2031 </p>
2019 <p>
2032 <p>
2020 The following table details the behavior of remove for different
2033 The following table details the behavior of remove for different
2021 file states (columns) and option combinations (rows). The file
2034 file states (columns) and option combinations (rows). The file
2022 states are Added [A], Clean [C], Modified [M] and Missing [!]
2035 states are Added [A], Clean [C], Modified [M] and Missing [!]
2023 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2036 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2024 (from branch) and Delete (from disk):
2037 (from branch) and Delete (from disk):
2025 </p>
2038 </p>
2026 <table>
2039 <table>
2027 <tr><td>opt/state</td>
2040 <tr><td>opt/state</td>
2028 <td>A</td>
2041 <td>A</td>
2029 <td>C</td>
2042 <td>C</td>
2030 <td>M</td>
2043 <td>M</td>
2031 <td>!</td></tr>
2044 <td>!</td></tr>
2032 <tr><td>none</td>
2045 <tr><td>none</td>
2033 <td>W</td>
2046 <td>W</td>
2034 <td>RD</td>
2047 <td>RD</td>
2035 <td>W</td>
2048 <td>W</td>
2036 <td>R</td></tr>
2049 <td>R</td></tr>
2037 <tr><td>-f</td>
2050 <tr><td>-f</td>
2038 <td>R</td>
2051 <td>R</td>
2039 <td>RD</td>
2052 <td>RD</td>
2040 <td>RD</td>
2053 <td>RD</td>
2041 <td>R</td></tr>
2054 <td>R</td></tr>
2042 <tr><td>-A</td>
2055 <tr><td>-A</td>
2043 <td>W</td>
2056 <td>W</td>
2044 <td>W</td>
2057 <td>W</td>
2045 <td>W</td>
2058 <td>W</td>
2046 <td>R</td></tr>
2059 <td>R</td></tr>
2047 <tr><td>-Af</td>
2060 <tr><td>-Af</td>
2048 <td>R</td>
2061 <td>R</td>
2049 <td>R</td>
2062 <td>R</td>
2050 <td>R</td>
2063 <td>R</td>
2051 <td>R</td></tr>
2064 <td>R</td></tr>
2052 </table>
2065 </table>
2053 <p>
2066 <p>
2054 Note that remove never deletes files in Added [A] state from the
2067 Note that remove never deletes files in Added [A] state from the
2055 working directory, not even if option --force is specified.
2068 working directory, not even if option --force is specified.
2056 </p>
2069 </p>
2057 <p>
2070 <p>
2058 Returns 0 on success, 1 if any warnings encountered.
2071 Returns 0 on success, 1 if any warnings encountered.
2059 </p>
2072 </p>
2060 <p>
2073 <p>
2061 options ([+] can be repeated):
2074 options ([+] can be repeated):
2062 </p>
2075 </p>
2063 <table>
2076 <table>
2064 <tr><td>-A</td>
2077 <tr><td>-A</td>
2065 <td>--after</td>
2078 <td>--after</td>
2066 <td>record delete for missing files</td></tr>
2079 <td>record delete for missing files</td></tr>
2067 <tr><td>-f</td>
2080 <tr><td>-f</td>
2068 <td>--force</td>
2081 <td>--force</td>
2069 <td>remove (and delete) file even if added or modified</td></tr>
2082 <td>remove (and delete) file even if added or modified</td></tr>
2070 <tr><td>-S</td>
2083 <tr><td>-S</td>
2071 <td>--subrepos</td>
2084 <td>--subrepos</td>
2072 <td>recurse into subrepositories</td></tr>
2085 <td>recurse into subrepositories</td></tr>
2073 <tr><td>-I</td>
2086 <tr><td>-I</td>
2074 <td>--include PATTERN [+]</td>
2087 <td>--include PATTERN [+]</td>
2075 <td>include names matching the given patterns</td></tr>
2088 <td>include names matching the given patterns</td></tr>
2076 <tr><td>-X</td>
2089 <tr><td>-X</td>
2077 <td>--exclude PATTERN [+]</td>
2090 <td>--exclude PATTERN [+]</td>
2078 <td>exclude names matching the given patterns</td></tr>
2091 <td>exclude names matching the given patterns</td></tr>
2079 </table>
2092 </table>
2080 <p>
2093 <p>
2081 global options ([+] can be repeated):
2094 global options ([+] can be repeated):
2082 </p>
2095 </p>
2083 <table>
2096 <table>
2084 <tr><td>-R</td>
2097 <tr><td>-R</td>
2085 <td>--repository REPO</td>
2098 <td>--repository REPO</td>
2086 <td>repository root directory or name of overlay bundle file</td></tr>
2099 <td>repository root directory or name of overlay bundle file</td></tr>
2087 <tr><td></td>
2100 <tr><td></td>
2088 <td>--cwd DIR</td>
2101 <td>--cwd DIR</td>
2089 <td>change working directory</td></tr>
2102 <td>change working directory</td></tr>
2090 <tr><td>-y</td>
2103 <tr><td>-y</td>
2091 <td>--noninteractive</td>
2104 <td>--noninteractive</td>
2092 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2105 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2093 <tr><td>-q</td>
2106 <tr><td>-q</td>
2094 <td>--quiet</td>
2107 <td>--quiet</td>
2095 <td>suppress output</td></tr>
2108 <td>suppress output</td></tr>
2096 <tr><td>-v</td>
2109 <tr><td>-v</td>
2097 <td>--verbose</td>
2110 <td>--verbose</td>
2098 <td>enable additional output</td></tr>
2111 <td>enable additional output</td></tr>
2099 <tr><td></td>
2112 <tr><td></td>
2100 <td>--config CONFIG [+]</td>
2113 <td>--config CONFIG [+]</td>
2101 <td>set/override config option (use 'section.name=value')</td></tr>
2114 <td>set/override config option (use 'section.name=value')</td></tr>
2102 <tr><td></td>
2115 <tr><td></td>
2103 <td>--debug</td>
2116 <td>--debug</td>
2104 <td>enable debugging output</td></tr>
2117 <td>enable debugging output</td></tr>
2105 <tr><td></td>
2118 <tr><td></td>
2106 <td>--debugger</td>
2119 <td>--debugger</td>
2107 <td>start debugger</td></tr>
2120 <td>start debugger</td></tr>
2108 <tr><td></td>
2121 <tr><td></td>
2109 <td>--encoding ENCODE</td>
2122 <td>--encoding ENCODE</td>
2110 <td>set the charset encoding (default: ascii)</td></tr>
2123 <td>set the charset encoding (default: ascii)</td></tr>
2111 <tr><td></td>
2124 <tr><td></td>
2112 <td>--encodingmode MODE</td>
2125 <td>--encodingmode MODE</td>
2113 <td>set the charset encoding mode (default: strict)</td></tr>
2126 <td>set the charset encoding mode (default: strict)</td></tr>
2114 <tr><td></td>
2127 <tr><td></td>
2115 <td>--traceback</td>
2128 <td>--traceback</td>
2116 <td>always print a traceback on exception</td></tr>
2129 <td>always print a traceback on exception</td></tr>
2117 <tr><td></td>
2130 <tr><td></td>
2118 <td>--time</td>
2131 <td>--time</td>
2119 <td>time how long the command takes</td></tr>
2132 <td>time how long the command takes</td></tr>
2120 <tr><td></td>
2133 <tr><td></td>
2121 <td>--profile</td>
2134 <td>--profile</td>
2122 <td>print command execution profile</td></tr>
2135 <td>print command execution profile</td></tr>
2123 <tr><td></td>
2136 <tr><td></td>
2124 <td>--version</td>
2137 <td>--version</td>
2125 <td>output version information and exit</td></tr>
2138 <td>output version information and exit</td></tr>
2126 <tr><td>-h</td>
2139 <tr><td>-h</td>
2127 <td>--help</td>
2140 <td>--help</td>
2128 <td>display help and exit</td></tr>
2141 <td>display help and exit</td></tr>
2129 <tr><td></td>
2142 <tr><td></td>
2130 <td>--hidden</td>
2143 <td>--hidden</td>
2131 <td>consider hidden changesets</td></tr>
2144 <td>consider hidden changesets</td></tr>
2132 </table>
2145 </table>
2133
2146
2134 </div>
2147 </div>
2135 </div>
2148 </div>
2136 </div>
2149 </div>
2137
2150
2138 <script type="text/javascript">process_dates()</script>
2151 <script type="text/javascript">process_dates()</script>
2139
2152
2140
2153
2141 </body>
2154 </body>
2142 </html>
2155 </html>
2143
2156
2144
2157
2145 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
2158 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
2146 200 Script output follows
2159 200 Script output follows
2147
2160
2148 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2161 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2149 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2162 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2150 <head>
2163 <head>
2151 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2164 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2152 <meta name="robots" content="index, nofollow" />
2165 <meta name="robots" content="index, nofollow" />
2153 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2166 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2154 <script type="text/javascript" src="/static/mercurial.js"></script>
2167 <script type="text/javascript" src="/static/mercurial.js"></script>
2155
2168
2156 <title>Help: revisions</title>
2169 <title>Help: revisions</title>
2157 </head>
2170 </head>
2158 <body>
2171 <body>
2159
2172
2160 <div class="container">
2173 <div class="container">
2161 <div class="menu">
2174 <div class="menu">
2162 <div class="logo">
2175 <div class="logo">
2163 <a href="http://mercurial.selenic.com/">
2176 <a href="http://mercurial.selenic.com/">
2164 <img src="/static/hglogo.png" alt="mercurial" /></a>
2177 <img src="/static/hglogo.png" alt="mercurial" /></a>
2165 </div>
2178 </div>
2166 <ul>
2179 <ul>
2167 <li><a href="/shortlog">log</a></li>
2180 <li><a href="/shortlog">log</a></li>
2168 <li><a href="/graph">graph</a></li>
2181 <li><a href="/graph">graph</a></li>
2169 <li><a href="/tags">tags</a></li>
2182 <li><a href="/tags">tags</a></li>
2170 <li><a href="/bookmarks">bookmarks</a></li>
2183 <li><a href="/bookmarks">bookmarks</a></li>
2171 <li><a href="/branches">branches</a></li>
2184 <li><a href="/branches">branches</a></li>
2172 </ul>
2185 </ul>
2173 <ul>
2186 <ul>
2174 <li class="active"><a href="/help">help</a></li>
2187 <li class="active"><a href="/help">help</a></li>
2175 </ul>
2188 </ul>
2176 </div>
2189 </div>
2177
2190
2178 <div class="main">
2191 <div class="main">
2179 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2192 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2180 <h3>Help: revisions</h3>
2193 <h3>Help: revisions</h3>
2181
2194
2182 <form class="search" action="/log">
2195 <form class="search" action="/log">
2183
2196
2184 <p><input name="rev" id="search1" type="text" size="30" /></p>
2197 <p><input name="rev" id="search1" type="text" size="30" /></p>
2185 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2198 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2186 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2199 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2187 </form>
2200 </form>
2188 <div id="doc">
2201 <div id="doc">
2189 <h1>Specifying Single Revisions</h1>
2202 <h1>Specifying Single Revisions</h1>
2190 <p>
2203 <p>
2191 Mercurial supports several ways to specify individual revisions.
2204 Mercurial supports several ways to specify individual revisions.
2192 </p>
2205 </p>
2193 <p>
2206 <p>
2194 A plain integer is treated as a revision number. Negative integers are
2207 A plain integer is treated as a revision number. Negative integers are
2195 treated as sequential offsets from the tip, with -1 denoting the tip,
2208 treated as sequential offsets from the tip, with -1 denoting the tip,
2196 -2 denoting the revision prior to the tip, and so forth.
2209 -2 denoting the revision prior to the tip, and so forth.
2197 </p>
2210 </p>
2198 <p>
2211 <p>
2199 A 40-digit hexadecimal string is treated as a unique revision
2212 A 40-digit hexadecimal string is treated as a unique revision
2200 identifier.
2213 identifier.
2201 </p>
2214 </p>
2202 <p>
2215 <p>
2203 A hexadecimal string less than 40 characters long is treated as a
2216 A hexadecimal string less than 40 characters long is treated as a
2204 unique revision identifier and is referred to as a short-form
2217 unique revision identifier and is referred to as a short-form
2205 identifier. A short-form identifier is only valid if it is the prefix
2218 identifier. A short-form identifier is only valid if it is the prefix
2206 of exactly one full-length identifier.
2219 of exactly one full-length identifier.
2207 </p>
2220 </p>
2208 <p>
2221 <p>
2209 Any other string is treated as a bookmark, tag, or branch name. A
2222 Any other string is treated as a bookmark, tag, or branch name. A
2210 bookmark is a movable pointer to a revision. A tag is a permanent name
2223 bookmark is a movable pointer to a revision. A tag is a permanent name
2211 associated with a revision. A branch name denotes the tipmost open branch head
2224 associated with a revision. A branch name denotes the tipmost open branch head
2212 of that branch - or if they are all closed, the tipmost closed head of the
2225 of that branch - or if they are all closed, the tipmost closed head of the
2213 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2226 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2214 </p>
2227 </p>
2215 <p>
2228 <p>
2216 The reserved name &quot;tip&quot; always identifies the most recent revision.
2229 The reserved name &quot;tip&quot; always identifies the most recent revision.
2217 </p>
2230 </p>
2218 <p>
2231 <p>
2219 The reserved name &quot;null&quot; indicates the null revision. This is the
2232 The reserved name &quot;null&quot; indicates the null revision. This is the
2220 revision of an empty repository, and the parent of revision 0.
2233 revision of an empty repository, and the parent of revision 0.
2221 </p>
2234 </p>
2222 <p>
2235 <p>
2223 The reserved name &quot;.&quot; indicates the working directory parent. If no
2236 The reserved name &quot;.&quot; indicates the working directory parent. If no
2224 working directory is checked out, it is equivalent to null. If an
2237 working directory is checked out, it is equivalent to null. If an
2225 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2238 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2226 parent.
2239 parent.
2227 </p>
2240 </p>
2228
2241
2229 </div>
2242 </div>
2230 </div>
2243 </div>
2231 </div>
2244 </div>
2232
2245
2233 <script type="text/javascript">process_dates()</script>
2246 <script type="text/javascript">process_dates()</script>
2234
2247
2235
2248
2236 </body>
2249 </body>
2237 </html>
2250 </html>
2238
2251
2239
2252
2240 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
2253 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
2241
2254
2242 #endif
2255 #endif
General Comments 0
You need to be logged in to leave comments. Login now