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