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