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