##// END OF EJS Templates
help: document bundle specifications...
Gregory Szorc -
r31793:69d8fcf2 default
parent child Browse files
Show More
@@ -0,0 +1,84 b''
1 Mercurial supports generating standalone "bundle" files that hold repository
2 data. These "bundles" are typically saved locally and used later or exchanged
3 between different repositories, possibly on different machines. Example
4 commands using bundles are :hg:`bundle` and :hg:`unbundle`.
5
6 Generation of bundle files is controlled by a "bundle specification"
7 ("bundlespec") string. This string tells the bundle generation process how
8 to create the bundle.
9
10 A "bundlespec" string is composed of the following elements:
11
12 type
13 A string denoting the bundle format to use.
14
15 compression
16 Denotes the compression engine to use compressing the raw bundle data.
17
18 parameters
19 Arbitrary key-value parameters to further control bundle generation.
20
21 A "bundlespec" string has the following formats:
22
23 <type>
24 The literal bundle format string is used.
25
26 <compression>-<type>
27 The compression engine and format are delimited by a hypthen (``-``).
28
29 Optional parameters follow the ``<type>``. Parameters are URI escaped
30 ``key=value`` pairs. Each pair is delimited by a semicolon (``;``). The
31 first parameter begins after a ``;`` immediately following the ``<type>``
32 value.
33
34 Available Types
35 ===============
36
37 The following bundle <type> strings are available:
38
39 v1
40 Produces a legacy "changegroup" version 1 bundle.
41
42 This format is compatible with nearly all Mercurial clients because it is
43 the oldest. However, it has some limitations, which is why it is no longer
44 the default for new repositories.
45
46 ``v1`` bundles can be used with modern repositories using the "generaldelta"
47 storage format. However, it may take longer to produce the bundle and the
48 resulting bundle may be significantly larger than a ``v2`` bundle.
49
50 ``v1`` bundles can only use the ``gzip``, ``bzip2``, and ``none`` compression
51 formats.
52
53 v2
54 Produces a version 2 bundle.
55
56 Version 2 bundles are an extensible format that can store additional
57 repository data (such as bookmarks and phases information) and they can
58 store data more efficiently, resulting in smaller bundles.
59
60 Version 2 bundles can also use modern compression engines, such as
61 ``zstd``, making them faster to compress and often smaller.
62
63 Available Compression Engines
64 =============================
65
66 The following bundle <compression> engines can be used:
67
68 .. bundlecompressionmarker
69
70 Examples
71 ========
72
73 ``v2``
74 Produce a ``v2`` bundle using default options, including compression.
75
76 ``none-v1``
77 Produce a ``v2`` bundle with no compression.
78
79 ``zstd-v2``
80 Produce a ``v2`` bundle with zstandard compression using default
81 settings.
82
83 ``zstd-v1``
84 This errors because ``zstd`` is not supported for ``v1`` types.
@@ -1,54 +1,55 b''
1 <?xml version="1.0" encoding="utf-8"?>
1 <?xml version="1.0" encoding="utf-8"?>
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3
3
4 <?include guids.wxi ?>
4 <?include guids.wxi ?>
5 <?include defines.wxi ?>
5 <?include defines.wxi ?>
6
6
7 <Fragment>
7 <Fragment>
8 <ComponentGroup Id='helpFolder'>
8 <ComponentGroup Id='helpFolder'>
9 <ComponentRef Id='help.root' />
9 <ComponentRef Id='help.root' />
10 <ComponentRef Id='help.internals' />
10 <ComponentRef Id='help.internals' />
11 </ComponentGroup>
11 </ComponentGroup>
12 </Fragment>
12 </Fragment>
13
13
14 <Fragment>
14 <Fragment>
15 <DirectoryRef Id="INSTALLDIR">
15 <DirectoryRef Id="INSTALLDIR">
16 <Directory Id="helpdir" Name="help" FileSource="$(var.SourceDir)">
16 <Directory Id="helpdir" Name="help" FileSource="$(var.SourceDir)">
17 <Component Id="help.root" Guid="$(var.help.root.guid)" Win64='$(var.IsX64)'>
17 <Component Id="help.root" Guid="$(var.help.root.guid)" Win64='$(var.IsX64)'>
18 <File Name="bundlespec.txt" />
18 <File Name="color.txt" />
19 <File Name="color.txt" />
19 <File Name="config.txt" KeyPath="yes" />
20 <File Name="config.txt" KeyPath="yes" />
20 <File Name="dates.txt" />
21 <File Name="dates.txt" />
21 <File Name="diffs.txt" />
22 <File Name="diffs.txt" />
22 <File Name="environment.txt" />
23 <File Name="environment.txt" />
23 <File Name="extensions.txt" />
24 <File Name="extensions.txt" />
24 <File Name="filesets.txt" />
25 <File Name="filesets.txt" />
25 <File Name="glossary.txt" />
26 <File Name="glossary.txt" />
26 <File Name="hgignore.txt" />
27 <File Name="hgignore.txt" />
27 <File Name="hgweb.txt" />
28 <File Name="hgweb.txt" />
28 <File Name="merge-tools.txt" />
29 <File Name="merge-tools.txt" />
29 <File Name="pager.txt" />
30 <File Name="pager.txt" />
30 <File Name="patterns.txt" />
31 <File Name="patterns.txt" />
31 <File Name="phases.txt" />
32 <File Name="phases.txt" />
32 <File Name="revisions.txt" />
33 <File Name="revisions.txt" />
33 <File Name="scripting.txt" />
34 <File Name="scripting.txt" />
34 <File Name="subrepos.txt" />
35 <File Name="subrepos.txt" />
35 <File Name="templates.txt" />
36 <File Name="templates.txt" />
36 <File Name="urls.txt" />
37 <File Name="urls.txt" />
37 </Component>
38 </Component>
38
39
39 <Directory Id="help.internaldir" Name="internals">
40 <Directory Id="help.internaldir" Name="internals">
40 <Component Id="help.internals" Guid="$(var.help.internals.guid)" Win64='$(var.IsX64)'>
41 <Component Id="help.internals" Guid="$(var.help.internals.guid)" Win64='$(var.IsX64)'>
41 <File Id="internals.bundles.txt" Name="bundles.txt" KeyPath="yes" />
42 <File Id="internals.bundles.txt" Name="bundles.txt" KeyPath="yes" />
42 <File Id="internals.censor.txt" Name="censor.txt" KeyPath="yes" />
43 <File Id="internals.censor.txt" Name="censor.txt" KeyPath="yes" />
43 <File Id="internals.changegroups.txt" Name="changegroups.txt" />
44 <File Id="internals.changegroups.txt" Name="changegroups.txt" />
44 <File Id="internals.requirements.txt" Name="requirements.txt" />
45 <File Id="internals.requirements.txt" Name="requirements.txt" />
45 <File Id="internals.revlogs.txt" Name="revlogs.txt" />
46 <File Id="internals.revlogs.txt" Name="revlogs.txt" />
46 <File Id="internals.wireprotocol.txt" Name="wireprotocol.txt" />
47 <File Id="internals.wireprotocol.txt" Name="wireprotocol.txt" />
47 </Component>
48 </Component>
48 </Directory>
49 </Directory>
49
50
50 </Directory>
51 </Directory>
51 </DirectoryRef>
52 </DirectoryRef>
52 </Fragment>
53 </Fragment>
53
54
54 </Wix>
55 </Wix>
@@ -1,660 +1,663 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 __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 import itertools
10 import itertools
11 import os
11 import os
12 import textwrap
12 import textwrap
13
13
14 from .i18n import (
14 from .i18n import (
15 _,
15 _,
16 gettext,
16 gettext,
17 )
17 )
18 from . import (
18 from . import (
19 cmdutil,
19 cmdutil,
20 encoding,
20 encoding,
21 error,
21 error,
22 extensions,
22 extensions,
23 filemerge,
23 filemerge,
24 fileset,
24 fileset,
25 minirst,
25 minirst,
26 revset,
26 revset,
27 templatefilters,
27 templatefilters,
28 templatekw,
28 templatekw,
29 templater,
29 templater,
30 util,
30 util,
31 )
31 )
32 from .hgweb import (
32 from .hgweb import (
33 webcommands,
33 webcommands,
34 )
34 )
35
35
36 _exclkeywords = set([
36 _exclkeywords = set([
37 "(ADVANCED)",
37 "(ADVANCED)",
38 "(DEPRECATED)",
38 "(DEPRECATED)",
39 "(EXPERIMENTAL)",
39 "(EXPERIMENTAL)",
40 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
40 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
41 _("(ADVANCED)"),
41 _("(ADVANCED)"),
42 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
42 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
43 _("(DEPRECATED)"),
43 _("(DEPRECATED)"),
44 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
44 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
45 _("(EXPERIMENTAL)"),
45 _("(EXPERIMENTAL)"),
46 ])
46 ])
47
47
48 def listexts(header, exts, indent=1, showdeprecated=False):
48 def listexts(header, exts, indent=1, showdeprecated=False):
49 '''return a text listing of the given extensions'''
49 '''return a text listing of the given extensions'''
50 rst = []
50 rst = []
51 if exts:
51 if exts:
52 for name, desc in sorted(exts.iteritems()):
52 for name, desc in sorted(exts.iteritems()):
53 if not showdeprecated and any(w in desc for w in _exclkeywords):
53 if not showdeprecated and any(w in desc for w in _exclkeywords):
54 continue
54 continue
55 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
55 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
56 if rst:
56 if rst:
57 rst.insert(0, '\n%s\n\n' % header)
57 rst.insert(0, '\n%s\n\n' % header)
58 return rst
58 return rst
59
59
60 def extshelp(ui):
60 def extshelp(ui):
61 rst = loaddoc('extensions')(ui).splitlines(True)
61 rst = loaddoc('extensions')(ui).splitlines(True)
62 rst.extend(listexts(
62 rst.extend(listexts(
63 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
63 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
64 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
64 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
65 doc = ''.join(rst)
65 doc = ''.join(rst)
66 return doc
66 return doc
67
67
68 def optrst(header, options, verbose):
68 def optrst(header, options, verbose):
69 data = []
69 data = []
70 multioccur = False
70 multioccur = False
71 for option in options:
71 for option in options:
72 if len(option) == 5:
72 if len(option) == 5:
73 shortopt, longopt, default, desc, optlabel = option
73 shortopt, longopt, default, desc, optlabel = option
74 else:
74 else:
75 shortopt, longopt, default, desc = option
75 shortopt, longopt, default, desc = option
76 optlabel = _("VALUE") # default label
76 optlabel = _("VALUE") # default label
77
77
78 if not verbose and any(w in desc for w in _exclkeywords):
78 if not verbose and any(w in desc for w in _exclkeywords):
79 continue
79 continue
80
80
81 so = ''
81 so = ''
82 if shortopt:
82 if shortopt:
83 so = '-' + shortopt
83 so = '-' + shortopt
84 lo = '--' + longopt
84 lo = '--' + longopt
85 if default:
85 if default:
86 desc += _(" (default: %s)") % default
86 desc += _(" (default: %s)") % default
87
87
88 if isinstance(default, list):
88 if isinstance(default, list):
89 lo += " %s [+]" % optlabel
89 lo += " %s [+]" % optlabel
90 multioccur = True
90 multioccur = True
91 elif (default is not None) and not isinstance(default, bool):
91 elif (default is not None) and not isinstance(default, bool):
92 lo += " %s" % optlabel
92 lo += " %s" % optlabel
93
93
94 data.append((so, lo, desc))
94 data.append((so, lo, desc))
95
95
96 if multioccur:
96 if multioccur:
97 header += (_(" ([+] can be repeated)"))
97 header += (_(" ([+] can be repeated)"))
98
98
99 rst = ['\n%s:\n\n' % header]
99 rst = ['\n%s:\n\n' % header]
100 rst.extend(minirst.maketable(data, 1))
100 rst.extend(minirst.maketable(data, 1))
101
101
102 return ''.join(rst)
102 return ''.join(rst)
103
103
104 def indicateomitted(rst, omitted, notomitted=None):
104 def indicateomitted(rst, omitted, notomitted=None):
105 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
105 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
106 if notomitted:
106 if notomitted:
107 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
107 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
108
108
109 def filtercmd(ui, cmd, kw, doc):
109 def filtercmd(ui, cmd, kw, doc):
110 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
110 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
111 return True
111 return True
112 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
112 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
113 return True
113 return True
114 return False
114 return False
115
115
116 def topicmatch(ui, kw):
116 def topicmatch(ui, kw):
117 """Return help topics matching kw.
117 """Return help topics matching kw.
118
118
119 Returns {'section': [(name, summary), ...], ...} where section is
119 Returns {'section': [(name, summary), ...], ...} where section is
120 one of topics, commands, extensions, or extensioncommands.
120 one of topics, commands, extensions, or extensioncommands.
121 """
121 """
122 kw = encoding.lower(kw)
122 kw = encoding.lower(kw)
123 def lowercontains(container):
123 def lowercontains(container):
124 return kw in encoding.lower(container) # translated in helptable
124 return kw in encoding.lower(container) # translated in helptable
125 results = {'topics': [],
125 results = {'topics': [],
126 'commands': [],
126 'commands': [],
127 'extensions': [],
127 'extensions': [],
128 'extensioncommands': [],
128 'extensioncommands': [],
129 }
129 }
130 for names, header, doc in helptable:
130 for names, header, doc in helptable:
131 # Old extensions may use a str as doc.
131 # Old extensions may use a str as doc.
132 if (sum(map(lowercontains, names))
132 if (sum(map(lowercontains, names))
133 or lowercontains(header)
133 or lowercontains(header)
134 or (callable(doc) and lowercontains(doc(ui)))):
134 or (callable(doc) and lowercontains(doc(ui)))):
135 results['topics'].append((names[0], header))
135 results['topics'].append((names[0], header))
136 from . import commands # avoid cycle
136 from . import commands # avoid cycle
137 for cmd, entry in commands.table.iteritems():
137 for cmd, entry in commands.table.iteritems():
138 if len(entry) == 3:
138 if len(entry) == 3:
139 summary = entry[2]
139 summary = entry[2]
140 else:
140 else:
141 summary = ''
141 summary = ''
142 # translate docs *before* searching there
142 # translate docs *before* searching there
143 docs = _(getattr(entry[0], '__doc__', None)) or ''
143 docs = _(getattr(entry[0], '__doc__', None)) or ''
144 if kw in cmd or lowercontains(summary) or lowercontains(docs):
144 if kw in cmd or lowercontains(summary) or lowercontains(docs):
145 doclines = docs.splitlines()
145 doclines = docs.splitlines()
146 if doclines:
146 if doclines:
147 summary = doclines[0]
147 summary = doclines[0]
148 cmdname = cmd.partition('|')[0].lstrip('^')
148 cmdname = cmd.partition('|')[0].lstrip('^')
149 if filtercmd(ui, cmdname, kw, docs):
149 if filtercmd(ui, cmdname, kw, docs):
150 continue
150 continue
151 results['commands'].append((cmdname, summary))
151 results['commands'].append((cmdname, summary))
152 for name, docs in itertools.chain(
152 for name, docs in itertools.chain(
153 extensions.enabled(False).iteritems(),
153 extensions.enabled(False).iteritems(),
154 extensions.disabled().iteritems()):
154 extensions.disabled().iteritems()):
155 if not docs:
155 if not docs:
156 continue
156 continue
157 mod = extensions.load(ui, name, '')
157 mod = extensions.load(ui, name, '')
158 name = name.rpartition('.')[-1]
158 name = name.rpartition('.')[-1]
159 if lowercontains(name) or lowercontains(docs):
159 if lowercontains(name) or lowercontains(docs):
160 # extension docs are already translated
160 # extension docs are already translated
161 results['extensions'].append((name, docs.splitlines()[0]))
161 results['extensions'].append((name, docs.splitlines()[0]))
162 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
162 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
163 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
163 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
164 cmdname = cmd.partition('|')[0].lstrip('^')
164 cmdname = cmd.partition('|')[0].lstrip('^')
165 if entry[0].__doc__:
165 if entry[0].__doc__:
166 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
166 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
167 else:
167 else:
168 cmddoc = _('(no help text available)')
168 cmddoc = _('(no help text available)')
169 if filtercmd(ui, cmdname, kw, cmddoc):
169 if filtercmd(ui, cmdname, kw, cmddoc):
170 continue
170 continue
171 results['extensioncommands'].append((cmdname, cmddoc))
171 results['extensioncommands'].append((cmdname, cmddoc))
172 return results
172 return results
173
173
174 def loaddoc(topic, subdir=None):
174 def loaddoc(topic, subdir=None):
175 """Return a delayed loader for help/topic.txt."""
175 """Return a delayed loader for help/topic.txt."""
176
176
177 def loader(ui):
177 def loader(ui):
178 docdir = os.path.join(util.datapath, 'help')
178 docdir = os.path.join(util.datapath, 'help')
179 if subdir:
179 if subdir:
180 docdir = os.path.join(docdir, subdir)
180 docdir = os.path.join(docdir, subdir)
181 path = os.path.join(docdir, topic + ".txt")
181 path = os.path.join(docdir, topic + ".txt")
182 doc = gettext(util.readfile(path))
182 doc = gettext(util.readfile(path))
183 for rewriter in helphooks.get(topic, []):
183 for rewriter in helphooks.get(topic, []):
184 doc = rewriter(ui, topic, doc)
184 doc = rewriter(ui, topic, doc)
185 return doc
185 return doc
186
186
187 return loader
187 return loader
188
188
189 internalstable = sorted([
189 internalstable = sorted([
190 (['bundles'], _('Bundles'),
190 (['bundles'], _('Bundles'),
191 loaddoc('bundles', subdir='internals')),
191 loaddoc('bundles', subdir='internals')),
192 (['censor'], _('Censor'),
192 (['censor'], _('Censor'),
193 loaddoc('censor', subdir='internals')),
193 loaddoc('censor', subdir='internals')),
194 (['changegroups'], _('Changegroups'),
194 (['changegroups'], _('Changegroups'),
195 loaddoc('changegroups', subdir='internals')),
195 loaddoc('changegroups', subdir='internals')),
196 (['requirements'], _('Repository Requirements'),
196 (['requirements'], _('Repository Requirements'),
197 loaddoc('requirements', subdir='internals')),
197 loaddoc('requirements', subdir='internals')),
198 (['revlogs'], _('Revision Logs'),
198 (['revlogs'], _('Revision Logs'),
199 loaddoc('revlogs', subdir='internals')),
199 loaddoc('revlogs', subdir='internals')),
200 (['wireprotocol'], _('Wire Protocol'),
200 (['wireprotocol'], _('Wire Protocol'),
201 loaddoc('wireprotocol', subdir='internals')),
201 loaddoc('wireprotocol', subdir='internals')),
202 ])
202 ])
203
203
204 def internalshelp(ui):
204 def internalshelp(ui):
205 """Generate the index for the "internals" topic."""
205 """Generate the index for the "internals" topic."""
206 lines = []
206 lines = []
207 for names, header, doc in internalstable:
207 for names, header, doc in internalstable:
208 lines.append(' :%s: %s\n' % (names[0], header))
208 lines.append(' :%s: %s\n' % (names[0], header))
209
209
210 return ''.join(lines)
210 return ''.join(lines)
211
211
212 helptable = sorted([
212 helptable = sorted([
213 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec')),
213 (['color'], _("Colorizing Outputs"), loaddoc('color')),
214 (['color'], _("Colorizing Outputs"), loaddoc('color')),
214 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
215 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
215 (["dates"], _("Date Formats"), loaddoc('dates')),
216 (["dates"], _("Date Formats"), loaddoc('dates')),
216 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
217 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
217 (['environment', 'env'], _('Environment Variables'),
218 (['environment', 'env'], _('Environment Variables'),
218 loaddoc('environment')),
219 loaddoc('environment')),
219 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
220 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
220 _('Specifying Revisions'), loaddoc('revisions')),
221 _('Specifying Revisions'), loaddoc('revisions')),
221 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
222 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
222 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
223 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
223 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
224 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
224 loaddoc('merge-tools')),
225 loaddoc('merge-tools')),
225 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
226 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
226 loaddoc('templates')),
227 loaddoc('templates')),
227 (['urls'], _('URL Paths'), loaddoc('urls')),
228 (['urls'], _('URL Paths'), loaddoc('urls')),
228 (["extensions"], _("Using Additional Features"), extshelp),
229 (["extensions"], _("Using Additional Features"), extshelp),
229 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
230 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
230 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
231 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
231 (["glossary"], _("Glossary"), loaddoc('glossary')),
232 (["glossary"], _("Glossary"), loaddoc('glossary')),
232 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
233 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
233 loaddoc('hgignore')),
234 loaddoc('hgignore')),
234 (["phases"], _("Working with Phases"), loaddoc('phases')),
235 (["phases"], _("Working with Phases"), loaddoc('phases')),
235 (['scripting'], _('Using Mercurial from scripts and automation'),
236 (['scripting'], _('Using Mercurial from scripts and automation'),
236 loaddoc('scripting')),
237 loaddoc('scripting')),
237 (['internals'], _("Technical implementation topics"),
238 (['internals'], _("Technical implementation topics"),
238 internalshelp),
239 internalshelp),
239 (['pager'], _("Pager Support"), loaddoc('pager')),
240 (['pager'], _("Pager Support"), loaddoc('pager')),
240 ])
241 ])
241
242
242 # Maps topics with sub-topics to a list of their sub-topics.
243 # Maps topics with sub-topics to a list of their sub-topics.
243 subtopics = {
244 subtopics = {
244 'internals': internalstable,
245 'internals': internalstable,
245 }
246 }
246
247
247 # Map topics to lists of callable taking the current topic help and
248 # Map topics to lists of callable taking the current topic help and
248 # returning the updated version
249 # returning the updated version
249 helphooks = {}
250 helphooks = {}
250
251
251 def addtopichook(topic, rewriter):
252 def addtopichook(topic, rewriter):
252 helphooks.setdefault(topic, []).append(rewriter)
253 helphooks.setdefault(topic, []).append(rewriter)
253
254
254 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
255 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
255 """Extract docstring from the items key to function mapping, build a
256 """Extract docstring from the items key to function mapping, build a
256 single documentation block and use it to overwrite the marker in doc.
257 single documentation block and use it to overwrite the marker in doc.
257 """
258 """
258 entries = []
259 entries = []
259 for name in sorted(items):
260 for name in sorted(items):
260 text = (items[name].__doc__ or '').rstrip()
261 text = (items[name].__doc__ or '').rstrip()
261 if (not text
262 if (not text
262 or not ui.verbose and any(w in text for w in _exclkeywords)):
263 or not ui.verbose and any(w in text for w in _exclkeywords)):
263 continue
264 continue
264 text = gettext(text)
265 text = gettext(text)
265 if dedent:
266 if dedent:
266 text = textwrap.dedent(text)
267 text = textwrap.dedent(text)
267 lines = text.splitlines()
268 lines = text.splitlines()
268 doclines = [(lines[0])]
269 doclines = [(lines[0])]
269 for l in lines[1:]:
270 for l in lines[1:]:
270 # Stop once we find some Python doctest
271 # Stop once we find some Python doctest
271 if l.strip().startswith('>>>'):
272 if l.strip().startswith('>>>'):
272 break
273 break
273 if dedent:
274 if dedent:
274 doclines.append(l.rstrip())
275 doclines.append(l.rstrip())
275 else:
276 else:
276 doclines.append(' ' + l.strip())
277 doclines.append(' ' + l.strip())
277 entries.append('\n'.join(doclines))
278 entries.append('\n'.join(doclines))
278 entries = '\n\n'.join(entries)
279 entries = '\n\n'.join(entries)
279 return doc.replace(marker, entries)
280 return doc.replace(marker, entries)
280
281
281 def addtopicsymbols(topic, marker, symbols, dedent=False):
282 def addtopicsymbols(topic, marker, symbols, dedent=False):
282 def add(ui, topic, doc):
283 def add(ui, topic, doc):
283 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
284 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
284 addtopichook(topic, add)
285 addtopichook(topic, add)
285
286
287 addtopicsymbols('bundlespec', '.. bundlecompressionmarker',
288 util.bundlecompressiontopics())
286 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
289 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
287 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
290 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
288 filemerge.internalsdoc)
291 filemerge.internalsdoc)
289 addtopicsymbols('revisions', '.. predicatesmarker', revset.symbols)
292 addtopicsymbols('revisions', '.. predicatesmarker', revset.symbols)
290 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
293 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
291 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
294 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
292 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
295 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
293 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
296 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
294 dedent=True)
297 dedent=True)
295
298
296 def help_(ui, name, unknowncmd=False, full=True, subtopic=None, **opts):
299 def help_(ui, name, unknowncmd=False, full=True, subtopic=None, **opts):
297 '''
300 '''
298 Generate the help for 'name' as unformatted restructured text. If
301 Generate the help for 'name' as unformatted restructured text. If
299 'name' is None, describe the commands available.
302 'name' is None, describe the commands available.
300 '''
303 '''
301
304
302 from . import commands # avoid cycle
305 from . import commands # avoid cycle
303
306
304 def helpcmd(name, subtopic=None):
307 def helpcmd(name, subtopic=None):
305 try:
308 try:
306 aliases, entry = cmdutil.findcmd(name, commands.table,
309 aliases, entry = cmdutil.findcmd(name, commands.table,
307 strict=unknowncmd)
310 strict=unknowncmd)
308 except error.AmbiguousCommand as inst:
311 except error.AmbiguousCommand as inst:
309 # py3k fix: except vars can't be used outside the scope of the
312 # py3k fix: except vars can't be used outside the scope of the
310 # except block, nor can be used inside a lambda. python issue4617
313 # except block, nor can be used inside a lambda. python issue4617
311 prefix = inst.args[0]
314 prefix = inst.args[0]
312 select = lambda c: c.lstrip('^').startswith(prefix)
315 select = lambda c: c.lstrip('^').startswith(prefix)
313 rst = helplist(select)
316 rst = helplist(select)
314 return rst
317 return rst
315
318
316 rst = []
319 rst = []
317
320
318 # check if it's an invalid alias and display its error if it is
321 # check if it's an invalid alias and display its error if it is
319 if getattr(entry[0], 'badalias', None):
322 if getattr(entry[0], 'badalias', None):
320 rst.append(entry[0].badalias + '\n')
323 rst.append(entry[0].badalias + '\n')
321 if entry[0].unknowncmd:
324 if entry[0].unknowncmd:
322 try:
325 try:
323 rst.extend(helpextcmd(entry[0].cmdname))
326 rst.extend(helpextcmd(entry[0].cmdname))
324 except error.UnknownCommand:
327 except error.UnknownCommand:
325 pass
328 pass
326 return rst
329 return rst
327
330
328 # synopsis
331 # synopsis
329 if len(entry) > 2:
332 if len(entry) > 2:
330 if entry[2].startswith('hg'):
333 if entry[2].startswith('hg'):
331 rst.append("%s\n" % entry[2])
334 rst.append("%s\n" % entry[2])
332 else:
335 else:
333 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
336 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
334 else:
337 else:
335 rst.append('hg %s\n' % aliases[0])
338 rst.append('hg %s\n' % aliases[0])
336 # aliases
339 # aliases
337 if full and not ui.quiet and len(aliases) > 1:
340 if full and not ui.quiet and len(aliases) > 1:
338 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
341 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
339 rst.append('\n')
342 rst.append('\n')
340
343
341 # description
344 # description
342 doc = gettext(entry[0].__doc__)
345 doc = gettext(entry[0].__doc__)
343 if not doc:
346 if not doc:
344 doc = _("(no help text available)")
347 doc = _("(no help text available)")
345 if util.safehasattr(entry[0], 'definition'): # aliased command
348 if util.safehasattr(entry[0], 'definition'): # aliased command
346 source = entry[0].source
349 source = entry[0].source
347 if entry[0].definition.startswith('!'): # shell alias
350 if entry[0].definition.startswith('!'): # shell alias
348 doc = (_('shell alias for::\n\n %s\n\ndefined by: %s\n') %
351 doc = (_('shell alias for::\n\n %s\n\ndefined by: %s\n') %
349 (entry[0].definition[1:], source))
352 (entry[0].definition[1:], source))
350 else:
353 else:
351 doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') %
354 doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') %
352 (entry[0].definition, doc, source))
355 (entry[0].definition, doc, source))
353 doc = doc.splitlines(True)
356 doc = doc.splitlines(True)
354 if ui.quiet or not full:
357 if ui.quiet or not full:
355 rst.append(doc[0])
358 rst.append(doc[0])
356 else:
359 else:
357 rst.extend(doc)
360 rst.extend(doc)
358 rst.append('\n')
361 rst.append('\n')
359
362
360 # check if this command shadows a non-trivial (multi-line)
363 # check if this command shadows a non-trivial (multi-line)
361 # extension help text
364 # extension help text
362 try:
365 try:
363 mod = extensions.find(name)
366 mod = extensions.find(name)
364 doc = gettext(mod.__doc__) or ''
367 doc = gettext(mod.__doc__) or ''
365 if '\n' in doc.strip():
368 if '\n' in doc.strip():
366 msg = _("(use 'hg help -e %s' to show help for "
369 msg = _("(use 'hg help -e %s' to show help for "
367 "the %s extension)") % (name, name)
370 "the %s extension)") % (name, name)
368 rst.append('\n%s\n' % msg)
371 rst.append('\n%s\n' % msg)
369 except KeyError:
372 except KeyError:
370 pass
373 pass
371
374
372 # options
375 # options
373 if not ui.quiet and entry[1]:
376 if not ui.quiet and entry[1]:
374 rst.append(optrst(_("options"), entry[1], ui.verbose))
377 rst.append(optrst(_("options"), entry[1], ui.verbose))
375
378
376 if ui.verbose:
379 if ui.verbose:
377 rst.append(optrst(_("global options"),
380 rst.append(optrst(_("global options"),
378 commands.globalopts, ui.verbose))
381 commands.globalopts, ui.verbose))
379
382
380 if not ui.verbose:
383 if not ui.verbose:
381 if not full:
384 if not full:
382 rst.append(_("\n(use 'hg %s -h' to show more help)\n")
385 rst.append(_("\n(use 'hg %s -h' to show more help)\n")
383 % name)
386 % name)
384 elif not ui.quiet:
387 elif not ui.quiet:
385 rst.append(_('\n(some details hidden, use --verbose '
388 rst.append(_('\n(some details hidden, use --verbose '
386 'to show complete help)'))
389 'to show complete help)'))
387
390
388 return rst
391 return rst
389
392
390
393
391 def helplist(select=None, **opts):
394 def helplist(select=None, **opts):
392 # list of commands
395 # list of commands
393 if name == "shortlist":
396 if name == "shortlist":
394 header = _('basic commands:\n\n')
397 header = _('basic commands:\n\n')
395 elif name == "debug":
398 elif name == "debug":
396 header = _('debug commands (internal and unsupported):\n\n')
399 header = _('debug commands (internal and unsupported):\n\n')
397 else:
400 else:
398 header = _('list of commands:\n\n')
401 header = _('list of commands:\n\n')
399
402
400 h = {}
403 h = {}
401 cmds = {}
404 cmds = {}
402 for c, e in commands.table.iteritems():
405 for c, e in commands.table.iteritems():
403 f = c.partition("|")[0]
406 f = c.partition("|")[0]
404 if select and not select(f):
407 if select and not select(f):
405 continue
408 continue
406 if (not select and name != 'shortlist' and
409 if (not select and name != 'shortlist' and
407 e[0].__module__ != commands.__name__):
410 e[0].__module__ != commands.__name__):
408 continue
411 continue
409 if name == "shortlist" and not f.startswith("^"):
412 if name == "shortlist" and not f.startswith("^"):
410 continue
413 continue
411 f = f.lstrip("^")
414 f = f.lstrip("^")
412 doc = e[0].__doc__
415 doc = e[0].__doc__
413 if filtercmd(ui, f, name, doc):
416 if filtercmd(ui, f, name, doc):
414 continue
417 continue
415 doc = gettext(doc)
418 doc = gettext(doc)
416 if not doc:
419 if not doc:
417 doc = _("(no help text available)")
420 doc = _("(no help text available)")
418 h[f] = doc.splitlines()[0].rstrip()
421 h[f] = doc.splitlines()[0].rstrip()
419 cmds[f] = c.lstrip("^")
422 cmds[f] = c.lstrip("^")
420
423
421 rst = []
424 rst = []
422 if not h:
425 if not h:
423 if not ui.quiet:
426 if not ui.quiet:
424 rst.append(_('no commands defined\n'))
427 rst.append(_('no commands defined\n'))
425 return rst
428 return rst
426
429
427 if not ui.quiet:
430 if not ui.quiet:
428 rst.append(header)
431 rst.append(header)
429 fns = sorted(h)
432 fns = sorted(h)
430 for f in fns:
433 for f in fns:
431 if ui.verbose:
434 if ui.verbose:
432 commacmds = cmds[f].replace("|",", ")
435 commacmds = cmds[f].replace("|",", ")
433 rst.append(" :%s: %s\n" % (commacmds, h[f]))
436 rst.append(" :%s: %s\n" % (commacmds, h[f]))
434 else:
437 else:
435 rst.append(' :%s: %s\n' % (f, h[f]))
438 rst.append(' :%s: %s\n' % (f, h[f]))
436
439
437 ex = opts.get
440 ex = opts.get
438 anyopts = (ex('keyword') or not (ex('command') or ex('extension')))
441 anyopts = (ex('keyword') or not (ex('command') or ex('extension')))
439 if not name and anyopts:
442 if not name and anyopts:
440 exts = listexts(_('enabled extensions:'), extensions.enabled())
443 exts = listexts(_('enabled extensions:'), extensions.enabled())
441 if exts:
444 if exts:
442 rst.append('\n')
445 rst.append('\n')
443 rst.extend(exts)
446 rst.extend(exts)
444
447
445 rst.append(_("\nadditional help topics:\n\n"))
448 rst.append(_("\nadditional help topics:\n\n"))
446 topics = []
449 topics = []
447 for names, header, doc in helptable:
450 for names, header, doc in helptable:
448 topics.append((names[0], header))
451 topics.append((names[0], header))
449 for t, desc in topics:
452 for t, desc in topics:
450 rst.append(" :%s: %s\n" % (t, desc))
453 rst.append(" :%s: %s\n" % (t, desc))
451
454
452 if ui.quiet:
455 if ui.quiet:
453 pass
456 pass
454 elif ui.verbose:
457 elif ui.verbose:
455 rst.append('\n%s\n' % optrst(_("global options"),
458 rst.append('\n%s\n' % optrst(_("global options"),
456 commands.globalopts, ui.verbose))
459 commands.globalopts, ui.verbose))
457 if name == 'shortlist':
460 if name == 'shortlist':
458 rst.append(_("\n(use 'hg help' for the full list "
461 rst.append(_("\n(use 'hg help' for the full list "
459 "of commands)\n"))
462 "of commands)\n"))
460 else:
463 else:
461 if name == 'shortlist':
464 if name == 'shortlist':
462 rst.append(_("\n(use 'hg help' for the full list of commands "
465 rst.append(_("\n(use 'hg help' for the full list of commands "
463 "or 'hg -v' for details)\n"))
466 "or 'hg -v' for details)\n"))
464 elif name and not full:
467 elif name and not full:
465 rst.append(_("\n(use 'hg help %s' to show the full help "
468 rst.append(_("\n(use 'hg help %s' to show the full help "
466 "text)\n") % name)
469 "text)\n") % name)
467 elif name and cmds and name in cmds.keys():
470 elif name and cmds and name in cmds.keys():
468 rst.append(_("\n(use 'hg help -v -e %s' to show built-in "
471 rst.append(_("\n(use 'hg help -v -e %s' to show built-in "
469 "aliases and global options)\n") % name)
472 "aliases and global options)\n") % name)
470 else:
473 else:
471 rst.append(_("\n(use 'hg help -v%s' to show built-in aliases "
474 rst.append(_("\n(use 'hg help -v%s' to show built-in aliases "
472 "and global options)\n")
475 "and global options)\n")
473 % (name and " " + name or ""))
476 % (name and " " + name or ""))
474 return rst
477 return rst
475
478
476 def helptopic(name, subtopic=None):
479 def helptopic(name, subtopic=None):
477 # Look for sub-topic entry first.
480 # Look for sub-topic entry first.
478 header, doc = None, None
481 header, doc = None, None
479 if subtopic and name in subtopics:
482 if subtopic and name in subtopics:
480 for names, header, doc in subtopics[name]:
483 for names, header, doc in subtopics[name]:
481 if subtopic in names:
484 if subtopic in names:
482 break
485 break
483
486
484 if not header:
487 if not header:
485 for names, header, doc in helptable:
488 for names, header, doc in helptable:
486 if name in names:
489 if name in names:
487 break
490 break
488 else:
491 else:
489 raise error.UnknownCommand(name)
492 raise error.UnknownCommand(name)
490
493
491 rst = [minirst.section(header)]
494 rst = [minirst.section(header)]
492
495
493 # description
496 # description
494 if not doc:
497 if not doc:
495 rst.append(" %s\n" % _("(no help text available)"))
498 rst.append(" %s\n" % _("(no help text available)"))
496 if callable(doc):
499 if callable(doc):
497 rst += [" %s\n" % l for l in doc(ui).splitlines()]
500 rst += [" %s\n" % l for l in doc(ui).splitlines()]
498
501
499 if not ui.verbose:
502 if not ui.verbose:
500 omitted = _('(some details hidden, use --verbose'
503 omitted = _('(some details hidden, use --verbose'
501 ' to show complete help)')
504 ' to show complete help)')
502 indicateomitted(rst, omitted)
505 indicateomitted(rst, omitted)
503
506
504 try:
507 try:
505 cmdutil.findcmd(name, commands.table)
508 cmdutil.findcmd(name, commands.table)
506 rst.append(_("\nuse 'hg help -c %s' to see help for "
509 rst.append(_("\nuse 'hg help -c %s' to see help for "
507 "the %s command\n") % (name, name))
510 "the %s command\n") % (name, name))
508 except error.UnknownCommand:
511 except error.UnknownCommand:
509 pass
512 pass
510 return rst
513 return rst
511
514
512 def helpext(name, subtopic=None):
515 def helpext(name, subtopic=None):
513 try:
516 try:
514 mod = extensions.find(name)
517 mod = extensions.find(name)
515 doc = gettext(mod.__doc__) or _('no help text available')
518 doc = gettext(mod.__doc__) or _('no help text available')
516 except KeyError:
519 except KeyError:
517 mod = None
520 mod = None
518 doc = extensions.disabledext(name)
521 doc = extensions.disabledext(name)
519 if not doc:
522 if not doc:
520 raise error.UnknownCommand(name)
523 raise error.UnknownCommand(name)
521
524
522 if '\n' not in doc:
525 if '\n' not in doc:
523 head, tail = doc, ""
526 head, tail = doc, ""
524 else:
527 else:
525 head, tail = doc.split('\n', 1)
528 head, tail = doc.split('\n', 1)
526 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
529 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
527 if tail:
530 if tail:
528 rst.extend(tail.splitlines(True))
531 rst.extend(tail.splitlines(True))
529 rst.append('\n')
532 rst.append('\n')
530
533
531 if not ui.verbose:
534 if not ui.verbose:
532 omitted = _('(some details hidden, use --verbose'
535 omitted = _('(some details hidden, use --verbose'
533 ' to show complete help)')
536 ' to show complete help)')
534 indicateomitted(rst, omitted)
537 indicateomitted(rst, omitted)
535
538
536 if mod:
539 if mod:
537 try:
540 try:
538 ct = mod.cmdtable
541 ct = mod.cmdtable
539 except AttributeError:
542 except AttributeError:
540 ct = {}
543 ct = {}
541 modcmds = set([c.partition('|')[0] for c in ct])
544 modcmds = set([c.partition('|')[0] for c in ct])
542 rst.extend(helplist(modcmds.__contains__))
545 rst.extend(helplist(modcmds.__contains__))
543 else:
546 else:
544 rst.append(_("(use 'hg help extensions' for information on enabling"
547 rst.append(_("(use 'hg help extensions' for information on enabling"
545 " extensions)\n"))
548 " extensions)\n"))
546 return rst
549 return rst
547
550
548 def helpextcmd(name, subtopic=None):
551 def helpextcmd(name, subtopic=None):
549 cmd, ext, mod = extensions.disabledcmd(ui, name,
552 cmd, ext, mod = extensions.disabledcmd(ui, name,
550 ui.configbool('ui', 'strict'))
553 ui.configbool('ui', 'strict'))
551 doc = gettext(mod.__doc__).splitlines()[0]
554 doc = gettext(mod.__doc__).splitlines()[0]
552
555
553 rst = listexts(_("'%s' is provided by the following "
556 rst = listexts(_("'%s' is provided by the following "
554 "extension:") % cmd, {ext: doc}, indent=4,
557 "extension:") % cmd, {ext: doc}, indent=4,
555 showdeprecated=True)
558 showdeprecated=True)
556 rst.append('\n')
559 rst.append('\n')
557 rst.append(_("(use 'hg help extensions' for information on enabling "
560 rst.append(_("(use 'hg help extensions' for information on enabling "
558 "extensions)\n"))
561 "extensions)\n"))
559 return rst
562 return rst
560
563
561
564
562 rst = []
565 rst = []
563 kw = opts.get('keyword')
566 kw = opts.get('keyword')
564 if kw or name is None and any(opts[o] for o in opts):
567 if kw or name is None and any(opts[o] for o in opts):
565 matches = topicmatch(ui, name or '')
568 matches = topicmatch(ui, name or '')
566 helpareas = []
569 helpareas = []
567 if opts.get('extension'):
570 if opts.get('extension'):
568 helpareas += [('extensions', _('Extensions'))]
571 helpareas += [('extensions', _('Extensions'))]
569 if opts.get('command'):
572 if opts.get('command'):
570 helpareas += [('commands', _('Commands'))]
573 helpareas += [('commands', _('Commands'))]
571 if not helpareas:
574 if not helpareas:
572 helpareas = [('topics', _('Topics')),
575 helpareas = [('topics', _('Topics')),
573 ('commands', _('Commands')),
576 ('commands', _('Commands')),
574 ('extensions', _('Extensions')),
577 ('extensions', _('Extensions')),
575 ('extensioncommands', _('Extension Commands'))]
578 ('extensioncommands', _('Extension Commands'))]
576 for t, title in helpareas:
579 for t, title in helpareas:
577 if matches[t]:
580 if matches[t]:
578 rst.append('%s:\n\n' % title)
581 rst.append('%s:\n\n' % title)
579 rst.extend(minirst.maketable(sorted(matches[t]), 1))
582 rst.extend(minirst.maketable(sorted(matches[t]), 1))
580 rst.append('\n')
583 rst.append('\n')
581 if not rst:
584 if not rst:
582 msg = _('no matches')
585 msg = _('no matches')
583 hint = _("try 'hg help' for a list of topics")
586 hint = _("try 'hg help' for a list of topics")
584 raise error.Abort(msg, hint=hint)
587 raise error.Abort(msg, hint=hint)
585 elif name and name != 'shortlist':
588 elif name and name != 'shortlist':
586 queries = []
589 queries = []
587 if unknowncmd:
590 if unknowncmd:
588 queries += [helpextcmd]
591 queries += [helpextcmd]
589 if opts.get('extension'):
592 if opts.get('extension'):
590 queries += [helpext]
593 queries += [helpext]
591 if opts.get('command'):
594 if opts.get('command'):
592 queries += [helpcmd]
595 queries += [helpcmd]
593 if not queries:
596 if not queries:
594 queries = (helptopic, helpcmd, helpext, helpextcmd)
597 queries = (helptopic, helpcmd, helpext, helpextcmd)
595 for f in queries:
598 for f in queries:
596 try:
599 try:
597 rst = f(name, subtopic)
600 rst = f(name, subtopic)
598 break
601 break
599 except error.UnknownCommand:
602 except error.UnknownCommand:
600 pass
603 pass
601 else:
604 else:
602 if unknowncmd:
605 if unknowncmd:
603 raise error.UnknownCommand(name)
606 raise error.UnknownCommand(name)
604 else:
607 else:
605 msg = _('no such help topic: %s') % name
608 msg = _('no such help topic: %s') % name
606 hint = _("try 'hg help --keyword %s'") % name
609 hint = _("try 'hg help --keyword %s'") % name
607 raise error.Abort(msg, hint=hint)
610 raise error.Abort(msg, hint=hint)
608 else:
611 else:
609 # program name
612 # program name
610 if not ui.quiet:
613 if not ui.quiet:
611 rst = [_("Mercurial Distributed SCM\n"), '\n']
614 rst = [_("Mercurial Distributed SCM\n"), '\n']
612 rst.extend(helplist(None, **opts))
615 rst.extend(helplist(None, **opts))
613
616
614 return ''.join(rst)
617 return ''.join(rst)
615
618
616 def formattedhelp(ui, name, keep=None, unknowncmd=False, full=True, **opts):
619 def formattedhelp(ui, name, keep=None, unknowncmd=False, full=True, **opts):
617 """get help for a given topic (as a dotted name) as rendered rst
620 """get help for a given topic (as a dotted name) as rendered rst
618
621
619 Either returns the rendered help text or raises an exception.
622 Either returns the rendered help text or raises an exception.
620 """
623 """
621 if keep is None:
624 if keep is None:
622 keep = []
625 keep = []
623 else:
626 else:
624 keep = list(keep) # make a copy so we can mutate this later
627 keep = list(keep) # make a copy so we can mutate this later
625 fullname = name
628 fullname = name
626 section = None
629 section = None
627 subtopic = None
630 subtopic = None
628 if name and '.' in name:
631 if name and '.' in name:
629 name, remaining = name.split('.', 1)
632 name, remaining = name.split('.', 1)
630 remaining = encoding.lower(remaining)
633 remaining = encoding.lower(remaining)
631 if '.' in remaining:
634 if '.' in remaining:
632 subtopic, section = remaining.split('.', 1)
635 subtopic, section = remaining.split('.', 1)
633 else:
636 else:
634 if name in subtopics:
637 if name in subtopics:
635 subtopic = remaining
638 subtopic = remaining
636 else:
639 else:
637 section = remaining
640 section = remaining
638 textwidth = ui.configint('ui', 'textwidth', 78)
641 textwidth = ui.configint('ui', 'textwidth', 78)
639 termwidth = ui.termwidth() - 2
642 termwidth = ui.termwidth() - 2
640 if textwidth <= 0 or termwidth < textwidth:
643 if textwidth <= 0 or termwidth < textwidth:
641 textwidth = termwidth
644 textwidth = termwidth
642 text = help_(ui, name,
645 text = help_(ui, name,
643 subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts)
646 subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts)
644
647
645 formatted, pruned = minirst.format(text, textwidth, keep=keep,
648 formatted, pruned = minirst.format(text, textwidth, keep=keep,
646 section=section)
649 section=section)
647
650
648 # We could have been given a weird ".foo" section without a name
651 # We could have been given a weird ".foo" section without a name
649 # to look for, or we could have simply failed to found "foo.bar"
652 # to look for, or we could have simply failed to found "foo.bar"
650 # because bar isn't a section of foo
653 # because bar isn't a section of foo
651 if section and not (formatted and name):
654 if section and not (formatted and name):
652 raise error.Abort(_("help section not found: %s") % fullname)
655 raise error.Abort(_("help section not found: %s") % fullname)
653
656
654 if 'verbose' in pruned:
657 if 'verbose' in pruned:
655 keep.append('omitted')
658 keep.append('omitted')
656 else:
659 else:
657 keep.append('notomitted')
660 keep.append('notomitted')
658 formatted, pruned = minirst.format(text, textwidth, keep=keep,
661 formatted, pruned = minirst.format(text, textwidth, keep=keep,
659 section=section)
662 section=section)
660 return formatted
663 return formatted
@@ -1,450 +1,452 b''
1 $ hg init a
1 $ hg init a
2 $ cd a
2 $ cd a
3 $ echo a > a
3 $ echo a > a
4 $ hg ci -A -d'1 0' -m a
4 $ hg ci -A -d'1 0' -m a
5 adding a
5 adding a
6
6
7 $ cd ..
7 $ cd ..
8
8
9 $ hg init b
9 $ hg init b
10 $ cd b
10 $ cd b
11 $ echo b > b
11 $ echo b > b
12 $ hg ci -A -d'1 0' -m b
12 $ hg ci -A -d'1 0' -m b
13 adding b
13 adding b
14
14
15 $ cd ..
15 $ cd ..
16
16
17 $ hg clone a c
17 $ hg clone a c
18 updating to branch default
18 updating to branch default
19 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 $ cd c
20 $ cd c
21 $ cat >> .hg/hgrc <<EOF
21 $ cat >> .hg/hgrc <<EOF
22 > [paths]
22 > [paths]
23 > relative = ../a
23 > relative = ../a
24 > EOF
24 > EOF
25 $ hg pull -f ../b
25 $ hg pull -f ../b
26 pulling from ../b
26 pulling from ../b
27 searching for changes
27 searching for changes
28 warning: repository is unrelated
28 warning: repository is unrelated
29 requesting all changes
29 requesting all changes
30 adding changesets
30 adding changesets
31 adding manifests
31 adding manifests
32 adding file changes
32 adding file changes
33 added 1 changesets with 1 changes to 1 files (+1 heads)
33 added 1 changesets with 1 changes to 1 files (+1 heads)
34 (run 'hg heads' to see heads, 'hg merge' to merge)
34 (run 'hg heads' to see heads, 'hg merge' to merge)
35 $ hg merge
35 $ hg merge
36 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
36 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 (branch merge, don't forget to commit)
37 (branch merge, don't forget to commit)
38
38
39 $ cd ..
39 $ cd ..
40
40
41 Testing -R/--repository:
41 Testing -R/--repository:
42
42
43 $ hg -R a tip
43 $ hg -R a tip
44 changeset: 0:8580ff50825a
44 changeset: 0:8580ff50825a
45 tag: tip
45 tag: tip
46 user: test
46 user: test
47 date: Thu Jan 01 00:00:01 1970 +0000
47 date: Thu Jan 01 00:00:01 1970 +0000
48 summary: a
48 summary: a
49
49
50 $ hg --repository b tip
50 $ hg --repository b tip
51 changeset: 0:b6c483daf290
51 changeset: 0:b6c483daf290
52 tag: tip
52 tag: tip
53 user: test
53 user: test
54 date: Thu Jan 01 00:00:01 1970 +0000
54 date: Thu Jan 01 00:00:01 1970 +0000
55 summary: b
55 summary: b
56
56
57
57
58 -R with a URL:
58 -R with a URL:
59
59
60 $ hg -R file:a identify
60 $ hg -R file:a identify
61 8580ff50825a tip
61 8580ff50825a tip
62 $ hg -R file://localhost/`pwd`/a/ identify
62 $ hg -R file://localhost/`pwd`/a/ identify
63 8580ff50825a tip
63 8580ff50825a tip
64
64
65 -R with path aliases:
65 -R with path aliases:
66
66
67 $ cd c
67 $ cd c
68 $ hg -R default identify
68 $ hg -R default identify
69 8580ff50825a tip
69 8580ff50825a tip
70 $ hg -R relative identify
70 $ hg -R relative identify
71 8580ff50825a tip
71 8580ff50825a tip
72 $ echo '[paths]' >> $HGRCPATH
72 $ echo '[paths]' >> $HGRCPATH
73 $ echo 'relativetohome = a' >> $HGRCPATH
73 $ echo 'relativetohome = a' >> $HGRCPATH
74 $ HOME=`pwd`/../ hg -R relativetohome identify
74 $ HOME=`pwd`/../ hg -R relativetohome identify
75 8580ff50825a tip
75 8580ff50825a tip
76 $ cd ..
76 $ cd ..
77
77
78 #if no-outer-repo
78 #if no-outer-repo
79
79
80 Implicit -R:
80 Implicit -R:
81
81
82 $ hg ann a/a
82 $ hg ann a/a
83 0: a
83 0: a
84 $ hg ann a/a a/a
84 $ hg ann a/a a/a
85 0: a
85 0: a
86 $ hg ann a/a b/b
86 $ hg ann a/a b/b
87 abort: no repository found in '$TESTTMP' (.hg not found)!
87 abort: no repository found in '$TESTTMP' (.hg not found)!
88 [255]
88 [255]
89 $ hg -R b ann a/a
89 $ hg -R b ann a/a
90 abort: a/a not under root '$TESTTMP/b' (glob)
90 abort: a/a not under root '$TESTTMP/b' (glob)
91 (consider using '--cwd b')
91 (consider using '--cwd b')
92 [255]
92 [255]
93 $ hg log
93 $ hg log
94 abort: no repository found in '$TESTTMP' (.hg not found)!
94 abort: no repository found in '$TESTTMP' (.hg not found)!
95 [255]
95 [255]
96
96
97 #endif
97 #endif
98
98
99 Abbreviation of long option:
99 Abbreviation of long option:
100
100
101 $ hg --repo c tip
101 $ hg --repo c tip
102 changeset: 1:b6c483daf290
102 changeset: 1:b6c483daf290
103 tag: tip
103 tag: tip
104 parent: -1:000000000000
104 parent: -1:000000000000
105 user: test
105 user: test
106 date: Thu Jan 01 00:00:01 1970 +0000
106 date: Thu Jan 01 00:00:01 1970 +0000
107 summary: b
107 summary: b
108
108
109
109
110 earlygetopt with duplicate options (36d23de02da1):
110 earlygetopt with duplicate options (36d23de02da1):
111
111
112 $ hg --cwd a --cwd b --cwd c tip
112 $ hg --cwd a --cwd b --cwd c tip
113 changeset: 1:b6c483daf290
113 changeset: 1:b6c483daf290
114 tag: tip
114 tag: tip
115 parent: -1:000000000000
115 parent: -1:000000000000
116 user: test
116 user: test
117 date: Thu Jan 01 00:00:01 1970 +0000
117 date: Thu Jan 01 00:00:01 1970 +0000
118 summary: b
118 summary: b
119
119
120 $ hg --repo c --repository b -R a tip
120 $ hg --repo c --repository b -R a tip
121 changeset: 0:8580ff50825a
121 changeset: 0:8580ff50825a
122 tag: tip
122 tag: tip
123 user: test
123 user: test
124 date: Thu Jan 01 00:00:01 1970 +0000
124 date: Thu Jan 01 00:00:01 1970 +0000
125 summary: a
125 summary: a
126
126
127
127
128 earlygetopt short option without following space:
128 earlygetopt short option without following space:
129
129
130 $ hg -q -Rb tip
130 $ hg -q -Rb tip
131 0:b6c483daf290
131 0:b6c483daf290
132
132
133 earlygetopt with illegal abbreviations:
133 earlygetopt with illegal abbreviations:
134
134
135 $ hg --confi "foo.bar=baz"
135 $ hg --confi "foo.bar=baz"
136 abort: option --config may not be abbreviated!
136 abort: option --config may not be abbreviated!
137 [255]
137 [255]
138 $ hg --cw a tip
138 $ hg --cw a tip
139 abort: option --cwd may not be abbreviated!
139 abort: option --cwd may not be abbreviated!
140 [255]
140 [255]
141 $ hg --rep a tip
141 $ hg --rep a tip
142 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
142 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
143 [255]
143 [255]
144 $ hg --repositor a tip
144 $ hg --repositor a tip
145 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
145 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
146 [255]
146 [255]
147 $ hg -qR a tip
147 $ hg -qR a tip
148 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
148 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
149 [255]
149 [255]
150 $ hg -qRa tip
150 $ hg -qRa tip
151 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
151 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
152 [255]
152 [255]
153
153
154 Testing --cwd:
154 Testing --cwd:
155
155
156 $ hg --cwd a parents
156 $ hg --cwd a parents
157 changeset: 0:8580ff50825a
157 changeset: 0:8580ff50825a
158 tag: tip
158 tag: tip
159 user: test
159 user: test
160 date: Thu Jan 01 00:00:01 1970 +0000
160 date: Thu Jan 01 00:00:01 1970 +0000
161 summary: a
161 summary: a
162
162
163
163
164 Testing -y/--noninteractive - just be sure it is parsed:
164 Testing -y/--noninteractive - just be sure it is parsed:
165
165
166 $ hg --cwd a tip -q --noninteractive
166 $ hg --cwd a tip -q --noninteractive
167 0:8580ff50825a
167 0:8580ff50825a
168 $ hg --cwd a tip -q -y
168 $ hg --cwd a tip -q -y
169 0:8580ff50825a
169 0:8580ff50825a
170
170
171 Testing -q/--quiet:
171 Testing -q/--quiet:
172
172
173 $ hg -R a -q tip
173 $ hg -R a -q tip
174 0:8580ff50825a
174 0:8580ff50825a
175 $ hg -R b -q tip
175 $ hg -R b -q tip
176 0:b6c483daf290
176 0:b6c483daf290
177 $ hg -R c --quiet parents
177 $ hg -R c --quiet parents
178 0:8580ff50825a
178 0:8580ff50825a
179 1:b6c483daf290
179 1:b6c483daf290
180
180
181 Testing -v/--verbose:
181 Testing -v/--verbose:
182
182
183 $ hg --cwd c head -v
183 $ hg --cwd c head -v
184 changeset: 1:b6c483daf290
184 changeset: 1:b6c483daf290
185 tag: tip
185 tag: tip
186 parent: -1:000000000000
186 parent: -1:000000000000
187 user: test
187 user: test
188 date: Thu Jan 01 00:00:01 1970 +0000
188 date: Thu Jan 01 00:00:01 1970 +0000
189 files: b
189 files: b
190 description:
190 description:
191 b
191 b
192
192
193
193
194 changeset: 0:8580ff50825a
194 changeset: 0:8580ff50825a
195 user: test
195 user: test
196 date: Thu Jan 01 00:00:01 1970 +0000
196 date: Thu Jan 01 00:00:01 1970 +0000
197 files: a
197 files: a
198 description:
198 description:
199 a
199 a
200
200
201
201
202 $ hg --cwd b tip --verbose
202 $ hg --cwd b tip --verbose
203 changeset: 0:b6c483daf290
203 changeset: 0:b6c483daf290
204 tag: tip
204 tag: tip
205 user: test
205 user: test
206 date: Thu Jan 01 00:00:01 1970 +0000
206 date: Thu Jan 01 00:00:01 1970 +0000
207 files: b
207 files: b
208 description:
208 description:
209 b
209 b
210
210
211
211
212
212
213 Testing --config:
213 Testing --config:
214
214
215 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
215 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
216 quuxfoo
216 quuxfoo
217 $ hg --cwd c --config '' tip -q
217 $ hg --cwd c --config '' tip -q
218 abort: malformed --config option: '' (use --config section.name=value)
218 abort: malformed --config option: '' (use --config section.name=value)
219 [255]
219 [255]
220 $ hg --cwd c --config a.b tip -q
220 $ hg --cwd c --config a.b tip -q
221 abort: malformed --config option: 'a.b' (use --config section.name=value)
221 abort: malformed --config option: 'a.b' (use --config section.name=value)
222 [255]
222 [255]
223 $ hg --cwd c --config a tip -q
223 $ hg --cwd c --config a tip -q
224 abort: malformed --config option: 'a' (use --config section.name=value)
224 abort: malformed --config option: 'a' (use --config section.name=value)
225 [255]
225 [255]
226 $ hg --cwd c --config a.= tip -q
226 $ hg --cwd c --config a.= tip -q
227 abort: malformed --config option: 'a.=' (use --config section.name=value)
227 abort: malformed --config option: 'a.=' (use --config section.name=value)
228 [255]
228 [255]
229 $ hg --cwd c --config .b= tip -q
229 $ hg --cwd c --config .b= tip -q
230 abort: malformed --config option: '.b=' (use --config section.name=value)
230 abort: malformed --config option: '.b=' (use --config section.name=value)
231 [255]
231 [255]
232
232
233 Testing --debug:
233 Testing --debug:
234
234
235 $ hg --cwd c log --debug
235 $ hg --cwd c log --debug
236 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
236 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
237 tag: tip
237 tag: tip
238 phase: public
238 phase: public
239 parent: -1:0000000000000000000000000000000000000000
239 parent: -1:0000000000000000000000000000000000000000
240 parent: -1:0000000000000000000000000000000000000000
240 parent: -1:0000000000000000000000000000000000000000
241 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
241 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
242 user: test
242 user: test
243 date: Thu Jan 01 00:00:01 1970 +0000
243 date: Thu Jan 01 00:00:01 1970 +0000
244 files+: b
244 files+: b
245 extra: branch=default
245 extra: branch=default
246 description:
246 description:
247 b
247 b
248
248
249
249
250 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
250 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
251 phase: public
251 phase: public
252 parent: -1:0000000000000000000000000000000000000000
252 parent: -1:0000000000000000000000000000000000000000
253 parent: -1:0000000000000000000000000000000000000000
253 parent: -1:0000000000000000000000000000000000000000
254 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
254 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
255 user: test
255 user: test
256 date: Thu Jan 01 00:00:01 1970 +0000
256 date: Thu Jan 01 00:00:01 1970 +0000
257 files+: a
257 files+: a
258 extra: branch=default
258 extra: branch=default
259 description:
259 description:
260 a
260 a
261
261
262
262
263
263
264 Testing --traceback:
264 Testing --traceback:
265
265
266 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
266 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
267 Traceback (most recent call last):
267 Traceback (most recent call last):
268
268
269 Testing --time:
269 Testing --time:
270
270
271 $ hg --cwd a --time id
271 $ hg --cwd a --time id
272 8580ff50825a tip
272 8580ff50825a tip
273 time: real * (glob)
273 time: real * (glob)
274
274
275 Testing --version:
275 Testing --version:
276
276
277 $ hg --version -q
277 $ hg --version -q
278 Mercurial Distributed SCM * (glob)
278 Mercurial Distributed SCM * (glob)
279
279
280 hide outer repo
280 hide outer repo
281 $ hg init
281 $ hg init
282
282
283 Testing -h/--help:
283 Testing -h/--help:
284
284
285 $ hg -h
285 $ hg -h
286 Mercurial Distributed SCM
286 Mercurial Distributed SCM
287
287
288 list of commands:
288 list of commands:
289
289
290 add add the specified files on the next commit
290 add add the specified files on the next commit
291 addremove add all new files, delete all missing files
291 addremove add all new files, delete all missing files
292 annotate show changeset information by line for each file
292 annotate show changeset information by line for each file
293 archive create an unversioned archive of a repository revision
293 archive create an unversioned archive of a repository revision
294 backout reverse effect of earlier changeset
294 backout reverse effect of earlier changeset
295 bisect subdivision search of changesets
295 bisect subdivision search of changesets
296 bookmarks create a new bookmark or list existing bookmarks
296 bookmarks create a new bookmark or list existing bookmarks
297 branch set or show the current branch name
297 branch set or show the current branch name
298 branches list repository named branches
298 branches list repository named branches
299 bundle create a changegroup file
299 bundle create a changegroup file
300 cat output the current or given revision of files
300 cat output the current or given revision of files
301 clone make a copy of an existing repository
301 clone make a copy of an existing repository
302 commit commit the specified files or all outstanding changes
302 commit commit the specified files or all outstanding changes
303 config show combined config settings from all hgrc files
303 config show combined config settings from all hgrc files
304 copy mark files as copied for the next commit
304 copy mark files as copied for the next commit
305 diff diff repository (or selected files)
305 diff diff repository (or selected files)
306 export dump the header and diffs for one or more changesets
306 export dump the header and diffs for one or more changesets
307 files list tracked files
307 files list tracked files
308 forget forget the specified files on the next commit
308 forget forget the specified files on the next commit
309 graft copy changes from other branches onto the current branch
309 graft copy changes from other branches onto the current branch
310 grep search revision history for a pattern in specified files
310 grep search revision history for a pattern in specified files
311 heads show branch heads
311 heads show branch heads
312 help show help for a given topic or a help overview
312 help show help for a given topic or a help overview
313 identify identify the working directory or specified revision
313 identify identify the working directory or specified revision
314 import import an ordered set of patches
314 import import an ordered set of patches
315 incoming show new changesets found in source
315 incoming show new changesets found in source
316 init create a new repository in the given directory
316 init create a new repository in the given directory
317 log show revision history of entire repository or files
317 log show revision history of entire repository or files
318 manifest output the current or given revision of the project manifest
318 manifest output the current or given revision of the project manifest
319 merge merge another revision into working directory
319 merge merge another revision into working directory
320 outgoing show changesets not found in the destination
320 outgoing show changesets not found in the destination
321 paths show aliases for remote repositories
321 paths show aliases for remote repositories
322 phase set or show the current phase name
322 phase set or show the current phase name
323 pull pull changes from the specified source
323 pull pull changes from the specified source
324 push push changes to the specified destination
324 push push changes to the specified destination
325 recover roll back an interrupted transaction
325 recover roll back an interrupted transaction
326 remove remove the specified files on the next commit
326 remove remove the specified files on the next commit
327 rename rename files; equivalent of copy + remove
327 rename rename files; equivalent of copy + remove
328 resolve redo merges or set/view the merge status of files
328 resolve redo merges or set/view the merge status of files
329 revert restore files to their checkout state
329 revert restore files to their checkout state
330 root print the root (top) of the current working directory
330 root print the root (top) of the current working directory
331 serve start stand-alone webserver
331 serve start stand-alone webserver
332 status show changed files in the working directory
332 status show changed files in the working directory
333 summary summarize working directory state
333 summary summarize working directory state
334 tag add one or more tags for the current or given revision
334 tag add one or more tags for the current or given revision
335 tags list repository tags
335 tags list repository tags
336 unbundle apply one or more changegroup files
336 unbundle apply one or more changegroup files
337 update update working directory (or switch revisions)
337 update update working directory (or switch revisions)
338 verify verify the integrity of the repository
338 verify verify the integrity of the repository
339 version output version and copyright information
339 version output version and copyright information
340
340
341 additional help topics:
341 additional help topics:
342
342
343 bundlespec Bundle File Formats
343 color Colorizing Outputs
344 color Colorizing Outputs
344 config Configuration Files
345 config Configuration Files
345 dates Date Formats
346 dates Date Formats
346 diffs Diff Formats
347 diffs Diff Formats
347 environment Environment Variables
348 environment Environment Variables
348 extensions Using Additional Features
349 extensions Using Additional Features
349 filesets Specifying File Sets
350 filesets Specifying File Sets
350 glossary Glossary
351 glossary Glossary
351 hgignore Syntax for Mercurial Ignore Files
352 hgignore Syntax for Mercurial Ignore Files
352 hgweb Configuring hgweb
353 hgweb Configuring hgweb
353 internals Technical implementation topics
354 internals Technical implementation topics
354 merge-tools Merge Tools
355 merge-tools Merge Tools
355 pager Pager Support
356 pager Pager Support
356 patterns File Name Patterns
357 patterns File Name Patterns
357 phases Working with Phases
358 phases Working with Phases
358 revisions Specifying Revisions
359 revisions Specifying Revisions
359 scripting Using Mercurial from scripts and automation
360 scripting Using Mercurial from scripts and automation
360 subrepos Subrepositories
361 subrepos Subrepositories
361 templating Template Usage
362 templating Template Usage
362 urls URL Paths
363 urls URL Paths
363
364
364 (use 'hg help -v' to show built-in aliases and global options)
365 (use 'hg help -v' to show built-in aliases and global options)
365
366
366
367
367
368
368 $ hg --help
369 $ hg --help
369 Mercurial Distributed SCM
370 Mercurial Distributed SCM
370
371
371 list of commands:
372 list of commands:
372
373
373 add add the specified files on the next commit
374 add add the specified files on the next commit
374 addremove add all new files, delete all missing files
375 addremove add all new files, delete all missing files
375 annotate show changeset information by line for each file
376 annotate show changeset information by line for each file
376 archive create an unversioned archive of a repository revision
377 archive create an unversioned archive of a repository revision
377 backout reverse effect of earlier changeset
378 backout reverse effect of earlier changeset
378 bisect subdivision search of changesets
379 bisect subdivision search of changesets
379 bookmarks create a new bookmark or list existing bookmarks
380 bookmarks create a new bookmark or list existing bookmarks
380 branch set or show the current branch name
381 branch set or show the current branch name
381 branches list repository named branches
382 branches list repository named branches
382 bundle create a changegroup file
383 bundle create a changegroup file
383 cat output the current or given revision of files
384 cat output the current or given revision of files
384 clone make a copy of an existing repository
385 clone make a copy of an existing repository
385 commit commit the specified files or all outstanding changes
386 commit commit the specified files or all outstanding changes
386 config show combined config settings from all hgrc files
387 config show combined config settings from all hgrc files
387 copy mark files as copied for the next commit
388 copy mark files as copied for the next commit
388 diff diff repository (or selected files)
389 diff diff repository (or selected files)
389 export dump the header and diffs for one or more changesets
390 export dump the header and diffs for one or more changesets
390 files list tracked files
391 files list tracked files
391 forget forget the specified files on the next commit
392 forget forget the specified files on the next commit
392 graft copy changes from other branches onto the current branch
393 graft copy changes from other branches onto the current branch
393 grep search revision history for a pattern in specified files
394 grep search revision history for a pattern in specified files
394 heads show branch heads
395 heads show branch heads
395 help show help for a given topic or a help overview
396 help show help for a given topic or a help overview
396 identify identify the working directory or specified revision
397 identify identify the working directory or specified revision
397 import import an ordered set of patches
398 import import an ordered set of patches
398 incoming show new changesets found in source
399 incoming show new changesets found in source
399 init create a new repository in the given directory
400 init create a new repository in the given directory
400 log show revision history of entire repository or files
401 log show revision history of entire repository or files
401 manifest output the current or given revision of the project manifest
402 manifest output the current or given revision of the project manifest
402 merge merge another revision into working directory
403 merge merge another revision into working directory
403 outgoing show changesets not found in the destination
404 outgoing show changesets not found in the destination
404 paths show aliases for remote repositories
405 paths show aliases for remote repositories
405 phase set or show the current phase name
406 phase set or show the current phase name
406 pull pull changes from the specified source
407 pull pull changes from the specified source
407 push push changes to the specified destination
408 push push changes to the specified destination
408 recover roll back an interrupted transaction
409 recover roll back an interrupted transaction
409 remove remove the specified files on the next commit
410 remove remove the specified files on the next commit
410 rename rename files; equivalent of copy + remove
411 rename rename files; equivalent of copy + remove
411 resolve redo merges or set/view the merge status of files
412 resolve redo merges or set/view the merge status of files
412 revert restore files to their checkout state
413 revert restore files to their checkout state
413 root print the root (top) of the current working directory
414 root print the root (top) of the current working directory
414 serve start stand-alone webserver
415 serve start stand-alone webserver
415 status show changed files in the working directory
416 status show changed files in the working directory
416 summary summarize working directory state
417 summary summarize working directory state
417 tag add one or more tags for the current or given revision
418 tag add one or more tags for the current or given revision
418 tags list repository tags
419 tags list repository tags
419 unbundle apply one or more changegroup files
420 unbundle apply one or more changegroup files
420 update update working directory (or switch revisions)
421 update update working directory (or switch revisions)
421 verify verify the integrity of the repository
422 verify verify the integrity of the repository
422 version output version and copyright information
423 version output version and copyright information
423
424
424 additional help topics:
425 additional help topics:
425
426
427 bundlespec Bundle File Formats
426 color Colorizing Outputs
428 color Colorizing Outputs
427 config Configuration Files
429 config Configuration Files
428 dates Date Formats
430 dates Date Formats
429 diffs Diff Formats
431 diffs Diff Formats
430 environment Environment Variables
432 environment Environment Variables
431 extensions Using Additional Features
433 extensions Using Additional Features
432 filesets Specifying File Sets
434 filesets Specifying File Sets
433 glossary Glossary
435 glossary Glossary
434 hgignore Syntax for Mercurial Ignore Files
436 hgignore Syntax for Mercurial Ignore Files
435 hgweb Configuring hgweb
437 hgweb Configuring hgweb
436 internals Technical implementation topics
438 internals Technical implementation topics
437 merge-tools Merge Tools
439 merge-tools Merge Tools
438 pager Pager Support
440 pager Pager Support
439 patterns File Name Patterns
441 patterns File Name Patterns
440 phases Working with Phases
442 phases Working with Phases
441 revisions Specifying Revisions
443 revisions Specifying Revisions
442 scripting Using Mercurial from scripts and automation
444 scripting Using Mercurial from scripts and automation
443 subrepos Subrepositories
445 subrepos Subrepositories
444 templating Template Usage
446 templating Template Usage
445 urls URL Paths
447 urls URL Paths
446
448
447 (use 'hg help -v' to show built-in aliases and global options)
449 (use 'hg help -v' to show built-in aliases and global options)
448
450
449 Not tested: --debugger
451 Not tested: --debugger
450
452
@@ -1,3305 +1,3324 b''
1 Short help:
1 Short help:
2
2
3 $ hg
3 $ hg
4 Mercurial Distributed SCM
4 Mercurial Distributed SCM
5
5
6 basic commands:
6 basic commands:
7
7
8 add add the specified files on the next commit
8 add add the specified files on the next commit
9 annotate show changeset information by line for each file
9 annotate show changeset information by line for each file
10 clone make a copy of an existing repository
10 clone make a copy of an existing repository
11 commit commit the specified files or all outstanding changes
11 commit commit the specified files or all outstanding changes
12 diff diff repository (or selected files)
12 diff diff repository (or selected files)
13 export dump the header and diffs for one or more changesets
13 export dump the header and diffs for one or more changesets
14 forget forget the specified files on the next commit
14 forget forget the specified files on the next commit
15 init create a new repository in the given directory
15 init create a new repository in the given directory
16 log show revision history of entire repository or files
16 log show revision history of entire repository or files
17 merge merge another revision into working directory
17 merge merge another revision into working directory
18 pull pull changes from the specified source
18 pull pull changes from the specified source
19 push push changes to the specified destination
19 push push changes to the specified destination
20 remove remove the specified files on the next commit
20 remove remove the specified files on the next commit
21 serve start stand-alone webserver
21 serve start stand-alone webserver
22 status show changed files in the working directory
22 status show changed files in the working directory
23 summary summarize working directory state
23 summary summarize working directory state
24 update update working directory (or switch revisions)
24 update update working directory (or switch revisions)
25
25
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
27
27
28 $ hg -q
28 $ hg -q
29 add add the specified files on the next commit
29 add add the specified files on the next commit
30 annotate show changeset information by line for each file
30 annotate show changeset information by line for each file
31 clone make a copy of an existing repository
31 clone make a copy of an existing repository
32 commit commit the specified files or all outstanding changes
32 commit commit the specified files or all outstanding changes
33 diff diff repository (or selected files)
33 diff diff repository (or selected files)
34 export dump the header and diffs for one or more changesets
34 export dump the header and diffs for one or more changesets
35 forget forget the specified files on the next commit
35 forget forget the specified files on the next commit
36 init create a new repository in the given directory
36 init create a new repository in the given directory
37 log show revision history of entire repository or files
37 log show revision history of entire repository or files
38 merge merge another revision into working directory
38 merge merge another revision into working directory
39 pull pull changes from the specified source
39 pull pull changes from the specified source
40 push push changes to the specified destination
40 push push changes to the specified destination
41 remove remove the specified files on the next commit
41 remove remove the specified files on the next commit
42 serve start stand-alone webserver
42 serve start stand-alone webserver
43 status show changed files in the working directory
43 status show changed files in the working directory
44 summary summarize working directory state
44 summary summarize working directory state
45 update update working directory (or switch revisions)
45 update update working directory (or switch revisions)
46
46
47 $ hg help
47 $ hg help
48 Mercurial Distributed SCM
48 Mercurial Distributed SCM
49
49
50 list of commands:
50 list of commands:
51
51
52 add add the specified files on the next commit
52 add add the specified files on the next commit
53 addremove add all new files, delete all missing files
53 addremove add all new files, delete all missing files
54 annotate show changeset information by line for each file
54 annotate show changeset information by line for each file
55 archive create an unversioned archive of a repository revision
55 archive create an unversioned archive of a repository revision
56 backout reverse effect of earlier changeset
56 backout reverse effect of earlier changeset
57 bisect subdivision search of changesets
57 bisect subdivision search of changesets
58 bookmarks create a new bookmark or list existing bookmarks
58 bookmarks create a new bookmark or list existing bookmarks
59 branch set or show the current branch name
59 branch set or show the current branch name
60 branches list repository named branches
60 branches list repository named branches
61 bundle create a changegroup file
61 bundle create a changegroup file
62 cat output the current or given revision of files
62 cat output the current or given revision of files
63 clone make a copy of an existing repository
63 clone make a copy of an existing repository
64 commit commit the specified files or all outstanding changes
64 commit commit the specified files or all outstanding changes
65 config show combined config settings from all hgrc files
65 config show combined config settings from all hgrc files
66 copy mark files as copied for the next commit
66 copy mark files as copied for the next commit
67 diff diff repository (or selected files)
67 diff diff repository (or selected files)
68 export dump the header and diffs for one or more changesets
68 export dump the header and diffs for one or more changesets
69 files list tracked files
69 files list tracked files
70 forget forget the specified files on the next commit
70 forget forget the specified files on the next commit
71 graft copy changes from other branches onto the current branch
71 graft copy changes from other branches onto the current branch
72 grep search revision history for a pattern in specified files
72 grep search revision history for a pattern in specified files
73 heads show branch heads
73 heads show branch heads
74 help show help for a given topic or a help overview
74 help show help for a given topic or a help overview
75 identify identify the working directory or specified revision
75 identify identify the working directory or specified revision
76 import import an ordered set of patches
76 import import an ordered set of patches
77 incoming show new changesets found in source
77 incoming show new changesets found in source
78 init create a new repository in the given directory
78 init create a new repository in the given directory
79 log show revision history of entire repository or files
79 log show revision history of entire repository or files
80 manifest output the current or given revision of the project manifest
80 manifest output the current or given revision of the project manifest
81 merge merge another revision into working directory
81 merge merge another revision into working directory
82 outgoing show changesets not found in the destination
82 outgoing show changesets not found in the destination
83 paths show aliases for remote repositories
83 paths show aliases for remote repositories
84 phase set or show the current phase name
84 phase set or show the current phase name
85 pull pull changes from the specified source
85 pull pull changes from the specified source
86 push push changes to the specified destination
86 push push changes to the specified destination
87 recover roll back an interrupted transaction
87 recover roll back an interrupted transaction
88 remove remove the specified files on the next commit
88 remove remove the specified files on the next commit
89 rename rename files; equivalent of copy + remove
89 rename rename files; equivalent of copy + remove
90 resolve redo merges or set/view the merge status of files
90 resolve redo merges or set/view the merge status of files
91 revert restore files to their checkout state
91 revert restore files to their checkout state
92 root print the root (top) of the current working directory
92 root print the root (top) of the current working directory
93 serve start stand-alone webserver
93 serve start stand-alone webserver
94 status show changed files in the working directory
94 status show changed files in the working directory
95 summary summarize working directory state
95 summary summarize working directory state
96 tag add one or more tags for the current or given revision
96 tag add one or more tags for the current or given revision
97 tags list repository tags
97 tags list repository tags
98 unbundle apply one or more changegroup files
98 unbundle apply one or more changegroup files
99 update update working directory (or switch revisions)
99 update update working directory (or switch revisions)
100 verify verify the integrity of the repository
100 verify verify the integrity of the repository
101 version output version and copyright information
101 version output version and copyright information
102
102
103 additional help topics:
103 additional help topics:
104
104
105 bundlespec Bundle File Formats
105 color Colorizing Outputs
106 color Colorizing Outputs
106 config Configuration Files
107 config Configuration Files
107 dates Date Formats
108 dates Date Formats
108 diffs Diff Formats
109 diffs Diff Formats
109 environment Environment Variables
110 environment Environment Variables
110 extensions Using Additional Features
111 extensions Using Additional Features
111 filesets Specifying File Sets
112 filesets Specifying File Sets
112 glossary Glossary
113 glossary Glossary
113 hgignore Syntax for Mercurial Ignore Files
114 hgignore Syntax for Mercurial Ignore Files
114 hgweb Configuring hgweb
115 hgweb Configuring hgweb
115 internals Technical implementation topics
116 internals Technical implementation topics
116 merge-tools Merge Tools
117 merge-tools Merge Tools
117 pager Pager Support
118 pager Pager Support
118 patterns File Name Patterns
119 patterns File Name Patterns
119 phases Working with Phases
120 phases Working with Phases
120 revisions Specifying Revisions
121 revisions Specifying Revisions
121 scripting Using Mercurial from scripts and automation
122 scripting Using Mercurial from scripts and automation
122 subrepos Subrepositories
123 subrepos Subrepositories
123 templating Template Usage
124 templating Template Usage
124 urls URL Paths
125 urls URL Paths
125
126
126 (use 'hg help -v' to show built-in aliases and global options)
127 (use 'hg help -v' to show built-in aliases and global options)
127
128
128 $ hg -q help
129 $ hg -q help
129 add add the specified files on the next commit
130 add add the specified files on the next commit
130 addremove add all new files, delete all missing files
131 addremove add all new files, delete all missing files
131 annotate show changeset information by line for each file
132 annotate show changeset information by line for each file
132 archive create an unversioned archive of a repository revision
133 archive create an unversioned archive of a repository revision
133 backout reverse effect of earlier changeset
134 backout reverse effect of earlier changeset
134 bisect subdivision search of changesets
135 bisect subdivision search of changesets
135 bookmarks create a new bookmark or list existing bookmarks
136 bookmarks create a new bookmark or list existing bookmarks
136 branch set or show the current branch name
137 branch set or show the current branch name
137 branches list repository named branches
138 branches list repository named branches
138 bundle create a changegroup file
139 bundle create a changegroup file
139 cat output the current or given revision of files
140 cat output the current or given revision of files
140 clone make a copy of an existing repository
141 clone make a copy of an existing repository
141 commit commit the specified files or all outstanding changes
142 commit commit the specified files or all outstanding changes
142 config show combined config settings from all hgrc files
143 config show combined config settings from all hgrc files
143 copy mark files as copied for the next commit
144 copy mark files as copied for the next commit
144 diff diff repository (or selected files)
145 diff diff repository (or selected files)
145 export dump the header and diffs for one or more changesets
146 export dump the header and diffs for one or more changesets
146 files list tracked files
147 files list tracked files
147 forget forget the specified files on the next commit
148 forget forget the specified files on the next commit
148 graft copy changes from other branches onto the current branch
149 graft copy changes from other branches onto the current branch
149 grep search revision history for a pattern in specified files
150 grep search revision history for a pattern in specified files
150 heads show branch heads
151 heads show branch heads
151 help show help for a given topic or a help overview
152 help show help for a given topic or a help overview
152 identify identify the working directory or specified revision
153 identify identify the working directory or specified revision
153 import import an ordered set of patches
154 import import an ordered set of patches
154 incoming show new changesets found in source
155 incoming show new changesets found in source
155 init create a new repository in the given directory
156 init create a new repository in the given directory
156 log show revision history of entire repository or files
157 log show revision history of entire repository or files
157 manifest output the current or given revision of the project manifest
158 manifest output the current or given revision of the project manifest
158 merge merge another revision into working directory
159 merge merge another revision into working directory
159 outgoing show changesets not found in the destination
160 outgoing show changesets not found in the destination
160 paths show aliases for remote repositories
161 paths show aliases for remote repositories
161 phase set or show the current phase name
162 phase set or show the current phase name
162 pull pull changes from the specified source
163 pull pull changes from the specified source
163 push push changes to the specified destination
164 push push changes to the specified destination
164 recover roll back an interrupted transaction
165 recover roll back an interrupted transaction
165 remove remove the specified files on the next commit
166 remove remove the specified files on the next commit
166 rename rename files; equivalent of copy + remove
167 rename rename files; equivalent of copy + remove
167 resolve redo merges or set/view the merge status of files
168 resolve redo merges or set/view the merge status of files
168 revert restore files to their checkout state
169 revert restore files to their checkout state
169 root print the root (top) of the current working directory
170 root print the root (top) of the current working directory
170 serve start stand-alone webserver
171 serve start stand-alone webserver
171 status show changed files in the working directory
172 status show changed files in the working directory
172 summary summarize working directory state
173 summary summarize working directory state
173 tag add one or more tags for the current or given revision
174 tag add one or more tags for the current or given revision
174 tags list repository tags
175 tags list repository tags
175 unbundle apply one or more changegroup files
176 unbundle apply one or more changegroup files
176 update update working directory (or switch revisions)
177 update update working directory (or switch revisions)
177 verify verify the integrity of the repository
178 verify verify the integrity of the repository
178 version output version and copyright information
179 version output version and copyright information
179
180
180 additional help topics:
181 additional help topics:
181
182
183 bundlespec Bundle File Formats
182 color Colorizing Outputs
184 color Colorizing Outputs
183 config Configuration Files
185 config Configuration Files
184 dates Date Formats
186 dates Date Formats
185 diffs Diff Formats
187 diffs Diff Formats
186 environment Environment Variables
188 environment Environment Variables
187 extensions Using Additional Features
189 extensions Using Additional Features
188 filesets Specifying File Sets
190 filesets Specifying File Sets
189 glossary Glossary
191 glossary Glossary
190 hgignore Syntax for Mercurial Ignore Files
192 hgignore Syntax for Mercurial Ignore Files
191 hgweb Configuring hgweb
193 hgweb Configuring hgweb
192 internals Technical implementation topics
194 internals Technical implementation topics
193 merge-tools Merge Tools
195 merge-tools Merge Tools
194 pager Pager Support
196 pager Pager Support
195 patterns File Name Patterns
197 patterns File Name Patterns
196 phases Working with Phases
198 phases Working with Phases
197 revisions Specifying Revisions
199 revisions Specifying Revisions
198 scripting Using Mercurial from scripts and automation
200 scripting Using Mercurial from scripts and automation
199 subrepos Subrepositories
201 subrepos Subrepositories
200 templating Template Usage
202 templating Template Usage
201 urls URL Paths
203 urls URL Paths
202
204
203 Test extension help:
205 Test extension help:
204 $ hg help extensions --config extensions.rebase= --config extensions.children=
206 $ hg help extensions --config extensions.rebase= --config extensions.children=
205 Using Additional Features
207 Using Additional Features
206 """""""""""""""""""""""""
208 """""""""""""""""""""""""
207
209
208 Mercurial has the ability to add new features through the use of
210 Mercurial has the ability to add new features through the use of
209 extensions. Extensions may add new commands, add options to existing
211 extensions. Extensions may add new commands, add options to existing
210 commands, change the default behavior of commands, or implement hooks.
212 commands, change the default behavior of commands, or implement hooks.
211
213
212 To enable the "foo" extension, either shipped with Mercurial or in the
214 To enable the "foo" extension, either shipped with Mercurial or in the
213 Python search path, create an entry for it in your configuration file,
215 Python search path, create an entry for it in your configuration file,
214 like this:
216 like this:
215
217
216 [extensions]
218 [extensions]
217 foo =
219 foo =
218
220
219 You may also specify the full path to an extension:
221 You may also specify the full path to an extension:
220
222
221 [extensions]
223 [extensions]
222 myfeature = ~/.hgext/myfeature.py
224 myfeature = ~/.hgext/myfeature.py
223
225
224 See 'hg help config' for more information on configuration files.
226 See 'hg help config' for more information on configuration files.
225
227
226 Extensions are not loaded by default for a variety of reasons: they can
228 Extensions are not loaded by default for a variety of reasons: they can
227 increase startup overhead; they may be meant for advanced usage only; they
229 increase startup overhead; they may be meant for advanced usage only; they
228 may provide potentially dangerous abilities (such as letting you destroy
230 may provide potentially dangerous abilities (such as letting you destroy
229 or modify history); they might not be ready for prime time; or they may
231 or modify history); they might not be ready for prime time; or they may
230 alter some usual behaviors of stock Mercurial. It is thus up to the user
232 alter some usual behaviors of stock Mercurial. It is thus up to the user
231 to activate extensions as needed.
233 to activate extensions as needed.
232
234
233 To explicitly disable an extension enabled in a configuration file of
235 To explicitly disable an extension enabled in a configuration file of
234 broader scope, prepend its path with !:
236 broader scope, prepend its path with !:
235
237
236 [extensions]
238 [extensions]
237 # disabling extension bar residing in /path/to/extension/bar.py
239 # disabling extension bar residing in /path/to/extension/bar.py
238 bar = !/path/to/extension/bar.py
240 bar = !/path/to/extension/bar.py
239 # ditto, but no path was supplied for extension baz
241 # ditto, but no path was supplied for extension baz
240 baz = !
242 baz = !
241
243
242 enabled extensions:
244 enabled extensions:
243
245
244 children command to display child changesets (DEPRECATED)
246 children command to display child changesets (DEPRECATED)
245 rebase command to move sets of revisions to a different ancestor
247 rebase command to move sets of revisions to a different ancestor
246
248
247 disabled extensions:
249 disabled extensions:
248
250
249 acl hooks for controlling repository access
251 acl hooks for controlling repository access
250 blackbox log repository events to a blackbox for debugging
252 blackbox log repository events to a blackbox for debugging
251 bugzilla hooks for integrating with the Bugzilla bug tracker
253 bugzilla hooks for integrating with the Bugzilla bug tracker
252 censor erase file content at a given revision
254 censor erase file content at a given revision
253 churn command to display statistics about repository history
255 churn command to display statistics about repository history
254 clonebundles advertise pre-generated bundles to seed clones
256 clonebundles advertise pre-generated bundles to seed clones
255 convert import revisions from foreign VCS repositories into
257 convert import revisions from foreign VCS repositories into
256 Mercurial
258 Mercurial
257 eol automatically manage newlines in repository files
259 eol automatically manage newlines in repository files
258 extdiff command to allow external programs to compare revisions
260 extdiff command to allow external programs to compare revisions
259 factotum http authentication with factotum
261 factotum http authentication with factotum
260 gpg commands to sign and verify changesets
262 gpg commands to sign and verify changesets
261 hgk browse the repository in a graphical way
263 hgk browse the repository in a graphical way
262 highlight syntax highlighting for hgweb (requires Pygments)
264 highlight syntax highlighting for hgweb (requires Pygments)
263 histedit interactive history editing
265 histedit interactive history editing
264 keyword expand keywords in tracked files
266 keyword expand keywords in tracked files
265 largefiles track large binary files
267 largefiles track large binary files
266 mq manage a stack of patches
268 mq manage a stack of patches
267 notify hooks for sending email push notifications
269 notify hooks for sending email push notifications
268 patchbomb command to send changesets as (a series of) patch emails
270 patchbomb command to send changesets as (a series of) patch emails
269 purge command to delete untracked files from the working
271 purge command to delete untracked files from the working
270 directory
272 directory
271 relink recreates hardlinks between repository clones
273 relink recreates hardlinks between repository clones
272 schemes extend schemes with shortcuts to repository swarms
274 schemes extend schemes with shortcuts to repository swarms
273 share share a common history between several working directories
275 share share a common history between several working directories
274 shelve save and restore changes to the working directory
276 shelve save and restore changes to the working directory
275 strip strip changesets and their descendants from history
277 strip strip changesets and their descendants from history
276 transplant command to transplant changesets from another branch
278 transplant command to transplant changesets from another branch
277 win32mbcs allow the use of MBCS paths with problematic encodings
279 win32mbcs allow the use of MBCS paths with problematic encodings
278 zeroconf discover and advertise repositories on the local network
280 zeroconf discover and advertise repositories on the local network
279
281
280 Verify that extension keywords appear in help templates
282 Verify that extension keywords appear in help templates
281
283
282 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
284 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
283
285
284 Test short command list with verbose option
286 Test short command list with verbose option
285
287
286 $ hg -v help shortlist
288 $ hg -v help shortlist
287 Mercurial Distributed SCM
289 Mercurial Distributed SCM
288
290
289 basic commands:
291 basic commands:
290
292
291 add add the specified files on the next commit
293 add add the specified files on the next commit
292 annotate, blame
294 annotate, blame
293 show changeset information by line for each file
295 show changeset information by line for each file
294 clone make a copy of an existing repository
296 clone make a copy of an existing repository
295 commit, ci commit the specified files or all outstanding changes
297 commit, ci commit the specified files or all outstanding changes
296 diff diff repository (or selected files)
298 diff diff repository (or selected files)
297 export dump the header and diffs for one or more changesets
299 export dump the header and diffs for one or more changesets
298 forget forget the specified files on the next commit
300 forget forget the specified files on the next commit
299 init create a new repository in the given directory
301 init create a new repository in the given directory
300 log, history show revision history of entire repository or files
302 log, history show revision history of entire repository or files
301 merge merge another revision into working directory
303 merge merge another revision into working directory
302 pull pull changes from the specified source
304 pull pull changes from the specified source
303 push push changes to the specified destination
305 push push changes to the specified destination
304 remove, rm remove the specified files on the next commit
306 remove, rm remove the specified files on the next commit
305 serve start stand-alone webserver
307 serve start stand-alone webserver
306 status, st show changed files in the working directory
308 status, st show changed files in the working directory
307 summary, sum summarize working directory state
309 summary, sum summarize working directory state
308 update, up, checkout, co
310 update, up, checkout, co
309 update working directory (or switch revisions)
311 update working directory (or switch revisions)
310
312
311 global options ([+] can be repeated):
313 global options ([+] can be repeated):
312
314
313 -R --repository REPO repository root directory or name of overlay bundle
315 -R --repository REPO repository root directory or name of overlay bundle
314 file
316 file
315 --cwd DIR change working directory
317 --cwd DIR change working directory
316 -y --noninteractive do not prompt, automatically pick the first choice for
318 -y --noninteractive do not prompt, automatically pick the first choice for
317 all prompts
319 all prompts
318 -q --quiet suppress output
320 -q --quiet suppress output
319 -v --verbose enable additional output
321 -v --verbose enable additional output
320 --color TYPE when to colorize (boolean, always, auto, never, or
322 --color TYPE when to colorize (boolean, always, auto, never, or
321 debug)
323 debug)
322 --config CONFIG [+] set/override config option (use 'section.name=value')
324 --config CONFIG [+] set/override config option (use 'section.name=value')
323 --debug enable debugging output
325 --debug enable debugging output
324 --debugger start debugger
326 --debugger start debugger
325 --encoding ENCODE set the charset encoding (default: ascii)
327 --encoding ENCODE set the charset encoding (default: ascii)
326 --encodingmode MODE set the charset encoding mode (default: strict)
328 --encodingmode MODE set the charset encoding mode (default: strict)
327 --traceback always print a traceback on exception
329 --traceback always print a traceback on exception
328 --time time how long the command takes
330 --time time how long the command takes
329 --profile print command execution profile
331 --profile print command execution profile
330 --version output version information and exit
332 --version output version information and exit
331 -h --help display help and exit
333 -h --help display help and exit
332 --hidden consider hidden changesets
334 --hidden consider hidden changesets
333 --pager TYPE when to paginate (boolean, always, auto, or never)
335 --pager TYPE when to paginate (boolean, always, auto, or never)
334 (default: auto)
336 (default: auto)
335
337
336 (use 'hg help' for the full list of commands)
338 (use 'hg help' for the full list of commands)
337
339
338 $ hg add -h
340 $ hg add -h
339 hg add [OPTION]... [FILE]...
341 hg add [OPTION]... [FILE]...
340
342
341 add the specified files on the next commit
343 add the specified files on the next commit
342
344
343 Schedule files to be version controlled and added to the repository.
345 Schedule files to be version controlled and added to the repository.
344
346
345 The files will be added to the repository at the next commit. To undo an
347 The files will be added to the repository at the next commit. To undo an
346 add before that, see 'hg forget'.
348 add before that, see 'hg forget'.
347
349
348 If no names are given, add all files to the repository (except files
350 If no names are given, add all files to the repository (except files
349 matching ".hgignore").
351 matching ".hgignore").
350
352
351 Returns 0 if all files are successfully added.
353 Returns 0 if all files are successfully added.
352
354
353 options ([+] can be repeated):
355 options ([+] can be repeated):
354
356
355 -I --include PATTERN [+] include names matching the given patterns
357 -I --include PATTERN [+] include names matching the given patterns
356 -X --exclude PATTERN [+] exclude names matching the given patterns
358 -X --exclude PATTERN [+] exclude names matching the given patterns
357 -S --subrepos recurse into subrepositories
359 -S --subrepos recurse into subrepositories
358 -n --dry-run do not perform actions, just print output
360 -n --dry-run do not perform actions, just print output
359
361
360 (some details hidden, use --verbose to show complete help)
362 (some details hidden, use --verbose to show complete help)
361
363
362 Verbose help for add
364 Verbose help for add
363
365
364 $ hg add -hv
366 $ hg add -hv
365 hg add [OPTION]... [FILE]...
367 hg add [OPTION]... [FILE]...
366
368
367 add the specified files on the next commit
369 add the specified files on the next commit
368
370
369 Schedule files to be version controlled and added to the repository.
371 Schedule files to be version controlled and added to the repository.
370
372
371 The files will be added to the repository at the next commit. To undo an
373 The files will be added to the repository at the next commit. To undo an
372 add before that, see 'hg forget'.
374 add before that, see 'hg forget'.
373
375
374 If no names are given, add all files to the repository (except files
376 If no names are given, add all files to the repository (except files
375 matching ".hgignore").
377 matching ".hgignore").
376
378
377 Examples:
379 Examples:
378
380
379 - New (unknown) files are added automatically by 'hg add':
381 - New (unknown) files are added automatically by 'hg add':
380
382
381 $ ls
383 $ ls
382 foo.c
384 foo.c
383 $ hg status
385 $ hg status
384 ? foo.c
386 ? foo.c
385 $ hg add
387 $ hg add
386 adding foo.c
388 adding foo.c
387 $ hg status
389 $ hg status
388 A foo.c
390 A foo.c
389
391
390 - Specific files to be added can be specified:
392 - Specific files to be added can be specified:
391
393
392 $ ls
394 $ ls
393 bar.c foo.c
395 bar.c foo.c
394 $ hg status
396 $ hg status
395 ? bar.c
397 ? bar.c
396 ? foo.c
398 ? foo.c
397 $ hg add bar.c
399 $ hg add bar.c
398 $ hg status
400 $ hg status
399 A bar.c
401 A bar.c
400 ? foo.c
402 ? foo.c
401
403
402 Returns 0 if all files are successfully added.
404 Returns 0 if all files are successfully added.
403
405
404 options ([+] can be repeated):
406 options ([+] can be repeated):
405
407
406 -I --include PATTERN [+] include names matching the given patterns
408 -I --include PATTERN [+] include names matching the given patterns
407 -X --exclude PATTERN [+] exclude names matching the given patterns
409 -X --exclude PATTERN [+] exclude names matching the given patterns
408 -S --subrepos recurse into subrepositories
410 -S --subrepos recurse into subrepositories
409 -n --dry-run do not perform actions, just print output
411 -n --dry-run do not perform actions, just print output
410
412
411 global options ([+] can be repeated):
413 global options ([+] can be repeated):
412
414
413 -R --repository REPO repository root directory or name of overlay bundle
415 -R --repository REPO repository root directory or name of overlay bundle
414 file
416 file
415 --cwd DIR change working directory
417 --cwd DIR change working directory
416 -y --noninteractive do not prompt, automatically pick the first choice for
418 -y --noninteractive do not prompt, automatically pick the first choice for
417 all prompts
419 all prompts
418 -q --quiet suppress output
420 -q --quiet suppress output
419 -v --verbose enable additional output
421 -v --verbose enable additional output
420 --color TYPE when to colorize (boolean, always, auto, never, or
422 --color TYPE when to colorize (boolean, always, auto, never, or
421 debug)
423 debug)
422 --config CONFIG [+] set/override config option (use 'section.name=value')
424 --config CONFIG [+] set/override config option (use 'section.name=value')
423 --debug enable debugging output
425 --debug enable debugging output
424 --debugger start debugger
426 --debugger start debugger
425 --encoding ENCODE set the charset encoding (default: ascii)
427 --encoding ENCODE set the charset encoding (default: ascii)
426 --encodingmode MODE set the charset encoding mode (default: strict)
428 --encodingmode MODE set the charset encoding mode (default: strict)
427 --traceback always print a traceback on exception
429 --traceback always print a traceback on exception
428 --time time how long the command takes
430 --time time how long the command takes
429 --profile print command execution profile
431 --profile print command execution profile
430 --version output version information and exit
432 --version output version information and exit
431 -h --help display help and exit
433 -h --help display help and exit
432 --hidden consider hidden changesets
434 --hidden consider hidden changesets
433 --pager TYPE when to paginate (boolean, always, auto, or never)
435 --pager TYPE when to paginate (boolean, always, auto, or never)
434 (default: auto)
436 (default: auto)
435
437
436 Test the textwidth config option
438 Test the textwidth config option
437
439
438 $ hg root -h --config ui.textwidth=50
440 $ hg root -h --config ui.textwidth=50
439 hg root
441 hg root
440
442
441 print the root (top) of the current working
443 print the root (top) of the current working
442 directory
444 directory
443
445
444 Print the root directory of the current
446 Print the root directory of the current
445 repository.
447 repository.
446
448
447 Returns 0 on success.
449 Returns 0 on success.
448
450
449 (some details hidden, use --verbose to show
451 (some details hidden, use --verbose to show
450 complete help)
452 complete help)
451
453
452 Test help option with version option
454 Test help option with version option
453
455
454 $ hg add -h --version
456 $ hg add -h --version
455 Mercurial Distributed SCM (version *) (glob)
457 Mercurial Distributed SCM (version *) (glob)
456 (see https://mercurial-scm.org for more information)
458 (see https://mercurial-scm.org for more information)
457
459
458 Copyright (C) 2005-* Matt Mackall and others (glob)
460 Copyright (C) 2005-* Matt Mackall and others (glob)
459 This is free software; see the source for copying conditions. There is NO
461 This is free software; see the source for copying conditions. There is NO
460 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
462 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
461
463
462 $ hg add --skjdfks
464 $ hg add --skjdfks
463 hg add: option --skjdfks not recognized
465 hg add: option --skjdfks not recognized
464 hg add [OPTION]... [FILE]...
466 hg add [OPTION]... [FILE]...
465
467
466 add the specified files on the next commit
468 add the specified files on the next commit
467
469
468 options ([+] can be repeated):
470 options ([+] can be repeated):
469
471
470 -I --include PATTERN [+] include names matching the given patterns
472 -I --include PATTERN [+] include names matching the given patterns
471 -X --exclude PATTERN [+] exclude names matching the given patterns
473 -X --exclude PATTERN [+] exclude names matching the given patterns
472 -S --subrepos recurse into subrepositories
474 -S --subrepos recurse into subrepositories
473 -n --dry-run do not perform actions, just print output
475 -n --dry-run do not perform actions, just print output
474
476
475 (use 'hg add -h' to show more help)
477 (use 'hg add -h' to show more help)
476 [255]
478 [255]
477
479
478 Test ambiguous command help
480 Test ambiguous command help
479
481
480 $ hg help ad
482 $ hg help ad
481 list of commands:
483 list of commands:
482
484
483 add add the specified files on the next commit
485 add add the specified files on the next commit
484 addremove add all new files, delete all missing files
486 addremove add all new files, delete all missing files
485
487
486 (use 'hg help -v ad' to show built-in aliases and global options)
488 (use 'hg help -v ad' to show built-in aliases and global options)
487
489
488 Test command without options
490 Test command without options
489
491
490 $ hg help verify
492 $ hg help verify
491 hg verify
493 hg verify
492
494
493 verify the integrity of the repository
495 verify the integrity of the repository
494
496
495 Verify the integrity of the current repository.
497 Verify the integrity of the current repository.
496
498
497 This will perform an extensive check of the repository's integrity,
499 This will perform an extensive check of the repository's integrity,
498 validating the hashes and checksums of each entry in the changelog,
500 validating the hashes and checksums of each entry in the changelog,
499 manifest, and tracked files, as well as the integrity of their crosslinks
501 manifest, and tracked files, as well as the integrity of their crosslinks
500 and indices.
502 and indices.
501
503
502 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
504 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
503 information about recovery from corruption of the repository.
505 information about recovery from corruption of the repository.
504
506
505 Returns 0 on success, 1 if errors are encountered.
507 Returns 0 on success, 1 if errors are encountered.
506
508
507 (some details hidden, use --verbose to show complete help)
509 (some details hidden, use --verbose to show complete help)
508
510
509 $ hg help diff
511 $ hg help diff
510 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
512 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
511
513
512 diff repository (or selected files)
514 diff repository (or selected files)
513
515
514 Show differences between revisions for the specified files.
516 Show differences between revisions for the specified files.
515
517
516 Differences between files are shown using the unified diff format.
518 Differences between files are shown using the unified diff format.
517
519
518 Note:
520 Note:
519 'hg diff' may generate unexpected results for merges, as it will
521 'hg diff' may generate unexpected results for merges, as it will
520 default to comparing against the working directory's first parent
522 default to comparing against the working directory's first parent
521 changeset if no revisions are specified.
523 changeset if no revisions are specified.
522
524
523 When two revision arguments are given, then changes are shown between
525 When two revision arguments are given, then changes are shown between
524 those revisions. If only one revision is specified then that revision is
526 those revisions. If only one revision is specified then that revision is
525 compared to the working directory, and, when no revisions are specified,
527 compared to the working directory, and, when no revisions are specified,
526 the working directory files are compared to its first parent.
528 the working directory files are compared to its first parent.
527
529
528 Alternatively you can specify -c/--change with a revision to see the
530 Alternatively you can specify -c/--change with a revision to see the
529 changes in that changeset relative to its first parent.
531 changes in that changeset relative to its first parent.
530
532
531 Without the -a/--text option, diff will avoid generating diffs of files it
533 Without the -a/--text option, diff will avoid generating diffs of files it
532 detects as binary. With -a, diff will generate a diff anyway, probably
534 detects as binary. With -a, diff will generate a diff anyway, probably
533 with undesirable results.
535 with undesirable results.
534
536
535 Use the -g/--git option to generate diffs in the git extended diff format.
537 Use the -g/--git option to generate diffs in the git extended diff format.
536 For more information, read 'hg help diffs'.
538 For more information, read 'hg help diffs'.
537
539
538 Returns 0 on success.
540 Returns 0 on success.
539
541
540 options ([+] can be repeated):
542 options ([+] can be repeated):
541
543
542 -r --rev REV [+] revision
544 -r --rev REV [+] revision
543 -c --change REV change made by revision
545 -c --change REV change made by revision
544 -a --text treat all files as text
546 -a --text treat all files as text
545 -g --git use git extended diff format
547 -g --git use git extended diff format
546 --nodates omit dates from diff headers
548 --nodates omit dates from diff headers
547 --noprefix omit a/ and b/ prefixes from filenames
549 --noprefix omit a/ and b/ prefixes from filenames
548 -p --show-function show which function each change is in
550 -p --show-function show which function each change is in
549 --reverse produce a diff that undoes the changes
551 --reverse produce a diff that undoes the changes
550 -w --ignore-all-space ignore white space when comparing lines
552 -w --ignore-all-space ignore white space when comparing lines
551 -b --ignore-space-change ignore changes in the amount of white space
553 -b --ignore-space-change ignore changes in the amount of white space
552 -B --ignore-blank-lines ignore changes whose lines are all blank
554 -B --ignore-blank-lines ignore changes whose lines are all blank
553 -U --unified NUM number of lines of context to show
555 -U --unified NUM number of lines of context to show
554 --stat output diffstat-style summary of changes
556 --stat output diffstat-style summary of changes
555 --root DIR produce diffs relative to subdirectory
557 --root DIR produce diffs relative to subdirectory
556 -I --include PATTERN [+] include names matching the given patterns
558 -I --include PATTERN [+] include names matching the given patterns
557 -X --exclude PATTERN [+] exclude names matching the given patterns
559 -X --exclude PATTERN [+] exclude names matching the given patterns
558 -S --subrepos recurse into subrepositories
560 -S --subrepos recurse into subrepositories
559
561
560 (some details hidden, use --verbose to show complete help)
562 (some details hidden, use --verbose to show complete help)
561
563
562 $ hg help status
564 $ hg help status
563 hg status [OPTION]... [FILE]...
565 hg status [OPTION]... [FILE]...
564
566
565 aliases: st
567 aliases: st
566
568
567 show changed files in the working directory
569 show changed files in the working directory
568
570
569 Show status of files in the repository. If names are given, only files
571 Show status of files in the repository. If names are given, only files
570 that match are shown. Files that are clean or ignored or the source of a
572 that match are shown. Files that are clean or ignored or the source of a
571 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
573 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
572 -C/--copies or -A/--all are given. Unless options described with "show
574 -C/--copies or -A/--all are given. Unless options described with "show
573 only ..." are given, the options -mardu are used.
575 only ..." are given, the options -mardu are used.
574
576
575 Option -q/--quiet hides untracked (unknown and ignored) files unless
577 Option -q/--quiet hides untracked (unknown and ignored) files unless
576 explicitly requested with -u/--unknown or -i/--ignored.
578 explicitly requested with -u/--unknown or -i/--ignored.
577
579
578 Note:
580 Note:
579 'hg status' may appear to disagree with diff if permissions have
581 'hg status' may appear to disagree with diff if permissions have
580 changed or a merge has occurred. The standard diff format does not
582 changed or a merge has occurred. The standard diff format does not
581 report permission changes and diff only reports changes relative to one
583 report permission changes and diff only reports changes relative to one
582 merge parent.
584 merge parent.
583
585
584 If one revision is given, it is used as the base revision. If two
586 If one revision is given, it is used as the base revision. If two
585 revisions are given, the differences between them are shown. The --change
587 revisions are given, the differences between them are shown. The --change
586 option can also be used as a shortcut to list the changed files of a
588 option can also be used as a shortcut to list the changed files of a
587 revision from its first parent.
589 revision from its first parent.
588
590
589 The codes used to show the status of files are:
591 The codes used to show the status of files are:
590
592
591 M = modified
593 M = modified
592 A = added
594 A = added
593 R = removed
595 R = removed
594 C = clean
596 C = clean
595 ! = missing (deleted by non-hg command, but still tracked)
597 ! = missing (deleted by non-hg command, but still tracked)
596 ? = not tracked
598 ? = not tracked
597 I = ignored
599 I = ignored
598 = origin of the previous file (with --copies)
600 = origin of the previous file (with --copies)
599
601
600 Returns 0 on success.
602 Returns 0 on success.
601
603
602 options ([+] can be repeated):
604 options ([+] can be repeated):
603
605
604 -A --all show status of all files
606 -A --all show status of all files
605 -m --modified show only modified files
607 -m --modified show only modified files
606 -a --added show only added files
608 -a --added show only added files
607 -r --removed show only removed files
609 -r --removed show only removed files
608 -d --deleted show only deleted (but tracked) files
610 -d --deleted show only deleted (but tracked) files
609 -c --clean show only files without changes
611 -c --clean show only files without changes
610 -u --unknown show only unknown (not tracked) files
612 -u --unknown show only unknown (not tracked) files
611 -i --ignored show only ignored files
613 -i --ignored show only ignored files
612 -n --no-status hide status prefix
614 -n --no-status hide status prefix
613 -C --copies show source of copied files
615 -C --copies show source of copied files
614 -0 --print0 end filenames with NUL, for use with xargs
616 -0 --print0 end filenames with NUL, for use with xargs
615 --rev REV [+] show difference from revision
617 --rev REV [+] show difference from revision
616 --change REV list the changed files of a revision
618 --change REV list the changed files of a revision
617 -I --include PATTERN [+] include names matching the given patterns
619 -I --include PATTERN [+] include names matching the given patterns
618 -X --exclude PATTERN [+] exclude names matching the given patterns
620 -X --exclude PATTERN [+] exclude names matching the given patterns
619 -S --subrepos recurse into subrepositories
621 -S --subrepos recurse into subrepositories
620
622
621 (some details hidden, use --verbose to show complete help)
623 (some details hidden, use --verbose to show complete help)
622
624
623 $ hg -q help status
625 $ hg -q help status
624 hg status [OPTION]... [FILE]...
626 hg status [OPTION]... [FILE]...
625
627
626 show changed files in the working directory
628 show changed files in the working directory
627
629
628 $ hg help foo
630 $ hg help foo
629 abort: no such help topic: foo
631 abort: no such help topic: foo
630 (try 'hg help --keyword foo')
632 (try 'hg help --keyword foo')
631 [255]
633 [255]
632
634
633 $ hg skjdfks
635 $ hg skjdfks
634 hg: unknown command 'skjdfks'
636 hg: unknown command 'skjdfks'
635 Mercurial Distributed SCM
637 Mercurial Distributed SCM
636
638
637 basic commands:
639 basic commands:
638
640
639 add add the specified files on the next commit
641 add add the specified files on the next commit
640 annotate show changeset information by line for each file
642 annotate show changeset information by line for each file
641 clone make a copy of an existing repository
643 clone make a copy of an existing repository
642 commit commit the specified files or all outstanding changes
644 commit commit the specified files or all outstanding changes
643 diff diff repository (or selected files)
645 diff diff repository (or selected files)
644 export dump the header and diffs for one or more changesets
646 export dump the header and diffs for one or more changesets
645 forget forget the specified files on the next commit
647 forget forget the specified files on the next commit
646 init create a new repository in the given directory
648 init create a new repository in the given directory
647 log show revision history of entire repository or files
649 log show revision history of entire repository or files
648 merge merge another revision into working directory
650 merge merge another revision into working directory
649 pull pull changes from the specified source
651 pull pull changes from the specified source
650 push push changes to the specified destination
652 push push changes to the specified destination
651 remove remove the specified files on the next commit
653 remove remove the specified files on the next commit
652 serve start stand-alone webserver
654 serve start stand-alone webserver
653 status show changed files in the working directory
655 status show changed files in the working directory
654 summary summarize working directory state
656 summary summarize working directory state
655 update update working directory (or switch revisions)
657 update update working directory (or switch revisions)
656
658
657 (use 'hg help' for the full list of commands or 'hg -v' for details)
659 (use 'hg help' for the full list of commands or 'hg -v' for details)
658 [255]
660 [255]
659
661
660
662
661 Make sure that we don't run afoul of the help system thinking that
663 Make sure that we don't run afoul of the help system thinking that
662 this is a section and erroring out weirdly.
664 this is a section and erroring out weirdly.
663
665
664 $ hg .log
666 $ hg .log
665 hg: unknown command '.log'
667 hg: unknown command '.log'
666 (did you mean log?)
668 (did you mean log?)
667 [255]
669 [255]
668
670
669 $ hg log.
671 $ hg log.
670 hg: unknown command 'log.'
672 hg: unknown command 'log.'
671 (did you mean log?)
673 (did you mean log?)
672 [255]
674 [255]
673 $ hg pu.lh
675 $ hg pu.lh
674 hg: unknown command 'pu.lh'
676 hg: unknown command 'pu.lh'
675 (did you mean one of pull, push?)
677 (did you mean one of pull, push?)
676 [255]
678 [255]
677
679
678 $ cat > helpext.py <<EOF
680 $ cat > helpext.py <<EOF
679 > import os
681 > import os
680 > from mercurial import cmdutil, commands
682 > from mercurial import cmdutil, commands
681 >
683 >
682 > cmdtable = {}
684 > cmdtable = {}
683 > command = cmdutil.command(cmdtable)
685 > command = cmdutil.command(cmdtable)
684 >
686 >
685 > @command('nohelp',
687 > @command('nohelp',
686 > [('', 'longdesc', 3, 'x'*90),
688 > [('', 'longdesc', 3, 'x'*90),
687 > ('n', '', None, 'normal desc'),
689 > ('n', '', None, 'normal desc'),
688 > ('', 'newline', '', 'line1\nline2')],
690 > ('', 'newline', '', 'line1\nline2')],
689 > 'hg nohelp',
691 > 'hg nohelp',
690 > norepo=True)
692 > norepo=True)
691 > @command('debugoptADV', [('', 'aopt', None, 'option is (ADVANCED)')])
693 > @command('debugoptADV', [('', 'aopt', None, 'option is (ADVANCED)')])
692 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
694 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
693 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
695 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
694 > def nohelp(ui, *args, **kwargs):
696 > def nohelp(ui, *args, **kwargs):
695 > pass
697 > pass
696 >
698 >
697 > def uisetup(ui):
699 > def uisetup(ui):
698 > ui.setconfig('alias', 'shellalias', '!echo hi', 'helpext')
700 > ui.setconfig('alias', 'shellalias', '!echo hi', 'helpext')
699 > ui.setconfig('alias', 'hgalias', 'summary', 'helpext')
701 > ui.setconfig('alias', 'hgalias', 'summary', 'helpext')
700 >
702 >
701 > EOF
703 > EOF
702 $ echo '[extensions]' >> $HGRCPATH
704 $ echo '[extensions]' >> $HGRCPATH
703 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
705 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
704
706
705 Test for aliases
707 Test for aliases
706
708
707 $ hg help hgalias
709 $ hg help hgalias
708 hg hgalias [--remote]
710 hg hgalias [--remote]
709
711
710 alias for: hg summary
712 alias for: hg summary
711
713
712 summarize working directory state
714 summarize working directory state
713
715
714 This generates a brief summary of the working directory state, including
716 This generates a brief summary of the working directory state, including
715 parents, branch, commit status, phase and available updates.
717 parents, branch, commit status, phase and available updates.
716
718
717 With the --remote option, this will check the default paths for incoming
719 With the --remote option, this will check the default paths for incoming
718 and outgoing changes. This can be time-consuming.
720 and outgoing changes. This can be time-consuming.
719
721
720 Returns 0 on success.
722 Returns 0 on success.
721
723
722 defined by: helpext
724 defined by: helpext
723
725
724 options:
726 options:
725
727
726 --remote check for push and pull
728 --remote check for push and pull
727
729
728 (some details hidden, use --verbose to show complete help)
730 (some details hidden, use --verbose to show complete help)
729
731
730 $ hg help shellalias
732 $ hg help shellalias
731 hg shellalias
733 hg shellalias
732
734
733 shell alias for:
735 shell alias for:
734
736
735 echo hi
737 echo hi
736
738
737 defined by: helpext
739 defined by: helpext
738
740
739 (some details hidden, use --verbose to show complete help)
741 (some details hidden, use --verbose to show complete help)
740
742
741 Test command with no help text
743 Test command with no help text
742
744
743 $ hg help nohelp
745 $ hg help nohelp
744 hg nohelp
746 hg nohelp
745
747
746 (no help text available)
748 (no help text available)
747
749
748 options:
750 options:
749
751
750 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
752 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
751 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
753 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
752 -n -- normal desc
754 -n -- normal desc
753 --newline VALUE line1 line2
755 --newline VALUE line1 line2
754
756
755 (some details hidden, use --verbose to show complete help)
757 (some details hidden, use --verbose to show complete help)
756
758
757 $ hg help -k nohelp
759 $ hg help -k nohelp
758 Commands:
760 Commands:
759
761
760 nohelp hg nohelp
762 nohelp hg nohelp
761
763
762 Extension Commands:
764 Extension Commands:
763
765
764 nohelp (no help text available)
766 nohelp (no help text available)
765
767
766 Test that default list of commands omits extension commands
768 Test that default list of commands omits extension commands
767
769
768 $ hg help
770 $ hg help
769 Mercurial Distributed SCM
771 Mercurial Distributed SCM
770
772
771 list of commands:
773 list of commands:
772
774
773 add add the specified files on the next commit
775 add add the specified files on the next commit
774 addremove add all new files, delete all missing files
776 addremove add all new files, delete all missing files
775 annotate show changeset information by line for each file
777 annotate show changeset information by line for each file
776 archive create an unversioned archive of a repository revision
778 archive create an unversioned archive of a repository revision
777 backout reverse effect of earlier changeset
779 backout reverse effect of earlier changeset
778 bisect subdivision search of changesets
780 bisect subdivision search of changesets
779 bookmarks create a new bookmark or list existing bookmarks
781 bookmarks create a new bookmark or list existing bookmarks
780 branch set or show the current branch name
782 branch set or show the current branch name
781 branches list repository named branches
783 branches list repository named branches
782 bundle create a changegroup file
784 bundle create a changegroup file
783 cat output the current or given revision of files
785 cat output the current or given revision of files
784 clone make a copy of an existing repository
786 clone make a copy of an existing repository
785 commit commit the specified files or all outstanding changes
787 commit commit the specified files or all outstanding changes
786 config show combined config settings from all hgrc files
788 config show combined config settings from all hgrc files
787 copy mark files as copied for the next commit
789 copy mark files as copied for the next commit
788 diff diff repository (or selected files)
790 diff diff repository (or selected files)
789 export dump the header and diffs for one or more changesets
791 export dump the header and diffs for one or more changesets
790 files list tracked files
792 files list tracked files
791 forget forget the specified files on the next commit
793 forget forget the specified files on the next commit
792 graft copy changes from other branches onto the current branch
794 graft copy changes from other branches onto the current branch
793 grep search revision history for a pattern in specified files
795 grep search revision history for a pattern in specified files
794 heads show branch heads
796 heads show branch heads
795 help show help for a given topic or a help overview
797 help show help for a given topic or a help overview
796 identify identify the working directory or specified revision
798 identify identify the working directory or specified revision
797 import import an ordered set of patches
799 import import an ordered set of patches
798 incoming show new changesets found in source
800 incoming show new changesets found in source
799 init create a new repository in the given directory
801 init create a new repository in the given directory
800 log show revision history of entire repository or files
802 log show revision history of entire repository or files
801 manifest output the current or given revision of the project manifest
803 manifest output the current or given revision of the project manifest
802 merge merge another revision into working directory
804 merge merge another revision into working directory
803 outgoing show changesets not found in the destination
805 outgoing show changesets not found in the destination
804 paths show aliases for remote repositories
806 paths show aliases for remote repositories
805 phase set or show the current phase name
807 phase set or show the current phase name
806 pull pull changes from the specified source
808 pull pull changes from the specified source
807 push push changes to the specified destination
809 push push changes to the specified destination
808 recover roll back an interrupted transaction
810 recover roll back an interrupted transaction
809 remove remove the specified files on the next commit
811 remove remove the specified files on the next commit
810 rename rename files; equivalent of copy + remove
812 rename rename files; equivalent of copy + remove
811 resolve redo merges or set/view the merge status of files
813 resolve redo merges or set/view the merge status of files
812 revert restore files to their checkout state
814 revert restore files to their checkout state
813 root print the root (top) of the current working directory
815 root print the root (top) of the current working directory
814 serve start stand-alone webserver
816 serve start stand-alone webserver
815 status show changed files in the working directory
817 status show changed files in the working directory
816 summary summarize working directory state
818 summary summarize working directory state
817 tag add one or more tags for the current or given revision
819 tag add one or more tags for the current or given revision
818 tags list repository tags
820 tags list repository tags
819 unbundle apply one or more changegroup files
821 unbundle apply one or more changegroup files
820 update update working directory (or switch revisions)
822 update update working directory (or switch revisions)
821 verify verify the integrity of the repository
823 verify verify the integrity of the repository
822 version output version and copyright information
824 version output version and copyright information
823
825
824 enabled extensions:
826 enabled extensions:
825
827
826 helpext (no help text available)
828 helpext (no help text available)
827
829
828 additional help topics:
830 additional help topics:
829
831
832 bundlespec Bundle File Formats
830 color Colorizing Outputs
833 color Colorizing Outputs
831 config Configuration Files
834 config Configuration Files
832 dates Date Formats
835 dates Date Formats
833 diffs Diff Formats
836 diffs Diff Formats
834 environment Environment Variables
837 environment Environment Variables
835 extensions Using Additional Features
838 extensions Using Additional Features
836 filesets Specifying File Sets
839 filesets Specifying File Sets
837 glossary Glossary
840 glossary Glossary
838 hgignore Syntax for Mercurial Ignore Files
841 hgignore Syntax for Mercurial Ignore Files
839 hgweb Configuring hgweb
842 hgweb Configuring hgweb
840 internals Technical implementation topics
843 internals Technical implementation topics
841 merge-tools Merge Tools
844 merge-tools Merge Tools
842 pager Pager Support
845 pager Pager Support
843 patterns File Name Patterns
846 patterns File Name Patterns
844 phases Working with Phases
847 phases Working with Phases
845 revisions Specifying Revisions
848 revisions Specifying Revisions
846 scripting Using Mercurial from scripts and automation
849 scripting Using Mercurial from scripts and automation
847 subrepos Subrepositories
850 subrepos Subrepositories
848 templating Template Usage
851 templating Template Usage
849 urls URL Paths
852 urls URL Paths
850
853
851 (use 'hg help -v' to show built-in aliases and global options)
854 (use 'hg help -v' to show built-in aliases and global options)
852
855
853
856
854 Test list of internal help commands
857 Test list of internal help commands
855
858
856 $ hg help debug
859 $ hg help debug
857 debug commands (internal and unsupported):
860 debug commands (internal and unsupported):
858
861
859 debugancestor
862 debugancestor
860 find the ancestor revision of two revisions in a given index
863 find the ancestor revision of two revisions in a given index
861 debugapplystreamclonebundle
864 debugapplystreamclonebundle
862 apply a stream clone bundle file
865 apply a stream clone bundle file
863 debugbuilddag
866 debugbuilddag
864 builds a repo with a given DAG from scratch in the current
867 builds a repo with a given DAG from scratch in the current
865 empty repo
868 empty repo
866 debugbundle lists the contents of a bundle
869 debugbundle lists the contents of a bundle
867 debugcheckstate
870 debugcheckstate
868 validate the correctness of the current dirstate
871 validate the correctness of the current dirstate
869 debugcolor show available color, effects or style
872 debugcolor show available color, effects or style
870 debugcommands
873 debugcommands
871 list all available commands and options
874 list all available commands and options
872 debugcomplete
875 debugcomplete
873 returns the completion list associated with the given command
876 returns the completion list associated with the given command
874 debugcreatestreamclonebundle
877 debugcreatestreamclonebundle
875 create a stream clone bundle file
878 create a stream clone bundle file
876 debugdag format the changelog or an index DAG as a concise textual
879 debugdag format the changelog or an index DAG as a concise textual
877 description
880 description
878 debugdata dump the contents of a data file revision
881 debugdata dump the contents of a data file revision
879 debugdate parse and display a date
882 debugdate parse and display a date
880 debugdeltachain
883 debugdeltachain
881 dump information about delta chains in a revlog
884 dump information about delta chains in a revlog
882 debugdirstate
885 debugdirstate
883 show the contents of the current dirstate
886 show the contents of the current dirstate
884 debugdiscovery
887 debugdiscovery
885 runs the changeset discovery protocol in isolation
888 runs the changeset discovery protocol in isolation
886 debugextensions
889 debugextensions
887 show information about active extensions
890 show information about active extensions
888 debugfileset parse and apply a fileset specification
891 debugfileset parse and apply a fileset specification
889 debugfsinfo show information detected about current filesystem
892 debugfsinfo show information detected about current filesystem
890 debuggetbundle
893 debuggetbundle
891 retrieves a bundle from a repo
894 retrieves a bundle from a repo
892 debugignore display the combined ignore pattern and information about
895 debugignore display the combined ignore pattern and information about
893 ignored files
896 ignored files
894 debugindex dump the contents of an index file
897 debugindex dump the contents of an index file
895 debugindexdot
898 debugindexdot
896 dump an index DAG as a graphviz dot file
899 dump an index DAG as a graphviz dot file
897 debuginstall test Mercurial installation
900 debuginstall test Mercurial installation
898 debugknown test whether node ids are known to a repo
901 debugknown test whether node ids are known to a repo
899 debuglocks show or modify state of locks
902 debuglocks show or modify state of locks
900 debugmergestate
903 debugmergestate
901 print merge state
904 print merge state
902 debugnamecomplete
905 debugnamecomplete
903 complete "names" - tags, open branch names, bookmark names
906 complete "names" - tags, open branch names, bookmark names
904 debugobsolete
907 debugobsolete
905 create arbitrary obsolete marker
908 create arbitrary obsolete marker
906 debugoptADV (no help text available)
909 debugoptADV (no help text available)
907 debugoptDEP (no help text available)
910 debugoptDEP (no help text available)
908 debugoptEXP (no help text available)
911 debugoptEXP (no help text available)
909 debugpathcomplete
912 debugpathcomplete
910 complete part or all of a tracked path
913 complete part or all of a tracked path
911 debugpushkey access the pushkey key/value protocol
914 debugpushkey access the pushkey key/value protocol
912 debugpvec (no help text available)
915 debugpvec (no help text available)
913 debugrebuilddirstate
916 debugrebuilddirstate
914 rebuild the dirstate as it would look like for the given
917 rebuild the dirstate as it would look like for the given
915 revision
918 revision
916 debugrebuildfncache
919 debugrebuildfncache
917 rebuild the fncache file
920 rebuild the fncache file
918 debugrename dump rename information
921 debugrename dump rename information
919 debugrevlog show data and statistics about a revlog
922 debugrevlog show data and statistics about a revlog
920 debugrevspec parse and apply a revision specification
923 debugrevspec parse and apply a revision specification
921 debugsetparents
924 debugsetparents
922 manually set the parents of the current working directory
925 manually set the parents of the current working directory
923 debugsub (no help text available)
926 debugsub (no help text available)
924 debugsuccessorssets
927 debugsuccessorssets
925 show set of successors for revision
928 show set of successors for revision
926 debugtemplate
929 debugtemplate
927 parse and apply a template
930 parse and apply a template
928 debugupgraderepo
931 debugupgraderepo
929 upgrade a repository to use different features
932 upgrade a repository to use different features
930 debugwalk show how files match on given patterns
933 debugwalk show how files match on given patterns
931 debugwireargs
934 debugwireargs
932 (no help text available)
935 (no help text available)
933
936
934 (use 'hg help -v debug' to show built-in aliases and global options)
937 (use 'hg help -v debug' to show built-in aliases and global options)
935
938
936 internals topic renders index of available sub-topics
939 internals topic renders index of available sub-topics
937
940
938 $ hg help internals
941 $ hg help internals
939 Technical implementation topics
942 Technical implementation topics
940 """""""""""""""""""""""""""""""
943 """""""""""""""""""""""""""""""
941
944
942 bundles Bundles
945 bundles Bundles
943 censor Censor
946 censor Censor
944 changegroups Changegroups
947 changegroups Changegroups
945 requirements Repository Requirements
948 requirements Repository Requirements
946 revlogs Revision Logs
949 revlogs Revision Logs
947 wireprotocol Wire Protocol
950 wireprotocol Wire Protocol
948
951
949 sub-topics can be accessed
952 sub-topics can be accessed
950
953
951 $ hg help internals.changegroups
954 $ hg help internals.changegroups
952 Changegroups
955 Changegroups
953 """"""""""""
956 """"""""""""
954
957
955 Changegroups are representations of repository revlog data, specifically
958 Changegroups are representations of repository revlog data, specifically
956 the changelog data, root/flat manifest data, treemanifest data, and
959 the changelog data, root/flat manifest data, treemanifest data, and
957 filelogs.
960 filelogs.
958
961
959 There are 3 versions of changegroups: "1", "2", and "3". From a high-
962 There are 3 versions of changegroups: "1", "2", and "3". From a high-
960 level, versions "1" and "2" are almost exactly the same, with the only
963 level, versions "1" and "2" are almost exactly the same, with the only
961 difference being an additional item in the *delta header*. Version "3"
964 difference being an additional item in the *delta header*. Version "3"
962 adds support for revlog flags in the *delta header* and optionally
965 adds support for revlog flags in the *delta header* and optionally
963 exchanging treemanifests (enabled by setting an option on the
966 exchanging treemanifests (enabled by setting an option on the
964 "changegroup" part in the bundle2).
967 "changegroup" part in the bundle2).
965
968
966 Changegroups when not exchanging treemanifests consist of 3 logical
969 Changegroups when not exchanging treemanifests consist of 3 logical
967 segments:
970 segments:
968
971
969 +---------------------------------+
972 +---------------------------------+
970 | | | |
973 | | | |
971 | changeset | manifest | filelogs |
974 | changeset | manifest | filelogs |
972 | | | |
975 | | | |
973 | | | |
976 | | | |
974 +---------------------------------+
977 +---------------------------------+
975
978
976 When exchanging treemanifests, there are 4 logical segments:
979 When exchanging treemanifests, there are 4 logical segments:
977
980
978 +-------------------------------------------------+
981 +-------------------------------------------------+
979 | | | | |
982 | | | | |
980 | changeset | root | treemanifests | filelogs |
983 | changeset | root | treemanifests | filelogs |
981 | | manifest | | |
984 | | manifest | | |
982 | | | | |
985 | | | | |
983 +-------------------------------------------------+
986 +-------------------------------------------------+
984
987
985 The principle building block of each segment is a *chunk*. A *chunk* is a
988 The principle building block of each segment is a *chunk*. A *chunk* is a
986 framed piece of data:
989 framed piece of data:
987
990
988 +---------------------------------------+
991 +---------------------------------------+
989 | | |
992 | | |
990 | length | data |
993 | length | data |
991 | (4 bytes) | (<length - 4> bytes) |
994 | (4 bytes) | (<length - 4> bytes) |
992 | | |
995 | | |
993 +---------------------------------------+
996 +---------------------------------------+
994
997
995 All integers are big-endian signed integers. Each chunk starts with a
998 All integers are big-endian signed integers. Each chunk starts with a
996 32-bit integer indicating the length of the entire chunk (including the
999 32-bit integer indicating the length of the entire chunk (including the
997 length field itself).
1000 length field itself).
998
1001
999 There is a special case chunk that has a value of 0 for the length
1002 There is a special case chunk that has a value of 0 for the length
1000 ("0x00000000"). We call this an *empty chunk*.
1003 ("0x00000000"). We call this an *empty chunk*.
1001
1004
1002 Delta Groups
1005 Delta Groups
1003 ============
1006 ============
1004
1007
1005 A *delta group* expresses the content of a revlog as a series of deltas,
1008 A *delta group* expresses the content of a revlog as a series of deltas,
1006 or patches against previous revisions.
1009 or patches against previous revisions.
1007
1010
1008 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1011 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1009 to signal the end of the delta group:
1012 to signal the end of the delta group:
1010
1013
1011 +------------------------------------------------------------------------+
1014 +------------------------------------------------------------------------+
1012 | | | | | |
1015 | | | | | |
1013 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1016 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1014 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1017 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1015 | | | | | |
1018 | | | | | |
1016 +------------------------------------------------------------------------+
1019 +------------------------------------------------------------------------+
1017
1020
1018 Each *chunk*'s data consists of the following:
1021 Each *chunk*'s data consists of the following:
1019
1022
1020 +---------------------------------------+
1023 +---------------------------------------+
1021 | | |
1024 | | |
1022 | delta header | delta data |
1025 | delta header | delta data |
1023 | (various by version) | (various) |
1026 | (various by version) | (various) |
1024 | | |
1027 | | |
1025 +---------------------------------------+
1028 +---------------------------------------+
1026
1029
1027 The *delta data* is a series of *delta*s that describe a diff from an
1030 The *delta data* is a series of *delta*s that describe a diff from an
1028 existing entry (either that the recipient already has, or previously
1031 existing entry (either that the recipient already has, or previously
1029 specified in the bundlei/changegroup).
1032 specified in the bundlei/changegroup).
1030
1033
1031 The *delta header* is different between versions "1", "2", and "3" of the
1034 The *delta header* is different between versions "1", "2", and "3" of the
1032 changegroup format.
1035 changegroup format.
1033
1036
1034 Version 1 (headerlen=80):
1037 Version 1 (headerlen=80):
1035
1038
1036 +------------------------------------------------------+
1039 +------------------------------------------------------+
1037 | | | | |
1040 | | | | |
1038 | node | p1 node | p2 node | link node |
1041 | node | p1 node | p2 node | link node |
1039 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1042 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1040 | | | | |
1043 | | | | |
1041 +------------------------------------------------------+
1044 +------------------------------------------------------+
1042
1045
1043 Version 2 (headerlen=100):
1046 Version 2 (headerlen=100):
1044
1047
1045 +------------------------------------------------------------------+
1048 +------------------------------------------------------------------+
1046 | | | | | |
1049 | | | | | |
1047 | node | p1 node | p2 node | base node | link node |
1050 | node | p1 node | p2 node | base node | link node |
1048 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1051 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1049 | | | | | |
1052 | | | | | |
1050 +------------------------------------------------------------------+
1053 +------------------------------------------------------------------+
1051
1054
1052 Version 3 (headerlen=102):
1055 Version 3 (headerlen=102):
1053
1056
1054 +------------------------------------------------------------------------------+
1057 +------------------------------------------------------------------------------+
1055 | | | | | | |
1058 | | | | | | |
1056 | node | p1 node | p2 node | base node | link node | flags |
1059 | node | p1 node | p2 node | base node | link node | flags |
1057 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1060 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1058 | | | | | | |
1061 | | | | | | |
1059 +------------------------------------------------------------------------------+
1062 +------------------------------------------------------------------------------+
1060
1063
1061 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1064 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1062 contain a series of *delta*s, densely packed (no separators). These deltas
1065 contain a series of *delta*s, densely packed (no separators). These deltas
1063 describe a diff from an existing entry (either that the recipient already
1066 describe a diff from an existing entry (either that the recipient already
1064 has, or previously specified in the bundle/changegroup). The format is
1067 has, or previously specified in the bundle/changegroup). The format is
1065 described more fully in "hg help internals.bdiff", but briefly:
1068 described more fully in "hg help internals.bdiff", but briefly:
1066
1069
1067 +---------------------------------------------------------------+
1070 +---------------------------------------------------------------+
1068 | | | | |
1071 | | | | |
1069 | start offset | end offset | new length | content |
1072 | start offset | end offset | new length | content |
1070 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1073 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1071 | | | | |
1074 | | | | |
1072 +---------------------------------------------------------------+
1075 +---------------------------------------------------------------+
1073
1076
1074 Please note that the length field in the delta data does *not* include
1077 Please note that the length field in the delta data does *not* include
1075 itself.
1078 itself.
1076
1079
1077 In version 1, the delta is always applied against the previous node from
1080 In version 1, the delta is always applied against the previous node from
1078 the changegroup or the first parent if this is the first entry in the
1081 the changegroup or the first parent if this is the first entry in the
1079 changegroup.
1082 changegroup.
1080
1083
1081 In version 2 and up, the delta base node is encoded in the entry in the
1084 In version 2 and up, the delta base node is encoded in the entry in the
1082 changegroup. This allows the delta to be expressed against any parent,
1085 changegroup. This allows the delta to be expressed against any parent,
1083 which can result in smaller deltas and more efficient encoding of data.
1086 which can result in smaller deltas and more efficient encoding of data.
1084
1087
1085 Changeset Segment
1088 Changeset Segment
1086 =================
1089 =================
1087
1090
1088 The *changeset segment* consists of a single *delta group* holding
1091 The *changeset segment* consists of a single *delta group* holding
1089 changelog data. The *empty chunk* at the end of the *delta group* denotes
1092 changelog data. The *empty chunk* at the end of the *delta group* denotes
1090 the boundary to the *manifest segment*.
1093 the boundary to the *manifest segment*.
1091
1094
1092 Manifest Segment
1095 Manifest Segment
1093 ================
1096 ================
1094
1097
1095 The *manifest segment* consists of a single *delta group* holding manifest
1098 The *manifest segment* consists of a single *delta group* holding manifest
1096 data. If treemanifests are in use, it contains only the manifest for the
1099 data. If treemanifests are in use, it contains only the manifest for the
1097 root directory of the repository. Otherwise, it contains the entire
1100 root directory of the repository. Otherwise, it contains the entire
1098 manifest data. The *empty chunk* at the end of the *delta group* denotes
1101 manifest data. The *empty chunk* at the end of the *delta group* denotes
1099 the boundary to the next segment (either the *treemanifests segment* or
1102 the boundary to the next segment (either the *treemanifests segment* or
1100 the *filelogs segment*, depending on version and the request options).
1103 the *filelogs segment*, depending on version and the request options).
1101
1104
1102 Treemanifests Segment
1105 Treemanifests Segment
1103 ---------------------
1106 ---------------------
1104
1107
1105 The *treemanifests segment* only exists in changegroup version "3", and
1108 The *treemanifests segment* only exists in changegroup version "3", and
1106 only if the 'treemanifest' param is part of the bundle2 changegroup part
1109 only if the 'treemanifest' param is part of the bundle2 changegroup part
1107 (it is not possible to use changegroup version 3 outside of bundle2).
1110 (it is not possible to use changegroup version 3 outside of bundle2).
1108 Aside from the filenames in the *treemanifests segment* containing a
1111 Aside from the filenames in the *treemanifests segment* containing a
1109 trailing "/" character, it behaves identically to the *filelogs segment*
1112 trailing "/" character, it behaves identically to the *filelogs segment*
1110 (see below). The final sub-segment is followed by an *empty chunk*
1113 (see below). The final sub-segment is followed by an *empty chunk*
1111 (logically, a sub-segment with filename size 0). This denotes the boundary
1114 (logically, a sub-segment with filename size 0). This denotes the boundary
1112 to the *filelogs segment*.
1115 to the *filelogs segment*.
1113
1116
1114 Filelogs Segment
1117 Filelogs Segment
1115 ================
1118 ================
1116
1119
1117 The *filelogs segment* consists of multiple sub-segments, each
1120 The *filelogs segment* consists of multiple sub-segments, each
1118 corresponding to an individual file whose data is being described:
1121 corresponding to an individual file whose data is being described:
1119
1122
1120 +--------------------------------------------------+
1123 +--------------------------------------------------+
1121 | | | | | |
1124 | | | | | |
1122 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1125 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1123 | | | | | (4 bytes) |
1126 | | | | | (4 bytes) |
1124 | | | | | |
1127 | | | | | |
1125 +--------------------------------------------------+
1128 +--------------------------------------------------+
1126
1129
1127 The final filelog sub-segment is followed by an *empty chunk* (logically,
1130 The final filelog sub-segment is followed by an *empty chunk* (logically,
1128 a sub-segment with filename size 0). This denotes the end of the segment
1131 a sub-segment with filename size 0). This denotes the end of the segment
1129 and of the overall changegroup.
1132 and of the overall changegroup.
1130
1133
1131 Each filelog sub-segment consists of the following:
1134 Each filelog sub-segment consists of the following:
1132
1135
1133 +------------------------------------------------------+
1136 +------------------------------------------------------+
1134 | | | |
1137 | | | |
1135 | filename length | filename | delta group |
1138 | filename length | filename | delta group |
1136 | (4 bytes) | (<length - 4> bytes) | (various) |
1139 | (4 bytes) | (<length - 4> bytes) | (various) |
1137 | | | |
1140 | | | |
1138 +------------------------------------------------------+
1141 +------------------------------------------------------+
1139
1142
1140 That is, a *chunk* consisting of the filename (not terminated or padded)
1143 That is, a *chunk* consisting of the filename (not terminated or padded)
1141 followed by N chunks constituting the *delta group* for this file. The
1144 followed by N chunks constituting the *delta group* for this file. The
1142 *empty chunk* at the end of each *delta group* denotes the boundary to the
1145 *empty chunk* at the end of each *delta group* denotes the boundary to the
1143 next filelog sub-segment.
1146 next filelog sub-segment.
1144
1147
1145 Test list of commands with command with no help text
1148 Test list of commands with command with no help text
1146
1149
1147 $ hg help helpext
1150 $ hg help helpext
1148 helpext extension - no help text available
1151 helpext extension - no help text available
1149
1152
1150 list of commands:
1153 list of commands:
1151
1154
1152 nohelp (no help text available)
1155 nohelp (no help text available)
1153
1156
1154 (use 'hg help -v helpext' to show built-in aliases and global options)
1157 (use 'hg help -v helpext' to show built-in aliases and global options)
1155
1158
1156
1159
1157 test advanced, deprecated and experimental options are hidden in command help
1160 test advanced, deprecated and experimental options are hidden in command help
1158 $ hg help debugoptADV
1161 $ hg help debugoptADV
1159 hg debugoptADV
1162 hg debugoptADV
1160
1163
1161 (no help text available)
1164 (no help text available)
1162
1165
1163 options:
1166 options:
1164
1167
1165 (some details hidden, use --verbose to show complete help)
1168 (some details hidden, use --verbose to show complete help)
1166 $ hg help debugoptDEP
1169 $ hg help debugoptDEP
1167 hg debugoptDEP
1170 hg debugoptDEP
1168
1171
1169 (no help text available)
1172 (no help text available)
1170
1173
1171 options:
1174 options:
1172
1175
1173 (some details hidden, use --verbose to show complete help)
1176 (some details hidden, use --verbose to show complete help)
1174
1177
1175 $ hg help debugoptEXP
1178 $ hg help debugoptEXP
1176 hg debugoptEXP
1179 hg debugoptEXP
1177
1180
1178 (no help text available)
1181 (no help text available)
1179
1182
1180 options:
1183 options:
1181
1184
1182 (some details hidden, use --verbose to show complete help)
1185 (some details hidden, use --verbose to show complete help)
1183
1186
1184 test advanced, deprecated and experimental options are shown with -v
1187 test advanced, deprecated and experimental options are shown with -v
1185 $ hg help -v debugoptADV | grep aopt
1188 $ hg help -v debugoptADV | grep aopt
1186 --aopt option is (ADVANCED)
1189 --aopt option is (ADVANCED)
1187 $ hg help -v debugoptDEP | grep dopt
1190 $ hg help -v debugoptDEP | grep dopt
1188 --dopt option is (DEPRECATED)
1191 --dopt option is (DEPRECATED)
1189 $ hg help -v debugoptEXP | grep eopt
1192 $ hg help -v debugoptEXP | grep eopt
1190 --eopt option is (EXPERIMENTAL)
1193 --eopt option is (EXPERIMENTAL)
1191
1194
1192 #if gettext
1195 #if gettext
1193 test deprecated option is hidden with translation with untranslated description
1196 test deprecated option is hidden with translation with untranslated description
1194 (use many globy for not failing on changed transaction)
1197 (use many globy for not failing on changed transaction)
1195 $ LANGUAGE=sv hg help debugoptDEP
1198 $ LANGUAGE=sv hg help debugoptDEP
1196 hg debugoptDEP
1199 hg debugoptDEP
1197
1200
1198 (*) (glob)
1201 (*) (glob)
1199
1202
1200 options:
1203 options:
1201
1204
1202 (some details hidden, use --verbose to show complete help)
1205 (some details hidden, use --verbose to show complete help)
1203 #endif
1206 #endif
1204
1207
1205 Test commands that collide with topics (issue4240)
1208 Test commands that collide with topics (issue4240)
1206
1209
1207 $ hg config -hq
1210 $ hg config -hq
1208 hg config [-u] [NAME]...
1211 hg config [-u] [NAME]...
1209
1212
1210 show combined config settings from all hgrc files
1213 show combined config settings from all hgrc files
1211 $ hg showconfig -hq
1214 $ hg showconfig -hq
1212 hg config [-u] [NAME]...
1215 hg config [-u] [NAME]...
1213
1216
1214 show combined config settings from all hgrc files
1217 show combined config settings from all hgrc files
1215
1218
1216 Test a help topic
1219 Test a help topic
1217
1220
1218 $ hg help dates
1221 $ hg help dates
1219 Date Formats
1222 Date Formats
1220 """"""""""""
1223 """"""""""""
1221
1224
1222 Some commands allow the user to specify a date, e.g.:
1225 Some commands allow the user to specify a date, e.g.:
1223
1226
1224 - backout, commit, import, tag: Specify the commit date.
1227 - backout, commit, import, tag: Specify the commit date.
1225 - log, revert, update: Select revision(s) by date.
1228 - log, revert, update: Select revision(s) by date.
1226
1229
1227 Many date formats are valid. Here are some examples:
1230 Many date formats are valid. Here are some examples:
1228
1231
1229 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1232 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1230 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1233 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1231 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1234 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1232 - "Dec 6" (midnight)
1235 - "Dec 6" (midnight)
1233 - "13:18" (today assumed)
1236 - "13:18" (today assumed)
1234 - "3:39" (3:39AM assumed)
1237 - "3:39" (3:39AM assumed)
1235 - "3:39pm" (15:39)
1238 - "3:39pm" (15:39)
1236 - "2006-12-06 13:18:29" (ISO 8601 format)
1239 - "2006-12-06 13:18:29" (ISO 8601 format)
1237 - "2006-12-6 13:18"
1240 - "2006-12-6 13:18"
1238 - "2006-12-6"
1241 - "2006-12-6"
1239 - "12-6"
1242 - "12-6"
1240 - "12/6"
1243 - "12/6"
1241 - "12/6/6" (Dec 6 2006)
1244 - "12/6/6" (Dec 6 2006)
1242 - "today" (midnight)
1245 - "today" (midnight)
1243 - "yesterday" (midnight)
1246 - "yesterday" (midnight)
1244 - "now" - right now
1247 - "now" - right now
1245
1248
1246 Lastly, there is Mercurial's internal format:
1249 Lastly, there is Mercurial's internal format:
1247
1250
1248 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1251 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1249
1252
1250 This is the internal representation format for dates. The first number is
1253 This is the internal representation format for dates. The first number is
1251 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1254 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1252 is the offset of the local timezone, in seconds west of UTC (negative if
1255 is the offset of the local timezone, in seconds west of UTC (negative if
1253 the timezone is east of UTC).
1256 the timezone is east of UTC).
1254
1257
1255 The log command also accepts date ranges:
1258 The log command also accepts date ranges:
1256
1259
1257 - "<DATE" - at or before a given date/time
1260 - "<DATE" - at or before a given date/time
1258 - ">DATE" - on or after a given date/time
1261 - ">DATE" - on or after a given date/time
1259 - "DATE to DATE" - a date range, inclusive
1262 - "DATE to DATE" - a date range, inclusive
1260 - "-DAYS" - within a given number of days of today
1263 - "-DAYS" - within a given number of days of today
1261
1264
1262 Test repeated config section name
1265 Test repeated config section name
1263
1266
1264 $ hg help config.host
1267 $ hg help config.host
1265 "http_proxy.host"
1268 "http_proxy.host"
1266 Host name and (optional) port of the proxy server, for example
1269 Host name and (optional) port of the proxy server, for example
1267 "myproxy:8000".
1270 "myproxy:8000".
1268
1271
1269 "smtp.host"
1272 "smtp.host"
1270 Host name of mail server, e.g. "mail.example.com".
1273 Host name of mail server, e.g. "mail.example.com".
1271
1274
1272 Unrelated trailing paragraphs shouldn't be included
1275 Unrelated trailing paragraphs shouldn't be included
1273
1276
1274 $ hg help config.extramsg | grep '^$'
1277 $ hg help config.extramsg | grep '^$'
1275
1278
1276
1279
1277 Test capitalized section name
1280 Test capitalized section name
1278
1281
1279 $ hg help scripting.HGPLAIN > /dev/null
1282 $ hg help scripting.HGPLAIN > /dev/null
1280
1283
1281 Help subsection:
1284 Help subsection:
1282
1285
1283 $ hg help config.charsets |grep "Email example:" > /dev/null
1286 $ hg help config.charsets |grep "Email example:" > /dev/null
1284 [1]
1287 [1]
1285
1288
1286 Show nested definitions
1289 Show nested definitions
1287 ("profiling.type"[break]"ls"[break]"stat"[break])
1290 ("profiling.type"[break]"ls"[break]"stat"[break])
1288
1291
1289 $ hg help config.type | egrep '^$'|wc -l
1292 $ hg help config.type | egrep '^$'|wc -l
1290 \s*3 (re)
1293 \s*3 (re)
1291
1294
1292 Separate sections from subsections
1295 Separate sections from subsections
1293
1296
1294 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1297 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1295 "format"
1298 "format"
1296 --------
1299 --------
1297
1300
1298 "usegeneraldelta"
1301 "usegeneraldelta"
1299
1302
1300 "dotencode"
1303 "dotencode"
1301
1304
1302 "usefncache"
1305 "usefncache"
1303
1306
1304 "usestore"
1307 "usestore"
1305
1308
1306 "profiling"
1309 "profiling"
1307 -----------
1310 -----------
1308
1311
1309 "format"
1312 "format"
1310
1313
1311 "progress"
1314 "progress"
1312 ----------
1315 ----------
1313
1316
1314 "format"
1317 "format"
1315
1318
1316
1319
1317 Last item in help config.*:
1320 Last item in help config.*:
1318
1321
1319 $ hg help config.`hg help config|grep '^ "'| \
1322 $ hg help config.`hg help config|grep '^ "'| \
1320 > tail -1|sed 's![ "]*!!g'`| \
1323 > tail -1|sed 's![ "]*!!g'`| \
1321 > grep 'hg help -c config' > /dev/null
1324 > grep 'hg help -c config' > /dev/null
1322 [1]
1325 [1]
1323
1326
1324 note to use help -c for general hg help config:
1327 note to use help -c for general hg help config:
1325
1328
1326 $ hg help config |grep 'hg help -c config' > /dev/null
1329 $ hg help config |grep 'hg help -c config' > /dev/null
1327
1330
1328 Test templating help
1331 Test templating help
1329
1332
1330 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1333 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1331 desc String. The text of the changeset description.
1334 desc String. The text of the changeset description.
1332 diffstat String. Statistics of changes with the following format:
1335 diffstat String. Statistics of changes with the following format:
1333 firstline Any text. Returns the first line of text.
1336 firstline Any text. Returns the first line of text.
1334 nonempty Any text. Returns '(none)' if the string is empty.
1337 nonempty Any text. Returns '(none)' if the string is empty.
1335
1338
1336 Test deprecated items
1339 Test deprecated items
1337
1340
1338 $ hg help -v templating | grep currentbookmark
1341 $ hg help -v templating | grep currentbookmark
1339 currentbookmark
1342 currentbookmark
1340 $ hg help templating | (grep currentbookmark || true)
1343 $ hg help templating | (grep currentbookmark || true)
1341
1344
1342 Test help hooks
1345 Test help hooks
1343
1346
1344 $ cat > helphook1.py <<EOF
1347 $ cat > helphook1.py <<EOF
1345 > from mercurial import help
1348 > from mercurial import help
1346 >
1349 >
1347 > def rewrite(ui, topic, doc):
1350 > def rewrite(ui, topic, doc):
1348 > return doc + '\nhelphook1\n'
1351 > return doc + '\nhelphook1\n'
1349 >
1352 >
1350 > def extsetup(ui):
1353 > def extsetup(ui):
1351 > help.addtopichook('revisions', rewrite)
1354 > help.addtopichook('revisions', rewrite)
1352 > EOF
1355 > EOF
1353 $ cat > helphook2.py <<EOF
1356 $ cat > helphook2.py <<EOF
1354 > from mercurial import help
1357 > from mercurial import help
1355 >
1358 >
1356 > def rewrite(ui, topic, doc):
1359 > def rewrite(ui, topic, doc):
1357 > return doc + '\nhelphook2\n'
1360 > return doc + '\nhelphook2\n'
1358 >
1361 >
1359 > def extsetup(ui):
1362 > def extsetup(ui):
1360 > help.addtopichook('revisions', rewrite)
1363 > help.addtopichook('revisions', rewrite)
1361 > EOF
1364 > EOF
1362 $ echo '[extensions]' >> $HGRCPATH
1365 $ echo '[extensions]' >> $HGRCPATH
1363 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1366 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1364 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1367 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1365 $ hg help revsets | grep helphook
1368 $ hg help revsets | grep helphook
1366 helphook1
1369 helphook1
1367 helphook2
1370 helphook2
1368
1371
1369 help -c should only show debug --debug
1372 help -c should only show debug --debug
1370
1373
1371 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1374 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1372 [1]
1375 [1]
1373
1376
1374 help -c should only show deprecated for -v
1377 help -c should only show deprecated for -v
1375
1378
1376 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1379 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1377 [1]
1380 [1]
1378
1381
1379 Test -s / --system
1382 Test -s / --system
1380
1383
1381 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1384 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1382 > wc -l | sed -e 's/ //g'
1385 > wc -l | sed -e 's/ //g'
1383 0
1386 0
1384 $ hg help config.files --system unix | grep 'USER' | \
1387 $ hg help config.files --system unix | grep 'USER' | \
1385 > wc -l | sed -e 's/ //g'
1388 > wc -l | sed -e 's/ //g'
1386 0
1389 0
1387
1390
1388 Test -e / -c / -k combinations
1391 Test -e / -c / -k combinations
1389
1392
1390 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1393 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1391 Commands:
1394 Commands:
1392 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1395 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1393 Extensions:
1396 Extensions:
1394 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1397 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1395 Topics:
1398 Topics:
1396 Commands:
1399 Commands:
1397 Extensions:
1400 Extensions:
1398 Extension Commands:
1401 Extension Commands:
1399 $ hg help -c schemes
1402 $ hg help -c schemes
1400 abort: no such help topic: schemes
1403 abort: no such help topic: schemes
1401 (try 'hg help --keyword schemes')
1404 (try 'hg help --keyword schemes')
1402 [255]
1405 [255]
1403 $ hg help -e schemes |head -1
1406 $ hg help -e schemes |head -1
1404 schemes extension - extend schemes with shortcuts to repository swarms
1407 schemes extension - extend schemes with shortcuts to repository swarms
1405 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1408 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1406 Commands:
1409 Commands:
1407 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1410 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1408 Extensions:
1411 Extensions:
1409 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1412 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1410 Extensions:
1413 Extensions:
1411 Commands:
1414 Commands:
1412 $ hg help -c commit > /dev/null
1415 $ hg help -c commit > /dev/null
1413 $ hg help -e -c commit > /dev/null
1416 $ hg help -e -c commit > /dev/null
1414 $ hg help -e commit > /dev/null
1417 $ hg help -e commit > /dev/null
1415 abort: no such help topic: commit
1418 abort: no such help topic: commit
1416 (try 'hg help --keyword commit')
1419 (try 'hg help --keyword commit')
1417 [255]
1420 [255]
1418
1421
1419 Test keyword search help
1422 Test keyword search help
1420
1423
1421 $ cat > prefixedname.py <<EOF
1424 $ cat > prefixedname.py <<EOF
1422 > '''matched against word "clone"
1425 > '''matched against word "clone"
1423 > '''
1426 > '''
1424 > EOF
1427 > EOF
1425 $ echo '[extensions]' >> $HGRCPATH
1428 $ echo '[extensions]' >> $HGRCPATH
1426 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1429 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1427 $ hg help -k clone
1430 $ hg help -k clone
1428 Topics:
1431 Topics:
1429
1432
1430 config Configuration Files
1433 config Configuration Files
1431 extensions Using Additional Features
1434 extensions Using Additional Features
1432 glossary Glossary
1435 glossary Glossary
1433 phases Working with Phases
1436 phases Working with Phases
1434 subrepos Subrepositories
1437 subrepos Subrepositories
1435 urls URL Paths
1438 urls URL Paths
1436
1439
1437 Commands:
1440 Commands:
1438
1441
1439 bookmarks create a new bookmark or list existing bookmarks
1442 bookmarks create a new bookmark or list existing bookmarks
1440 clone make a copy of an existing repository
1443 clone make a copy of an existing repository
1441 paths show aliases for remote repositories
1444 paths show aliases for remote repositories
1442 update update working directory (or switch revisions)
1445 update update working directory (or switch revisions)
1443
1446
1444 Extensions:
1447 Extensions:
1445
1448
1446 clonebundles advertise pre-generated bundles to seed clones
1449 clonebundles advertise pre-generated bundles to seed clones
1447 prefixedname matched against word "clone"
1450 prefixedname matched against word "clone"
1448 relink recreates hardlinks between repository clones
1451 relink recreates hardlinks between repository clones
1449
1452
1450 Extension Commands:
1453 Extension Commands:
1451
1454
1452 qclone clone main and patch repository at same time
1455 qclone clone main and patch repository at same time
1453
1456
1454 Test unfound topic
1457 Test unfound topic
1455
1458
1456 $ hg help nonexistingtopicthatwillneverexisteverever
1459 $ hg help nonexistingtopicthatwillneverexisteverever
1457 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1460 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1458 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1461 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1459 [255]
1462 [255]
1460
1463
1461 Test unfound keyword
1464 Test unfound keyword
1462
1465
1463 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1466 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1464 abort: no matches
1467 abort: no matches
1465 (try 'hg help' for a list of topics)
1468 (try 'hg help' for a list of topics)
1466 [255]
1469 [255]
1467
1470
1468 Test omit indicating for help
1471 Test omit indicating for help
1469
1472
1470 $ cat > addverboseitems.py <<EOF
1473 $ cat > addverboseitems.py <<EOF
1471 > '''extension to test omit indicating.
1474 > '''extension to test omit indicating.
1472 >
1475 >
1473 > This paragraph is never omitted (for extension)
1476 > This paragraph is never omitted (for extension)
1474 >
1477 >
1475 > .. container:: verbose
1478 > .. container:: verbose
1476 >
1479 >
1477 > This paragraph is omitted,
1480 > This paragraph is omitted,
1478 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1481 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1479 >
1482 >
1480 > This paragraph is never omitted, too (for extension)
1483 > This paragraph is never omitted, too (for extension)
1481 > '''
1484 > '''
1482 >
1485 >
1483 > from mercurial import help, commands
1486 > from mercurial import help, commands
1484 > testtopic = """This paragraph is never omitted (for topic).
1487 > testtopic = """This paragraph is never omitted (for topic).
1485 >
1488 >
1486 > .. container:: verbose
1489 > .. container:: verbose
1487 >
1490 >
1488 > This paragraph is omitted,
1491 > This paragraph is omitted,
1489 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1492 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1490 >
1493 >
1491 > This paragraph is never omitted, too (for topic)
1494 > This paragraph is never omitted, too (for topic)
1492 > """
1495 > """
1493 > def extsetup(ui):
1496 > def extsetup(ui):
1494 > help.helptable.append((["topic-containing-verbose"],
1497 > help.helptable.append((["topic-containing-verbose"],
1495 > "This is the topic to test omit indicating.",
1498 > "This is the topic to test omit indicating.",
1496 > lambda ui: testtopic))
1499 > lambda ui: testtopic))
1497 > EOF
1500 > EOF
1498 $ echo '[extensions]' >> $HGRCPATH
1501 $ echo '[extensions]' >> $HGRCPATH
1499 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1502 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1500 $ hg help addverboseitems
1503 $ hg help addverboseitems
1501 addverboseitems extension - extension to test omit indicating.
1504 addverboseitems extension - extension to test omit indicating.
1502
1505
1503 This paragraph is never omitted (for extension)
1506 This paragraph is never omitted (for extension)
1504
1507
1505 This paragraph is never omitted, too (for extension)
1508 This paragraph is never omitted, too (for extension)
1506
1509
1507 (some details hidden, use --verbose to show complete help)
1510 (some details hidden, use --verbose to show complete help)
1508
1511
1509 no commands defined
1512 no commands defined
1510 $ hg help -v addverboseitems
1513 $ hg help -v addverboseitems
1511 addverboseitems extension - extension to test omit indicating.
1514 addverboseitems extension - extension to test omit indicating.
1512
1515
1513 This paragraph is never omitted (for extension)
1516 This paragraph is never omitted (for extension)
1514
1517
1515 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1518 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1516 extension)
1519 extension)
1517
1520
1518 This paragraph is never omitted, too (for extension)
1521 This paragraph is never omitted, too (for extension)
1519
1522
1520 no commands defined
1523 no commands defined
1521 $ hg help topic-containing-verbose
1524 $ hg help topic-containing-verbose
1522 This is the topic to test omit indicating.
1525 This is the topic to test omit indicating.
1523 """"""""""""""""""""""""""""""""""""""""""
1526 """"""""""""""""""""""""""""""""""""""""""
1524
1527
1525 This paragraph is never omitted (for topic).
1528 This paragraph is never omitted (for topic).
1526
1529
1527 This paragraph is never omitted, too (for topic)
1530 This paragraph is never omitted, too (for topic)
1528
1531
1529 (some details hidden, use --verbose to show complete help)
1532 (some details hidden, use --verbose to show complete help)
1530 $ hg help -v topic-containing-verbose
1533 $ hg help -v topic-containing-verbose
1531 This is the topic to test omit indicating.
1534 This is the topic to test omit indicating.
1532 """"""""""""""""""""""""""""""""""""""""""
1535 """"""""""""""""""""""""""""""""""""""""""
1533
1536
1534 This paragraph is never omitted (for topic).
1537 This paragraph is never omitted (for topic).
1535
1538
1536 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1539 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1537 topic)
1540 topic)
1538
1541
1539 This paragraph is never omitted, too (for topic)
1542 This paragraph is never omitted, too (for topic)
1540
1543
1541 Test section lookup
1544 Test section lookup
1542
1545
1543 $ hg help revset.merge
1546 $ hg help revset.merge
1544 "merge()"
1547 "merge()"
1545 Changeset is a merge changeset.
1548 Changeset is a merge changeset.
1546
1549
1547 $ hg help glossary.dag
1550 $ hg help glossary.dag
1548 DAG
1551 DAG
1549 The repository of changesets of a distributed version control system
1552 The repository of changesets of a distributed version control system
1550 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1553 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1551 of nodes and edges, where nodes correspond to changesets and edges
1554 of nodes and edges, where nodes correspond to changesets and edges
1552 imply a parent -> child relation. This graph can be visualized by
1555 imply a parent -> child relation. This graph can be visualized by
1553 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1556 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1554 limited by the requirement for children to have at most two parents.
1557 limited by the requirement for children to have at most two parents.
1555
1558
1556
1559
1557 $ hg help hgrc.paths
1560 $ hg help hgrc.paths
1558 "paths"
1561 "paths"
1559 -------
1562 -------
1560
1563
1561 Assigns symbolic names and behavior to repositories.
1564 Assigns symbolic names and behavior to repositories.
1562
1565
1563 Options are symbolic names defining the URL or directory that is the
1566 Options are symbolic names defining the URL or directory that is the
1564 location of the repository. Example:
1567 location of the repository. Example:
1565
1568
1566 [paths]
1569 [paths]
1567 my_server = https://example.com/my_repo
1570 my_server = https://example.com/my_repo
1568 local_path = /home/me/repo
1571 local_path = /home/me/repo
1569
1572
1570 These symbolic names can be used from the command line. To pull from
1573 These symbolic names can be used from the command line. To pull from
1571 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1574 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1572 local_path'.
1575 local_path'.
1573
1576
1574 Options containing colons (":") denote sub-options that can influence
1577 Options containing colons (":") denote sub-options that can influence
1575 behavior for that specific path. Example:
1578 behavior for that specific path. Example:
1576
1579
1577 [paths]
1580 [paths]
1578 my_server = https://example.com/my_path
1581 my_server = https://example.com/my_path
1579 my_server:pushurl = ssh://example.com/my_path
1582 my_server:pushurl = ssh://example.com/my_path
1580
1583
1581 The following sub-options can be defined:
1584 The following sub-options can be defined:
1582
1585
1583 "pushurl"
1586 "pushurl"
1584 The URL to use for push operations. If not defined, the location
1587 The URL to use for push operations. If not defined, the location
1585 defined by the path's main entry is used.
1588 defined by the path's main entry is used.
1586
1589
1587 "pushrev"
1590 "pushrev"
1588 A revset defining which revisions to push by default.
1591 A revset defining which revisions to push by default.
1589
1592
1590 When 'hg push' is executed without a "-r" argument, the revset defined
1593 When 'hg push' is executed without a "-r" argument, the revset defined
1591 by this sub-option is evaluated to determine what to push.
1594 by this sub-option is evaluated to determine what to push.
1592
1595
1593 For example, a value of "." will push the working directory's revision
1596 For example, a value of "." will push the working directory's revision
1594 by default.
1597 by default.
1595
1598
1596 Revsets specifying bookmarks will not result in the bookmark being
1599 Revsets specifying bookmarks will not result in the bookmark being
1597 pushed.
1600 pushed.
1598
1601
1599 The following special named paths exist:
1602 The following special named paths exist:
1600
1603
1601 "default"
1604 "default"
1602 The URL or directory to use when no source or remote is specified.
1605 The URL or directory to use when no source or remote is specified.
1603
1606
1604 'hg clone' will automatically define this path to the location the
1607 'hg clone' will automatically define this path to the location the
1605 repository was cloned from.
1608 repository was cloned from.
1606
1609
1607 "default-push"
1610 "default-push"
1608 (deprecated) The URL or directory for the default 'hg push' location.
1611 (deprecated) The URL or directory for the default 'hg push' location.
1609 "default:pushurl" should be used instead.
1612 "default:pushurl" should be used instead.
1610
1613
1611 $ hg help glossary.mcguffin
1614 $ hg help glossary.mcguffin
1612 abort: help section not found: glossary.mcguffin
1615 abort: help section not found: glossary.mcguffin
1613 [255]
1616 [255]
1614
1617
1615 $ hg help glossary.mc.guffin
1618 $ hg help glossary.mc.guffin
1616 abort: help section not found: glossary.mc.guffin
1619 abort: help section not found: glossary.mc.guffin
1617 [255]
1620 [255]
1618
1621
1619 $ hg help template.files
1622 $ hg help template.files
1620 files List of strings. All files modified, added, or removed by
1623 files List of strings. All files modified, added, or removed by
1621 this changeset.
1624 this changeset.
1622 files(pattern)
1625 files(pattern)
1623 All files of the current changeset matching the pattern. See
1626 All files of the current changeset matching the pattern. See
1624 'hg help patterns'.
1627 'hg help patterns'.
1625
1628
1626 Test section lookup by translated message
1629 Test section lookup by translated message
1627
1630
1628 str.lower() instead of encoding.lower(str) on translated message might
1631 str.lower() instead of encoding.lower(str) on translated message might
1629 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1632 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1630 as the second or later byte of multi-byte character.
1633 as the second or later byte of multi-byte character.
1631
1634
1632 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1635 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1633 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1636 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1634 replacement makes message meaningless.
1637 replacement makes message meaningless.
1635
1638
1636 This tests that section lookup by translated string isn't broken by
1639 This tests that section lookup by translated string isn't broken by
1637 such str.lower().
1640 such str.lower().
1638
1641
1639 $ python <<EOF
1642 $ python <<EOF
1640 > def escape(s):
1643 > def escape(s):
1641 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1644 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1642 > # translation of "record" in ja_JP.cp932
1645 > # translation of "record" in ja_JP.cp932
1643 > upper = "\x8bL\x98^"
1646 > upper = "\x8bL\x98^"
1644 > # str.lower()-ed section name should be treated as different one
1647 > # str.lower()-ed section name should be treated as different one
1645 > lower = "\x8bl\x98^"
1648 > lower = "\x8bl\x98^"
1646 > with open('ambiguous.py', 'w') as fp:
1649 > with open('ambiguous.py', 'w') as fp:
1647 > fp.write("""# ambiguous section names in ja_JP.cp932
1650 > fp.write("""# ambiguous section names in ja_JP.cp932
1648 > u'''summary of extension
1651 > u'''summary of extension
1649 >
1652 >
1650 > %s
1653 > %s
1651 > ----
1654 > ----
1652 >
1655 >
1653 > Upper name should show only this message
1656 > Upper name should show only this message
1654 >
1657 >
1655 > %s
1658 > %s
1656 > ----
1659 > ----
1657 >
1660 >
1658 > Lower name should show only this message
1661 > Lower name should show only this message
1659 >
1662 >
1660 > subsequent section
1663 > subsequent section
1661 > ------------------
1664 > ------------------
1662 >
1665 >
1663 > This should be hidden at 'hg help ambiguous' with section name.
1666 > This should be hidden at 'hg help ambiguous' with section name.
1664 > '''
1667 > '''
1665 > """ % (escape(upper), escape(lower)))
1668 > """ % (escape(upper), escape(lower)))
1666 > EOF
1669 > EOF
1667
1670
1668 $ cat >> $HGRCPATH <<EOF
1671 $ cat >> $HGRCPATH <<EOF
1669 > [extensions]
1672 > [extensions]
1670 > ambiguous = ./ambiguous.py
1673 > ambiguous = ./ambiguous.py
1671 > EOF
1674 > EOF
1672
1675
1673 $ python <<EOF | sh
1676 $ python <<EOF | sh
1674 > upper = "\x8bL\x98^"
1677 > upper = "\x8bL\x98^"
1675 > print "hg --encoding cp932 help -e ambiguous.%s" % upper
1678 > print "hg --encoding cp932 help -e ambiguous.%s" % upper
1676 > EOF
1679 > EOF
1677 \x8bL\x98^ (esc)
1680 \x8bL\x98^ (esc)
1678 ----
1681 ----
1679
1682
1680 Upper name should show only this message
1683 Upper name should show only this message
1681
1684
1682
1685
1683 $ python <<EOF | sh
1686 $ python <<EOF | sh
1684 > lower = "\x8bl\x98^"
1687 > lower = "\x8bl\x98^"
1685 > print "hg --encoding cp932 help -e ambiguous.%s" % lower
1688 > print "hg --encoding cp932 help -e ambiguous.%s" % lower
1686 > EOF
1689 > EOF
1687 \x8bl\x98^ (esc)
1690 \x8bl\x98^ (esc)
1688 ----
1691 ----
1689
1692
1690 Lower name should show only this message
1693 Lower name should show only this message
1691
1694
1692
1695
1693 $ cat >> $HGRCPATH <<EOF
1696 $ cat >> $HGRCPATH <<EOF
1694 > [extensions]
1697 > [extensions]
1695 > ambiguous = !
1698 > ambiguous = !
1696 > EOF
1699 > EOF
1697
1700
1698 Show help content of disabled extensions
1701 Show help content of disabled extensions
1699
1702
1700 $ cat >> $HGRCPATH <<EOF
1703 $ cat >> $HGRCPATH <<EOF
1701 > [extensions]
1704 > [extensions]
1702 > ambiguous = !./ambiguous.py
1705 > ambiguous = !./ambiguous.py
1703 > EOF
1706 > EOF
1704 $ hg help -e ambiguous
1707 $ hg help -e ambiguous
1705 ambiguous extension - (no help text available)
1708 ambiguous extension - (no help text available)
1706
1709
1707 (use 'hg help extensions' for information on enabling extensions)
1710 (use 'hg help extensions' for information on enabling extensions)
1708
1711
1709 Test dynamic list of merge tools only shows up once
1712 Test dynamic list of merge tools only shows up once
1710 $ hg help merge-tools
1713 $ hg help merge-tools
1711 Merge Tools
1714 Merge Tools
1712 """""""""""
1715 """""""""""
1713
1716
1714 To merge files Mercurial uses merge tools.
1717 To merge files Mercurial uses merge tools.
1715
1718
1716 A merge tool combines two different versions of a file into a merged file.
1719 A merge tool combines two different versions of a file into a merged file.
1717 Merge tools are given the two files and the greatest common ancestor of
1720 Merge tools are given the two files and the greatest common ancestor of
1718 the two file versions, so they can determine the changes made on both
1721 the two file versions, so they can determine the changes made on both
1719 branches.
1722 branches.
1720
1723
1721 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1724 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1722 backout' and in several extensions.
1725 backout' and in several extensions.
1723
1726
1724 Usually, the merge tool tries to automatically reconcile the files by
1727 Usually, the merge tool tries to automatically reconcile the files by
1725 combining all non-overlapping changes that occurred separately in the two
1728 combining all non-overlapping changes that occurred separately in the two
1726 different evolutions of the same initial base file. Furthermore, some
1729 different evolutions of the same initial base file. Furthermore, some
1727 interactive merge programs make it easier to manually resolve conflicting
1730 interactive merge programs make it easier to manually resolve conflicting
1728 merges, either in a graphical way, or by inserting some conflict markers.
1731 merges, either in a graphical way, or by inserting some conflict markers.
1729 Mercurial does not include any interactive merge programs but relies on
1732 Mercurial does not include any interactive merge programs but relies on
1730 external tools for that.
1733 external tools for that.
1731
1734
1732 Available merge tools
1735 Available merge tools
1733 =====================
1736 =====================
1734
1737
1735 External merge tools and their properties are configured in the merge-
1738 External merge tools and their properties are configured in the merge-
1736 tools configuration section - see hgrc(5) - but they can often just be
1739 tools configuration section - see hgrc(5) - but they can often just be
1737 named by their executable.
1740 named by their executable.
1738
1741
1739 A merge tool is generally usable if its executable can be found on the
1742 A merge tool is generally usable if its executable can be found on the
1740 system and if it can handle the merge. The executable is found if it is an
1743 system and if it can handle the merge. The executable is found if it is an
1741 absolute or relative executable path or the name of an application in the
1744 absolute or relative executable path or the name of an application in the
1742 executable search path. The tool is assumed to be able to handle the merge
1745 executable search path. The tool is assumed to be able to handle the merge
1743 if it can handle symlinks if the file is a symlink, if it can handle
1746 if it can handle symlinks if the file is a symlink, if it can handle
1744 binary files if the file is binary, and if a GUI is available if the tool
1747 binary files if the file is binary, and if a GUI is available if the tool
1745 requires a GUI.
1748 requires a GUI.
1746
1749
1747 There are some internal merge tools which can be used. The internal merge
1750 There are some internal merge tools which can be used. The internal merge
1748 tools are:
1751 tools are:
1749
1752
1750 ":dump"
1753 ":dump"
1751 Creates three versions of the files to merge, containing the contents of
1754 Creates three versions of the files to merge, containing the contents of
1752 local, other and base. These files can then be used to perform a merge
1755 local, other and base. These files can then be used to perform a merge
1753 manually. If the file to be merged is named "a.txt", these files will
1756 manually. If the file to be merged is named "a.txt", these files will
1754 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1757 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1755 they will be placed in the same directory as "a.txt".
1758 they will be placed in the same directory as "a.txt".
1756
1759
1757 ":fail"
1760 ":fail"
1758 Rather than attempting to merge files that were modified on both
1761 Rather than attempting to merge files that were modified on both
1759 branches, it marks them as unresolved. The resolve command must be used
1762 branches, it marks them as unresolved. The resolve command must be used
1760 to resolve these conflicts.
1763 to resolve these conflicts.
1761
1764
1762 ":local"
1765 ":local"
1763 Uses the local 'p1()' version of files as the merged version.
1766 Uses the local 'p1()' version of files as the merged version.
1764
1767
1765 ":merge"
1768 ":merge"
1766 Uses the internal non-interactive simple merge algorithm for merging
1769 Uses the internal non-interactive simple merge algorithm for merging
1767 files. It will fail if there are any conflicts and leave markers in the
1770 files. It will fail if there are any conflicts and leave markers in the
1768 partially merged file. Markers will have two sections, one for each side
1771 partially merged file. Markers will have two sections, one for each side
1769 of merge.
1772 of merge.
1770
1773
1771 ":merge-local"
1774 ":merge-local"
1772 Like :merge, but resolve all conflicts non-interactively in favor of the
1775 Like :merge, but resolve all conflicts non-interactively in favor of the
1773 local 'p1()' changes.
1776 local 'p1()' changes.
1774
1777
1775 ":merge-other"
1778 ":merge-other"
1776 Like :merge, but resolve all conflicts non-interactively in favor of the
1779 Like :merge, but resolve all conflicts non-interactively in favor of the
1777 other 'p2()' changes.
1780 other 'p2()' changes.
1778
1781
1779 ":merge3"
1782 ":merge3"
1780 Uses the internal non-interactive simple merge algorithm for merging
1783 Uses the internal non-interactive simple merge algorithm for merging
1781 files. It will fail if there are any conflicts and leave markers in the
1784 files. It will fail if there are any conflicts and leave markers in the
1782 partially merged file. Marker will have three sections, one from each
1785 partially merged file. Marker will have three sections, one from each
1783 side of the merge and one for the base content.
1786 side of the merge and one for the base content.
1784
1787
1785 ":other"
1788 ":other"
1786 Uses the other 'p2()' version of files as the merged version.
1789 Uses the other 'p2()' version of files as the merged version.
1787
1790
1788 ":prompt"
1791 ":prompt"
1789 Asks the user which of the local 'p1()' or the other 'p2()' version to
1792 Asks the user which of the local 'p1()' or the other 'p2()' version to
1790 keep as the merged version.
1793 keep as the merged version.
1791
1794
1792 ":tagmerge"
1795 ":tagmerge"
1793 Uses the internal tag merge algorithm (experimental).
1796 Uses the internal tag merge algorithm (experimental).
1794
1797
1795 ":union"
1798 ":union"
1796 Uses the internal non-interactive simple merge algorithm for merging
1799 Uses the internal non-interactive simple merge algorithm for merging
1797 files. It will use both left and right sides for conflict regions. No
1800 files. It will use both left and right sides for conflict regions. No
1798 markers are inserted.
1801 markers are inserted.
1799
1802
1800 Internal tools are always available and do not require a GUI but will by
1803 Internal tools are always available and do not require a GUI but will by
1801 default not handle symlinks or binary files.
1804 default not handle symlinks or binary files.
1802
1805
1803 Choosing a merge tool
1806 Choosing a merge tool
1804 =====================
1807 =====================
1805
1808
1806 Mercurial uses these rules when deciding which merge tool to use:
1809 Mercurial uses these rules when deciding which merge tool to use:
1807
1810
1808 1. If a tool has been specified with the --tool option to merge or
1811 1. If a tool has been specified with the --tool option to merge or
1809 resolve, it is used. If it is the name of a tool in the merge-tools
1812 resolve, it is used. If it is the name of a tool in the merge-tools
1810 configuration, its configuration is used. Otherwise the specified tool
1813 configuration, its configuration is used. Otherwise the specified tool
1811 must be executable by the shell.
1814 must be executable by the shell.
1812 2. If the "HGMERGE" environment variable is present, its value is used and
1815 2. If the "HGMERGE" environment variable is present, its value is used and
1813 must be executable by the shell.
1816 must be executable by the shell.
1814 3. If the filename of the file to be merged matches any of the patterns in
1817 3. If the filename of the file to be merged matches any of the patterns in
1815 the merge-patterns configuration section, the first usable merge tool
1818 the merge-patterns configuration section, the first usable merge tool
1816 corresponding to a matching pattern is used. Here, binary capabilities
1819 corresponding to a matching pattern is used. Here, binary capabilities
1817 of the merge tool are not considered.
1820 of the merge tool are not considered.
1818 4. If ui.merge is set it will be considered next. If the value is not the
1821 4. If ui.merge is set it will be considered next. If the value is not the
1819 name of a configured tool, the specified value is used and must be
1822 name of a configured tool, the specified value is used and must be
1820 executable by the shell. Otherwise the named tool is used if it is
1823 executable by the shell. Otherwise the named tool is used if it is
1821 usable.
1824 usable.
1822 5. If any usable merge tools are present in the merge-tools configuration
1825 5. If any usable merge tools are present in the merge-tools configuration
1823 section, the one with the highest priority is used.
1826 section, the one with the highest priority is used.
1824 6. If a program named "hgmerge" can be found on the system, it is used -
1827 6. If a program named "hgmerge" can be found on the system, it is used -
1825 but it will by default not be used for symlinks and binary files.
1828 but it will by default not be used for symlinks and binary files.
1826 7. If the file to be merged is not binary and is not a symlink, then
1829 7. If the file to be merged is not binary and is not a symlink, then
1827 internal ":merge" is used.
1830 internal ":merge" is used.
1828 8. The merge of the file fails and must be resolved before commit.
1831 8. The merge of the file fails and must be resolved before commit.
1829
1832
1830 Note:
1833 Note:
1831 After selecting a merge program, Mercurial will by default attempt to
1834 After selecting a merge program, Mercurial will by default attempt to
1832 merge the files using a simple merge algorithm first. Only if it
1835 merge the files using a simple merge algorithm first. Only if it
1833 doesn't succeed because of conflicting changes Mercurial will actually
1836 doesn't succeed because of conflicting changes Mercurial will actually
1834 execute the merge program. Whether to use the simple merge algorithm
1837 execute the merge program. Whether to use the simple merge algorithm
1835 first can be controlled by the premerge setting of the merge tool.
1838 first can be controlled by the premerge setting of the merge tool.
1836 Premerge is enabled by default unless the file is binary or a symlink.
1839 Premerge is enabled by default unless the file is binary or a symlink.
1837
1840
1838 See the merge-tools and ui sections of hgrc(5) for details on the
1841 See the merge-tools and ui sections of hgrc(5) for details on the
1839 configuration of merge tools.
1842 configuration of merge tools.
1840
1843
1844 Compression engines listed in `hg help bundlespec`
1845
1846 $ hg help bundlespec | grep gzip
1847 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1848 An algorithm that produces smaller bundles than "gzip".
1849 This engine will likely produce smaller bundles than "gzip" but will be
1850 "gzip"
1851 better compression than "gzip". It also frequently yields better
1852
1841 Test usage of section marks in help documents
1853 Test usage of section marks in help documents
1842
1854
1843 $ cd "$TESTDIR"/../doc
1855 $ cd "$TESTDIR"/../doc
1844 $ python check-seclevel.py
1856 $ python check-seclevel.py
1845 $ cd $TESTTMP
1857 $ cd $TESTTMP
1846
1858
1847 #if serve
1859 #if serve
1848
1860
1849 Test the help pages in hgweb.
1861 Test the help pages in hgweb.
1850
1862
1851 Dish up an empty repo; serve it cold.
1863 Dish up an empty repo; serve it cold.
1852
1864
1853 $ hg init "$TESTTMP/test"
1865 $ hg init "$TESTTMP/test"
1854 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1866 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1855 $ cat hg.pid >> $DAEMON_PIDS
1867 $ cat hg.pid >> $DAEMON_PIDS
1856
1868
1857 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1869 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1858 200 Script output follows
1870 200 Script output follows
1859
1871
1860 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1872 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1861 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1873 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1862 <head>
1874 <head>
1863 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1875 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1864 <meta name="robots" content="index, nofollow" />
1876 <meta name="robots" content="index, nofollow" />
1865 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1877 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1866 <script type="text/javascript" src="/static/mercurial.js"></script>
1878 <script type="text/javascript" src="/static/mercurial.js"></script>
1867
1879
1868 <title>Help: Index</title>
1880 <title>Help: Index</title>
1869 </head>
1881 </head>
1870 <body>
1882 <body>
1871
1883
1872 <div class="container">
1884 <div class="container">
1873 <div class="menu">
1885 <div class="menu">
1874 <div class="logo">
1886 <div class="logo">
1875 <a href="https://mercurial-scm.org/">
1887 <a href="https://mercurial-scm.org/">
1876 <img src="/static/hglogo.png" alt="mercurial" /></a>
1888 <img src="/static/hglogo.png" alt="mercurial" /></a>
1877 </div>
1889 </div>
1878 <ul>
1890 <ul>
1879 <li><a href="/shortlog">log</a></li>
1891 <li><a href="/shortlog">log</a></li>
1880 <li><a href="/graph">graph</a></li>
1892 <li><a href="/graph">graph</a></li>
1881 <li><a href="/tags">tags</a></li>
1893 <li><a href="/tags">tags</a></li>
1882 <li><a href="/bookmarks">bookmarks</a></li>
1894 <li><a href="/bookmarks">bookmarks</a></li>
1883 <li><a href="/branches">branches</a></li>
1895 <li><a href="/branches">branches</a></li>
1884 </ul>
1896 </ul>
1885 <ul>
1897 <ul>
1886 <li class="active">help</li>
1898 <li class="active">help</li>
1887 </ul>
1899 </ul>
1888 </div>
1900 </div>
1889
1901
1890 <div class="main">
1902 <div class="main">
1891 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1903 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1892 <form class="search" action="/log">
1904 <form class="search" action="/log">
1893
1905
1894 <p><input name="rev" id="search1" type="text" size="30" /></p>
1906 <p><input name="rev" id="search1" type="text" size="30" /></p>
1895 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1907 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1896 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1908 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1897 </form>
1909 </form>
1898 <table class="bigtable">
1910 <table class="bigtable">
1899 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1911 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1900
1912
1901 <tr><td>
1913 <tr><td>
1914 <a href="/help/bundlespec">
1915 bundlespec
1916 </a>
1917 </td><td>
1918 Bundle File Formats
1919 </td></tr>
1920 <tr><td>
1902 <a href="/help/color">
1921 <a href="/help/color">
1903 color
1922 color
1904 </a>
1923 </a>
1905 </td><td>
1924 </td><td>
1906 Colorizing Outputs
1925 Colorizing Outputs
1907 </td></tr>
1926 </td></tr>
1908 <tr><td>
1927 <tr><td>
1909 <a href="/help/config">
1928 <a href="/help/config">
1910 config
1929 config
1911 </a>
1930 </a>
1912 </td><td>
1931 </td><td>
1913 Configuration Files
1932 Configuration Files
1914 </td></tr>
1933 </td></tr>
1915 <tr><td>
1934 <tr><td>
1916 <a href="/help/dates">
1935 <a href="/help/dates">
1917 dates
1936 dates
1918 </a>
1937 </a>
1919 </td><td>
1938 </td><td>
1920 Date Formats
1939 Date Formats
1921 </td></tr>
1940 </td></tr>
1922 <tr><td>
1941 <tr><td>
1923 <a href="/help/diffs">
1942 <a href="/help/diffs">
1924 diffs
1943 diffs
1925 </a>
1944 </a>
1926 </td><td>
1945 </td><td>
1927 Diff Formats
1946 Diff Formats
1928 </td></tr>
1947 </td></tr>
1929 <tr><td>
1948 <tr><td>
1930 <a href="/help/environment">
1949 <a href="/help/environment">
1931 environment
1950 environment
1932 </a>
1951 </a>
1933 </td><td>
1952 </td><td>
1934 Environment Variables
1953 Environment Variables
1935 </td></tr>
1954 </td></tr>
1936 <tr><td>
1955 <tr><td>
1937 <a href="/help/extensions">
1956 <a href="/help/extensions">
1938 extensions
1957 extensions
1939 </a>
1958 </a>
1940 </td><td>
1959 </td><td>
1941 Using Additional Features
1960 Using Additional Features
1942 </td></tr>
1961 </td></tr>
1943 <tr><td>
1962 <tr><td>
1944 <a href="/help/filesets">
1963 <a href="/help/filesets">
1945 filesets
1964 filesets
1946 </a>
1965 </a>
1947 </td><td>
1966 </td><td>
1948 Specifying File Sets
1967 Specifying File Sets
1949 </td></tr>
1968 </td></tr>
1950 <tr><td>
1969 <tr><td>
1951 <a href="/help/glossary">
1970 <a href="/help/glossary">
1952 glossary
1971 glossary
1953 </a>
1972 </a>
1954 </td><td>
1973 </td><td>
1955 Glossary
1974 Glossary
1956 </td></tr>
1975 </td></tr>
1957 <tr><td>
1976 <tr><td>
1958 <a href="/help/hgignore">
1977 <a href="/help/hgignore">
1959 hgignore
1978 hgignore
1960 </a>
1979 </a>
1961 </td><td>
1980 </td><td>
1962 Syntax for Mercurial Ignore Files
1981 Syntax for Mercurial Ignore Files
1963 </td></tr>
1982 </td></tr>
1964 <tr><td>
1983 <tr><td>
1965 <a href="/help/hgweb">
1984 <a href="/help/hgweb">
1966 hgweb
1985 hgweb
1967 </a>
1986 </a>
1968 </td><td>
1987 </td><td>
1969 Configuring hgweb
1988 Configuring hgweb
1970 </td></tr>
1989 </td></tr>
1971 <tr><td>
1990 <tr><td>
1972 <a href="/help/internals">
1991 <a href="/help/internals">
1973 internals
1992 internals
1974 </a>
1993 </a>
1975 </td><td>
1994 </td><td>
1976 Technical implementation topics
1995 Technical implementation topics
1977 </td></tr>
1996 </td></tr>
1978 <tr><td>
1997 <tr><td>
1979 <a href="/help/merge-tools">
1998 <a href="/help/merge-tools">
1980 merge-tools
1999 merge-tools
1981 </a>
2000 </a>
1982 </td><td>
2001 </td><td>
1983 Merge Tools
2002 Merge Tools
1984 </td></tr>
2003 </td></tr>
1985 <tr><td>
2004 <tr><td>
1986 <a href="/help/pager">
2005 <a href="/help/pager">
1987 pager
2006 pager
1988 </a>
2007 </a>
1989 </td><td>
2008 </td><td>
1990 Pager Support
2009 Pager Support
1991 </td></tr>
2010 </td></tr>
1992 <tr><td>
2011 <tr><td>
1993 <a href="/help/patterns">
2012 <a href="/help/patterns">
1994 patterns
2013 patterns
1995 </a>
2014 </a>
1996 </td><td>
2015 </td><td>
1997 File Name Patterns
2016 File Name Patterns
1998 </td></tr>
2017 </td></tr>
1999 <tr><td>
2018 <tr><td>
2000 <a href="/help/phases">
2019 <a href="/help/phases">
2001 phases
2020 phases
2002 </a>
2021 </a>
2003 </td><td>
2022 </td><td>
2004 Working with Phases
2023 Working with Phases
2005 </td></tr>
2024 </td></tr>
2006 <tr><td>
2025 <tr><td>
2007 <a href="/help/revisions">
2026 <a href="/help/revisions">
2008 revisions
2027 revisions
2009 </a>
2028 </a>
2010 </td><td>
2029 </td><td>
2011 Specifying Revisions
2030 Specifying Revisions
2012 </td></tr>
2031 </td></tr>
2013 <tr><td>
2032 <tr><td>
2014 <a href="/help/scripting">
2033 <a href="/help/scripting">
2015 scripting
2034 scripting
2016 </a>
2035 </a>
2017 </td><td>
2036 </td><td>
2018 Using Mercurial from scripts and automation
2037 Using Mercurial from scripts and automation
2019 </td></tr>
2038 </td></tr>
2020 <tr><td>
2039 <tr><td>
2021 <a href="/help/subrepos">
2040 <a href="/help/subrepos">
2022 subrepos
2041 subrepos
2023 </a>
2042 </a>
2024 </td><td>
2043 </td><td>
2025 Subrepositories
2044 Subrepositories
2026 </td></tr>
2045 </td></tr>
2027 <tr><td>
2046 <tr><td>
2028 <a href="/help/templating">
2047 <a href="/help/templating">
2029 templating
2048 templating
2030 </a>
2049 </a>
2031 </td><td>
2050 </td><td>
2032 Template Usage
2051 Template Usage
2033 </td></tr>
2052 </td></tr>
2034 <tr><td>
2053 <tr><td>
2035 <a href="/help/urls">
2054 <a href="/help/urls">
2036 urls
2055 urls
2037 </a>
2056 </a>
2038 </td><td>
2057 </td><td>
2039 URL Paths
2058 URL Paths
2040 </td></tr>
2059 </td></tr>
2041 <tr><td>
2060 <tr><td>
2042 <a href="/help/topic-containing-verbose">
2061 <a href="/help/topic-containing-verbose">
2043 topic-containing-verbose
2062 topic-containing-verbose
2044 </a>
2063 </a>
2045 </td><td>
2064 </td><td>
2046 This is the topic to test omit indicating.
2065 This is the topic to test omit indicating.
2047 </td></tr>
2066 </td></tr>
2048
2067
2049
2068
2050 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2069 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2051
2070
2052 <tr><td>
2071 <tr><td>
2053 <a href="/help/add">
2072 <a href="/help/add">
2054 add
2073 add
2055 </a>
2074 </a>
2056 </td><td>
2075 </td><td>
2057 add the specified files on the next commit
2076 add the specified files on the next commit
2058 </td></tr>
2077 </td></tr>
2059 <tr><td>
2078 <tr><td>
2060 <a href="/help/annotate">
2079 <a href="/help/annotate">
2061 annotate
2080 annotate
2062 </a>
2081 </a>
2063 </td><td>
2082 </td><td>
2064 show changeset information by line for each file
2083 show changeset information by line for each file
2065 </td></tr>
2084 </td></tr>
2066 <tr><td>
2085 <tr><td>
2067 <a href="/help/clone">
2086 <a href="/help/clone">
2068 clone
2087 clone
2069 </a>
2088 </a>
2070 </td><td>
2089 </td><td>
2071 make a copy of an existing repository
2090 make a copy of an existing repository
2072 </td></tr>
2091 </td></tr>
2073 <tr><td>
2092 <tr><td>
2074 <a href="/help/commit">
2093 <a href="/help/commit">
2075 commit
2094 commit
2076 </a>
2095 </a>
2077 </td><td>
2096 </td><td>
2078 commit the specified files or all outstanding changes
2097 commit the specified files or all outstanding changes
2079 </td></tr>
2098 </td></tr>
2080 <tr><td>
2099 <tr><td>
2081 <a href="/help/diff">
2100 <a href="/help/diff">
2082 diff
2101 diff
2083 </a>
2102 </a>
2084 </td><td>
2103 </td><td>
2085 diff repository (or selected files)
2104 diff repository (or selected files)
2086 </td></tr>
2105 </td></tr>
2087 <tr><td>
2106 <tr><td>
2088 <a href="/help/export">
2107 <a href="/help/export">
2089 export
2108 export
2090 </a>
2109 </a>
2091 </td><td>
2110 </td><td>
2092 dump the header and diffs for one or more changesets
2111 dump the header and diffs for one or more changesets
2093 </td></tr>
2112 </td></tr>
2094 <tr><td>
2113 <tr><td>
2095 <a href="/help/forget">
2114 <a href="/help/forget">
2096 forget
2115 forget
2097 </a>
2116 </a>
2098 </td><td>
2117 </td><td>
2099 forget the specified files on the next commit
2118 forget the specified files on the next commit
2100 </td></tr>
2119 </td></tr>
2101 <tr><td>
2120 <tr><td>
2102 <a href="/help/init">
2121 <a href="/help/init">
2103 init
2122 init
2104 </a>
2123 </a>
2105 </td><td>
2124 </td><td>
2106 create a new repository in the given directory
2125 create a new repository in the given directory
2107 </td></tr>
2126 </td></tr>
2108 <tr><td>
2127 <tr><td>
2109 <a href="/help/log">
2128 <a href="/help/log">
2110 log
2129 log
2111 </a>
2130 </a>
2112 </td><td>
2131 </td><td>
2113 show revision history of entire repository or files
2132 show revision history of entire repository or files
2114 </td></tr>
2133 </td></tr>
2115 <tr><td>
2134 <tr><td>
2116 <a href="/help/merge">
2135 <a href="/help/merge">
2117 merge
2136 merge
2118 </a>
2137 </a>
2119 </td><td>
2138 </td><td>
2120 merge another revision into working directory
2139 merge another revision into working directory
2121 </td></tr>
2140 </td></tr>
2122 <tr><td>
2141 <tr><td>
2123 <a href="/help/pull">
2142 <a href="/help/pull">
2124 pull
2143 pull
2125 </a>
2144 </a>
2126 </td><td>
2145 </td><td>
2127 pull changes from the specified source
2146 pull changes from the specified source
2128 </td></tr>
2147 </td></tr>
2129 <tr><td>
2148 <tr><td>
2130 <a href="/help/push">
2149 <a href="/help/push">
2131 push
2150 push
2132 </a>
2151 </a>
2133 </td><td>
2152 </td><td>
2134 push changes to the specified destination
2153 push changes to the specified destination
2135 </td></tr>
2154 </td></tr>
2136 <tr><td>
2155 <tr><td>
2137 <a href="/help/remove">
2156 <a href="/help/remove">
2138 remove
2157 remove
2139 </a>
2158 </a>
2140 </td><td>
2159 </td><td>
2141 remove the specified files on the next commit
2160 remove the specified files on the next commit
2142 </td></tr>
2161 </td></tr>
2143 <tr><td>
2162 <tr><td>
2144 <a href="/help/serve">
2163 <a href="/help/serve">
2145 serve
2164 serve
2146 </a>
2165 </a>
2147 </td><td>
2166 </td><td>
2148 start stand-alone webserver
2167 start stand-alone webserver
2149 </td></tr>
2168 </td></tr>
2150 <tr><td>
2169 <tr><td>
2151 <a href="/help/status">
2170 <a href="/help/status">
2152 status
2171 status
2153 </a>
2172 </a>
2154 </td><td>
2173 </td><td>
2155 show changed files in the working directory
2174 show changed files in the working directory
2156 </td></tr>
2175 </td></tr>
2157 <tr><td>
2176 <tr><td>
2158 <a href="/help/summary">
2177 <a href="/help/summary">
2159 summary
2178 summary
2160 </a>
2179 </a>
2161 </td><td>
2180 </td><td>
2162 summarize working directory state
2181 summarize working directory state
2163 </td></tr>
2182 </td></tr>
2164 <tr><td>
2183 <tr><td>
2165 <a href="/help/update">
2184 <a href="/help/update">
2166 update
2185 update
2167 </a>
2186 </a>
2168 </td><td>
2187 </td><td>
2169 update working directory (or switch revisions)
2188 update working directory (or switch revisions)
2170 </td></tr>
2189 </td></tr>
2171
2190
2172
2191
2173
2192
2174 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2193 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2175
2194
2176 <tr><td>
2195 <tr><td>
2177 <a href="/help/addremove">
2196 <a href="/help/addremove">
2178 addremove
2197 addremove
2179 </a>
2198 </a>
2180 </td><td>
2199 </td><td>
2181 add all new files, delete all missing files
2200 add all new files, delete all missing files
2182 </td></tr>
2201 </td></tr>
2183 <tr><td>
2202 <tr><td>
2184 <a href="/help/archive">
2203 <a href="/help/archive">
2185 archive
2204 archive
2186 </a>
2205 </a>
2187 </td><td>
2206 </td><td>
2188 create an unversioned archive of a repository revision
2207 create an unversioned archive of a repository revision
2189 </td></tr>
2208 </td></tr>
2190 <tr><td>
2209 <tr><td>
2191 <a href="/help/backout">
2210 <a href="/help/backout">
2192 backout
2211 backout
2193 </a>
2212 </a>
2194 </td><td>
2213 </td><td>
2195 reverse effect of earlier changeset
2214 reverse effect of earlier changeset
2196 </td></tr>
2215 </td></tr>
2197 <tr><td>
2216 <tr><td>
2198 <a href="/help/bisect">
2217 <a href="/help/bisect">
2199 bisect
2218 bisect
2200 </a>
2219 </a>
2201 </td><td>
2220 </td><td>
2202 subdivision search of changesets
2221 subdivision search of changesets
2203 </td></tr>
2222 </td></tr>
2204 <tr><td>
2223 <tr><td>
2205 <a href="/help/bookmarks">
2224 <a href="/help/bookmarks">
2206 bookmarks
2225 bookmarks
2207 </a>
2226 </a>
2208 </td><td>
2227 </td><td>
2209 create a new bookmark or list existing bookmarks
2228 create a new bookmark or list existing bookmarks
2210 </td></tr>
2229 </td></tr>
2211 <tr><td>
2230 <tr><td>
2212 <a href="/help/branch">
2231 <a href="/help/branch">
2213 branch
2232 branch
2214 </a>
2233 </a>
2215 </td><td>
2234 </td><td>
2216 set or show the current branch name
2235 set or show the current branch name
2217 </td></tr>
2236 </td></tr>
2218 <tr><td>
2237 <tr><td>
2219 <a href="/help/branches">
2238 <a href="/help/branches">
2220 branches
2239 branches
2221 </a>
2240 </a>
2222 </td><td>
2241 </td><td>
2223 list repository named branches
2242 list repository named branches
2224 </td></tr>
2243 </td></tr>
2225 <tr><td>
2244 <tr><td>
2226 <a href="/help/bundle">
2245 <a href="/help/bundle">
2227 bundle
2246 bundle
2228 </a>
2247 </a>
2229 </td><td>
2248 </td><td>
2230 create a changegroup file
2249 create a changegroup file
2231 </td></tr>
2250 </td></tr>
2232 <tr><td>
2251 <tr><td>
2233 <a href="/help/cat">
2252 <a href="/help/cat">
2234 cat
2253 cat
2235 </a>
2254 </a>
2236 </td><td>
2255 </td><td>
2237 output the current or given revision of files
2256 output the current or given revision of files
2238 </td></tr>
2257 </td></tr>
2239 <tr><td>
2258 <tr><td>
2240 <a href="/help/config">
2259 <a href="/help/config">
2241 config
2260 config
2242 </a>
2261 </a>
2243 </td><td>
2262 </td><td>
2244 show combined config settings from all hgrc files
2263 show combined config settings from all hgrc files
2245 </td></tr>
2264 </td></tr>
2246 <tr><td>
2265 <tr><td>
2247 <a href="/help/copy">
2266 <a href="/help/copy">
2248 copy
2267 copy
2249 </a>
2268 </a>
2250 </td><td>
2269 </td><td>
2251 mark files as copied for the next commit
2270 mark files as copied for the next commit
2252 </td></tr>
2271 </td></tr>
2253 <tr><td>
2272 <tr><td>
2254 <a href="/help/files">
2273 <a href="/help/files">
2255 files
2274 files
2256 </a>
2275 </a>
2257 </td><td>
2276 </td><td>
2258 list tracked files
2277 list tracked files
2259 </td></tr>
2278 </td></tr>
2260 <tr><td>
2279 <tr><td>
2261 <a href="/help/graft">
2280 <a href="/help/graft">
2262 graft
2281 graft
2263 </a>
2282 </a>
2264 </td><td>
2283 </td><td>
2265 copy changes from other branches onto the current branch
2284 copy changes from other branches onto the current branch
2266 </td></tr>
2285 </td></tr>
2267 <tr><td>
2286 <tr><td>
2268 <a href="/help/grep">
2287 <a href="/help/grep">
2269 grep
2288 grep
2270 </a>
2289 </a>
2271 </td><td>
2290 </td><td>
2272 search revision history for a pattern in specified files
2291 search revision history for a pattern in specified files
2273 </td></tr>
2292 </td></tr>
2274 <tr><td>
2293 <tr><td>
2275 <a href="/help/heads">
2294 <a href="/help/heads">
2276 heads
2295 heads
2277 </a>
2296 </a>
2278 </td><td>
2297 </td><td>
2279 show branch heads
2298 show branch heads
2280 </td></tr>
2299 </td></tr>
2281 <tr><td>
2300 <tr><td>
2282 <a href="/help/help">
2301 <a href="/help/help">
2283 help
2302 help
2284 </a>
2303 </a>
2285 </td><td>
2304 </td><td>
2286 show help for a given topic or a help overview
2305 show help for a given topic or a help overview
2287 </td></tr>
2306 </td></tr>
2288 <tr><td>
2307 <tr><td>
2289 <a href="/help/hgalias">
2308 <a href="/help/hgalias">
2290 hgalias
2309 hgalias
2291 </a>
2310 </a>
2292 </td><td>
2311 </td><td>
2293 summarize working directory state
2312 summarize working directory state
2294 </td></tr>
2313 </td></tr>
2295 <tr><td>
2314 <tr><td>
2296 <a href="/help/identify">
2315 <a href="/help/identify">
2297 identify
2316 identify
2298 </a>
2317 </a>
2299 </td><td>
2318 </td><td>
2300 identify the working directory or specified revision
2319 identify the working directory or specified revision
2301 </td></tr>
2320 </td></tr>
2302 <tr><td>
2321 <tr><td>
2303 <a href="/help/import">
2322 <a href="/help/import">
2304 import
2323 import
2305 </a>
2324 </a>
2306 </td><td>
2325 </td><td>
2307 import an ordered set of patches
2326 import an ordered set of patches
2308 </td></tr>
2327 </td></tr>
2309 <tr><td>
2328 <tr><td>
2310 <a href="/help/incoming">
2329 <a href="/help/incoming">
2311 incoming
2330 incoming
2312 </a>
2331 </a>
2313 </td><td>
2332 </td><td>
2314 show new changesets found in source
2333 show new changesets found in source
2315 </td></tr>
2334 </td></tr>
2316 <tr><td>
2335 <tr><td>
2317 <a href="/help/manifest">
2336 <a href="/help/manifest">
2318 manifest
2337 manifest
2319 </a>
2338 </a>
2320 </td><td>
2339 </td><td>
2321 output the current or given revision of the project manifest
2340 output the current or given revision of the project manifest
2322 </td></tr>
2341 </td></tr>
2323 <tr><td>
2342 <tr><td>
2324 <a href="/help/nohelp">
2343 <a href="/help/nohelp">
2325 nohelp
2344 nohelp
2326 </a>
2345 </a>
2327 </td><td>
2346 </td><td>
2328 (no help text available)
2347 (no help text available)
2329 </td></tr>
2348 </td></tr>
2330 <tr><td>
2349 <tr><td>
2331 <a href="/help/outgoing">
2350 <a href="/help/outgoing">
2332 outgoing
2351 outgoing
2333 </a>
2352 </a>
2334 </td><td>
2353 </td><td>
2335 show changesets not found in the destination
2354 show changesets not found in the destination
2336 </td></tr>
2355 </td></tr>
2337 <tr><td>
2356 <tr><td>
2338 <a href="/help/paths">
2357 <a href="/help/paths">
2339 paths
2358 paths
2340 </a>
2359 </a>
2341 </td><td>
2360 </td><td>
2342 show aliases for remote repositories
2361 show aliases for remote repositories
2343 </td></tr>
2362 </td></tr>
2344 <tr><td>
2363 <tr><td>
2345 <a href="/help/phase">
2364 <a href="/help/phase">
2346 phase
2365 phase
2347 </a>
2366 </a>
2348 </td><td>
2367 </td><td>
2349 set or show the current phase name
2368 set or show the current phase name
2350 </td></tr>
2369 </td></tr>
2351 <tr><td>
2370 <tr><td>
2352 <a href="/help/recover">
2371 <a href="/help/recover">
2353 recover
2372 recover
2354 </a>
2373 </a>
2355 </td><td>
2374 </td><td>
2356 roll back an interrupted transaction
2375 roll back an interrupted transaction
2357 </td></tr>
2376 </td></tr>
2358 <tr><td>
2377 <tr><td>
2359 <a href="/help/rename">
2378 <a href="/help/rename">
2360 rename
2379 rename
2361 </a>
2380 </a>
2362 </td><td>
2381 </td><td>
2363 rename files; equivalent of copy + remove
2382 rename files; equivalent of copy + remove
2364 </td></tr>
2383 </td></tr>
2365 <tr><td>
2384 <tr><td>
2366 <a href="/help/resolve">
2385 <a href="/help/resolve">
2367 resolve
2386 resolve
2368 </a>
2387 </a>
2369 </td><td>
2388 </td><td>
2370 redo merges or set/view the merge status of files
2389 redo merges or set/view the merge status of files
2371 </td></tr>
2390 </td></tr>
2372 <tr><td>
2391 <tr><td>
2373 <a href="/help/revert">
2392 <a href="/help/revert">
2374 revert
2393 revert
2375 </a>
2394 </a>
2376 </td><td>
2395 </td><td>
2377 restore files to their checkout state
2396 restore files to their checkout state
2378 </td></tr>
2397 </td></tr>
2379 <tr><td>
2398 <tr><td>
2380 <a href="/help/root">
2399 <a href="/help/root">
2381 root
2400 root
2382 </a>
2401 </a>
2383 </td><td>
2402 </td><td>
2384 print the root (top) of the current working directory
2403 print the root (top) of the current working directory
2385 </td></tr>
2404 </td></tr>
2386 <tr><td>
2405 <tr><td>
2387 <a href="/help/shellalias">
2406 <a href="/help/shellalias">
2388 shellalias
2407 shellalias
2389 </a>
2408 </a>
2390 </td><td>
2409 </td><td>
2391 (no help text available)
2410 (no help text available)
2392 </td></tr>
2411 </td></tr>
2393 <tr><td>
2412 <tr><td>
2394 <a href="/help/tag">
2413 <a href="/help/tag">
2395 tag
2414 tag
2396 </a>
2415 </a>
2397 </td><td>
2416 </td><td>
2398 add one or more tags for the current or given revision
2417 add one or more tags for the current or given revision
2399 </td></tr>
2418 </td></tr>
2400 <tr><td>
2419 <tr><td>
2401 <a href="/help/tags">
2420 <a href="/help/tags">
2402 tags
2421 tags
2403 </a>
2422 </a>
2404 </td><td>
2423 </td><td>
2405 list repository tags
2424 list repository tags
2406 </td></tr>
2425 </td></tr>
2407 <tr><td>
2426 <tr><td>
2408 <a href="/help/unbundle">
2427 <a href="/help/unbundle">
2409 unbundle
2428 unbundle
2410 </a>
2429 </a>
2411 </td><td>
2430 </td><td>
2412 apply one or more changegroup files
2431 apply one or more changegroup files
2413 </td></tr>
2432 </td></tr>
2414 <tr><td>
2433 <tr><td>
2415 <a href="/help/verify">
2434 <a href="/help/verify">
2416 verify
2435 verify
2417 </a>
2436 </a>
2418 </td><td>
2437 </td><td>
2419 verify the integrity of the repository
2438 verify the integrity of the repository
2420 </td></tr>
2439 </td></tr>
2421 <tr><td>
2440 <tr><td>
2422 <a href="/help/version">
2441 <a href="/help/version">
2423 version
2442 version
2424 </a>
2443 </a>
2425 </td><td>
2444 </td><td>
2426 output version and copyright information
2445 output version and copyright information
2427 </td></tr>
2446 </td></tr>
2428
2447
2429
2448
2430 </table>
2449 </table>
2431 </div>
2450 </div>
2432 </div>
2451 </div>
2433
2452
2434
2453
2435
2454
2436 </body>
2455 </body>
2437 </html>
2456 </html>
2438
2457
2439
2458
2440 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2459 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2441 200 Script output follows
2460 200 Script output follows
2442
2461
2443 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2462 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2444 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2463 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2445 <head>
2464 <head>
2446 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2465 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2447 <meta name="robots" content="index, nofollow" />
2466 <meta name="robots" content="index, nofollow" />
2448 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2467 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2449 <script type="text/javascript" src="/static/mercurial.js"></script>
2468 <script type="text/javascript" src="/static/mercurial.js"></script>
2450
2469
2451 <title>Help: add</title>
2470 <title>Help: add</title>
2452 </head>
2471 </head>
2453 <body>
2472 <body>
2454
2473
2455 <div class="container">
2474 <div class="container">
2456 <div class="menu">
2475 <div class="menu">
2457 <div class="logo">
2476 <div class="logo">
2458 <a href="https://mercurial-scm.org/">
2477 <a href="https://mercurial-scm.org/">
2459 <img src="/static/hglogo.png" alt="mercurial" /></a>
2478 <img src="/static/hglogo.png" alt="mercurial" /></a>
2460 </div>
2479 </div>
2461 <ul>
2480 <ul>
2462 <li><a href="/shortlog">log</a></li>
2481 <li><a href="/shortlog">log</a></li>
2463 <li><a href="/graph">graph</a></li>
2482 <li><a href="/graph">graph</a></li>
2464 <li><a href="/tags">tags</a></li>
2483 <li><a href="/tags">tags</a></li>
2465 <li><a href="/bookmarks">bookmarks</a></li>
2484 <li><a href="/bookmarks">bookmarks</a></li>
2466 <li><a href="/branches">branches</a></li>
2485 <li><a href="/branches">branches</a></li>
2467 </ul>
2486 </ul>
2468 <ul>
2487 <ul>
2469 <li class="active"><a href="/help">help</a></li>
2488 <li class="active"><a href="/help">help</a></li>
2470 </ul>
2489 </ul>
2471 </div>
2490 </div>
2472
2491
2473 <div class="main">
2492 <div class="main">
2474 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2493 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2475 <h3>Help: add</h3>
2494 <h3>Help: add</h3>
2476
2495
2477 <form class="search" action="/log">
2496 <form class="search" action="/log">
2478
2497
2479 <p><input name="rev" id="search1" type="text" size="30" /></p>
2498 <p><input name="rev" id="search1" type="text" size="30" /></p>
2480 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2499 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2481 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2500 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2482 </form>
2501 </form>
2483 <div id="doc">
2502 <div id="doc">
2484 <p>
2503 <p>
2485 hg add [OPTION]... [FILE]...
2504 hg add [OPTION]... [FILE]...
2486 </p>
2505 </p>
2487 <p>
2506 <p>
2488 add the specified files on the next commit
2507 add the specified files on the next commit
2489 </p>
2508 </p>
2490 <p>
2509 <p>
2491 Schedule files to be version controlled and added to the
2510 Schedule files to be version controlled and added to the
2492 repository.
2511 repository.
2493 </p>
2512 </p>
2494 <p>
2513 <p>
2495 The files will be added to the repository at the next commit. To
2514 The files will be added to the repository at the next commit. To
2496 undo an add before that, see 'hg forget'.
2515 undo an add before that, see 'hg forget'.
2497 </p>
2516 </p>
2498 <p>
2517 <p>
2499 If no names are given, add all files to the repository (except
2518 If no names are given, add all files to the repository (except
2500 files matching &quot;.hgignore&quot;).
2519 files matching &quot;.hgignore&quot;).
2501 </p>
2520 </p>
2502 <p>
2521 <p>
2503 Examples:
2522 Examples:
2504 </p>
2523 </p>
2505 <ul>
2524 <ul>
2506 <li> New (unknown) files are added automatically by 'hg add':
2525 <li> New (unknown) files are added automatically by 'hg add':
2507 <pre>
2526 <pre>
2508 \$ ls (re)
2527 \$ ls (re)
2509 foo.c
2528 foo.c
2510 \$ hg status (re)
2529 \$ hg status (re)
2511 ? foo.c
2530 ? foo.c
2512 \$ hg add (re)
2531 \$ hg add (re)
2513 adding foo.c
2532 adding foo.c
2514 \$ hg status (re)
2533 \$ hg status (re)
2515 A foo.c
2534 A foo.c
2516 </pre>
2535 </pre>
2517 <li> Specific files to be added can be specified:
2536 <li> Specific files to be added can be specified:
2518 <pre>
2537 <pre>
2519 \$ ls (re)
2538 \$ ls (re)
2520 bar.c foo.c
2539 bar.c foo.c
2521 \$ hg status (re)
2540 \$ hg status (re)
2522 ? bar.c
2541 ? bar.c
2523 ? foo.c
2542 ? foo.c
2524 \$ hg add bar.c (re)
2543 \$ hg add bar.c (re)
2525 \$ hg status (re)
2544 \$ hg status (re)
2526 A bar.c
2545 A bar.c
2527 ? foo.c
2546 ? foo.c
2528 </pre>
2547 </pre>
2529 </ul>
2548 </ul>
2530 <p>
2549 <p>
2531 Returns 0 if all files are successfully added.
2550 Returns 0 if all files are successfully added.
2532 </p>
2551 </p>
2533 <p>
2552 <p>
2534 options ([+] can be repeated):
2553 options ([+] can be repeated):
2535 </p>
2554 </p>
2536 <table>
2555 <table>
2537 <tr><td>-I</td>
2556 <tr><td>-I</td>
2538 <td>--include PATTERN [+]</td>
2557 <td>--include PATTERN [+]</td>
2539 <td>include names matching the given patterns</td></tr>
2558 <td>include names matching the given patterns</td></tr>
2540 <tr><td>-X</td>
2559 <tr><td>-X</td>
2541 <td>--exclude PATTERN [+]</td>
2560 <td>--exclude PATTERN [+]</td>
2542 <td>exclude names matching the given patterns</td></tr>
2561 <td>exclude names matching the given patterns</td></tr>
2543 <tr><td>-S</td>
2562 <tr><td>-S</td>
2544 <td>--subrepos</td>
2563 <td>--subrepos</td>
2545 <td>recurse into subrepositories</td></tr>
2564 <td>recurse into subrepositories</td></tr>
2546 <tr><td>-n</td>
2565 <tr><td>-n</td>
2547 <td>--dry-run</td>
2566 <td>--dry-run</td>
2548 <td>do not perform actions, just print output</td></tr>
2567 <td>do not perform actions, just print output</td></tr>
2549 </table>
2568 </table>
2550 <p>
2569 <p>
2551 global options ([+] can be repeated):
2570 global options ([+] can be repeated):
2552 </p>
2571 </p>
2553 <table>
2572 <table>
2554 <tr><td>-R</td>
2573 <tr><td>-R</td>
2555 <td>--repository REPO</td>
2574 <td>--repository REPO</td>
2556 <td>repository root directory or name of overlay bundle file</td></tr>
2575 <td>repository root directory or name of overlay bundle file</td></tr>
2557 <tr><td></td>
2576 <tr><td></td>
2558 <td>--cwd DIR</td>
2577 <td>--cwd DIR</td>
2559 <td>change working directory</td></tr>
2578 <td>change working directory</td></tr>
2560 <tr><td>-y</td>
2579 <tr><td>-y</td>
2561 <td>--noninteractive</td>
2580 <td>--noninteractive</td>
2562 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2581 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2563 <tr><td>-q</td>
2582 <tr><td>-q</td>
2564 <td>--quiet</td>
2583 <td>--quiet</td>
2565 <td>suppress output</td></tr>
2584 <td>suppress output</td></tr>
2566 <tr><td>-v</td>
2585 <tr><td>-v</td>
2567 <td>--verbose</td>
2586 <td>--verbose</td>
2568 <td>enable additional output</td></tr>
2587 <td>enable additional output</td></tr>
2569 <tr><td></td>
2588 <tr><td></td>
2570 <td>--color TYPE</td>
2589 <td>--color TYPE</td>
2571 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2590 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2572 <tr><td></td>
2591 <tr><td></td>
2573 <td>--config CONFIG [+]</td>
2592 <td>--config CONFIG [+]</td>
2574 <td>set/override config option (use 'section.name=value')</td></tr>
2593 <td>set/override config option (use 'section.name=value')</td></tr>
2575 <tr><td></td>
2594 <tr><td></td>
2576 <td>--debug</td>
2595 <td>--debug</td>
2577 <td>enable debugging output</td></tr>
2596 <td>enable debugging output</td></tr>
2578 <tr><td></td>
2597 <tr><td></td>
2579 <td>--debugger</td>
2598 <td>--debugger</td>
2580 <td>start debugger</td></tr>
2599 <td>start debugger</td></tr>
2581 <tr><td></td>
2600 <tr><td></td>
2582 <td>--encoding ENCODE</td>
2601 <td>--encoding ENCODE</td>
2583 <td>set the charset encoding (default: ascii)</td></tr>
2602 <td>set the charset encoding (default: ascii)</td></tr>
2584 <tr><td></td>
2603 <tr><td></td>
2585 <td>--encodingmode MODE</td>
2604 <td>--encodingmode MODE</td>
2586 <td>set the charset encoding mode (default: strict)</td></tr>
2605 <td>set the charset encoding mode (default: strict)</td></tr>
2587 <tr><td></td>
2606 <tr><td></td>
2588 <td>--traceback</td>
2607 <td>--traceback</td>
2589 <td>always print a traceback on exception</td></tr>
2608 <td>always print a traceback on exception</td></tr>
2590 <tr><td></td>
2609 <tr><td></td>
2591 <td>--time</td>
2610 <td>--time</td>
2592 <td>time how long the command takes</td></tr>
2611 <td>time how long the command takes</td></tr>
2593 <tr><td></td>
2612 <tr><td></td>
2594 <td>--profile</td>
2613 <td>--profile</td>
2595 <td>print command execution profile</td></tr>
2614 <td>print command execution profile</td></tr>
2596 <tr><td></td>
2615 <tr><td></td>
2597 <td>--version</td>
2616 <td>--version</td>
2598 <td>output version information and exit</td></tr>
2617 <td>output version information and exit</td></tr>
2599 <tr><td>-h</td>
2618 <tr><td>-h</td>
2600 <td>--help</td>
2619 <td>--help</td>
2601 <td>display help and exit</td></tr>
2620 <td>display help and exit</td></tr>
2602 <tr><td></td>
2621 <tr><td></td>
2603 <td>--hidden</td>
2622 <td>--hidden</td>
2604 <td>consider hidden changesets</td></tr>
2623 <td>consider hidden changesets</td></tr>
2605 <tr><td></td>
2624 <tr><td></td>
2606 <td>--pager TYPE</td>
2625 <td>--pager TYPE</td>
2607 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2626 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2608 </table>
2627 </table>
2609
2628
2610 </div>
2629 </div>
2611 </div>
2630 </div>
2612 </div>
2631 </div>
2613
2632
2614
2633
2615
2634
2616 </body>
2635 </body>
2617 </html>
2636 </html>
2618
2637
2619
2638
2620 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2639 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2621 200 Script output follows
2640 200 Script output follows
2622
2641
2623 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2642 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2624 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2643 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2625 <head>
2644 <head>
2626 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2645 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2627 <meta name="robots" content="index, nofollow" />
2646 <meta name="robots" content="index, nofollow" />
2628 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2647 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2629 <script type="text/javascript" src="/static/mercurial.js"></script>
2648 <script type="text/javascript" src="/static/mercurial.js"></script>
2630
2649
2631 <title>Help: remove</title>
2650 <title>Help: remove</title>
2632 </head>
2651 </head>
2633 <body>
2652 <body>
2634
2653
2635 <div class="container">
2654 <div class="container">
2636 <div class="menu">
2655 <div class="menu">
2637 <div class="logo">
2656 <div class="logo">
2638 <a href="https://mercurial-scm.org/">
2657 <a href="https://mercurial-scm.org/">
2639 <img src="/static/hglogo.png" alt="mercurial" /></a>
2658 <img src="/static/hglogo.png" alt="mercurial" /></a>
2640 </div>
2659 </div>
2641 <ul>
2660 <ul>
2642 <li><a href="/shortlog">log</a></li>
2661 <li><a href="/shortlog">log</a></li>
2643 <li><a href="/graph">graph</a></li>
2662 <li><a href="/graph">graph</a></li>
2644 <li><a href="/tags">tags</a></li>
2663 <li><a href="/tags">tags</a></li>
2645 <li><a href="/bookmarks">bookmarks</a></li>
2664 <li><a href="/bookmarks">bookmarks</a></li>
2646 <li><a href="/branches">branches</a></li>
2665 <li><a href="/branches">branches</a></li>
2647 </ul>
2666 </ul>
2648 <ul>
2667 <ul>
2649 <li class="active"><a href="/help">help</a></li>
2668 <li class="active"><a href="/help">help</a></li>
2650 </ul>
2669 </ul>
2651 </div>
2670 </div>
2652
2671
2653 <div class="main">
2672 <div class="main">
2654 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2673 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2655 <h3>Help: remove</h3>
2674 <h3>Help: remove</h3>
2656
2675
2657 <form class="search" action="/log">
2676 <form class="search" action="/log">
2658
2677
2659 <p><input name="rev" id="search1" type="text" size="30" /></p>
2678 <p><input name="rev" id="search1" type="text" size="30" /></p>
2660 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2679 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2661 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2680 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2662 </form>
2681 </form>
2663 <div id="doc">
2682 <div id="doc">
2664 <p>
2683 <p>
2665 hg remove [OPTION]... FILE...
2684 hg remove [OPTION]... FILE...
2666 </p>
2685 </p>
2667 <p>
2686 <p>
2668 aliases: rm
2687 aliases: rm
2669 </p>
2688 </p>
2670 <p>
2689 <p>
2671 remove the specified files on the next commit
2690 remove the specified files on the next commit
2672 </p>
2691 </p>
2673 <p>
2692 <p>
2674 Schedule the indicated files for removal from the current branch.
2693 Schedule the indicated files for removal from the current branch.
2675 </p>
2694 </p>
2676 <p>
2695 <p>
2677 This command schedules the files to be removed at the next commit.
2696 This command schedules the files to be removed at the next commit.
2678 To undo a remove before that, see 'hg revert'. To undo added
2697 To undo a remove before that, see 'hg revert'. To undo added
2679 files, see 'hg forget'.
2698 files, see 'hg forget'.
2680 </p>
2699 </p>
2681 <p>
2700 <p>
2682 -A/--after can be used to remove only files that have already
2701 -A/--after can be used to remove only files that have already
2683 been deleted, -f/--force can be used to force deletion, and -Af
2702 been deleted, -f/--force can be used to force deletion, and -Af
2684 can be used to remove files from the next revision without
2703 can be used to remove files from the next revision without
2685 deleting them from the working directory.
2704 deleting them from the working directory.
2686 </p>
2705 </p>
2687 <p>
2706 <p>
2688 The following table details the behavior of remove for different
2707 The following table details the behavior of remove for different
2689 file states (columns) and option combinations (rows). The file
2708 file states (columns) and option combinations (rows). The file
2690 states are Added [A], Clean [C], Modified [M] and Missing [!]
2709 states are Added [A], Clean [C], Modified [M] and Missing [!]
2691 (as reported by 'hg status'). The actions are Warn, Remove
2710 (as reported by 'hg status'). The actions are Warn, Remove
2692 (from branch) and Delete (from disk):
2711 (from branch) and Delete (from disk):
2693 </p>
2712 </p>
2694 <table>
2713 <table>
2695 <tr><td>opt/state</td>
2714 <tr><td>opt/state</td>
2696 <td>A</td>
2715 <td>A</td>
2697 <td>C</td>
2716 <td>C</td>
2698 <td>M</td>
2717 <td>M</td>
2699 <td>!</td></tr>
2718 <td>!</td></tr>
2700 <tr><td>none</td>
2719 <tr><td>none</td>
2701 <td>W</td>
2720 <td>W</td>
2702 <td>RD</td>
2721 <td>RD</td>
2703 <td>W</td>
2722 <td>W</td>
2704 <td>R</td></tr>
2723 <td>R</td></tr>
2705 <tr><td>-f</td>
2724 <tr><td>-f</td>
2706 <td>R</td>
2725 <td>R</td>
2707 <td>RD</td>
2726 <td>RD</td>
2708 <td>RD</td>
2727 <td>RD</td>
2709 <td>R</td></tr>
2728 <td>R</td></tr>
2710 <tr><td>-A</td>
2729 <tr><td>-A</td>
2711 <td>W</td>
2730 <td>W</td>
2712 <td>W</td>
2731 <td>W</td>
2713 <td>W</td>
2732 <td>W</td>
2714 <td>R</td></tr>
2733 <td>R</td></tr>
2715 <tr><td>-Af</td>
2734 <tr><td>-Af</td>
2716 <td>R</td>
2735 <td>R</td>
2717 <td>R</td>
2736 <td>R</td>
2718 <td>R</td>
2737 <td>R</td>
2719 <td>R</td></tr>
2738 <td>R</td></tr>
2720 </table>
2739 </table>
2721 <p>
2740 <p>
2722 <b>Note:</b>
2741 <b>Note:</b>
2723 </p>
2742 </p>
2724 <p>
2743 <p>
2725 'hg remove' never deletes files in Added [A] state from the
2744 'hg remove' never deletes files in Added [A] state from the
2726 working directory, not even if &quot;--force&quot; is specified.
2745 working directory, not even if &quot;--force&quot; is specified.
2727 </p>
2746 </p>
2728 <p>
2747 <p>
2729 Returns 0 on success, 1 if any warnings encountered.
2748 Returns 0 on success, 1 if any warnings encountered.
2730 </p>
2749 </p>
2731 <p>
2750 <p>
2732 options ([+] can be repeated):
2751 options ([+] can be repeated):
2733 </p>
2752 </p>
2734 <table>
2753 <table>
2735 <tr><td>-A</td>
2754 <tr><td>-A</td>
2736 <td>--after</td>
2755 <td>--after</td>
2737 <td>record delete for missing files</td></tr>
2756 <td>record delete for missing files</td></tr>
2738 <tr><td>-f</td>
2757 <tr><td>-f</td>
2739 <td>--force</td>
2758 <td>--force</td>
2740 <td>forget added files, delete modified files</td></tr>
2759 <td>forget added files, delete modified files</td></tr>
2741 <tr><td>-S</td>
2760 <tr><td>-S</td>
2742 <td>--subrepos</td>
2761 <td>--subrepos</td>
2743 <td>recurse into subrepositories</td></tr>
2762 <td>recurse into subrepositories</td></tr>
2744 <tr><td>-I</td>
2763 <tr><td>-I</td>
2745 <td>--include PATTERN [+]</td>
2764 <td>--include PATTERN [+]</td>
2746 <td>include names matching the given patterns</td></tr>
2765 <td>include names matching the given patterns</td></tr>
2747 <tr><td>-X</td>
2766 <tr><td>-X</td>
2748 <td>--exclude PATTERN [+]</td>
2767 <td>--exclude PATTERN [+]</td>
2749 <td>exclude names matching the given patterns</td></tr>
2768 <td>exclude names matching the given patterns</td></tr>
2750 </table>
2769 </table>
2751 <p>
2770 <p>
2752 global options ([+] can be repeated):
2771 global options ([+] can be repeated):
2753 </p>
2772 </p>
2754 <table>
2773 <table>
2755 <tr><td>-R</td>
2774 <tr><td>-R</td>
2756 <td>--repository REPO</td>
2775 <td>--repository REPO</td>
2757 <td>repository root directory or name of overlay bundle file</td></tr>
2776 <td>repository root directory or name of overlay bundle file</td></tr>
2758 <tr><td></td>
2777 <tr><td></td>
2759 <td>--cwd DIR</td>
2778 <td>--cwd DIR</td>
2760 <td>change working directory</td></tr>
2779 <td>change working directory</td></tr>
2761 <tr><td>-y</td>
2780 <tr><td>-y</td>
2762 <td>--noninteractive</td>
2781 <td>--noninteractive</td>
2763 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2782 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2764 <tr><td>-q</td>
2783 <tr><td>-q</td>
2765 <td>--quiet</td>
2784 <td>--quiet</td>
2766 <td>suppress output</td></tr>
2785 <td>suppress output</td></tr>
2767 <tr><td>-v</td>
2786 <tr><td>-v</td>
2768 <td>--verbose</td>
2787 <td>--verbose</td>
2769 <td>enable additional output</td></tr>
2788 <td>enable additional output</td></tr>
2770 <tr><td></td>
2789 <tr><td></td>
2771 <td>--color TYPE</td>
2790 <td>--color TYPE</td>
2772 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2791 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2773 <tr><td></td>
2792 <tr><td></td>
2774 <td>--config CONFIG [+]</td>
2793 <td>--config CONFIG [+]</td>
2775 <td>set/override config option (use 'section.name=value')</td></tr>
2794 <td>set/override config option (use 'section.name=value')</td></tr>
2776 <tr><td></td>
2795 <tr><td></td>
2777 <td>--debug</td>
2796 <td>--debug</td>
2778 <td>enable debugging output</td></tr>
2797 <td>enable debugging output</td></tr>
2779 <tr><td></td>
2798 <tr><td></td>
2780 <td>--debugger</td>
2799 <td>--debugger</td>
2781 <td>start debugger</td></tr>
2800 <td>start debugger</td></tr>
2782 <tr><td></td>
2801 <tr><td></td>
2783 <td>--encoding ENCODE</td>
2802 <td>--encoding ENCODE</td>
2784 <td>set the charset encoding (default: ascii)</td></tr>
2803 <td>set the charset encoding (default: ascii)</td></tr>
2785 <tr><td></td>
2804 <tr><td></td>
2786 <td>--encodingmode MODE</td>
2805 <td>--encodingmode MODE</td>
2787 <td>set the charset encoding mode (default: strict)</td></tr>
2806 <td>set the charset encoding mode (default: strict)</td></tr>
2788 <tr><td></td>
2807 <tr><td></td>
2789 <td>--traceback</td>
2808 <td>--traceback</td>
2790 <td>always print a traceback on exception</td></tr>
2809 <td>always print a traceback on exception</td></tr>
2791 <tr><td></td>
2810 <tr><td></td>
2792 <td>--time</td>
2811 <td>--time</td>
2793 <td>time how long the command takes</td></tr>
2812 <td>time how long the command takes</td></tr>
2794 <tr><td></td>
2813 <tr><td></td>
2795 <td>--profile</td>
2814 <td>--profile</td>
2796 <td>print command execution profile</td></tr>
2815 <td>print command execution profile</td></tr>
2797 <tr><td></td>
2816 <tr><td></td>
2798 <td>--version</td>
2817 <td>--version</td>
2799 <td>output version information and exit</td></tr>
2818 <td>output version information and exit</td></tr>
2800 <tr><td>-h</td>
2819 <tr><td>-h</td>
2801 <td>--help</td>
2820 <td>--help</td>
2802 <td>display help and exit</td></tr>
2821 <td>display help and exit</td></tr>
2803 <tr><td></td>
2822 <tr><td></td>
2804 <td>--hidden</td>
2823 <td>--hidden</td>
2805 <td>consider hidden changesets</td></tr>
2824 <td>consider hidden changesets</td></tr>
2806 <tr><td></td>
2825 <tr><td></td>
2807 <td>--pager TYPE</td>
2826 <td>--pager TYPE</td>
2808 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2827 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2809 </table>
2828 </table>
2810
2829
2811 </div>
2830 </div>
2812 </div>
2831 </div>
2813 </div>
2832 </div>
2814
2833
2815
2834
2816
2835
2817 </body>
2836 </body>
2818 </html>
2837 </html>
2819
2838
2820
2839
2821 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2840 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2822 200 Script output follows
2841 200 Script output follows
2823
2842
2824 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2843 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2825 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2844 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2826 <head>
2845 <head>
2827 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2846 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2828 <meta name="robots" content="index, nofollow" />
2847 <meta name="robots" content="index, nofollow" />
2829 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2848 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2830 <script type="text/javascript" src="/static/mercurial.js"></script>
2849 <script type="text/javascript" src="/static/mercurial.js"></script>
2831
2850
2832 <title>Help: dates</title>
2851 <title>Help: dates</title>
2833 </head>
2852 </head>
2834 <body>
2853 <body>
2835
2854
2836 <div class="container">
2855 <div class="container">
2837 <div class="menu">
2856 <div class="menu">
2838 <div class="logo">
2857 <div class="logo">
2839 <a href="https://mercurial-scm.org/">
2858 <a href="https://mercurial-scm.org/">
2840 <img src="/static/hglogo.png" alt="mercurial" /></a>
2859 <img src="/static/hglogo.png" alt="mercurial" /></a>
2841 </div>
2860 </div>
2842 <ul>
2861 <ul>
2843 <li><a href="/shortlog">log</a></li>
2862 <li><a href="/shortlog">log</a></li>
2844 <li><a href="/graph">graph</a></li>
2863 <li><a href="/graph">graph</a></li>
2845 <li><a href="/tags">tags</a></li>
2864 <li><a href="/tags">tags</a></li>
2846 <li><a href="/bookmarks">bookmarks</a></li>
2865 <li><a href="/bookmarks">bookmarks</a></li>
2847 <li><a href="/branches">branches</a></li>
2866 <li><a href="/branches">branches</a></li>
2848 </ul>
2867 </ul>
2849 <ul>
2868 <ul>
2850 <li class="active"><a href="/help">help</a></li>
2869 <li class="active"><a href="/help">help</a></li>
2851 </ul>
2870 </ul>
2852 </div>
2871 </div>
2853
2872
2854 <div class="main">
2873 <div class="main">
2855 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2874 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2856 <h3>Help: dates</h3>
2875 <h3>Help: dates</h3>
2857
2876
2858 <form class="search" action="/log">
2877 <form class="search" action="/log">
2859
2878
2860 <p><input name="rev" id="search1" type="text" size="30" /></p>
2879 <p><input name="rev" id="search1" type="text" size="30" /></p>
2861 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2880 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2862 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2881 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2863 </form>
2882 </form>
2864 <div id="doc">
2883 <div id="doc">
2865 <h1>Date Formats</h1>
2884 <h1>Date Formats</h1>
2866 <p>
2885 <p>
2867 Some commands allow the user to specify a date, e.g.:
2886 Some commands allow the user to specify a date, e.g.:
2868 </p>
2887 </p>
2869 <ul>
2888 <ul>
2870 <li> backout, commit, import, tag: Specify the commit date.
2889 <li> backout, commit, import, tag: Specify the commit date.
2871 <li> log, revert, update: Select revision(s) by date.
2890 <li> log, revert, update: Select revision(s) by date.
2872 </ul>
2891 </ul>
2873 <p>
2892 <p>
2874 Many date formats are valid. Here are some examples:
2893 Many date formats are valid. Here are some examples:
2875 </p>
2894 </p>
2876 <ul>
2895 <ul>
2877 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
2896 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
2878 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
2897 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
2879 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
2898 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
2880 <li> &quot;Dec 6&quot; (midnight)
2899 <li> &quot;Dec 6&quot; (midnight)
2881 <li> &quot;13:18&quot; (today assumed)
2900 <li> &quot;13:18&quot; (today assumed)
2882 <li> &quot;3:39&quot; (3:39AM assumed)
2901 <li> &quot;3:39&quot; (3:39AM assumed)
2883 <li> &quot;3:39pm&quot; (15:39)
2902 <li> &quot;3:39pm&quot; (15:39)
2884 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
2903 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
2885 <li> &quot;2006-12-6 13:18&quot;
2904 <li> &quot;2006-12-6 13:18&quot;
2886 <li> &quot;2006-12-6&quot;
2905 <li> &quot;2006-12-6&quot;
2887 <li> &quot;12-6&quot;
2906 <li> &quot;12-6&quot;
2888 <li> &quot;12/6&quot;
2907 <li> &quot;12/6&quot;
2889 <li> &quot;12/6/6&quot; (Dec 6 2006)
2908 <li> &quot;12/6/6&quot; (Dec 6 2006)
2890 <li> &quot;today&quot; (midnight)
2909 <li> &quot;today&quot; (midnight)
2891 <li> &quot;yesterday&quot; (midnight)
2910 <li> &quot;yesterday&quot; (midnight)
2892 <li> &quot;now&quot; - right now
2911 <li> &quot;now&quot; - right now
2893 </ul>
2912 </ul>
2894 <p>
2913 <p>
2895 Lastly, there is Mercurial's internal format:
2914 Lastly, there is Mercurial's internal format:
2896 </p>
2915 </p>
2897 <ul>
2916 <ul>
2898 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
2917 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
2899 </ul>
2918 </ul>
2900 <p>
2919 <p>
2901 This is the internal representation format for dates. The first number
2920 This is the internal representation format for dates. The first number
2902 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
2921 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
2903 second is the offset of the local timezone, in seconds west of UTC
2922 second is the offset of the local timezone, in seconds west of UTC
2904 (negative if the timezone is east of UTC).
2923 (negative if the timezone is east of UTC).
2905 </p>
2924 </p>
2906 <p>
2925 <p>
2907 The log command also accepts date ranges:
2926 The log command also accepts date ranges:
2908 </p>
2927 </p>
2909 <ul>
2928 <ul>
2910 <li> &quot;&lt;DATE&quot; - at or before a given date/time
2929 <li> &quot;&lt;DATE&quot; - at or before a given date/time
2911 <li> &quot;&gt;DATE&quot; - on or after a given date/time
2930 <li> &quot;&gt;DATE&quot; - on or after a given date/time
2912 <li> &quot;DATE to DATE&quot; - a date range, inclusive
2931 <li> &quot;DATE to DATE&quot; - a date range, inclusive
2913 <li> &quot;-DAYS&quot; - within a given number of days of today
2932 <li> &quot;-DAYS&quot; - within a given number of days of today
2914 </ul>
2933 </ul>
2915
2934
2916 </div>
2935 </div>
2917 </div>
2936 </div>
2918 </div>
2937 </div>
2919
2938
2920
2939
2921
2940
2922 </body>
2941 </body>
2923 </html>
2942 </html>
2924
2943
2925
2944
2926 Sub-topic indexes rendered properly
2945 Sub-topic indexes rendered properly
2927
2946
2928 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
2947 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
2929 200 Script output follows
2948 200 Script output follows
2930
2949
2931 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2950 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2932 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2951 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2933 <head>
2952 <head>
2934 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2953 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2935 <meta name="robots" content="index, nofollow" />
2954 <meta name="robots" content="index, nofollow" />
2936 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2955 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2937 <script type="text/javascript" src="/static/mercurial.js"></script>
2956 <script type="text/javascript" src="/static/mercurial.js"></script>
2938
2957
2939 <title>Help: internals</title>
2958 <title>Help: internals</title>
2940 </head>
2959 </head>
2941 <body>
2960 <body>
2942
2961
2943 <div class="container">
2962 <div class="container">
2944 <div class="menu">
2963 <div class="menu">
2945 <div class="logo">
2964 <div class="logo">
2946 <a href="https://mercurial-scm.org/">
2965 <a href="https://mercurial-scm.org/">
2947 <img src="/static/hglogo.png" alt="mercurial" /></a>
2966 <img src="/static/hglogo.png" alt="mercurial" /></a>
2948 </div>
2967 </div>
2949 <ul>
2968 <ul>
2950 <li><a href="/shortlog">log</a></li>
2969 <li><a href="/shortlog">log</a></li>
2951 <li><a href="/graph">graph</a></li>
2970 <li><a href="/graph">graph</a></li>
2952 <li><a href="/tags">tags</a></li>
2971 <li><a href="/tags">tags</a></li>
2953 <li><a href="/bookmarks">bookmarks</a></li>
2972 <li><a href="/bookmarks">bookmarks</a></li>
2954 <li><a href="/branches">branches</a></li>
2973 <li><a href="/branches">branches</a></li>
2955 </ul>
2974 </ul>
2956 <ul>
2975 <ul>
2957 <li><a href="/help">help</a></li>
2976 <li><a href="/help">help</a></li>
2958 </ul>
2977 </ul>
2959 </div>
2978 </div>
2960
2979
2961 <div class="main">
2980 <div class="main">
2962 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2981 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2963 <form class="search" action="/log">
2982 <form class="search" action="/log">
2964
2983
2965 <p><input name="rev" id="search1" type="text" size="30" /></p>
2984 <p><input name="rev" id="search1" type="text" size="30" /></p>
2966 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2985 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2967 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2986 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2968 </form>
2987 </form>
2969 <table class="bigtable">
2988 <table class="bigtable">
2970 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2989 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2971
2990
2972 <tr><td>
2991 <tr><td>
2973 <a href="/help/internals.bundles">
2992 <a href="/help/internals.bundles">
2974 bundles
2993 bundles
2975 </a>
2994 </a>
2976 </td><td>
2995 </td><td>
2977 Bundles
2996 Bundles
2978 </td></tr>
2997 </td></tr>
2979 <tr><td>
2998 <tr><td>
2980 <a href="/help/internals.censor">
2999 <a href="/help/internals.censor">
2981 censor
3000 censor
2982 </a>
3001 </a>
2983 </td><td>
3002 </td><td>
2984 Censor
3003 Censor
2985 </td></tr>
3004 </td></tr>
2986 <tr><td>
3005 <tr><td>
2987 <a href="/help/internals.changegroups">
3006 <a href="/help/internals.changegroups">
2988 changegroups
3007 changegroups
2989 </a>
3008 </a>
2990 </td><td>
3009 </td><td>
2991 Changegroups
3010 Changegroups
2992 </td></tr>
3011 </td></tr>
2993 <tr><td>
3012 <tr><td>
2994 <a href="/help/internals.requirements">
3013 <a href="/help/internals.requirements">
2995 requirements
3014 requirements
2996 </a>
3015 </a>
2997 </td><td>
3016 </td><td>
2998 Repository Requirements
3017 Repository Requirements
2999 </td></tr>
3018 </td></tr>
3000 <tr><td>
3019 <tr><td>
3001 <a href="/help/internals.revlogs">
3020 <a href="/help/internals.revlogs">
3002 revlogs
3021 revlogs
3003 </a>
3022 </a>
3004 </td><td>
3023 </td><td>
3005 Revision Logs
3024 Revision Logs
3006 </td></tr>
3025 </td></tr>
3007 <tr><td>
3026 <tr><td>
3008 <a href="/help/internals.wireprotocol">
3027 <a href="/help/internals.wireprotocol">
3009 wireprotocol
3028 wireprotocol
3010 </a>
3029 </a>
3011 </td><td>
3030 </td><td>
3012 Wire Protocol
3031 Wire Protocol
3013 </td></tr>
3032 </td></tr>
3014
3033
3015
3034
3016
3035
3017
3036
3018
3037
3019 </table>
3038 </table>
3020 </div>
3039 </div>
3021 </div>
3040 </div>
3022
3041
3023
3042
3024
3043
3025 </body>
3044 </body>
3026 </html>
3045 </html>
3027
3046
3028
3047
3029 Sub-topic topics rendered properly
3048 Sub-topic topics rendered properly
3030
3049
3031 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3050 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3032 200 Script output follows
3051 200 Script output follows
3033
3052
3034 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3053 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3035 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3054 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3036 <head>
3055 <head>
3037 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3056 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3038 <meta name="robots" content="index, nofollow" />
3057 <meta name="robots" content="index, nofollow" />
3039 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3058 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3040 <script type="text/javascript" src="/static/mercurial.js"></script>
3059 <script type="text/javascript" src="/static/mercurial.js"></script>
3041
3060
3042 <title>Help: internals.changegroups</title>
3061 <title>Help: internals.changegroups</title>
3043 </head>
3062 </head>
3044 <body>
3063 <body>
3045
3064
3046 <div class="container">
3065 <div class="container">
3047 <div class="menu">
3066 <div class="menu">
3048 <div class="logo">
3067 <div class="logo">
3049 <a href="https://mercurial-scm.org/">
3068 <a href="https://mercurial-scm.org/">
3050 <img src="/static/hglogo.png" alt="mercurial" /></a>
3069 <img src="/static/hglogo.png" alt="mercurial" /></a>
3051 </div>
3070 </div>
3052 <ul>
3071 <ul>
3053 <li><a href="/shortlog">log</a></li>
3072 <li><a href="/shortlog">log</a></li>
3054 <li><a href="/graph">graph</a></li>
3073 <li><a href="/graph">graph</a></li>
3055 <li><a href="/tags">tags</a></li>
3074 <li><a href="/tags">tags</a></li>
3056 <li><a href="/bookmarks">bookmarks</a></li>
3075 <li><a href="/bookmarks">bookmarks</a></li>
3057 <li><a href="/branches">branches</a></li>
3076 <li><a href="/branches">branches</a></li>
3058 </ul>
3077 </ul>
3059 <ul>
3078 <ul>
3060 <li class="active"><a href="/help">help</a></li>
3079 <li class="active"><a href="/help">help</a></li>
3061 </ul>
3080 </ul>
3062 </div>
3081 </div>
3063
3082
3064 <div class="main">
3083 <div class="main">
3065 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3084 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3066 <h3>Help: internals.changegroups</h3>
3085 <h3>Help: internals.changegroups</h3>
3067
3086
3068 <form class="search" action="/log">
3087 <form class="search" action="/log">
3069
3088
3070 <p><input name="rev" id="search1" type="text" size="30" /></p>
3089 <p><input name="rev" id="search1" type="text" size="30" /></p>
3071 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3090 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3072 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3091 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3073 </form>
3092 </form>
3074 <div id="doc">
3093 <div id="doc">
3075 <h1>Changegroups</h1>
3094 <h1>Changegroups</h1>
3076 <p>
3095 <p>
3077 Changegroups are representations of repository revlog data, specifically
3096 Changegroups are representations of repository revlog data, specifically
3078 the changelog data, root/flat manifest data, treemanifest data, and
3097 the changelog data, root/flat manifest data, treemanifest data, and
3079 filelogs.
3098 filelogs.
3080 </p>
3099 </p>
3081 <p>
3100 <p>
3082 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3101 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3083 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3102 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3084 only difference being an additional item in the *delta header*. Version
3103 only difference being an additional item in the *delta header*. Version
3085 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3104 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3086 exchanging treemanifests (enabled by setting an option on the
3105 exchanging treemanifests (enabled by setting an option on the
3087 &quot;changegroup&quot; part in the bundle2).
3106 &quot;changegroup&quot; part in the bundle2).
3088 </p>
3107 </p>
3089 <p>
3108 <p>
3090 Changegroups when not exchanging treemanifests consist of 3 logical
3109 Changegroups when not exchanging treemanifests consist of 3 logical
3091 segments:
3110 segments:
3092 </p>
3111 </p>
3093 <pre>
3112 <pre>
3094 +---------------------------------+
3113 +---------------------------------+
3095 | | | |
3114 | | | |
3096 | changeset | manifest | filelogs |
3115 | changeset | manifest | filelogs |
3097 | | | |
3116 | | | |
3098 | | | |
3117 | | | |
3099 +---------------------------------+
3118 +---------------------------------+
3100 </pre>
3119 </pre>
3101 <p>
3120 <p>
3102 When exchanging treemanifests, there are 4 logical segments:
3121 When exchanging treemanifests, there are 4 logical segments:
3103 </p>
3122 </p>
3104 <pre>
3123 <pre>
3105 +-------------------------------------------------+
3124 +-------------------------------------------------+
3106 | | | | |
3125 | | | | |
3107 | changeset | root | treemanifests | filelogs |
3126 | changeset | root | treemanifests | filelogs |
3108 | | manifest | | |
3127 | | manifest | | |
3109 | | | | |
3128 | | | | |
3110 +-------------------------------------------------+
3129 +-------------------------------------------------+
3111 </pre>
3130 </pre>
3112 <p>
3131 <p>
3113 The principle building block of each segment is a *chunk*. A *chunk*
3132 The principle building block of each segment is a *chunk*. A *chunk*
3114 is a framed piece of data:
3133 is a framed piece of data:
3115 </p>
3134 </p>
3116 <pre>
3135 <pre>
3117 +---------------------------------------+
3136 +---------------------------------------+
3118 | | |
3137 | | |
3119 | length | data |
3138 | length | data |
3120 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3139 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3121 | | |
3140 | | |
3122 +---------------------------------------+
3141 +---------------------------------------+
3123 </pre>
3142 </pre>
3124 <p>
3143 <p>
3125 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3144 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3126 integer indicating the length of the entire chunk (including the length field
3145 integer indicating the length of the entire chunk (including the length field
3127 itself).
3146 itself).
3128 </p>
3147 </p>
3129 <p>
3148 <p>
3130 There is a special case chunk that has a value of 0 for the length
3149 There is a special case chunk that has a value of 0 for the length
3131 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3150 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3132 </p>
3151 </p>
3133 <h2>Delta Groups</h2>
3152 <h2>Delta Groups</h2>
3134 <p>
3153 <p>
3135 A *delta group* expresses the content of a revlog as a series of deltas,
3154 A *delta group* expresses the content of a revlog as a series of deltas,
3136 or patches against previous revisions.
3155 or patches against previous revisions.
3137 </p>
3156 </p>
3138 <p>
3157 <p>
3139 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3158 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3140 to signal the end of the delta group:
3159 to signal the end of the delta group:
3141 </p>
3160 </p>
3142 <pre>
3161 <pre>
3143 +------------------------------------------------------------------------+
3162 +------------------------------------------------------------------------+
3144 | | | | | |
3163 | | | | | |
3145 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3164 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3146 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3165 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3147 | | | | | |
3166 | | | | | |
3148 +------------------------------------------------------------------------+
3167 +------------------------------------------------------------------------+
3149 </pre>
3168 </pre>
3150 <p>
3169 <p>
3151 Each *chunk*'s data consists of the following:
3170 Each *chunk*'s data consists of the following:
3152 </p>
3171 </p>
3153 <pre>
3172 <pre>
3154 +---------------------------------------+
3173 +---------------------------------------+
3155 | | |
3174 | | |
3156 | delta header | delta data |
3175 | delta header | delta data |
3157 | (various by version) | (various) |
3176 | (various by version) | (various) |
3158 | | |
3177 | | |
3159 +---------------------------------------+
3178 +---------------------------------------+
3160 </pre>
3179 </pre>
3161 <p>
3180 <p>
3162 The *delta data* is a series of *delta*s that describe a diff from an existing
3181 The *delta data* is a series of *delta*s that describe a diff from an existing
3163 entry (either that the recipient already has, or previously specified in the
3182 entry (either that the recipient already has, or previously specified in the
3164 bundlei/changegroup).
3183 bundlei/changegroup).
3165 </p>
3184 </p>
3166 <p>
3185 <p>
3167 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3186 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3168 &quot;3&quot; of the changegroup format.
3187 &quot;3&quot; of the changegroup format.
3169 </p>
3188 </p>
3170 <p>
3189 <p>
3171 Version 1 (headerlen=80):
3190 Version 1 (headerlen=80):
3172 </p>
3191 </p>
3173 <pre>
3192 <pre>
3174 +------------------------------------------------------+
3193 +------------------------------------------------------+
3175 | | | | |
3194 | | | | |
3176 | node | p1 node | p2 node | link node |
3195 | node | p1 node | p2 node | link node |
3177 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3196 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3178 | | | | |
3197 | | | | |
3179 +------------------------------------------------------+
3198 +------------------------------------------------------+
3180 </pre>
3199 </pre>
3181 <p>
3200 <p>
3182 Version 2 (headerlen=100):
3201 Version 2 (headerlen=100):
3183 </p>
3202 </p>
3184 <pre>
3203 <pre>
3185 +------------------------------------------------------------------+
3204 +------------------------------------------------------------------+
3186 | | | | | |
3205 | | | | | |
3187 | node | p1 node | p2 node | base node | link node |
3206 | node | p1 node | p2 node | base node | link node |
3188 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3207 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3189 | | | | | |
3208 | | | | | |
3190 +------------------------------------------------------------------+
3209 +------------------------------------------------------------------+
3191 </pre>
3210 </pre>
3192 <p>
3211 <p>
3193 Version 3 (headerlen=102):
3212 Version 3 (headerlen=102):
3194 </p>
3213 </p>
3195 <pre>
3214 <pre>
3196 +------------------------------------------------------------------------------+
3215 +------------------------------------------------------------------------------+
3197 | | | | | | |
3216 | | | | | | |
3198 | node | p1 node | p2 node | base node | link node | flags |
3217 | node | p1 node | p2 node | base node | link node | flags |
3199 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3218 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3200 | | | | | | |
3219 | | | | | | |
3201 +------------------------------------------------------------------------------+
3220 +------------------------------------------------------------------------------+
3202 </pre>
3221 </pre>
3203 <p>
3222 <p>
3204 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3223 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3205 series of *delta*s, densely packed (no separators). These deltas describe a diff
3224 series of *delta*s, densely packed (no separators). These deltas describe a diff
3206 from an existing entry (either that the recipient already has, or previously
3225 from an existing entry (either that the recipient already has, or previously
3207 specified in the bundle/changegroup). The format is described more fully in
3226 specified in the bundle/changegroup). The format is described more fully in
3208 &quot;hg help internals.bdiff&quot;, but briefly:
3227 &quot;hg help internals.bdiff&quot;, but briefly:
3209 </p>
3228 </p>
3210 <pre>
3229 <pre>
3211 +---------------------------------------------------------------+
3230 +---------------------------------------------------------------+
3212 | | | | |
3231 | | | | |
3213 | start offset | end offset | new length | content |
3232 | start offset | end offset | new length | content |
3214 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3233 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3215 | | | | |
3234 | | | | |
3216 +---------------------------------------------------------------+
3235 +---------------------------------------------------------------+
3217 </pre>
3236 </pre>
3218 <p>
3237 <p>
3219 Please note that the length field in the delta data does *not* include itself.
3238 Please note that the length field in the delta data does *not* include itself.
3220 </p>
3239 </p>
3221 <p>
3240 <p>
3222 In version 1, the delta is always applied against the previous node from
3241 In version 1, the delta is always applied against the previous node from
3223 the changegroup or the first parent if this is the first entry in the
3242 the changegroup or the first parent if this is the first entry in the
3224 changegroup.
3243 changegroup.
3225 </p>
3244 </p>
3226 <p>
3245 <p>
3227 In version 2 and up, the delta base node is encoded in the entry in the
3246 In version 2 and up, the delta base node is encoded in the entry in the
3228 changegroup. This allows the delta to be expressed against any parent,
3247 changegroup. This allows the delta to be expressed against any parent,
3229 which can result in smaller deltas and more efficient encoding of data.
3248 which can result in smaller deltas and more efficient encoding of data.
3230 </p>
3249 </p>
3231 <h2>Changeset Segment</h2>
3250 <h2>Changeset Segment</h2>
3232 <p>
3251 <p>
3233 The *changeset segment* consists of a single *delta group* holding
3252 The *changeset segment* consists of a single *delta group* holding
3234 changelog data. The *empty chunk* at the end of the *delta group* denotes
3253 changelog data. The *empty chunk* at the end of the *delta group* denotes
3235 the boundary to the *manifest segment*.
3254 the boundary to the *manifest segment*.
3236 </p>
3255 </p>
3237 <h2>Manifest Segment</h2>
3256 <h2>Manifest Segment</h2>
3238 <p>
3257 <p>
3239 The *manifest segment* consists of a single *delta group* holding manifest
3258 The *manifest segment* consists of a single *delta group* holding manifest
3240 data. If treemanifests are in use, it contains only the manifest for the
3259 data. If treemanifests are in use, it contains only the manifest for the
3241 root directory of the repository. Otherwise, it contains the entire
3260 root directory of the repository. Otherwise, it contains the entire
3242 manifest data. The *empty chunk* at the end of the *delta group* denotes
3261 manifest data. The *empty chunk* at the end of the *delta group* denotes
3243 the boundary to the next segment (either the *treemanifests segment* or the
3262 the boundary to the next segment (either the *treemanifests segment* or the
3244 *filelogs segment*, depending on version and the request options).
3263 *filelogs segment*, depending on version and the request options).
3245 </p>
3264 </p>
3246 <h3>Treemanifests Segment</h3>
3265 <h3>Treemanifests Segment</h3>
3247 <p>
3266 <p>
3248 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3267 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3249 only if the 'treemanifest' param is part of the bundle2 changegroup part
3268 only if the 'treemanifest' param is part of the bundle2 changegroup part
3250 (it is not possible to use changegroup version 3 outside of bundle2).
3269 (it is not possible to use changegroup version 3 outside of bundle2).
3251 Aside from the filenames in the *treemanifests segment* containing a
3270 Aside from the filenames in the *treemanifests segment* containing a
3252 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3271 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3253 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3272 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3254 a sub-segment with filename size 0). This denotes the boundary to the
3273 a sub-segment with filename size 0). This denotes the boundary to the
3255 *filelogs segment*.
3274 *filelogs segment*.
3256 </p>
3275 </p>
3257 <h2>Filelogs Segment</h2>
3276 <h2>Filelogs Segment</h2>
3258 <p>
3277 <p>
3259 The *filelogs segment* consists of multiple sub-segments, each
3278 The *filelogs segment* consists of multiple sub-segments, each
3260 corresponding to an individual file whose data is being described:
3279 corresponding to an individual file whose data is being described:
3261 </p>
3280 </p>
3262 <pre>
3281 <pre>
3263 +--------------------------------------------------+
3282 +--------------------------------------------------+
3264 | | | | | |
3283 | | | | | |
3265 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3284 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3266 | | | | | (4 bytes) |
3285 | | | | | (4 bytes) |
3267 | | | | | |
3286 | | | | | |
3268 +--------------------------------------------------+
3287 +--------------------------------------------------+
3269 </pre>
3288 </pre>
3270 <p>
3289 <p>
3271 The final filelog sub-segment is followed by an *empty chunk* (logically,
3290 The final filelog sub-segment is followed by an *empty chunk* (logically,
3272 a sub-segment with filename size 0). This denotes the end of the segment
3291 a sub-segment with filename size 0). This denotes the end of the segment
3273 and of the overall changegroup.
3292 and of the overall changegroup.
3274 </p>
3293 </p>
3275 <p>
3294 <p>
3276 Each filelog sub-segment consists of the following:
3295 Each filelog sub-segment consists of the following:
3277 </p>
3296 </p>
3278 <pre>
3297 <pre>
3279 +------------------------------------------------------+
3298 +------------------------------------------------------+
3280 | | | |
3299 | | | |
3281 | filename length | filename | delta group |
3300 | filename length | filename | delta group |
3282 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3301 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3283 | | | |
3302 | | | |
3284 +------------------------------------------------------+
3303 +------------------------------------------------------+
3285 </pre>
3304 </pre>
3286 <p>
3305 <p>
3287 That is, a *chunk* consisting of the filename (not terminated or padded)
3306 That is, a *chunk* consisting of the filename (not terminated or padded)
3288 followed by N chunks constituting the *delta group* for this file. The
3307 followed by N chunks constituting the *delta group* for this file. The
3289 *empty chunk* at the end of each *delta group* denotes the boundary to the
3308 *empty chunk* at the end of each *delta group* denotes the boundary to the
3290 next filelog sub-segment.
3309 next filelog sub-segment.
3291 </p>
3310 </p>
3292
3311
3293 </div>
3312 </div>
3294 </div>
3313 </div>
3295 </div>
3314 </div>
3296
3315
3297
3316
3298
3317
3299 </body>
3318 </body>
3300 </html>
3319 </html>
3301
3320
3302
3321
3303 $ killdaemons.py
3322 $ killdaemons.py
3304
3323
3305 #endif
3324 #endif
@@ -1,1642 +1,1646 b''
1 #require serve
1 #require serve
2
2
3 $ request() {
3 $ request() {
4 > get-with-headers.py --json localhost:$HGPORT "$1"
4 > get-with-headers.py --json localhost:$HGPORT "$1"
5 > }
5 > }
6
6
7 $ hg init test
7 $ hg init test
8 $ cd test
8 $ cd test
9 $ mkdir da
9 $ mkdir da
10 $ echo foo > da/foo
10 $ echo foo > da/foo
11 $ echo foo > foo
11 $ echo foo > foo
12 $ hg -q ci -A -m initial
12 $ hg -q ci -A -m initial
13 $ echo bar > foo
13 $ echo bar > foo
14 $ hg ci -m 'modify foo'
14 $ hg ci -m 'modify foo'
15 $ echo bar > da/foo
15 $ echo bar > da/foo
16 $ hg ci -m 'modify da/foo'
16 $ hg ci -m 'modify da/foo'
17 $ hg bookmark bookmark1
17 $ hg bookmark bookmark1
18 $ hg up default
18 $ hg up default
19 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 (leaving bookmark bookmark1)
20 (leaving bookmark bookmark1)
21 $ hg mv foo foo-new
21 $ hg mv foo foo-new
22 $ hg commit -m 'move foo'
22 $ hg commit -m 'move foo'
23 $ hg tag -m 'create tag' tag1
23 $ hg tag -m 'create tag' tag1
24 $ hg phase --public -r .
24 $ hg phase --public -r .
25 $ echo baz > da/foo
25 $ echo baz > da/foo
26 $ hg commit -m 'another commit to da/foo'
26 $ hg commit -m 'another commit to da/foo'
27 $ hg tag -m 'create tag2' tag2
27 $ hg tag -m 'create tag2' tag2
28 $ hg bookmark bookmark2
28 $ hg bookmark bookmark2
29 $ hg -q up -r 0
29 $ hg -q up -r 0
30 $ hg -q branch test-branch
30 $ hg -q branch test-branch
31 $ echo branch > foo
31 $ echo branch > foo
32 $ hg commit -m 'create test branch'
32 $ hg commit -m 'create test branch'
33 $ echo branch_commit_2 > foo
33 $ echo branch_commit_2 > foo
34 $ hg commit -m 'another commit in test-branch'
34 $ hg commit -m 'another commit in test-branch'
35 $ hg -q up default
35 $ hg -q up default
36 $ hg merge --tool :local test-branch
36 $ hg merge --tool :local test-branch
37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
38 (branch merge, don't forget to commit)
38 (branch merge, don't forget to commit)
39 $ hg commit -m 'merge test-branch into default'
39 $ hg commit -m 'merge test-branch into default'
40
40
41 $ hg log -G
41 $ hg log -G
42 @ changeset: 9:cc725e08502a
42 @ changeset: 9:cc725e08502a
43 |\ tag: tip
43 |\ tag: tip
44 | | parent: 6:ceed296fe500
44 | | parent: 6:ceed296fe500
45 | | parent: 8:ed66c30e87eb
45 | | parent: 8:ed66c30e87eb
46 | | user: test
46 | | user: test
47 | | date: Thu Jan 01 00:00:00 1970 +0000
47 | | date: Thu Jan 01 00:00:00 1970 +0000
48 | | summary: merge test-branch into default
48 | | summary: merge test-branch into default
49 | |
49 | |
50 | o changeset: 8:ed66c30e87eb
50 | o changeset: 8:ed66c30e87eb
51 | | branch: test-branch
51 | | branch: test-branch
52 | | user: test
52 | | user: test
53 | | date: Thu Jan 01 00:00:00 1970 +0000
53 | | date: Thu Jan 01 00:00:00 1970 +0000
54 | | summary: another commit in test-branch
54 | | summary: another commit in test-branch
55 | |
55 | |
56 | o changeset: 7:6ab967a8ab34
56 | o changeset: 7:6ab967a8ab34
57 | | branch: test-branch
57 | | branch: test-branch
58 | | parent: 0:06e557f3edf6
58 | | parent: 0:06e557f3edf6
59 | | user: test
59 | | user: test
60 | | date: Thu Jan 01 00:00:00 1970 +0000
60 | | date: Thu Jan 01 00:00:00 1970 +0000
61 | | summary: create test branch
61 | | summary: create test branch
62 | |
62 | |
63 o | changeset: 6:ceed296fe500
63 o | changeset: 6:ceed296fe500
64 | | bookmark: bookmark2
64 | | bookmark: bookmark2
65 | | user: test
65 | | user: test
66 | | date: Thu Jan 01 00:00:00 1970 +0000
66 | | date: Thu Jan 01 00:00:00 1970 +0000
67 | | summary: create tag2
67 | | summary: create tag2
68 | |
68 | |
69 o | changeset: 5:f2890a05fea4
69 o | changeset: 5:f2890a05fea4
70 | | tag: tag2
70 | | tag: tag2
71 | | user: test
71 | | user: test
72 | | date: Thu Jan 01 00:00:00 1970 +0000
72 | | date: Thu Jan 01 00:00:00 1970 +0000
73 | | summary: another commit to da/foo
73 | | summary: another commit to da/foo
74 | |
74 | |
75 o | changeset: 4:93a8ce14f891
75 o | changeset: 4:93a8ce14f891
76 | | user: test
76 | | user: test
77 | | date: Thu Jan 01 00:00:00 1970 +0000
77 | | date: Thu Jan 01 00:00:00 1970 +0000
78 | | summary: create tag
78 | | summary: create tag
79 | |
79 | |
80 o | changeset: 3:78896eb0e102
80 o | changeset: 3:78896eb0e102
81 | | tag: tag1
81 | | tag: tag1
82 | | user: test
82 | | user: test
83 | | date: Thu Jan 01 00:00:00 1970 +0000
83 | | date: Thu Jan 01 00:00:00 1970 +0000
84 | | summary: move foo
84 | | summary: move foo
85 | |
85 | |
86 o | changeset: 2:8d7c456572ac
86 o | changeset: 2:8d7c456572ac
87 | | bookmark: bookmark1
87 | | bookmark: bookmark1
88 | | user: test
88 | | user: test
89 | | date: Thu Jan 01 00:00:00 1970 +0000
89 | | date: Thu Jan 01 00:00:00 1970 +0000
90 | | summary: modify da/foo
90 | | summary: modify da/foo
91 | |
91 | |
92 o | changeset: 1:f8bbb9024b10
92 o | changeset: 1:f8bbb9024b10
93 |/ user: test
93 |/ user: test
94 | date: Thu Jan 01 00:00:00 1970 +0000
94 | date: Thu Jan 01 00:00:00 1970 +0000
95 | summary: modify foo
95 | summary: modify foo
96 |
96 |
97 o changeset: 0:06e557f3edf6
97 o changeset: 0:06e557f3edf6
98 user: test
98 user: test
99 date: Thu Jan 01 00:00:00 1970 +0000
99 date: Thu Jan 01 00:00:00 1970 +0000
100 summary: initial
100 summary: initial
101
101
102
102
103 $ echo '[web]' >> .hg/hgrc
103 $ echo '[web]' >> .hg/hgrc
104 $ echo 'allow_archive = bz2' >> .hg/hgrc
104 $ echo 'allow_archive = bz2' >> .hg/hgrc
105 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
105 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
106 $ cat hg.pid >> $DAEMON_PIDS
106 $ cat hg.pid >> $DAEMON_PIDS
107
107
108 (Try to keep these in roughly the order they are defined in webcommands.py)
108 (Try to keep these in roughly the order they are defined in webcommands.py)
109
109
110 (log is handled by filelog/ and changelog/ - ignore it)
110 (log is handled by filelog/ and changelog/ - ignore it)
111
111
112 (rawfile/ doesn't use templating - nothing to test)
112 (rawfile/ doesn't use templating - nothing to test)
113
113
114 file/{revision}/{path} shows file revision
114 file/{revision}/{path} shows file revision
115
115
116 $ request json-file/78896eb0e102/foo-new
116 $ request json-file/78896eb0e102/foo-new
117 200 Script output follows
117 200 Script output follows
118
118
119 {
119 {
120 "bookmarks": [],
120 "bookmarks": [],
121 "branch": "default",
121 "branch": "default",
122 "date": [
122 "date": [
123 0.0,
123 0.0,
124 0
124 0
125 ],
125 ],
126 "desc": "move foo",
126 "desc": "move foo",
127 "lines": [
127 "lines": [
128 {
128 {
129 "line": "bar\n"
129 "line": "bar\n"
130 }
130 }
131 ],
131 ],
132 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
132 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
133 "parents": [
133 "parents": [
134 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
134 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
135 ],
135 ],
136 "path": "foo-new",
136 "path": "foo-new",
137 "phase": "public",
137 "phase": "public",
138 "tags": [
138 "tags": [
139 "tag1"
139 "tag1"
140 ],
140 ],
141 "user": "test"
141 "user": "test"
142 }
142 }
143
143
144 file/{revision} shows root directory info
144 file/{revision} shows root directory info
145
145
146 $ request json-file/cc725e08502a
146 $ request json-file/cc725e08502a
147 200 Script output follows
147 200 Script output follows
148
148
149 {
149 {
150 "abspath": "/",
150 "abspath": "/",
151 "bookmarks": [],
151 "bookmarks": [],
152 "directories": [
152 "directories": [
153 {
153 {
154 "abspath": "/da",
154 "abspath": "/da",
155 "basename": "da",
155 "basename": "da",
156 "emptydirs": ""
156 "emptydirs": ""
157 }
157 }
158 ],
158 ],
159 "files": [
159 "files": [
160 {
160 {
161 "abspath": ".hgtags",
161 "abspath": ".hgtags",
162 "basename": ".hgtags",
162 "basename": ".hgtags",
163 "date": [
163 "date": [
164 0.0,
164 0.0,
165 0
165 0
166 ],
166 ],
167 "flags": "",
167 "flags": "",
168 "size": 92
168 "size": 92
169 },
169 },
170 {
170 {
171 "abspath": "foo-new",
171 "abspath": "foo-new",
172 "basename": "foo-new",
172 "basename": "foo-new",
173 "date": [
173 "date": [
174 0.0,
174 0.0,
175 0
175 0
176 ],
176 ],
177 "flags": "",
177 "flags": "",
178 "size": 4
178 "size": 4
179 }
179 }
180 ],
180 ],
181 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
181 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
182 "tags": [
182 "tags": [
183 "tip"
183 "tip"
184 ]
184 ]
185 }
185 }
186
186
187 changelog/ shows information about several changesets
187 changelog/ shows information about several changesets
188
188
189 $ request json-changelog
189 $ request json-changelog
190 200 Script output follows
190 200 Script output follows
191
191
192 {
192 {
193 "changeset_count": 10,
193 "changeset_count": 10,
194 "changesets": [
194 "changesets": [
195 {
195 {
196 "bookmarks": [],
196 "bookmarks": [],
197 "branch": "default",
197 "branch": "default",
198 "date": [
198 "date": [
199 0.0,
199 0.0,
200 0
200 0
201 ],
201 ],
202 "desc": "merge test-branch into default",
202 "desc": "merge test-branch into default",
203 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
203 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
204 "parents": [
204 "parents": [
205 "ceed296fe500c3fac9541e31dad860cb49c89e45",
205 "ceed296fe500c3fac9541e31dad860cb49c89e45",
206 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
206 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
207 ],
207 ],
208 "phase": "draft",
208 "phase": "draft",
209 "tags": [
209 "tags": [
210 "tip"
210 "tip"
211 ],
211 ],
212 "user": "test"
212 "user": "test"
213 },
213 },
214 {
214 {
215 "bookmarks": [],
215 "bookmarks": [],
216 "branch": "test-branch",
216 "branch": "test-branch",
217 "date": [
217 "date": [
218 0.0,
218 0.0,
219 0
219 0
220 ],
220 ],
221 "desc": "another commit in test-branch",
221 "desc": "another commit in test-branch",
222 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
222 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
223 "parents": [
223 "parents": [
224 "6ab967a8ab3489227a83f80e920faa039a71819f"
224 "6ab967a8ab3489227a83f80e920faa039a71819f"
225 ],
225 ],
226 "phase": "draft",
226 "phase": "draft",
227 "tags": [],
227 "tags": [],
228 "user": "test"
228 "user": "test"
229 },
229 },
230 {
230 {
231 "bookmarks": [],
231 "bookmarks": [],
232 "branch": "test-branch",
232 "branch": "test-branch",
233 "date": [
233 "date": [
234 0.0,
234 0.0,
235 0
235 0
236 ],
236 ],
237 "desc": "create test branch",
237 "desc": "create test branch",
238 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
238 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
239 "parents": [
239 "parents": [
240 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
240 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
241 ],
241 ],
242 "phase": "draft",
242 "phase": "draft",
243 "tags": [],
243 "tags": [],
244 "user": "test"
244 "user": "test"
245 },
245 },
246 {
246 {
247 "bookmarks": [
247 "bookmarks": [
248 "bookmark2"
248 "bookmark2"
249 ],
249 ],
250 "branch": "default",
250 "branch": "default",
251 "date": [
251 "date": [
252 0.0,
252 0.0,
253 0
253 0
254 ],
254 ],
255 "desc": "create tag2",
255 "desc": "create tag2",
256 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
256 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
257 "parents": [
257 "parents": [
258 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
258 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
259 ],
259 ],
260 "phase": "draft",
260 "phase": "draft",
261 "tags": [],
261 "tags": [],
262 "user": "test"
262 "user": "test"
263 },
263 },
264 {
264 {
265 "bookmarks": [],
265 "bookmarks": [],
266 "branch": "default",
266 "branch": "default",
267 "date": [
267 "date": [
268 0.0,
268 0.0,
269 0
269 0
270 ],
270 ],
271 "desc": "another commit to da/foo",
271 "desc": "another commit to da/foo",
272 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
272 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
273 "parents": [
273 "parents": [
274 "93a8ce14f89156426b7fa981af8042da53f03aa0"
274 "93a8ce14f89156426b7fa981af8042da53f03aa0"
275 ],
275 ],
276 "phase": "draft",
276 "phase": "draft",
277 "tags": [
277 "tags": [
278 "tag2"
278 "tag2"
279 ],
279 ],
280 "user": "test"
280 "user": "test"
281 },
281 },
282 {
282 {
283 "bookmarks": [],
283 "bookmarks": [],
284 "branch": "default",
284 "branch": "default",
285 "date": [
285 "date": [
286 0.0,
286 0.0,
287 0
287 0
288 ],
288 ],
289 "desc": "create tag",
289 "desc": "create tag",
290 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
290 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
291 "parents": [
291 "parents": [
292 "78896eb0e102174ce9278438a95e12543e4367a7"
292 "78896eb0e102174ce9278438a95e12543e4367a7"
293 ],
293 ],
294 "phase": "public",
294 "phase": "public",
295 "tags": [],
295 "tags": [],
296 "user": "test"
296 "user": "test"
297 },
297 },
298 {
298 {
299 "bookmarks": [],
299 "bookmarks": [],
300 "branch": "default",
300 "branch": "default",
301 "date": [
301 "date": [
302 0.0,
302 0.0,
303 0
303 0
304 ],
304 ],
305 "desc": "move foo",
305 "desc": "move foo",
306 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
306 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
307 "parents": [
307 "parents": [
308 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
308 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
309 ],
309 ],
310 "phase": "public",
310 "phase": "public",
311 "tags": [
311 "tags": [
312 "tag1"
312 "tag1"
313 ],
313 ],
314 "user": "test"
314 "user": "test"
315 },
315 },
316 {
316 {
317 "bookmarks": [
317 "bookmarks": [
318 "bookmark1"
318 "bookmark1"
319 ],
319 ],
320 "branch": "default",
320 "branch": "default",
321 "date": [
321 "date": [
322 0.0,
322 0.0,
323 0
323 0
324 ],
324 ],
325 "desc": "modify da/foo",
325 "desc": "modify da/foo",
326 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
326 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
327 "parents": [
327 "parents": [
328 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
328 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
329 ],
329 ],
330 "phase": "public",
330 "phase": "public",
331 "tags": [],
331 "tags": [],
332 "user": "test"
332 "user": "test"
333 },
333 },
334 {
334 {
335 "bookmarks": [],
335 "bookmarks": [],
336 "branch": "default",
336 "branch": "default",
337 "date": [
337 "date": [
338 0.0,
338 0.0,
339 0
339 0
340 ],
340 ],
341 "desc": "modify foo",
341 "desc": "modify foo",
342 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
342 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
343 "parents": [
343 "parents": [
344 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
344 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
345 ],
345 ],
346 "phase": "public",
346 "phase": "public",
347 "tags": [],
347 "tags": [],
348 "user": "test"
348 "user": "test"
349 },
349 },
350 {
350 {
351 "bookmarks": [],
351 "bookmarks": [],
352 "branch": "default",
352 "branch": "default",
353 "date": [
353 "date": [
354 0.0,
354 0.0,
355 0
355 0
356 ],
356 ],
357 "desc": "initial",
357 "desc": "initial",
358 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
358 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
359 "parents": [],
359 "parents": [],
360 "phase": "public",
360 "phase": "public",
361 "tags": [],
361 "tags": [],
362 "user": "test"
362 "user": "test"
363 }
363 }
364 ],
364 ],
365 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
365 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
366 }
366 }
367
367
368 changelog/{revision} shows information starting at a specific changeset
368 changelog/{revision} shows information starting at a specific changeset
369
369
370 $ request json-changelog/f8bbb9024b10
370 $ request json-changelog/f8bbb9024b10
371 200 Script output follows
371 200 Script output follows
372
372
373 {
373 {
374 "changeset_count": 10,
374 "changeset_count": 10,
375 "changesets": [
375 "changesets": [
376 {
376 {
377 "bookmarks": [],
377 "bookmarks": [],
378 "branch": "default",
378 "branch": "default",
379 "date": [
379 "date": [
380 0.0,
380 0.0,
381 0
381 0
382 ],
382 ],
383 "desc": "modify foo",
383 "desc": "modify foo",
384 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
384 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
385 "parents": [
385 "parents": [
386 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
386 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
387 ],
387 ],
388 "phase": "public",
388 "phase": "public",
389 "tags": [],
389 "tags": [],
390 "user": "test"
390 "user": "test"
391 },
391 },
392 {
392 {
393 "bookmarks": [],
393 "bookmarks": [],
394 "branch": "default",
394 "branch": "default",
395 "date": [
395 "date": [
396 0.0,
396 0.0,
397 0
397 0
398 ],
398 ],
399 "desc": "initial",
399 "desc": "initial",
400 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
400 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
401 "parents": [],
401 "parents": [],
402 "phase": "public",
402 "phase": "public",
403 "tags": [],
403 "tags": [],
404 "user": "test"
404 "user": "test"
405 }
405 }
406 ],
406 ],
407 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
407 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
408 }
408 }
409
409
410 shortlog/ shows information about a set of changesets
410 shortlog/ shows information about a set of changesets
411
411
412 $ request json-shortlog
412 $ request json-shortlog
413 200 Script output follows
413 200 Script output follows
414
414
415 {
415 {
416 "changeset_count": 10,
416 "changeset_count": 10,
417 "changesets": [
417 "changesets": [
418 {
418 {
419 "bookmarks": [],
419 "bookmarks": [],
420 "branch": "default",
420 "branch": "default",
421 "date": [
421 "date": [
422 0.0,
422 0.0,
423 0
423 0
424 ],
424 ],
425 "desc": "merge test-branch into default",
425 "desc": "merge test-branch into default",
426 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
426 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
427 "parents": [
427 "parents": [
428 "ceed296fe500c3fac9541e31dad860cb49c89e45",
428 "ceed296fe500c3fac9541e31dad860cb49c89e45",
429 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
429 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
430 ],
430 ],
431 "phase": "draft",
431 "phase": "draft",
432 "tags": [
432 "tags": [
433 "tip"
433 "tip"
434 ],
434 ],
435 "user": "test"
435 "user": "test"
436 },
436 },
437 {
437 {
438 "bookmarks": [],
438 "bookmarks": [],
439 "branch": "test-branch",
439 "branch": "test-branch",
440 "date": [
440 "date": [
441 0.0,
441 0.0,
442 0
442 0
443 ],
443 ],
444 "desc": "another commit in test-branch",
444 "desc": "another commit in test-branch",
445 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
445 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
446 "parents": [
446 "parents": [
447 "6ab967a8ab3489227a83f80e920faa039a71819f"
447 "6ab967a8ab3489227a83f80e920faa039a71819f"
448 ],
448 ],
449 "phase": "draft",
449 "phase": "draft",
450 "tags": [],
450 "tags": [],
451 "user": "test"
451 "user": "test"
452 },
452 },
453 {
453 {
454 "bookmarks": [],
454 "bookmarks": [],
455 "branch": "test-branch",
455 "branch": "test-branch",
456 "date": [
456 "date": [
457 0.0,
457 0.0,
458 0
458 0
459 ],
459 ],
460 "desc": "create test branch",
460 "desc": "create test branch",
461 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
461 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
462 "parents": [
462 "parents": [
463 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
463 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
464 ],
464 ],
465 "phase": "draft",
465 "phase": "draft",
466 "tags": [],
466 "tags": [],
467 "user": "test"
467 "user": "test"
468 },
468 },
469 {
469 {
470 "bookmarks": [
470 "bookmarks": [
471 "bookmark2"
471 "bookmark2"
472 ],
472 ],
473 "branch": "default",
473 "branch": "default",
474 "date": [
474 "date": [
475 0.0,
475 0.0,
476 0
476 0
477 ],
477 ],
478 "desc": "create tag2",
478 "desc": "create tag2",
479 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
479 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
480 "parents": [
480 "parents": [
481 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
481 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
482 ],
482 ],
483 "phase": "draft",
483 "phase": "draft",
484 "tags": [],
484 "tags": [],
485 "user": "test"
485 "user": "test"
486 },
486 },
487 {
487 {
488 "bookmarks": [],
488 "bookmarks": [],
489 "branch": "default",
489 "branch": "default",
490 "date": [
490 "date": [
491 0.0,
491 0.0,
492 0
492 0
493 ],
493 ],
494 "desc": "another commit to da/foo",
494 "desc": "another commit to da/foo",
495 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
495 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
496 "parents": [
496 "parents": [
497 "93a8ce14f89156426b7fa981af8042da53f03aa0"
497 "93a8ce14f89156426b7fa981af8042da53f03aa0"
498 ],
498 ],
499 "phase": "draft",
499 "phase": "draft",
500 "tags": [
500 "tags": [
501 "tag2"
501 "tag2"
502 ],
502 ],
503 "user": "test"
503 "user": "test"
504 },
504 },
505 {
505 {
506 "bookmarks": [],
506 "bookmarks": [],
507 "branch": "default",
507 "branch": "default",
508 "date": [
508 "date": [
509 0.0,
509 0.0,
510 0
510 0
511 ],
511 ],
512 "desc": "create tag",
512 "desc": "create tag",
513 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
513 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
514 "parents": [
514 "parents": [
515 "78896eb0e102174ce9278438a95e12543e4367a7"
515 "78896eb0e102174ce9278438a95e12543e4367a7"
516 ],
516 ],
517 "phase": "public",
517 "phase": "public",
518 "tags": [],
518 "tags": [],
519 "user": "test"
519 "user": "test"
520 },
520 },
521 {
521 {
522 "bookmarks": [],
522 "bookmarks": [],
523 "branch": "default",
523 "branch": "default",
524 "date": [
524 "date": [
525 0.0,
525 0.0,
526 0
526 0
527 ],
527 ],
528 "desc": "move foo",
528 "desc": "move foo",
529 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
529 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
530 "parents": [
530 "parents": [
531 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
531 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
532 ],
532 ],
533 "phase": "public",
533 "phase": "public",
534 "tags": [
534 "tags": [
535 "tag1"
535 "tag1"
536 ],
536 ],
537 "user": "test"
537 "user": "test"
538 },
538 },
539 {
539 {
540 "bookmarks": [
540 "bookmarks": [
541 "bookmark1"
541 "bookmark1"
542 ],
542 ],
543 "branch": "default",
543 "branch": "default",
544 "date": [
544 "date": [
545 0.0,
545 0.0,
546 0
546 0
547 ],
547 ],
548 "desc": "modify da/foo",
548 "desc": "modify da/foo",
549 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
549 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
550 "parents": [
550 "parents": [
551 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
551 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
552 ],
552 ],
553 "phase": "public",
553 "phase": "public",
554 "tags": [],
554 "tags": [],
555 "user": "test"
555 "user": "test"
556 },
556 },
557 {
557 {
558 "bookmarks": [],
558 "bookmarks": [],
559 "branch": "default",
559 "branch": "default",
560 "date": [
560 "date": [
561 0.0,
561 0.0,
562 0
562 0
563 ],
563 ],
564 "desc": "modify foo",
564 "desc": "modify foo",
565 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
565 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
566 "parents": [
566 "parents": [
567 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
567 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
568 ],
568 ],
569 "phase": "public",
569 "phase": "public",
570 "tags": [],
570 "tags": [],
571 "user": "test"
571 "user": "test"
572 },
572 },
573 {
573 {
574 "bookmarks": [],
574 "bookmarks": [],
575 "branch": "default",
575 "branch": "default",
576 "date": [
576 "date": [
577 0.0,
577 0.0,
578 0
578 0
579 ],
579 ],
580 "desc": "initial",
580 "desc": "initial",
581 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
581 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
582 "parents": [],
582 "parents": [],
583 "phase": "public",
583 "phase": "public",
584 "tags": [],
584 "tags": [],
585 "user": "test"
585 "user": "test"
586 }
586 }
587 ],
587 ],
588 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
588 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
589 }
589 }
590
590
591 changeset/ renders the tip changeset
591 changeset/ renders the tip changeset
592
592
593 $ request json-rev
593 $ request json-rev
594 200 Script output follows
594 200 Script output follows
595
595
596 {
596 {
597 "bookmarks": [],
597 "bookmarks": [],
598 "branch": "default",
598 "branch": "default",
599 "date": [
599 "date": [
600 0.0,
600 0.0,
601 0
601 0
602 ],
602 ],
603 "desc": "merge test-branch into default",
603 "desc": "merge test-branch into default",
604 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
604 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
605 "parents": [
605 "parents": [
606 "ceed296fe500c3fac9541e31dad860cb49c89e45",
606 "ceed296fe500c3fac9541e31dad860cb49c89e45",
607 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
607 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
608 ],
608 ],
609 "phase": "draft",
609 "phase": "draft",
610 "tags": [
610 "tags": [
611 "tip"
611 "tip"
612 ],
612 ],
613 "user": "test"
613 "user": "test"
614 }
614 }
615
615
616 changeset/{revision} shows tags
616 changeset/{revision} shows tags
617
617
618 $ request json-rev/78896eb0e102
618 $ request json-rev/78896eb0e102
619 200 Script output follows
619 200 Script output follows
620
620
621 {
621 {
622 "bookmarks": [],
622 "bookmarks": [],
623 "branch": "default",
623 "branch": "default",
624 "date": [
624 "date": [
625 0.0,
625 0.0,
626 0
626 0
627 ],
627 ],
628 "desc": "move foo",
628 "desc": "move foo",
629 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
629 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
630 "parents": [
630 "parents": [
631 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
631 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
632 ],
632 ],
633 "phase": "public",
633 "phase": "public",
634 "tags": [
634 "tags": [
635 "tag1"
635 "tag1"
636 ],
636 ],
637 "user": "test"
637 "user": "test"
638 }
638 }
639
639
640 changeset/{revision} shows bookmarks
640 changeset/{revision} shows bookmarks
641
641
642 $ request json-rev/8d7c456572ac
642 $ request json-rev/8d7c456572ac
643 200 Script output follows
643 200 Script output follows
644
644
645 {
645 {
646 "bookmarks": [
646 "bookmarks": [
647 "bookmark1"
647 "bookmark1"
648 ],
648 ],
649 "branch": "default",
649 "branch": "default",
650 "date": [
650 "date": [
651 0.0,
651 0.0,
652 0
652 0
653 ],
653 ],
654 "desc": "modify da/foo",
654 "desc": "modify da/foo",
655 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
655 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
656 "parents": [
656 "parents": [
657 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
657 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
658 ],
658 ],
659 "phase": "public",
659 "phase": "public",
660 "tags": [],
660 "tags": [],
661 "user": "test"
661 "user": "test"
662 }
662 }
663
663
664 changeset/{revision} shows branches
664 changeset/{revision} shows branches
665
665
666 $ request json-rev/6ab967a8ab34
666 $ request json-rev/6ab967a8ab34
667 200 Script output follows
667 200 Script output follows
668
668
669 {
669 {
670 "bookmarks": [],
670 "bookmarks": [],
671 "branch": "test-branch",
671 "branch": "test-branch",
672 "date": [
672 "date": [
673 0.0,
673 0.0,
674 0
674 0
675 ],
675 ],
676 "desc": "create test branch",
676 "desc": "create test branch",
677 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
677 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
678 "parents": [
678 "parents": [
679 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
679 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
680 ],
680 ],
681 "phase": "draft",
681 "phase": "draft",
682 "tags": [],
682 "tags": [],
683 "user": "test"
683 "user": "test"
684 }
684 }
685
685
686 manifest/{revision}/{path} shows info about a directory at a revision
686 manifest/{revision}/{path} shows info about a directory at a revision
687
687
688 $ request json-manifest/06e557f3edf6/
688 $ request json-manifest/06e557f3edf6/
689 200 Script output follows
689 200 Script output follows
690
690
691 {
691 {
692 "abspath": "/",
692 "abspath": "/",
693 "bookmarks": [],
693 "bookmarks": [],
694 "directories": [
694 "directories": [
695 {
695 {
696 "abspath": "/da",
696 "abspath": "/da",
697 "basename": "da",
697 "basename": "da",
698 "emptydirs": ""
698 "emptydirs": ""
699 }
699 }
700 ],
700 ],
701 "files": [
701 "files": [
702 {
702 {
703 "abspath": "foo",
703 "abspath": "foo",
704 "basename": "foo",
704 "basename": "foo",
705 "date": [
705 "date": [
706 0.0,
706 0.0,
707 0
707 0
708 ],
708 ],
709 "flags": "",
709 "flags": "",
710 "size": 4
710 "size": 4
711 }
711 }
712 ],
712 ],
713 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
713 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
714 "tags": []
714 "tags": []
715 }
715 }
716
716
717 tags/ shows tags info
717 tags/ shows tags info
718
718
719 $ request json-tags
719 $ request json-tags
720 200 Script output follows
720 200 Script output follows
721
721
722 {
722 {
723 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
723 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
724 "tags": [
724 "tags": [
725 {
725 {
726 "date": [
726 "date": [
727 0.0,
727 0.0,
728 0
728 0
729 ],
729 ],
730 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
730 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
731 "tag": "tag2"
731 "tag": "tag2"
732 },
732 },
733 {
733 {
734 "date": [
734 "date": [
735 0.0,
735 0.0,
736 0
736 0
737 ],
737 ],
738 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
738 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
739 "tag": "tag1"
739 "tag": "tag1"
740 }
740 }
741 ]
741 ]
742 }
742 }
743
743
744 bookmarks/ shows bookmarks info
744 bookmarks/ shows bookmarks info
745
745
746 $ request json-bookmarks
746 $ request json-bookmarks
747 200 Script output follows
747 200 Script output follows
748
748
749 {
749 {
750 "bookmarks": [
750 "bookmarks": [
751 {
751 {
752 "bookmark": "bookmark2",
752 "bookmark": "bookmark2",
753 "date": [
753 "date": [
754 0.0,
754 0.0,
755 0
755 0
756 ],
756 ],
757 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
757 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
758 },
758 },
759 {
759 {
760 "bookmark": "bookmark1",
760 "bookmark": "bookmark1",
761 "date": [
761 "date": [
762 0.0,
762 0.0,
763 0
763 0
764 ],
764 ],
765 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
765 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
766 }
766 }
767 ],
767 ],
768 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
768 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
769 }
769 }
770
770
771 branches/ shows branches info
771 branches/ shows branches info
772
772
773 $ request json-branches
773 $ request json-branches
774 200 Script output follows
774 200 Script output follows
775
775
776 {
776 {
777 "branches": [
777 "branches": [
778 {
778 {
779 "branch": "default",
779 "branch": "default",
780 "date": [
780 "date": [
781 0.0,
781 0.0,
782 0
782 0
783 ],
783 ],
784 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
784 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
785 "status": "open"
785 "status": "open"
786 },
786 },
787 {
787 {
788 "branch": "test-branch",
788 "branch": "test-branch",
789 "date": [
789 "date": [
790 0.0,
790 0.0,
791 0
791 0
792 ],
792 ],
793 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
793 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
794 "status": "inactive"
794 "status": "inactive"
795 }
795 }
796 ]
796 ]
797 }
797 }
798
798
799 summary/ shows a summary of repository state
799 summary/ shows a summary of repository state
800
800
801 $ request json-summary
801 $ request json-summary
802 200 Script output follows
802 200 Script output follows
803
803
804 {
804 {
805 "archives": [
805 "archives": [
806 {
806 {
807 "extension": ".tar.bz2",
807 "extension": ".tar.bz2",
808 "node": "tip",
808 "node": "tip",
809 "type": "bz2",
809 "type": "bz2",
810 "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
810 "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
811 }
811 }
812 ],
812 ],
813 "bookmarks": [
813 "bookmarks": [
814 {
814 {
815 "bookmark": "bookmark2",
815 "bookmark": "bookmark2",
816 "date": [
816 "date": [
817 0.0,
817 0.0,
818 0
818 0
819 ],
819 ],
820 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
820 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
821 },
821 },
822 {
822 {
823 "bookmark": "bookmark1",
823 "bookmark": "bookmark1",
824 "date": [
824 "date": [
825 0.0,
825 0.0,
826 0
826 0
827 ],
827 ],
828 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
828 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
829 }
829 }
830 ],
830 ],
831 "branches": [
831 "branches": [
832 {
832 {
833 "branch": "default",
833 "branch": "default",
834 "date": [
834 "date": [
835 0.0,
835 0.0,
836 0
836 0
837 ],
837 ],
838 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
838 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
839 "status": "open"
839 "status": "open"
840 },
840 },
841 {
841 {
842 "branch": "test-branch",
842 "branch": "test-branch",
843 "date": [
843 "date": [
844 0.0,
844 0.0,
845 0
845 0
846 ],
846 ],
847 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
847 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
848 "status": "inactive"
848 "status": "inactive"
849 }
849 }
850 ],
850 ],
851 "labels": [],
851 "labels": [],
852 "lastchange": [
852 "lastchange": [
853 0.0,
853 0.0,
854 0
854 0
855 ],
855 ],
856 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
856 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
857 "shortlog": [
857 "shortlog": [
858 {
858 {
859 "bookmarks": [],
859 "bookmarks": [],
860 "branch": "default",
860 "branch": "default",
861 "date": [
861 "date": [
862 0.0,
862 0.0,
863 0
863 0
864 ],
864 ],
865 "desc": "merge test-branch into default",
865 "desc": "merge test-branch into default",
866 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
866 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
867 "parents": [
867 "parents": [
868 "ceed296fe500c3fac9541e31dad860cb49c89e45",
868 "ceed296fe500c3fac9541e31dad860cb49c89e45",
869 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
869 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
870 ],
870 ],
871 "phase": "draft",
871 "phase": "draft",
872 "tags": [
872 "tags": [
873 "tip"
873 "tip"
874 ],
874 ],
875 "user": "test"
875 "user": "test"
876 },
876 },
877 {
877 {
878 "bookmarks": [],
878 "bookmarks": [],
879 "branch": "test-branch",
879 "branch": "test-branch",
880 "date": [
880 "date": [
881 0.0,
881 0.0,
882 0
882 0
883 ],
883 ],
884 "desc": "another commit in test-branch",
884 "desc": "another commit in test-branch",
885 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
885 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
886 "parents": [
886 "parents": [
887 "6ab967a8ab3489227a83f80e920faa039a71819f"
887 "6ab967a8ab3489227a83f80e920faa039a71819f"
888 ],
888 ],
889 "phase": "draft",
889 "phase": "draft",
890 "tags": [],
890 "tags": [],
891 "user": "test"
891 "user": "test"
892 },
892 },
893 {
893 {
894 "bookmarks": [],
894 "bookmarks": [],
895 "branch": "test-branch",
895 "branch": "test-branch",
896 "date": [
896 "date": [
897 0.0,
897 0.0,
898 0
898 0
899 ],
899 ],
900 "desc": "create test branch",
900 "desc": "create test branch",
901 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
901 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
902 "parents": [
902 "parents": [
903 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
903 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
904 ],
904 ],
905 "phase": "draft",
905 "phase": "draft",
906 "tags": [],
906 "tags": [],
907 "user": "test"
907 "user": "test"
908 },
908 },
909 {
909 {
910 "bookmarks": [
910 "bookmarks": [
911 "bookmark2"
911 "bookmark2"
912 ],
912 ],
913 "branch": "default",
913 "branch": "default",
914 "date": [
914 "date": [
915 0.0,
915 0.0,
916 0
916 0
917 ],
917 ],
918 "desc": "create tag2",
918 "desc": "create tag2",
919 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
919 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
920 "parents": [
920 "parents": [
921 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
921 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
922 ],
922 ],
923 "phase": "draft",
923 "phase": "draft",
924 "tags": [],
924 "tags": [],
925 "user": "test"
925 "user": "test"
926 },
926 },
927 {
927 {
928 "bookmarks": [],
928 "bookmarks": [],
929 "branch": "default",
929 "branch": "default",
930 "date": [
930 "date": [
931 0.0,
931 0.0,
932 0
932 0
933 ],
933 ],
934 "desc": "another commit to da/foo",
934 "desc": "another commit to da/foo",
935 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
935 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
936 "parents": [
936 "parents": [
937 "93a8ce14f89156426b7fa981af8042da53f03aa0"
937 "93a8ce14f89156426b7fa981af8042da53f03aa0"
938 ],
938 ],
939 "phase": "draft",
939 "phase": "draft",
940 "tags": [
940 "tags": [
941 "tag2"
941 "tag2"
942 ],
942 ],
943 "user": "test"
943 "user": "test"
944 },
944 },
945 {
945 {
946 "bookmarks": [],
946 "bookmarks": [],
947 "branch": "default",
947 "branch": "default",
948 "date": [
948 "date": [
949 0.0,
949 0.0,
950 0
950 0
951 ],
951 ],
952 "desc": "create tag",
952 "desc": "create tag",
953 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
953 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
954 "parents": [
954 "parents": [
955 "78896eb0e102174ce9278438a95e12543e4367a7"
955 "78896eb0e102174ce9278438a95e12543e4367a7"
956 ],
956 ],
957 "phase": "public",
957 "phase": "public",
958 "tags": [],
958 "tags": [],
959 "user": "test"
959 "user": "test"
960 },
960 },
961 {
961 {
962 "bookmarks": [],
962 "bookmarks": [],
963 "branch": "default",
963 "branch": "default",
964 "date": [
964 "date": [
965 0.0,
965 0.0,
966 0
966 0
967 ],
967 ],
968 "desc": "move foo",
968 "desc": "move foo",
969 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
969 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
970 "parents": [
970 "parents": [
971 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
971 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
972 ],
972 ],
973 "phase": "public",
973 "phase": "public",
974 "tags": [
974 "tags": [
975 "tag1"
975 "tag1"
976 ],
976 ],
977 "user": "test"
977 "user": "test"
978 },
978 },
979 {
979 {
980 "bookmarks": [
980 "bookmarks": [
981 "bookmark1"
981 "bookmark1"
982 ],
982 ],
983 "branch": "default",
983 "branch": "default",
984 "date": [
984 "date": [
985 0.0,
985 0.0,
986 0
986 0
987 ],
987 ],
988 "desc": "modify da/foo",
988 "desc": "modify da/foo",
989 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
989 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
990 "parents": [
990 "parents": [
991 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
991 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
992 ],
992 ],
993 "phase": "public",
993 "phase": "public",
994 "tags": [],
994 "tags": [],
995 "user": "test"
995 "user": "test"
996 },
996 },
997 {
997 {
998 "bookmarks": [],
998 "bookmarks": [],
999 "branch": "default",
999 "branch": "default",
1000 "date": [
1000 "date": [
1001 0.0,
1001 0.0,
1002 0
1002 0
1003 ],
1003 ],
1004 "desc": "modify foo",
1004 "desc": "modify foo",
1005 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1005 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1006 "parents": [
1006 "parents": [
1007 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1007 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1008 ],
1008 ],
1009 "phase": "public",
1009 "phase": "public",
1010 "tags": [],
1010 "tags": [],
1011 "user": "test"
1011 "user": "test"
1012 },
1012 },
1013 {
1013 {
1014 "bookmarks": [],
1014 "bookmarks": [],
1015 "branch": "default",
1015 "branch": "default",
1016 "date": [
1016 "date": [
1017 0.0,
1017 0.0,
1018 0
1018 0
1019 ],
1019 ],
1020 "desc": "initial",
1020 "desc": "initial",
1021 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1021 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1022 "parents": [],
1022 "parents": [],
1023 "phase": "public",
1023 "phase": "public",
1024 "tags": [],
1024 "tags": [],
1025 "user": "test"
1025 "user": "test"
1026 }
1026 }
1027 ],
1027 ],
1028 "tags": [
1028 "tags": [
1029 {
1029 {
1030 "date": [
1030 "date": [
1031 0.0,
1031 0.0,
1032 0
1032 0
1033 ],
1033 ],
1034 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1034 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1035 "tag": "tag2"
1035 "tag": "tag2"
1036 },
1036 },
1037 {
1037 {
1038 "date": [
1038 "date": [
1039 0.0,
1039 0.0,
1040 0
1040 0
1041 ],
1041 ],
1042 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1042 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1043 "tag": "tag1"
1043 "tag": "tag1"
1044 }
1044 }
1045 ]
1045 ]
1046 }
1046 }
1047
1047
1048 $ request json-changelog?rev=create
1048 $ request json-changelog?rev=create
1049 200 Script output follows
1049 200 Script output follows
1050
1050
1051 {
1051 {
1052 "entries": [
1052 "entries": [
1053 {
1053 {
1054 "bookmarks": [],
1054 "bookmarks": [],
1055 "branch": "test-branch",
1055 "branch": "test-branch",
1056 "date": [
1056 "date": [
1057 0.0,
1057 0.0,
1058 0
1058 0
1059 ],
1059 ],
1060 "desc": "create test branch",
1060 "desc": "create test branch",
1061 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1061 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1062 "parents": [
1062 "parents": [
1063 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1063 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1064 ],
1064 ],
1065 "phase": "draft",
1065 "phase": "draft",
1066 "tags": [],
1066 "tags": [],
1067 "user": "test"
1067 "user": "test"
1068 },
1068 },
1069 {
1069 {
1070 "bookmarks": [
1070 "bookmarks": [
1071 "bookmark2"
1071 "bookmark2"
1072 ],
1072 ],
1073 "branch": "default",
1073 "branch": "default",
1074 "date": [
1074 "date": [
1075 0.0,
1075 0.0,
1076 0
1076 0
1077 ],
1077 ],
1078 "desc": "create tag2",
1078 "desc": "create tag2",
1079 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1079 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1080 "parents": [
1080 "parents": [
1081 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1081 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1082 ],
1082 ],
1083 "phase": "draft",
1083 "phase": "draft",
1084 "tags": [],
1084 "tags": [],
1085 "user": "test"
1085 "user": "test"
1086 },
1086 },
1087 {
1087 {
1088 "bookmarks": [],
1088 "bookmarks": [],
1089 "branch": "default",
1089 "branch": "default",
1090 "date": [
1090 "date": [
1091 0.0,
1091 0.0,
1092 0
1092 0
1093 ],
1093 ],
1094 "desc": "create tag",
1094 "desc": "create tag",
1095 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1095 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1096 "parents": [
1096 "parents": [
1097 "78896eb0e102174ce9278438a95e12543e4367a7"
1097 "78896eb0e102174ce9278438a95e12543e4367a7"
1098 ],
1098 ],
1099 "phase": "public",
1099 "phase": "public",
1100 "tags": [],
1100 "tags": [],
1101 "user": "test"
1101 "user": "test"
1102 }
1102 }
1103 ],
1103 ],
1104 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1104 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1105 "query": "create"
1105 "query": "create"
1106 }
1106 }
1107
1107
1108 filediff/{revision}/{path} shows changes to a file in a revision
1108 filediff/{revision}/{path} shows changes to a file in a revision
1109
1109
1110 $ request json-diff/f8bbb9024b10/foo
1110 $ request json-diff/f8bbb9024b10/foo
1111 200 Script output follows
1111 200 Script output follows
1112
1112
1113 {
1113 {
1114 "author": "test",
1114 "author": "test",
1115 "children": [],
1115 "children": [],
1116 "date": [
1116 "date": [
1117 0.0,
1117 0.0,
1118 0
1118 0
1119 ],
1119 ],
1120 "desc": "modify foo",
1120 "desc": "modify foo",
1121 "diff": [
1121 "diff": [
1122 {
1122 {
1123 "blockno": 1,
1123 "blockno": 1,
1124 "lines": [
1124 "lines": [
1125 {
1125 {
1126 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1126 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1127 "n": 1,
1127 "n": 1,
1128 "t": "-"
1128 "t": "-"
1129 },
1129 },
1130 {
1130 {
1131 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1131 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1132 "n": 2,
1132 "n": 2,
1133 "t": "+"
1133 "t": "+"
1134 },
1134 },
1135 {
1135 {
1136 "l": "@@ -1,1 +1,1 @@\n",
1136 "l": "@@ -1,1 +1,1 @@\n",
1137 "n": 3,
1137 "n": 3,
1138 "t": "@"
1138 "t": "@"
1139 },
1139 },
1140 {
1140 {
1141 "l": "-foo\n",
1141 "l": "-foo\n",
1142 "n": 4,
1142 "n": 4,
1143 "t": "-"
1143 "t": "-"
1144 },
1144 },
1145 {
1145 {
1146 "l": "+bar\n",
1146 "l": "+bar\n",
1147 "n": 5,
1147 "n": 5,
1148 "t": "+"
1148 "t": "+"
1149 }
1149 }
1150 ]
1150 ]
1151 }
1151 }
1152 ],
1152 ],
1153 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1153 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1154 "parents": [
1154 "parents": [
1155 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1155 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1156 ],
1156 ],
1157 "path": "foo"
1157 "path": "foo"
1158 }
1158 }
1159
1159
1160 comparison/{revision}/{path} shows information about before and after for a file
1160 comparison/{revision}/{path} shows information about before and after for a file
1161
1161
1162 $ request json-comparison/f8bbb9024b10/foo
1162 $ request json-comparison/f8bbb9024b10/foo
1163 200 Script output follows
1163 200 Script output follows
1164
1164
1165 {
1165 {
1166 "author": "test",
1166 "author": "test",
1167 "children": [],
1167 "children": [],
1168 "comparison": [
1168 "comparison": [
1169 {
1169 {
1170 "lines": [
1170 "lines": [
1171 {
1171 {
1172 "ll": "foo",
1172 "ll": "foo",
1173 "ln": 1,
1173 "ln": 1,
1174 "rl": "bar",
1174 "rl": "bar",
1175 "rn": 1,
1175 "rn": 1,
1176 "t": "replace"
1176 "t": "replace"
1177 }
1177 }
1178 ]
1178 ]
1179 }
1179 }
1180 ],
1180 ],
1181 "date": [
1181 "date": [
1182 0.0,
1182 0.0,
1183 0
1183 0
1184 ],
1184 ],
1185 "desc": "modify foo",
1185 "desc": "modify foo",
1186 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1186 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1187 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1187 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1188 "parents": [
1188 "parents": [
1189 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1189 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1190 ],
1190 ],
1191 "path": "foo",
1191 "path": "foo",
1192 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1192 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1193 }
1193 }
1194
1194
1195 annotate/{revision}/{path} shows annotations for each line
1195 annotate/{revision}/{path} shows annotations for each line
1196
1196
1197 $ request json-annotate/f8bbb9024b10/foo
1197 $ request json-annotate/f8bbb9024b10/foo
1198 200 Script output follows
1198 200 Script output follows
1199
1199
1200 {
1200 {
1201 "abspath": "foo",
1201 "abspath": "foo",
1202 "annotate": [
1202 "annotate": [
1203 {
1203 {
1204 "abspath": "foo",
1204 "abspath": "foo",
1205 "author": "test",
1205 "author": "test",
1206 "desc": "modify foo",
1206 "desc": "modify foo",
1207 "line": "bar\n",
1207 "line": "bar\n",
1208 "lineno": 1,
1208 "lineno": 1,
1209 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1209 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1210 "revdate": [
1210 "revdate": [
1211 0.0,
1211 0.0,
1212 0
1212 0
1213 ],
1213 ],
1214 "targetline": 1
1214 "targetline": 1
1215 }
1215 }
1216 ],
1216 ],
1217 "author": "test",
1217 "author": "test",
1218 "children": [],
1218 "children": [],
1219 "date": [
1219 "date": [
1220 0.0,
1220 0.0,
1221 0
1221 0
1222 ],
1222 ],
1223 "desc": "modify foo",
1223 "desc": "modify foo",
1224 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1224 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1225 "parents": [
1225 "parents": [
1226 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1226 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1227 ],
1227 ],
1228 "permissions": ""
1228 "permissions": ""
1229 }
1229 }
1230
1230
1231 filelog/{revision}/{path} shows history of a single file
1231 filelog/{revision}/{path} shows history of a single file
1232
1232
1233 $ request json-filelog/f8bbb9024b10/foo
1233 $ request json-filelog/f8bbb9024b10/foo
1234 200 Script output follows
1234 200 Script output follows
1235
1235
1236 {
1236 {
1237 "entries": [
1237 "entries": [
1238 {
1238 {
1239 "bookmarks": [],
1239 "bookmarks": [],
1240 "branch": "default",
1240 "branch": "default",
1241 "date": [
1241 "date": [
1242 0.0,
1242 0.0,
1243 0
1243 0
1244 ],
1244 ],
1245 "desc": "modify foo",
1245 "desc": "modify foo",
1246 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1246 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1247 "parents": [
1247 "parents": [
1248 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1248 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1249 ],
1249 ],
1250 "phase": "public",
1250 "phase": "public",
1251 "tags": [],
1251 "tags": [],
1252 "user": "test"
1252 "user": "test"
1253 },
1253 },
1254 {
1254 {
1255 "bookmarks": [],
1255 "bookmarks": [],
1256 "branch": "default",
1256 "branch": "default",
1257 "date": [
1257 "date": [
1258 0.0,
1258 0.0,
1259 0
1259 0
1260 ],
1260 ],
1261 "desc": "initial",
1261 "desc": "initial",
1262 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1262 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1263 "parents": [],
1263 "parents": [],
1264 "phase": "public",
1264 "phase": "public",
1265 "tags": [],
1265 "tags": [],
1266 "user": "test"
1266 "user": "test"
1267 }
1267 }
1268 ]
1268 ]
1269 }
1269 }
1270
1270
1271 $ request json-filelog/cc725e08502a/da/foo
1271 $ request json-filelog/cc725e08502a/da/foo
1272 200 Script output follows
1272 200 Script output follows
1273
1273
1274 {
1274 {
1275 "entries": [
1275 "entries": [
1276 {
1276 {
1277 "bookmarks": [],
1277 "bookmarks": [],
1278 "branch": "default",
1278 "branch": "default",
1279 "date": [
1279 "date": [
1280 0.0,
1280 0.0,
1281 0
1281 0
1282 ],
1282 ],
1283 "desc": "another commit to da/foo",
1283 "desc": "another commit to da/foo",
1284 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1284 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1285 "parents": [
1285 "parents": [
1286 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1286 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1287 ],
1287 ],
1288 "phase": "draft",
1288 "phase": "draft",
1289 "tags": [
1289 "tags": [
1290 "tag2"
1290 "tag2"
1291 ],
1291 ],
1292 "user": "test"
1292 "user": "test"
1293 },
1293 },
1294 {
1294 {
1295 "bookmarks": [
1295 "bookmarks": [
1296 "bookmark1"
1296 "bookmark1"
1297 ],
1297 ],
1298 "branch": "default",
1298 "branch": "default",
1299 "date": [
1299 "date": [
1300 0.0,
1300 0.0,
1301 0
1301 0
1302 ],
1302 ],
1303 "desc": "modify da/foo",
1303 "desc": "modify da/foo",
1304 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1304 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1305 "parents": [
1305 "parents": [
1306 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1306 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1307 ],
1307 ],
1308 "phase": "public",
1308 "phase": "public",
1309 "tags": [],
1309 "tags": [],
1310 "user": "test"
1310 "user": "test"
1311 },
1311 },
1312 {
1312 {
1313 "bookmarks": [],
1313 "bookmarks": [],
1314 "branch": "default",
1314 "branch": "default",
1315 "date": [
1315 "date": [
1316 0.0,
1316 0.0,
1317 0
1317 0
1318 ],
1318 ],
1319 "desc": "initial",
1319 "desc": "initial",
1320 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1320 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1321 "parents": [],
1321 "parents": [],
1322 "phase": "public",
1322 "phase": "public",
1323 "tags": [],
1323 "tags": [],
1324 "user": "test"
1324 "user": "test"
1325 }
1325 }
1326 ]
1326 ]
1327 }
1327 }
1328
1328
1329 (archive/ doesn't use templating, so ignore it)
1329 (archive/ doesn't use templating, so ignore it)
1330
1330
1331 (static/ doesn't use templating, so ignore it)
1331 (static/ doesn't use templating, so ignore it)
1332
1332
1333 graph/ shows information that can be used to render a graph of the DAG
1333 graph/ shows information that can be used to render a graph of the DAG
1334
1334
1335 $ request json-graph
1335 $ request json-graph
1336 200 Script output follows
1336 200 Script output follows
1337
1337
1338 "not yet implemented"
1338 "not yet implemented"
1339
1339
1340 help/ shows help topics
1340 help/ shows help topics
1341
1341
1342 $ request json-help
1342 $ request json-help
1343 200 Script output follows
1343 200 Script output follows
1344
1344
1345 {
1345 {
1346 "earlycommands": [
1346 "earlycommands": [
1347 {
1347 {
1348 "summary": "add the specified files on the next commit",
1348 "summary": "add the specified files on the next commit",
1349 "topic": "add"
1349 "topic": "add"
1350 },
1350 },
1351 {
1351 {
1352 "summary": "show changeset information by line for each file",
1352 "summary": "show changeset information by line for each file",
1353 "topic": "annotate"
1353 "topic": "annotate"
1354 },
1354 },
1355 {
1355 {
1356 "summary": "make a copy of an existing repository",
1356 "summary": "make a copy of an existing repository",
1357 "topic": "clone"
1357 "topic": "clone"
1358 },
1358 },
1359 {
1359 {
1360 "summary": "commit the specified files or all outstanding changes",
1360 "summary": "commit the specified files or all outstanding changes",
1361 "topic": "commit"
1361 "topic": "commit"
1362 },
1362 },
1363 {
1363 {
1364 "summary": "diff repository (or selected files)",
1364 "summary": "diff repository (or selected files)",
1365 "topic": "diff"
1365 "topic": "diff"
1366 },
1366 },
1367 {
1367 {
1368 "summary": "dump the header and diffs for one or more changesets",
1368 "summary": "dump the header and diffs for one or more changesets",
1369 "topic": "export"
1369 "topic": "export"
1370 },
1370 },
1371 {
1371 {
1372 "summary": "forget the specified files on the next commit",
1372 "summary": "forget the specified files on the next commit",
1373 "topic": "forget"
1373 "topic": "forget"
1374 },
1374 },
1375 {
1375 {
1376 "summary": "create a new repository in the given directory",
1376 "summary": "create a new repository in the given directory",
1377 "topic": "init"
1377 "topic": "init"
1378 },
1378 },
1379 {
1379 {
1380 "summary": "show revision history of entire repository or files",
1380 "summary": "show revision history of entire repository or files",
1381 "topic": "log"
1381 "topic": "log"
1382 },
1382 },
1383 {
1383 {
1384 "summary": "merge another revision into working directory",
1384 "summary": "merge another revision into working directory",
1385 "topic": "merge"
1385 "topic": "merge"
1386 },
1386 },
1387 {
1387 {
1388 "summary": "pull changes from the specified source",
1388 "summary": "pull changes from the specified source",
1389 "topic": "pull"
1389 "topic": "pull"
1390 },
1390 },
1391 {
1391 {
1392 "summary": "push changes to the specified destination",
1392 "summary": "push changes to the specified destination",
1393 "topic": "push"
1393 "topic": "push"
1394 },
1394 },
1395 {
1395 {
1396 "summary": "remove the specified files on the next commit",
1396 "summary": "remove the specified files on the next commit",
1397 "topic": "remove"
1397 "topic": "remove"
1398 },
1398 },
1399 {
1399 {
1400 "summary": "start stand-alone webserver",
1400 "summary": "start stand-alone webserver",
1401 "topic": "serve"
1401 "topic": "serve"
1402 },
1402 },
1403 {
1403 {
1404 "summary": "show changed files in the working directory",
1404 "summary": "show changed files in the working directory",
1405 "topic": "status"
1405 "topic": "status"
1406 },
1406 },
1407 {
1407 {
1408 "summary": "summarize working directory state",
1408 "summary": "summarize working directory state",
1409 "topic": "summary"
1409 "topic": "summary"
1410 },
1410 },
1411 {
1411 {
1412 "summary": "update working directory (or switch revisions)",
1412 "summary": "update working directory (or switch revisions)",
1413 "topic": "update"
1413 "topic": "update"
1414 }
1414 }
1415 ],
1415 ],
1416 "othercommands": [
1416 "othercommands": [
1417 {
1417 {
1418 "summary": "add all new files, delete all missing files",
1418 "summary": "add all new files, delete all missing files",
1419 "topic": "addremove"
1419 "topic": "addremove"
1420 },
1420 },
1421 {
1421 {
1422 "summary": "create an unversioned archive of a repository revision",
1422 "summary": "create an unversioned archive of a repository revision",
1423 "topic": "archive"
1423 "topic": "archive"
1424 },
1424 },
1425 {
1425 {
1426 "summary": "reverse effect of earlier changeset",
1426 "summary": "reverse effect of earlier changeset",
1427 "topic": "backout"
1427 "topic": "backout"
1428 },
1428 },
1429 {
1429 {
1430 "summary": "subdivision search of changesets",
1430 "summary": "subdivision search of changesets",
1431 "topic": "bisect"
1431 "topic": "bisect"
1432 },
1432 },
1433 {
1433 {
1434 "summary": "create a new bookmark or list existing bookmarks",
1434 "summary": "create a new bookmark or list existing bookmarks",
1435 "topic": "bookmarks"
1435 "topic": "bookmarks"
1436 },
1436 },
1437 {
1437 {
1438 "summary": "set or show the current branch name",
1438 "summary": "set or show the current branch name",
1439 "topic": "branch"
1439 "topic": "branch"
1440 },
1440 },
1441 {
1441 {
1442 "summary": "list repository named branches",
1442 "summary": "list repository named branches",
1443 "topic": "branches"
1443 "topic": "branches"
1444 },
1444 },
1445 {
1445 {
1446 "summary": "create a changegroup file",
1446 "summary": "create a changegroup file",
1447 "topic": "bundle"
1447 "topic": "bundle"
1448 },
1448 },
1449 {
1449 {
1450 "summary": "output the current or given revision of files",
1450 "summary": "output the current or given revision of files",
1451 "topic": "cat"
1451 "topic": "cat"
1452 },
1452 },
1453 {
1453 {
1454 "summary": "show combined config settings from all hgrc files",
1454 "summary": "show combined config settings from all hgrc files",
1455 "topic": "config"
1455 "topic": "config"
1456 },
1456 },
1457 {
1457 {
1458 "summary": "mark files as copied for the next commit",
1458 "summary": "mark files as copied for the next commit",
1459 "topic": "copy"
1459 "topic": "copy"
1460 },
1460 },
1461 {
1461 {
1462 "summary": "list tracked files",
1462 "summary": "list tracked files",
1463 "topic": "files"
1463 "topic": "files"
1464 },
1464 },
1465 {
1465 {
1466 "summary": "copy changes from other branches onto the current branch",
1466 "summary": "copy changes from other branches onto the current branch",
1467 "topic": "graft"
1467 "topic": "graft"
1468 },
1468 },
1469 {
1469 {
1470 "summary": "search revision history for a pattern in specified files",
1470 "summary": "search revision history for a pattern in specified files",
1471 "topic": "grep"
1471 "topic": "grep"
1472 },
1472 },
1473 {
1473 {
1474 "summary": "show branch heads",
1474 "summary": "show branch heads",
1475 "topic": "heads"
1475 "topic": "heads"
1476 },
1476 },
1477 {
1477 {
1478 "summary": "show help for a given topic or a help overview",
1478 "summary": "show help for a given topic or a help overview",
1479 "topic": "help"
1479 "topic": "help"
1480 },
1480 },
1481 {
1481 {
1482 "summary": "identify the working directory or specified revision",
1482 "summary": "identify the working directory or specified revision",
1483 "topic": "identify"
1483 "topic": "identify"
1484 },
1484 },
1485 {
1485 {
1486 "summary": "import an ordered set of patches",
1486 "summary": "import an ordered set of patches",
1487 "topic": "import"
1487 "topic": "import"
1488 },
1488 },
1489 {
1489 {
1490 "summary": "show new changesets found in source",
1490 "summary": "show new changesets found in source",
1491 "topic": "incoming"
1491 "topic": "incoming"
1492 },
1492 },
1493 {
1493 {
1494 "summary": "output the current or given revision of the project manifest",
1494 "summary": "output the current or given revision of the project manifest",
1495 "topic": "manifest"
1495 "topic": "manifest"
1496 },
1496 },
1497 {
1497 {
1498 "summary": "show changesets not found in the destination",
1498 "summary": "show changesets not found in the destination",
1499 "topic": "outgoing"
1499 "topic": "outgoing"
1500 },
1500 },
1501 {
1501 {
1502 "summary": "show aliases for remote repositories",
1502 "summary": "show aliases for remote repositories",
1503 "topic": "paths"
1503 "topic": "paths"
1504 },
1504 },
1505 {
1505 {
1506 "summary": "set or show the current phase name",
1506 "summary": "set or show the current phase name",
1507 "topic": "phase"
1507 "topic": "phase"
1508 },
1508 },
1509 {
1509 {
1510 "summary": "roll back an interrupted transaction",
1510 "summary": "roll back an interrupted transaction",
1511 "topic": "recover"
1511 "topic": "recover"
1512 },
1512 },
1513 {
1513 {
1514 "summary": "rename files; equivalent of copy + remove",
1514 "summary": "rename files; equivalent of copy + remove",
1515 "topic": "rename"
1515 "topic": "rename"
1516 },
1516 },
1517 {
1517 {
1518 "summary": "redo merges or set/view the merge status of files",
1518 "summary": "redo merges or set/view the merge status of files",
1519 "topic": "resolve"
1519 "topic": "resolve"
1520 },
1520 },
1521 {
1521 {
1522 "summary": "restore files to their checkout state",
1522 "summary": "restore files to their checkout state",
1523 "topic": "revert"
1523 "topic": "revert"
1524 },
1524 },
1525 {
1525 {
1526 "summary": "print the root (top) of the current working directory",
1526 "summary": "print the root (top) of the current working directory",
1527 "topic": "root"
1527 "topic": "root"
1528 },
1528 },
1529 {
1529 {
1530 "summary": "add one or more tags for the current or given revision",
1530 "summary": "add one or more tags for the current or given revision",
1531 "topic": "tag"
1531 "topic": "tag"
1532 },
1532 },
1533 {
1533 {
1534 "summary": "list repository tags",
1534 "summary": "list repository tags",
1535 "topic": "tags"
1535 "topic": "tags"
1536 },
1536 },
1537 {
1537 {
1538 "summary": "apply one or more changegroup files",
1538 "summary": "apply one or more changegroup files",
1539 "topic": "unbundle"
1539 "topic": "unbundle"
1540 },
1540 },
1541 {
1541 {
1542 "summary": "verify the integrity of the repository",
1542 "summary": "verify the integrity of the repository",
1543 "topic": "verify"
1543 "topic": "verify"
1544 },
1544 },
1545 {
1545 {
1546 "summary": "output version and copyright information",
1546 "summary": "output version and copyright information",
1547 "topic": "version"
1547 "topic": "version"
1548 }
1548 }
1549 ],
1549 ],
1550 "topics": [
1550 "topics": [
1551 {
1551 {
1552 "summary": "Bundle File Formats",
1553 "topic": "bundlespec"
1554 },
1555 {
1552 "summary": "Colorizing Outputs",
1556 "summary": "Colorizing Outputs",
1553 "topic": "color"
1557 "topic": "color"
1554 },
1558 },
1555 {
1559 {
1556 "summary": "Configuration Files",
1560 "summary": "Configuration Files",
1557 "topic": "config"
1561 "topic": "config"
1558 },
1562 },
1559 {
1563 {
1560 "summary": "Date Formats",
1564 "summary": "Date Formats",
1561 "topic": "dates"
1565 "topic": "dates"
1562 },
1566 },
1563 {
1567 {
1564 "summary": "Diff Formats",
1568 "summary": "Diff Formats",
1565 "topic": "diffs"
1569 "topic": "diffs"
1566 },
1570 },
1567 {
1571 {
1568 "summary": "Environment Variables",
1572 "summary": "Environment Variables",
1569 "topic": "environment"
1573 "topic": "environment"
1570 },
1574 },
1571 {
1575 {
1572 "summary": "Using Additional Features",
1576 "summary": "Using Additional Features",
1573 "topic": "extensions"
1577 "topic": "extensions"
1574 },
1578 },
1575 {
1579 {
1576 "summary": "Specifying File Sets",
1580 "summary": "Specifying File Sets",
1577 "topic": "filesets"
1581 "topic": "filesets"
1578 },
1582 },
1579 {
1583 {
1580 "summary": "Glossary",
1584 "summary": "Glossary",
1581 "topic": "glossary"
1585 "topic": "glossary"
1582 },
1586 },
1583 {
1587 {
1584 "summary": "Syntax for Mercurial Ignore Files",
1588 "summary": "Syntax for Mercurial Ignore Files",
1585 "topic": "hgignore"
1589 "topic": "hgignore"
1586 },
1590 },
1587 {
1591 {
1588 "summary": "Configuring hgweb",
1592 "summary": "Configuring hgweb",
1589 "topic": "hgweb"
1593 "topic": "hgweb"
1590 },
1594 },
1591 {
1595 {
1592 "summary": "Technical implementation topics",
1596 "summary": "Technical implementation topics",
1593 "topic": "internals"
1597 "topic": "internals"
1594 },
1598 },
1595 {
1599 {
1596 "summary": "Merge Tools",
1600 "summary": "Merge Tools",
1597 "topic": "merge-tools"
1601 "topic": "merge-tools"
1598 },
1602 },
1599 {
1603 {
1600 "summary": "Pager Support",
1604 "summary": "Pager Support",
1601 "topic": "pager"
1605 "topic": "pager"
1602 },
1606 },
1603 {
1607 {
1604 "summary": "File Name Patterns",
1608 "summary": "File Name Patterns",
1605 "topic": "patterns"
1609 "topic": "patterns"
1606 },
1610 },
1607 {
1611 {
1608 "summary": "Working with Phases",
1612 "summary": "Working with Phases",
1609 "topic": "phases"
1613 "topic": "phases"
1610 },
1614 },
1611 {
1615 {
1612 "summary": "Specifying Revisions",
1616 "summary": "Specifying Revisions",
1613 "topic": "revisions"
1617 "topic": "revisions"
1614 },
1618 },
1615 {
1619 {
1616 "summary": "Using Mercurial from scripts and automation",
1620 "summary": "Using Mercurial from scripts and automation",
1617 "topic": "scripting"
1621 "topic": "scripting"
1618 },
1622 },
1619 {
1623 {
1620 "summary": "Subrepositories",
1624 "summary": "Subrepositories",
1621 "topic": "subrepos"
1625 "topic": "subrepos"
1622 },
1626 },
1623 {
1627 {
1624 "summary": "Template Usage",
1628 "summary": "Template Usage",
1625 "topic": "templating"
1629 "topic": "templating"
1626 },
1630 },
1627 {
1631 {
1628 "summary": "URL Paths",
1632 "summary": "URL Paths",
1629 "topic": "urls"
1633 "topic": "urls"
1630 }
1634 }
1631 ]
1635 ]
1632 }
1636 }
1633
1637
1634 help/{topic} shows an individual help topic
1638 help/{topic} shows an individual help topic
1635
1639
1636 $ request json-help/phases
1640 $ request json-help/phases
1637 200 Script output follows
1641 200 Script output follows
1638
1642
1639 {
1643 {
1640 "rawdoc": "Working with Phases\n*", (glob)
1644 "rawdoc": "Working with Phases\n*", (glob)
1641 "topic": "phases"
1645 "topic": "phases"
1642 }
1646 }
General Comments 0
You need to be logged in to leave comments. Login now