##// END OF EJS Templates
help: add new deprecated topic...
David Demelier -
r38019:5fa4e29b default
parent child Browse files
Show More
@@ -0,0 +1,30
1 Mercurial evolves over time, some features, options, commands may be replaced by
2 better and more secure alternatives. This topic will help you migrating your
3 existing usage and/or configuration to newer features.
4
5 Commands
6 ========
7
8 The following commands are still available but their use are not recommended:
9
10 ``locate``
11
12 This command has been replaced by `hg files`.
13
14 ``parents``
15
16 This command can be replaced by `hg summary` or `hg log` with appropriate
17 revsets. See `hg help revsets` for more information.
18
19 ``tip``
20
21 The recommended alternative is `hg heads`.
22
23 Options
24 =======
25
26 ``web.allowpull``
27 Renamed to `allow-pull`.
28
29 ``web.allow_push``
30 Renamed to `allow-push`.
@@ -1,58 +1,59
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="bundlespec.txt" />
19 <File Name="color.txt" />
19 <File Name="color.txt" />
20 <File Name="config.txt" KeyPath="yes" />
20 <File Name="config.txt" KeyPath="yes" />
21 <File Name="dates.txt" />
21 <File Name="dates.txt" />
22 <File Name="deprecated.txt" />
22 <File Name="diffs.txt" />
23 <File Name="diffs.txt" />
23 <File Name="environment.txt" />
24 <File Name="environment.txt" />
24 <File Name="extensions.txt" />
25 <File Name="extensions.txt" />
25 <File Name="filesets.txt" />
26 <File Name="filesets.txt" />
26 <File Name="flags.txt" />
27 <File Name="flags.txt" />
27 <File Name="glossary.txt" />
28 <File Name="glossary.txt" />
28 <File Name="hgignore.txt" />
29 <File Name="hgignore.txt" />
29 <File Name="hgweb.txt" />
30 <File Name="hgweb.txt" />
30 <File Name="merge-tools.txt" />
31 <File Name="merge-tools.txt" />
31 <File Name="pager.txt" />
32 <File Name="pager.txt" />
32 <File Name="patterns.txt" />
33 <File Name="patterns.txt" />
33 <File Name="phases.txt" />
34 <File Name="phases.txt" />
34 <File Name="revisions.txt" />
35 <File Name="revisions.txt" />
35 <File Name="scripting.txt" />
36 <File Name="scripting.txt" />
36 <File Name="subrepos.txt" />
37 <File Name="subrepos.txt" />
37 <File Name="templates.txt" />
38 <File Name="templates.txt" />
38 <File Name="urls.txt" />
39 <File Name="urls.txt" />
39 </Component>
40 </Component>
40
41
41 <Directory Id="help.internaldir" Name="internals">
42 <Directory Id="help.internaldir" Name="internals">
42 <Component Id="help.internals" Guid="$(var.help.internals.guid)" Win64='$(var.IsX64)'>
43 <Component Id="help.internals" Guid="$(var.help.internals.guid)" Win64='$(var.IsX64)'>
43 <File Id="internals.bundle2.txt" Name="bundle2.txt" />
44 <File Id="internals.bundle2.txt" Name="bundle2.txt" />
44 <File Id="internals.bundles.txt" Name="bundles.txt" KeyPath="yes" />
45 <File Id="internals.bundles.txt" Name="bundles.txt" KeyPath="yes" />
45 <File Id="internals.censor.txt" Name="censor.txt" />
46 <File Id="internals.censor.txt" Name="censor.txt" />
46 <File Id="internals.changegroups.txt" Name="changegroups.txt" />
47 <File Id="internals.changegroups.txt" Name="changegroups.txt" />
47 <File Id="internals.config.txt" Name="config.txt" />
48 <File Id="internals.config.txt" Name="config.txt" />
48 <File Id="internals.requirements.txt" Name="requirements.txt" />
49 <File Id="internals.requirements.txt" Name="requirements.txt" />
49 <File Id="internals.revlogs.txt" Name="revlogs.txt" />
50 <File Id="internals.revlogs.txt" Name="revlogs.txt" />
50 <File Id="internals.wireprotocol.txt" Name="wireprotocol.txt" />
51 <File Id="internals.wireprotocol.txt" Name="wireprotocol.txt" />
51 </Component>
52 </Component>
52 </Directory>
53 </Directory>
53
54
54 </Directory>
55 </Directory>
55 </DirectoryRef>
56 </DirectoryRef>
56 </Fragment>
57 </Fragment>
57
58
58 </Wix>
59 </Wix>
@@ -1,689 +1,690
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 fancyopts,
23 fancyopts,
24 filemerge,
24 filemerge,
25 fileset,
25 fileset,
26 minirst,
26 minirst,
27 pycompat,
27 pycompat,
28 revset,
28 revset,
29 templatefilters,
29 templatefilters,
30 templatefuncs,
30 templatefuncs,
31 templatekw,
31 templatekw,
32 util,
32 util,
33 )
33 )
34 from .hgweb import (
34 from .hgweb import (
35 webcommands,
35 webcommands,
36 )
36 )
37
37
38 _exclkeywords = {
38 _exclkeywords = {
39 "(ADVANCED)",
39 "(ADVANCED)",
40 "(DEPRECATED)",
40 "(DEPRECATED)",
41 "(EXPERIMENTAL)",
41 "(EXPERIMENTAL)",
42 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
42 # i18n: "(ADVANCED)" is a keyword, must be translated consistently
43 _("(ADVANCED)"),
43 _("(ADVANCED)"),
44 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
44 # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
45 _("(DEPRECATED)"),
45 _("(DEPRECATED)"),
46 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
46 # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
47 _("(EXPERIMENTAL)"),
47 _("(EXPERIMENTAL)"),
48 }
48 }
49
49
50 def listexts(header, exts, indent=1, showdeprecated=False):
50 def listexts(header, exts, indent=1, showdeprecated=False):
51 '''return a text listing of the given extensions'''
51 '''return a text listing of the given extensions'''
52 rst = []
52 rst = []
53 if exts:
53 if exts:
54 for name, desc in sorted(exts.iteritems()):
54 for name, desc in sorted(exts.iteritems()):
55 if not showdeprecated and any(w in desc for w in _exclkeywords):
55 if not showdeprecated and any(w in desc for w in _exclkeywords):
56 continue
56 continue
57 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
57 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
58 if rst:
58 if rst:
59 rst.insert(0, '\n%s\n\n' % header)
59 rst.insert(0, '\n%s\n\n' % header)
60 return rst
60 return rst
61
61
62 def extshelp(ui):
62 def extshelp(ui):
63 rst = loaddoc('extensions')(ui).splitlines(True)
63 rst = loaddoc('extensions')(ui).splitlines(True)
64 rst.extend(listexts(
64 rst.extend(listexts(
65 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
65 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
66 rst.extend(listexts(_('disabled extensions:'), extensions.disabled(),
66 rst.extend(listexts(_('disabled extensions:'), extensions.disabled(),
67 showdeprecated=ui.verbose))
67 showdeprecated=ui.verbose))
68 doc = ''.join(rst)
68 doc = ''.join(rst)
69 return doc
69 return doc
70
70
71 def optrst(header, options, verbose):
71 def optrst(header, options, verbose):
72 data = []
72 data = []
73 multioccur = False
73 multioccur = False
74 for option in options:
74 for option in options:
75 if len(option) == 5:
75 if len(option) == 5:
76 shortopt, longopt, default, desc, optlabel = option
76 shortopt, longopt, default, desc, optlabel = option
77 else:
77 else:
78 shortopt, longopt, default, desc = option
78 shortopt, longopt, default, desc = option
79 optlabel = _("VALUE") # default label
79 optlabel = _("VALUE") # default label
80
80
81 if not verbose and any(w in desc for w in _exclkeywords):
81 if not verbose and any(w in desc for w in _exclkeywords):
82 continue
82 continue
83
83
84 so = ''
84 so = ''
85 if shortopt:
85 if shortopt:
86 so = '-' + shortopt
86 so = '-' + shortopt
87 lo = '--' + longopt
87 lo = '--' + longopt
88
88
89 if isinstance(default, fancyopts.customopt):
89 if isinstance(default, fancyopts.customopt):
90 default = default.getdefaultvalue()
90 default = default.getdefaultvalue()
91 if default and not callable(default):
91 if default and not callable(default):
92 # default is of unknown type, and in Python 2 we abused
92 # default is of unknown type, and in Python 2 we abused
93 # the %s-shows-repr property to handle integers etc. To
93 # the %s-shows-repr property to handle integers etc. To
94 # match that behavior on Python 3, we do str(default) and
94 # match that behavior on Python 3, we do str(default) and
95 # then convert it to bytes.
95 # then convert it to bytes.
96 desc += _(" (default: %s)") % pycompat.bytestr(default)
96 desc += _(" (default: %s)") % pycompat.bytestr(default)
97
97
98 if isinstance(default, list):
98 if isinstance(default, list):
99 lo += " %s [+]" % optlabel
99 lo += " %s [+]" % optlabel
100 multioccur = True
100 multioccur = True
101 elif (default is not None) and not isinstance(default, bool):
101 elif (default is not None) and not isinstance(default, bool):
102 lo += " %s" % optlabel
102 lo += " %s" % optlabel
103
103
104 data.append((so, lo, desc))
104 data.append((so, lo, desc))
105
105
106 if multioccur:
106 if multioccur:
107 header += (_(" ([+] can be repeated)"))
107 header += (_(" ([+] can be repeated)"))
108
108
109 rst = ['\n%s:\n\n' % header]
109 rst = ['\n%s:\n\n' % header]
110 rst.extend(minirst.maketable(data, 1))
110 rst.extend(minirst.maketable(data, 1))
111
111
112 return ''.join(rst)
112 return ''.join(rst)
113
113
114 def indicateomitted(rst, omitted, notomitted=None):
114 def indicateomitted(rst, omitted, notomitted=None):
115 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
115 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
116 if notomitted:
116 if notomitted:
117 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
117 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
118
118
119 def filtercmd(ui, cmd, kw, doc):
119 def filtercmd(ui, cmd, kw, doc):
120 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
120 if not ui.debugflag and cmd.startswith("debug") and kw != "debug":
121 return True
121 return True
122 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
122 if not ui.verbose and doc and any(w in doc for w in _exclkeywords):
123 return True
123 return True
124 return False
124 return False
125
125
126 def topicmatch(ui, commands, kw):
126 def topicmatch(ui, commands, kw):
127 """Return help topics matching kw.
127 """Return help topics matching kw.
128
128
129 Returns {'section': [(name, summary), ...], ...} where section is
129 Returns {'section': [(name, summary), ...], ...} where section is
130 one of topics, commands, extensions, or extensioncommands.
130 one of topics, commands, extensions, or extensioncommands.
131 """
131 """
132 kw = encoding.lower(kw)
132 kw = encoding.lower(kw)
133 def lowercontains(container):
133 def lowercontains(container):
134 return kw in encoding.lower(container) # translated in helptable
134 return kw in encoding.lower(container) # translated in helptable
135 results = {'topics': [],
135 results = {'topics': [],
136 'commands': [],
136 'commands': [],
137 'extensions': [],
137 'extensions': [],
138 'extensioncommands': [],
138 'extensioncommands': [],
139 }
139 }
140 for names, header, doc in helptable:
140 for names, header, doc in helptable:
141 # Old extensions may use a str as doc.
141 # Old extensions may use a str as doc.
142 if (sum(map(lowercontains, names))
142 if (sum(map(lowercontains, names))
143 or lowercontains(header)
143 or lowercontains(header)
144 or (callable(doc) and lowercontains(doc(ui)))):
144 or (callable(doc) and lowercontains(doc(ui)))):
145 results['topics'].append((names[0], header))
145 results['topics'].append((names[0], header))
146 for cmd, entry in commands.table.iteritems():
146 for cmd, entry in commands.table.iteritems():
147 if len(entry) == 3:
147 if len(entry) == 3:
148 summary = entry[2]
148 summary = entry[2]
149 else:
149 else:
150 summary = ''
150 summary = ''
151 # translate docs *before* searching there
151 # translate docs *before* searching there
152 docs = _(pycompat.getdoc(entry[0])) or ''
152 docs = _(pycompat.getdoc(entry[0])) or ''
153 if kw in cmd or lowercontains(summary) or lowercontains(docs):
153 if kw in cmd or lowercontains(summary) or lowercontains(docs):
154 doclines = docs.splitlines()
154 doclines = docs.splitlines()
155 if doclines:
155 if doclines:
156 summary = doclines[0]
156 summary = doclines[0]
157 cmdname = cmdutil.parsealiases(cmd)[0]
157 cmdname = cmdutil.parsealiases(cmd)[0]
158 if filtercmd(ui, cmdname, kw, docs):
158 if filtercmd(ui, cmdname, kw, docs):
159 continue
159 continue
160 results['commands'].append((cmdname, summary))
160 results['commands'].append((cmdname, summary))
161 for name, docs in itertools.chain(
161 for name, docs in itertools.chain(
162 extensions.enabled(False).iteritems(),
162 extensions.enabled(False).iteritems(),
163 extensions.disabled().iteritems()):
163 extensions.disabled().iteritems()):
164 if not docs:
164 if not docs:
165 continue
165 continue
166 name = name.rpartition('.')[-1]
166 name = name.rpartition('.')[-1]
167 if lowercontains(name) or lowercontains(docs):
167 if lowercontains(name) or lowercontains(docs):
168 # extension docs are already translated
168 # extension docs are already translated
169 results['extensions'].append((name, docs.splitlines()[0]))
169 results['extensions'].append((name, docs.splitlines()[0]))
170 try:
170 try:
171 mod = extensions.load(ui, name, '')
171 mod = extensions.load(ui, name, '')
172 except ImportError:
172 except ImportError:
173 # debug message would be printed in extensions.load()
173 # debug message would be printed in extensions.load()
174 continue
174 continue
175 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
175 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
176 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
176 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
177 cmdname = cmdutil.parsealiases(cmd)[0]
177 cmdname = cmdutil.parsealiases(cmd)[0]
178 cmddoc = pycompat.getdoc(entry[0])
178 cmddoc = pycompat.getdoc(entry[0])
179 if cmddoc:
179 if cmddoc:
180 cmddoc = gettext(cmddoc).splitlines()[0]
180 cmddoc = gettext(cmddoc).splitlines()[0]
181 else:
181 else:
182 cmddoc = _('(no help text available)')
182 cmddoc = _('(no help text available)')
183 if filtercmd(ui, cmdname, kw, cmddoc):
183 if filtercmd(ui, cmdname, kw, cmddoc):
184 continue
184 continue
185 results['extensioncommands'].append((cmdname, cmddoc))
185 results['extensioncommands'].append((cmdname, cmddoc))
186 return results
186 return results
187
187
188 def loaddoc(topic, subdir=None):
188 def loaddoc(topic, subdir=None):
189 """Return a delayed loader for help/topic.txt."""
189 """Return a delayed loader for help/topic.txt."""
190
190
191 def loader(ui):
191 def loader(ui):
192 docdir = os.path.join(util.datapath, 'help')
192 docdir = os.path.join(util.datapath, 'help')
193 if subdir:
193 if subdir:
194 docdir = os.path.join(docdir, subdir)
194 docdir = os.path.join(docdir, subdir)
195 path = os.path.join(docdir, topic + ".txt")
195 path = os.path.join(docdir, topic + ".txt")
196 doc = gettext(util.readfile(path))
196 doc = gettext(util.readfile(path))
197 for rewriter in helphooks.get(topic, []):
197 for rewriter in helphooks.get(topic, []):
198 doc = rewriter(ui, topic, doc)
198 doc = rewriter(ui, topic, doc)
199 return doc
199 return doc
200
200
201 return loader
201 return loader
202
202
203 internalstable = sorted([
203 internalstable = sorted([
204 (['bundle2'], _('Bundle2'),
204 (['bundle2'], _('Bundle2'),
205 loaddoc('bundle2', subdir='internals')),
205 loaddoc('bundle2', subdir='internals')),
206 (['bundles'], _('Bundles'),
206 (['bundles'], _('Bundles'),
207 loaddoc('bundles', subdir='internals')),
207 loaddoc('bundles', subdir='internals')),
208 (['censor'], _('Censor'),
208 (['censor'], _('Censor'),
209 loaddoc('censor', subdir='internals')),
209 loaddoc('censor', subdir='internals')),
210 (['changegroups'], _('Changegroups'),
210 (['changegroups'], _('Changegroups'),
211 loaddoc('changegroups', subdir='internals')),
211 loaddoc('changegroups', subdir='internals')),
212 (['config'], _('Config Registrar'),
212 (['config'], _('Config Registrar'),
213 loaddoc('config', subdir='internals')),
213 loaddoc('config', subdir='internals')),
214 (['requirements'], _('Repository Requirements'),
214 (['requirements'], _('Repository Requirements'),
215 loaddoc('requirements', subdir='internals')),
215 loaddoc('requirements', subdir='internals')),
216 (['revlogs'], _('Revision Logs'),
216 (['revlogs'], _('Revision Logs'),
217 loaddoc('revlogs', subdir='internals')),
217 loaddoc('revlogs', subdir='internals')),
218 (['wireprotocol'], _('Wire Protocol'),
218 (['wireprotocol'], _('Wire Protocol'),
219 loaddoc('wireprotocol', subdir='internals')),
219 loaddoc('wireprotocol', subdir='internals')),
220 ])
220 ])
221
221
222 def internalshelp(ui):
222 def internalshelp(ui):
223 """Generate the index for the "internals" topic."""
223 """Generate the index for the "internals" topic."""
224 lines = ['To access a subtopic, use "hg help internals.{subtopic-name}"\n',
224 lines = ['To access a subtopic, use "hg help internals.{subtopic-name}"\n',
225 '\n']
225 '\n']
226 for names, header, doc in internalstable:
226 for names, header, doc in internalstable:
227 lines.append(' :%s: %s\n' % (names[0], header))
227 lines.append(' :%s: %s\n' % (names[0], header))
228
228
229 return ''.join(lines)
229 return ''.join(lines)
230
230
231 helptable = sorted([
231 helptable = sorted([
232 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec')),
232 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec')),
233 (['color'], _("Colorizing Outputs"), loaddoc('color')),
233 (['color'], _("Colorizing Outputs"), loaddoc('color')),
234 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
234 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
235 (['deprecated'], _("Deprecated Features"), loaddoc('deprecated')),
235 (["dates"], _("Date Formats"), loaddoc('dates')),
236 (["dates"], _("Date Formats"), loaddoc('dates')),
236 (["flags"], _("Command-line flags"), loaddoc('flags')),
237 (["flags"], _("Command-line flags"), loaddoc('flags')),
237 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
238 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
238 (['environment', 'env'], _('Environment Variables'),
239 (['environment', 'env'], _('Environment Variables'),
239 loaddoc('environment')),
240 loaddoc('environment')),
240 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
241 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
241 _('Specifying Revisions'), loaddoc('revisions')),
242 _('Specifying Revisions'), loaddoc('revisions')),
242 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
243 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
243 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
244 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
244 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
245 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
245 loaddoc('merge-tools')),
246 loaddoc('merge-tools')),
246 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
247 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
247 loaddoc('templates')),
248 loaddoc('templates')),
248 (['urls'], _('URL Paths'), loaddoc('urls')),
249 (['urls'], _('URL Paths'), loaddoc('urls')),
249 (["extensions"], _("Using Additional Features"), extshelp),
250 (["extensions"], _("Using Additional Features"), extshelp),
250 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
251 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
251 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
252 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
252 (["glossary"], _("Glossary"), loaddoc('glossary')),
253 (["glossary"], _("Glossary"), loaddoc('glossary')),
253 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
254 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
254 loaddoc('hgignore')),
255 loaddoc('hgignore')),
255 (["phases"], _("Working with Phases"), loaddoc('phases')),
256 (["phases"], _("Working with Phases"), loaddoc('phases')),
256 (['scripting'], _('Using Mercurial from scripts and automation'),
257 (['scripting'], _('Using Mercurial from scripts and automation'),
257 loaddoc('scripting')),
258 loaddoc('scripting')),
258 (['internals'], _("Technical implementation topics"),
259 (['internals'], _("Technical implementation topics"),
259 internalshelp),
260 internalshelp),
260 (['pager'], _("Pager Support"), loaddoc('pager')),
261 (['pager'], _("Pager Support"), loaddoc('pager')),
261 ])
262 ])
262
263
263 # Maps topics with sub-topics to a list of their sub-topics.
264 # Maps topics with sub-topics to a list of their sub-topics.
264 subtopics = {
265 subtopics = {
265 'internals': internalstable,
266 'internals': internalstable,
266 }
267 }
267
268
268 # Map topics to lists of callable taking the current topic help and
269 # Map topics to lists of callable taking the current topic help and
269 # returning the updated version
270 # returning the updated version
270 helphooks = {}
271 helphooks = {}
271
272
272 def addtopichook(topic, rewriter):
273 def addtopichook(topic, rewriter):
273 helphooks.setdefault(topic, []).append(rewriter)
274 helphooks.setdefault(topic, []).append(rewriter)
274
275
275 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
276 def makeitemsdoc(ui, topic, doc, marker, items, dedent=False):
276 """Extract docstring from the items key to function mapping, build a
277 """Extract docstring from the items key to function mapping, build a
277 single documentation block and use it to overwrite the marker in doc.
278 single documentation block and use it to overwrite the marker in doc.
278 """
279 """
279 entries = []
280 entries = []
280 for name in sorted(items):
281 for name in sorted(items):
281 text = (pycompat.getdoc(items[name]) or '').rstrip()
282 text = (pycompat.getdoc(items[name]) or '').rstrip()
282 if (not text
283 if (not text
283 or not ui.verbose and any(w in text for w in _exclkeywords)):
284 or not ui.verbose and any(w in text for w in _exclkeywords)):
284 continue
285 continue
285 text = gettext(text)
286 text = gettext(text)
286 if dedent:
287 if dedent:
287 # Abuse latin1 to use textwrap.dedent() on bytes.
288 # Abuse latin1 to use textwrap.dedent() on bytes.
288 text = textwrap.dedent(text.decode('latin1')).encode('latin1')
289 text = textwrap.dedent(text.decode('latin1')).encode('latin1')
289 lines = text.splitlines()
290 lines = text.splitlines()
290 doclines = [(lines[0])]
291 doclines = [(lines[0])]
291 for l in lines[1:]:
292 for l in lines[1:]:
292 # Stop once we find some Python doctest
293 # Stop once we find some Python doctest
293 if l.strip().startswith('>>>'):
294 if l.strip().startswith('>>>'):
294 break
295 break
295 if dedent:
296 if dedent:
296 doclines.append(l.rstrip())
297 doclines.append(l.rstrip())
297 else:
298 else:
298 doclines.append(' ' + l.strip())
299 doclines.append(' ' + l.strip())
299 entries.append('\n'.join(doclines))
300 entries.append('\n'.join(doclines))
300 entries = '\n\n'.join(entries)
301 entries = '\n\n'.join(entries)
301 return doc.replace(marker, entries)
302 return doc.replace(marker, entries)
302
303
303 def addtopicsymbols(topic, marker, symbols, dedent=False):
304 def addtopicsymbols(topic, marker, symbols, dedent=False):
304 def add(ui, topic, doc):
305 def add(ui, topic, doc):
305 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
306 return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent)
306 addtopichook(topic, add)
307 addtopichook(topic, add)
307
308
308 addtopicsymbols('bundlespec', '.. bundlecompressionmarker',
309 addtopicsymbols('bundlespec', '.. bundlecompressionmarker',
309 util.bundlecompressiontopics())
310 util.bundlecompressiontopics())
310 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
311 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
311 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
312 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
312 filemerge.internalsdoc)
313 filemerge.internalsdoc)
313 addtopicsymbols('revisions', '.. predicatesmarker', revset.symbols)
314 addtopicsymbols('revisions', '.. predicatesmarker', revset.symbols)
314 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
315 addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords)
315 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
316 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
316 addtopicsymbols('templates', '.. functionsmarker', templatefuncs.funcs)
317 addtopicsymbols('templates', '.. functionsmarker', templatefuncs.funcs)
317 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
318 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
318 dedent=True)
319 dedent=True)
319
320
320 def help_(ui, commands, name, unknowncmd=False, full=True, subtopic=None,
321 def help_(ui, commands, name, unknowncmd=False, full=True, subtopic=None,
321 **opts):
322 **opts):
322 '''
323 '''
323 Generate the help for 'name' as unformatted restructured text. If
324 Generate the help for 'name' as unformatted restructured text. If
324 'name' is None, describe the commands available.
325 'name' is None, describe the commands available.
325 '''
326 '''
326
327
327 opts = pycompat.byteskwargs(opts)
328 opts = pycompat.byteskwargs(opts)
328
329
329 def helpcmd(name, subtopic=None):
330 def helpcmd(name, subtopic=None):
330 try:
331 try:
331 aliases, entry = cmdutil.findcmd(name, commands.table,
332 aliases, entry = cmdutil.findcmd(name, commands.table,
332 strict=unknowncmd)
333 strict=unknowncmd)
333 except error.AmbiguousCommand as inst:
334 except error.AmbiguousCommand as inst:
334 # py3k fix: except vars can't be used outside the scope of the
335 # py3k fix: except vars can't be used outside the scope of the
335 # except block, nor can be used inside a lambda. python issue4617
336 # except block, nor can be used inside a lambda. python issue4617
336 prefix = inst.args[0]
337 prefix = inst.args[0]
337 select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix)
338 select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix)
338 rst = helplist(select)
339 rst = helplist(select)
339 return rst
340 return rst
340
341
341 rst = []
342 rst = []
342
343
343 # check if it's an invalid alias and display its error if it is
344 # check if it's an invalid alias and display its error if it is
344 if getattr(entry[0], 'badalias', None):
345 if getattr(entry[0], 'badalias', None):
345 rst.append(entry[0].badalias + '\n')
346 rst.append(entry[0].badalias + '\n')
346 if entry[0].unknowncmd:
347 if entry[0].unknowncmd:
347 try:
348 try:
348 rst.extend(helpextcmd(entry[0].cmdname))
349 rst.extend(helpextcmd(entry[0].cmdname))
349 except error.UnknownCommand:
350 except error.UnknownCommand:
350 pass
351 pass
351 return rst
352 return rst
352
353
353 # synopsis
354 # synopsis
354 if len(entry) > 2:
355 if len(entry) > 2:
355 if entry[2].startswith('hg'):
356 if entry[2].startswith('hg'):
356 rst.append("%s\n" % entry[2])
357 rst.append("%s\n" % entry[2])
357 else:
358 else:
358 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
359 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
359 else:
360 else:
360 rst.append('hg %s\n' % aliases[0])
361 rst.append('hg %s\n' % aliases[0])
361 # aliases
362 # aliases
362 if full and not ui.quiet and len(aliases) > 1:
363 if full and not ui.quiet and len(aliases) > 1:
363 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
364 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
364 rst.append('\n')
365 rst.append('\n')
365
366
366 # description
367 # description
367 doc = gettext(pycompat.getdoc(entry[0]))
368 doc = gettext(pycompat.getdoc(entry[0]))
368 if not doc:
369 if not doc:
369 doc = _("(no help text available)")
370 doc = _("(no help text available)")
370 if util.safehasattr(entry[0], 'definition'): # aliased command
371 if util.safehasattr(entry[0], 'definition'): # aliased command
371 source = entry[0].source
372 source = entry[0].source
372 if entry[0].definition.startswith('!'): # shell alias
373 if entry[0].definition.startswith('!'): # shell alias
373 doc = (_('shell alias for: %s\n\n%s\n\ndefined by: %s\n') %
374 doc = (_('shell alias for: %s\n\n%s\n\ndefined by: %s\n') %
374 (entry[0].definition[1:], doc, source))
375 (entry[0].definition[1:], doc, source))
375 else:
376 else:
376 doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') %
377 doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') %
377 (entry[0].definition, doc, source))
378 (entry[0].definition, doc, source))
378 doc = doc.splitlines(True)
379 doc = doc.splitlines(True)
379 if ui.quiet or not full:
380 if ui.quiet or not full:
380 rst.append(doc[0])
381 rst.append(doc[0])
381 else:
382 else:
382 rst.extend(doc)
383 rst.extend(doc)
383 rst.append('\n')
384 rst.append('\n')
384
385
385 # check if this command shadows a non-trivial (multi-line)
386 # check if this command shadows a non-trivial (multi-line)
386 # extension help text
387 # extension help text
387 try:
388 try:
388 mod = extensions.find(name)
389 mod = extensions.find(name)
389 doc = gettext(pycompat.getdoc(mod)) or ''
390 doc = gettext(pycompat.getdoc(mod)) or ''
390 if '\n' in doc.strip():
391 if '\n' in doc.strip():
391 msg = _("(use 'hg help -e %s' to show help for "
392 msg = _("(use 'hg help -e %s' to show help for "
392 "the %s extension)") % (name, name)
393 "the %s extension)") % (name, name)
393 rst.append('\n%s\n' % msg)
394 rst.append('\n%s\n' % msg)
394 except KeyError:
395 except KeyError:
395 pass
396 pass
396
397
397 # options
398 # options
398 if not ui.quiet and entry[1]:
399 if not ui.quiet and entry[1]:
399 rst.append(optrst(_("options"), entry[1], ui.verbose))
400 rst.append(optrst(_("options"), entry[1], ui.verbose))
400
401
401 if ui.verbose:
402 if ui.verbose:
402 rst.append(optrst(_("global options"),
403 rst.append(optrst(_("global options"),
403 commands.globalopts, ui.verbose))
404 commands.globalopts, ui.verbose))
404
405
405 if not ui.verbose:
406 if not ui.verbose:
406 if not full:
407 if not full:
407 rst.append(_("\n(use 'hg %s -h' to show more help)\n")
408 rst.append(_("\n(use 'hg %s -h' to show more help)\n")
408 % name)
409 % name)
409 elif not ui.quiet:
410 elif not ui.quiet:
410 rst.append(_('\n(some details hidden, use --verbose '
411 rst.append(_('\n(some details hidden, use --verbose '
411 'to show complete help)'))
412 'to show complete help)'))
412
413
413 return rst
414 return rst
414
415
415
416
416 def helplist(select=None, **opts):
417 def helplist(select=None, **opts):
417 # list of commands
418 # list of commands
418 if name == "shortlist":
419 if name == "shortlist":
419 header = _('basic commands:\n\n')
420 header = _('basic commands:\n\n')
420 elif name == "debug":
421 elif name == "debug":
421 header = _('debug commands (internal and unsupported):\n\n')
422 header = _('debug commands (internal and unsupported):\n\n')
422 else:
423 else:
423 header = _('list of commands:\n\n')
424 header = _('list of commands:\n\n')
424
425
425 h = {}
426 h = {}
426 cmds = {}
427 cmds = {}
427 for c, e in commands.table.iteritems():
428 for c, e in commands.table.iteritems():
428 fs = cmdutil.parsealiases(c)
429 fs = cmdutil.parsealiases(c)
429 f = fs[0]
430 f = fs[0]
430 p = ''
431 p = ''
431 if c.startswith("^"):
432 if c.startswith("^"):
432 p = '^'
433 p = '^'
433 if select and not select(p + f):
434 if select and not select(p + f):
434 continue
435 continue
435 if (not select and name != 'shortlist' and
436 if (not select and name != 'shortlist' and
436 e[0].__module__ != commands.__name__):
437 e[0].__module__ != commands.__name__):
437 continue
438 continue
438 if name == "shortlist" and not p:
439 if name == "shortlist" and not p:
439 continue
440 continue
440 doc = pycompat.getdoc(e[0])
441 doc = pycompat.getdoc(e[0])
441 if filtercmd(ui, f, name, doc):
442 if filtercmd(ui, f, name, doc):
442 continue
443 continue
443 doc = gettext(doc)
444 doc = gettext(doc)
444 if not doc:
445 if not doc:
445 doc = _("(no help text available)")
446 doc = _("(no help text available)")
446 h[f] = doc.splitlines()[0].rstrip()
447 h[f] = doc.splitlines()[0].rstrip()
447 cmds[f] = '|'.join(fs)
448 cmds[f] = '|'.join(fs)
448
449
449 rst = []
450 rst = []
450 if not h:
451 if not h:
451 if not ui.quiet:
452 if not ui.quiet:
452 rst.append(_('no commands defined\n'))
453 rst.append(_('no commands defined\n'))
453 return rst
454 return rst
454
455
455 if not ui.quiet:
456 if not ui.quiet:
456 rst.append(header)
457 rst.append(header)
457 fns = sorted(h)
458 fns = sorted(h)
458 for f in fns:
459 for f in fns:
459 if ui.verbose:
460 if ui.verbose:
460 commacmds = cmds[f].replace("|",", ")
461 commacmds = cmds[f].replace("|",", ")
461 rst.append(" :%s: %s\n" % (commacmds, h[f]))
462 rst.append(" :%s: %s\n" % (commacmds, h[f]))
462 else:
463 else:
463 rst.append(' :%s: %s\n' % (f, h[f]))
464 rst.append(' :%s: %s\n' % (f, h[f]))
464
465
465 ex = opts.get
466 ex = opts.get
466 anyopts = (ex(r'keyword') or not (ex(r'command') or ex(r'extension')))
467 anyopts = (ex(r'keyword') or not (ex(r'command') or ex(r'extension')))
467 if not name and anyopts:
468 if not name and anyopts:
468 exts = listexts(_('enabled extensions:'), extensions.enabled())
469 exts = listexts(_('enabled extensions:'), extensions.enabled())
469 if exts:
470 if exts:
470 rst.append('\n')
471 rst.append('\n')
471 rst.extend(exts)
472 rst.extend(exts)
472
473
473 rst.append(_("\nadditional help topics:\n\n"))
474 rst.append(_("\nadditional help topics:\n\n"))
474 topics = []
475 topics = []
475 for names, header, doc in helptable:
476 for names, header, doc in helptable:
476 topics.append((names[0], header))
477 topics.append((names[0], header))
477 for t, desc in topics:
478 for t, desc in topics:
478 rst.append(" :%s: %s\n" % (t, desc))
479 rst.append(" :%s: %s\n" % (t, desc))
479
480
480 if ui.quiet:
481 if ui.quiet:
481 pass
482 pass
482 elif ui.verbose:
483 elif ui.verbose:
483 rst.append('\n%s\n' % optrst(_("global options"),
484 rst.append('\n%s\n' % optrst(_("global options"),
484 commands.globalopts, ui.verbose))
485 commands.globalopts, ui.verbose))
485 if name == 'shortlist':
486 if name == 'shortlist':
486 rst.append(_("\n(use 'hg help' for the full list "
487 rst.append(_("\n(use 'hg help' for the full list "
487 "of commands)\n"))
488 "of commands)\n"))
488 else:
489 else:
489 if name == 'shortlist':
490 if name == 'shortlist':
490 rst.append(_("\n(use 'hg help' for the full list of commands "
491 rst.append(_("\n(use 'hg help' for the full list of commands "
491 "or 'hg -v' for details)\n"))
492 "or 'hg -v' for details)\n"))
492 elif name and not full:
493 elif name and not full:
493 rst.append(_("\n(use 'hg help %s' to show the full help "
494 rst.append(_("\n(use 'hg help %s' to show the full help "
494 "text)\n") % name)
495 "text)\n") % name)
495 elif name and cmds and name in cmds.keys():
496 elif name and cmds and name in cmds.keys():
496 rst.append(_("\n(use 'hg help -v -e %s' to show built-in "
497 rst.append(_("\n(use 'hg help -v -e %s' to show built-in "
497 "aliases and global options)\n") % name)
498 "aliases and global options)\n") % name)
498 else:
499 else:
499 rst.append(_("\n(use 'hg help -v%s' to show built-in aliases "
500 rst.append(_("\n(use 'hg help -v%s' to show built-in aliases "
500 "and global options)\n")
501 "and global options)\n")
501 % (name and " " + name or ""))
502 % (name and " " + name or ""))
502 return rst
503 return rst
503
504
504 def helptopic(name, subtopic=None):
505 def helptopic(name, subtopic=None):
505 # Look for sub-topic entry first.
506 # Look for sub-topic entry first.
506 header, doc = None, None
507 header, doc = None, None
507 if subtopic and name in subtopics:
508 if subtopic and name in subtopics:
508 for names, header, doc in subtopics[name]:
509 for names, header, doc in subtopics[name]:
509 if subtopic in names:
510 if subtopic in names:
510 break
511 break
511
512
512 if not header:
513 if not header:
513 for names, header, doc in helptable:
514 for names, header, doc in helptable:
514 if name in names:
515 if name in names:
515 break
516 break
516 else:
517 else:
517 raise error.UnknownCommand(name)
518 raise error.UnknownCommand(name)
518
519
519 rst = [minirst.section(header)]
520 rst = [minirst.section(header)]
520
521
521 # description
522 # description
522 if not doc:
523 if not doc:
523 rst.append(" %s\n" % _("(no help text available)"))
524 rst.append(" %s\n" % _("(no help text available)"))
524 if callable(doc):
525 if callable(doc):
525 rst += [" %s\n" % l for l in doc(ui).splitlines()]
526 rst += [" %s\n" % l for l in doc(ui).splitlines()]
526
527
527 if not ui.verbose:
528 if not ui.verbose:
528 omitted = _('(some details hidden, use --verbose'
529 omitted = _('(some details hidden, use --verbose'
529 ' to show complete help)')
530 ' to show complete help)')
530 indicateomitted(rst, omitted)
531 indicateomitted(rst, omitted)
531
532
532 try:
533 try:
533 cmdutil.findcmd(name, commands.table)
534 cmdutil.findcmd(name, commands.table)
534 rst.append(_("\nuse 'hg help -c %s' to see help for "
535 rst.append(_("\nuse 'hg help -c %s' to see help for "
535 "the %s command\n") % (name, name))
536 "the %s command\n") % (name, name))
536 except error.UnknownCommand:
537 except error.UnknownCommand:
537 pass
538 pass
538 return rst
539 return rst
539
540
540 def helpext(name, subtopic=None):
541 def helpext(name, subtopic=None):
541 try:
542 try:
542 mod = extensions.find(name)
543 mod = extensions.find(name)
543 doc = gettext(pycompat.getdoc(mod)) or _('no help text available')
544 doc = gettext(pycompat.getdoc(mod)) or _('no help text available')
544 except KeyError:
545 except KeyError:
545 mod = None
546 mod = None
546 doc = extensions.disabledext(name)
547 doc = extensions.disabledext(name)
547 if not doc:
548 if not doc:
548 raise error.UnknownCommand(name)
549 raise error.UnknownCommand(name)
549
550
550 if '\n' not in doc:
551 if '\n' not in doc:
551 head, tail = doc, ""
552 head, tail = doc, ""
552 else:
553 else:
553 head, tail = doc.split('\n', 1)
554 head, tail = doc.split('\n', 1)
554 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
555 rst = [_('%s extension - %s\n\n') % (name.rpartition('.')[-1], head)]
555 if tail:
556 if tail:
556 rst.extend(tail.splitlines(True))
557 rst.extend(tail.splitlines(True))
557 rst.append('\n')
558 rst.append('\n')
558
559
559 if not ui.verbose:
560 if not ui.verbose:
560 omitted = _('(some details hidden, use --verbose'
561 omitted = _('(some details hidden, use --verbose'
561 ' to show complete help)')
562 ' to show complete help)')
562 indicateomitted(rst, omitted)
563 indicateomitted(rst, omitted)
563
564
564 if mod:
565 if mod:
565 try:
566 try:
566 ct = mod.cmdtable
567 ct = mod.cmdtable
567 except AttributeError:
568 except AttributeError:
568 ct = {}
569 ct = {}
569 modcmds = set([c.partition('|')[0] for c in ct])
570 modcmds = set([c.partition('|')[0] for c in ct])
570 rst.extend(helplist(modcmds.__contains__))
571 rst.extend(helplist(modcmds.__contains__))
571 else:
572 else:
572 rst.append(_("(use 'hg help extensions' for information on enabling"
573 rst.append(_("(use 'hg help extensions' for information on enabling"
573 " extensions)\n"))
574 " extensions)\n"))
574 return rst
575 return rst
575
576
576 def helpextcmd(name, subtopic=None):
577 def helpextcmd(name, subtopic=None):
577 cmd, ext, doc = extensions.disabledcmd(ui, name,
578 cmd, ext, doc = extensions.disabledcmd(ui, name,
578 ui.configbool('ui', 'strict'))
579 ui.configbool('ui', 'strict'))
579 doc = doc.splitlines()[0]
580 doc = doc.splitlines()[0]
580
581
581 rst = listexts(_("'%s' is provided by the following "
582 rst = listexts(_("'%s' is provided by the following "
582 "extension:") % cmd, {ext: doc}, indent=4,
583 "extension:") % cmd, {ext: doc}, indent=4,
583 showdeprecated=True)
584 showdeprecated=True)
584 rst.append('\n')
585 rst.append('\n')
585 rst.append(_("(use 'hg help extensions' for information on enabling "
586 rst.append(_("(use 'hg help extensions' for information on enabling "
586 "extensions)\n"))
587 "extensions)\n"))
587 return rst
588 return rst
588
589
589
590
590 rst = []
591 rst = []
591 kw = opts.get('keyword')
592 kw = opts.get('keyword')
592 if kw or name is None and any(opts[o] for o in opts):
593 if kw or name is None and any(opts[o] for o in opts):
593 matches = topicmatch(ui, commands, name or '')
594 matches = topicmatch(ui, commands, name or '')
594 helpareas = []
595 helpareas = []
595 if opts.get('extension'):
596 if opts.get('extension'):
596 helpareas += [('extensions', _('Extensions'))]
597 helpareas += [('extensions', _('Extensions'))]
597 if opts.get('command'):
598 if opts.get('command'):
598 helpareas += [('commands', _('Commands'))]
599 helpareas += [('commands', _('Commands'))]
599 if not helpareas:
600 if not helpareas:
600 helpareas = [('topics', _('Topics')),
601 helpareas = [('topics', _('Topics')),
601 ('commands', _('Commands')),
602 ('commands', _('Commands')),
602 ('extensions', _('Extensions')),
603 ('extensions', _('Extensions')),
603 ('extensioncommands', _('Extension Commands'))]
604 ('extensioncommands', _('Extension Commands'))]
604 for t, title in helpareas:
605 for t, title in helpareas:
605 if matches[t]:
606 if matches[t]:
606 rst.append('%s:\n\n' % title)
607 rst.append('%s:\n\n' % title)
607 rst.extend(minirst.maketable(sorted(matches[t]), 1))
608 rst.extend(minirst.maketable(sorted(matches[t]), 1))
608 rst.append('\n')
609 rst.append('\n')
609 if not rst:
610 if not rst:
610 msg = _('no matches')
611 msg = _('no matches')
611 hint = _("try 'hg help' for a list of topics")
612 hint = _("try 'hg help' for a list of topics")
612 raise error.Abort(msg, hint=hint)
613 raise error.Abort(msg, hint=hint)
613 elif name and name != 'shortlist':
614 elif name and name != 'shortlist':
614 queries = []
615 queries = []
615 if unknowncmd:
616 if unknowncmd:
616 queries += [helpextcmd]
617 queries += [helpextcmd]
617 if opts.get('extension'):
618 if opts.get('extension'):
618 queries += [helpext]
619 queries += [helpext]
619 if opts.get('command'):
620 if opts.get('command'):
620 queries += [helpcmd]
621 queries += [helpcmd]
621 if not queries:
622 if not queries:
622 queries = (helptopic, helpcmd, helpext, helpextcmd)
623 queries = (helptopic, helpcmd, helpext, helpextcmd)
623 for f in queries:
624 for f in queries:
624 try:
625 try:
625 rst = f(name, subtopic)
626 rst = f(name, subtopic)
626 break
627 break
627 except error.UnknownCommand:
628 except error.UnknownCommand:
628 pass
629 pass
629 else:
630 else:
630 if unknowncmd:
631 if unknowncmd:
631 raise error.UnknownCommand(name)
632 raise error.UnknownCommand(name)
632 else:
633 else:
633 msg = _('no such help topic: %s') % name
634 msg = _('no such help topic: %s') % name
634 hint = _("try 'hg help --keyword %s'") % name
635 hint = _("try 'hg help --keyword %s'") % name
635 raise error.Abort(msg, hint=hint)
636 raise error.Abort(msg, hint=hint)
636 else:
637 else:
637 # program name
638 # program name
638 if not ui.quiet:
639 if not ui.quiet:
639 rst = [_("Mercurial Distributed SCM\n"), '\n']
640 rst = [_("Mercurial Distributed SCM\n"), '\n']
640 rst.extend(helplist(None, **pycompat.strkwargs(opts)))
641 rst.extend(helplist(None, **pycompat.strkwargs(opts)))
641
642
642 return ''.join(rst)
643 return ''.join(rst)
643
644
644 def formattedhelp(ui, commands, name, keep=None, unknowncmd=False, full=True,
645 def formattedhelp(ui, commands, name, keep=None, unknowncmd=False, full=True,
645 **opts):
646 **opts):
646 """get help for a given topic (as a dotted name) as rendered rst
647 """get help for a given topic (as a dotted name) as rendered rst
647
648
648 Either returns the rendered help text or raises an exception.
649 Either returns the rendered help text or raises an exception.
649 """
650 """
650 if keep is None:
651 if keep is None:
651 keep = []
652 keep = []
652 else:
653 else:
653 keep = list(keep) # make a copy so we can mutate this later
654 keep = list(keep) # make a copy so we can mutate this later
654 fullname = name
655 fullname = name
655 section = None
656 section = None
656 subtopic = None
657 subtopic = None
657 if name and '.' in name:
658 if name and '.' in name:
658 name, remaining = name.split('.', 1)
659 name, remaining = name.split('.', 1)
659 remaining = encoding.lower(remaining)
660 remaining = encoding.lower(remaining)
660 if '.' in remaining:
661 if '.' in remaining:
661 subtopic, section = remaining.split('.', 1)
662 subtopic, section = remaining.split('.', 1)
662 else:
663 else:
663 if name in subtopics:
664 if name in subtopics:
664 subtopic = remaining
665 subtopic = remaining
665 else:
666 else:
666 section = remaining
667 section = remaining
667 textwidth = ui.configint('ui', 'textwidth')
668 textwidth = ui.configint('ui', 'textwidth')
668 termwidth = ui.termwidth() - 2
669 termwidth = ui.termwidth() - 2
669 if textwidth <= 0 or termwidth < textwidth:
670 if textwidth <= 0 or termwidth < textwidth:
670 textwidth = termwidth
671 textwidth = termwidth
671 text = help_(ui, commands, name,
672 text = help_(ui, commands, name,
672 subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts)
673 subtopic=subtopic, unknowncmd=unknowncmd, full=full, **opts)
673
674
674 formatted, pruned = minirst.format(text, textwidth, keep=keep,
675 formatted, pruned = minirst.format(text, textwidth, keep=keep,
675 section=section)
676 section=section)
676
677
677 # We could have been given a weird ".foo" section without a name
678 # We could have been given a weird ".foo" section without a name
678 # to look for, or we could have simply failed to found "foo.bar"
679 # to look for, or we could have simply failed to found "foo.bar"
679 # because bar isn't a section of foo
680 # because bar isn't a section of foo
680 if section and not (formatted and name):
681 if section and not (formatted and name):
681 raise error.Abort(_("help section not found: %s") % fullname)
682 raise error.Abort(_("help section not found: %s") % fullname)
682
683
683 if 'verbose' in pruned:
684 if 'verbose' in pruned:
684 keep.append('omitted')
685 keep.append('omitted')
685 else:
686 else:
686 keep.append('notomitted')
687 keep.append('notomitted')
687 formatted, pruned = minirst.format(text, textwidth, keep=keep,
688 formatted, pruned = minirst.format(text, textwidth, keep=keep,
688 section=section)
689 section=section)
689 return formatted
690 return formatted
@@ -1,463 +1,465
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 new changesets b6c483daf290
34 new changesets b6c483daf290
35 (run 'hg heads' to see heads, 'hg merge' to merge)
35 (run 'hg heads' to see heads, 'hg merge' to merge)
36 $ hg merge
36 $ hg merge
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 1 files updated, 0 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
39
40 $ cd ..
40 $ cd ..
41
41
42 Testing -R/--repository:
42 Testing -R/--repository:
43
43
44 $ hg -R a tip
44 $ hg -R a tip
45 changeset: 0:8580ff50825a
45 changeset: 0:8580ff50825a
46 tag: tip
46 tag: tip
47 user: test
47 user: test
48 date: Thu Jan 01 00:00:01 1970 +0000
48 date: Thu Jan 01 00:00:01 1970 +0000
49 summary: a
49 summary: a
50
50
51 $ hg --repository b tip
51 $ hg --repository b tip
52 changeset: 0:b6c483daf290
52 changeset: 0:b6c483daf290
53 tag: tip
53 tag: tip
54 user: test
54 user: test
55 date: Thu Jan 01 00:00:01 1970 +0000
55 date: Thu Jan 01 00:00:01 1970 +0000
56 summary: b
56 summary: b
57
57
58
58
59 -R with a URL:
59 -R with a URL:
60
60
61 $ hg -R file:a identify
61 $ hg -R file:a identify
62 8580ff50825a tip
62 8580ff50825a tip
63 $ hg -R file://localhost/`pwd`/a/ identify
63 $ hg -R file://localhost/`pwd`/a/ identify
64 8580ff50825a tip
64 8580ff50825a tip
65
65
66 -R with path aliases:
66 -R with path aliases:
67
67
68 $ cd c
68 $ cd c
69 $ hg -R default identify
69 $ hg -R default identify
70 8580ff50825a tip
70 8580ff50825a tip
71 $ hg -R relative identify
71 $ hg -R relative identify
72 8580ff50825a tip
72 8580ff50825a tip
73 $ echo '[paths]' >> $HGRCPATH
73 $ echo '[paths]' >> $HGRCPATH
74 $ echo 'relativetohome = a' >> $HGRCPATH
74 $ echo 'relativetohome = a' >> $HGRCPATH
75 $ HOME=`pwd`/../ hg -R relativetohome identify
75 $ HOME=`pwd`/../ hg -R relativetohome identify
76 8580ff50825a tip
76 8580ff50825a tip
77 $ cd ..
77 $ cd ..
78
78
79 #if no-outer-repo
79 #if no-outer-repo
80
80
81 Implicit -R:
81 Implicit -R:
82
82
83 $ hg ann a/a
83 $ hg ann a/a
84 0: a
84 0: a
85 $ hg ann a/a a/a
85 $ hg ann a/a a/a
86 0: a
86 0: a
87 $ hg ann a/a b/b
87 $ hg ann a/a b/b
88 abort: no repository found in '$TESTTMP' (.hg not found)!
88 abort: no repository found in '$TESTTMP' (.hg not found)!
89 [255]
89 [255]
90 $ hg -R b ann a/a
90 $ hg -R b ann a/a
91 abort: a/a not under root '$TESTTMP/b'
91 abort: a/a not under root '$TESTTMP/b'
92 (consider using '--cwd b')
92 (consider using '--cwd b')
93 [255]
93 [255]
94 $ hg log
94 $ hg log
95 abort: no repository found in '$TESTTMP' (.hg not found)!
95 abort: no repository found in '$TESTTMP' (.hg not found)!
96 [255]
96 [255]
97
97
98 #endif
98 #endif
99
99
100 Abbreviation of long option:
100 Abbreviation of long option:
101
101
102 $ hg --repo c tip
102 $ hg --repo c tip
103 changeset: 1:b6c483daf290
103 changeset: 1:b6c483daf290
104 tag: tip
104 tag: tip
105 parent: -1:000000000000
105 parent: -1:000000000000
106 user: test
106 user: test
107 date: Thu Jan 01 00:00:01 1970 +0000
107 date: Thu Jan 01 00:00:01 1970 +0000
108 summary: b
108 summary: b
109
109
110
110
111 earlygetopt with duplicate options (36d23de02da1):
111 earlygetopt with duplicate options (36d23de02da1):
112
112
113 $ hg --cwd a --cwd b --cwd c tip
113 $ hg --cwd a --cwd b --cwd c tip
114 changeset: 1:b6c483daf290
114 changeset: 1:b6c483daf290
115 tag: tip
115 tag: tip
116 parent: -1:000000000000
116 parent: -1:000000000000
117 user: test
117 user: test
118 date: Thu Jan 01 00:00:01 1970 +0000
118 date: Thu Jan 01 00:00:01 1970 +0000
119 summary: b
119 summary: b
120
120
121 $ hg --repo c --repository b -R a tip
121 $ hg --repo c --repository b -R a tip
122 changeset: 0:8580ff50825a
122 changeset: 0:8580ff50825a
123 tag: tip
123 tag: tip
124 user: test
124 user: test
125 date: Thu Jan 01 00:00:01 1970 +0000
125 date: Thu Jan 01 00:00:01 1970 +0000
126 summary: a
126 summary: a
127
127
128
128
129 earlygetopt short option without following space:
129 earlygetopt short option without following space:
130
130
131 $ hg -q -Rb tip
131 $ hg -q -Rb tip
132 0:b6c483daf290
132 0:b6c483daf290
133
133
134 earlygetopt with illegal abbreviations:
134 earlygetopt with illegal abbreviations:
135
135
136 $ hg --confi "foo.bar=baz"
136 $ hg --confi "foo.bar=baz"
137 abort: option --config may not be abbreviated!
137 abort: option --config may not be abbreviated!
138 [255]
138 [255]
139 $ hg --cw a tip
139 $ hg --cw a tip
140 abort: option --cwd may not be abbreviated!
140 abort: option --cwd may not be abbreviated!
141 [255]
141 [255]
142 $ hg --rep a tip
142 $ hg --rep a tip
143 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
143 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
144 [255]
144 [255]
145 $ hg --repositor a tip
145 $ hg --repositor a tip
146 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
146 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
147 [255]
147 [255]
148 $ hg -qR a tip
148 $ hg -qR a tip
149 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
149 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
150 [255]
150 [255]
151 $ hg -qRa tip
151 $ hg -qRa tip
152 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
152 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
153 [255]
153 [255]
154
154
155 Testing --cwd:
155 Testing --cwd:
156
156
157 $ hg --cwd a parents
157 $ hg --cwd a parents
158 changeset: 0:8580ff50825a
158 changeset: 0:8580ff50825a
159 tag: tip
159 tag: tip
160 user: test
160 user: test
161 date: Thu Jan 01 00:00:01 1970 +0000
161 date: Thu Jan 01 00:00:01 1970 +0000
162 summary: a
162 summary: a
163
163
164
164
165 Testing -y/--noninteractive - just be sure it is parsed:
165 Testing -y/--noninteractive - just be sure it is parsed:
166
166
167 $ hg --cwd a tip -q --noninteractive
167 $ hg --cwd a tip -q --noninteractive
168 0:8580ff50825a
168 0:8580ff50825a
169 $ hg --cwd a tip -q -y
169 $ hg --cwd a tip -q -y
170 0:8580ff50825a
170 0:8580ff50825a
171
171
172 Testing -q/--quiet:
172 Testing -q/--quiet:
173
173
174 $ hg -R a -q tip
174 $ hg -R a -q tip
175 0:8580ff50825a
175 0:8580ff50825a
176 $ hg -R b -q tip
176 $ hg -R b -q tip
177 0:b6c483daf290
177 0:b6c483daf290
178 $ hg -R c --quiet parents
178 $ hg -R c --quiet parents
179 0:8580ff50825a
179 0:8580ff50825a
180 1:b6c483daf290
180 1:b6c483daf290
181
181
182 Testing -v/--verbose:
182 Testing -v/--verbose:
183
183
184 $ hg --cwd c head -v
184 $ hg --cwd c head -v
185 changeset: 1:b6c483daf290
185 changeset: 1:b6c483daf290
186 tag: tip
186 tag: tip
187 parent: -1:000000000000
187 parent: -1:000000000000
188 user: test
188 user: test
189 date: Thu Jan 01 00:00:01 1970 +0000
189 date: Thu Jan 01 00:00:01 1970 +0000
190 files: b
190 files: b
191 description:
191 description:
192 b
192 b
193
193
194
194
195 changeset: 0:8580ff50825a
195 changeset: 0:8580ff50825a
196 user: test
196 user: test
197 date: Thu Jan 01 00:00:01 1970 +0000
197 date: Thu Jan 01 00:00:01 1970 +0000
198 files: a
198 files: a
199 description:
199 description:
200 a
200 a
201
201
202
202
203 $ hg --cwd b tip --verbose
203 $ hg --cwd b tip --verbose
204 changeset: 0:b6c483daf290
204 changeset: 0:b6c483daf290
205 tag: tip
205 tag: tip
206 user: test
206 user: test
207 date: Thu Jan 01 00:00:01 1970 +0000
207 date: Thu Jan 01 00:00:01 1970 +0000
208 files: b
208 files: b
209 description:
209 description:
210 b
210 b
211
211
212
212
213
213
214 Testing --config:
214 Testing --config:
215
215
216 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
216 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
217 quuxfoo
217 quuxfoo
218 $ hg --cwd c --config '' tip -q
218 $ hg --cwd c --config '' tip -q
219 abort: malformed --config option: '' (use --config section.name=value)
219 abort: malformed --config option: '' (use --config section.name=value)
220 [255]
220 [255]
221 $ hg --cwd c --config a.b tip -q
221 $ hg --cwd c --config a.b tip -q
222 abort: malformed --config option: 'a.b' (use --config section.name=value)
222 abort: malformed --config option: 'a.b' (use --config section.name=value)
223 [255]
223 [255]
224 $ hg --cwd c --config a tip -q
224 $ hg --cwd c --config a tip -q
225 abort: malformed --config option: 'a' (use --config section.name=value)
225 abort: malformed --config option: 'a' (use --config section.name=value)
226 [255]
226 [255]
227 $ hg --cwd c --config a.= tip -q
227 $ hg --cwd c --config a.= tip -q
228 abort: malformed --config option: 'a.=' (use --config section.name=value)
228 abort: malformed --config option: 'a.=' (use --config section.name=value)
229 [255]
229 [255]
230 $ hg --cwd c --config .b= tip -q
230 $ hg --cwd c --config .b= tip -q
231 abort: malformed --config option: '.b=' (use --config section.name=value)
231 abort: malformed --config option: '.b=' (use --config section.name=value)
232 [255]
232 [255]
233
233
234 Testing --debug:
234 Testing --debug:
235
235
236 $ hg --cwd c log --debug
236 $ hg --cwd c log --debug
237 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
237 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
238 tag: tip
238 tag: tip
239 phase: public
239 phase: public
240 parent: -1:0000000000000000000000000000000000000000
240 parent: -1:0000000000000000000000000000000000000000
241 parent: -1:0000000000000000000000000000000000000000
241 parent: -1:0000000000000000000000000000000000000000
242 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
242 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
243 user: test
243 user: test
244 date: Thu Jan 01 00:00:01 1970 +0000
244 date: Thu Jan 01 00:00:01 1970 +0000
245 files+: b
245 files+: b
246 extra: branch=default
246 extra: branch=default
247 description:
247 description:
248 b
248 b
249
249
250
250
251 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
251 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
252 phase: public
252 phase: public
253 parent: -1:0000000000000000000000000000000000000000
253 parent: -1:0000000000000000000000000000000000000000
254 parent: -1:0000000000000000000000000000000000000000
254 parent: -1:0000000000000000000000000000000000000000
255 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
255 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
256 user: test
256 user: test
257 date: Thu Jan 01 00:00:01 1970 +0000
257 date: Thu Jan 01 00:00:01 1970 +0000
258 files+: a
258 files+: a
259 extra: branch=default
259 extra: branch=default
260 description:
260 description:
261 a
261 a
262
262
263
263
264
264
265 Testing --traceback:
265 Testing --traceback:
266
266
267 #if no-chg
267 #if no-chg
268 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
268 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
269 Traceback (most recent call last):
269 Traceback (most recent call last):
270 #else
270 #else
271 Traceback for '--config' errors not supported with chg.
271 Traceback for '--config' errors not supported with chg.
272 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
272 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
273 [1]
273 [1]
274 #endif
274 #endif
275
275
276 Testing --time:
276 Testing --time:
277
277
278 $ hg --cwd a --time id
278 $ hg --cwd a --time id
279 8580ff50825a tip
279 8580ff50825a tip
280 time: real * (glob)
280 time: real * (glob)
281
281
282 Testing --version:
282 Testing --version:
283
283
284 $ hg --version -q
284 $ hg --version -q
285 Mercurial Distributed SCM * (glob)
285 Mercurial Distributed SCM * (glob)
286
286
287 hide outer repo
287 hide outer repo
288 $ hg init
288 $ hg init
289
289
290 Testing -h/--help:
290 Testing -h/--help:
291
291
292 #if no-extraextensions
292 #if no-extraextensions
293
293
294 $ hg -h
294 $ hg -h
295 Mercurial Distributed SCM
295 Mercurial Distributed SCM
296
296
297 list of commands:
297 list of commands:
298
298
299 add add the specified files on the next commit
299 add add the specified files on the next commit
300 addremove add all new files, delete all missing files
300 addremove add all new files, delete all missing files
301 annotate show changeset information by line for each file
301 annotate show changeset information by line for each file
302 archive create an unversioned archive of a repository revision
302 archive create an unversioned archive of a repository revision
303 backout reverse effect of earlier changeset
303 backout reverse effect of earlier changeset
304 bisect subdivision search of changesets
304 bisect subdivision search of changesets
305 bookmarks create a new bookmark or list existing bookmarks
305 bookmarks create a new bookmark or list existing bookmarks
306 branch set or show the current branch name
306 branch set or show the current branch name
307 branches list repository named branches
307 branches list repository named branches
308 bundle create a bundle file
308 bundle create a bundle file
309 cat output the current or given revision of files
309 cat output the current or given revision of files
310 clone make a copy of an existing repository
310 clone make a copy of an existing repository
311 commit commit the specified files or all outstanding changes
311 commit commit the specified files or all outstanding changes
312 config show combined config settings from all hgrc files
312 config show combined config settings from all hgrc files
313 copy mark files as copied for the next commit
313 copy mark files as copied for the next commit
314 diff diff repository (or selected files)
314 diff diff repository (or selected files)
315 export dump the header and diffs for one or more changesets
315 export dump the header and diffs for one or more changesets
316 files list tracked files
316 files list tracked files
317 forget forget the specified files on the next commit
317 forget forget the specified files on the next commit
318 graft copy changes from other branches onto the current branch
318 graft copy changes from other branches onto the current branch
319 grep search revision history for a pattern in specified files
319 grep search revision history for a pattern in specified files
320 heads show branch heads
320 heads show branch heads
321 help show help for a given topic or a help overview
321 help show help for a given topic or a help overview
322 identify identify the working directory or specified revision
322 identify identify the working directory or specified revision
323 import import an ordered set of patches
323 import import an ordered set of patches
324 incoming show new changesets found in source
324 incoming show new changesets found in source
325 init create a new repository in the given directory
325 init create a new repository in the given directory
326 log show revision history of entire repository or files
326 log show revision history of entire repository or files
327 manifest output the current or given revision of the project manifest
327 manifest output the current or given revision of the project manifest
328 merge merge another revision into working directory
328 merge merge another revision into working directory
329 outgoing show changesets not found in the destination
329 outgoing show changesets not found in the destination
330 paths show aliases for remote repositories
330 paths show aliases for remote repositories
331 phase set or show the current phase name
331 phase set or show the current phase name
332 pull pull changes from the specified source
332 pull pull changes from the specified source
333 push push changes to the specified destination
333 push push changes to the specified destination
334 recover roll back an interrupted transaction
334 recover roll back an interrupted transaction
335 remove remove the specified files on the next commit
335 remove remove the specified files on the next commit
336 rename rename files; equivalent of copy + remove
336 rename rename files; equivalent of copy + remove
337 resolve redo merges or set/view the merge status of files
337 resolve redo merges or set/view the merge status of files
338 revert restore files to their checkout state
338 revert restore files to their checkout state
339 root print the root (top) of the current working directory
339 root print the root (top) of the current working directory
340 serve start stand-alone webserver
340 serve start stand-alone webserver
341 status show changed files in the working directory
341 status show changed files in the working directory
342 summary summarize working directory state
342 summary summarize working directory state
343 tag add one or more tags for the current or given revision
343 tag add one or more tags for the current or given revision
344 tags list repository tags
344 tags list repository tags
345 unbundle apply one or more bundle files
345 unbundle apply one or more bundle files
346 update update working directory (or switch revisions)
346 update update working directory (or switch revisions)
347 verify verify the integrity of the repository
347 verify verify the integrity of the repository
348 version output version and copyright information
348 version output version and copyright information
349
349
350 additional help topics:
350 additional help topics:
351
351
352 bundlespec Bundle File Formats
352 bundlespec Bundle File Formats
353 color Colorizing Outputs
353 color Colorizing Outputs
354 config Configuration Files
354 config Configuration Files
355 dates Date Formats
355 dates Date Formats
356 deprecated Deprecated Features
356 diffs Diff Formats
357 diffs Diff Formats
357 environment Environment Variables
358 environment Environment Variables
358 extensions Using Additional Features
359 extensions Using Additional Features
359 filesets Specifying File Sets
360 filesets Specifying File Sets
360 flags Command-line flags
361 flags Command-line flags
361 glossary Glossary
362 glossary Glossary
362 hgignore Syntax for Mercurial Ignore Files
363 hgignore Syntax for Mercurial Ignore Files
363 hgweb Configuring hgweb
364 hgweb Configuring hgweb
364 internals Technical implementation topics
365 internals Technical implementation topics
365 merge-tools Merge Tools
366 merge-tools Merge Tools
366 pager Pager Support
367 pager Pager Support
367 patterns File Name Patterns
368 patterns File Name Patterns
368 phases Working with Phases
369 phases Working with Phases
369 revisions Specifying Revisions
370 revisions Specifying Revisions
370 scripting Using Mercurial from scripts and automation
371 scripting Using Mercurial from scripts and automation
371 subrepos Subrepositories
372 subrepos Subrepositories
372 templating Template Usage
373 templating Template Usage
373 urls URL Paths
374 urls URL Paths
374
375
375 (use 'hg help -v' to show built-in aliases and global options)
376 (use 'hg help -v' to show built-in aliases and global options)
376
377
377 $ hg --help
378 $ hg --help
378 Mercurial Distributed SCM
379 Mercurial Distributed SCM
379
380
380 list of commands:
381 list of commands:
381
382
382 add add the specified files on the next commit
383 add add the specified files on the next commit
383 addremove add all new files, delete all missing files
384 addremove add all new files, delete all missing files
384 annotate show changeset information by line for each file
385 annotate show changeset information by line for each file
385 archive create an unversioned archive of a repository revision
386 archive create an unversioned archive of a repository revision
386 backout reverse effect of earlier changeset
387 backout reverse effect of earlier changeset
387 bisect subdivision search of changesets
388 bisect subdivision search of changesets
388 bookmarks create a new bookmark or list existing bookmarks
389 bookmarks create a new bookmark or list existing bookmarks
389 branch set or show the current branch name
390 branch set or show the current branch name
390 branches list repository named branches
391 branches list repository named branches
391 bundle create a bundle file
392 bundle create a bundle file
392 cat output the current or given revision of files
393 cat output the current or given revision of files
393 clone make a copy of an existing repository
394 clone make a copy of an existing repository
394 commit commit the specified files or all outstanding changes
395 commit commit the specified files or all outstanding changes
395 config show combined config settings from all hgrc files
396 config show combined config settings from all hgrc files
396 copy mark files as copied for the next commit
397 copy mark files as copied for the next commit
397 diff diff repository (or selected files)
398 diff diff repository (or selected files)
398 export dump the header and diffs for one or more changesets
399 export dump the header and diffs for one or more changesets
399 files list tracked files
400 files list tracked files
400 forget forget the specified files on the next commit
401 forget forget the specified files on the next commit
401 graft copy changes from other branches onto the current branch
402 graft copy changes from other branches onto the current branch
402 grep search revision history for a pattern in specified files
403 grep search revision history for a pattern in specified files
403 heads show branch heads
404 heads show branch heads
404 help show help for a given topic or a help overview
405 help show help for a given topic or a help overview
405 identify identify the working directory or specified revision
406 identify identify the working directory or specified revision
406 import import an ordered set of patches
407 import import an ordered set of patches
407 incoming show new changesets found in source
408 incoming show new changesets found in source
408 init create a new repository in the given directory
409 init create a new repository in the given directory
409 log show revision history of entire repository or files
410 log show revision history of entire repository or files
410 manifest output the current or given revision of the project manifest
411 manifest output the current or given revision of the project manifest
411 merge merge another revision into working directory
412 merge merge another revision into working directory
412 outgoing show changesets not found in the destination
413 outgoing show changesets not found in the destination
413 paths show aliases for remote repositories
414 paths show aliases for remote repositories
414 phase set or show the current phase name
415 phase set or show the current phase name
415 pull pull changes from the specified source
416 pull pull changes from the specified source
416 push push changes to the specified destination
417 push push changes to the specified destination
417 recover roll back an interrupted transaction
418 recover roll back an interrupted transaction
418 remove remove the specified files on the next commit
419 remove remove the specified files on the next commit
419 rename rename files; equivalent of copy + remove
420 rename rename files; equivalent of copy + remove
420 resolve redo merges or set/view the merge status of files
421 resolve redo merges or set/view the merge status of files
421 revert restore files to their checkout state
422 revert restore files to their checkout state
422 root print the root (top) of the current working directory
423 root print the root (top) of the current working directory
423 serve start stand-alone webserver
424 serve start stand-alone webserver
424 status show changed files in the working directory
425 status show changed files in the working directory
425 summary summarize working directory state
426 summary summarize working directory state
426 tag add one or more tags for the current or given revision
427 tag add one or more tags for the current or given revision
427 tags list repository tags
428 tags list repository tags
428 unbundle apply one or more bundle files
429 unbundle apply one or more bundle files
429 update update working directory (or switch revisions)
430 update update working directory (or switch revisions)
430 verify verify the integrity of the repository
431 verify verify the integrity of the repository
431 version output version and copyright information
432 version output version and copyright information
432
433
433 additional help topics:
434 additional help topics:
434
435
435 bundlespec Bundle File Formats
436 bundlespec Bundle File Formats
436 color Colorizing Outputs
437 color Colorizing Outputs
437 config Configuration Files
438 config Configuration Files
438 dates Date Formats
439 dates Date Formats
440 deprecated Deprecated Features
439 diffs Diff Formats
441 diffs Diff Formats
440 environment Environment Variables
442 environment Environment Variables
441 extensions Using Additional Features
443 extensions Using Additional Features
442 filesets Specifying File Sets
444 filesets Specifying File Sets
443 flags Command-line flags
445 flags Command-line flags
444 glossary Glossary
446 glossary Glossary
445 hgignore Syntax for Mercurial Ignore Files
447 hgignore Syntax for Mercurial Ignore Files
446 hgweb Configuring hgweb
448 hgweb Configuring hgweb
447 internals Technical implementation topics
449 internals Technical implementation topics
448 merge-tools Merge Tools
450 merge-tools Merge Tools
449 pager Pager Support
451 pager Pager Support
450 patterns File Name Patterns
452 patterns File Name Patterns
451 phases Working with Phases
453 phases Working with Phases
452 revisions Specifying Revisions
454 revisions Specifying Revisions
453 scripting Using Mercurial from scripts and automation
455 scripting Using Mercurial from scripts and automation
454 subrepos Subrepositories
456 subrepos Subrepositories
455 templating Template Usage
457 templating Template Usage
456 urls URL Paths
458 urls URL Paths
457
459
458 (use 'hg help -v' to show built-in aliases and global options)
460 (use 'hg help -v' to show built-in aliases and global options)
459
461
460 #endif
462 #endif
461
463
462 Not tested: --debugger
464 Not tested: --debugger
463
465
@@ -1,3506 +1,3516
1 Short help:
1 Short help:
2
2
3 $ hg
3 $ hg
4 Mercurial Distributed SCM
4 Mercurial Distributed SCM
5
5
6 basic commands:
6 basic commands:
7
7
8 add add the specified files on the next commit
8 add add the specified files on the next commit
9 annotate show changeset information by line for each file
9 annotate show changeset information by line for each file
10 clone make a copy of an existing repository
10 clone make a copy of an existing repository
11 commit commit the specified files or all outstanding changes
11 commit commit the specified files or all outstanding changes
12 diff diff repository (or selected files)
12 diff diff repository (or selected files)
13 export dump the header and diffs for one or more changesets
13 export dump the header and diffs for one or more changesets
14 forget forget the specified files on the next commit
14 forget forget the specified files on the next commit
15 init create a new repository in the given directory
15 init create a new repository in the given directory
16 log show revision history of entire repository or files
16 log show revision history of entire repository or files
17 merge merge another revision into working directory
17 merge merge another revision into working directory
18 pull pull changes from the specified source
18 pull pull changes from the specified source
19 push push changes to the specified destination
19 push push changes to the specified destination
20 remove remove the specified files on the next commit
20 remove remove the specified files on the next commit
21 serve start stand-alone webserver
21 serve start stand-alone webserver
22 status show changed files in the working directory
22 status show changed files in the working directory
23 summary summarize working directory state
23 summary summarize working directory state
24 update update working directory (or switch revisions)
24 update update working directory (or switch revisions)
25
25
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
27
27
28 $ hg -q
28 $ hg -q
29 add add the specified files on the next commit
29 add add the specified files on the next commit
30 annotate show changeset information by line for each file
30 annotate show changeset information by line for each file
31 clone make a copy of an existing repository
31 clone make a copy of an existing repository
32 commit commit the specified files or all outstanding changes
32 commit commit the specified files or all outstanding changes
33 diff diff repository (or selected files)
33 diff diff repository (or selected files)
34 export dump the header and diffs for one or more changesets
34 export dump the header and diffs for one or more changesets
35 forget forget the specified files on the next commit
35 forget forget the specified files on the next commit
36 init create a new repository in the given directory
36 init create a new repository in the given directory
37 log show revision history of entire repository or files
37 log show revision history of entire repository or files
38 merge merge another revision into working directory
38 merge merge another revision into working directory
39 pull pull changes from the specified source
39 pull pull changes from the specified source
40 push push changes to the specified destination
40 push push changes to the specified destination
41 remove remove the specified files on the next commit
41 remove remove the specified files on the next commit
42 serve start stand-alone webserver
42 serve start stand-alone webserver
43 status show changed files in the working directory
43 status show changed files in the working directory
44 summary summarize working directory state
44 summary summarize working directory state
45 update update working directory (or switch revisions)
45 update update working directory (or switch revisions)
46
46
47 Extra extensions will be printed in help output in a non-reliable order since
47 Extra extensions will be printed in help output in a non-reliable order since
48 the extension is unknown.
48 the extension is unknown.
49 #if no-extraextensions
49 #if no-extraextensions
50
50
51 $ hg help
51 $ hg help
52 Mercurial Distributed SCM
52 Mercurial Distributed SCM
53
53
54 list of commands:
54 list of commands:
55
55
56 add add the specified files on the next commit
56 add add the specified files on the next commit
57 addremove add all new files, delete all missing files
57 addremove add all new files, delete all missing files
58 annotate show changeset information by line for each file
58 annotate show changeset information by line for each file
59 archive create an unversioned archive of a repository revision
59 archive create an unversioned archive of a repository revision
60 backout reverse effect of earlier changeset
60 backout reverse effect of earlier changeset
61 bisect subdivision search of changesets
61 bisect subdivision search of changesets
62 bookmarks create a new bookmark or list existing bookmarks
62 bookmarks create a new bookmark or list existing bookmarks
63 branch set or show the current branch name
63 branch set or show the current branch name
64 branches list repository named branches
64 branches list repository named branches
65 bundle create a bundle file
65 bundle create a bundle file
66 cat output the current or given revision of files
66 cat output the current or given revision of files
67 clone make a copy of an existing repository
67 clone make a copy of an existing repository
68 commit commit the specified files or all outstanding changes
68 commit commit the specified files or all outstanding changes
69 config show combined config settings from all hgrc files
69 config show combined config settings from all hgrc files
70 copy mark files as copied for the next commit
70 copy mark files as copied for the next commit
71 diff diff repository (or selected files)
71 diff diff repository (or selected files)
72 export dump the header and diffs for one or more changesets
72 export dump the header and diffs for one or more changesets
73 files list tracked files
73 files list tracked files
74 forget forget the specified files on the next commit
74 forget forget the specified files on the next commit
75 graft copy changes from other branches onto the current branch
75 graft copy changes from other branches onto the current branch
76 grep search revision history for a pattern in specified files
76 grep search revision history for a pattern in specified files
77 heads show branch heads
77 heads show branch heads
78 help show help for a given topic or a help overview
78 help show help for a given topic or a help overview
79 identify identify the working directory or specified revision
79 identify identify the working directory or specified revision
80 import import an ordered set of patches
80 import import an ordered set of patches
81 incoming show new changesets found in source
81 incoming show new changesets found in source
82 init create a new repository in the given directory
82 init create a new repository in the given directory
83 log show revision history of entire repository or files
83 log show revision history of entire repository or files
84 manifest output the current or given revision of the project manifest
84 manifest output the current or given revision of the project manifest
85 merge merge another revision into working directory
85 merge merge another revision into working directory
86 outgoing show changesets not found in the destination
86 outgoing show changesets not found in the destination
87 paths show aliases for remote repositories
87 paths show aliases for remote repositories
88 phase set or show the current phase name
88 phase set or show the current phase name
89 pull pull changes from the specified source
89 pull pull changes from the specified source
90 push push changes to the specified destination
90 push push changes to the specified destination
91 recover roll back an interrupted transaction
91 recover roll back an interrupted transaction
92 remove remove the specified files on the next commit
92 remove remove the specified files on the next commit
93 rename rename files; equivalent of copy + remove
93 rename rename files; equivalent of copy + remove
94 resolve redo merges or set/view the merge status of files
94 resolve redo merges or set/view the merge status of files
95 revert restore files to their checkout state
95 revert restore files to their checkout state
96 root print the root (top) of the current working directory
96 root print the root (top) of the current working directory
97 serve start stand-alone webserver
97 serve start stand-alone webserver
98 status show changed files in the working directory
98 status show changed files in the working directory
99 summary summarize working directory state
99 summary summarize working directory state
100 tag add one or more tags for the current or given revision
100 tag add one or more tags for the current or given revision
101 tags list repository tags
101 tags list repository tags
102 unbundle apply one or more bundle files
102 unbundle apply one or more bundle files
103 update update working directory (or switch revisions)
103 update update working directory (or switch revisions)
104 verify verify the integrity of the repository
104 verify verify the integrity of the repository
105 version output version and copyright information
105 version output version and copyright information
106
106
107 additional help topics:
107 additional help topics:
108
108
109 bundlespec Bundle File Formats
109 bundlespec Bundle File Formats
110 color Colorizing Outputs
110 color Colorizing Outputs
111 config Configuration Files
111 config Configuration Files
112 dates Date Formats
112 dates Date Formats
113 deprecated Deprecated Features
113 diffs Diff Formats
114 diffs Diff Formats
114 environment Environment Variables
115 environment Environment Variables
115 extensions Using Additional Features
116 extensions Using Additional Features
116 filesets Specifying File Sets
117 filesets Specifying File Sets
117 flags Command-line flags
118 flags Command-line flags
118 glossary Glossary
119 glossary Glossary
119 hgignore Syntax for Mercurial Ignore Files
120 hgignore Syntax for Mercurial Ignore Files
120 hgweb Configuring hgweb
121 hgweb Configuring hgweb
121 internals Technical implementation topics
122 internals Technical implementation topics
122 merge-tools Merge Tools
123 merge-tools Merge Tools
123 pager Pager Support
124 pager Pager Support
124 patterns File Name Patterns
125 patterns File Name Patterns
125 phases Working with Phases
126 phases Working with Phases
126 revisions Specifying Revisions
127 revisions Specifying Revisions
127 scripting Using Mercurial from scripts and automation
128 scripting Using Mercurial from scripts and automation
128 subrepos Subrepositories
129 subrepos Subrepositories
129 templating Template Usage
130 templating Template Usage
130 urls URL Paths
131 urls URL Paths
131
132
132 (use 'hg help -v' to show built-in aliases and global options)
133 (use 'hg help -v' to show built-in aliases and global options)
133
134
134 $ hg -q help
135 $ hg -q help
135 add add the specified files on the next commit
136 add add the specified files on the next commit
136 addremove add all new files, delete all missing files
137 addremove add all new files, delete all missing files
137 annotate show changeset information by line for each file
138 annotate show changeset information by line for each file
138 archive create an unversioned archive of a repository revision
139 archive create an unversioned archive of a repository revision
139 backout reverse effect of earlier changeset
140 backout reverse effect of earlier changeset
140 bisect subdivision search of changesets
141 bisect subdivision search of changesets
141 bookmarks create a new bookmark or list existing bookmarks
142 bookmarks create a new bookmark or list existing bookmarks
142 branch set or show the current branch name
143 branch set or show the current branch name
143 branches list repository named branches
144 branches list repository named branches
144 bundle create a bundle file
145 bundle create a bundle file
145 cat output the current or given revision of files
146 cat output the current or given revision of files
146 clone make a copy of an existing repository
147 clone make a copy of an existing repository
147 commit commit the specified files or all outstanding changes
148 commit commit the specified files or all outstanding changes
148 config show combined config settings from all hgrc files
149 config show combined config settings from all hgrc files
149 copy mark files as copied for the next commit
150 copy mark files as copied for the next commit
150 diff diff repository (or selected files)
151 diff diff repository (or selected files)
151 export dump the header and diffs for one or more changesets
152 export dump the header and diffs for one or more changesets
152 files list tracked files
153 files list tracked files
153 forget forget the specified files on the next commit
154 forget forget the specified files on the next commit
154 graft copy changes from other branches onto the current branch
155 graft copy changes from other branches onto the current branch
155 grep search revision history for a pattern in specified files
156 grep search revision history for a pattern in specified files
156 heads show branch heads
157 heads show branch heads
157 help show help for a given topic or a help overview
158 help show help for a given topic or a help overview
158 identify identify the working directory or specified revision
159 identify identify the working directory or specified revision
159 import import an ordered set of patches
160 import import an ordered set of patches
160 incoming show new changesets found in source
161 incoming show new changesets found in source
161 init create a new repository in the given directory
162 init create a new repository in the given directory
162 log show revision history of entire repository or files
163 log show revision history of entire repository or files
163 manifest output the current or given revision of the project manifest
164 manifest output the current or given revision of the project manifest
164 merge merge another revision into working directory
165 merge merge another revision into working directory
165 outgoing show changesets not found in the destination
166 outgoing show changesets not found in the destination
166 paths show aliases for remote repositories
167 paths show aliases for remote repositories
167 phase set or show the current phase name
168 phase set or show the current phase name
168 pull pull changes from the specified source
169 pull pull changes from the specified source
169 push push changes to the specified destination
170 push push changes to the specified destination
170 recover roll back an interrupted transaction
171 recover roll back an interrupted transaction
171 remove remove the specified files on the next commit
172 remove remove the specified files on the next commit
172 rename rename files; equivalent of copy + remove
173 rename rename files; equivalent of copy + remove
173 resolve redo merges or set/view the merge status of files
174 resolve redo merges or set/view the merge status of files
174 revert restore files to their checkout state
175 revert restore files to their checkout state
175 root print the root (top) of the current working directory
176 root print the root (top) of the current working directory
176 serve start stand-alone webserver
177 serve start stand-alone webserver
177 status show changed files in the working directory
178 status show changed files in the working directory
178 summary summarize working directory state
179 summary summarize working directory state
179 tag add one or more tags for the current or given revision
180 tag add one or more tags for the current or given revision
180 tags list repository tags
181 tags list repository tags
181 unbundle apply one or more bundle files
182 unbundle apply one or more bundle files
182 update update working directory (or switch revisions)
183 update update working directory (or switch revisions)
183 verify verify the integrity of the repository
184 verify verify the integrity of the repository
184 version output version and copyright information
185 version output version and copyright information
185
186
186 additional help topics:
187 additional help topics:
187
188
188 bundlespec Bundle File Formats
189 bundlespec Bundle File Formats
189 color Colorizing Outputs
190 color Colorizing Outputs
190 config Configuration Files
191 config Configuration Files
191 dates Date Formats
192 dates Date Formats
193 deprecated Deprecated Features
192 diffs Diff Formats
194 diffs Diff Formats
193 environment Environment Variables
195 environment Environment Variables
194 extensions Using Additional Features
196 extensions Using Additional Features
195 filesets Specifying File Sets
197 filesets Specifying File Sets
196 flags Command-line flags
198 flags Command-line flags
197 glossary Glossary
199 glossary Glossary
198 hgignore Syntax for Mercurial Ignore Files
200 hgignore Syntax for Mercurial Ignore Files
199 hgweb Configuring hgweb
201 hgweb Configuring hgweb
200 internals Technical implementation topics
202 internals Technical implementation topics
201 merge-tools Merge Tools
203 merge-tools Merge Tools
202 pager Pager Support
204 pager Pager Support
203 patterns File Name Patterns
205 patterns File Name Patterns
204 phases Working with Phases
206 phases Working with Phases
205 revisions Specifying Revisions
207 revisions Specifying Revisions
206 scripting Using Mercurial from scripts and automation
208 scripting Using Mercurial from scripts and automation
207 subrepos Subrepositories
209 subrepos Subrepositories
208 templating Template Usage
210 templating Template Usage
209 urls URL Paths
211 urls URL Paths
210
212
211 Test extension help:
213 Test extension help:
212 $ hg help extensions --config extensions.rebase= --config extensions.children=
214 $ hg help extensions --config extensions.rebase= --config extensions.children=
213 Using Additional Features
215 Using Additional Features
214 """""""""""""""""""""""""
216 """""""""""""""""""""""""
215
217
216 Mercurial has the ability to add new features through the use of
218 Mercurial has the ability to add new features through the use of
217 extensions. Extensions may add new commands, add options to existing
219 extensions. Extensions may add new commands, add options to existing
218 commands, change the default behavior of commands, or implement hooks.
220 commands, change the default behavior of commands, or implement hooks.
219
221
220 To enable the "foo" extension, either shipped with Mercurial or in the
222 To enable the "foo" extension, either shipped with Mercurial or in the
221 Python search path, create an entry for it in your configuration file,
223 Python search path, create an entry for it in your configuration file,
222 like this:
224 like this:
223
225
224 [extensions]
226 [extensions]
225 foo =
227 foo =
226
228
227 You may also specify the full path to an extension:
229 You may also specify the full path to an extension:
228
230
229 [extensions]
231 [extensions]
230 myfeature = ~/.hgext/myfeature.py
232 myfeature = ~/.hgext/myfeature.py
231
233
232 See 'hg help config' for more information on configuration files.
234 See 'hg help config' for more information on configuration files.
233
235
234 Extensions are not loaded by default for a variety of reasons: they can
236 Extensions are not loaded by default for a variety of reasons: they can
235 increase startup overhead; they may be meant for advanced usage only; they
237 increase startup overhead; they may be meant for advanced usage only; they
236 may provide potentially dangerous abilities (such as letting you destroy
238 may provide potentially dangerous abilities (such as letting you destroy
237 or modify history); they might not be ready for prime time; or they may
239 or modify history); they might not be ready for prime time; or they may
238 alter some usual behaviors of stock Mercurial. It is thus up to the user
240 alter some usual behaviors of stock Mercurial. It is thus up to the user
239 to activate extensions as needed.
241 to activate extensions as needed.
240
242
241 To explicitly disable an extension enabled in a configuration file of
243 To explicitly disable an extension enabled in a configuration file of
242 broader scope, prepend its path with !:
244 broader scope, prepend its path with !:
243
245
244 [extensions]
246 [extensions]
245 # disabling extension bar residing in /path/to/extension/bar.py
247 # disabling extension bar residing in /path/to/extension/bar.py
246 bar = !/path/to/extension/bar.py
248 bar = !/path/to/extension/bar.py
247 # ditto, but no path was supplied for extension baz
249 # ditto, but no path was supplied for extension baz
248 baz = !
250 baz = !
249
251
250 enabled extensions:
252 enabled extensions:
251
253
252 children command to display child changesets (DEPRECATED)
254 children command to display child changesets (DEPRECATED)
253 rebase command to move sets of revisions to a different ancestor
255 rebase command to move sets of revisions to a different ancestor
254
256
255 disabled extensions:
257 disabled extensions:
256
258
257 acl hooks for controlling repository access
259 acl hooks for controlling repository access
258 blackbox log repository events to a blackbox for debugging
260 blackbox log repository events to a blackbox for debugging
259 bugzilla hooks for integrating with the Bugzilla bug tracker
261 bugzilla hooks for integrating with the Bugzilla bug tracker
260 censor erase file content at a given revision
262 censor erase file content at a given revision
261 churn command to display statistics about repository history
263 churn command to display statistics about repository history
262 clonebundles advertise pre-generated bundles to seed clones
264 clonebundles advertise pre-generated bundles to seed clones
263 convert import revisions from foreign VCS repositories into
265 convert import revisions from foreign VCS repositories into
264 Mercurial
266 Mercurial
265 eol automatically manage newlines in repository files
267 eol automatically manage newlines in repository files
266 extdiff command to allow external programs to compare revisions
268 extdiff command to allow external programs to compare revisions
267 factotum http authentication with factotum
269 factotum http authentication with factotum
268 githelp try mapping git commands to Mercurial commands
270 githelp try mapping git commands to Mercurial commands
269 gpg commands to sign and verify changesets
271 gpg commands to sign and verify changesets
270 hgk browse the repository in a graphical way
272 hgk browse the repository in a graphical way
271 highlight syntax highlighting for hgweb (requires Pygments)
273 highlight syntax highlighting for hgweb (requires Pygments)
272 histedit interactive history editing
274 histedit interactive history editing
273 keyword expand keywords in tracked files
275 keyword expand keywords in tracked files
274 largefiles track large binary files
276 largefiles track large binary files
275 mq manage a stack of patches
277 mq manage a stack of patches
276 notify hooks for sending email push notifications
278 notify hooks for sending email push notifications
277 patchbomb command to send changesets as (a series of) patch emails
279 patchbomb command to send changesets as (a series of) patch emails
278 purge command to delete untracked files from the working
280 purge command to delete untracked files from the working
279 directory
281 directory
280 relink recreates hardlinks between repository clones
282 relink recreates hardlinks between repository clones
281 schemes extend schemes with shortcuts to repository swarms
283 schemes extend schemes with shortcuts to repository swarms
282 share share a common history between several working directories
284 share share a common history between several working directories
283 shelve save and restore changes to the working directory
285 shelve save and restore changes to the working directory
284 strip strip changesets and their descendants from history
286 strip strip changesets and their descendants from history
285 transplant command to transplant changesets from another branch
287 transplant command to transplant changesets from another branch
286 win32mbcs allow the use of MBCS paths with problematic encodings
288 win32mbcs allow the use of MBCS paths with problematic encodings
287 zeroconf discover and advertise repositories on the local network
289 zeroconf discover and advertise repositories on the local network
288
290
289 #endif
291 #endif
290
292
291 Verify that deprecated extensions are included if --verbose:
293 Verify that deprecated extensions are included if --verbose:
292
294
293 $ hg -v help extensions | grep children
295 $ hg -v help extensions | grep children
294 children command to display child changesets (DEPRECATED)
296 children command to display child changesets (DEPRECATED)
295
297
296 Verify that extension keywords appear in help templates
298 Verify that extension keywords appear in help templates
297
299
298 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
300 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
299
301
300 Test short command list with verbose option
302 Test short command list with verbose option
301
303
302 $ hg -v help shortlist
304 $ hg -v help shortlist
303 Mercurial Distributed SCM
305 Mercurial Distributed SCM
304
306
305 basic commands:
307 basic commands:
306
308
307 add add the specified files on the next commit
309 add add the specified files on the next commit
308 annotate, blame
310 annotate, blame
309 show changeset information by line for each file
311 show changeset information by line for each file
310 clone make a copy of an existing repository
312 clone make a copy of an existing repository
311 commit, ci commit the specified files or all outstanding changes
313 commit, ci commit the specified files or all outstanding changes
312 diff diff repository (or selected files)
314 diff diff repository (or selected files)
313 export dump the header and diffs for one or more changesets
315 export dump the header and diffs for one or more changesets
314 forget forget the specified files on the next commit
316 forget forget the specified files on the next commit
315 init create a new repository in the given directory
317 init create a new repository in the given directory
316 log, history show revision history of entire repository or files
318 log, history show revision history of entire repository or files
317 merge merge another revision into working directory
319 merge merge another revision into working directory
318 pull pull changes from the specified source
320 pull pull changes from the specified source
319 push push changes to the specified destination
321 push push changes to the specified destination
320 remove, rm remove the specified files on the next commit
322 remove, rm remove the specified files on the next commit
321 serve start stand-alone webserver
323 serve start stand-alone webserver
322 status, st show changed files in the working directory
324 status, st show changed files in the working directory
323 summary, sum summarize working directory state
325 summary, sum summarize working directory state
324 update, up, checkout, co
326 update, up, checkout, co
325 update working directory (or switch revisions)
327 update working directory (or switch revisions)
326
328
327 global options ([+] can be repeated):
329 global options ([+] can be repeated):
328
330
329 -R --repository REPO repository root directory or name of overlay bundle
331 -R --repository REPO repository root directory or name of overlay bundle
330 file
332 file
331 --cwd DIR change working directory
333 --cwd DIR change working directory
332 -y --noninteractive do not prompt, automatically pick the first choice for
334 -y --noninteractive do not prompt, automatically pick the first choice for
333 all prompts
335 all prompts
334 -q --quiet suppress output
336 -q --quiet suppress output
335 -v --verbose enable additional output
337 -v --verbose enable additional output
336 --color TYPE when to colorize (boolean, always, auto, never, or
338 --color TYPE when to colorize (boolean, always, auto, never, or
337 debug)
339 debug)
338 --config CONFIG [+] set/override config option (use 'section.name=value')
340 --config CONFIG [+] set/override config option (use 'section.name=value')
339 --debug enable debugging output
341 --debug enable debugging output
340 --debugger start debugger
342 --debugger start debugger
341 --encoding ENCODE set the charset encoding (default: ascii)
343 --encoding ENCODE set the charset encoding (default: ascii)
342 --encodingmode MODE set the charset encoding mode (default: strict)
344 --encodingmode MODE set the charset encoding mode (default: strict)
343 --traceback always print a traceback on exception
345 --traceback always print a traceback on exception
344 --time time how long the command takes
346 --time time how long the command takes
345 --profile print command execution profile
347 --profile print command execution profile
346 --version output version information and exit
348 --version output version information and exit
347 -h --help display help and exit
349 -h --help display help and exit
348 --hidden consider hidden changesets
350 --hidden consider hidden changesets
349 --pager TYPE when to paginate (boolean, always, auto, or never)
351 --pager TYPE when to paginate (boolean, always, auto, or never)
350 (default: auto)
352 (default: auto)
351
353
352 (use 'hg help' for the full list of commands)
354 (use 'hg help' for the full list of commands)
353
355
354 $ hg add -h
356 $ hg add -h
355 hg add [OPTION]... [FILE]...
357 hg add [OPTION]... [FILE]...
356
358
357 add the specified files on the next commit
359 add the specified files on the next commit
358
360
359 Schedule files to be version controlled and added to the repository.
361 Schedule files to be version controlled and added to the repository.
360
362
361 The files will be added to the repository at the next commit. To undo an
363 The files will be added to the repository at the next commit. To undo an
362 add before that, see 'hg forget'.
364 add before that, see 'hg forget'.
363
365
364 If no names are given, add all files to the repository (except files
366 If no names are given, add all files to the repository (except files
365 matching ".hgignore").
367 matching ".hgignore").
366
368
367 Returns 0 if all files are successfully added.
369 Returns 0 if all files are successfully added.
368
370
369 options ([+] can be repeated):
371 options ([+] can be repeated):
370
372
371 -I --include PATTERN [+] include names matching the given patterns
373 -I --include PATTERN [+] include names matching the given patterns
372 -X --exclude PATTERN [+] exclude names matching the given patterns
374 -X --exclude PATTERN [+] exclude names matching the given patterns
373 -S --subrepos recurse into subrepositories
375 -S --subrepos recurse into subrepositories
374 -n --dry-run do not perform actions, just print output
376 -n --dry-run do not perform actions, just print output
375
377
376 (some details hidden, use --verbose to show complete help)
378 (some details hidden, use --verbose to show complete help)
377
379
378 Verbose help for add
380 Verbose help for add
379
381
380 $ hg add -hv
382 $ hg add -hv
381 hg add [OPTION]... [FILE]...
383 hg add [OPTION]... [FILE]...
382
384
383 add the specified files on the next commit
385 add the specified files on the next commit
384
386
385 Schedule files to be version controlled and added to the repository.
387 Schedule files to be version controlled and added to the repository.
386
388
387 The files will be added to the repository at the next commit. To undo an
389 The files will be added to the repository at the next commit. To undo an
388 add before that, see 'hg forget'.
390 add before that, see 'hg forget'.
389
391
390 If no names are given, add all files to the repository (except files
392 If no names are given, add all files to the repository (except files
391 matching ".hgignore").
393 matching ".hgignore").
392
394
393 Examples:
395 Examples:
394
396
395 - New (unknown) files are added automatically by 'hg add':
397 - New (unknown) files are added automatically by 'hg add':
396
398
397 $ ls
399 $ ls
398 foo.c
400 foo.c
399 $ hg status
401 $ hg status
400 ? foo.c
402 ? foo.c
401 $ hg add
403 $ hg add
402 adding foo.c
404 adding foo.c
403 $ hg status
405 $ hg status
404 A foo.c
406 A foo.c
405
407
406 - Specific files to be added can be specified:
408 - Specific files to be added can be specified:
407
409
408 $ ls
410 $ ls
409 bar.c foo.c
411 bar.c foo.c
410 $ hg status
412 $ hg status
411 ? bar.c
413 ? bar.c
412 ? foo.c
414 ? foo.c
413 $ hg add bar.c
415 $ hg add bar.c
414 $ hg status
416 $ hg status
415 A bar.c
417 A bar.c
416 ? foo.c
418 ? foo.c
417
419
418 Returns 0 if all files are successfully added.
420 Returns 0 if all files are successfully added.
419
421
420 options ([+] can be repeated):
422 options ([+] can be repeated):
421
423
422 -I --include PATTERN [+] include names matching the given patterns
424 -I --include PATTERN [+] include names matching the given patterns
423 -X --exclude PATTERN [+] exclude names matching the given patterns
425 -X --exclude PATTERN [+] exclude names matching the given patterns
424 -S --subrepos recurse into subrepositories
426 -S --subrepos recurse into subrepositories
425 -n --dry-run do not perform actions, just print output
427 -n --dry-run do not perform actions, just print output
426
428
427 global options ([+] can be repeated):
429 global options ([+] can be repeated):
428
430
429 -R --repository REPO repository root directory or name of overlay bundle
431 -R --repository REPO repository root directory or name of overlay bundle
430 file
432 file
431 --cwd DIR change working directory
433 --cwd DIR change working directory
432 -y --noninteractive do not prompt, automatically pick the first choice for
434 -y --noninteractive do not prompt, automatically pick the first choice for
433 all prompts
435 all prompts
434 -q --quiet suppress output
436 -q --quiet suppress output
435 -v --verbose enable additional output
437 -v --verbose enable additional output
436 --color TYPE when to colorize (boolean, always, auto, never, or
438 --color TYPE when to colorize (boolean, always, auto, never, or
437 debug)
439 debug)
438 --config CONFIG [+] set/override config option (use 'section.name=value')
440 --config CONFIG [+] set/override config option (use 'section.name=value')
439 --debug enable debugging output
441 --debug enable debugging output
440 --debugger start debugger
442 --debugger start debugger
441 --encoding ENCODE set the charset encoding (default: ascii)
443 --encoding ENCODE set the charset encoding (default: ascii)
442 --encodingmode MODE set the charset encoding mode (default: strict)
444 --encodingmode MODE set the charset encoding mode (default: strict)
443 --traceback always print a traceback on exception
445 --traceback always print a traceback on exception
444 --time time how long the command takes
446 --time time how long the command takes
445 --profile print command execution profile
447 --profile print command execution profile
446 --version output version information and exit
448 --version output version information and exit
447 -h --help display help and exit
449 -h --help display help and exit
448 --hidden consider hidden changesets
450 --hidden consider hidden changesets
449 --pager TYPE when to paginate (boolean, always, auto, or never)
451 --pager TYPE when to paginate (boolean, always, auto, or never)
450 (default: auto)
452 (default: auto)
451
453
452 Test the textwidth config option
454 Test the textwidth config option
453
455
454 $ hg root -h --config ui.textwidth=50
456 $ hg root -h --config ui.textwidth=50
455 hg root
457 hg root
456
458
457 print the root (top) of the current working
459 print the root (top) of the current working
458 directory
460 directory
459
461
460 Print the root directory of the current
462 Print the root directory of the current
461 repository.
463 repository.
462
464
463 Returns 0 on success.
465 Returns 0 on success.
464
466
465 (some details hidden, use --verbose to show
467 (some details hidden, use --verbose to show
466 complete help)
468 complete help)
467
469
468 Test help option with version option
470 Test help option with version option
469
471
470 $ hg add -h --version
472 $ hg add -h --version
471 Mercurial Distributed SCM (version *) (glob)
473 Mercurial Distributed SCM (version *) (glob)
472 (see https://mercurial-scm.org for more information)
474 (see https://mercurial-scm.org for more information)
473
475
474 Copyright (C) 2005-* Matt Mackall and others (glob)
476 Copyright (C) 2005-* Matt Mackall and others (glob)
475 This is free software; see the source for copying conditions. There is NO
477 This is free software; see the source for copying conditions. There is NO
476 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
478 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
477
479
478 $ hg add --skjdfks
480 $ hg add --skjdfks
479 hg add: option --skjdfks not recognized
481 hg add: option --skjdfks not recognized
480 hg add [OPTION]... [FILE]...
482 hg add [OPTION]... [FILE]...
481
483
482 add the specified files on the next commit
484 add the specified files on the next commit
483
485
484 options ([+] can be repeated):
486 options ([+] can be repeated):
485
487
486 -I --include PATTERN [+] include names matching the given patterns
488 -I --include PATTERN [+] include names matching the given patterns
487 -X --exclude PATTERN [+] exclude names matching the given patterns
489 -X --exclude PATTERN [+] exclude names matching the given patterns
488 -S --subrepos recurse into subrepositories
490 -S --subrepos recurse into subrepositories
489 -n --dry-run do not perform actions, just print output
491 -n --dry-run do not perform actions, just print output
490
492
491 (use 'hg add -h' to show more help)
493 (use 'hg add -h' to show more help)
492 [255]
494 [255]
493
495
494 Test ambiguous command help
496 Test ambiguous command help
495
497
496 $ hg help ad
498 $ hg help ad
497 list of commands:
499 list of commands:
498
500
499 add add the specified files on the next commit
501 add add the specified files on the next commit
500 addremove add all new files, delete all missing files
502 addremove add all new files, delete all missing files
501
503
502 (use 'hg help -v ad' to show built-in aliases and global options)
504 (use 'hg help -v ad' to show built-in aliases and global options)
503
505
504 Test command without options
506 Test command without options
505
507
506 $ hg help verify
508 $ hg help verify
507 hg verify
509 hg verify
508
510
509 verify the integrity of the repository
511 verify the integrity of the repository
510
512
511 Verify the integrity of the current repository.
513 Verify the integrity of the current repository.
512
514
513 This will perform an extensive check of the repository's integrity,
515 This will perform an extensive check of the repository's integrity,
514 validating the hashes and checksums of each entry in the changelog,
516 validating the hashes and checksums of each entry in the changelog,
515 manifest, and tracked files, as well as the integrity of their crosslinks
517 manifest, and tracked files, as well as the integrity of their crosslinks
516 and indices.
518 and indices.
517
519
518 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
520 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
519 information about recovery from corruption of the repository.
521 information about recovery from corruption of the repository.
520
522
521 Returns 0 on success, 1 if errors are encountered.
523 Returns 0 on success, 1 if errors are encountered.
522
524
523 (some details hidden, use --verbose to show complete help)
525 (some details hidden, use --verbose to show complete help)
524
526
525 $ hg help diff
527 $ hg help diff
526 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
528 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
527
529
528 diff repository (or selected files)
530 diff repository (or selected files)
529
531
530 Show differences between revisions for the specified files.
532 Show differences between revisions for the specified files.
531
533
532 Differences between files are shown using the unified diff format.
534 Differences between files are shown using the unified diff format.
533
535
534 Note:
536 Note:
535 'hg diff' may generate unexpected results for merges, as it will
537 'hg diff' may generate unexpected results for merges, as it will
536 default to comparing against the working directory's first parent
538 default to comparing against the working directory's first parent
537 changeset if no revisions are specified.
539 changeset if no revisions are specified.
538
540
539 When two revision arguments are given, then changes are shown between
541 When two revision arguments are given, then changes are shown between
540 those revisions. If only one revision is specified then that revision is
542 those revisions. If only one revision is specified then that revision is
541 compared to the working directory, and, when no revisions are specified,
543 compared to the working directory, and, when no revisions are specified,
542 the working directory files are compared to its first parent.
544 the working directory files are compared to its first parent.
543
545
544 Alternatively you can specify -c/--change with a revision to see the
546 Alternatively you can specify -c/--change with a revision to see the
545 changes in that changeset relative to its first parent.
547 changes in that changeset relative to its first parent.
546
548
547 Without the -a/--text option, diff will avoid generating diffs of files it
549 Without the -a/--text option, diff will avoid generating diffs of files it
548 detects as binary. With -a, diff will generate a diff anyway, probably
550 detects as binary. With -a, diff will generate a diff anyway, probably
549 with undesirable results.
551 with undesirable results.
550
552
551 Use the -g/--git option to generate diffs in the git extended diff format.
553 Use the -g/--git option to generate diffs in the git extended diff format.
552 For more information, read 'hg help diffs'.
554 For more information, read 'hg help diffs'.
553
555
554 Returns 0 on success.
556 Returns 0 on success.
555
557
556 options ([+] can be repeated):
558 options ([+] can be repeated):
557
559
558 -r --rev REV [+] revision
560 -r --rev REV [+] revision
559 -c --change REV change made by revision
561 -c --change REV change made by revision
560 -a --text treat all files as text
562 -a --text treat all files as text
561 -g --git use git extended diff format
563 -g --git use git extended diff format
562 --binary generate binary diffs in git mode (default)
564 --binary generate binary diffs in git mode (default)
563 --nodates omit dates from diff headers
565 --nodates omit dates from diff headers
564 --noprefix omit a/ and b/ prefixes from filenames
566 --noprefix omit a/ and b/ prefixes from filenames
565 -p --show-function show which function each change is in
567 -p --show-function show which function each change is in
566 --reverse produce a diff that undoes the changes
568 --reverse produce a diff that undoes the changes
567 -w --ignore-all-space ignore white space when comparing lines
569 -w --ignore-all-space ignore white space when comparing lines
568 -b --ignore-space-change ignore changes in the amount of white space
570 -b --ignore-space-change ignore changes in the amount of white space
569 -B --ignore-blank-lines ignore changes whose lines are all blank
571 -B --ignore-blank-lines ignore changes whose lines are all blank
570 -Z --ignore-space-at-eol ignore changes in whitespace at EOL
572 -Z --ignore-space-at-eol ignore changes in whitespace at EOL
571 -U --unified NUM number of lines of context to show
573 -U --unified NUM number of lines of context to show
572 --stat output diffstat-style summary of changes
574 --stat output diffstat-style summary of changes
573 --root DIR produce diffs relative to subdirectory
575 --root DIR produce diffs relative to subdirectory
574 -I --include PATTERN [+] include names matching the given patterns
576 -I --include PATTERN [+] include names matching the given patterns
575 -X --exclude PATTERN [+] exclude names matching the given patterns
577 -X --exclude PATTERN [+] exclude names matching the given patterns
576 -S --subrepos recurse into subrepositories
578 -S --subrepos recurse into subrepositories
577
579
578 (some details hidden, use --verbose to show complete help)
580 (some details hidden, use --verbose to show complete help)
579
581
580 $ hg help status
582 $ hg help status
581 hg status [OPTION]... [FILE]...
583 hg status [OPTION]... [FILE]...
582
584
583 aliases: st
585 aliases: st
584
586
585 show changed files in the working directory
587 show changed files in the working directory
586
588
587 Show status of files in the repository. If names are given, only files
589 Show status of files in the repository. If names are given, only files
588 that match are shown. Files that are clean or ignored or the source of a
590 that match are shown. Files that are clean or ignored or the source of a
589 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
591 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
590 -C/--copies or -A/--all are given. Unless options described with "show
592 -C/--copies or -A/--all are given. Unless options described with "show
591 only ..." are given, the options -mardu are used.
593 only ..." are given, the options -mardu are used.
592
594
593 Option -q/--quiet hides untracked (unknown and ignored) files unless
595 Option -q/--quiet hides untracked (unknown and ignored) files unless
594 explicitly requested with -u/--unknown or -i/--ignored.
596 explicitly requested with -u/--unknown or -i/--ignored.
595
597
596 Note:
598 Note:
597 'hg status' may appear to disagree with diff if permissions have
599 'hg status' may appear to disagree with diff if permissions have
598 changed or a merge has occurred. The standard diff format does not
600 changed or a merge has occurred. The standard diff format does not
599 report permission changes and diff only reports changes relative to one
601 report permission changes and diff only reports changes relative to one
600 merge parent.
602 merge parent.
601
603
602 If one revision is given, it is used as the base revision. If two
604 If one revision is given, it is used as the base revision. If two
603 revisions are given, the differences between them are shown. The --change
605 revisions are given, the differences between them are shown. The --change
604 option can also be used as a shortcut to list the changed files of a
606 option can also be used as a shortcut to list the changed files of a
605 revision from its first parent.
607 revision from its first parent.
606
608
607 The codes used to show the status of files are:
609 The codes used to show the status of files are:
608
610
609 M = modified
611 M = modified
610 A = added
612 A = added
611 R = removed
613 R = removed
612 C = clean
614 C = clean
613 ! = missing (deleted by non-hg command, but still tracked)
615 ! = missing (deleted by non-hg command, but still tracked)
614 ? = not tracked
616 ? = not tracked
615 I = ignored
617 I = ignored
616 = origin of the previous file (with --copies)
618 = origin of the previous file (with --copies)
617
619
618 Returns 0 on success.
620 Returns 0 on success.
619
621
620 options ([+] can be repeated):
622 options ([+] can be repeated):
621
623
622 -A --all show status of all files
624 -A --all show status of all files
623 -m --modified show only modified files
625 -m --modified show only modified files
624 -a --added show only added files
626 -a --added show only added files
625 -r --removed show only removed files
627 -r --removed show only removed files
626 -d --deleted show only deleted (but tracked) files
628 -d --deleted show only deleted (but tracked) files
627 -c --clean show only files without changes
629 -c --clean show only files without changes
628 -u --unknown show only unknown (not tracked) files
630 -u --unknown show only unknown (not tracked) files
629 -i --ignored show only ignored files
631 -i --ignored show only ignored files
630 -n --no-status hide status prefix
632 -n --no-status hide status prefix
631 -C --copies show source of copied files
633 -C --copies show source of copied files
632 -0 --print0 end filenames with NUL, for use with xargs
634 -0 --print0 end filenames with NUL, for use with xargs
633 --rev REV [+] show difference from revision
635 --rev REV [+] show difference from revision
634 --change REV list the changed files of a revision
636 --change REV list the changed files of a revision
635 -I --include PATTERN [+] include names matching the given patterns
637 -I --include PATTERN [+] include names matching the given patterns
636 -X --exclude PATTERN [+] exclude names matching the given patterns
638 -X --exclude PATTERN [+] exclude names matching the given patterns
637 -S --subrepos recurse into subrepositories
639 -S --subrepos recurse into subrepositories
638
640
639 (some details hidden, use --verbose to show complete help)
641 (some details hidden, use --verbose to show complete help)
640
642
641 $ hg -q help status
643 $ hg -q help status
642 hg status [OPTION]... [FILE]...
644 hg status [OPTION]... [FILE]...
643
645
644 show changed files in the working directory
646 show changed files in the working directory
645
647
646 $ hg help foo
648 $ hg help foo
647 abort: no such help topic: foo
649 abort: no such help topic: foo
648 (try 'hg help --keyword foo')
650 (try 'hg help --keyword foo')
649 [255]
651 [255]
650
652
651 $ hg skjdfks
653 $ hg skjdfks
652 hg: unknown command 'skjdfks'
654 hg: unknown command 'skjdfks'
653 Mercurial Distributed SCM
655 Mercurial Distributed SCM
654
656
655 basic commands:
657 basic commands:
656
658
657 add add the specified files on the next commit
659 add add the specified files on the next commit
658 annotate show changeset information by line for each file
660 annotate show changeset information by line for each file
659 clone make a copy of an existing repository
661 clone make a copy of an existing repository
660 commit commit the specified files or all outstanding changes
662 commit commit the specified files or all outstanding changes
661 diff diff repository (or selected files)
663 diff diff repository (or selected files)
662 export dump the header and diffs for one or more changesets
664 export dump the header and diffs for one or more changesets
663 forget forget the specified files on the next commit
665 forget forget the specified files on the next commit
664 init create a new repository in the given directory
666 init create a new repository in the given directory
665 log show revision history of entire repository or files
667 log show revision history of entire repository or files
666 merge merge another revision into working directory
668 merge merge another revision into working directory
667 pull pull changes from the specified source
669 pull pull changes from the specified source
668 push push changes to the specified destination
670 push push changes to the specified destination
669 remove remove the specified files on the next commit
671 remove remove the specified files on the next commit
670 serve start stand-alone webserver
672 serve start stand-alone webserver
671 status show changed files in the working directory
673 status show changed files in the working directory
672 summary summarize working directory state
674 summary summarize working directory state
673 update update working directory (or switch revisions)
675 update update working directory (or switch revisions)
674
676
675 (use 'hg help' for the full list of commands or 'hg -v' for details)
677 (use 'hg help' for the full list of commands or 'hg -v' for details)
676 [255]
678 [255]
677
679
678 Typoed command gives suggestion
680 Typoed command gives suggestion
679 $ hg puls
681 $ hg puls
680 hg: unknown command 'puls'
682 hg: unknown command 'puls'
681 (did you mean one of pull, push?)
683 (did you mean one of pull, push?)
682 [255]
684 [255]
683
685
684 Not enabled extension gets suggested
686 Not enabled extension gets suggested
685
687
686 $ hg rebase
688 $ hg rebase
687 hg: unknown command 'rebase'
689 hg: unknown command 'rebase'
688 'rebase' is provided by the following extension:
690 'rebase' is provided by the following extension:
689
691
690 rebase command to move sets of revisions to a different ancestor
692 rebase command to move sets of revisions to a different ancestor
691
693
692 (use 'hg help extensions' for information on enabling extensions)
694 (use 'hg help extensions' for information on enabling extensions)
693 [255]
695 [255]
694
696
695 Disabled extension gets suggested
697 Disabled extension gets suggested
696 $ hg --config extensions.rebase=! rebase
698 $ hg --config extensions.rebase=! rebase
697 hg: unknown command 'rebase'
699 hg: unknown command 'rebase'
698 'rebase' is provided by the following extension:
700 'rebase' is provided by the following extension:
699
701
700 rebase command to move sets of revisions to a different ancestor
702 rebase command to move sets of revisions to a different ancestor
701
703
702 (use 'hg help extensions' for information on enabling extensions)
704 (use 'hg help extensions' for information on enabling extensions)
703 [255]
705 [255]
704
706
705 Make sure that we don't run afoul of the help system thinking that
707 Make sure that we don't run afoul of the help system thinking that
706 this is a section and erroring out weirdly.
708 this is a section and erroring out weirdly.
707
709
708 $ hg .log
710 $ hg .log
709 hg: unknown command '.log'
711 hg: unknown command '.log'
710 (did you mean log?)
712 (did you mean log?)
711 [255]
713 [255]
712
714
713 $ hg log.
715 $ hg log.
714 hg: unknown command 'log.'
716 hg: unknown command 'log.'
715 (did you mean log?)
717 (did you mean log?)
716 [255]
718 [255]
717 $ hg pu.lh
719 $ hg pu.lh
718 hg: unknown command 'pu.lh'
720 hg: unknown command 'pu.lh'
719 (did you mean one of pull, push?)
721 (did you mean one of pull, push?)
720 [255]
722 [255]
721
723
722 $ cat > helpext.py <<EOF
724 $ cat > helpext.py <<EOF
723 > import os
725 > import os
724 > from mercurial import commands, fancyopts, registrar
726 > from mercurial import commands, fancyopts, registrar
725 >
727 >
726 > def func(arg):
728 > def func(arg):
727 > return '%sfoo' % arg
729 > return '%sfoo' % arg
728 > class customopt(fancyopts.customopt):
730 > class customopt(fancyopts.customopt):
729 > def newstate(self, oldstate, newparam, abort):
731 > def newstate(self, oldstate, newparam, abort):
730 > return '%sbar' % oldstate
732 > return '%sbar' % oldstate
731 > cmdtable = {}
733 > cmdtable = {}
732 > command = registrar.command(cmdtable)
734 > command = registrar.command(cmdtable)
733 >
735 >
734 > @command(b'nohelp',
736 > @command(b'nohelp',
735 > [(b'', b'longdesc', 3, b'x'*67),
737 > [(b'', b'longdesc', 3, b'x'*67),
736 > (b'n', b'', None, b'normal desc'),
738 > (b'n', b'', None, b'normal desc'),
737 > (b'', b'newline', b'', b'line1\nline2'),
739 > (b'', b'newline', b'', b'line1\nline2'),
738 > (b'', b'callableopt', func, b'adds foo'),
740 > (b'', b'callableopt', func, b'adds foo'),
739 > (b'', b'customopt', customopt(''), b'adds bar'),
741 > (b'', b'customopt', customopt(''), b'adds bar'),
740 > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
742 > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
741 > b'hg nohelp',
743 > b'hg nohelp',
742 > norepo=True)
744 > norepo=True)
743 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
745 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
744 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
746 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
745 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
747 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
746 > def nohelp(ui, *args, **kwargs):
748 > def nohelp(ui, *args, **kwargs):
747 > pass
749 > pass
748 >
750 >
749 > def uisetup(ui):
751 > def uisetup(ui):
750 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
752 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
751 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
753 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
752 >
754 >
753 > EOF
755 > EOF
754 $ echo '[extensions]' >> $HGRCPATH
756 $ echo '[extensions]' >> $HGRCPATH
755 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
757 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
756
758
757 Test for aliases
759 Test for aliases
758
760
759 $ hg help hgalias
761 $ hg help hgalias
760 hg hgalias [--remote]
762 hg hgalias [--remote]
761
763
762 alias for: hg summary
764 alias for: hg summary
763
765
764 summarize working directory state
766 summarize working directory state
765
767
766 This generates a brief summary of the working directory state, including
768 This generates a brief summary of the working directory state, including
767 parents, branch, commit status, phase and available updates.
769 parents, branch, commit status, phase and available updates.
768
770
769 With the --remote option, this will check the default paths for incoming
771 With the --remote option, this will check the default paths for incoming
770 and outgoing changes. This can be time-consuming.
772 and outgoing changes. This can be time-consuming.
771
773
772 Returns 0 on success.
774 Returns 0 on success.
773
775
774 defined by: helpext
776 defined by: helpext
775
777
776 options:
778 options:
777
779
778 --remote check for push and pull
780 --remote check for push and pull
779
781
780 (some details hidden, use --verbose to show complete help)
782 (some details hidden, use --verbose to show complete help)
781
783
782 $ hg help shellalias
784 $ hg help shellalias
783 hg shellalias
785 hg shellalias
784
786
785 shell alias for: echo hi
787 shell alias for: echo hi
786
788
787 (no help text available)
789 (no help text available)
788
790
789 defined by: helpext
791 defined by: helpext
790
792
791 (some details hidden, use --verbose to show complete help)
793 (some details hidden, use --verbose to show complete help)
792
794
793 Test command with no help text
795 Test command with no help text
794
796
795 $ hg help nohelp
797 $ hg help nohelp
796 hg nohelp
798 hg nohelp
797
799
798 (no help text available)
800 (no help text available)
799
801
800 options:
802 options:
801
803
802 --longdesc VALUE
804 --longdesc VALUE
803 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
805 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
804 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
806 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
805 -n -- normal desc
807 -n -- normal desc
806 --newline VALUE line1 line2
808 --newline VALUE line1 line2
807 --callableopt VALUE adds foo
809 --callableopt VALUE adds foo
808 --customopt VALUE adds bar
810 --customopt VALUE adds bar
809 --customopt-withdefault VALUE adds bar (default: foo)
811 --customopt-withdefault VALUE adds bar (default: foo)
810
812
811 (some details hidden, use --verbose to show complete help)
813 (some details hidden, use --verbose to show complete help)
812
814
813 $ hg help -k nohelp
815 $ hg help -k nohelp
814 Commands:
816 Commands:
815
817
816 nohelp hg nohelp
818 nohelp hg nohelp
817
819
818 Extension Commands:
820 Extension Commands:
819
821
820 nohelp (no help text available)
822 nohelp (no help text available)
821
823
822 Test that default list of commands omits extension commands
824 Test that default list of commands omits extension commands
823
825
824 #if no-extraextensions
826 #if no-extraextensions
825
827
826 $ hg help
828 $ hg help
827 Mercurial Distributed SCM
829 Mercurial Distributed SCM
828
830
829 list of commands:
831 list of commands:
830
832
831 add add the specified files on the next commit
833 add add the specified files on the next commit
832 addremove add all new files, delete all missing files
834 addremove add all new files, delete all missing files
833 annotate show changeset information by line for each file
835 annotate show changeset information by line for each file
834 archive create an unversioned archive of a repository revision
836 archive create an unversioned archive of a repository revision
835 backout reverse effect of earlier changeset
837 backout reverse effect of earlier changeset
836 bisect subdivision search of changesets
838 bisect subdivision search of changesets
837 bookmarks create a new bookmark or list existing bookmarks
839 bookmarks create a new bookmark or list existing bookmarks
838 branch set or show the current branch name
840 branch set or show the current branch name
839 branches list repository named branches
841 branches list repository named branches
840 bundle create a bundle file
842 bundle create a bundle file
841 cat output the current or given revision of files
843 cat output the current or given revision of files
842 clone make a copy of an existing repository
844 clone make a copy of an existing repository
843 commit commit the specified files or all outstanding changes
845 commit commit the specified files or all outstanding changes
844 config show combined config settings from all hgrc files
846 config show combined config settings from all hgrc files
845 copy mark files as copied for the next commit
847 copy mark files as copied for the next commit
846 diff diff repository (or selected files)
848 diff diff repository (or selected files)
847 export dump the header and diffs for one or more changesets
849 export dump the header and diffs for one or more changesets
848 files list tracked files
850 files list tracked files
849 forget forget the specified files on the next commit
851 forget forget the specified files on the next commit
850 graft copy changes from other branches onto the current branch
852 graft copy changes from other branches onto the current branch
851 grep search revision history for a pattern in specified files
853 grep search revision history for a pattern in specified files
852 heads show branch heads
854 heads show branch heads
853 help show help for a given topic or a help overview
855 help show help for a given topic or a help overview
854 identify identify the working directory or specified revision
856 identify identify the working directory or specified revision
855 import import an ordered set of patches
857 import import an ordered set of patches
856 incoming show new changesets found in source
858 incoming show new changesets found in source
857 init create a new repository in the given directory
859 init create a new repository in the given directory
858 log show revision history of entire repository or files
860 log show revision history of entire repository or files
859 manifest output the current or given revision of the project manifest
861 manifest output the current or given revision of the project manifest
860 merge merge another revision into working directory
862 merge merge another revision into working directory
861 outgoing show changesets not found in the destination
863 outgoing show changesets not found in the destination
862 paths show aliases for remote repositories
864 paths show aliases for remote repositories
863 phase set or show the current phase name
865 phase set or show the current phase name
864 pull pull changes from the specified source
866 pull pull changes from the specified source
865 push push changes to the specified destination
867 push push changes to the specified destination
866 recover roll back an interrupted transaction
868 recover roll back an interrupted transaction
867 remove remove the specified files on the next commit
869 remove remove the specified files on the next commit
868 rename rename files; equivalent of copy + remove
870 rename rename files; equivalent of copy + remove
869 resolve redo merges or set/view the merge status of files
871 resolve redo merges or set/view the merge status of files
870 revert restore files to their checkout state
872 revert restore files to their checkout state
871 root print the root (top) of the current working directory
873 root print the root (top) of the current working directory
872 serve start stand-alone webserver
874 serve start stand-alone webserver
873 status show changed files in the working directory
875 status show changed files in the working directory
874 summary summarize working directory state
876 summary summarize working directory state
875 tag add one or more tags for the current or given revision
877 tag add one or more tags for the current or given revision
876 tags list repository tags
878 tags list repository tags
877 unbundle apply one or more bundle files
879 unbundle apply one or more bundle files
878 update update working directory (or switch revisions)
880 update update working directory (or switch revisions)
879 verify verify the integrity of the repository
881 verify verify the integrity of the repository
880 version output version and copyright information
882 version output version and copyright information
881
883
882 enabled extensions:
884 enabled extensions:
883
885
884 helpext (no help text available)
886 helpext (no help text available)
885
887
886 additional help topics:
888 additional help topics:
887
889
888 bundlespec Bundle File Formats
890 bundlespec Bundle File Formats
889 color Colorizing Outputs
891 color Colorizing Outputs
890 config Configuration Files
892 config Configuration Files
891 dates Date Formats
893 dates Date Formats
894 deprecated Deprecated Features
892 diffs Diff Formats
895 diffs Diff Formats
893 environment Environment Variables
896 environment Environment Variables
894 extensions Using Additional Features
897 extensions Using Additional Features
895 filesets Specifying File Sets
898 filesets Specifying File Sets
896 flags Command-line flags
899 flags Command-line flags
897 glossary Glossary
900 glossary Glossary
898 hgignore Syntax for Mercurial Ignore Files
901 hgignore Syntax for Mercurial Ignore Files
899 hgweb Configuring hgweb
902 hgweb Configuring hgweb
900 internals Technical implementation topics
903 internals Technical implementation topics
901 merge-tools Merge Tools
904 merge-tools Merge Tools
902 pager Pager Support
905 pager Pager Support
903 patterns File Name Patterns
906 patterns File Name Patterns
904 phases Working with Phases
907 phases Working with Phases
905 revisions Specifying Revisions
908 revisions Specifying Revisions
906 scripting Using Mercurial from scripts and automation
909 scripting Using Mercurial from scripts and automation
907 subrepos Subrepositories
910 subrepos Subrepositories
908 templating Template Usage
911 templating Template Usage
909 urls URL Paths
912 urls URL Paths
910
913
911 (use 'hg help -v' to show built-in aliases and global options)
914 (use 'hg help -v' to show built-in aliases and global options)
912
915
913 #endif
916 #endif
914
917
915 Test list of internal help commands
918 Test list of internal help commands
916
919
917 $ hg help debug
920 $ hg help debug
918 debug commands (internal and unsupported):
921 debug commands (internal and unsupported):
919
922
920 debugancestor
923 debugancestor
921 find the ancestor revision of two revisions in a given index
924 find the ancestor revision of two revisions in a given index
922 debugapplystreamclonebundle
925 debugapplystreamclonebundle
923 apply a stream clone bundle file
926 apply a stream clone bundle file
924 debugbuilddag
927 debugbuilddag
925 builds a repo with a given DAG from scratch in the current
928 builds a repo with a given DAG from scratch in the current
926 empty repo
929 empty repo
927 debugbundle lists the contents of a bundle
930 debugbundle lists the contents of a bundle
928 debugcapabilities
931 debugcapabilities
929 lists the capabilities of a remote peer
932 lists the capabilities of a remote peer
930 debugcheckstate
933 debugcheckstate
931 validate the correctness of the current dirstate
934 validate the correctness of the current dirstate
932 debugcolor show available color, effects or style
935 debugcolor show available color, effects or style
933 debugcommands
936 debugcommands
934 list all available commands and options
937 list all available commands and options
935 debugcomplete
938 debugcomplete
936 returns the completion list associated with the given command
939 returns the completion list associated with the given command
937 debugcreatestreamclonebundle
940 debugcreatestreamclonebundle
938 create a stream clone bundle file
941 create a stream clone bundle file
939 debugdag format the changelog or an index DAG as a concise textual
942 debugdag format the changelog or an index DAG as a concise textual
940 description
943 description
941 debugdata dump the contents of a data file revision
944 debugdata dump the contents of a data file revision
942 debugdate parse and display a date
945 debugdate parse and display a date
943 debugdeltachain
946 debugdeltachain
944 dump information about delta chains in a revlog
947 dump information about delta chains in a revlog
945 debugdirstate
948 debugdirstate
946 show the contents of the current dirstate
949 show the contents of the current dirstate
947 debugdiscovery
950 debugdiscovery
948 runs the changeset discovery protocol in isolation
951 runs the changeset discovery protocol in isolation
949 debugdownload
952 debugdownload
950 download a resource using Mercurial logic and config
953 download a resource using Mercurial logic and config
951 debugextensions
954 debugextensions
952 show information about active extensions
955 show information about active extensions
953 debugfileset parse and apply a fileset specification
956 debugfileset parse and apply a fileset specification
954 debugformat display format information about the current repository
957 debugformat display format information about the current repository
955 debugfsinfo show information detected about current filesystem
958 debugfsinfo show information detected about current filesystem
956 debuggetbundle
959 debuggetbundle
957 retrieves a bundle from a repo
960 retrieves a bundle from a repo
958 debugignore display the combined ignore pattern and information about
961 debugignore display the combined ignore pattern and information about
959 ignored files
962 ignored files
960 debugindex dump the contents of an index file
963 debugindex dump the contents of an index file
961 debugindexdot
964 debugindexdot
962 dump an index DAG as a graphviz dot file
965 dump an index DAG as a graphviz dot file
963 debuginstall test Mercurial installation
966 debuginstall test Mercurial installation
964 debugknown test whether node ids are known to a repo
967 debugknown test whether node ids are known to a repo
965 debuglocks show or modify state of locks
968 debuglocks show or modify state of locks
966 debugmergestate
969 debugmergestate
967 print merge state
970 print merge state
968 debugnamecomplete
971 debugnamecomplete
969 complete "names" - tags, open branch names, bookmark names
972 complete "names" - tags, open branch names, bookmark names
970 debugobsolete
973 debugobsolete
971 create arbitrary obsolete marker
974 create arbitrary obsolete marker
972 debugoptADV (no help text available)
975 debugoptADV (no help text available)
973 debugoptDEP (no help text available)
976 debugoptDEP (no help text available)
974 debugoptEXP (no help text available)
977 debugoptEXP (no help text available)
975 debugpathcomplete
978 debugpathcomplete
976 complete part or all of a tracked path
979 complete part or all of a tracked path
977 debugpeer establish a connection to a peer repository
980 debugpeer establish a connection to a peer repository
978 debugpickmergetool
981 debugpickmergetool
979 examine which merge tool is chosen for specified file
982 examine which merge tool is chosen for specified file
980 debugpushkey access the pushkey key/value protocol
983 debugpushkey access the pushkey key/value protocol
981 debugpvec (no help text available)
984 debugpvec (no help text available)
982 debugrebuilddirstate
985 debugrebuilddirstate
983 rebuild the dirstate as it would look like for the given
986 rebuild the dirstate as it would look like for the given
984 revision
987 revision
985 debugrebuildfncache
988 debugrebuildfncache
986 rebuild the fncache file
989 rebuild the fncache file
987 debugrename dump rename information
990 debugrename dump rename information
988 debugrevlog show data and statistics about a revlog
991 debugrevlog show data and statistics about a revlog
989 debugrevspec parse and apply a revision specification
992 debugrevspec parse and apply a revision specification
990 debugserve run a server with advanced settings
993 debugserve run a server with advanced settings
991 debugsetparents
994 debugsetparents
992 manually set the parents of the current working directory
995 manually set the parents of the current working directory
993 debugssl test a secure connection to a server
996 debugssl test a secure connection to a server
994 debugsub (no help text available)
997 debugsub (no help text available)
995 debugsuccessorssets
998 debugsuccessorssets
996 show set of successors for revision
999 show set of successors for revision
997 debugtemplate
1000 debugtemplate
998 parse and apply a template
1001 parse and apply a template
999 debuguigetpass
1002 debuguigetpass
1000 show prompt to type password
1003 show prompt to type password
1001 debuguiprompt
1004 debuguiprompt
1002 show plain prompt
1005 show plain prompt
1003 debugupdatecaches
1006 debugupdatecaches
1004 warm all known caches in the repository
1007 warm all known caches in the repository
1005 debugupgraderepo
1008 debugupgraderepo
1006 upgrade a repository to use different features
1009 upgrade a repository to use different features
1007 debugwalk show how files match on given patterns
1010 debugwalk show how files match on given patterns
1008 debugwhyunstable
1011 debugwhyunstable
1009 explain instabilities of a changeset
1012 explain instabilities of a changeset
1010 debugwireargs
1013 debugwireargs
1011 (no help text available)
1014 (no help text available)
1012 debugwireproto
1015 debugwireproto
1013 send wire protocol commands to a server
1016 send wire protocol commands to a server
1014
1017
1015 (use 'hg help -v debug' to show built-in aliases and global options)
1018 (use 'hg help -v debug' to show built-in aliases and global options)
1016
1019
1017 internals topic renders index of available sub-topics
1020 internals topic renders index of available sub-topics
1018
1021
1019 $ hg help internals
1022 $ hg help internals
1020 Technical implementation topics
1023 Technical implementation topics
1021 """""""""""""""""""""""""""""""
1024 """""""""""""""""""""""""""""""
1022
1025
1023 To access a subtopic, use "hg help internals.{subtopic-name}"
1026 To access a subtopic, use "hg help internals.{subtopic-name}"
1024
1027
1025 bundle2 Bundle2
1028 bundle2 Bundle2
1026 bundles Bundles
1029 bundles Bundles
1027 censor Censor
1030 censor Censor
1028 changegroups Changegroups
1031 changegroups Changegroups
1029 config Config Registrar
1032 config Config Registrar
1030 requirements Repository Requirements
1033 requirements Repository Requirements
1031 revlogs Revision Logs
1034 revlogs Revision Logs
1032 wireprotocol Wire Protocol
1035 wireprotocol Wire Protocol
1033
1036
1034 sub-topics can be accessed
1037 sub-topics can be accessed
1035
1038
1036 $ hg help internals.changegroups
1039 $ hg help internals.changegroups
1037 Changegroups
1040 Changegroups
1038 """"""""""""
1041 """"""""""""
1039
1042
1040 Changegroups are representations of repository revlog data, specifically
1043 Changegroups are representations of repository revlog data, specifically
1041 the changelog data, root/flat manifest data, treemanifest data, and
1044 the changelog data, root/flat manifest data, treemanifest data, and
1042 filelogs.
1045 filelogs.
1043
1046
1044 There are 3 versions of changegroups: "1", "2", and "3". From a high-
1047 There are 3 versions of changegroups: "1", "2", and "3". From a high-
1045 level, versions "1" and "2" are almost exactly the same, with the only
1048 level, versions "1" and "2" are almost exactly the same, with the only
1046 difference being an additional item in the *delta header*. Version "3"
1049 difference being an additional item in the *delta header*. Version "3"
1047 adds support for revlog flags in the *delta header* and optionally
1050 adds support for revlog flags in the *delta header* and optionally
1048 exchanging treemanifests (enabled by setting an option on the
1051 exchanging treemanifests (enabled by setting an option on the
1049 "changegroup" part in the bundle2).
1052 "changegroup" part in the bundle2).
1050
1053
1051 Changegroups when not exchanging treemanifests consist of 3 logical
1054 Changegroups when not exchanging treemanifests consist of 3 logical
1052 segments:
1055 segments:
1053
1056
1054 +---------------------------------+
1057 +---------------------------------+
1055 | | | |
1058 | | | |
1056 | changeset | manifest | filelogs |
1059 | changeset | manifest | filelogs |
1057 | | | |
1060 | | | |
1058 | | | |
1061 | | | |
1059 +---------------------------------+
1062 +---------------------------------+
1060
1063
1061 When exchanging treemanifests, there are 4 logical segments:
1064 When exchanging treemanifests, there are 4 logical segments:
1062
1065
1063 +-------------------------------------------------+
1066 +-------------------------------------------------+
1064 | | | | |
1067 | | | | |
1065 | changeset | root | treemanifests | filelogs |
1068 | changeset | root | treemanifests | filelogs |
1066 | | manifest | | |
1069 | | manifest | | |
1067 | | | | |
1070 | | | | |
1068 +-------------------------------------------------+
1071 +-------------------------------------------------+
1069
1072
1070 The principle building block of each segment is a *chunk*. A *chunk* is a
1073 The principle building block of each segment is a *chunk*. A *chunk* is a
1071 framed piece of data:
1074 framed piece of data:
1072
1075
1073 +---------------------------------------+
1076 +---------------------------------------+
1074 | | |
1077 | | |
1075 | length | data |
1078 | length | data |
1076 | (4 bytes) | (<length - 4> bytes) |
1079 | (4 bytes) | (<length - 4> bytes) |
1077 | | |
1080 | | |
1078 +---------------------------------------+
1081 +---------------------------------------+
1079
1082
1080 All integers are big-endian signed integers. Each chunk starts with a
1083 All integers are big-endian signed integers. Each chunk starts with a
1081 32-bit integer indicating the length of the entire chunk (including the
1084 32-bit integer indicating the length of the entire chunk (including the
1082 length field itself).
1085 length field itself).
1083
1086
1084 There is a special case chunk that has a value of 0 for the length
1087 There is a special case chunk that has a value of 0 for the length
1085 ("0x00000000"). We call this an *empty chunk*.
1088 ("0x00000000"). We call this an *empty chunk*.
1086
1089
1087 Delta Groups
1090 Delta Groups
1088 ============
1091 ============
1089
1092
1090 A *delta group* expresses the content of a revlog as a series of deltas,
1093 A *delta group* expresses the content of a revlog as a series of deltas,
1091 or patches against previous revisions.
1094 or patches against previous revisions.
1092
1095
1093 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1096 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1094 to signal the end of the delta group:
1097 to signal the end of the delta group:
1095
1098
1096 +------------------------------------------------------------------------+
1099 +------------------------------------------------------------------------+
1097 | | | | | |
1100 | | | | | |
1098 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1101 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1099 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1102 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1100 | | | | | |
1103 | | | | | |
1101 +------------------------------------------------------------------------+
1104 +------------------------------------------------------------------------+
1102
1105
1103 Each *chunk*'s data consists of the following:
1106 Each *chunk*'s data consists of the following:
1104
1107
1105 +---------------------------------------+
1108 +---------------------------------------+
1106 | | |
1109 | | |
1107 | delta header | delta data |
1110 | delta header | delta data |
1108 | (various by version) | (various) |
1111 | (various by version) | (various) |
1109 | | |
1112 | | |
1110 +---------------------------------------+
1113 +---------------------------------------+
1111
1114
1112 The *delta data* is a series of *delta*s that describe a diff from an
1115 The *delta data* is a series of *delta*s that describe a diff from an
1113 existing entry (either that the recipient already has, or previously
1116 existing entry (either that the recipient already has, or previously
1114 specified in the bundle/changegroup).
1117 specified in the bundle/changegroup).
1115
1118
1116 The *delta header* is different between versions "1", "2", and "3" of the
1119 The *delta header* is different between versions "1", "2", and "3" of the
1117 changegroup format.
1120 changegroup format.
1118
1121
1119 Version 1 (headerlen=80):
1122 Version 1 (headerlen=80):
1120
1123
1121 +------------------------------------------------------+
1124 +------------------------------------------------------+
1122 | | | | |
1125 | | | | |
1123 | node | p1 node | p2 node | link node |
1126 | node | p1 node | p2 node | link node |
1124 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1127 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1125 | | | | |
1128 | | | | |
1126 +------------------------------------------------------+
1129 +------------------------------------------------------+
1127
1130
1128 Version 2 (headerlen=100):
1131 Version 2 (headerlen=100):
1129
1132
1130 +------------------------------------------------------------------+
1133 +------------------------------------------------------------------+
1131 | | | | | |
1134 | | | | | |
1132 | node | p1 node | p2 node | base node | link node |
1135 | node | p1 node | p2 node | base node | link node |
1133 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1136 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1134 | | | | | |
1137 | | | | | |
1135 +------------------------------------------------------------------+
1138 +------------------------------------------------------------------+
1136
1139
1137 Version 3 (headerlen=102):
1140 Version 3 (headerlen=102):
1138
1141
1139 +------------------------------------------------------------------------------+
1142 +------------------------------------------------------------------------------+
1140 | | | | | | |
1143 | | | | | | |
1141 | node | p1 node | p2 node | base node | link node | flags |
1144 | node | p1 node | p2 node | base node | link node | flags |
1142 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1145 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1143 | | | | | | |
1146 | | | | | | |
1144 +------------------------------------------------------------------------------+
1147 +------------------------------------------------------------------------------+
1145
1148
1146 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1149 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1147 contain a series of *delta*s, densely packed (no separators). These deltas
1150 contain a series of *delta*s, densely packed (no separators). These deltas
1148 describe a diff from an existing entry (either that the recipient already
1151 describe a diff from an existing entry (either that the recipient already
1149 has, or previously specified in the bundle/changegroup). The format is
1152 has, or previously specified in the bundle/changegroup). The format is
1150 described more fully in "hg help internals.bdiff", but briefly:
1153 described more fully in "hg help internals.bdiff", but briefly:
1151
1154
1152 +---------------------------------------------------------------+
1155 +---------------------------------------------------------------+
1153 | | | | |
1156 | | | | |
1154 | start offset | end offset | new length | content |
1157 | start offset | end offset | new length | content |
1155 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1158 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1156 | | | | |
1159 | | | | |
1157 +---------------------------------------------------------------+
1160 +---------------------------------------------------------------+
1158
1161
1159 Please note that the length field in the delta data does *not* include
1162 Please note that the length field in the delta data does *not* include
1160 itself.
1163 itself.
1161
1164
1162 In version 1, the delta is always applied against the previous node from
1165 In version 1, the delta is always applied against the previous node from
1163 the changegroup or the first parent if this is the first entry in the
1166 the changegroup or the first parent if this is the first entry in the
1164 changegroup.
1167 changegroup.
1165
1168
1166 In version 2 and up, the delta base node is encoded in the entry in the
1169 In version 2 and up, the delta base node is encoded in the entry in the
1167 changegroup. This allows the delta to be expressed against any parent,
1170 changegroup. This allows the delta to be expressed against any parent,
1168 which can result in smaller deltas and more efficient encoding of data.
1171 which can result in smaller deltas and more efficient encoding of data.
1169
1172
1170 Changeset Segment
1173 Changeset Segment
1171 =================
1174 =================
1172
1175
1173 The *changeset segment* consists of a single *delta group* holding
1176 The *changeset segment* consists of a single *delta group* holding
1174 changelog data. The *empty chunk* at the end of the *delta group* denotes
1177 changelog data. The *empty chunk* at the end of the *delta group* denotes
1175 the boundary to the *manifest segment*.
1178 the boundary to the *manifest segment*.
1176
1179
1177 Manifest Segment
1180 Manifest Segment
1178 ================
1181 ================
1179
1182
1180 The *manifest segment* consists of a single *delta group* holding manifest
1183 The *manifest segment* consists of a single *delta group* holding manifest
1181 data. If treemanifests are in use, it contains only the manifest for the
1184 data. If treemanifests are in use, it contains only the manifest for the
1182 root directory of the repository. Otherwise, it contains the entire
1185 root directory of the repository. Otherwise, it contains the entire
1183 manifest data. The *empty chunk* at the end of the *delta group* denotes
1186 manifest data. The *empty chunk* at the end of the *delta group* denotes
1184 the boundary to the next segment (either the *treemanifests segment* or
1187 the boundary to the next segment (either the *treemanifests segment* or
1185 the *filelogs segment*, depending on version and the request options).
1188 the *filelogs segment*, depending on version and the request options).
1186
1189
1187 Treemanifests Segment
1190 Treemanifests Segment
1188 ---------------------
1191 ---------------------
1189
1192
1190 The *treemanifests segment* only exists in changegroup version "3", and
1193 The *treemanifests segment* only exists in changegroup version "3", and
1191 only if the 'treemanifest' param is part of the bundle2 changegroup part
1194 only if the 'treemanifest' param is part of the bundle2 changegroup part
1192 (it is not possible to use changegroup version 3 outside of bundle2).
1195 (it is not possible to use changegroup version 3 outside of bundle2).
1193 Aside from the filenames in the *treemanifests segment* containing a
1196 Aside from the filenames in the *treemanifests segment* containing a
1194 trailing "/" character, it behaves identically to the *filelogs segment*
1197 trailing "/" character, it behaves identically to the *filelogs segment*
1195 (see below). The final sub-segment is followed by an *empty chunk*
1198 (see below). The final sub-segment is followed by an *empty chunk*
1196 (logically, a sub-segment with filename size 0). This denotes the boundary
1199 (logically, a sub-segment with filename size 0). This denotes the boundary
1197 to the *filelogs segment*.
1200 to the *filelogs segment*.
1198
1201
1199 Filelogs Segment
1202 Filelogs Segment
1200 ================
1203 ================
1201
1204
1202 The *filelogs segment* consists of multiple sub-segments, each
1205 The *filelogs segment* consists of multiple sub-segments, each
1203 corresponding to an individual file whose data is being described:
1206 corresponding to an individual file whose data is being described:
1204
1207
1205 +--------------------------------------------------+
1208 +--------------------------------------------------+
1206 | | | | | |
1209 | | | | | |
1207 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1210 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1208 | | | | | (4 bytes) |
1211 | | | | | (4 bytes) |
1209 | | | | | |
1212 | | | | | |
1210 +--------------------------------------------------+
1213 +--------------------------------------------------+
1211
1214
1212 The final filelog sub-segment is followed by an *empty chunk* (logically,
1215 The final filelog sub-segment is followed by an *empty chunk* (logically,
1213 a sub-segment with filename size 0). This denotes the end of the segment
1216 a sub-segment with filename size 0). This denotes the end of the segment
1214 and of the overall changegroup.
1217 and of the overall changegroup.
1215
1218
1216 Each filelog sub-segment consists of the following:
1219 Each filelog sub-segment consists of the following:
1217
1220
1218 +------------------------------------------------------+
1221 +------------------------------------------------------+
1219 | | | |
1222 | | | |
1220 | filename length | filename | delta group |
1223 | filename length | filename | delta group |
1221 | (4 bytes) | (<length - 4> bytes) | (various) |
1224 | (4 bytes) | (<length - 4> bytes) | (various) |
1222 | | | |
1225 | | | |
1223 +------------------------------------------------------+
1226 +------------------------------------------------------+
1224
1227
1225 That is, a *chunk* consisting of the filename (not terminated or padded)
1228 That is, a *chunk* consisting of the filename (not terminated or padded)
1226 followed by N chunks constituting the *delta group* for this file. The
1229 followed by N chunks constituting the *delta group* for this file. The
1227 *empty chunk* at the end of each *delta group* denotes the boundary to the
1230 *empty chunk* at the end of each *delta group* denotes the boundary to the
1228 next filelog sub-segment.
1231 next filelog sub-segment.
1229
1232
1230 Test list of commands with command with no help text
1233 Test list of commands with command with no help text
1231
1234
1232 $ hg help helpext
1235 $ hg help helpext
1233 helpext extension - no help text available
1236 helpext extension - no help text available
1234
1237
1235 list of commands:
1238 list of commands:
1236
1239
1237 nohelp (no help text available)
1240 nohelp (no help text available)
1238
1241
1239 (use 'hg help -v helpext' to show built-in aliases and global options)
1242 (use 'hg help -v helpext' to show built-in aliases and global options)
1240
1243
1241
1244
1242 test advanced, deprecated and experimental options are hidden in command help
1245 test advanced, deprecated and experimental options are hidden in command help
1243 $ hg help debugoptADV
1246 $ hg help debugoptADV
1244 hg debugoptADV
1247 hg debugoptADV
1245
1248
1246 (no help text available)
1249 (no help text available)
1247
1250
1248 options:
1251 options:
1249
1252
1250 (some details hidden, use --verbose to show complete help)
1253 (some details hidden, use --verbose to show complete help)
1251 $ hg help debugoptDEP
1254 $ hg help debugoptDEP
1252 hg debugoptDEP
1255 hg debugoptDEP
1253
1256
1254 (no help text available)
1257 (no help text available)
1255
1258
1256 options:
1259 options:
1257
1260
1258 (some details hidden, use --verbose to show complete help)
1261 (some details hidden, use --verbose to show complete help)
1259
1262
1260 $ hg help debugoptEXP
1263 $ hg help debugoptEXP
1261 hg debugoptEXP
1264 hg debugoptEXP
1262
1265
1263 (no help text available)
1266 (no help text available)
1264
1267
1265 options:
1268 options:
1266
1269
1267 (some details hidden, use --verbose to show complete help)
1270 (some details hidden, use --verbose to show complete help)
1268
1271
1269 test advanced, deprecated and experimental options are shown with -v
1272 test advanced, deprecated and experimental options are shown with -v
1270 $ hg help -v debugoptADV | grep aopt
1273 $ hg help -v debugoptADV | grep aopt
1271 --aopt option is (ADVANCED)
1274 --aopt option is (ADVANCED)
1272 $ hg help -v debugoptDEP | grep dopt
1275 $ hg help -v debugoptDEP | grep dopt
1273 --dopt option is (DEPRECATED)
1276 --dopt option is (DEPRECATED)
1274 $ hg help -v debugoptEXP | grep eopt
1277 $ hg help -v debugoptEXP | grep eopt
1275 --eopt option is (EXPERIMENTAL)
1278 --eopt option is (EXPERIMENTAL)
1276
1279
1277 #if gettext
1280 #if gettext
1278 test deprecated option is hidden with translation with untranslated description
1281 test deprecated option is hidden with translation with untranslated description
1279 (use many globy for not failing on changed transaction)
1282 (use many globy for not failing on changed transaction)
1280 $ LANGUAGE=sv hg help debugoptDEP
1283 $ LANGUAGE=sv hg help debugoptDEP
1281 hg debugoptDEP
1284 hg debugoptDEP
1282
1285
1283 (*) (glob)
1286 (*) (glob)
1284
1287
1285 options:
1288 options:
1286
1289
1287 (some details hidden, use --verbose to show complete help)
1290 (some details hidden, use --verbose to show complete help)
1288 #endif
1291 #endif
1289
1292
1290 Test commands that collide with topics (issue4240)
1293 Test commands that collide with topics (issue4240)
1291
1294
1292 $ hg config -hq
1295 $ hg config -hq
1293 hg config [-u] [NAME]...
1296 hg config [-u] [NAME]...
1294
1297
1295 show combined config settings from all hgrc files
1298 show combined config settings from all hgrc files
1296 $ hg showconfig -hq
1299 $ hg showconfig -hq
1297 hg config [-u] [NAME]...
1300 hg config [-u] [NAME]...
1298
1301
1299 show combined config settings from all hgrc files
1302 show combined config settings from all hgrc files
1300
1303
1301 Test a help topic
1304 Test a help topic
1302
1305
1303 $ hg help dates
1306 $ hg help dates
1304 Date Formats
1307 Date Formats
1305 """"""""""""
1308 """"""""""""
1306
1309
1307 Some commands allow the user to specify a date, e.g.:
1310 Some commands allow the user to specify a date, e.g.:
1308
1311
1309 - backout, commit, import, tag: Specify the commit date.
1312 - backout, commit, import, tag: Specify the commit date.
1310 - log, revert, update: Select revision(s) by date.
1313 - log, revert, update: Select revision(s) by date.
1311
1314
1312 Many date formats are valid. Here are some examples:
1315 Many date formats are valid. Here are some examples:
1313
1316
1314 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1317 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1315 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1318 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1316 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1319 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1317 - "Dec 6" (midnight)
1320 - "Dec 6" (midnight)
1318 - "13:18" (today assumed)
1321 - "13:18" (today assumed)
1319 - "3:39" (3:39AM assumed)
1322 - "3:39" (3:39AM assumed)
1320 - "3:39pm" (15:39)
1323 - "3:39pm" (15:39)
1321 - "2006-12-06 13:18:29" (ISO 8601 format)
1324 - "2006-12-06 13:18:29" (ISO 8601 format)
1322 - "2006-12-6 13:18"
1325 - "2006-12-6 13:18"
1323 - "2006-12-6"
1326 - "2006-12-6"
1324 - "12-6"
1327 - "12-6"
1325 - "12/6"
1328 - "12/6"
1326 - "12/6/6" (Dec 6 2006)
1329 - "12/6/6" (Dec 6 2006)
1327 - "today" (midnight)
1330 - "today" (midnight)
1328 - "yesterday" (midnight)
1331 - "yesterday" (midnight)
1329 - "now" - right now
1332 - "now" - right now
1330
1333
1331 Lastly, there is Mercurial's internal format:
1334 Lastly, there is Mercurial's internal format:
1332
1335
1333 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1336 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1334
1337
1335 This is the internal representation format for dates. The first number is
1338 This is the internal representation format for dates. The first number is
1336 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1339 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1337 is the offset of the local timezone, in seconds west of UTC (negative if
1340 is the offset of the local timezone, in seconds west of UTC (negative if
1338 the timezone is east of UTC).
1341 the timezone is east of UTC).
1339
1342
1340 The log command also accepts date ranges:
1343 The log command also accepts date ranges:
1341
1344
1342 - "<DATE" - at or before a given date/time
1345 - "<DATE" - at or before a given date/time
1343 - ">DATE" - on or after a given date/time
1346 - ">DATE" - on or after a given date/time
1344 - "DATE to DATE" - a date range, inclusive
1347 - "DATE to DATE" - a date range, inclusive
1345 - "-DAYS" - within a given number of days of today
1348 - "-DAYS" - within a given number of days of today
1346
1349
1347 Test repeated config section name
1350 Test repeated config section name
1348
1351
1349 $ hg help config.host
1352 $ hg help config.host
1350 "http_proxy.host"
1353 "http_proxy.host"
1351 Host name and (optional) port of the proxy server, for example
1354 Host name and (optional) port of the proxy server, for example
1352 "myproxy:8000".
1355 "myproxy:8000".
1353
1356
1354 "smtp.host"
1357 "smtp.host"
1355 Host name of mail server, e.g. "mail.example.com".
1358 Host name of mail server, e.g. "mail.example.com".
1356
1359
1357 Unrelated trailing paragraphs shouldn't be included
1360 Unrelated trailing paragraphs shouldn't be included
1358
1361
1359 $ hg help config.extramsg | grep '^$'
1362 $ hg help config.extramsg | grep '^$'
1360
1363
1361
1364
1362 Test capitalized section name
1365 Test capitalized section name
1363
1366
1364 $ hg help scripting.HGPLAIN > /dev/null
1367 $ hg help scripting.HGPLAIN > /dev/null
1365
1368
1366 Help subsection:
1369 Help subsection:
1367
1370
1368 $ hg help config.charsets |grep "Email example:" > /dev/null
1371 $ hg help config.charsets |grep "Email example:" > /dev/null
1369 [1]
1372 [1]
1370
1373
1371 Show nested definitions
1374 Show nested definitions
1372 ("profiling.type"[break]"ls"[break]"stat"[break])
1375 ("profiling.type"[break]"ls"[break]"stat"[break])
1373
1376
1374 $ hg help config.type | egrep '^$'|wc -l
1377 $ hg help config.type | egrep '^$'|wc -l
1375 \s*3 (re)
1378 \s*3 (re)
1376
1379
1377 Separate sections from subsections
1380 Separate sections from subsections
1378
1381
1379 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1382 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1380 "format"
1383 "format"
1381 --------
1384 --------
1382
1385
1383 "usegeneraldelta"
1386 "usegeneraldelta"
1384
1387
1385 "dotencode"
1388 "dotencode"
1386
1389
1387 "usefncache"
1390 "usefncache"
1388
1391
1389 "usestore"
1392 "usestore"
1390
1393
1391 "profiling"
1394 "profiling"
1392 -----------
1395 -----------
1393
1396
1394 "format"
1397 "format"
1395
1398
1396 "progress"
1399 "progress"
1397 ----------
1400 ----------
1398
1401
1399 "format"
1402 "format"
1400
1403
1401
1404
1402 Last item in help config.*:
1405 Last item in help config.*:
1403
1406
1404 $ hg help config.`hg help config|grep '^ "'| \
1407 $ hg help config.`hg help config|grep '^ "'| \
1405 > tail -1|sed 's![ "]*!!g'`| \
1408 > tail -1|sed 's![ "]*!!g'`| \
1406 > grep 'hg help -c config' > /dev/null
1409 > grep 'hg help -c config' > /dev/null
1407 [1]
1410 [1]
1408
1411
1409 note to use help -c for general hg help config:
1412 note to use help -c for general hg help config:
1410
1413
1411 $ hg help config |grep 'hg help -c config' > /dev/null
1414 $ hg help config |grep 'hg help -c config' > /dev/null
1412
1415
1413 Test templating help
1416 Test templating help
1414
1417
1415 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1418 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1416 desc String. The text of the changeset description.
1419 desc String. The text of the changeset description.
1417 diffstat String. Statistics of changes with the following format:
1420 diffstat String. Statistics of changes with the following format:
1418 firstline Any text. Returns the first line of text.
1421 firstline Any text. Returns the first line of text.
1419 nonempty Any text. Returns '(none)' if the string is empty.
1422 nonempty Any text. Returns '(none)' if the string is empty.
1420
1423
1421 Test deprecated items
1424 Test deprecated items
1422
1425
1423 $ hg help -v templating | grep currentbookmark
1426 $ hg help -v templating | grep currentbookmark
1424 currentbookmark
1427 currentbookmark
1425 $ hg help templating | (grep currentbookmark || true)
1428 $ hg help templating | (grep currentbookmark || true)
1426
1429
1427 Test help hooks
1430 Test help hooks
1428
1431
1429 $ cat > helphook1.py <<EOF
1432 $ cat > helphook1.py <<EOF
1430 > from mercurial import help
1433 > from mercurial import help
1431 >
1434 >
1432 > def rewrite(ui, topic, doc):
1435 > def rewrite(ui, topic, doc):
1433 > return doc + '\nhelphook1\n'
1436 > return doc + '\nhelphook1\n'
1434 >
1437 >
1435 > def extsetup(ui):
1438 > def extsetup(ui):
1436 > help.addtopichook('revisions', rewrite)
1439 > help.addtopichook('revisions', rewrite)
1437 > EOF
1440 > EOF
1438 $ cat > helphook2.py <<EOF
1441 $ cat > helphook2.py <<EOF
1439 > from mercurial import help
1442 > from mercurial import help
1440 >
1443 >
1441 > def rewrite(ui, topic, doc):
1444 > def rewrite(ui, topic, doc):
1442 > return doc + '\nhelphook2\n'
1445 > return doc + '\nhelphook2\n'
1443 >
1446 >
1444 > def extsetup(ui):
1447 > def extsetup(ui):
1445 > help.addtopichook('revisions', rewrite)
1448 > help.addtopichook('revisions', rewrite)
1446 > EOF
1449 > EOF
1447 $ echo '[extensions]' >> $HGRCPATH
1450 $ echo '[extensions]' >> $HGRCPATH
1448 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1451 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1449 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1452 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1450 $ hg help revsets | grep helphook
1453 $ hg help revsets | grep helphook
1451 helphook1
1454 helphook1
1452 helphook2
1455 helphook2
1453
1456
1454 help -c should only show debug --debug
1457 help -c should only show debug --debug
1455
1458
1456 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1459 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1457 [1]
1460 [1]
1458
1461
1459 help -c should only show deprecated for -v
1462 help -c should only show deprecated for -v
1460
1463
1461 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1464 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1462 [1]
1465 [1]
1463
1466
1464 Test -s / --system
1467 Test -s / --system
1465
1468
1466 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1469 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1467 > wc -l | sed -e 's/ //g'
1470 > wc -l | sed -e 's/ //g'
1468 0
1471 0
1469 $ hg help config.files --system unix | grep 'USER' | \
1472 $ hg help config.files --system unix | grep 'USER' | \
1470 > wc -l | sed -e 's/ //g'
1473 > wc -l | sed -e 's/ //g'
1471 0
1474 0
1472
1475
1473 Test -e / -c / -k combinations
1476 Test -e / -c / -k combinations
1474
1477
1475 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1478 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1476 Commands:
1479 Commands:
1477 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1480 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1478 Extensions:
1481 Extensions:
1479 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1482 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1480 Topics:
1483 Topics:
1481 Commands:
1484 Commands:
1482 Extensions:
1485 Extensions:
1483 Extension Commands:
1486 Extension Commands:
1484 $ hg help -c schemes
1487 $ hg help -c schemes
1485 abort: no such help topic: schemes
1488 abort: no such help topic: schemes
1486 (try 'hg help --keyword schemes')
1489 (try 'hg help --keyword schemes')
1487 [255]
1490 [255]
1488 $ hg help -e schemes |head -1
1491 $ hg help -e schemes |head -1
1489 schemes extension - extend schemes with shortcuts to repository swarms
1492 schemes extension - extend schemes with shortcuts to repository swarms
1490 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1493 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1491 Commands:
1494 Commands:
1492 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1495 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1493 Extensions:
1496 Extensions:
1494 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1497 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1495 Extensions:
1498 Extensions:
1496 Commands:
1499 Commands:
1497 $ hg help -c commit > /dev/null
1500 $ hg help -c commit > /dev/null
1498 $ hg help -e -c commit > /dev/null
1501 $ hg help -e -c commit > /dev/null
1499 $ hg help -e commit > /dev/null
1502 $ hg help -e commit > /dev/null
1500 abort: no such help topic: commit
1503 abort: no such help topic: commit
1501 (try 'hg help --keyword commit')
1504 (try 'hg help --keyword commit')
1502 [255]
1505 [255]
1503
1506
1504 Test keyword search help
1507 Test keyword search help
1505
1508
1506 $ cat > prefixedname.py <<EOF
1509 $ cat > prefixedname.py <<EOF
1507 > '''matched against word "clone"
1510 > '''matched against word "clone"
1508 > '''
1511 > '''
1509 > EOF
1512 > EOF
1510 $ echo '[extensions]' >> $HGRCPATH
1513 $ echo '[extensions]' >> $HGRCPATH
1511 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1514 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1512 $ hg help -k clone
1515 $ hg help -k clone
1513 Topics:
1516 Topics:
1514
1517
1515 config Configuration Files
1518 config Configuration Files
1516 extensions Using Additional Features
1519 extensions Using Additional Features
1517 glossary Glossary
1520 glossary Glossary
1518 phases Working with Phases
1521 phases Working with Phases
1519 subrepos Subrepositories
1522 subrepos Subrepositories
1520 urls URL Paths
1523 urls URL Paths
1521
1524
1522 Commands:
1525 Commands:
1523
1526
1524 bookmarks create a new bookmark or list existing bookmarks
1527 bookmarks create a new bookmark or list existing bookmarks
1525 clone make a copy of an existing repository
1528 clone make a copy of an existing repository
1526 paths show aliases for remote repositories
1529 paths show aliases for remote repositories
1527 pull pull changes from the specified source
1530 pull pull changes from the specified source
1528 update update working directory (or switch revisions)
1531 update update working directory (or switch revisions)
1529
1532
1530 Extensions:
1533 Extensions:
1531
1534
1532 clonebundles advertise pre-generated bundles to seed clones
1535 clonebundles advertise pre-generated bundles to seed clones
1533 narrow create clones which fetch history data for subset of files
1536 narrow create clones which fetch history data for subset of files
1534 (EXPERIMENTAL)
1537 (EXPERIMENTAL)
1535 prefixedname matched against word "clone"
1538 prefixedname matched against word "clone"
1536 relink recreates hardlinks between repository clones
1539 relink recreates hardlinks between repository clones
1537
1540
1538 Extension Commands:
1541 Extension Commands:
1539
1542
1540 qclone clone main and patch repository at same time
1543 qclone clone main and patch repository at same time
1541
1544
1542 Test unfound topic
1545 Test unfound topic
1543
1546
1544 $ hg help nonexistingtopicthatwillneverexisteverever
1547 $ hg help nonexistingtopicthatwillneverexisteverever
1545 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1548 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1546 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1549 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1547 [255]
1550 [255]
1548
1551
1549 Test unfound keyword
1552 Test unfound keyword
1550
1553
1551 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1554 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1552 abort: no matches
1555 abort: no matches
1553 (try 'hg help' for a list of topics)
1556 (try 'hg help' for a list of topics)
1554 [255]
1557 [255]
1555
1558
1556 Test omit indicating for help
1559 Test omit indicating for help
1557
1560
1558 $ cat > addverboseitems.py <<EOF
1561 $ cat > addverboseitems.py <<EOF
1559 > '''extension to test omit indicating.
1562 > '''extension to test omit indicating.
1560 >
1563 >
1561 > This paragraph is never omitted (for extension)
1564 > This paragraph is never omitted (for extension)
1562 >
1565 >
1563 > .. container:: verbose
1566 > .. container:: verbose
1564 >
1567 >
1565 > This paragraph is omitted,
1568 > This paragraph is omitted,
1566 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1569 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1567 >
1570 >
1568 > This paragraph is never omitted, too (for extension)
1571 > This paragraph is never omitted, too (for extension)
1569 > '''
1572 > '''
1570 > from __future__ import absolute_import
1573 > from __future__ import absolute_import
1571 > from mercurial import commands, help
1574 > from mercurial import commands, help
1572 > testtopic = """This paragraph is never omitted (for topic).
1575 > testtopic = """This paragraph is never omitted (for topic).
1573 >
1576 >
1574 > .. container:: verbose
1577 > .. container:: verbose
1575 >
1578 >
1576 > This paragraph is omitted,
1579 > This paragraph is omitted,
1577 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1580 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1578 >
1581 >
1579 > This paragraph is never omitted, too (for topic)
1582 > This paragraph is never omitted, too (for topic)
1580 > """
1583 > """
1581 > def extsetup(ui):
1584 > def extsetup(ui):
1582 > help.helptable.append((["topic-containing-verbose"],
1585 > help.helptable.append((["topic-containing-verbose"],
1583 > "This is the topic to test omit indicating.",
1586 > "This is the topic to test omit indicating.",
1584 > lambda ui: testtopic))
1587 > lambda ui: testtopic))
1585 > EOF
1588 > EOF
1586 $ echo '[extensions]' >> $HGRCPATH
1589 $ echo '[extensions]' >> $HGRCPATH
1587 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1590 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1588 $ hg help addverboseitems
1591 $ hg help addverboseitems
1589 addverboseitems extension - extension to test omit indicating.
1592 addverboseitems extension - extension to test omit indicating.
1590
1593
1591 This paragraph is never omitted (for extension)
1594 This paragraph is never omitted (for extension)
1592
1595
1593 This paragraph is never omitted, too (for extension)
1596 This paragraph is never omitted, too (for extension)
1594
1597
1595 (some details hidden, use --verbose to show complete help)
1598 (some details hidden, use --verbose to show complete help)
1596
1599
1597 no commands defined
1600 no commands defined
1598 $ hg help -v addverboseitems
1601 $ hg help -v addverboseitems
1599 addverboseitems extension - extension to test omit indicating.
1602 addverboseitems extension - extension to test omit indicating.
1600
1603
1601 This paragraph is never omitted (for extension)
1604 This paragraph is never omitted (for extension)
1602
1605
1603 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1606 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1604 extension)
1607 extension)
1605
1608
1606 This paragraph is never omitted, too (for extension)
1609 This paragraph is never omitted, too (for extension)
1607
1610
1608 no commands defined
1611 no commands defined
1609 $ hg help topic-containing-verbose
1612 $ hg help topic-containing-verbose
1610 This is the topic to test omit indicating.
1613 This is the topic to test omit indicating.
1611 """"""""""""""""""""""""""""""""""""""""""
1614 """"""""""""""""""""""""""""""""""""""""""
1612
1615
1613 This paragraph is never omitted (for topic).
1616 This paragraph is never omitted (for topic).
1614
1617
1615 This paragraph is never omitted, too (for topic)
1618 This paragraph is never omitted, too (for topic)
1616
1619
1617 (some details hidden, use --verbose to show complete help)
1620 (some details hidden, use --verbose to show complete help)
1618 $ hg help -v topic-containing-verbose
1621 $ hg help -v topic-containing-verbose
1619 This is the topic to test omit indicating.
1622 This is the topic to test omit indicating.
1620 """"""""""""""""""""""""""""""""""""""""""
1623 """"""""""""""""""""""""""""""""""""""""""
1621
1624
1622 This paragraph is never omitted (for topic).
1625 This paragraph is never omitted (for topic).
1623
1626
1624 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1627 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1625 topic)
1628 topic)
1626
1629
1627 This paragraph is never omitted, too (for topic)
1630 This paragraph is never omitted, too (for topic)
1628
1631
1629 Test section lookup
1632 Test section lookup
1630
1633
1631 $ hg help revset.merge
1634 $ hg help revset.merge
1632 "merge()"
1635 "merge()"
1633 Changeset is a merge changeset.
1636 Changeset is a merge changeset.
1634
1637
1635 $ hg help glossary.dag
1638 $ hg help glossary.dag
1636 DAG
1639 DAG
1637 The repository of changesets of a distributed version control system
1640 The repository of changesets of a distributed version control system
1638 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1641 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1639 of nodes and edges, where nodes correspond to changesets and edges
1642 of nodes and edges, where nodes correspond to changesets and edges
1640 imply a parent -> child relation. This graph can be visualized by
1643 imply a parent -> child relation. This graph can be visualized by
1641 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1644 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1642 limited by the requirement for children to have at most two parents.
1645 limited by the requirement for children to have at most two parents.
1643
1646
1644
1647
1645 $ hg help hgrc.paths
1648 $ hg help hgrc.paths
1646 "paths"
1649 "paths"
1647 -------
1650 -------
1648
1651
1649 Assigns symbolic names and behavior to repositories.
1652 Assigns symbolic names and behavior to repositories.
1650
1653
1651 Options are symbolic names defining the URL or directory that is the
1654 Options are symbolic names defining the URL or directory that is the
1652 location of the repository. Example:
1655 location of the repository. Example:
1653
1656
1654 [paths]
1657 [paths]
1655 my_server = https://example.com/my_repo
1658 my_server = https://example.com/my_repo
1656 local_path = /home/me/repo
1659 local_path = /home/me/repo
1657
1660
1658 These symbolic names can be used from the command line. To pull from
1661 These symbolic names can be used from the command line. To pull from
1659 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1662 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1660 local_path'.
1663 local_path'.
1661
1664
1662 Options containing colons (":") denote sub-options that can influence
1665 Options containing colons (":") denote sub-options that can influence
1663 behavior for that specific path. Example:
1666 behavior for that specific path. Example:
1664
1667
1665 [paths]
1668 [paths]
1666 my_server = https://example.com/my_path
1669 my_server = https://example.com/my_path
1667 my_server:pushurl = ssh://example.com/my_path
1670 my_server:pushurl = ssh://example.com/my_path
1668
1671
1669 The following sub-options can be defined:
1672 The following sub-options can be defined:
1670
1673
1671 "pushurl"
1674 "pushurl"
1672 The URL to use for push operations. If not defined, the location
1675 The URL to use for push operations. If not defined, the location
1673 defined by the path's main entry is used.
1676 defined by the path's main entry is used.
1674
1677
1675 "pushrev"
1678 "pushrev"
1676 A revset defining which revisions to push by default.
1679 A revset defining which revisions to push by default.
1677
1680
1678 When 'hg push' is executed without a "-r" argument, the revset defined
1681 When 'hg push' is executed without a "-r" argument, the revset defined
1679 by this sub-option is evaluated to determine what to push.
1682 by this sub-option is evaluated to determine what to push.
1680
1683
1681 For example, a value of "." will push the working directory's revision
1684 For example, a value of "." will push the working directory's revision
1682 by default.
1685 by default.
1683
1686
1684 Revsets specifying bookmarks will not result in the bookmark being
1687 Revsets specifying bookmarks will not result in the bookmark being
1685 pushed.
1688 pushed.
1686
1689
1687 The following special named paths exist:
1690 The following special named paths exist:
1688
1691
1689 "default"
1692 "default"
1690 The URL or directory to use when no source or remote is specified.
1693 The URL or directory to use when no source or remote is specified.
1691
1694
1692 'hg clone' will automatically define this path to the location the
1695 'hg clone' will automatically define this path to the location the
1693 repository was cloned from.
1696 repository was cloned from.
1694
1697
1695 "default-push"
1698 "default-push"
1696 (deprecated) The URL or directory for the default 'hg push' location.
1699 (deprecated) The URL or directory for the default 'hg push' location.
1697 "default:pushurl" should be used instead.
1700 "default:pushurl" should be used instead.
1698
1701
1699 $ hg help glossary.mcguffin
1702 $ hg help glossary.mcguffin
1700 abort: help section not found: glossary.mcguffin
1703 abort: help section not found: glossary.mcguffin
1701 [255]
1704 [255]
1702
1705
1703 $ hg help glossary.mc.guffin
1706 $ hg help glossary.mc.guffin
1704 abort: help section not found: glossary.mc.guffin
1707 abort: help section not found: glossary.mc.guffin
1705 [255]
1708 [255]
1706
1709
1707 $ hg help template.files
1710 $ hg help template.files
1708 files List of strings. All files modified, added, or removed by
1711 files List of strings. All files modified, added, or removed by
1709 this changeset.
1712 this changeset.
1710 files(pattern)
1713 files(pattern)
1711 All files of the current changeset matching the pattern. See
1714 All files of the current changeset matching the pattern. See
1712 'hg help patterns'.
1715 'hg help patterns'.
1713
1716
1714 Test section lookup by translated message
1717 Test section lookup by translated message
1715
1718
1716 str.lower() instead of encoding.lower(str) on translated message might
1719 str.lower() instead of encoding.lower(str) on translated message might
1717 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1720 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1718 as the second or later byte of multi-byte character.
1721 as the second or later byte of multi-byte character.
1719
1722
1720 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1723 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1721 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1724 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1722 replacement makes message meaningless.
1725 replacement makes message meaningless.
1723
1726
1724 This tests that section lookup by translated string isn't broken by
1727 This tests that section lookup by translated string isn't broken by
1725 such str.lower().
1728 such str.lower().
1726
1729
1727 $ $PYTHON <<EOF
1730 $ $PYTHON <<EOF
1728 > def escape(s):
1731 > def escape(s):
1729 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1732 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1730 > # translation of "record" in ja_JP.cp932
1733 > # translation of "record" in ja_JP.cp932
1731 > upper = "\x8bL\x98^"
1734 > upper = "\x8bL\x98^"
1732 > # str.lower()-ed section name should be treated as different one
1735 > # str.lower()-ed section name should be treated as different one
1733 > lower = "\x8bl\x98^"
1736 > lower = "\x8bl\x98^"
1734 > with open('ambiguous.py', 'w') as fp:
1737 > with open('ambiguous.py', 'w') as fp:
1735 > fp.write("""# ambiguous section names in ja_JP.cp932
1738 > fp.write("""# ambiguous section names in ja_JP.cp932
1736 > u'''summary of extension
1739 > u'''summary of extension
1737 >
1740 >
1738 > %s
1741 > %s
1739 > ----
1742 > ----
1740 >
1743 >
1741 > Upper name should show only this message
1744 > Upper name should show only this message
1742 >
1745 >
1743 > %s
1746 > %s
1744 > ----
1747 > ----
1745 >
1748 >
1746 > Lower name should show only this message
1749 > Lower name should show only this message
1747 >
1750 >
1748 > subsequent section
1751 > subsequent section
1749 > ------------------
1752 > ------------------
1750 >
1753 >
1751 > This should be hidden at 'hg help ambiguous' with section name.
1754 > This should be hidden at 'hg help ambiguous' with section name.
1752 > '''
1755 > '''
1753 > """ % (escape(upper), escape(lower)))
1756 > """ % (escape(upper), escape(lower)))
1754 > EOF
1757 > EOF
1755
1758
1756 $ cat >> $HGRCPATH <<EOF
1759 $ cat >> $HGRCPATH <<EOF
1757 > [extensions]
1760 > [extensions]
1758 > ambiguous = ./ambiguous.py
1761 > ambiguous = ./ambiguous.py
1759 > EOF
1762 > EOF
1760
1763
1761 $ $PYTHON <<EOF | sh
1764 $ $PYTHON <<EOF | sh
1762 > upper = "\x8bL\x98^"
1765 > upper = "\x8bL\x98^"
1763 > print("hg --encoding cp932 help -e ambiguous.%s" % upper)
1766 > print("hg --encoding cp932 help -e ambiguous.%s" % upper)
1764 > EOF
1767 > EOF
1765 \x8bL\x98^ (esc)
1768 \x8bL\x98^ (esc)
1766 ----
1769 ----
1767
1770
1768 Upper name should show only this message
1771 Upper name should show only this message
1769
1772
1770
1773
1771 $ $PYTHON <<EOF | sh
1774 $ $PYTHON <<EOF | sh
1772 > lower = "\x8bl\x98^"
1775 > lower = "\x8bl\x98^"
1773 > print("hg --encoding cp932 help -e ambiguous.%s" % lower)
1776 > print("hg --encoding cp932 help -e ambiguous.%s" % lower)
1774 > EOF
1777 > EOF
1775 \x8bl\x98^ (esc)
1778 \x8bl\x98^ (esc)
1776 ----
1779 ----
1777
1780
1778 Lower name should show only this message
1781 Lower name should show only this message
1779
1782
1780
1783
1781 $ cat >> $HGRCPATH <<EOF
1784 $ cat >> $HGRCPATH <<EOF
1782 > [extensions]
1785 > [extensions]
1783 > ambiguous = !
1786 > ambiguous = !
1784 > EOF
1787 > EOF
1785
1788
1786 Show help content of disabled extensions
1789 Show help content of disabled extensions
1787
1790
1788 $ cat >> $HGRCPATH <<EOF
1791 $ cat >> $HGRCPATH <<EOF
1789 > [extensions]
1792 > [extensions]
1790 > ambiguous = !./ambiguous.py
1793 > ambiguous = !./ambiguous.py
1791 > EOF
1794 > EOF
1792 $ hg help -e ambiguous
1795 $ hg help -e ambiguous
1793 ambiguous extension - (no help text available)
1796 ambiguous extension - (no help text available)
1794
1797
1795 (use 'hg help extensions' for information on enabling extensions)
1798 (use 'hg help extensions' for information on enabling extensions)
1796
1799
1797 Test dynamic list of merge tools only shows up once
1800 Test dynamic list of merge tools only shows up once
1798 $ hg help merge-tools
1801 $ hg help merge-tools
1799 Merge Tools
1802 Merge Tools
1800 """""""""""
1803 """""""""""
1801
1804
1802 To merge files Mercurial uses merge tools.
1805 To merge files Mercurial uses merge tools.
1803
1806
1804 A merge tool combines two different versions of a file into a merged file.
1807 A merge tool combines two different versions of a file into a merged file.
1805 Merge tools are given the two files and the greatest common ancestor of
1808 Merge tools are given the two files and the greatest common ancestor of
1806 the two file versions, so they can determine the changes made on both
1809 the two file versions, so they can determine the changes made on both
1807 branches.
1810 branches.
1808
1811
1809 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1812 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1810 backout' and in several extensions.
1813 backout' and in several extensions.
1811
1814
1812 Usually, the merge tool tries to automatically reconcile the files by
1815 Usually, the merge tool tries to automatically reconcile the files by
1813 combining all non-overlapping changes that occurred separately in the two
1816 combining all non-overlapping changes that occurred separately in the two
1814 different evolutions of the same initial base file. Furthermore, some
1817 different evolutions of the same initial base file. Furthermore, some
1815 interactive merge programs make it easier to manually resolve conflicting
1818 interactive merge programs make it easier to manually resolve conflicting
1816 merges, either in a graphical way, or by inserting some conflict markers.
1819 merges, either in a graphical way, or by inserting some conflict markers.
1817 Mercurial does not include any interactive merge programs but relies on
1820 Mercurial does not include any interactive merge programs but relies on
1818 external tools for that.
1821 external tools for that.
1819
1822
1820 Available merge tools
1823 Available merge tools
1821 =====================
1824 =====================
1822
1825
1823 External merge tools and their properties are configured in the merge-
1826 External merge tools and their properties are configured in the merge-
1824 tools configuration section - see hgrc(5) - but they can often just be
1827 tools configuration section - see hgrc(5) - but they can often just be
1825 named by their executable.
1828 named by their executable.
1826
1829
1827 A merge tool is generally usable if its executable can be found on the
1830 A merge tool is generally usable if its executable can be found on the
1828 system and if it can handle the merge. The executable is found if it is an
1831 system and if it can handle the merge. The executable is found if it is an
1829 absolute or relative executable path or the name of an application in the
1832 absolute or relative executable path or the name of an application in the
1830 executable search path. The tool is assumed to be able to handle the merge
1833 executable search path. The tool is assumed to be able to handle the merge
1831 if it can handle symlinks if the file is a symlink, if it can handle
1834 if it can handle symlinks if the file is a symlink, if it can handle
1832 binary files if the file is binary, and if a GUI is available if the tool
1835 binary files if the file is binary, and if a GUI is available if the tool
1833 requires a GUI.
1836 requires a GUI.
1834
1837
1835 There are some internal merge tools which can be used. The internal merge
1838 There are some internal merge tools which can be used. The internal merge
1836 tools are:
1839 tools are:
1837
1840
1838 ":dump"
1841 ":dump"
1839 Creates three versions of the files to merge, containing the contents of
1842 Creates three versions of the files to merge, containing the contents of
1840 local, other and base. These files can then be used to perform a merge
1843 local, other and base. These files can then be used to perform a merge
1841 manually. If the file to be merged is named "a.txt", these files will
1844 manually. If the file to be merged is named "a.txt", these files will
1842 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1845 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1843 they will be placed in the same directory as "a.txt".
1846 they will be placed in the same directory as "a.txt".
1844
1847
1845 This implies premerge. Therefore, files aren't dumped, if premerge runs
1848 This implies premerge. Therefore, files aren't dumped, if premerge runs
1846 successfully. Use :forcedump to forcibly write files out.
1849 successfully. Use :forcedump to forcibly write files out.
1847
1850
1848 ":fail"
1851 ":fail"
1849 Rather than attempting to merge files that were modified on both
1852 Rather than attempting to merge files that were modified on both
1850 branches, it marks them as unresolved. The resolve command must be used
1853 branches, it marks them as unresolved. The resolve command must be used
1851 to resolve these conflicts.
1854 to resolve these conflicts.
1852
1855
1853 ":forcedump"
1856 ":forcedump"
1854 Creates three versions of the files as same as :dump, but omits
1857 Creates three versions of the files as same as :dump, but omits
1855 premerge.
1858 premerge.
1856
1859
1857 ":local"
1860 ":local"
1858 Uses the local 'p1()' version of files as the merged version.
1861 Uses the local 'p1()' version of files as the merged version.
1859
1862
1860 ":merge"
1863 ":merge"
1861 Uses the internal non-interactive simple merge algorithm for merging
1864 Uses the internal non-interactive simple merge algorithm for merging
1862 files. It will fail if there are any conflicts and leave markers in the
1865 files. It will fail if there are any conflicts and leave markers in the
1863 partially merged file. Markers will have two sections, one for each side
1866 partially merged file. Markers will have two sections, one for each side
1864 of merge.
1867 of merge.
1865
1868
1866 ":merge-local"
1869 ":merge-local"
1867 Like :merge, but resolve all conflicts non-interactively in favor of the
1870 Like :merge, but resolve all conflicts non-interactively in favor of the
1868 local 'p1()' changes.
1871 local 'p1()' changes.
1869
1872
1870 ":merge-other"
1873 ":merge-other"
1871 Like :merge, but resolve all conflicts non-interactively in favor of the
1874 Like :merge, but resolve all conflicts non-interactively in favor of the
1872 other 'p2()' changes.
1875 other 'p2()' changes.
1873
1876
1874 ":merge3"
1877 ":merge3"
1875 Uses the internal non-interactive simple merge algorithm for merging
1878 Uses the internal non-interactive simple merge algorithm for merging
1876 files. It will fail if there are any conflicts and leave markers in the
1879 files. It will fail if there are any conflicts and leave markers in the
1877 partially merged file. Marker will have three sections, one from each
1880 partially merged file. Marker will have three sections, one from each
1878 side of the merge and one for the base content.
1881 side of the merge and one for the base content.
1879
1882
1880 ":other"
1883 ":other"
1881 Uses the other 'p2()' version of files as the merged version.
1884 Uses the other 'p2()' version of files as the merged version.
1882
1885
1883 ":prompt"
1886 ":prompt"
1884 Asks the user which of the local 'p1()' or the other 'p2()' version to
1887 Asks the user which of the local 'p1()' or the other 'p2()' version to
1885 keep as the merged version.
1888 keep as the merged version.
1886
1889
1887 ":tagmerge"
1890 ":tagmerge"
1888 Uses the internal tag merge algorithm (experimental).
1891 Uses the internal tag merge algorithm (experimental).
1889
1892
1890 ":union"
1893 ":union"
1891 Uses the internal non-interactive simple merge algorithm for merging
1894 Uses the internal non-interactive simple merge algorithm for merging
1892 files. It will use both left and right sides for conflict regions. No
1895 files. It will use both left and right sides for conflict regions. No
1893 markers are inserted.
1896 markers are inserted.
1894
1897
1895 Internal tools are always available and do not require a GUI but will by
1898 Internal tools are always available and do not require a GUI but will by
1896 default not handle symlinks or binary files.
1899 default not handle symlinks or binary files.
1897
1900
1898 Choosing a merge tool
1901 Choosing a merge tool
1899 =====================
1902 =====================
1900
1903
1901 Mercurial uses these rules when deciding which merge tool to use:
1904 Mercurial uses these rules when deciding which merge tool to use:
1902
1905
1903 1. If a tool has been specified with the --tool option to merge or
1906 1. If a tool has been specified with the --tool option to merge or
1904 resolve, it is used. If it is the name of a tool in the merge-tools
1907 resolve, it is used. If it is the name of a tool in the merge-tools
1905 configuration, its configuration is used. Otherwise the specified tool
1908 configuration, its configuration is used. Otherwise the specified tool
1906 must be executable by the shell.
1909 must be executable by the shell.
1907 2. If the "HGMERGE" environment variable is present, its value is used and
1910 2. If the "HGMERGE" environment variable is present, its value is used and
1908 must be executable by the shell.
1911 must be executable by the shell.
1909 3. If the filename of the file to be merged matches any of the patterns in
1912 3. If the filename of the file to be merged matches any of the patterns in
1910 the merge-patterns configuration section, the first usable merge tool
1913 the merge-patterns configuration section, the first usable merge tool
1911 corresponding to a matching pattern is used. Here, binary capabilities
1914 corresponding to a matching pattern is used. Here, binary capabilities
1912 of the merge tool are not considered.
1915 of the merge tool are not considered.
1913 4. If ui.merge is set it will be considered next. If the value is not the
1916 4. If ui.merge is set it will be considered next. If the value is not the
1914 name of a configured tool, the specified value is used and must be
1917 name of a configured tool, the specified value is used and must be
1915 executable by the shell. Otherwise the named tool is used if it is
1918 executable by the shell. Otherwise the named tool is used if it is
1916 usable.
1919 usable.
1917 5. If any usable merge tools are present in the merge-tools configuration
1920 5. If any usable merge tools are present in the merge-tools configuration
1918 section, the one with the highest priority is used.
1921 section, the one with the highest priority is used.
1919 6. If a program named "hgmerge" can be found on the system, it is used -
1922 6. If a program named "hgmerge" can be found on the system, it is used -
1920 but it will by default not be used for symlinks and binary files.
1923 but it will by default not be used for symlinks and binary files.
1921 7. If the file to be merged is not binary and is not a symlink, then
1924 7. If the file to be merged is not binary and is not a symlink, then
1922 internal ":merge" is used.
1925 internal ":merge" is used.
1923 8. Otherwise, ":prompt" is used.
1926 8. Otherwise, ":prompt" is used.
1924
1927
1925 Note:
1928 Note:
1926 After selecting a merge program, Mercurial will by default attempt to
1929 After selecting a merge program, Mercurial will by default attempt to
1927 merge the files using a simple merge algorithm first. Only if it
1930 merge the files using a simple merge algorithm first. Only if it
1928 doesn't succeed because of conflicting changes will Mercurial actually
1931 doesn't succeed because of conflicting changes will Mercurial actually
1929 execute the merge program. Whether to use the simple merge algorithm
1932 execute the merge program. Whether to use the simple merge algorithm
1930 first can be controlled by the premerge setting of the merge tool.
1933 first can be controlled by the premerge setting of the merge tool.
1931 Premerge is enabled by default unless the file is binary or a symlink.
1934 Premerge is enabled by default unless the file is binary or a symlink.
1932
1935
1933 See the merge-tools and ui sections of hgrc(5) for details on the
1936 See the merge-tools and ui sections of hgrc(5) for details on the
1934 configuration of merge tools.
1937 configuration of merge tools.
1935
1938
1936 Compression engines listed in `hg help bundlespec`
1939 Compression engines listed in `hg help bundlespec`
1937
1940
1938 $ hg help bundlespec | grep gzip
1941 $ hg help bundlespec | grep gzip
1939 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1942 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1940 An algorithm that produces smaller bundles than "gzip".
1943 An algorithm that produces smaller bundles than "gzip".
1941 This engine will likely produce smaller bundles than "gzip" but will be
1944 This engine will likely produce smaller bundles than "gzip" but will be
1942 "gzip"
1945 "gzip"
1943 better compression than "gzip". It also frequently yields better (?)
1946 better compression than "gzip". It also frequently yields better (?)
1944
1947
1945 Test usage of section marks in help documents
1948 Test usage of section marks in help documents
1946
1949
1947 $ cd "$TESTDIR"/../doc
1950 $ cd "$TESTDIR"/../doc
1948 $ $PYTHON check-seclevel.py
1951 $ $PYTHON check-seclevel.py
1949 $ cd $TESTTMP
1952 $ cd $TESTTMP
1950
1953
1951 #if serve
1954 #if serve
1952
1955
1953 Test the help pages in hgweb.
1956 Test the help pages in hgweb.
1954
1957
1955 Dish up an empty repo; serve it cold.
1958 Dish up an empty repo; serve it cold.
1956
1959
1957 $ hg init "$TESTTMP/test"
1960 $ hg init "$TESTTMP/test"
1958 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1961 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1959 $ cat hg.pid >> $DAEMON_PIDS
1962 $ cat hg.pid >> $DAEMON_PIDS
1960
1963
1961 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1964 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1962 200 Script output follows
1965 200 Script output follows
1963
1966
1964 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1967 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1965 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1968 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1966 <head>
1969 <head>
1967 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1970 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1968 <meta name="robots" content="index, nofollow" />
1971 <meta name="robots" content="index, nofollow" />
1969 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1972 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1970 <script type="text/javascript" src="/static/mercurial.js"></script>
1973 <script type="text/javascript" src="/static/mercurial.js"></script>
1971
1974
1972 <title>Help: Index</title>
1975 <title>Help: Index</title>
1973 </head>
1976 </head>
1974 <body>
1977 <body>
1975
1978
1976 <div class="container">
1979 <div class="container">
1977 <div class="menu">
1980 <div class="menu">
1978 <div class="logo">
1981 <div class="logo">
1979 <a href="https://mercurial-scm.org/">
1982 <a href="https://mercurial-scm.org/">
1980 <img src="/static/hglogo.png" alt="mercurial" /></a>
1983 <img src="/static/hglogo.png" alt="mercurial" /></a>
1981 </div>
1984 </div>
1982 <ul>
1985 <ul>
1983 <li><a href="/shortlog">log</a></li>
1986 <li><a href="/shortlog">log</a></li>
1984 <li><a href="/graph">graph</a></li>
1987 <li><a href="/graph">graph</a></li>
1985 <li><a href="/tags">tags</a></li>
1988 <li><a href="/tags">tags</a></li>
1986 <li><a href="/bookmarks">bookmarks</a></li>
1989 <li><a href="/bookmarks">bookmarks</a></li>
1987 <li><a href="/branches">branches</a></li>
1990 <li><a href="/branches">branches</a></li>
1988 </ul>
1991 </ul>
1989 <ul>
1992 <ul>
1990 <li class="active">help</li>
1993 <li class="active">help</li>
1991 </ul>
1994 </ul>
1992 </div>
1995 </div>
1993
1996
1994 <div class="main">
1997 <div class="main">
1995 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1998 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1996
1999
1997 <form class="search" action="/log">
2000 <form class="search" action="/log">
1998
2001
1999 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2002 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2000 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2003 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2001 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2004 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2002 </form>
2005 </form>
2003 <table class="bigtable">
2006 <table class="bigtable">
2004 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2007 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2005
2008
2006 <tr><td>
2009 <tr><td>
2007 <a href="/help/bundlespec">
2010 <a href="/help/bundlespec">
2008 bundlespec
2011 bundlespec
2009 </a>
2012 </a>
2010 </td><td>
2013 </td><td>
2011 Bundle File Formats
2014 Bundle File Formats
2012 </td></tr>
2015 </td></tr>
2013 <tr><td>
2016 <tr><td>
2014 <a href="/help/color">
2017 <a href="/help/color">
2015 color
2018 color
2016 </a>
2019 </a>
2017 </td><td>
2020 </td><td>
2018 Colorizing Outputs
2021 Colorizing Outputs
2019 </td></tr>
2022 </td></tr>
2020 <tr><td>
2023 <tr><td>
2021 <a href="/help/config">
2024 <a href="/help/config">
2022 config
2025 config
2023 </a>
2026 </a>
2024 </td><td>
2027 </td><td>
2025 Configuration Files
2028 Configuration Files
2026 </td></tr>
2029 </td></tr>
2027 <tr><td>
2030 <tr><td>
2028 <a href="/help/dates">
2031 <a href="/help/dates">
2029 dates
2032 dates
2030 </a>
2033 </a>
2031 </td><td>
2034 </td><td>
2032 Date Formats
2035 Date Formats
2033 </td></tr>
2036 </td></tr>
2034 <tr><td>
2037 <tr><td>
2038 <a href="/help/deprecated">
2039 deprecated
2040 </a>
2041 </td><td>
2042 Deprecated Features
2043 </td></tr>
2044 <tr><td>
2035 <a href="/help/diffs">
2045 <a href="/help/diffs">
2036 diffs
2046 diffs
2037 </a>
2047 </a>
2038 </td><td>
2048 </td><td>
2039 Diff Formats
2049 Diff Formats
2040 </td></tr>
2050 </td></tr>
2041 <tr><td>
2051 <tr><td>
2042 <a href="/help/environment">
2052 <a href="/help/environment">
2043 environment
2053 environment
2044 </a>
2054 </a>
2045 </td><td>
2055 </td><td>
2046 Environment Variables
2056 Environment Variables
2047 </td></tr>
2057 </td></tr>
2048 <tr><td>
2058 <tr><td>
2049 <a href="/help/extensions">
2059 <a href="/help/extensions">
2050 extensions
2060 extensions
2051 </a>
2061 </a>
2052 </td><td>
2062 </td><td>
2053 Using Additional Features
2063 Using Additional Features
2054 </td></tr>
2064 </td></tr>
2055 <tr><td>
2065 <tr><td>
2056 <a href="/help/filesets">
2066 <a href="/help/filesets">
2057 filesets
2067 filesets
2058 </a>
2068 </a>
2059 </td><td>
2069 </td><td>
2060 Specifying File Sets
2070 Specifying File Sets
2061 </td></tr>
2071 </td></tr>
2062 <tr><td>
2072 <tr><td>
2063 <a href="/help/flags">
2073 <a href="/help/flags">
2064 flags
2074 flags
2065 </a>
2075 </a>
2066 </td><td>
2076 </td><td>
2067 Command-line flags
2077 Command-line flags
2068 </td></tr>
2078 </td></tr>
2069 <tr><td>
2079 <tr><td>
2070 <a href="/help/glossary">
2080 <a href="/help/glossary">
2071 glossary
2081 glossary
2072 </a>
2082 </a>
2073 </td><td>
2083 </td><td>
2074 Glossary
2084 Glossary
2075 </td></tr>
2085 </td></tr>
2076 <tr><td>
2086 <tr><td>
2077 <a href="/help/hgignore">
2087 <a href="/help/hgignore">
2078 hgignore
2088 hgignore
2079 </a>
2089 </a>
2080 </td><td>
2090 </td><td>
2081 Syntax for Mercurial Ignore Files
2091 Syntax for Mercurial Ignore Files
2082 </td></tr>
2092 </td></tr>
2083 <tr><td>
2093 <tr><td>
2084 <a href="/help/hgweb">
2094 <a href="/help/hgweb">
2085 hgweb
2095 hgweb
2086 </a>
2096 </a>
2087 </td><td>
2097 </td><td>
2088 Configuring hgweb
2098 Configuring hgweb
2089 </td></tr>
2099 </td></tr>
2090 <tr><td>
2100 <tr><td>
2091 <a href="/help/internals">
2101 <a href="/help/internals">
2092 internals
2102 internals
2093 </a>
2103 </a>
2094 </td><td>
2104 </td><td>
2095 Technical implementation topics
2105 Technical implementation topics
2096 </td></tr>
2106 </td></tr>
2097 <tr><td>
2107 <tr><td>
2098 <a href="/help/merge-tools">
2108 <a href="/help/merge-tools">
2099 merge-tools
2109 merge-tools
2100 </a>
2110 </a>
2101 </td><td>
2111 </td><td>
2102 Merge Tools
2112 Merge Tools
2103 </td></tr>
2113 </td></tr>
2104 <tr><td>
2114 <tr><td>
2105 <a href="/help/pager">
2115 <a href="/help/pager">
2106 pager
2116 pager
2107 </a>
2117 </a>
2108 </td><td>
2118 </td><td>
2109 Pager Support
2119 Pager Support
2110 </td></tr>
2120 </td></tr>
2111 <tr><td>
2121 <tr><td>
2112 <a href="/help/patterns">
2122 <a href="/help/patterns">
2113 patterns
2123 patterns
2114 </a>
2124 </a>
2115 </td><td>
2125 </td><td>
2116 File Name Patterns
2126 File Name Patterns
2117 </td></tr>
2127 </td></tr>
2118 <tr><td>
2128 <tr><td>
2119 <a href="/help/phases">
2129 <a href="/help/phases">
2120 phases
2130 phases
2121 </a>
2131 </a>
2122 </td><td>
2132 </td><td>
2123 Working with Phases
2133 Working with Phases
2124 </td></tr>
2134 </td></tr>
2125 <tr><td>
2135 <tr><td>
2126 <a href="/help/revisions">
2136 <a href="/help/revisions">
2127 revisions
2137 revisions
2128 </a>
2138 </a>
2129 </td><td>
2139 </td><td>
2130 Specifying Revisions
2140 Specifying Revisions
2131 </td></tr>
2141 </td></tr>
2132 <tr><td>
2142 <tr><td>
2133 <a href="/help/scripting">
2143 <a href="/help/scripting">
2134 scripting
2144 scripting
2135 </a>
2145 </a>
2136 </td><td>
2146 </td><td>
2137 Using Mercurial from scripts and automation
2147 Using Mercurial from scripts and automation
2138 </td></tr>
2148 </td></tr>
2139 <tr><td>
2149 <tr><td>
2140 <a href="/help/subrepos">
2150 <a href="/help/subrepos">
2141 subrepos
2151 subrepos
2142 </a>
2152 </a>
2143 </td><td>
2153 </td><td>
2144 Subrepositories
2154 Subrepositories
2145 </td></tr>
2155 </td></tr>
2146 <tr><td>
2156 <tr><td>
2147 <a href="/help/templating">
2157 <a href="/help/templating">
2148 templating
2158 templating
2149 </a>
2159 </a>
2150 </td><td>
2160 </td><td>
2151 Template Usage
2161 Template Usage
2152 </td></tr>
2162 </td></tr>
2153 <tr><td>
2163 <tr><td>
2154 <a href="/help/urls">
2164 <a href="/help/urls">
2155 urls
2165 urls
2156 </a>
2166 </a>
2157 </td><td>
2167 </td><td>
2158 URL Paths
2168 URL Paths
2159 </td></tr>
2169 </td></tr>
2160 <tr><td>
2170 <tr><td>
2161 <a href="/help/topic-containing-verbose">
2171 <a href="/help/topic-containing-verbose">
2162 topic-containing-verbose
2172 topic-containing-verbose
2163 </a>
2173 </a>
2164 </td><td>
2174 </td><td>
2165 This is the topic to test omit indicating.
2175 This is the topic to test omit indicating.
2166 </td></tr>
2176 </td></tr>
2167
2177
2168
2178
2169 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2179 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2170
2180
2171 <tr><td>
2181 <tr><td>
2172 <a href="/help/add">
2182 <a href="/help/add">
2173 add
2183 add
2174 </a>
2184 </a>
2175 </td><td>
2185 </td><td>
2176 add the specified files on the next commit
2186 add the specified files on the next commit
2177 </td></tr>
2187 </td></tr>
2178 <tr><td>
2188 <tr><td>
2179 <a href="/help/annotate">
2189 <a href="/help/annotate">
2180 annotate
2190 annotate
2181 </a>
2191 </a>
2182 </td><td>
2192 </td><td>
2183 show changeset information by line for each file
2193 show changeset information by line for each file
2184 </td></tr>
2194 </td></tr>
2185 <tr><td>
2195 <tr><td>
2186 <a href="/help/clone">
2196 <a href="/help/clone">
2187 clone
2197 clone
2188 </a>
2198 </a>
2189 </td><td>
2199 </td><td>
2190 make a copy of an existing repository
2200 make a copy of an existing repository
2191 </td></tr>
2201 </td></tr>
2192 <tr><td>
2202 <tr><td>
2193 <a href="/help/commit">
2203 <a href="/help/commit">
2194 commit
2204 commit
2195 </a>
2205 </a>
2196 </td><td>
2206 </td><td>
2197 commit the specified files or all outstanding changes
2207 commit the specified files or all outstanding changes
2198 </td></tr>
2208 </td></tr>
2199 <tr><td>
2209 <tr><td>
2200 <a href="/help/diff">
2210 <a href="/help/diff">
2201 diff
2211 diff
2202 </a>
2212 </a>
2203 </td><td>
2213 </td><td>
2204 diff repository (or selected files)
2214 diff repository (or selected files)
2205 </td></tr>
2215 </td></tr>
2206 <tr><td>
2216 <tr><td>
2207 <a href="/help/export">
2217 <a href="/help/export">
2208 export
2218 export
2209 </a>
2219 </a>
2210 </td><td>
2220 </td><td>
2211 dump the header and diffs for one or more changesets
2221 dump the header and diffs for one or more changesets
2212 </td></tr>
2222 </td></tr>
2213 <tr><td>
2223 <tr><td>
2214 <a href="/help/forget">
2224 <a href="/help/forget">
2215 forget
2225 forget
2216 </a>
2226 </a>
2217 </td><td>
2227 </td><td>
2218 forget the specified files on the next commit
2228 forget the specified files on the next commit
2219 </td></tr>
2229 </td></tr>
2220 <tr><td>
2230 <tr><td>
2221 <a href="/help/init">
2231 <a href="/help/init">
2222 init
2232 init
2223 </a>
2233 </a>
2224 </td><td>
2234 </td><td>
2225 create a new repository in the given directory
2235 create a new repository in the given directory
2226 </td></tr>
2236 </td></tr>
2227 <tr><td>
2237 <tr><td>
2228 <a href="/help/log">
2238 <a href="/help/log">
2229 log
2239 log
2230 </a>
2240 </a>
2231 </td><td>
2241 </td><td>
2232 show revision history of entire repository or files
2242 show revision history of entire repository or files
2233 </td></tr>
2243 </td></tr>
2234 <tr><td>
2244 <tr><td>
2235 <a href="/help/merge">
2245 <a href="/help/merge">
2236 merge
2246 merge
2237 </a>
2247 </a>
2238 </td><td>
2248 </td><td>
2239 merge another revision into working directory
2249 merge another revision into working directory
2240 </td></tr>
2250 </td></tr>
2241 <tr><td>
2251 <tr><td>
2242 <a href="/help/pull">
2252 <a href="/help/pull">
2243 pull
2253 pull
2244 </a>
2254 </a>
2245 </td><td>
2255 </td><td>
2246 pull changes from the specified source
2256 pull changes from the specified source
2247 </td></tr>
2257 </td></tr>
2248 <tr><td>
2258 <tr><td>
2249 <a href="/help/push">
2259 <a href="/help/push">
2250 push
2260 push
2251 </a>
2261 </a>
2252 </td><td>
2262 </td><td>
2253 push changes to the specified destination
2263 push changes to the specified destination
2254 </td></tr>
2264 </td></tr>
2255 <tr><td>
2265 <tr><td>
2256 <a href="/help/remove">
2266 <a href="/help/remove">
2257 remove
2267 remove
2258 </a>
2268 </a>
2259 </td><td>
2269 </td><td>
2260 remove the specified files on the next commit
2270 remove the specified files on the next commit
2261 </td></tr>
2271 </td></tr>
2262 <tr><td>
2272 <tr><td>
2263 <a href="/help/serve">
2273 <a href="/help/serve">
2264 serve
2274 serve
2265 </a>
2275 </a>
2266 </td><td>
2276 </td><td>
2267 start stand-alone webserver
2277 start stand-alone webserver
2268 </td></tr>
2278 </td></tr>
2269 <tr><td>
2279 <tr><td>
2270 <a href="/help/status">
2280 <a href="/help/status">
2271 status
2281 status
2272 </a>
2282 </a>
2273 </td><td>
2283 </td><td>
2274 show changed files in the working directory
2284 show changed files in the working directory
2275 </td></tr>
2285 </td></tr>
2276 <tr><td>
2286 <tr><td>
2277 <a href="/help/summary">
2287 <a href="/help/summary">
2278 summary
2288 summary
2279 </a>
2289 </a>
2280 </td><td>
2290 </td><td>
2281 summarize working directory state
2291 summarize working directory state
2282 </td></tr>
2292 </td></tr>
2283 <tr><td>
2293 <tr><td>
2284 <a href="/help/update">
2294 <a href="/help/update">
2285 update
2295 update
2286 </a>
2296 </a>
2287 </td><td>
2297 </td><td>
2288 update working directory (or switch revisions)
2298 update working directory (or switch revisions)
2289 </td></tr>
2299 </td></tr>
2290
2300
2291
2301
2292
2302
2293 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2303 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2294
2304
2295 <tr><td>
2305 <tr><td>
2296 <a href="/help/addremove">
2306 <a href="/help/addremove">
2297 addremove
2307 addremove
2298 </a>
2308 </a>
2299 </td><td>
2309 </td><td>
2300 add all new files, delete all missing files
2310 add all new files, delete all missing files
2301 </td></tr>
2311 </td></tr>
2302 <tr><td>
2312 <tr><td>
2303 <a href="/help/archive">
2313 <a href="/help/archive">
2304 archive
2314 archive
2305 </a>
2315 </a>
2306 </td><td>
2316 </td><td>
2307 create an unversioned archive of a repository revision
2317 create an unversioned archive of a repository revision
2308 </td></tr>
2318 </td></tr>
2309 <tr><td>
2319 <tr><td>
2310 <a href="/help/backout">
2320 <a href="/help/backout">
2311 backout
2321 backout
2312 </a>
2322 </a>
2313 </td><td>
2323 </td><td>
2314 reverse effect of earlier changeset
2324 reverse effect of earlier changeset
2315 </td></tr>
2325 </td></tr>
2316 <tr><td>
2326 <tr><td>
2317 <a href="/help/bisect">
2327 <a href="/help/bisect">
2318 bisect
2328 bisect
2319 </a>
2329 </a>
2320 </td><td>
2330 </td><td>
2321 subdivision search of changesets
2331 subdivision search of changesets
2322 </td></tr>
2332 </td></tr>
2323 <tr><td>
2333 <tr><td>
2324 <a href="/help/bookmarks">
2334 <a href="/help/bookmarks">
2325 bookmarks
2335 bookmarks
2326 </a>
2336 </a>
2327 </td><td>
2337 </td><td>
2328 create a new bookmark or list existing bookmarks
2338 create a new bookmark or list existing bookmarks
2329 </td></tr>
2339 </td></tr>
2330 <tr><td>
2340 <tr><td>
2331 <a href="/help/branch">
2341 <a href="/help/branch">
2332 branch
2342 branch
2333 </a>
2343 </a>
2334 </td><td>
2344 </td><td>
2335 set or show the current branch name
2345 set or show the current branch name
2336 </td></tr>
2346 </td></tr>
2337 <tr><td>
2347 <tr><td>
2338 <a href="/help/branches">
2348 <a href="/help/branches">
2339 branches
2349 branches
2340 </a>
2350 </a>
2341 </td><td>
2351 </td><td>
2342 list repository named branches
2352 list repository named branches
2343 </td></tr>
2353 </td></tr>
2344 <tr><td>
2354 <tr><td>
2345 <a href="/help/bundle">
2355 <a href="/help/bundle">
2346 bundle
2356 bundle
2347 </a>
2357 </a>
2348 </td><td>
2358 </td><td>
2349 create a bundle file
2359 create a bundle file
2350 </td></tr>
2360 </td></tr>
2351 <tr><td>
2361 <tr><td>
2352 <a href="/help/cat">
2362 <a href="/help/cat">
2353 cat
2363 cat
2354 </a>
2364 </a>
2355 </td><td>
2365 </td><td>
2356 output the current or given revision of files
2366 output the current or given revision of files
2357 </td></tr>
2367 </td></tr>
2358 <tr><td>
2368 <tr><td>
2359 <a href="/help/config">
2369 <a href="/help/config">
2360 config
2370 config
2361 </a>
2371 </a>
2362 </td><td>
2372 </td><td>
2363 show combined config settings from all hgrc files
2373 show combined config settings from all hgrc files
2364 </td></tr>
2374 </td></tr>
2365 <tr><td>
2375 <tr><td>
2366 <a href="/help/copy">
2376 <a href="/help/copy">
2367 copy
2377 copy
2368 </a>
2378 </a>
2369 </td><td>
2379 </td><td>
2370 mark files as copied for the next commit
2380 mark files as copied for the next commit
2371 </td></tr>
2381 </td></tr>
2372 <tr><td>
2382 <tr><td>
2373 <a href="/help/files">
2383 <a href="/help/files">
2374 files
2384 files
2375 </a>
2385 </a>
2376 </td><td>
2386 </td><td>
2377 list tracked files
2387 list tracked files
2378 </td></tr>
2388 </td></tr>
2379 <tr><td>
2389 <tr><td>
2380 <a href="/help/graft">
2390 <a href="/help/graft">
2381 graft
2391 graft
2382 </a>
2392 </a>
2383 </td><td>
2393 </td><td>
2384 copy changes from other branches onto the current branch
2394 copy changes from other branches onto the current branch
2385 </td></tr>
2395 </td></tr>
2386 <tr><td>
2396 <tr><td>
2387 <a href="/help/grep">
2397 <a href="/help/grep">
2388 grep
2398 grep
2389 </a>
2399 </a>
2390 </td><td>
2400 </td><td>
2391 search revision history for a pattern in specified files
2401 search revision history for a pattern in specified files
2392 </td></tr>
2402 </td></tr>
2393 <tr><td>
2403 <tr><td>
2394 <a href="/help/heads">
2404 <a href="/help/heads">
2395 heads
2405 heads
2396 </a>
2406 </a>
2397 </td><td>
2407 </td><td>
2398 show branch heads
2408 show branch heads
2399 </td></tr>
2409 </td></tr>
2400 <tr><td>
2410 <tr><td>
2401 <a href="/help/help">
2411 <a href="/help/help">
2402 help
2412 help
2403 </a>
2413 </a>
2404 </td><td>
2414 </td><td>
2405 show help for a given topic or a help overview
2415 show help for a given topic or a help overview
2406 </td></tr>
2416 </td></tr>
2407 <tr><td>
2417 <tr><td>
2408 <a href="/help/hgalias">
2418 <a href="/help/hgalias">
2409 hgalias
2419 hgalias
2410 </a>
2420 </a>
2411 </td><td>
2421 </td><td>
2412 summarize working directory state
2422 summarize working directory state
2413 </td></tr>
2423 </td></tr>
2414 <tr><td>
2424 <tr><td>
2415 <a href="/help/identify">
2425 <a href="/help/identify">
2416 identify
2426 identify
2417 </a>
2427 </a>
2418 </td><td>
2428 </td><td>
2419 identify the working directory or specified revision
2429 identify the working directory or specified revision
2420 </td></tr>
2430 </td></tr>
2421 <tr><td>
2431 <tr><td>
2422 <a href="/help/import">
2432 <a href="/help/import">
2423 import
2433 import
2424 </a>
2434 </a>
2425 </td><td>
2435 </td><td>
2426 import an ordered set of patches
2436 import an ordered set of patches
2427 </td></tr>
2437 </td></tr>
2428 <tr><td>
2438 <tr><td>
2429 <a href="/help/incoming">
2439 <a href="/help/incoming">
2430 incoming
2440 incoming
2431 </a>
2441 </a>
2432 </td><td>
2442 </td><td>
2433 show new changesets found in source
2443 show new changesets found in source
2434 </td></tr>
2444 </td></tr>
2435 <tr><td>
2445 <tr><td>
2436 <a href="/help/manifest">
2446 <a href="/help/manifest">
2437 manifest
2447 manifest
2438 </a>
2448 </a>
2439 </td><td>
2449 </td><td>
2440 output the current or given revision of the project manifest
2450 output the current or given revision of the project manifest
2441 </td></tr>
2451 </td></tr>
2442 <tr><td>
2452 <tr><td>
2443 <a href="/help/nohelp">
2453 <a href="/help/nohelp">
2444 nohelp
2454 nohelp
2445 </a>
2455 </a>
2446 </td><td>
2456 </td><td>
2447 (no help text available)
2457 (no help text available)
2448 </td></tr>
2458 </td></tr>
2449 <tr><td>
2459 <tr><td>
2450 <a href="/help/outgoing">
2460 <a href="/help/outgoing">
2451 outgoing
2461 outgoing
2452 </a>
2462 </a>
2453 </td><td>
2463 </td><td>
2454 show changesets not found in the destination
2464 show changesets not found in the destination
2455 </td></tr>
2465 </td></tr>
2456 <tr><td>
2466 <tr><td>
2457 <a href="/help/paths">
2467 <a href="/help/paths">
2458 paths
2468 paths
2459 </a>
2469 </a>
2460 </td><td>
2470 </td><td>
2461 show aliases for remote repositories
2471 show aliases for remote repositories
2462 </td></tr>
2472 </td></tr>
2463 <tr><td>
2473 <tr><td>
2464 <a href="/help/phase">
2474 <a href="/help/phase">
2465 phase
2475 phase
2466 </a>
2476 </a>
2467 </td><td>
2477 </td><td>
2468 set or show the current phase name
2478 set or show the current phase name
2469 </td></tr>
2479 </td></tr>
2470 <tr><td>
2480 <tr><td>
2471 <a href="/help/recover">
2481 <a href="/help/recover">
2472 recover
2482 recover
2473 </a>
2483 </a>
2474 </td><td>
2484 </td><td>
2475 roll back an interrupted transaction
2485 roll back an interrupted transaction
2476 </td></tr>
2486 </td></tr>
2477 <tr><td>
2487 <tr><td>
2478 <a href="/help/rename">
2488 <a href="/help/rename">
2479 rename
2489 rename
2480 </a>
2490 </a>
2481 </td><td>
2491 </td><td>
2482 rename files; equivalent of copy + remove
2492 rename files; equivalent of copy + remove
2483 </td></tr>
2493 </td></tr>
2484 <tr><td>
2494 <tr><td>
2485 <a href="/help/resolve">
2495 <a href="/help/resolve">
2486 resolve
2496 resolve
2487 </a>
2497 </a>
2488 </td><td>
2498 </td><td>
2489 redo merges or set/view the merge status of files
2499 redo merges or set/view the merge status of files
2490 </td></tr>
2500 </td></tr>
2491 <tr><td>
2501 <tr><td>
2492 <a href="/help/revert">
2502 <a href="/help/revert">
2493 revert
2503 revert
2494 </a>
2504 </a>
2495 </td><td>
2505 </td><td>
2496 restore files to their checkout state
2506 restore files to their checkout state
2497 </td></tr>
2507 </td></tr>
2498 <tr><td>
2508 <tr><td>
2499 <a href="/help/root">
2509 <a href="/help/root">
2500 root
2510 root
2501 </a>
2511 </a>
2502 </td><td>
2512 </td><td>
2503 print the root (top) of the current working directory
2513 print the root (top) of the current working directory
2504 </td></tr>
2514 </td></tr>
2505 <tr><td>
2515 <tr><td>
2506 <a href="/help/shellalias">
2516 <a href="/help/shellalias">
2507 shellalias
2517 shellalias
2508 </a>
2518 </a>
2509 </td><td>
2519 </td><td>
2510 (no help text available)
2520 (no help text available)
2511 </td></tr>
2521 </td></tr>
2512 <tr><td>
2522 <tr><td>
2513 <a href="/help/tag">
2523 <a href="/help/tag">
2514 tag
2524 tag
2515 </a>
2525 </a>
2516 </td><td>
2526 </td><td>
2517 add one or more tags for the current or given revision
2527 add one or more tags for the current or given revision
2518 </td></tr>
2528 </td></tr>
2519 <tr><td>
2529 <tr><td>
2520 <a href="/help/tags">
2530 <a href="/help/tags">
2521 tags
2531 tags
2522 </a>
2532 </a>
2523 </td><td>
2533 </td><td>
2524 list repository tags
2534 list repository tags
2525 </td></tr>
2535 </td></tr>
2526 <tr><td>
2536 <tr><td>
2527 <a href="/help/unbundle">
2537 <a href="/help/unbundle">
2528 unbundle
2538 unbundle
2529 </a>
2539 </a>
2530 </td><td>
2540 </td><td>
2531 apply one or more bundle files
2541 apply one or more bundle files
2532 </td></tr>
2542 </td></tr>
2533 <tr><td>
2543 <tr><td>
2534 <a href="/help/verify">
2544 <a href="/help/verify">
2535 verify
2545 verify
2536 </a>
2546 </a>
2537 </td><td>
2547 </td><td>
2538 verify the integrity of the repository
2548 verify the integrity of the repository
2539 </td></tr>
2549 </td></tr>
2540 <tr><td>
2550 <tr><td>
2541 <a href="/help/version">
2551 <a href="/help/version">
2542 version
2552 version
2543 </a>
2553 </a>
2544 </td><td>
2554 </td><td>
2545 output version and copyright information
2555 output version and copyright information
2546 </td></tr>
2556 </td></tr>
2547
2557
2548
2558
2549 </table>
2559 </table>
2550 </div>
2560 </div>
2551 </div>
2561 </div>
2552
2562
2553
2563
2554
2564
2555 </body>
2565 </body>
2556 </html>
2566 </html>
2557
2567
2558
2568
2559 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2569 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2560 200 Script output follows
2570 200 Script output follows
2561
2571
2562 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2572 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2563 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2573 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2564 <head>
2574 <head>
2565 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2575 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2566 <meta name="robots" content="index, nofollow" />
2576 <meta name="robots" content="index, nofollow" />
2567 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2577 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2568 <script type="text/javascript" src="/static/mercurial.js"></script>
2578 <script type="text/javascript" src="/static/mercurial.js"></script>
2569
2579
2570 <title>Help: add</title>
2580 <title>Help: add</title>
2571 </head>
2581 </head>
2572 <body>
2582 <body>
2573
2583
2574 <div class="container">
2584 <div class="container">
2575 <div class="menu">
2585 <div class="menu">
2576 <div class="logo">
2586 <div class="logo">
2577 <a href="https://mercurial-scm.org/">
2587 <a href="https://mercurial-scm.org/">
2578 <img src="/static/hglogo.png" alt="mercurial" /></a>
2588 <img src="/static/hglogo.png" alt="mercurial" /></a>
2579 </div>
2589 </div>
2580 <ul>
2590 <ul>
2581 <li><a href="/shortlog">log</a></li>
2591 <li><a href="/shortlog">log</a></li>
2582 <li><a href="/graph">graph</a></li>
2592 <li><a href="/graph">graph</a></li>
2583 <li><a href="/tags">tags</a></li>
2593 <li><a href="/tags">tags</a></li>
2584 <li><a href="/bookmarks">bookmarks</a></li>
2594 <li><a href="/bookmarks">bookmarks</a></li>
2585 <li><a href="/branches">branches</a></li>
2595 <li><a href="/branches">branches</a></li>
2586 </ul>
2596 </ul>
2587 <ul>
2597 <ul>
2588 <li class="active"><a href="/help">help</a></li>
2598 <li class="active"><a href="/help">help</a></li>
2589 </ul>
2599 </ul>
2590 </div>
2600 </div>
2591
2601
2592 <div class="main">
2602 <div class="main">
2593 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2603 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2594 <h3>Help: add</h3>
2604 <h3>Help: add</h3>
2595
2605
2596 <form class="search" action="/log">
2606 <form class="search" action="/log">
2597
2607
2598 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2608 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2599 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2609 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2600 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2610 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2601 </form>
2611 </form>
2602 <div id="doc">
2612 <div id="doc">
2603 <p>
2613 <p>
2604 hg add [OPTION]... [FILE]...
2614 hg add [OPTION]... [FILE]...
2605 </p>
2615 </p>
2606 <p>
2616 <p>
2607 add the specified files on the next commit
2617 add the specified files on the next commit
2608 </p>
2618 </p>
2609 <p>
2619 <p>
2610 Schedule files to be version controlled and added to the
2620 Schedule files to be version controlled and added to the
2611 repository.
2621 repository.
2612 </p>
2622 </p>
2613 <p>
2623 <p>
2614 The files will be added to the repository at the next commit. To
2624 The files will be added to the repository at the next commit. To
2615 undo an add before that, see 'hg forget'.
2625 undo an add before that, see 'hg forget'.
2616 </p>
2626 </p>
2617 <p>
2627 <p>
2618 If no names are given, add all files to the repository (except
2628 If no names are given, add all files to the repository (except
2619 files matching &quot;.hgignore&quot;).
2629 files matching &quot;.hgignore&quot;).
2620 </p>
2630 </p>
2621 <p>
2631 <p>
2622 Examples:
2632 Examples:
2623 </p>
2633 </p>
2624 <ul>
2634 <ul>
2625 <li> New (unknown) files are added automatically by 'hg add':
2635 <li> New (unknown) files are added automatically by 'hg add':
2626 <pre>
2636 <pre>
2627 \$ ls (re)
2637 \$ ls (re)
2628 foo.c
2638 foo.c
2629 \$ hg status (re)
2639 \$ hg status (re)
2630 ? foo.c
2640 ? foo.c
2631 \$ hg add (re)
2641 \$ hg add (re)
2632 adding foo.c
2642 adding foo.c
2633 \$ hg status (re)
2643 \$ hg status (re)
2634 A foo.c
2644 A foo.c
2635 </pre>
2645 </pre>
2636 <li> Specific files to be added can be specified:
2646 <li> Specific files to be added can be specified:
2637 <pre>
2647 <pre>
2638 \$ ls (re)
2648 \$ ls (re)
2639 bar.c foo.c
2649 bar.c foo.c
2640 \$ hg status (re)
2650 \$ hg status (re)
2641 ? bar.c
2651 ? bar.c
2642 ? foo.c
2652 ? foo.c
2643 \$ hg add bar.c (re)
2653 \$ hg add bar.c (re)
2644 \$ hg status (re)
2654 \$ hg status (re)
2645 A bar.c
2655 A bar.c
2646 ? foo.c
2656 ? foo.c
2647 </pre>
2657 </pre>
2648 </ul>
2658 </ul>
2649 <p>
2659 <p>
2650 Returns 0 if all files are successfully added.
2660 Returns 0 if all files are successfully added.
2651 </p>
2661 </p>
2652 <p>
2662 <p>
2653 options ([+] can be repeated):
2663 options ([+] can be repeated):
2654 </p>
2664 </p>
2655 <table>
2665 <table>
2656 <tr><td>-I</td>
2666 <tr><td>-I</td>
2657 <td>--include PATTERN [+]</td>
2667 <td>--include PATTERN [+]</td>
2658 <td>include names matching the given patterns</td></tr>
2668 <td>include names matching the given patterns</td></tr>
2659 <tr><td>-X</td>
2669 <tr><td>-X</td>
2660 <td>--exclude PATTERN [+]</td>
2670 <td>--exclude PATTERN [+]</td>
2661 <td>exclude names matching the given patterns</td></tr>
2671 <td>exclude names matching the given patterns</td></tr>
2662 <tr><td>-S</td>
2672 <tr><td>-S</td>
2663 <td>--subrepos</td>
2673 <td>--subrepos</td>
2664 <td>recurse into subrepositories</td></tr>
2674 <td>recurse into subrepositories</td></tr>
2665 <tr><td>-n</td>
2675 <tr><td>-n</td>
2666 <td>--dry-run</td>
2676 <td>--dry-run</td>
2667 <td>do not perform actions, just print output</td></tr>
2677 <td>do not perform actions, just print output</td></tr>
2668 </table>
2678 </table>
2669 <p>
2679 <p>
2670 global options ([+] can be repeated):
2680 global options ([+] can be repeated):
2671 </p>
2681 </p>
2672 <table>
2682 <table>
2673 <tr><td>-R</td>
2683 <tr><td>-R</td>
2674 <td>--repository REPO</td>
2684 <td>--repository REPO</td>
2675 <td>repository root directory or name of overlay bundle file</td></tr>
2685 <td>repository root directory or name of overlay bundle file</td></tr>
2676 <tr><td></td>
2686 <tr><td></td>
2677 <td>--cwd DIR</td>
2687 <td>--cwd DIR</td>
2678 <td>change working directory</td></tr>
2688 <td>change working directory</td></tr>
2679 <tr><td>-y</td>
2689 <tr><td>-y</td>
2680 <td>--noninteractive</td>
2690 <td>--noninteractive</td>
2681 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2691 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2682 <tr><td>-q</td>
2692 <tr><td>-q</td>
2683 <td>--quiet</td>
2693 <td>--quiet</td>
2684 <td>suppress output</td></tr>
2694 <td>suppress output</td></tr>
2685 <tr><td>-v</td>
2695 <tr><td>-v</td>
2686 <td>--verbose</td>
2696 <td>--verbose</td>
2687 <td>enable additional output</td></tr>
2697 <td>enable additional output</td></tr>
2688 <tr><td></td>
2698 <tr><td></td>
2689 <td>--color TYPE</td>
2699 <td>--color TYPE</td>
2690 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2700 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2691 <tr><td></td>
2701 <tr><td></td>
2692 <td>--config CONFIG [+]</td>
2702 <td>--config CONFIG [+]</td>
2693 <td>set/override config option (use 'section.name=value')</td></tr>
2703 <td>set/override config option (use 'section.name=value')</td></tr>
2694 <tr><td></td>
2704 <tr><td></td>
2695 <td>--debug</td>
2705 <td>--debug</td>
2696 <td>enable debugging output</td></tr>
2706 <td>enable debugging output</td></tr>
2697 <tr><td></td>
2707 <tr><td></td>
2698 <td>--debugger</td>
2708 <td>--debugger</td>
2699 <td>start debugger</td></tr>
2709 <td>start debugger</td></tr>
2700 <tr><td></td>
2710 <tr><td></td>
2701 <td>--encoding ENCODE</td>
2711 <td>--encoding ENCODE</td>
2702 <td>set the charset encoding (default: ascii)</td></tr>
2712 <td>set the charset encoding (default: ascii)</td></tr>
2703 <tr><td></td>
2713 <tr><td></td>
2704 <td>--encodingmode MODE</td>
2714 <td>--encodingmode MODE</td>
2705 <td>set the charset encoding mode (default: strict)</td></tr>
2715 <td>set the charset encoding mode (default: strict)</td></tr>
2706 <tr><td></td>
2716 <tr><td></td>
2707 <td>--traceback</td>
2717 <td>--traceback</td>
2708 <td>always print a traceback on exception</td></tr>
2718 <td>always print a traceback on exception</td></tr>
2709 <tr><td></td>
2719 <tr><td></td>
2710 <td>--time</td>
2720 <td>--time</td>
2711 <td>time how long the command takes</td></tr>
2721 <td>time how long the command takes</td></tr>
2712 <tr><td></td>
2722 <tr><td></td>
2713 <td>--profile</td>
2723 <td>--profile</td>
2714 <td>print command execution profile</td></tr>
2724 <td>print command execution profile</td></tr>
2715 <tr><td></td>
2725 <tr><td></td>
2716 <td>--version</td>
2726 <td>--version</td>
2717 <td>output version information and exit</td></tr>
2727 <td>output version information and exit</td></tr>
2718 <tr><td>-h</td>
2728 <tr><td>-h</td>
2719 <td>--help</td>
2729 <td>--help</td>
2720 <td>display help and exit</td></tr>
2730 <td>display help and exit</td></tr>
2721 <tr><td></td>
2731 <tr><td></td>
2722 <td>--hidden</td>
2732 <td>--hidden</td>
2723 <td>consider hidden changesets</td></tr>
2733 <td>consider hidden changesets</td></tr>
2724 <tr><td></td>
2734 <tr><td></td>
2725 <td>--pager TYPE</td>
2735 <td>--pager TYPE</td>
2726 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2736 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2727 </table>
2737 </table>
2728
2738
2729 </div>
2739 </div>
2730 </div>
2740 </div>
2731 </div>
2741 </div>
2732
2742
2733
2743
2734
2744
2735 </body>
2745 </body>
2736 </html>
2746 </html>
2737
2747
2738
2748
2739 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2749 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2740 200 Script output follows
2750 200 Script output follows
2741
2751
2742 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2752 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2743 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2753 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2744 <head>
2754 <head>
2745 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2755 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2746 <meta name="robots" content="index, nofollow" />
2756 <meta name="robots" content="index, nofollow" />
2747 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2757 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2748 <script type="text/javascript" src="/static/mercurial.js"></script>
2758 <script type="text/javascript" src="/static/mercurial.js"></script>
2749
2759
2750 <title>Help: remove</title>
2760 <title>Help: remove</title>
2751 </head>
2761 </head>
2752 <body>
2762 <body>
2753
2763
2754 <div class="container">
2764 <div class="container">
2755 <div class="menu">
2765 <div class="menu">
2756 <div class="logo">
2766 <div class="logo">
2757 <a href="https://mercurial-scm.org/">
2767 <a href="https://mercurial-scm.org/">
2758 <img src="/static/hglogo.png" alt="mercurial" /></a>
2768 <img src="/static/hglogo.png" alt="mercurial" /></a>
2759 </div>
2769 </div>
2760 <ul>
2770 <ul>
2761 <li><a href="/shortlog">log</a></li>
2771 <li><a href="/shortlog">log</a></li>
2762 <li><a href="/graph">graph</a></li>
2772 <li><a href="/graph">graph</a></li>
2763 <li><a href="/tags">tags</a></li>
2773 <li><a href="/tags">tags</a></li>
2764 <li><a href="/bookmarks">bookmarks</a></li>
2774 <li><a href="/bookmarks">bookmarks</a></li>
2765 <li><a href="/branches">branches</a></li>
2775 <li><a href="/branches">branches</a></li>
2766 </ul>
2776 </ul>
2767 <ul>
2777 <ul>
2768 <li class="active"><a href="/help">help</a></li>
2778 <li class="active"><a href="/help">help</a></li>
2769 </ul>
2779 </ul>
2770 </div>
2780 </div>
2771
2781
2772 <div class="main">
2782 <div class="main">
2773 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2783 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2774 <h3>Help: remove</h3>
2784 <h3>Help: remove</h3>
2775
2785
2776 <form class="search" action="/log">
2786 <form class="search" action="/log">
2777
2787
2778 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2788 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2779 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2789 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2780 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2790 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2781 </form>
2791 </form>
2782 <div id="doc">
2792 <div id="doc">
2783 <p>
2793 <p>
2784 hg remove [OPTION]... FILE...
2794 hg remove [OPTION]... FILE...
2785 </p>
2795 </p>
2786 <p>
2796 <p>
2787 aliases: rm
2797 aliases: rm
2788 </p>
2798 </p>
2789 <p>
2799 <p>
2790 remove the specified files on the next commit
2800 remove the specified files on the next commit
2791 </p>
2801 </p>
2792 <p>
2802 <p>
2793 Schedule the indicated files for removal from the current branch.
2803 Schedule the indicated files for removal from the current branch.
2794 </p>
2804 </p>
2795 <p>
2805 <p>
2796 This command schedules the files to be removed at the next commit.
2806 This command schedules the files to be removed at the next commit.
2797 To undo a remove before that, see 'hg revert'. To undo added
2807 To undo a remove before that, see 'hg revert'. To undo added
2798 files, see 'hg forget'.
2808 files, see 'hg forget'.
2799 </p>
2809 </p>
2800 <p>
2810 <p>
2801 -A/--after can be used to remove only files that have already
2811 -A/--after can be used to remove only files that have already
2802 been deleted, -f/--force can be used to force deletion, and -Af
2812 been deleted, -f/--force can be used to force deletion, and -Af
2803 can be used to remove files from the next revision without
2813 can be used to remove files from the next revision without
2804 deleting them from the working directory.
2814 deleting them from the working directory.
2805 </p>
2815 </p>
2806 <p>
2816 <p>
2807 The following table details the behavior of remove for different
2817 The following table details the behavior of remove for different
2808 file states (columns) and option combinations (rows). The file
2818 file states (columns) and option combinations (rows). The file
2809 states are Added [A], Clean [C], Modified [M] and Missing [!]
2819 states are Added [A], Clean [C], Modified [M] and Missing [!]
2810 (as reported by 'hg status'). The actions are Warn, Remove
2820 (as reported by 'hg status'). The actions are Warn, Remove
2811 (from branch) and Delete (from disk):
2821 (from branch) and Delete (from disk):
2812 </p>
2822 </p>
2813 <table>
2823 <table>
2814 <tr><td>opt/state</td>
2824 <tr><td>opt/state</td>
2815 <td>A</td>
2825 <td>A</td>
2816 <td>C</td>
2826 <td>C</td>
2817 <td>M</td>
2827 <td>M</td>
2818 <td>!</td></tr>
2828 <td>!</td></tr>
2819 <tr><td>none</td>
2829 <tr><td>none</td>
2820 <td>W</td>
2830 <td>W</td>
2821 <td>RD</td>
2831 <td>RD</td>
2822 <td>W</td>
2832 <td>W</td>
2823 <td>R</td></tr>
2833 <td>R</td></tr>
2824 <tr><td>-f</td>
2834 <tr><td>-f</td>
2825 <td>R</td>
2835 <td>R</td>
2826 <td>RD</td>
2836 <td>RD</td>
2827 <td>RD</td>
2837 <td>RD</td>
2828 <td>R</td></tr>
2838 <td>R</td></tr>
2829 <tr><td>-A</td>
2839 <tr><td>-A</td>
2830 <td>W</td>
2840 <td>W</td>
2831 <td>W</td>
2841 <td>W</td>
2832 <td>W</td>
2842 <td>W</td>
2833 <td>R</td></tr>
2843 <td>R</td></tr>
2834 <tr><td>-Af</td>
2844 <tr><td>-Af</td>
2835 <td>R</td>
2845 <td>R</td>
2836 <td>R</td>
2846 <td>R</td>
2837 <td>R</td>
2847 <td>R</td>
2838 <td>R</td></tr>
2848 <td>R</td></tr>
2839 </table>
2849 </table>
2840 <p>
2850 <p>
2841 <b>Note:</b>
2851 <b>Note:</b>
2842 </p>
2852 </p>
2843 <p>
2853 <p>
2844 'hg remove' never deletes files in Added [A] state from the
2854 'hg remove' never deletes files in Added [A] state from the
2845 working directory, not even if &quot;--force&quot; is specified.
2855 working directory, not even if &quot;--force&quot; is specified.
2846 </p>
2856 </p>
2847 <p>
2857 <p>
2848 Returns 0 on success, 1 if any warnings encountered.
2858 Returns 0 on success, 1 if any warnings encountered.
2849 </p>
2859 </p>
2850 <p>
2860 <p>
2851 options ([+] can be repeated):
2861 options ([+] can be repeated):
2852 </p>
2862 </p>
2853 <table>
2863 <table>
2854 <tr><td>-A</td>
2864 <tr><td>-A</td>
2855 <td>--after</td>
2865 <td>--after</td>
2856 <td>record delete for missing files</td></tr>
2866 <td>record delete for missing files</td></tr>
2857 <tr><td>-f</td>
2867 <tr><td>-f</td>
2858 <td>--force</td>
2868 <td>--force</td>
2859 <td>forget added files, delete modified files</td></tr>
2869 <td>forget added files, delete modified files</td></tr>
2860 <tr><td>-S</td>
2870 <tr><td>-S</td>
2861 <td>--subrepos</td>
2871 <td>--subrepos</td>
2862 <td>recurse into subrepositories</td></tr>
2872 <td>recurse into subrepositories</td></tr>
2863 <tr><td>-I</td>
2873 <tr><td>-I</td>
2864 <td>--include PATTERN [+]</td>
2874 <td>--include PATTERN [+]</td>
2865 <td>include names matching the given patterns</td></tr>
2875 <td>include names matching the given patterns</td></tr>
2866 <tr><td>-X</td>
2876 <tr><td>-X</td>
2867 <td>--exclude PATTERN [+]</td>
2877 <td>--exclude PATTERN [+]</td>
2868 <td>exclude names matching the given patterns</td></tr>
2878 <td>exclude names matching the given patterns</td></tr>
2869 <tr><td>-n</td>
2879 <tr><td>-n</td>
2870 <td>--dry-run</td>
2880 <td>--dry-run</td>
2871 <td>do not perform actions, just print output</td></tr>
2881 <td>do not perform actions, just print output</td></tr>
2872 </table>
2882 </table>
2873 <p>
2883 <p>
2874 global options ([+] can be repeated):
2884 global options ([+] can be repeated):
2875 </p>
2885 </p>
2876 <table>
2886 <table>
2877 <tr><td>-R</td>
2887 <tr><td>-R</td>
2878 <td>--repository REPO</td>
2888 <td>--repository REPO</td>
2879 <td>repository root directory or name of overlay bundle file</td></tr>
2889 <td>repository root directory or name of overlay bundle file</td></tr>
2880 <tr><td></td>
2890 <tr><td></td>
2881 <td>--cwd DIR</td>
2891 <td>--cwd DIR</td>
2882 <td>change working directory</td></tr>
2892 <td>change working directory</td></tr>
2883 <tr><td>-y</td>
2893 <tr><td>-y</td>
2884 <td>--noninteractive</td>
2894 <td>--noninteractive</td>
2885 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2895 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2886 <tr><td>-q</td>
2896 <tr><td>-q</td>
2887 <td>--quiet</td>
2897 <td>--quiet</td>
2888 <td>suppress output</td></tr>
2898 <td>suppress output</td></tr>
2889 <tr><td>-v</td>
2899 <tr><td>-v</td>
2890 <td>--verbose</td>
2900 <td>--verbose</td>
2891 <td>enable additional output</td></tr>
2901 <td>enable additional output</td></tr>
2892 <tr><td></td>
2902 <tr><td></td>
2893 <td>--color TYPE</td>
2903 <td>--color TYPE</td>
2894 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2904 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2895 <tr><td></td>
2905 <tr><td></td>
2896 <td>--config CONFIG [+]</td>
2906 <td>--config CONFIG [+]</td>
2897 <td>set/override config option (use 'section.name=value')</td></tr>
2907 <td>set/override config option (use 'section.name=value')</td></tr>
2898 <tr><td></td>
2908 <tr><td></td>
2899 <td>--debug</td>
2909 <td>--debug</td>
2900 <td>enable debugging output</td></tr>
2910 <td>enable debugging output</td></tr>
2901 <tr><td></td>
2911 <tr><td></td>
2902 <td>--debugger</td>
2912 <td>--debugger</td>
2903 <td>start debugger</td></tr>
2913 <td>start debugger</td></tr>
2904 <tr><td></td>
2914 <tr><td></td>
2905 <td>--encoding ENCODE</td>
2915 <td>--encoding ENCODE</td>
2906 <td>set the charset encoding (default: ascii)</td></tr>
2916 <td>set the charset encoding (default: ascii)</td></tr>
2907 <tr><td></td>
2917 <tr><td></td>
2908 <td>--encodingmode MODE</td>
2918 <td>--encodingmode MODE</td>
2909 <td>set the charset encoding mode (default: strict)</td></tr>
2919 <td>set the charset encoding mode (default: strict)</td></tr>
2910 <tr><td></td>
2920 <tr><td></td>
2911 <td>--traceback</td>
2921 <td>--traceback</td>
2912 <td>always print a traceback on exception</td></tr>
2922 <td>always print a traceback on exception</td></tr>
2913 <tr><td></td>
2923 <tr><td></td>
2914 <td>--time</td>
2924 <td>--time</td>
2915 <td>time how long the command takes</td></tr>
2925 <td>time how long the command takes</td></tr>
2916 <tr><td></td>
2926 <tr><td></td>
2917 <td>--profile</td>
2927 <td>--profile</td>
2918 <td>print command execution profile</td></tr>
2928 <td>print command execution profile</td></tr>
2919 <tr><td></td>
2929 <tr><td></td>
2920 <td>--version</td>
2930 <td>--version</td>
2921 <td>output version information and exit</td></tr>
2931 <td>output version information and exit</td></tr>
2922 <tr><td>-h</td>
2932 <tr><td>-h</td>
2923 <td>--help</td>
2933 <td>--help</td>
2924 <td>display help and exit</td></tr>
2934 <td>display help and exit</td></tr>
2925 <tr><td></td>
2935 <tr><td></td>
2926 <td>--hidden</td>
2936 <td>--hidden</td>
2927 <td>consider hidden changesets</td></tr>
2937 <td>consider hidden changesets</td></tr>
2928 <tr><td></td>
2938 <tr><td></td>
2929 <td>--pager TYPE</td>
2939 <td>--pager TYPE</td>
2930 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2940 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2931 </table>
2941 </table>
2932
2942
2933 </div>
2943 </div>
2934 </div>
2944 </div>
2935 </div>
2945 </div>
2936
2946
2937
2947
2938
2948
2939 </body>
2949 </body>
2940 </html>
2950 </html>
2941
2951
2942
2952
2943 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2953 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2944 200 Script output follows
2954 200 Script output follows
2945
2955
2946 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2956 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2947 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2957 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2948 <head>
2958 <head>
2949 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2959 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2950 <meta name="robots" content="index, nofollow" />
2960 <meta name="robots" content="index, nofollow" />
2951 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2961 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2952 <script type="text/javascript" src="/static/mercurial.js"></script>
2962 <script type="text/javascript" src="/static/mercurial.js"></script>
2953
2963
2954 <title>Help: dates</title>
2964 <title>Help: dates</title>
2955 </head>
2965 </head>
2956 <body>
2966 <body>
2957
2967
2958 <div class="container">
2968 <div class="container">
2959 <div class="menu">
2969 <div class="menu">
2960 <div class="logo">
2970 <div class="logo">
2961 <a href="https://mercurial-scm.org/">
2971 <a href="https://mercurial-scm.org/">
2962 <img src="/static/hglogo.png" alt="mercurial" /></a>
2972 <img src="/static/hglogo.png" alt="mercurial" /></a>
2963 </div>
2973 </div>
2964 <ul>
2974 <ul>
2965 <li><a href="/shortlog">log</a></li>
2975 <li><a href="/shortlog">log</a></li>
2966 <li><a href="/graph">graph</a></li>
2976 <li><a href="/graph">graph</a></li>
2967 <li><a href="/tags">tags</a></li>
2977 <li><a href="/tags">tags</a></li>
2968 <li><a href="/bookmarks">bookmarks</a></li>
2978 <li><a href="/bookmarks">bookmarks</a></li>
2969 <li><a href="/branches">branches</a></li>
2979 <li><a href="/branches">branches</a></li>
2970 </ul>
2980 </ul>
2971 <ul>
2981 <ul>
2972 <li class="active"><a href="/help">help</a></li>
2982 <li class="active"><a href="/help">help</a></li>
2973 </ul>
2983 </ul>
2974 </div>
2984 </div>
2975
2985
2976 <div class="main">
2986 <div class="main">
2977 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2987 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2978 <h3>Help: dates</h3>
2988 <h3>Help: dates</h3>
2979
2989
2980 <form class="search" action="/log">
2990 <form class="search" action="/log">
2981
2991
2982 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2992 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2983 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2993 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2984 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2994 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2985 </form>
2995 </form>
2986 <div id="doc">
2996 <div id="doc">
2987 <h1>Date Formats</h1>
2997 <h1>Date Formats</h1>
2988 <p>
2998 <p>
2989 Some commands allow the user to specify a date, e.g.:
2999 Some commands allow the user to specify a date, e.g.:
2990 </p>
3000 </p>
2991 <ul>
3001 <ul>
2992 <li> backout, commit, import, tag: Specify the commit date.
3002 <li> backout, commit, import, tag: Specify the commit date.
2993 <li> log, revert, update: Select revision(s) by date.
3003 <li> log, revert, update: Select revision(s) by date.
2994 </ul>
3004 </ul>
2995 <p>
3005 <p>
2996 Many date formats are valid. Here are some examples:
3006 Many date formats are valid. Here are some examples:
2997 </p>
3007 </p>
2998 <ul>
3008 <ul>
2999 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3009 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3000 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3010 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3001 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3011 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3002 <li> &quot;Dec 6&quot; (midnight)
3012 <li> &quot;Dec 6&quot; (midnight)
3003 <li> &quot;13:18&quot; (today assumed)
3013 <li> &quot;13:18&quot; (today assumed)
3004 <li> &quot;3:39&quot; (3:39AM assumed)
3014 <li> &quot;3:39&quot; (3:39AM assumed)
3005 <li> &quot;3:39pm&quot; (15:39)
3015 <li> &quot;3:39pm&quot; (15:39)
3006 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3016 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3007 <li> &quot;2006-12-6 13:18&quot;
3017 <li> &quot;2006-12-6 13:18&quot;
3008 <li> &quot;2006-12-6&quot;
3018 <li> &quot;2006-12-6&quot;
3009 <li> &quot;12-6&quot;
3019 <li> &quot;12-6&quot;
3010 <li> &quot;12/6&quot;
3020 <li> &quot;12/6&quot;
3011 <li> &quot;12/6/6&quot; (Dec 6 2006)
3021 <li> &quot;12/6/6&quot; (Dec 6 2006)
3012 <li> &quot;today&quot; (midnight)
3022 <li> &quot;today&quot; (midnight)
3013 <li> &quot;yesterday&quot; (midnight)
3023 <li> &quot;yesterday&quot; (midnight)
3014 <li> &quot;now&quot; - right now
3024 <li> &quot;now&quot; - right now
3015 </ul>
3025 </ul>
3016 <p>
3026 <p>
3017 Lastly, there is Mercurial's internal format:
3027 Lastly, there is Mercurial's internal format:
3018 </p>
3028 </p>
3019 <ul>
3029 <ul>
3020 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3030 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3021 </ul>
3031 </ul>
3022 <p>
3032 <p>
3023 This is the internal representation format for dates. The first number
3033 This is the internal representation format for dates. The first number
3024 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3034 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3025 second is the offset of the local timezone, in seconds west of UTC
3035 second is the offset of the local timezone, in seconds west of UTC
3026 (negative if the timezone is east of UTC).
3036 (negative if the timezone is east of UTC).
3027 </p>
3037 </p>
3028 <p>
3038 <p>
3029 The log command also accepts date ranges:
3039 The log command also accepts date ranges:
3030 </p>
3040 </p>
3031 <ul>
3041 <ul>
3032 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3042 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3033 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3043 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3034 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3044 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3035 <li> &quot;-DAYS&quot; - within a given number of days of today
3045 <li> &quot;-DAYS&quot; - within a given number of days of today
3036 </ul>
3046 </ul>
3037
3047
3038 </div>
3048 </div>
3039 </div>
3049 </div>
3040 </div>
3050 </div>
3041
3051
3042
3052
3043
3053
3044 </body>
3054 </body>
3045 </html>
3055 </html>
3046
3056
3047
3057
3048 Sub-topic indexes rendered properly
3058 Sub-topic indexes rendered properly
3049
3059
3050 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3060 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3051 200 Script output follows
3061 200 Script output follows
3052
3062
3053 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3063 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3054 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3064 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3055 <head>
3065 <head>
3056 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3066 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3057 <meta name="robots" content="index, nofollow" />
3067 <meta name="robots" content="index, nofollow" />
3058 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3068 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3059 <script type="text/javascript" src="/static/mercurial.js"></script>
3069 <script type="text/javascript" src="/static/mercurial.js"></script>
3060
3070
3061 <title>Help: internals</title>
3071 <title>Help: internals</title>
3062 </head>
3072 </head>
3063 <body>
3073 <body>
3064
3074
3065 <div class="container">
3075 <div class="container">
3066 <div class="menu">
3076 <div class="menu">
3067 <div class="logo">
3077 <div class="logo">
3068 <a href="https://mercurial-scm.org/">
3078 <a href="https://mercurial-scm.org/">
3069 <img src="/static/hglogo.png" alt="mercurial" /></a>
3079 <img src="/static/hglogo.png" alt="mercurial" /></a>
3070 </div>
3080 </div>
3071 <ul>
3081 <ul>
3072 <li><a href="/shortlog">log</a></li>
3082 <li><a href="/shortlog">log</a></li>
3073 <li><a href="/graph">graph</a></li>
3083 <li><a href="/graph">graph</a></li>
3074 <li><a href="/tags">tags</a></li>
3084 <li><a href="/tags">tags</a></li>
3075 <li><a href="/bookmarks">bookmarks</a></li>
3085 <li><a href="/bookmarks">bookmarks</a></li>
3076 <li><a href="/branches">branches</a></li>
3086 <li><a href="/branches">branches</a></li>
3077 </ul>
3087 </ul>
3078 <ul>
3088 <ul>
3079 <li><a href="/help">help</a></li>
3089 <li><a href="/help">help</a></li>
3080 </ul>
3090 </ul>
3081 </div>
3091 </div>
3082
3092
3083 <div class="main">
3093 <div class="main">
3084 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3094 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3085
3095
3086 <form class="search" action="/log">
3096 <form class="search" action="/log">
3087
3097
3088 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3098 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3089 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3099 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3090 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3100 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3091 </form>
3101 </form>
3092 <table class="bigtable">
3102 <table class="bigtable">
3093 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3103 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3094
3104
3095 <tr><td>
3105 <tr><td>
3096 <a href="/help/internals.bundle2">
3106 <a href="/help/internals.bundle2">
3097 bundle2
3107 bundle2
3098 </a>
3108 </a>
3099 </td><td>
3109 </td><td>
3100 Bundle2
3110 Bundle2
3101 </td></tr>
3111 </td></tr>
3102 <tr><td>
3112 <tr><td>
3103 <a href="/help/internals.bundles">
3113 <a href="/help/internals.bundles">
3104 bundles
3114 bundles
3105 </a>
3115 </a>
3106 </td><td>
3116 </td><td>
3107 Bundles
3117 Bundles
3108 </td></tr>
3118 </td></tr>
3109 <tr><td>
3119 <tr><td>
3110 <a href="/help/internals.censor">
3120 <a href="/help/internals.censor">
3111 censor
3121 censor
3112 </a>
3122 </a>
3113 </td><td>
3123 </td><td>
3114 Censor
3124 Censor
3115 </td></tr>
3125 </td></tr>
3116 <tr><td>
3126 <tr><td>
3117 <a href="/help/internals.changegroups">
3127 <a href="/help/internals.changegroups">
3118 changegroups
3128 changegroups
3119 </a>
3129 </a>
3120 </td><td>
3130 </td><td>
3121 Changegroups
3131 Changegroups
3122 </td></tr>
3132 </td></tr>
3123 <tr><td>
3133 <tr><td>
3124 <a href="/help/internals.config">
3134 <a href="/help/internals.config">
3125 config
3135 config
3126 </a>
3136 </a>
3127 </td><td>
3137 </td><td>
3128 Config Registrar
3138 Config Registrar
3129 </td></tr>
3139 </td></tr>
3130 <tr><td>
3140 <tr><td>
3131 <a href="/help/internals.requirements">
3141 <a href="/help/internals.requirements">
3132 requirements
3142 requirements
3133 </a>
3143 </a>
3134 </td><td>
3144 </td><td>
3135 Repository Requirements
3145 Repository Requirements
3136 </td></tr>
3146 </td></tr>
3137 <tr><td>
3147 <tr><td>
3138 <a href="/help/internals.revlogs">
3148 <a href="/help/internals.revlogs">
3139 revlogs
3149 revlogs
3140 </a>
3150 </a>
3141 </td><td>
3151 </td><td>
3142 Revision Logs
3152 Revision Logs
3143 </td></tr>
3153 </td></tr>
3144 <tr><td>
3154 <tr><td>
3145 <a href="/help/internals.wireprotocol">
3155 <a href="/help/internals.wireprotocol">
3146 wireprotocol
3156 wireprotocol
3147 </a>
3157 </a>
3148 </td><td>
3158 </td><td>
3149 Wire Protocol
3159 Wire Protocol
3150 </td></tr>
3160 </td></tr>
3151
3161
3152
3162
3153
3163
3154
3164
3155
3165
3156 </table>
3166 </table>
3157 </div>
3167 </div>
3158 </div>
3168 </div>
3159
3169
3160
3170
3161
3171
3162 </body>
3172 </body>
3163 </html>
3173 </html>
3164
3174
3165
3175
3166 Sub-topic topics rendered properly
3176 Sub-topic topics rendered properly
3167
3177
3168 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3178 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3169 200 Script output follows
3179 200 Script output follows
3170
3180
3171 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3181 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3172 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3182 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3173 <head>
3183 <head>
3174 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3184 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3175 <meta name="robots" content="index, nofollow" />
3185 <meta name="robots" content="index, nofollow" />
3176 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3186 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3177 <script type="text/javascript" src="/static/mercurial.js"></script>
3187 <script type="text/javascript" src="/static/mercurial.js"></script>
3178
3188
3179 <title>Help: internals.changegroups</title>
3189 <title>Help: internals.changegroups</title>
3180 </head>
3190 </head>
3181 <body>
3191 <body>
3182
3192
3183 <div class="container">
3193 <div class="container">
3184 <div class="menu">
3194 <div class="menu">
3185 <div class="logo">
3195 <div class="logo">
3186 <a href="https://mercurial-scm.org/">
3196 <a href="https://mercurial-scm.org/">
3187 <img src="/static/hglogo.png" alt="mercurial" /></a>
3197 <img src="/static/hglogo.png" alt="mercurial" /></a>
3188 </div>
3198 </div>
3189 <ul>
3199 <ul>
3190 <li><a href="/shortlog">log</a></li>
3200 <li><a href="/shortlog">log</a></li>
3191 <li><a href="/graph">graph</a></li>
3201 <li><a href="/graph">graph</a></li>
3192 <li><a href="/tags">tags</a></li>
3202 <li><a href="/tags">tags</a></li>
3193 <li><a href="/bookmarks">bookmarks</a></li>
3203 <li><a href="/bookmarks">bookmarks</a></li>
3194 <li><a href="/branches">branches</a></li>
3204 <li><a href="/branches">branches</a></li>
3195 </ul>
3205 </ul>
3196 <ul>
3206 <ul>
3197 <li class="active"><a href="/help">help</a></li>
3207 <li class="active"><a href="/help">help</a></li>
3198 </ul>
3208 </ul>
3199 </div>
3209 </div>
3200
3210
3201 <div class="main">
3211 <div class="main">
3202 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3212 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3203 <h3>Help: internals.changegroups</h3>
3213 <h3>Help: internals.changegroups</h3>
3204
3214
3205 <form class="search" action="/log">
3215 <form class="search" action="/log">
3206
3216
3207 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3217 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3208 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3218 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3209 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3219 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3210 </form>
3220 </form>
3211 <div id="doc">
3221 <div id="doc">
3212 <h1>Changegroups</h1>
3222 <h1>Changegroups</h1>
3213 <p>
3223 <p>
3214 Changegroups are representations of repository revlog data, specifically
3224 Changegroups are representations of repository revlog data, specifically
3215 the changelog data, root/flat manifest data, treemanifest data, and
3225 the changelog data, root/flat manifest data, treemanifest data, and
3216 filelogs.
3226 filelogs.
3217 </p>
3227 </p>
3218 <p>
3228 <p>
3219 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3229 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3220 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3230 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3221 only difference being an additional item in the *delta header*. Version
3231 only difference being an additional item in the *delta header*. Version
3222 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3232 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3223 exchanging treemanifests (enabled by setting an option on the
3233 exchanging treemanifests (enabled by setting an option on the
3224 &quot;changegroup&quot; part in the bundle2).
3234 &quot;changegroup&quot; part in the bundle2).
3225 </p>
3235 </p>
3226 <p>
3236 <p>
3227 Changegroups when not exchanging treemanifests consist of 3 logical
3237 Changegroups when not exchanging treemanifests consist of 3 logical
3228 segments:
3238 segments:
3229 </p>
3239 </p>
3230 <pre>
3240 <pre>
3231 +---------------------------------+
3241 +---------------------------------+
3232 | | | |
3242 | | | |
3233 | changeset | manifest | filelogs |
3243 | changeset | manifest | filelogs |
3234 | | | |
3244 | | | |
3235 | | | |
3245 | | | |
3236 +---------------------------------+
3246 +---------------------------------+
3237 </pre>
3247 </pre>
3238 <p>
3248 <p>
3239 When exchanging treemanifests, there are 4 logical segments:
3249 When exchanging treemanifests, there are 4 logical segments:
3240 </p>
3250 </p>
3241 <pre>
3251 <pre>
3242 +-------------------------------------------------+
3252 +-------------------------------------------------+
3243 | | | | |
3253 | | | | |
3244 | changeset | root | treemanifests | filelogs |
3254 | changeset | root | treemanifests | filelogs |
3245 | | manifest | | |
3255 | | manifest | | |
3246 | | | | |
3256 | | | | |
3247 +-------------------------------------------------+
3257 +-------------------------------------------------+
3248 </pre>
3258 </pre>
3249 <p>
3259 <p>
3250 The principle building block of each segment is a *chunk*. A *chunk*
3260 The principle building block of each segment is a *chunk*. A *chunk*
3251 is a framed piece of data:
3261 is a framed piece of data:
3252 </p>
3262 </p>
3253 <pre>
3263 <pre>
3254 +---------------------------------------+
3264 +---------------------------------------+
3255 | | |
3265 | | |
3256 | length | data |
3266 | length | data |
3257 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3267 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3258 | | |
3268 | | |
3259 +---------------------------------------+
3269 +---------------------------------------+
3260 </pre>
3270 </pre>
3261 <p>
3271 <p>
3262 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3272 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3263 integer indicating the length of the entire chunk (including the length field
3273 integer indicating the length of the entire chunk (including the length field
3264 itself).
3274 itself).
3265 </p>
3275 </p>
3266 <p>
3276 <p>
3267 There is a special case chunk that has a value of 0 for the length
3277 There is a special case chunk that has a value of 0 for the length
3268 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3278 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3269 </p>
3279 </p>
3270 <h2>Delta Groups</h2>
3280 <h2>Delta Groups</h2>
3271 <p>
3281 <p>
3272 A *delta group* expresses the content of a revlog as a series of deltas,
3282 A *delta group* expresses the content of a revlog as a series of deltas,
3273 or patches against previous revisions.
3283 or patches against previous revisions.
3274 </p>
3284 </p>
3275 <p>
3285 <p>
3276 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3286 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3277 to signal the end of the delta group:
3287 to signal the end of the delta group:
3278 </p>
3288 </p>
3279 <pre>
3289 <pre>
3280 +------------------------------------------------------------------------+
3290 +------------------------------------------------------------------------+
3281 | | | | | |
3291 | | | | | |
3282 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3292 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3283 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3293 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3284 | | | | | |
3294 | | | | | |
3285 +------------------------------------------------------------------------+
3295 +------------------------------------------------------------------------+
3286 </pre>
3296 </pre>
3287 <p>
3297 <p>
3288 Each *chunk*'s data consists of the following:
3298 Each *chunk*'s data consists of the following:
3289 </p>
3299 </p>
3290 <pre>
3300 <pre>
3291 +---------------------------------------+
3301 +---------------------------------------+
3292 | | |
3302 | | |
3293 | delta header | delta data |
3303 | delta header | delta data |
3294 | (various by version) | (various) |
3304 | (various by version) | (various) |
3295 | | |
3305 | | |
3296 +---------------------------------------+
3306 +---------------------------------------+
3297 </pre>
3307 </pre>
3298 <p>
3308 <p>
3299 The *delta data* is a series of *delta*s that describe a diff from an existing
3309 The *delta data* is a series of *delta*s that describe a diff from an existing
3300 entry (either that the recipient already has, or previously specified in the
3310 entry (either that the recipient already has, or previously specified in the
3301 bundle/changegroup).
3311 bundle/changegroup).
3302 </p>
3312 </p>
3303 <p>
3313 <p>
3304 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3314 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3305 &quot;3&quot; of the changegroup format.
3315 &quot;3&quot; of the changegroup format.
3306 </p>
3316 </p>
3307 <p>
3317 <p>
3308 Version 1 (headerlen=80):
3318 Version 1 (headerlen=80):
3309 </p>
3319 </p>
3310 <pre>
3320 <pre>
3311 +------------------------------------------------------+
3321 +------------------------------------------------------+
3312 | | | | |
3322 | | | | |
3313 | node | p1 node | p2 node | link node |
3323 | node | p1 node | p2 node | link node |
3314 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3324 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3315 | | | | |
3325 | | | | |
3316 +------------------------------------------------------+
3326 +------------------------------------------------------+
3317 </pre>
3327 </pre>
3318 <p>
3328 <p>
3319 Version 2 (headerlen=100):
3329 Version 2 (headerlen=100):
3320 </p>
3330 </p>
3321 <pre>
3331 <pre>
3322 +------------------------------------------------------------------+
3332 +------------------------------------------------------------------+
3323 | | | | | |
3333 | | | | | |
3324 | node | p1 node | p2 node | base node | link node |
3334 | node | p1 node | p2 node | base node | link node |
3325 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3335 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3326 | | | | | |
3336 | | | | | |
3327 +------------------------------------------------------------------+
3337 +------------------------------------------------------------------+
3328 </pre>
3338 </pre>
3329 <p>
3339 <p>
3330 Version 3 (headerlen=102):
3340 Version 3 (headerlen=102):
3331 </p>
3341 </p>
3332 <pre>
3342 <pre>
3333 +------------------------------------------------------------------------------+
3343 +------------------------------------------------------------------------------+
3334 | | | | | | |
3344 | | | | | | |
3335 | node | p1 node | p2 node | base node | link node | flags |
3345 | node | p1 node | p2 node | base node | link node | flags |
3336 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3346 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3337 | | | | | | |
3347 | | | | | | |
3338 +------------------------------------------------------------------------------+
3348 +------------------------------------------------------------------------------+
3339 </pre>
3349 </pre>
3340 <p>
3350 <p>
3341 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3351 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3342 series of *delta*s, densely packed (no separators). These deltas describe a diff
3352 series of *delta*s, densely packed (no separators). These deltas describe a diff
3343 from an existing entry (either that the recipient already has, or previously
3353 from an existing entry (either that the recipient already has, or previously
3344 specified in the bundle/changegroup). The format is described more fully in
3354 specified in the bundle/changegroup). The format is described more fully in
3345 &quot;hg help internals.bdiff&quot;, but briefly:
3355 &quot;hg help internals.bdiff&quot;, but briefly:
3346 </p>
3356 </p>
3347 <pre>
3357 <pre>
3348 +---------------------------------------------------------------+
3358 +---------------------------------------------------------------+
3349 | | | | |
3359 | | | | |
3350 | start offset | end offset | new length | content |
3360 | start offset | end offset | new length | content |
3351 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3361 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3352 | | | | |
3362 | | | | |
3353 +---------------------------------------------------------------+
3363 +---------------------------------------------------------------+
3354 </pre>
3364 </pre>
3355 <p>
3365 <p>
3356 Please note that the length field in the delta data does *not* include itself.
3366 Please note that the length field in the delta data does *not* include itself.
3357 </p>
3367 </p>
3358 <p>
3368 <p>
3359 In version 1, the delta is always applied against the previous node from
3369 In version 1, the delta is always applied against the previous node from
3360 the changegroup or the first parent if this is the first entry in the
3370 the changegroup or the first parent if this is the first entry in the
3361 changegroup.
3371 changegroup.
3362 </p>
3372 </p>
3363 <p>
3373 <p>
3364 In version 2 and up, the delta base node is encoded in the entry in the
3374 In version 2 and up, the delta base node is encoded in the entry in the
3365 changegroup. This allows the delta to be expressed against any parent,
3375 changegroup. This allows the delta to be expressed against any parent,
3366 which can result in smaller deltas and more efficient encoding of data.
3376 which can result in smaller deltas and more efficient encoding of data.
3367 </p>
3377 </p>
3368 <h2>Changeset Segment</h2>
3378 <h2>Changeset Segment</h2>
3369 <p>
3379 <p>
3370 The *changeset segment* consists of a single *delta group* holding
3380 The *changeset segment* consists of a single *delta group* holding
3371 changelog data. The *empty chunk* at the end of the *delta group* denotes
3381 changelog data. The *empty chunk* at the end of the *delta group* denotes
3372 the boundary to the *manifest segment*.
3382 the boundary to the *manifest segment*.
3373 </p>
3383 </p>
3374 <h2>Manifest Segment</h2>
3384 <h2>Manifest Segment</h2>
3375 <p>
3385 <p>
3376 The *manifest segment* consists of a single *delta group* holding manifest
3386 The *manifest segment* consists of a single *delta group* holding manifest
3377 data. If treemanifests are in use, it contains only the manifest for the
3387 data. If treemanifests are in use, it contains only the manifest for the
3378 root directory of the repository. Otherwise, it contains the entire
3388 root directory of the repository. Otherwise, it contains the entire
3379 manifest data. The *empty chunk* at the end of the *delta group* denotes
3389 manifest data. The *empty chunk* at the end of the *delta group* denotes
3380 the boundary to the next segment (either the *treemanifests segment* or the
3390 the boundary to the next segment (either the *treemanifests segment* or the
3381 *filelogs segment*, depending on version and the request options).
3391 *filelogs segment*, depending on version and the request options).
3382 </p>
3392 </p>
3383 <h3>Treemanifests Segment</h3>
3393 <h3>Treemanifests Segment</h3>
3384 <p>
3394 <p>
3385 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3395 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3386 only if the 'treemanifest' param is part of the bundle2 changegroup part
3396 only if the 'treemanifest' param is part of the bundle2 changegroup part
3387 (it is not possible to use changegroup version 3 outside of bundle2).
3397 (it is not possible to use changegroup version 3 outside of bundle2).
3388 Aside from the filenames in the *treemanifests segment* containing a
3398 Aside from the filenames in the *treemanifests segment* containing a
3389 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3399 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3390 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3400 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3391 a sub-segment with filename size 0). This denotes the boundary to the
3401 a sub-segment with filename size 0). This denotes the boundary to the
3392 *filelogs segment*.
3402 *filelogs segment*.
3393 </p>
3403 </p>
3394 <h2>Filelogs Segment</h2>
3404 <h2>Filelogs Segment</h2>
3395 <p>
3405 <p>
3396 The *filelogs segment* consists of multiple sub-segments, each
3406 The *filelogs segment* consists of multiple sub-segments, each
3397 corresponding to an individual file whose data is being described:
3407 corresponding to an individual file whose data is being described:
3398 </p>
3408 </p>
3399 <pre>
3409 <pre>
3400 +--------------------------------------------------+
3410 +--------------------------------------------------+
3401 | | | | | |
3411 | | | | | |
3402 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3412 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3403 | | | | | (4 bytes) |
3413 | | | | | (4 bytes) |
3404 | | | | | |
3414 | | | | | |
3405 +--------------------------------------------------+
3415 +--------------------------------------------------+
3406 </pre>
3416 </pre>
3407 <p>
3417 <p>
3408 The final filelog sub-segment is followed by an *empty chunk* (logically,
3418 The final filelog sub-segment is followed by an *empty chunk* (logically,
3409 a sub-segment with filename size 0). This denotes the end of the segment
3419 a sub-segment with filename size 0). This denotes the end of the segment
3410 and of the overall changegroup.
3420 and of the overall changegroup.
3411 </p>
3421 </p>
3412 <p>
3422 <p>
3413 Each filelog sub-segment consists of the following:
3423 Each filelog sub-segment consists of the following:
3414 </p>
3424 </p>
3415 <pre>
3425 <pre>
3416 +------------------------------------------------------+
3426 +------------------------------------------------------+
3417 | | | |
3427 | | | |
3418 | filename length | filename | delta group |
3428 | filename length | filename | delta group |
3419 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3429 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3420 | | | |
3430 | | | |
3421 +------------------------------------------------------+
3431 +------------------------------------------------------+
3422 </pre>
3432 </pre>
3423 <p>
3433 <p>
3424 That is, a *chunk* consisting of the filename (not terminated or padded)
3434 That is, a *chunk* consisting of the filename (not terminated or padded)
3425 followed by N chunks constituting the *delta group* for this file. The
3435 followed by N chunks constituting the *delta group* for this file. The
3426 *empty chunk* at the end of each *delta group* denotes the boundary to the
3436 *empty chunk* at the end of each *delta group* denotes the boundary to the
3427 next filelog sub-segment.
3437 next filelog sub-segment.
3428 </p>
3438 </p>
3429
3439
3430 </div>
3440 </div>
3431 </div>
3441 </div>
3432 </div>
3442 </div>
3433
3443
3434
3444
3435
3445
3436 </body>
3446 </body>
3437 </html>
3447 </html>
3438
3448
3439
3449
3440 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3450 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3441 404 Not Found
3451 404 Not Found
3442
3452
3443 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3453 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3444 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3454 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3445 <head>
3455 <head>
3446 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3456 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3447 <meta name="robots" content="index, nofollow" />
3457 <meta name="robots" content="index, nofollow" />
3448 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3458 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3449 <script type="text/javascript" src="/static/mercurial.js"></script>
3459 <script type="text/javascript" src="/static/mercurial.js"></script>
3450
3460
3451 <title>test: error</title>
3461 <title>test: error</title>
3452 </head>
3462 </head>
3453 <body>
3463 <body>
3454
3464
3455 <div class="container">
3465 <div class="container">
3456 <div class="menu">
3466 <div class="menu">
3457 <div class="logo">
3467 <div class="logo">
3458 <a href="https://mercurial-scm.org/">
3468 <a href="https://mercurial-scm.org/">
3459 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3469 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3460 </div>
3470 </div>
3461 <ul>
3471 <ul>
3462 <li><a href="/shortlog">log</a></li>
3472 <li><a href="/shortlog">log</a></li>
3463 <li><a href="/graph">graph</a></li>
3473 <li><a href="/graph">graph</a></li>
3464 <li><a href="/tags">tags</a></li>
3474 <li><a href="/tags">tags</a></li>
3465 <li><a href="/bookmarks">bookmarks</a></li>
3475 <li><a href="/bookmarks">bookmarks</a></li>
3466 <li><a href="/branches">branches</a></li>
3476 <li><a href="/branches">branches</a></li>
3467 </ul>
3477 </ul>
3468 <ul>
3478 <ul>
3469 <li><a href="/help">help</a></li>
3479 <li><a href="/help">help</a></li>
3470 </ul>
3480 </ul>
3471 </div>
3481 </div>
3472
3482
3473 <div class="main">
3483 <div class="main">
3474
3484
3475 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3485 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3476 <h3>error</h3>
3486 <h3>error</h3>
3477
3487
3478
3488
3479 <form class="search" action="/log">
3489 <form class="search" action="/log">
3480
3490
3481 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3491 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3482 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3492 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3483 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3493 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3484 </form>
3494 </form>
3485
3495
3486 <div class="description">
3496 <div class="description">
3487 <p>
3497 <p>
3488 An error occurred while processing your request:
3498 An error occurred while processing your request:
3489 </p>
3499 </p>
3490 <p>
3500 <p>
3491 Not Found
3501 Not Found
3492 </p>
3502 </p>
3493 </div>
3503 </div>
3494 </div>
3504 </div>
3495 </div>
3505 </div>
3496
3506
3497
3507
3498
3508
3499 </body>
3509 </body>
3500 </html>
3510 </html>
3501
3511
3502 [1]
3512 [1]
3503
3513
3504 $ killdaemons.py
3514 $ killdaemons.py
3505
3515
3506 #endif
3516 #endif
@@ -1,2024 +1,2028
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 {
1338 {
1339 "changeset_count": 10,
1339 "changeset_count": 10,
1340 "changesets": [
1340 "changesets": [
1341 {
1341 {
1342 "bookmarks": [],
1342 "bookmarks": [],
1343 "branch": "default",
1343 "branch": "default",
1344 "col": 0,
1344 "col": 0,
1345 "color": 1,
1345 "color": 1,
1346 "date": [
1346 "date": [
1347 0.0,
1347 0.0,
1348 0
1348 0
1349 ],
1349 ],
1350 "desc": "merge test-branch into default",
1350 "desc": "merge test-branch into default",
1351 "edges": [
1351 "edges": [
1352 {
1352 {
1353 "bcolor": "",
1353 "bcolor": "",
1354 "col": 0,
1354 "col": 0,
1355 "color": 1,
1355 "color": 1,
1356 "nextcol": 0,
1356 "nextcol": 0,
1357 "width": -1
1357 "width": -1
1358 },
1358 },
1359 {
1359 {
1360 "bcolor": "",
1360 "bcolor": "",
1361 "col": 0,
1361 "col": 0,
1362 "color": 1,
1362 "color": 1,
1363 "nextcol": 1,
1363 "nextcol": 1,
1364 "width": -1
1364 "width": -1
1365 }
1365 }
1366 ],
1366 ],
1367 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1367 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1368 "parents": [
1368 "parents": [
1369 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1369 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1370 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1370 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1371 ],
1371 ],
1372 "phase": "draft",
1372 "phase": "draft",
1373 "row": 0,
1373 "row": 0,
1374 "tags": [
1374 "tags": [
1375 "tip"
1375 "tip"
1376 ],
1376 ],
1377 "user": "test"
1377 "user": "test"
1378 },
1378 },
1379 {
1379 {
1380 "bookmarks": [],
1380 "bookmarks": [],
1381 "branch": "test-branch",
1381 "branch": "test-branch",
1382 "col": 1,
1382 "col": 1,
1383 "color": 2,
1383 "color": 2,
1384 "date": [
1384 "date": [
1385 0.0,
1385 0.0,
1386 0
1386 0
1387 ],
1387 ],
1388 "desc": "another commit in test-branch",
1388 "desc": "another commit in test-branch",
1389 "edges": [
1389 "edges": [
1390 {
1390 {
1391 "bcolor": "",
1391 "bcolor": "",
1392 "col": 0,
1392 "col": 0,
1393 "color": 1,
1393 "color": 1,
1394 "nextcol": 0,
1394 "nextcol": 0,
1395 "width": -1
1395 "width": -1
1396 },
1396 },
1397 {
1397 {
1398 "bcolor": "",
1398 "bcolor": "",
1399 "col": 1,
1399 "col": 1,
1400 "color": 2,
1400 "color": 2,
1401 "nextcol": 1,
1401 "nextcol": 1,
1402 "width": -1
1402 "width": -1
1403 }
1403 }
1404 ],
1404 ],
1405 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1405 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1406 "parents": [
1406 "parents": [
1407 "6ab967a8ab3489227a83f80e920faa039a71819f"
1407 "6ab967a8ab3489227a83f80e920faa039a71819f"
1408 ],
1408 ],
1409 "phase": "draft",
1409 "phase": "draft",
1410 "row": 1,
1410 "row": 1,
1411 "tags": [],
1411 "tags": [],
1412 "user": "test"
1412 "user": "test"
1413 },
1413 },
1414 {
1414 {
1415 "bookmarks": [],
1415 "bookmarks": [],
1416 "branch": "test-branch",
1416 "branch": "test-branch",
1417 "col": 1,
1417 "col": 1,
1418 "color": 2,
1418 "color": 2,
1419 "date": [
1419 "date": [
1420 0.0,
1420 0.0,
1421 0
1421 0
1422 ],
1422 ],
1423 "desc": "create test branch",
1423 "desc": "create test branch",
1424 "edges": [
1424 "edges": [
1425 {
1425 {
1426 "bcolor": "",
1426 "bcolor": "",
1427 "col": 0,
1427 "col": 0,
1428 "color": 1,
1428 "color": 1,
1429 "nextcol": 0,
1429 "nextcol": 0,
1430 "width": -1
1430 "width": -1
1431 },
1431 },
1432 {
1432 {
1433 "bcolor": "",
1433 "bcolor": "",
1434 "col": 1,
1434 "col": 1,
1435 "color": 2,
1435 "color": 2,
1436 "nextcol": 1,
1436 "nextcol": 1,
1437 "width": -1
1437 "width": -1
1438 }
1438 }
1439 ],
1439 ],
1440 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1440 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1441 "parents": [
1441 "parents": [
1442 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1442 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1443 ],
1443 ],
1444 "phase": "draft",
1444 "phase": "draft",
1445 "row": 2,
1445 "row": 2,
1446 "tags": [],
1446 "tags": [],
1447 "user": "test"
1447 "user": "test"
1448 },
1448 },
1449 {
1449 {
1450 "bookmarks": [
1450 "bookmarks": [
1451 "bookmark2"
1451 "bookmark2"
1452 ],
1452 ],
1453 "branch": "default",
1453 "branch": "default",
1454 "col": 0,
1454 "col": 0,
1455 "color": 1,
1455 "color": 1,
1456 "date": [
1456 "date": [
1457 0.0,
1457 0.0,
1458 0
1458 0
1459 ],
1459 ],
1460 "desc": "create tag2",
1460 "desc": "create tag2",
1461 "edges": [
1461 "edges": [
1462 {
1462 {
1463 "bcolor": "",
1463 "bcolor": "",
1464 "col": 0,
1464 "col": 0,
1465 "color": 1,
1465 "color": 1,
1466 "nextcol": 0,
1466 "nextcol": 0,
1467 "width": -1
1467 "width": -1
1468 },
1468 },
1469 {
1469 {
1470 "bcolor": "",
1470 "bcolor": "",
1471 "col": 1,
1471 "col": 1,
1472 "color": 2,
1472 "color": 2,
1473 "nextcol": 1,
1473 "nextcol": 1,
1474 "width": -1
1474 "width": -1
1475 }
1475 }
1476 ],
1476 ],
1477 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1477 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1478 "parents": [
1478 "parents": [
1479 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1479 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1480 ],
1480 ],
1481 "phase": "draft",
1481 "phase": "draft",
1482 "row": 3,
1482 "row": 3,
1483 "tags": [],
1483 "tags": [],
1484 "user": "test"
1484 "user": "test"
1485 },
1485 },
1486 {
1486 {
1487 "bookmarks": [],
1487 "bookmarks": [],
1488 "branch": "default",
1488 "branch": "default",
1489 "col": 0,
1489 "col": 0,
1490 "color": 1,
1490 "color": 1,
1491 "date": [
1491 "date": [
1492 0.0,
1492 0.0,
1493 0
1493 0
1494 ],
1494 ],
1495 "desc": "another commit to da/foo",
1495 "desc": "another commit to da/foo",
1496 "edges": [
1496 "edges": [
1497 {
1497 {
1498 "bcolor": "",
1498 "bcolor": "",
1499 "col": 0,
1499 "col": 0,
1500 "color": 1,
1500 "color": 1,
1501 "nextcol": 0,
1501 "nextcol": 0,
1502 "width": -1
1502 "width": -1
1503 },
1503 },
1504 {
1504 {
1505 "bcolor": "",
1505 "bcolor": "",
1506 "col": 1,
1506 "col": 1,
1507 "color": 2,
1507 "color": 2,
1508 "nextcol": 1,
1508 "nextcol": 1,
1509 "width": -1
1509 "width": -1
1510 }
1510 }
1511 ],
1511 ],
1512 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1512 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1513 "parents": [
1513 "parents": [
1514 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1514 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1515 ],
1515 ],
1516 "phase": "draft",
1516 "phase": "draft",
1517 "row": 4,
1517 "row": 4,
1518 "tags": [
1518 "tags": [
1519 "tag2"
1519 "tag2"
1520 ],
1520 ],
1521 "user": "test"
1521 "user": "test"
1522 },
1522 },
1523 {
1523 {
1524 "bookmarks": [],
1524 "bookmarks": [],
1525 "branch": "default",
1525 "branch": "default",
1526 "col": 0,
1526 "col": 0,
1527 "color": 1,
1527 "color": 1,
1528 "date": [
1528 "date": [
1529 0.0,
1529 0.0,
1530 0
1530 0
1531 ],
1531 ],
1532 "desc": "create tag",
1532 "desc": "create tag",
1533 "edges": [
1533 "edges": [
1534 {
1534 {
1535 "bcolor": "",
1535 "bcolor": "",
1536 "col": 0,
1536 "col": 0,
1537 "color": 1,
1537 "color": 1,
1538 "nextcol": 0,
1538 "nextcol": 0,
1539 "width": -1
1539 "width": -1
1540 },
1540 },
1541 {
1541 {
1542 "bcolor": "",
1542 "bcolor": "",
1543 "col": 1,
1543 "col": 1,
1544 "color": 2,
1544 "color": 2,
1545 "nextcol": 1,
1545 "nextcol": 1,
1546 "width": -1
1546 "width": -1
1547 }
1547 }
1548 ],
1548 ],
1549 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1549 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1550 "parents": [
1550 "parents": [
1551 "78896eb0e102174ce9278438a95e12543e4367a7"
1551 "78896eb0e102174ce9278438a95e12543e4367a7"
1552 ],
1552 ],
1553 "phase": "public",
1553 "phase": "public",
1554 "row": 5,
1554 "row": 5,
1555 "tags": [],
1555 "tags": [],
1556 "user": "test"
1556 "user": "test"
1557 },
1557 },
1558 {
1558 {
1559 "bookmarks": [],
1559 "bookmarks": [],
1560 "branch": "default",
1560 "branch": "default",
1561 "col": 0,
1561 "col": 0,
1562 "color": 1,
1562 "color": 1,
1563 "date": [
1563 "date": [
1564 0.0,
1564 0.0,
1565 0
1565 0
1566 ],
1566 ],
1567 "desc": "move foo",
1567 "desc": "move foo",
1568 "edges": [
1568 "edges": [
1569 {
1569 {
1570 "bcolor": "",
1570 "bcolor": "",
1571 "col": 0,
1571 "col": 0,
1572 "color": 1,
1572 "color": 1,
1573 "nextcol": 0,
1573 "nextcol": 0,
1574 "width": -1
1574 "width": -1
1575 },
1575 },
1576 {
1576 {
1577 "bcolor": "",
1577 "bcolor": "",
1578 "col": 1,
1578 "col": 1,
1579 "color": 2,
1579 "color": 2,
1580 "nextcol": 1,
1580 "nextcol": 1,
1581 "width": -1
1581 "width": -1
1582 }
1582 }
1583 ],
1583 ],
1584 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1584 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1585 "parents": [
1585 "parents": [
1586 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1586 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1587 ],
1587 ],
1588 "phase": "public",
1588 "phase": "public",
1589 "row": 6,
1589 "row": 6,
1590 "tags": [
1590 "tags": [
1591 "tag1"
1591 "tag1"
1592 ],
1592 ],
1593 "user": "test"
1593 "user": "test"
1594 },
1594 },
1595 {
1595 {
1596 "bookmarks": [
1596 "bookmarks": [
1597 "bookmark1"
1597 "bookmark1"
1598 ],
1598 ],
1599 "branch": "default",
1599 "branch": "default",
1600 "col": 0,
1600 "col": 0,
1601 "color": 1,
1601 "color": 1,
1602 "date": [
1602 "date": [
1603 0.0,
1603 0.0,
1604 0
1604 0
1605 ],
1605 ],
1606 "desc": "modify da/foo",
1606 "desc": "modify da/foo",
1607 "edges": [
1607 "edges": [
1608 {
1608 {
1609 "bcolor": "",
1609 "bcolor": "",
1610 "col": 0,
1610 "col": 0,
1611 "color": 1,
1611 "color": 1,
1612 "nextcol": 0,
1612 "nextcol": 0,
1613 "width": -1
1613 "width": -1
1614 },
1614 },
1615 {
1615 {
1616 "bcolor": "",
1616 "bcolor": "",
1617 "col": 1,
1617 "col": 1,
1618 "color": 2,
1618 "color": 2,
1619 "nextcol": 1,
1619 "nextcol": 1,
1620 "width": -1
1620 "width": -1
1621 }
1621 }
1622 ],
1622 ],
1623 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1623 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1624 "parents": [
1624 "parents": [
1625 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1625 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1626 ],
1626 ],
1627 "phase": "public",
1627 "phase": "public",
1628 "row": 7,
1628 "row": 7,
1629 "tags": [],
1629 "tags": [],
1630 "user": "test"
1630 "user": "test"
1631 },
1631 },
1632 {
1632 {
1633 "bookmarks": [],
1633 "bookmarks": [],
1634 "branch": "default",
1634 "branch": "default",
1635 "col": 0,
1635 "col": 0,
1636 "color": 1,
1636 "color": 1,
1637 "date": [
1637 "date": [
1638 0.0,
1638 0.0,
1639 0
1639 0
1640 ],
1640 ],
1641 "desc": "modify foo",
1641 "desc": "modify foo",
1642 "edges": [
1642 "edges": [
1643 {
1643 {
1644 "bcolor": "",
1644 "bcolor": "",
1645 "col": 0,
1645 "col": 0,
1646 "color": 1,
1646 "color": 1,
1647 "nextcol": 0,
1647 "nextcol": 0,
1648 "width": -1
1648 "width": -1
1649 },
1649 },
1650 {
1650 {
1651 "bcolor": "",
1651 "bcolor": "",
1652 "col": 1,
1652 "col": 1,
1653 "color": 2,
1653 "color": 2,
1654 "nextcol": 0,
1654 "nextcol": 0,
1655 "width": -1
1655 "width": -1
1656 }
1656 }
1657 ],
1657 ],
1658 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1658 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1659 "parents": [
1659 "parents": [
1660 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1660 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1661 ],
1661 ],
1662 "phase": "public",
1662 "phase": "public",
1663 "row": 8,
1663 "row": 8,
1664 "tags": [],
1664 "tags": [],
1665 "user": "test"
1665 "user": "test"
1666 },
1666 },
1667 {
1667 {
1668 "bookmarks": [],
1668 "bookmarks": [],
1669 "branch": "default",
1669 "branch": "default",
1670 "col": 0,
1670 "col": 0,
1671 "color": 2,
1671 "color": 2,
1672 "date": [
1672 "date": [
1673 0.0,
1673 0.0,
1674 0
1674 0
1675 ],
1675 ],
1676 "desc": "initial",
1676 "desc": "initial",
1677 "edges": [],
1677 "edges": [],
1678 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1678 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1679 "parents": [],
1679 "parents": [],
1680 "phase": "public",
1680 "phase": "public",
1681 "row": 9,
1681 "row": 9,
1682 "tags": [],
1682 "tags": [],
1683 "user": "test"
1683 "user": "test"
1684 }
1684 }
1685 ],
1685 ],
1686 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
1686 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
1687 }
1687 }
1688
1688
1689 help/ shows help topics
1689 help/ shows help topics
1690
1690
1691 $ request json-help
1691 $ request json-help
1692 200 Script output follows
1692 200 Script output follows
1693
1693
1694 {
1694 {
1695 "earlycommands": [
1695 "earlycommands": [
1696 {
1696 {
1697 "summary": "add the specified files on the next commit",
1697 "summary": "add the specified files on the next commit",
1698 "topic": "add"
1698 "topic": "add"
1699 },
1699 },
1700 {
1700 {
1701 "summary": "show changeset information by line for each file",
1701 "summary": "show changeset information by line for each file",
1702 "topic": "annotate"
1702 "topic": "annotate"
1703 },
1703 },
1704 {
1704 {
1705 "summary": "make a copy of an existing repository",
1705 "summary": "make a copy of an existing repository",
1706 "topic": "clone"
1706 "topic": "clone"
1707 },
1707 },
1708 {
1708 {
1709 "summary": "commit the specified files or all outstanding changes",
1709 "summary": "commit the specified files or all outstanding changes",
1710 "topic": "commit"
1710 "topic": "commit"
1711 },
1711 },
1712 {
1712 {
1713 "summary": "diff repository (or selected files)",
1713 "summary": "diff repository (or selected files)",
1714 "topic": "diff"
1714 "topic": "diff"
1715 },
1715 },
1716 {
1716 {
1717 "summary": "dump the header and diffs for one or more changesets",
1717 "summary": "dump the header and diffs for one or more changesets",
1718 "topic": "export"
1718 "topic": "export"
1719 },
1719 },
1720 {
1720 {
1721 "summary": "forget the specified files on the next commit",
1721 "summary": "forget the specified files on the next commit",
1722 "topic": "forget"
1722 "topic": "forget"
1723 },
1723 },
1724 {
1724 {
1725 "summary": "create a new repository in the given directory",
1725 "summary": "create a new repository in the given directory",
1726 "topic": "init"
1726 "topic": "init"
1727 },
1727 },
1728 {
1728 {
1729 "summary": "show revision history of entire repository or files",
1729 "summary": "show revision history of entire repository or files",
1730 "topic": "log"
1730 "topic": "log"
1731 },
1731 },
1732 {
1732 {
1733 "summary": "merge another revision into working directory",
1733 "summary": "merge another revision into working directory",
1734 "topic": "merge"
1734 "topic": "merge"
1735 },
1735 },
1736 {
1736 {
1737 "summary": "pull changes from the specified source",
1737 "summary": "pull changes from the specified source",
1738 "topic": "pull"
1738 "topic": "pull"
1739 },
1739 },
1740 {
1740 {
1741 "summary": "push changes to the specified destination",
1741 "summary": "push changes to the specified destination",
1742 "topic": "push"
1742 "topic": "push"
1743 },
1743 },
1744 {
1744 {
1745 "summary": "remove the specified files on the next commit",
1745 "summary": "remove the specified files on the next commit",
1746 "topic": "remove"
1746 "topic": "remove"
1747 },
1747 },
1748 {
1748 {
1749 "summary": "start stand-alone webserver",
1749 "summary": "start stand-alone webserver",
1750 "topic": "serve"
1750 "topic": "serve"
1751 },
1751 },
1752 {
1752 {
1753 "summary": "show changed files in the working directory",
1753 "summary": "show changed files in the working directory",
1754 "topic": "status"
1754 "topic": "status"
1755 },
1755 },
1756 {
1756 {
1757 "summary": "summarize working directory state",
1757 "summary": "summarize working directory state",
1758 "topic": "summary"
1758 "topic": "summary"
1759 },
1759 },
1760 {
1760 {
1761 "summary": "update working directory (or switch revisions)",
1761 "summary": "update working directory (or switch revisions)",
1762 "topic": "update"
1762 "topic": "update"
1763 }
1763 }
1764 ],
1764 ],
1765 "othercommands": [
1765 "othercommands": [
1766 {
1766 {
1767 "summary": "add all new files, delete all missing files",
1767 "summary": "add all new files, delete all missing files",
1768 "topic": "addremove"
1768 "topic": "addremove"
1769 },
1769 },
1770 {
1770 {
1771 "summary": "create an unversioned archive of a repository revision",
1771 "summary": "create an unversioned archive of a repository revision",
1772 "topic": "archive"
1772 "topic": "archive"
1773 },
1773 },
1774 {
1774 {
1775 "summary": "reverse effect of earlier changeset",
1775 "summary": "reverse effect of earlier changeset",
1776 "topic": "backout"
1776 "topic": "backout"
1777 },
1777 },
1778 {
1778 {
1779 "summary": "subdivision search of changesets",
1779 "summary": "subdivision search of changesets",
1780 "topic": "bisect"
1780 "topic": "bisect"
1781 },
1781 },
1782 {
1782 {
1783 "summary": "create a new bookmark or list existing bookmarks",
1783 "summary": "create a new bookmark or list existing bookmarks",
1784 "topic": "bookmarks"
1784 "topic": "bookmarks"
1785 },
1785 },
1786 {
1786 {
1787 "summary": "set or show the current branch name",
1787 "summary": "set or show the current branch name",
1788 "topic": "branch"
1788 "topic": "branch"
1789 },
1789 },
1790 {
1790 {
1791 "summary": "list repository named branches",
1791 "summary": "list repository named branches",
1792 "topic": "branches"
1792 "topic": "branches"
1793 },
1793 },
1794 {
1794 {
1795 "summary": "create a bundle file",
1795 "summary": "create a bundle file",
1796 "topic": "bundle"
1796 "topic": "bundle"
1797 },
1797 },
1798 {
1798 {
1799 "summary": "output the current or given revision of files",
1799 "summary": "output the current or given revision of files",
1800 "topic": "cat"
1800 "topic": "cat"
1801 },
1801 },
1802 {
1802 {
1803 "summary": "show combined config settings from all hgrc files",
1803 "summary": "show combined config settings from all hgrc files",
1804 "topic": "config"
1804 "topic": "config"
1805 },
1805 },
1806 {
1806 {
1807 "summary": "mark files as copied for the next commit",
1807 "summary": "mark files as copied for the next commit",
1808 "topic": "copy"
1808 "topic": "copy"
1809 },
1809 },
1810 {
1810 {
1811 "summary": "list tracked files",
1811 "summary": "list tracked files",
1812 "topic": "files"
1812 "topic": "files"
1813 },
1813 },
1814 {
1814 {
1815 "summary": "copy changes from other branches onto the current branch",
1815 "summary": "copy changes from other branches onto the current branch",
1816 "topic": "graft"
1816 "topic": "graft"
1817 },
1817 },
1818 {
1818 {
1819 "summary": "search revision history for a pattern in specified files",
1819 "summary": "search revision history for a pattern in specified files",
1820 "topic": "grep"
1820 "topic": "grep"
1821 },
1821 },
1822 {
1822 {
1823 "summary": "show branch heads",
1823 "summary": "show branch heads",
1824 "topic": "heads"
1824 "topic": "heads"
1825 },
1825 },
1826 {
1826 {
1827 "summary": "show help for a given topic or a help overview",
1827 "summary": "show help for a given topic or a help overview",
1828 "topic": "help"
1828 "topic": "help"
1829 },
1829 },
1830 {
1830 {
1831 "summary": "identify the working directory or specified revision",
1831 "summary": "identify the working directory or specified revision",
1832 "topic": "identify"
1832 "topic": "identify"
1833 },
1833 },
1834 {
1834 {
1835 "summary": "import an ordered set of patches",
1835 "summary": "import an ordered set of patches",
1836 "topic": "import"
1836 "topic": "import"
1837 },
1837 },
1838 {
1838 {
1839 "summary": "show new changesets found in source",
1839 "summary": "show new changesets found in source",
1840 "topic": "incoming"
1840 "topic": "incoming"
1841 },
1841 },
1842 {
1842 {
1843 "summary": "output the current or given revision of the project manifest",
1843 "summary": "output the current or given revision of the project manifest",
1844 "topic": "manifest"
1844 "topic": "manifest"
1845 },
1845 },
1846 {
1846 {
1847 "summary": "show changesets not found in the destination",
1847 "summary": "show changesets not found in the destination",
1848 "topic": "outgoing"
1848 "topic": "outgoing"
1849 },
1849 },
1850 {
1850 {
1851 "summary": "show aliases for remote repositories",
1851 "summary": "show aliases for remote repositories",
1852 "topic": "paths"
1852 "topic": "paths"
1853 },
1853 },
1854 {
1854 {
1855 "summary": "set or show the current phase name",
1855 "summary": "set or show the current phase name",
1856 "topic": "phase"
1856 "topic": "phase"
1857 },
1857 },
1858 {
1858 {
1859 "summary": "roll back an interrupted transaction",
1859 "summary": "roll back an interrupted transaction",
1860 "topic": "recover"
1860 "topic": "recover"
1861 },
1861 },
1862 {
1862 {
1863 "summary": "rename files; equivalent of copy + remove",
1863 "summary": "rename files; equivalent of copy + remove",
1864 "topic": "rename"
1864 "topic": "rename"
1865 },
1865 },
1866 {
1866 {
1867 "summary": "redo merges or set/view the merge status of files",
1867 "summary": "redo merges or set/view the merge status of files",
1868 "topic": "resolve"
1868 "topic": "resolve"
1869 },
1869 },
1870 {
1870 {
1871 "summary": "restore files to their checkout state",
1871 "summary": "restore files to their checkout state",
1872 "topic": "revert"
1872 "topic": "revert"
1873 },
1873 },
1874 {
1874 {
1875 "summary": "print the root (top) of the current working directory",
1875 "summary": "print the root (top) of the current working directory",
1876 "topic": "root"
1876 "topic": "root"
1877 },
1877 },
1878 {
1878 {
1879 "summary": "add one or more tags for the current or given revision",
1879 "summary": "add one or more tags for the current or given revision",
1880 "topic": "tag"
1880 "topic": "tag"
1881 },
1881 },
1882 {
1882 {
1883 "summary": "list repository tags",
1883 "summary": "list repository tags",
1884 "topic": "tags"
1884 "topic": "tags"
1885 },
1885 },
1886 {
1886 {
1887 "summary": "apply one or more bundle files",
1887 "summary": "apply one or more bundle files",
1888 "topic": "unbundle"
1888 "topic": "unbundle"
1889 },
1889 },
1890 {
1890 {
1891 "summary": "verify the integrity of the repository",
1891 "summary": "verify the integrity of the repository",
1892 "topic": "verify"
1892 "topic": "verify"
1893 },
1893 },
1894 {
1894 {
1895 "summary": "output version and copyright information",
1895 "summary": "output version and copyright information",
1896 "topic": "version"
1896 "topic": "version"
1897 }
1897 }
1898 ],
1898 ],
1899 "topics": [
1899 "topics": [
1900 {
1900 {
1901 "summary": "Bundle File Formats",
1901 "summary": "Bundle File Formats",
1902 "topic": "bundlespec"
1902 "topic": "bundlespec"
1903 },
1903 },
1904 {
1904 {
1905 "summary": "Colorizing Outputs",
1905 "summary": "Colorizing Outputs",
1906 "topic": "color"
1906 "topic": "color"
1907 },
1907 },
1908 {
1908 {
1909 "summary": "Configuration Files",
1909 "summary": "Configuration Files",
1910 "topic": "config"
1910 "topic": "config"
1911 },
1911 },
1912 {
1912 {
1913 "summary": "Date Formats",
1913 "summary": "Date Formats",
1914 "topic": "dates"
1914 "topic": "dates"
1915 },
1915 },
1916 {
1916 {
1917 "summary": "Deprecated Features",
1918 "topic": "deprecated"
1919 },
1920 {
1917 "summary": "Diff Formats",
1921 "summary": "Diff Formats",
1918 "topic": "diffs"
1922 "topic": "diffs"
1919 },
1923 },
1920 {
1924 {
1921 "summary": "Environment Variables",
1925 "summary": "Environment Variables",
1922 "topic": "environment"
1926 "topic": "environment"
1923 },
1927 },
1924 {
1928 {
1925 "summary": "Using Additional Features",
1929 "summary": "Using Additional Features",
1926 "topic": "extensions"
1930 "topic": "extensions"
1927 },
1931 },
1928 {
1932 {
1929 "summary": "Specifying File Sets",
1933 "summary": "Specifying File Sets",
1930 "topic": "filesets"
1934 "topic": "filesets"
1931 },
1935 },
1932 {
1936 {
1933 "summary": "Command-line flags",
1937 "summary": "Command-line flags",
1934 "topic": "flags"
1938 "topic": "flags"
1935 },
1939 },
1936 {
1940 {
1937 "summary": "Glossary",
1941 "summary": "Glossary",
1938 "topic": "glossary"
1942 "topic": "glossary"
1939 },
1943 },
1940 {
1944 {
1941 "summary": "Syntax for Mercurial Ignore Files",
1945 "summary": "Syntax for Mercurial Ignore Files",
1942 "topic": "hgignore"
1946 "topic": "hgignore"
1943 },
1947 },
1944 {
1948 {
1945 "summary": "Configuring hgweb",
1949 "summary": "Configuring hgweb",
1946 "topic": "hgweb"
1950 "topic": "hgweb"
1947 },
1951 },
1948 {
1952 {
1949 "summary": "Technical implementation topics",
1953 "summary": "Technical implementation topics",
1950 "topic": "internals"
1954 "topic": "internals"
1951 },
1955 },
1952 {
1956 {
1953 "summary": "Merge Tools",
1957 "summary": "Merge Tools",
1954 "topic": "merge-tools"
1958 "topic": "merge-tools"
1955 },
1959 },
1956 {
1960 {
1957 "summary": "Pager Support",
1961 "summary": "Pager Support",
1958 "topic": "pager"
1962 "topic": "pager"
1959 },
1963 },
1960 {
1964 {
1961 "summary": "File Name Patterns",
1965 "summary": "File Name Patterns",
1962 "topic": "patterns"
1966 "topic": "patterns"
1963 },
1967 },
1964 {
1968 {
1965 "summary": "Working with Phases",
1969 "summary": "Working with Phases",
1966 "topic": "phases"
1970 "topic": "phases"
1967 },
1971 },
1968 {
1972 {
1969 "summary": "Specifying Revisions",
1973 "summary": "Specifying Revisions",
1970 "topic": "revisions"
1974 "topic": "revisions"
1971 },
1975 },
1972 {
1976 {
1973 "summary": "Using Mercurial from scripts and automation",
1977 "summary": "Using Mercurial from scripts and automation",
1974 "topic": "scripting"
1978 "topic": "scripting"
1975 },
1979 },
1976 {
1980 {
1977 "summary": "Subrepositories",
1981 "summary": "Subrepositories",
1978 "topic": "subrepos"
1982 "topic": "subrepos"
1979 },
1983 },
1980 {
1984 {
1981 "summary": "Template Usage",
1985 "summary": "Template Usage",
1982 "topic": "templating"
1986 "topic": "templating"
1983 },
1987 },
1984 {
1988 {
1985 "summary": "URL Paths",
1989 "summary": "URL Paths",
1986 "topic": "urls"
1990 "topic": "urls"
1987 }
1991 }
1988 ]
1992 ]
1989 }
1993 }
1990
1994
1991 help/{topic} shows an individual help topic
1995 help/{topic} shows an individual help topic
1992
1996
1993 $ request json-help/phases
1997 $ request json-help/phases
1994 200 Script output follows
1998 200 Script output follows
1995
1999
1996 {
2000 {
1997 "rawdoc": "Working with Phases\n*", (glob)
2001 "rawdoc": "Working with Phases\n*", (glob)
1998 "topic": "phases"
2002 "topic": "phases"
1999 }
2003 }
2000
2004
2001 Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
2005 Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
2002
2006
2003 $ echo foo >> da/foo
2007 $ echo foo >> da/foo
2004 $ HGENCODING=cp932 hg ci -m `$PYTHON -c 'print("\x94\x5c")'`
2008 $ HGENCODING=cp932 hg ci -m `$PYTHON -c 'print("\x94\x5c")'`
2005
2009
2006 Commit message with null character
2010 Commit message with null character
2007
2011
2008 $ echo foo >> da/foo
2012 $ echo foo >> da/foo
2009 >>> open('msg', 'wb').write('commit with null character: \0\n')
2013 >>> open('msg', 'wb').write('commit with null character: \0\n')
2010 $ hg ci -l msg
2014 $ hg ci -l msg
2011 $ rm msg
2015 $ rm msg
2012
2016
2013 Stop and restart with HGENCODING=cp932
2017 Stop and restart with HGENCODING=cp932
2014
2018
2015 $ killdaemons.py
2019 $ killdaemons.py
2016 $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
2020 $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
2017 > -A access.log -E error.log
2021 > -A access.log -E error.log
2018 $ cat hg.pid >> $DAEMON_PIDS
2022 $ cat hg.pid >> $DAEMON_PIDS
2019
2023
2020 Test json escape of multibyte characters
2024 Test json escape of multibyte characters
2021
2025
2022 $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
2026 $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
2023 "desc": "commit with null character: \u0000",
2027 "desc": "commit with null character: \u0000",
2024 "desc": "\u80fd",
2028 "desc": "\u80fd",
General Comments 0
You need to be logged in to leave comments. Login now