##// END OF EJS Templates
help: scripting help topic...
Gregory Szorc -
r25881:9de44351 stable
parent child Browse files
Show More
@@ -0,0 +1,174 b''
1 It is common for machines (as opposed to humans) to consume Mercurial.
2 This help topic describes some of the considerations for interfacing
3 machines with Mercurial.
4
5 Choosing an Interface
6 =====================
7
8 Machines have a choice of several methods to interface with Mercurial.
9 These include:
10
11 - Executing the ``hg`` process
12 - Querying a HTTP server
13 - Calling out to a command server
14
15 Executing ``hg`` processes is very similar to how humans interact with
16 Mercurial in the shell. It should already be familar to you.
17
18 :hg:`serve` can be used to start a server. By default, this will start
19 a "hgweb" HTTP server. This HTTP server has support for machine-readable
20 output, such as JSON. For more, see :hg:`help hgweb`.
21
22 :hg:`serve` can also start a "command server." Clients can connect
23 to this server and issue Mercurial commands over a special protocol.
24 For more details on the command server, including links to client
25 libraries, see https://mercurial.selenic.com/wiki/CommandServer.
26
27 :hg:`serve` based interfaces (the hgweb and command servers) have the
28 advantage over simple ``hg`` process invocations in that they are
29 likely more efficient. This is because there is significant overhead
30 to spawn new Python processes.
31
32 .. tip::
33
34 If you need to invoke several ``hg`` processes in short order and/or
35 performance is important to you, use of a server-based interface
36 is highly recommended.
37
38 Environment Variables
39 =====================
40
41 As documented in :hg:`help environment`, various environment variables
42 influence the operation of Mercurial. The following are particularly
43 relevant for machines consuming Mercurial:
44
45 HGPLAIN
46 If not set, Mercurial's output could be influenced by configuration
47 settings that impact its encoding, verbose mode, localization, etc.
48
49 It is highly recommended for machines to set this variable when
50 invoking ``hg`` processes.
51
52 HGENCODING
53 If not set, the locale used by Mercurial will be detected from the
54 environment. If the determined locale does not support display of
55 certain characters, Mercurial may render these character sequences
56 incorrectly (often by using "?" as a placeholder for invalid
57 characters in the current locale).
58
59 Explcitly setting this environment variable is a good practice to
60 guarantee consistent results. "utf-8" is a good choice on UNIX-like
61 environments.
62
63 HGRCPATH
64 If not set, Mercurial will inherit config options from config files
65 using the process described in :hg:`help config`. This includes
66 inheriting user or system-wide config files.
67
68 When utmost control over the Mercurial configuration is desired, the
69 value of ``HGRCPATH`` can be set to an explicit file with known good
70 configs. In rare cases, the value can be set to an empty file or the
71 null device (often ``/dev/null``) to bypass loading of any user or
72 system config files. Note that these approaches can have unintended
73 consequences, as the user and system config files often define things
74 like the username and extensions that may be required to interface
75 with a repository.
76
77 Consuming Command Output
78 ========================
79
80 It is common for machines to need to parse the output of Mercurial
81 commands for relevant data. This section describes the various
82 techniques for doing so.
83
84 Parsing Raw Command Output
85 --------------------------
86
87 Likely the simplest and most effective solution for consuming command
88 output is to simply invoke ``hg`` commands as you would as a user and
89 parse their output.
90
91 The output of many commands can easily be parsed with tools like
92 ``grep``, ``sed``, and ``awk``.
93
94 A potential downside with parsing command output is that the output
95 of commands can change when Mercurial is upgraded. While Mercurial
96 does generally strive for strong backwards compatibility, command
97 output does occasionally change. Having tests for your automated
98 interactions with ``hg`` commands is generally recommended, but is
99 even more important when raw command output parsing is involved.
100
101 Using Templates to Control Output
102 ---------------------------------
103
104 Many ``hg`` commands support templatized output via the
105 ``-T/--template`` argument. For more, see :hg:`help templates`.
106
107 Templates are useful for explicitly controlling output so that
108 you get exactly the data you want formatted how you want it. For
109 example, ``log -T {node}\n`` can be used to print a newline
110 delimited list of changeset nodes instead of a human-tailored
111 output containing authors, dates, descriptions, etc.
112
113 .. tip::
114
115 If parsing raw command output is too complicated, consider
116 using templates to make your life easier.
117
118 The ``-T/--template`` argument allows specifying pre-defined styles.
119 Mercurial ships with the machine-readable styles ``json`` and ``xml``,
120 which provide JSON and XML output, respectively. These are useful for
121 producing output that is machine readable as-is.
122
123 .. important::
124
125 The ``json`` and ``xml`` styles are considered experimental. While
126 they may be attractive to use for easily obtaining machine-readable
127 output, their behavior may change in subsequent versions.
128
129 These styles may also exhibit unexpected results when dealing with
130 certain encodings. Mercurial treats things like filenames as a
131 series of bytes and normalizing certain byte sequences to JSON
132 or XML with certain encoding settings can lead to surprises.
133
134 Command Server Output
135 ---------------------
136
137 If using the command server to interact with Mercurial, you are likely
138 using an existing library/API that abstracts implementation details of
139 the command server. If so, this interface layer may perform parsing for
140 you, saving you the work of implementing it yourself.
141
142 Output Verbosity
143 ----------------
144
145 Commands often have varying output verbosity, even when machine
146 readable styles are being used (e.g. ``-T json``). Adding
147 ``-v/--verbose`` and ``--debug`` to the command's arguments can
148 increase the amount of data exposed by Mercurial.
149
150 An alternate way to get the data you need is by explicitly specifying
151 a template.
152
153 Other Topics
154 ============
155
156 revsets
157 Revisions sets is a functional query language for selecting a set
158 of revisions. Think of it as SQL for Mercurial repositories. Revsets
159 are useful for querying repositories for specific data.
160
161 See :hg:`help revsets` for more.
162
163 share extension
164 The ``share`` extension provides functionality for sharing
165 repository data across several working copies. It can even
166 automatically "pool" storage for logically related repositories when
167 cloning.
168
169 Configuring the ``share`` extension can lead to significant resource
170 utilization reduction, particularly around disk space and the
171 network. This is especially true for continuous integration (CI)
172 environments.
173
174 See :hg:`help -e share` for more.
@@ -1,517 +1,519 b''
1 # help.py - help data for mercurial
1 # help.py - help data for mercurial
2 #
2 #
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from i18n import gettext, _
8 from i18n import gettext, _
9 import itertools, os, textwrap
9 import itertools, os, textwrap
10 import error
10 import error
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
12 import templater
12 import templater
13 import encoding, util, minirst
13 import encoding, util, minirst
14 import cmdutil
14 import cmdutil
15 import hgweb.webcommands as webcommands
15 import hgweb.webcommands as webcommands
16
16
17 def listexts(header, exts, indent=1, showdeprecated=False):
17 def listexts(header, exts, indent=1, showdeprecated=False):
18 '''return a text listing of the given extensions'''
18 '''return a text listing of the given extensions'''
19 rst = []
19 rst = []
20 if exts:
20 if exts:
21 rst.append('\n%s\n\n' % header)
21 rst.append('\n%s\n\n' % header)
22 for name, desc in sorted(exts.iteritems()):
22 for name, desc in sorted(exts.iteritems()):
23 if '(DEPRECATED)' in desc and not showdeprecated:
23 if '(DEPRECATED)' in desc and not showdeprecated:
24 continue
24 continue
25 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
25 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
26 return rst
26 return rst
27
27
28 def extshelp():
28 def extshelp():
29 rst = loaddoc('extensions')().splitlines(True)
29 rst = loaddoc('extensions')().splitlines(True)
30 rst.extend(listexts(
30 rst.extend(listexts(
31 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
31 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
32 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
32 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
33 doc = ''.join(rst)
33 doc = ''.join(rst)
34 return doc
34 return doc
35
35
36 def optrst(header, options, verbose):
36 def optrst(header, options, verbose):
37 data = []
37 data = []
38 multioccur = False
38 multioccur = False
39 for option in options:
39 for option in options:
40 if len(option) == 5:
40 if len(option) == 5:
41 shortopt, longopt, default, desc, optlabel = option
41 shortopt, longopt, default, desc, optlabel = option
42 else:
42 else:
43 shortopt, longopt, default, desc = option
43 shortopt, longopt, default, desc = option
44 optlabel = _("VALUE") # default label
44 optlabel = _("VALUE") # default label
45
45
46 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc or
46 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc or
47 "EXPERIMENTAL" in desc or
47 "EXPERIMENTAL" in desc or
48 _("EXPERIMENTAL") in desc):
48 _("EXPERIMENTAL") in desc):
49 continue
49 continue
50
50
51 so = ''
51 so = ''
52 if shortopt:
52 if shortopt:
53 so = '-' + shortopt
53 so = '-' + shortopt
54 lo = '--' + longopt
54 lo = '--' + longopt
55 if default:
55 if default:
56 desc += _(" (default: %s)") % default
56 desc += _(" (default: %s)") % default
57
57
58 if isinstance(default, list):
58 if isinstance(default, list):
59 lo += " %s [+]" % optlabel
59 lo += " %s [+]" % optlabel
60 multioccur = True
60 multioccur = True
61 elif (default is not None) and not isinstance(default, bool):
61 elif (default is not None) and not isinstance(default, bool):
62 lo += " %s" % optlabel
62 lo += " %s" % optlabel
63
63
64 data.append((so, lo, desc))
64 data.append((so, lo, desc))
65
65
66 if multioccur:
66 if multioccur:
67 header += (_(" ([+] can be repeated)"))
67 header += (_(" ([+] can be repeated)"))
68
68
69 rst = ['\n%s:\n\n' % header]
69 rst = ['\n%s:\n\n' % header]
70 rst.extend(minirst.maketable(data, 1))
70 rst.extend(minirst.maketable(data, 1))
71
71
72 return ''.join(rst)
72 return ''.join(rst)
73
73
74 def indicateomitted(rst, omitted, notomitted=None):
74 def indicateomitted(rst, omitted, notomitted=None):
75 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
75 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
76 if notomitted:
76 if notomitted:
77 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
77 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
78
78
79 def topicmatch(kw):
79 def topicmatch(kw):
80 """Return help topics matching kw.
80 """Return help topics matching kw.
81
81
82 Returns {'section': [(name, summary), ...], ...} where section is
82 Returns {'section': [(name, summary), ...], ...} where section is
83 one of topics, commands, extensions, or extensioncommands.
83 one of topics, commands, extensions, or extensioncommands.
84 """
84 """
85 kw = encoding.lower(kw)
85 kw = encoding.lower(kw)
86 def lowercontains(container):
86 def lowercontains(container):
87 return kw in encoding.lower(container) # translated in helptable
87 return kw in encoding.lower(container) # translated in helptable
88 results = {'topics': [],
88 results = {'topics': [],
89 'commands': [],
89 'commands': [],
90 'extensions': [],
90 'extensions': [],
91 'extensioncommands': [],
91 'extensioncommands': [],
92 }
92 }
93 for names, header, doc in helptable:
93 for names, header, doc in helptable:
94 # Old extensions may use a str as doc.
94 # Old extensions may use a str as doc.
95 if (sum(map(lowercontains, names))
95 if (sum(map(lowercontains, names))
96 or lowercontains(header)
96 or lowercontains(header)
97 or (callable(doc) and lowercontains(doc()))):
97 or (callable(doc) and lowercontains(doc()))):
98 results['topics'].append((names[0], header))
98 results['topics'].append((names[0], header))
99 import commands # avoid cycle
99 import commands # avoid cycle
100 for cmd, entry in commands.table.iteritems():
100 for cmd, entry in commands.table.iteritems():
101 if len(entry) == 3:
101 if len(entry) == 3:
102 summary = entry[2]
102 summary = entry[2]
103 else:
103 else:
104 summary = ''
104 summary = ''
105 # translate docs *before* searching there
105 # translate docs *before* searching there
106 docs = _(getattr(entry[0], '__doc__', None)) or ''
106 docs = _(getattr(entry[0], '__doc__', None)) or ''
107 if kw in cmd or lowercontains(summary) or lowercontains(docs):
107 if kw in cmd or lowercontains(summary) or lowercontains(docs):
108 doclines = docs.splitlines()
108 doclines = docs.splitlines()
109 if doclines:
109 if doclines:
110 summary = doclines[0]
110 summary = doclines[0]
111 cmdname = cmd.split('|')[0].lstrip('^')
111 cmdname = cmd.split('|')[0].lstrip('^')
112 results['commands'].append((cmdname, summary))
112 results['commands'].append((cmdname, summary))
113 for name, docs in itertools.chain(
113 for name, docs in itertools.chain(
114 extensions.enabled(False).iteritems(),
114 extensions.enabled(False).iteritems(),
115 extensions.disabled().iteritems()):
115 extensions.disabled().iteritems()):
116 # extensions.load ignores the UI argument
116 # extensions.load ignores the UI argument
117 mod = extensions.load(None, name, '')
117 mod = extensions.load(None, name, '')
118 name = name.split('.')[-1]
118 name = name.split('.')[-1]
119 if lowercontains(name) or lowercontains(docs):
119 if lowercontains(name) or lowercontains(docs):
120 # extension docs are already translated
120 # extension docs are already translated
121 results['extensions'].append((name, docs.splitlines()[0]))
121 results['extensions'].append((name, docs.splitlines()[0]))
122 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
122 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
123 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
123 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
124 cmdname = cmd.split('|')[0].lstrip('^')
124 cmdname = cmd.split('|')[0].lstrip('^')
125 if entry[0].__doc__:
125 if entry[0].__doc__:
126 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
126 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
127 else:
127 else:
128 cmddoc = _('(no help text available)')
128 cmddoc = _('(no help text available)')
129 results['extensioncommands'].append((cmdname, cmddoc))
129 results['extensioncommands'].append((cmdname, cmddoc))
130 return results
130 return results
131
131
132 def loaddoc(topic):
132 def loaddoc(topic):
133 """Return a delayed loader for help/topic.txt."""
133 """Return a delayed loader for help/topic.txt."""
134
134
135 def loader():
135 def loader():
136 docdir = os.path.join(util.datapath, 'help')
136 docdir = os.path.join(util.datapath, 'help')
137 path = os.path.join(docdir, topic + ".txt")
137 path = os.path.join(docdir, topic + ".txt")
138 doc = gettext(util.readfile(path))
138 doc = gettext(util.readfile(path))
139 for rewriter in helphooks.get(topic, []):
139 for rewriter in helphooks.get(topic, []):
140 doc = rewriter(topic, doc)
140 doc = rewriter(topic, doc)
141 return doc
141 return doc
142
142
143 return loader
143 return loader
144
144
145 helptable = sorted([
145 helptable = sorted([
146 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
146 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
147 (["dates"], _("Date Formats"), loaddoc('dates')),
147 (["dates"], _("Date Formats"), loaddoc('dates')),
148 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
148 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
149 (['environment', 'env'], _('Environment Variables'),
149 (['environment', 'env'], _('Environment Variables'),
150 loaddoc('environment')),
150 loaddoc('environment')),
151 (['revisions', 'revs'], _('Specifying Single Revisions'),
151 (['revisions', 'revs'], _('Specifying Single Revisions'),
152 loaddoc('revisions')),
152 loaddoc('revisions')),
153 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
153 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
154 loaddoc('multirevs')),
154 loaddoc('multirevs')),
155 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
155 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
156 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
156 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
157 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
157 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
158 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
158 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
159 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
159 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
160 loaddoc('templates')),
160 loaddoc('templates')),
161 (['urls'], _('URL Paths'), loaddoc('urls')),
161 (['urls'], _('URL Paths'), loaddoc('urls')),
162 (["extensions"], _("Using Additional Features"), extshelp),
162 (["extensions"], _("Using Additional Features"), extshelp),
163 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
163 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
164 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
164 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
165 (["glossary"], _("Glossary"), loaddoc('glossary')),
165 (["glossary"], _("Glossary"), loaddoc('glossary')),
166 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
166 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
167 loaddoc('hgignore')),
167 loaddoc('hgignore')),
168 (["phases"], _("Working with Phases"), loaddoc('phases')),
168 (["phases"], _("Working with Phases"), loaddoc('phases')),
169 (['scripting'], _('Using Mercurial from scripts and automation'),
170 loaddoc('scripting')),
169 ])
171 ])
170
172
171 # Map topics to lists of callable taking the current topic help and
173 # Map topics to lists of callable taking the current topic help and
172 # returning the updated version
174 # returning the updated version
173 helphooks = {}
175 helphooks = {}
174
176
175 def addtopichook(topic, rewriter):
177 def addtopichook(topic, rewriter):
176 helphooks.setdefault(topic, []).append(rewriter)
178 helphooks.setdefault(topic, []).append(rewriter)
177
179
178 def makeitemsdoc(topic, doc, marker, items, dedent=False):
180 def makeitemsdoc(topic, doc, marker, items, dedent=False):
179 """Extract docstring from the items key to function mapping, build a
181 """Extract docstring from the items key to function mapping, build a
180 .single documentation block and use it to overwrite the marker in doc
182 .single documentation block and use it to overwrite the marker in doc
181 """
183 """
182 entries = []
184 entries = []
183 for name in sorted(items):
185 for name in sorted(items):
184 text = (items[name].__doc__ or '').rstrip()
186 text = (items[name].__doc__ or '').rstrip()
185 if not text:
187 if not text:
186 continue
188 continue
187 text = gettext(text)
189 text = gettext(text)
188 if dedent:
190 if dedent:
189 text = textwrap.dedent(text)
191 text = textwrap.dedent(text)
190 lines = text.splitlines()
192 lines = text.splitlines()
191 doclines = [(lines[0])]
193 doclines = [(lines[0])]
192 for l in lines[1:]:
194 for l in lines[1:]:
193 # Stop once we find some Python doctest
195 # Stop once we find some Python doctest
194 if l.strip().startswith('>>>'):
196 if l.strip().startswith('>>>'):
195 break
197 break
196 if dedent:
198 if dedent:
197 doclines.append(l.rstrip())
199 doclines.append(l.rstrip())
198 else:
200 else:
199 doclines.append(' ' + l.strip())
201 doclines.append(' ' + l.strip())
200 entries.append('\n'.join(doclines))
202 entries.append('\n'.join(doclines))
201 entries = '\n\n'.join(entries)
203 entries = '\n\n'.join(entries)
202 return doc.replace(marker, entries)
204 return doc.replace(marker, entries)
203
205
204 def addtopicsymbols(topic, marker, symbols, dedent=False):
206 def addtopicsymbols(topic, marker, symbols, dedent=False):
205 def add(topic, doc):
207 def add(topic, doc):
206 return makeitemsdoc(topic, doc, marker, symbols, dedent=dedent)
208 return makeitemsdoc(topic, doc, marker, symbols, dedent=dedent)
207 addtopichook(topic, add)
209 addtopichook(topic, add)
208
210
209 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
211 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
210 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
212 addtopicsymbols('merge-tools', '.. internaltoolsmarker',
211 filemerge.internalsdoc)
213 filemerge.internalsdoc)
212 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
214 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
213 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
215 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
214 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
216 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
215 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
217 addtopicsymbols('templates', '.. functionsmarker', templater.funcs)
216 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
218 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,
217 dedent=True)
219 dedent=True)
218
220
219 def help_(ui, name, unknowncmd=False, full=True, **opts):
221 def help_(ui, name, unknowncmd=False, full=True, **opts):
220 '''
222 '''
221 Generate the help for 'name' as unformatted restructured text. If
223 Generate the help for 'name' as unformatted restructured text. If
222 'name' is None, describe the commands available.
224 'name' is None, describe the commands available.
223 '''
225 '''
224
226
225 import commands # avoid cycle
227 import commands # avoid cycle
226
228
227 def helpcmd(name):
229 def helpcmd(name):
228 try:
230 try:
229 aliases, entry = cmdutil.findcmd(name, commands.table,
231 aliases, entry = cmdutil.findcmd(name, commands.table,
230 strict=unknowncmd)
232 strict=unknowncmd)
231 except error.AmbiguousCommand as inst:
233 except error.AmbiguousCommand as inst:
232 # py3k fix: except vars can't be used outside the scope of the
234 # py3k fix: except vars can't be used outside the scope of the
233 # except block, nor can be used inside a lambda. python issue4617
235 # except block, nor can be used inside a lambda. python issue4617
234 prefix = inst.args[0]
236 prefix = inst.args[0]
235 select = lambda c: c.lstrip('^').startswith(prefix)
237 select = lambda c: c.lstrip('^').startswith(prefix)
236 rst = helplist(select)
238 rst = helplist(select)
237 return rst
239 return rst
238
240
239 rst = []
241 rst = []
240
242
241 # check if it's an invalid alias and display its error if it is
243 # check if it's an invalid alias and display its error if it is
242 if getattr(entry[0], 'badalias', None):
244 if getattr(entry[0], 'badalias', None):
243 rst.append(entry[0].badalias + '\n')
245 rst.append(entry[0].badalias + '\n')
244 if entry[0].unknowncmd:
246 if entry[0].unknowncmd:
245 try:
247 try:
246 rst.extend(helpextcmd(entry[0].cmdname))
248 rst.extend(helpextcmd(entry[0].cmdname))
247 except error.UnknownCommand:
249 except error.UnknownCommand:
248 pass
250 pass
249 return rst
251 return rst
250
252
251 # synopsis
253 # synopsis
252 if len(entry) > 2:
254 if len(entry) > 2:
253 if entry[2].startswith('hg'):
255 if entry[2].startswith('hg'):
254 rst.append("%s\n" % entry[2])
256 rst.append("%s\n" % entry[2])
255 else:
257 else:
256 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
258 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
257 else:
259 else:
258 rst.append('hg %s\n' % aliases[0])
260 rst.append('hg %s\n' % aliases[0])
259 # aliases
261 # aliases
260 if full and not ui.quiet and len(aliases) > 1:
262 if full and not ui.quiet and len(aliases) > 1:
261 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
263 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
262 rst.append('\n')
264 rst.append('\n')
263
265
264 # description
266 # description
265 doc = gettext(entry[0].__doc__)
267 doc = gettext(entry[0].__doc__)
266 if not doc:
268 if not doc:
267 doc = _("(no help text available)")
269 doc = _("(no help text available)")
268 if util.safehasattr(entry[0], 'definition'): # aliased command
270 if util.safehasattr(entry[0], 'definition'): # aliased command
269 if entry[0].definition.startswith('!'): # shell alias
271 if entry[0].definition.startswith('!'): # shell alias
270 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
272 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
271 else:
273 else:
272 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
274 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
273 doc = doc.splitlines(True)
275 doc = doc.splitlines(True)
274 if ui.quiet or not full:
276 if ui.quiet or not full:
275 rst.append(doc[0])
277 rst.append(doc[0])
276 else:
278 else:
277 rst.extend(doc)
279 rst.extend(doc)
278 rst.append('\n')
280 rst.append('\n')
279
281
280 # check if this command shadows a non-trivial (multi-line)
282 # check if this command shadows a non-trivial (multi-line)
281 # extension help text
283 # extension help text
282 try:
284 try:
283 mod = extensions.find(name)
285 mod = extensions.find(name)
284 doc = gettext(mod.__doc__) or ''
286 doc = gettext(mod.__doc__) or ''
285 if '\n' in doc.strip():
287 if '\n' in doc.strip():
286 msg = _('(use "hg help -e %s" to show help for '
288 msg = _('(use "hg help -e %s" to show help for '
287 'the %s extension)') % (name, name)
289 'the %s extension)') % (name, name)
288 rst.append('\n%s\n' % msg)
290 rst.append('\n%s\n' % msg)
289 except KeyError:
291 except KeyError:
290 pass
292 pass
291
293
292 # options
294 # options
293 if not ui.quiet and entry[1]:
295 if not ui.quiet and entry[1]:
294 rst.append(optrst(_("options"), entry[1], ui.verbose))
296 rst.append(optrst(_("options"), entry[1], ui.verbose))
295
297
296 if ui.verbose:
298 if ui.verbose:
297 rst.append(optrst(_("global options"),
299 rst.append(optrst(_("global options"),
298 commands.globalopts, ui.verbose))
300 commands.globalopts, ui.verbose))
299
301
300 if not ui.verbose:
302 if not ui.verbose:
301 if not full:
303 if not full:
302 rst.append(_('\n(use "hg %s -h" to show more help)\n')
304 rst.append(_('\n(use "hg %s -h" to show more help)\n')
303 % name)
305 % name)
304 elif not ui.quiet:
306 elif not ui.quiet:
305 rst.append(_('\n(some details hidden, use --verbose '
307 rst.append(_('\n(some details hidden, use --verbose '
306 'to show complete help)'))
308 'to show complete help)'))
307
309
308 return rst
310 return rst
309
311
310
312
311 def helplist(select=None):
313 def helplist(select=None):
312 # list of commands
314 # list of commands
313 if name == "shortlist":
315 if name == "shortlist":
314 header = _('basic commands:\n\n')
316 header = _('basic commands:\n\n')
315 elif name == "debug":
317 elif name == "debug":
316 header = _('debug commands (internal and unsupported):\n\n')
318 header = _('debug commands (internal and unsupported):\n\n')
317 else:
319 else:
318 header = _('list of commands:\n\n')
320 header = _('list of commands:\n\n')
319
321
320 h = {}
322 h = {}
321 cmds = {}
323 cmds = {}
322 for c, e in commands.table.iteritems():
324 for c, e in commands.table.iteritems():
323 f = c.split("|", 1)[0]
325 f = c.split("|", 1)[0]
324 if select and not select(f):
326 if select and not select(f):
325 continue
327 continue
326 if (not select and name != 'shortlist' and
328 if (not select and name != 'shortlist' and
327 e[0].__module__ != commands.__name__):
329 e[0].__module__ != commands.__name__):
328 continue
330 continue
329 if name == "shortlist" and not f.startswith("^"):
331 if name == "shortlist" and not f.startswith("^"):
330 continue
332 continue
331 f = f.lstrip("^")
333 f = f.lstrip("^")
332 if not ui.debugflag and f.startswith("debug") and name != "debug":
334 if not ui.debugflag and f.startswith("debug") and name != "debug":
333 continue
335 continue
334 doc = e[0].__doc__
336 doc = e[0].__doc__
335 if doc and 'DEPRECATED' in doc and not ui.verbose:
337 if doc and 'DEPRECATED' in doc and not ui.verbose:
336 continue
338 continue
337 doc = gettext(doc)
339 doc = gettext(doc)
338 if not doc:
340 if not doc:
339 doc = _("(no help text available)")
341 doc = _("(no help text available)")
340 h[f] = doc.splitlines()[0].rstrip()
342 h[f] = doc.splitlines()[0].rstrip()
341 cmds[f] = c.lstrip("^")
343 cmds[f] = c.lstrip("^")
342
344
343 rst = []
345 rst = []
344 if not h:
346 if not h:
345 if not ui.quiet:
347 if not ui.quiet:
346 rst.append(_('no commands defined\n'))
348 rst.append(_('no commands defined\n'))
347 return rst
349 return rst
348
350
349 if not ui.quiet:
351 if not ui.quiet:
350 rst.append(header)
352 rst.append(header)
351 fns = sorted(h)
353 fns = sorted(h)
352 for f in fns:
354 for f in fns:
353 if ui.verbose:
355 if ui.verbose:
354 commacmds = cmds[f].replace("|",", ")
356 commacmds = cmds[f].replace("|",", ")
355 rst.append(" :%s: %s\n" % (commacmds, h[f]))
357 rst.append(" :%s: %s\n" % (commacmds, h[f]))
356 else:
358 else:
357 rst.append(' :%s: %s\n' % (f, h[f]))
359 rst.append(' :%s: %s\n' % (f, h[f]))
358
360
359 if not name:
361 if not name:
360 exts = listexts(_('enabled extensions:'), extensions.enabled())
362 exts = listexts(_('enabled extensions:'), extensions.enabled())
361 if exts:
363 if exts:
362 rst.append('\n')
364 rst.append('\n')
363 rst.extend(exts)
365 rst.extend(exts)
364
366
365 rst.append(_("\nadditional help topics:\n\n"))
367 rst.append(_("\nadditional help topics:\n\n"))
366 topics = []
368 topics = []
367 for names, header, doc in helptable:
369 for names, header, doc in helptable:
368 topics.append((names[0], header))
370 topics.append((names[0], header))
369 for t, desc in topics:
371 for t, desc in topics:
370 rst.append(" :%s: %s\n" % (t, desc))
372 rst.append(" :%s: %s\n" % (t, desc))
371
373
372 if ui.quiet:
374 if ui.quiet:
373 pass
375 pass
374 elif ui.verbose:
376 elif ui.verbose:
375 rst.append('\n%s\n' % optrst(_("global options"),
377 rst.append('\n%s\n' % optrst(_("global options"),
376 commands.globalopts, ui.verbose))
378 commands.globalopts, ui.verbose))
377 if name == 'shortlist':
379 if name == 'shortlist':
378 rst.append(_('\n(use "hg help" for the full list '
380 rst.append(_('\n(use "hg help" for the full list '
379 'of commands)\n'))
381 'of commands)\n'))
380 else:
382 else:
381 if name == 'shortlist':
383 if name == 'shortlist':
382 rst.append(_('\n(use "hg help" for the full list of commands '
384 rst.append(_('\n(use "hg help" for the full list of commands '
383 'or "hg -v" for details)\n'))
385 'or "hg -v" for details)\n'))
384 elif name and not full:
386 elif name and not full:
385 rst.append(_('\n(use "hg help %s" to show the full help '
387 rst.append(_('\n(use "hg help %s" to show the full help '
386 'text)\n') % name)
388 'text)\n') % name)
387 elif name and cmds and name in cmds.keys():
389 elif name and cmds and name in cmds.keys():
388 rst.append(_('\n(use "hg help -v -e %s" to show built-in '
390 rst.append(_('\n(use "hg help -v -e %s" to show built-in '
389 'aliases and global options)\n') % name)
391 'aliases and global options)\n') % name)
390 else:
392 else:
391 rst.append(_('\n(use "hg help -v%s" to show built-in aliases '
393 rst.append(_('\n(use "hg help -v%s" to show built-in aliases '
392 'and global options)\n')
394 'and global options)\n')
393 % (name and " " + name or ""))
395 % (name and " " + name or ""))
394 return rst
396 return rst
395
397
396 def helptopic(name):
398 def helptopic(name):
397 for names, header, doc in helptable:
399 for names, header, doc in helptable:
398 if name in names:
400 if name in names:
399 break
401 break
400 else:
402 else:
401 raise error.UnknownCommand(name)
403 raise error.UnknownCommand(name)
402
404
403 rst = [minirst.section(header)]
405 rst = [minirst.section(header)]
404
406
405 # description
407 # description
406 if not doc:
408 if not doc:
407 rst.append(" %s\n" % _("(no help text available)"))
409 rst.append(" %s\n" % _("(no help text available)"))
408 if callable(doc):
410 if callable(doc):
409 rst += [" %s\n" % l for l in doc().splitlines()]
411 rst += [" %s\n" % l for l in doc().splitlines()]
410
412
411 if not ui.verbose:
413 if not ui.verbose:
412 omitted = _('(some details hidden, use --verbose'
414 omitted = _('(some details hidden, use --verbose'
413 ' to show complete help)')
415 ' to show complete help)')
414 indicateomitted(rst, omitted)
416 indicateomitted(rst, omitted)
415
417
416 try:
418 try:
417 cmdutil.findcmd(name, commands.table)
419 cmdutil.findcmd(name, commands.table)
418 rst.append(_('\nuse "hg help -c %s" to see help for '
420 rst.append(_('\nuse "hg help -c %s" to see help for '
419 'the %s command\n') % (name, name))
421 'the %s command\n') % (name, name))
420 except error.UnknownCommand:
422 except error.UnknownCommand:
421 pass
423 pass
422 return rst
424 return rst
423
425
424 def helpext(name):
426 def helpext(name):
425 try:
427 try:
426 mod = extensions.find(name)
428 mod = extensions.find(name)
427 doc = gettext(mod.__doc__) or _('no help text available')
429 doc = gettext(mod.__doc__) or _('no help text available')
428 except KeyError:
430 except KeyError:
429 mod = None
431 mod = None
430 doc = extensions.disabledext(name)
432 doc = extensions.disabledext(name)
431 if not doc:
433 if not doc:
432 raise error.UnknownCommand(name)
434 raise error.UnknownCommand(name)
433
435
434 if '\n' not in doc:
436 if '\n' not in doc:
435 head, tail = doc, ""
437 head, tail = doc, ""
436 else:
438 else:
437 head, tail = doc.split('\n', 1)
439 head, tail = doc.split('\n', 1)
438 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)]
440 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)]
439 if tail:
441 if tail:
440 rst.extend(tail.splitlines(True))
442 rst.extend(tail.splitlines(True))
441 rst.append('\n')
443 rst.append('\n')
442
444
443 if not ui.verbose:
445 if not ui.verbose:
444 omitted = _('(some details hidden, use --verbose'
446 omitted = _('(some details hidden, use --verbose'
445 ' to show complete help)')
447 ' to show complete help)')
446 indicateomitted(rst, omitted)
448 indicateomitted(rst, omitted)
447
449
448 if mod:
450 if mod:
449 try:
451 try:
450 ct = mod.cmdtable
452 ct = mod.cmdtable
451 except AttributeError:
453 except AttributeError:
452 ct = {}
454 ct = {}
453 modcmds = set([c.split('|', 1)[0] for c in ct])
455 modcmds = set([c.split('|', 1)[0] for c in ct])
454 rst.extend(helplist(modcmds.__contains__))
456 rst.extend(helplist(modcmds.__contains__))
455 else:
457 else:
456 rst.append(_('(use "hg help extensions" for information on enabling'
458 rst.append(_('(use "hg help extensions" for information on enabling'
457 ' extensions)\n'))
459 ' extensions)\n'))
458 return rst
460 return rst
459
461
460 def helpextcmd(name):
462 def helpextcmd(name):
461 cmd, ext, mod = extensions.disabledcmd(ui, name,
463 cmd, ext, mod = extensions.disabledcmd(ui, name,
462 ui.configbool('ui', 'strict'))
464 ui.configbool('ui', 'strict'))
463 doc = gettext(mod.__doc__).splitlines()[0]
465 doc = gettext(mod.__doc__).splitlines()[0]
464
466
465 rst = listexts(_("'%s' is provided by the following "
467 rst = listexts(_("'%s' is provided by the following "
466 "extension:") % cmd, {ext: doc}, indent=4)
468 "extension:") % cmd, {ext: doc}, indent=4)
467 rst.append('\n')
469 rst.append('\n')
468 rst.append(_('(use "hg help extensions" for information on enabling '
470 rst.append(_('(use "hg help extensions" for information on enabling '
469 'extensions)\n'))
471 'extensions)\n'))
470 return rst
472 return rst
471
473
472
474
473 rst = []
475 rst = []
474 kw = opts.get('keyword')
476 kw = opts.get('keyword')
475 if kw:
477 if kw:
476 matches = topicmatch(kw)
478 matches = topicmatch(kw)
477 for t, title in (('topics', _('Topics')),
479 for t, title in (('topics', _('Topics')),
478 ('commands', _('Commands')),
480 ('commands', _('Commands')),
479 ('extensions', _('Extensions')),
481 ('extensions', _('Extensions')),
480 ('extensioncommands', _('Extension Commands'))):
482 ('extensioncommands', _('Extension Commands'))):
481 if matches[t]:
483 if matches[t]:
482 rst.append('%s:\n\n' % title)
484 rst.append('%s:\n\n' % title)
483 rst.extend(minirst.maketable(sorted(matches[t]), 1))
485 rst.extend(minirst.maketable(sorted(matches[t]), 1))
484 rst.append('\n')
486 rst.append('\n')
485 if not rst:
487 if not rst:
486 msg = _('no matches')
488 msg = _('no matches')
487 hint = _('try "hg help" for a list of topics')
489 hint = _('try "hg help" for a list of topics')
488 raise util.Abort(msg, hint=hint)
490 raise util.Abort(msg, hint=hint)
489 elif name and name != 'shortlist':
491 elif name and name != 'shortlist':
490 if unknowncmd:
492 if unknowncmd:
491 queries = (helpextcmd,)
493 queries = (helpextcmd,)
492 elif opts.get('extension'):
494 elif opts.get('extension'):
493 queries = (helpext,)
495 queries = (helpext,)
494 elif opts.get('command'):
496 elif opts.get('command'):
495 queries = (helpcmd,)
497 queries = (helpcmd,)
496 else:
498 else:
497 queries = (helptopic, helpcmd, helpext, helpextcmd)
499 queries = (helptopic, helpcmd, helpext, helpextcmd)
498 for f in queries:
500 for f in queries:
499 try:
501 try:
500 rst = f(name)
502 rst = f(name)
501 break
503 break
502 except error.UnknownCommand:
504 except error.UnknownCommand:
503 pass
505 pass
504 else:
506 else:
505 if unknowncmd:
507 if unknowncmd:
506 raise error.UnknownCommand(name)
508 raise error.UnknownCommand(name)
507 else:
509 else:
508 msg = _('no such help topic: %s') % name
510 msg = _('no such help topic: %s') % name
509 hint = _('try "hg help --keyword %s"') % name
511 hint = _('try "hg help --keyword %s"') % name
510 raise util.Abort(msg, hint=hint)
512 raise util.Abort(msg, hint=hint)
511 else:
513 else:
512 # program name
514 # program name
513 if not ui.quiet:
515 if not ui.quiet:
514 rst = [_("Mercurial Distributed SCM\n"), '\n']
516 rst = [_("Mercurial Distributed SCM\n"), '\n']
515 rst.extend(helplist())
517 rst.extend(helplist())
516
518
517 return ''.join(rst)
519 return ''.join(rst)
@@ -1,446 +1,448 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 for a pattern in specified files and revisions
310 grep search for a pattern in specified files and revisions
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 config Configuration Files
343 config Configuration Files
344 dates Date Formats
344 dates Date Formats
345 diffs Diff Formats
345 diffs Diff Formats
346 environment Environment Variables
346 environment Environment Variables
347 extensions Using Additional Features
347 extensions Using Additional Features
348 filesets Specifying File Sets
348 filesets Specifying File Sets
349 glossary Glossary
349 glossary Glossary
350 hgignore Syntax for Mercurial Ignore Files
350 hgignore Syntax for Mercurial Ignore Files
351 hgweb Configuring hgweb
351 hgweb Configuring hgweb
352 merge-tools Merge Tools
352 merge-tools Merge Tools
353 multirevs Specifying Multiple Revisions
353 multirevs Specifying Multiple Revisions
354 patterns File Name Patterns
354 patterns File Name Patterns
355 phases Working with Phases
355 phases Working with Phases
356 revisions Specifying Single Revisions
356 revisions Specifying Single Revisions
357 revsets Specifying Revision Sets
357 revsets Specifying Revision Sets
358 scripting Using Mercurial from scripts and automation
358 subrepos Subrepositories
359 subrepos Subrepositories
359 templating Template Usage
360 templating Template Usage
360 urls URL Paths
361 urls URL Paths
361
362
362 (use "hg help -v" to show built-in aliases and global options)
363 (use "hg help -v" to show built-in aliases and global options)
363
364
364
365
365
366
366 $ hg --help
367 $ hg --help
367 Mercurial Distributed SCM
368 Mercurial Distributed SCM
368
369
369 list of commands:
370 list of commands:
370
371
371 add add the specified files on the next commit
372 add add the specified files on the next commit
372 addremove add all new files, delete all missing files
373 addremove add all new files, delete all missing files
373 annotate show changeset information by line for each file
374 annotate show changeset information by line for each file
374 archive create an unversioned archive of a repository revision
375 archive create an unversioned archive of a repository revision
375 backout reverse effect of earlier changeset
376 backout reverse effect of earlier changeset
376 bisect subdivision search of changesets
377 bisect subdivision search of changesets
377 bookmarks create a new bookmark or list existing bookmarks
378 bookmarks create a new bookmark or list existing bookmarks
378 branch set or show the current branch name
379 branch set or show the current branch name
379 branches list repository named branches
380 branches list repository named branches
380 bundle create a changegroup file
381 bundle create a changegroup file
381 cat output the current or given revision of files
382 cat output the current or given revision of files
382 clone make a copy of an existing repository
383 clone make a copy of an existing repository
383 commit commit the specified files or all outstanding changes
384 commit commit the specified files or all outstanding changes
384 config show combined config settings from all hgrc files
385 config show combined config settings from all hgrc files
385 copy mark files as copied for the next commit
386 copy mark files as copied for the next commit
386 diff diff repository (or selected files)
387 diff diff repository (or selected files)
387 export dump the header and diffs for one or more changesets
388 export dump the header and diffs for one or more changesets
388 files list tracked files
389 files list tracked files
389 forget forget the specified files on the next commit
390 forget forget the specified files on the next commit
390 graft copy changes from other branches onto the current branch
391 graft copy changes from other branches onto the current branch
391 grep search for a pattern in specified files and revisions
392 grep search for a pattern in specified files and revisions
392 heads show branch heads
393 heads show branch heads
393 help show help for a given topic or a help overview
394 help show help for a given topic or a help overview
394 identify identify the working directory or specified revision
395 identify identify the working directory or specified revision
395 import import an ordered set of patches
396 import import an ordered set of patches
396 incoming show new changesets found in source
397 incoming show new changesets found in source
397 init create a new repository in the given directory
398 init create a new repository in the given directory
398 log show revision history of entire repository or files
399 log show revision history of entire repository or files
399 manifest output the current or given revision of the project manifest
400 manifest output the current or given revision of the project manifest
400 merge merge another revision into working directory
401 merge merge another revision into working directory
401 outgoing show changesets not found in the destination
402 outgoing show changesets not found in the destination
402 paths show aliases for remote repositories
403 paths show aliases for remote repositories
403 phase set or show the current phase name
404 phase set or show the current phase name
404 pull pull changes from the specified source
405 pull pull changes from the specified source
405 push push changes to the specified destination
406 push push changes to the specified destination
406 recover roll back an interrupted transaction
407 recover roll back an interrupted transaction
407 remove remove the specified files on the next commit
408 remove remove the specified files on the next commit
408 rename rename files; equivalent of copy + remove
409 rename rename files; equivalent of copy + remove
409 resolve redo merges or set/view the merge status of files
410 resolve redo merges or set/view the merge status of files
410 revert restore files to their checkout state
411 revert restore files to their checkout state
411 root print the root (top) of the current working directory
412 root print the root (top) of the current working directory
412 serve start stand-alone webserver
413 serve start stand-alone webserver
413 status show changed files in the working directory
414 status show changed files in the working directory
414 summary summarize working directory state
415 summary summarize working directory state
415 tag add one or more tags for the current or given revision
416 tag add one or more tags for the current or given revision
416 tags list repository tags
417 tags list repository tags
417 unbundle apply one or more changegroup files
418 unbundle apply one or more changegroup files
418 update update working directory (or switch revisions)
419 update update working directory (or switch revisions)
419 verify verify the integrity of the repository
420 verify verify the integrity of the repository
420 version output version and copyright information
421 version output version and copyright information
421
422
422 additional help topics:
423 additional help topics:
423
424
424 config Configuration Files
425 config Configuration Files
425 dates Date Formats
426 dates Date Formats
426 diffs Diff Formats
427 diffs Diff Formats
427 environment Environment Variables
428 environment Environment Variables
428 extensions Using Additional Features
429 extensions Using Additional Features
429 filesets Specifying File Sets
430 filesets Specifying File Sets
430 glossary Glossary
431 glossary Glossary
431 hgignore Syntax for Mercurial Ignore Files
432 hgignore Syntax for Mercurial Ignore Files
432 hgweb Configuring hgweb
433 hgweb Configuring hgweb
433 merge-tools Merge Tools
434 merge-tools Merge Tools
434 multirevs Specifying Multiple Revisions
435 multirevs Specifying Multiple Revisions
435 patterns File Name Patterns
436 patterns File Name Patterns
436 phases Working with Phases
437 phases Working with Phases
437 revisions Specifying Single Revisions
438 revisions Specifying Single Revisions
438 revsets Specifying Revision Sets
439 revsets Specifying Revision Sets
440 scripting Using Mercurial from scripts and automation
439 subrepos Subrepositories
441 subrepos Subrepositories
440 templating Template Usage
442 templating Template Usage
441 urls URL Paths
443 urls URL Paths
442
444
443 (use "hg help -v" to show built-in aliases and global options)
445 (use "hg help -v" to show built-in aliases and global options)
444
446
445 Not tested: --debugger
447 Not tested: --debugger
446
448
@@ -1,2260 +1,2270 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 for a pattern in specified files and revisions
72 grep search for a pattern in specified files and revisions
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 config Configuration Files
105 config Configuration Files
106 dates Date Formats
106 dates Date Formats
107 diffs Diff Formats
107 diffs Diff Formats
108 environment Environment Variables
108 environment Environment Variables
109 extensions Using Additional Features
109 extensions Using Additional Features
110 filesets Specifying File Sets
110 filesets Specifying File Sets
111 glossary Glossary
111 glossary Glossary
112 hgignore Syntax for Mercurial Ignore Files
112 hgignore Syntax for Mercurial Ignore Files
113 hgweb Configuring hgweb
113 hgweb Configuring hgweb
114 merge-tools Merge Tools
114 merge-tools Merge Tools
115 multirevs Specifying Multiple Revisions
115 multirevs Specifying Multiple Revisions
116 patterns File Name Patterns
116 patterns File Name Patterns
117 phases Working with Phases
117 phases Working with Phases
118 revisions Specifying Single Revisions
118 revisions Specifying Single Revisions
119 revsets Specifying Revision Sets
119 revsets Specifying Revision Sets
120 scripting Using Mercurial from scripts and automation
120 subrepos Subrepositories
121 subrepos Subrepositories
121 templating Template Usage
122 templating Template Usage
122 urls URL Paths
123 urls URL Paths
123
124
124 (use "hg help -v" to show built-in aliases and global options)
125 (use "hg help -v" to show built-in aliases and global options)
125
126
126 $ hg -q help
127 $ hg -q help
127 add add the specified files on the next commit
128 add add the specified files on the next commit
128 addremove add all new files, delete all missing files
129 addremove add all new files, delete all missing files
129 annotate show changeset information by line for each file
130 annotate show changeset information by line for each file
130 archive create an unversioned archive of a repository revision
131 archive create an unversioned archive of a repository revision
131 backout reverse effect of earlier changeset
132 backout reverse effect of earlier changeset
132 bisect subdivision search of changesets
133 bisect subdivision search of changesets
133 bookmarks create a new bookmark or list existing bookmarks
134 bookmarks create a new bookmark or list existing bookmarks
134 branch set or show the current branch name
135 branch set or show the current branch name
135 branches list repository named branches
136 branches list repository named branches
136 bundle create a changegroup file
137 bundle create a changegroup file
137 cat output the current or given revision of files
138 cat output the current or given revision of files
138 clone make a copy of an existing repository
139 clone make a copy of an existing repository
139 commit commit the specified files or all outstanding changes
140 commit commit the specified files or all outstanding changes
140 config show combined config settings from all hgrc files
141 config show combined config settings from all hgrc files
141 copy mark files as copied for the next commit
142 copy mark files as copied for the next commit
142 diff diff repository (or selected files)
143 diff diff repository (or selected files)
143 export dump the header and diffs for one or more changesets
144 export dump the header and diffs for one or more changesets
144 files list tracked files
145 files list tracked files
145 forget forget the specified files on the next commit
146 forget forget the specified files on the next commit
146 graft copy changes from other branches onto the current branch
147 graft copy changes from other branches onto the current branch
147 grep search for a pattern in specified files and revisions
148 grep search for a pattern in specified files and revisions
148 heads show branch heads
149 heads show branch heads
149 help show help for a given topic or a help overview
150 help show help for a given topic or a help overview
150 identify identify the working directory or specified revision
151 identify identify the working directory or specified revision
151 import import an ordered set of patches
152 import import an ordered set of patches
152 incoming show new changesets found in source
153 incoming show new changesets found in source
153 init create a new repository in the given directory
154 init create a new repository in the given directory
154 log show revision history of entire repository or files
155 log show revision history of entire repository or files
155 manifest output the current or given revision of the project manifest
156 manifest output the current or given revision of the project manifest
156 merge merge another revision into working directory
157 merge merge another revision into working directory
157 outgoing show changesets not found in the destination
158 outgoing show changesets not found in the destination
158 paths show aliases for remote repositories
159 paths show aliases for remote repositories
159 phase set or show the current phase name
160 phase set or show the current phase name
160 pull pull changes from the specified source
161 pull pull changes from the specified source
161 push push changes to the specified destination
162 push push changes to the specified destination
162 recover roll back an interrupted transaction
163 recover roll back an interrupted transaction
163 remove remove the specified files on the next commit
164 remove remove the specified files on the next commit
164 rename rename files; equivalent of copy + remove
165 rename rename files; equivalent of copy + remove
165 resolve redo merges or set/view the merge status of files
166 resolve redo merges or set/view the merge status of files
166 revert restore files to their checkout state
167 revert restore files to their checkout state
167 root print the root (top) of the current working directory
168 root print the root (top) of the current working directory
168 serve start stand-alone webserver
169 serve start stand-alone webserver
169 status show changed files in the working directory
170 status show changed files in the working directory
170 summary summarize working directory state
171 summary summarize working directory state
171 tag add one or more tags for the current or given revision
172 tag add one or more tags for the current or given revision
172 tags list repository tags
173 tags list repository tags
173 unbundle apply one or more changegroup files
174 unbundle apply one or more changegroup files
174 update update working directory (or switch revisions)
175 update update working directory (or switch revisions)
175 verify verify the integrity of the repository
176 verify verify the integrity of the repository
176 version output version and copyright information
177 version output version and copyright information
177
178
178 additional help topics:
179 additional help topics:
179
180
180 config Configuration Files
181 config Configuration Files
181 dates Date Formats
182 dates Date Formats
182 diffs Diff Formats
183 diffs Diff Formats
183 environment Environment Variables
184 environment Environment Variables
184 extensions Using Additional Features
185 extensions Using Additional Features
185 filesets Specifying File Sets
186 filesets Specifying File Sets
186 glossary Glossary
187 glossary Glossary
187 hgignore Syntax for Mercurial Ignore Files
188 hgignore Syntax for Mercurial Ignore Files
188 hgweb Configuring hgweb
189 hgweb Configuring hgweb
189 merge-tools Merge Tools
190 merge-tools Merge Tools
190 multirevs Specifying Multiple Revisions
191 multirevs Specifying Multiple Revisions
191 patterns File Name Patterns
192 patterns File Name Patterns
192 phases Working with Phases
193 phases Working with Phases
193 revisions Specifying Single Revisions
194 revisions Specifying Single Revisions
194 revsets Specifying Revision Sets
195 revsets Specifying Revision Sets
196 scripting Using Mercurial from scripts and automation
195 subrepos Subrepositories
197 subrepos Subrepositories
196 templating Template Usage
198 templating Template Usage
197 urls URL Paths
199 urls URL Paths
198
200
199 Test extension help:
201 Test extension help:
200 $ hg help extensions --config extensions.rebase= --config extensions.children=
202 $ hg help extensions --config extensions.rebase= --config extensions.children=
201 Using Additional Features
203 Using Additional Features
202 """""""""""""""""""""""""
204 """""""""""""""""""""""""
203
205
204 Mercurial has the ability to add new features through the use of
206 Mercurial has the ability to add new features through the use of
205 extensions. Extensions may add new commands, add options to existing
207 extensions. Extensions may add new commands, add options to existing
206 commands, change the default behavior of commands, or implement hooks.
208 commands, change the default behavior of commands, or implement hooks.
207
209
208 To enable the "foo" extension, either shipped with Mercurial or in the
210 To enable the "foo" extension, either shipped with Mercurial or in the
209 Python search path, create an entry for it in your configuration file,
211 Python search path, create an entry for it in your configuration file,
210 like this:
212 like this:
211
213
212 [extensions]
214 [extensions]
213 foo =
215 foo =
214
216
215 You may also specify the full path to an extension:
217 You may also specify the full path to an extension:
216
218
217 [extensions]
219 [extensions]
218 myfeature = ~/.hgext/myfeature.py
220 myfeature = ~/.hgext/myfeature.py
219
221
220 See "hg help config" for more information on configuration files.
222 See "hg help config" for more information on configuration files.
221
223
222 Extensions are not loaded by default for a variety of reasons: they can
224 Extensions are not loaded by default for a variety of reasons: they can
223 increase startup overhead; they may be meant for advanced usage only; they
225 increase startup overhead; they may be meant for advanced usage only; they
224 may provide potentially dangerous abilities (such as letting you destroy
226 may provide potentially dangerous abilities (such as letting you destroy
225 or modify history); they might not be ready for prime time; or they may
227 or modify history); they might not be ready for prime time; or they may
226 alter some usual behaviors of stock Mercurial. It is thus up to the user
228 alter some usual behaviors of stock Mercurial. It is thus up to the user
227 to activate extensions as needed.
229 to activate extensions as needed.
228
230
229 To explicitly disable an extension enabled in a configuration file of
231 To explicitly disable an extension enabled in a configuration file of
230 broader scope, prepend its path with !:
232 broader scope, prepend its path with !:
231
233
232 [extensions]
234 [extensions]
233 # disabling extension bar residing in /path/to/extension/bar.py
235 # disabling extension bar residing in /path/to/extension/bar.py
234 bar = !/path/to/extension/bar.py
236 bar = !/path/to/extension/bar.py
235 # ditto, but no path was supplied for extension baz
237 # ditto, but no path was supplied for extension baz
236 baz = !
238 baz = !
237
239
238 enabled extensions:
240 enabled extensions:
239
241
240 children command to display child changesets (DEPRECATED)
242 children command to display child changesets (DEPRECATED)
241 rebase command to move sets of revisions to a different ancestor
243 rebase command to move sets of revisions to a different ancestor
242
244
243 disabled extensions:
245 disabled extensions:
244
246
245 acl hooks for controlling repository access
247 acl hooks for controlling repository access
246 blackbox log repository events to a blackbox for debugging
248 blackbox log repository events to a blackbox for debugging
247 bugzilla hooks for integrating with the Bugzilla bug tracker
249 bugzilla hooks for integrating with the Bugzilla bug tracker
248 censor erase file content at a given revision
250 censor erase file content at a given revision
249 churn command to display statistics about repository history
251 churn command to display statistics about repository history
250 color colorize output from some commands
252 color colorize output from some commands
251 convert import revisions from foreign VCS repositories into
253 convert import revisions from foreign VCS repositories into
252 Mercurial
254 Mercurial
253 eol automatically manage newlines in repository files
255 eol automatically manage newlines in repository files
254 extdiff command to allow external programs to compare revisions
256 extdiff command to allow external programs to compare revisions
255 factotum http authentication with factotum
257 factotum http authentication with factotum
256 gpg commands to sign and verify changesets
258 gpg commands to sign and verify changesets
257 hgcia hooks for integrating with the CIA.vc notification service
259 hgcia hooks for integrating with the CIA.vc notification service
258 hgk browse the repository in a graphical way
260 hgk browse the repository in a graphical way
259 highlight syntax highlighting for hgweb (requires Pygments)
261 highlight syntax highlighting for hgweb (requires Pygments)
260 histedit interactive history editing
262 histedit interactive history editing
261 keyword expand keywords in tracked files
263 keyword expand keywords in tracked files
262 largefiles track large binary files
264 largefiles track large binary files
263 mq manage a stack of patches
265 mq manage a stack of patches
264 notify hooks for sending email push notifications
266 notify hooks for sending email push notifications
265 pager browse command output with an external pager
267 pager browse command output with an external pager
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 record commands to interactively select changes for
271 record commands to interactively select changes for
270 commit/qrefresh
272 commit/qrefresh
271 relink recreates hardlinks between repository clones
273 relink recreates hardlinks between repository clones
272 schemes extend schemes with shortcuts to repository swarms
274 schemes extend schemes with shortcuts to repository swarms
273 share share a common history between several working directories
275 share share a common history between several working directories
274 shelve save and restore changes to the working directory
276 shelve save and restore changes to the working directory
275 strip strip changesets and their descendants from history
277 strip strip changesets and their descendants from history
276 transplant command to transplant changesets from another branch
278 transplant command to transplant changesets from another branch
277 win32mbcs allow the use of MBCS paths with problematic encodings
279 win32mbcs allow the use of MBCS paths with problematic encodings
278 zeroconf discover and advertise repositories on the local network
280 zeroconf discover and advertise repositories on the local network
279 Test short command list with verbose option
281 Test short command list with verbose option
280
282
281 $ hg -v help shortlist
283 $ hg -v help shortlist
282 Mercurial Distributed SCM
284 Mercurial Distributed SCM
283
285
284 basic commands:
286 basic commands:
285
287
286 add add the specified files on the next commit
288 add add the specified files on the next commit
287 annotate, blame
289 annotate, blame
288 show changeset information by line for each file
290 show changeset information by line for each file
289 clone make a copy of an existing repository
291 clone make a copy of an existing repository
290 commit, ci commit the specified files or all outstanding changes
292 commit, ci commit the specified files or all outstanding changes
291 diff diff repository (or selected files)
293 diff diff repository (or selected files)
292 export dump the header and diffs for one or more changesets
294 export dump the header and diffs for one or more changesets
293 forget forget the specified files on the next commit
295 forget forget the specified files on the next commit
294 init create a new repository in the given directory
296 init create a new repository in the given directory
295 log, history show revision history of entire repository or files
297 log, history show revision history of entire repository or files
296 merge merge another revision into working directory
298 merge merge another revision into working directory
297 pull pull changes from the specified source
299 pull pull changes from the specified source
298 push push changes to the specified destination
300 push push changes to the specified destination
299 remove, rm remove the specified files on the next commit
301 remove, rm remove the specified files on the next commit
300 serve start stand-alone webserver
302 serve start stand-alone webserver
301 status, st show changed files in the working directory
303 status, st show changed files in the working directory
302 summary, sum summarize working directory state
304 summary, sum summarize working directory state
303 update, up, checkout, co
305 update, up, checkout, co
304 update working directory (or switch revisions)
306 update working directory (or switch revisions)
305
307
306 global options ([+] can be repeated):
308 global options ([+] can be repeated):
307
309
308 -R --repository REPO repository root directory or name of overlay bundle
310 -R --repository REPO repository root directory or name of overlay bundle
309 file
311 file
310 --cwd DIR change working directory
312 --cwd DIR change working directory
311 -y --noninteractive do not prompt, automatically pick the first choice for
313 -y --noninteractive do not prompt, automatically pick the first choice for
312 all prompts
314 all prompts
313 -q --quiet suppress output
315 -q --quiet suppress output
314 -v --verbose enable additional output
316 -v --verbose enable additional output
315 --config CONFIG [+] set/override config option (use 'section.name=value')
317 --config CONFIG [+] set/override config option (use 'section.name=value')
316 --debug enable debugging output
318 --debug enable debugging output
317 --debugger start debugger
319 --debugger start debugger
318 --encoding ENCODE set the charset encoding (default: ascii)
320 --encoding ENCODE set the charset encoding (default: ascii)
319 --encodingmode MODE set the charset encoding mode (default: strict)
321 --encodingmode MODE set the charset encoding mode (default: strict)
320 --traceback always print a traceback on exception
322 --traceback always print a traceback on exception
321 --time time how long the command takes
323 --time time how long the command takes
322 --profile print command execution profile
324 --profile print command execution profile
323 --version output version information and exit
325 --version output version information and exit
324 -h --help display help and exit
326 -h --help display help and exit
325 --hidden consider hidden changesets
327 --hidden consider hidden changesets
326
328
327 (use "hg help" for the full list of commands)
329 (use "hg help" for the full list of commands)
328
330
329 $ hg add -h
331 $ hg add -h
330 hg add [OPTION]... [FILE]...
332 hg add [OPTION]... [FILE]...
331
333
332 add the specified files on the next commit
334 add the specified files on the next commit
333
335
334 Schedule files to be version controlled and added to the repository.
336 Schedule files to be version controlled and added to the repository.
335
337
336 The files will be added to the repository at the next commit. To undo an
338 The files will be added to the repository at the next commit. To undo an
337 add before that, see "hg forget".
339 add before that, see "hg forget".
338
340
339 If no names are given, add all files to the repository.
341 If no names are given, add all files to the repository.
340
342
341 Returns 0 if all files are successfully added.
343 Returns 0 if all files are successfully added.
342
344
343 options ([+] can be repeated):
345 options ([+] can be repeated):
344
346
345 -I --include PATTERN [+] include names matching the given patterns
347 -I --include PATTERN [+] include names matching the given patterns
346 -X --exclude PATTERN [+] exclude names matching the given patterns
348 -X --exclude PATTERN [+] exclude names matching the given patterns
347 -S --subrepos recurse into subrepositories
349 -S --subrepos recurse into subrepositories
348 -n --dry-run do not perform actions, just print output
350 -n --dry-run do not perform actions, just print output
349
351
350 (some details hidden, use --verbose to show complete help)
352 (some details hidden, use --verbose to show complete help)
351
353
352 Verbose help for add
354 Verbose help for add
353
355
354 $ hg add -hv
356 $ hg add -hv
355 hg add [OPTION]... [FILE]...
357 hg add [OPTION]... [FILE]...
356
358
357 add the specified files on the next commit
359 add the specified files on the next commit
358
360
359 Schedule files to be version controlled and added to the repository.
361 Schedule files to be version controlled and added to the repository.
360
362
361 The files will be added to the repository at the next commit. To undo an
363 The files will be added to the repository at the next commit. To undo an
362 add before that, see "hg forget".
364 add before that, see "hg forget".
363
365
364 If no names are given, add all files to the repository.
366 If no names are given, add all files to the repository.
365
367
366 An example showing how new (unknown) files are added automatically by "hg
368 An example showing how new (unknown) files are added automatically by "hg
367 add":
369 add":
368
370
369 $ ls
371 $ ls
370 foo.c
372 foo.c
371 $ hg status
373 $ hg status
372 ? foo.c
374 ? foo.c
373 $ hg add
375 $ hg add
374 adding foo.c
376 adding foo.c
375 $ hg status
377 $ hg status
376 A foo.c
378 A foo.c
377
379
378 Returns 0 if all files are successfully added.
380 Returns 0 if all files are successfully added.
379
381
380 options ([+] can be repeated):
382 options ([+] can be repeated):
381
383
382 -I --include PATTERN [+] include names matching the given patterns
384 -I --include PATTERN [+] include names matching the given patterns
383 -X --exclude PATTERN [+] exclude names matching the given patterns
385 -X --exclude PATTERN [+] exclude names matching the given patterns
384 -S --subrepos recurse into subrepositories
386 -S --subrepos recurse into subrepositories
385 -n --dry-run do not perform actions, just print output
387 -n --dry-run do not perform actions, just print output
386
388
387 global options ([+] can be repeated):
389 global options ([+] can be repeated):
388
390
389 -R --repository REPO repository root directory or name of overlay bundle
391 -R --repository REPO repository root directory or name of overlay bundle
390 file
392 file
391 --cwd DIR change working directory
393 --cwd DIR change working directory
392 -y --noninteractive do not prompt, automatically pick the first choice for
394 -y --noninteractive do not prompt, automatically pick the first choice for
393 all prompts
395 all prompts
394 -q --quiet suppress output
396 -q --quiet suppress output
395 -v --verbose enable additional output
397 -v --verbose enable additional output
396 --config CONFIG [+] set/override config option (use 'section.name=value')
398 --config CONFIG [+] set/override config option (use 'section.name=value')
397 --debug enable debugging output
399 --debug enable debugging output
398 --debugger start debugger
400 --debugger start debugger
399 --encoding ENCODE set the charset encoding (default: ascii)
401 --encoding ENCODE set the charset encoding (default: ascii)
400 --encodingmode MODE set the charset encoding mode (default: strict)
402 --encodingmode MODE set the charset encoding mode (default: strict)
401 --traceback always print a traceback on exception
403 --traceback always print a traceback on exception
402 --time time how long the command takes
404 --time time how long the command takes
403 --profile print command execution profile
405 --profile print command execution profile
404 --version output version information and exit
406 --version output version information and exit
405 -h --help display help and exit
407 -h --help display help and exit
406 --hidden consider hidden changesets
408 --hidden consider hidden changesets
407
409
408 Test help option with version option
410 Test help option with version option
409
411
410 $ hg add -h --version
412 $ hg add -h --version
411 Mercurial Distributed SCM (version *) (glob)
413 Mercurial Distributed SCM (version *) (glob)
412 (see http://mercurial.selenic.com for more information)
414 (see http://mercurial.selenic.com for more information)
413
415
414 Copyright (C) 2005-2015 Matt Mackall and others
416 Copyright (C) 2005-2015 Matt Mackall and others
415 This is free software; see the source for copying conditions. There is NO
417 This is free software; see the source for copying conditions. There is NO
416 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
418 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
417
419
418 $ hg add --skjdfks
420 $ hg add --skjdfks
419 hg add: option --skjdfks not recognized
421 hg add: option --skjdfks not recognized
420 hg add [OPTION]... [FILE]...
422 hg add [OPTION]... [FILE]...
421
423
422 add the specified files on the next commit
424 add the specified files on the next commit
423
425
424 options ([+] can be repeated):
426 options ([+] can be repeated):
425
427
426 -I --include PATTERN [+] include names matching the given patterns
428 -I --include PATTERN [+] include names matching the given patterns
427 -X --exclude PATTERN [+] exclude names matching the given patterns
429 -X --exclude PATTERN [+] exclude names matching the given patterns
428 -S --subrepos recurse into subrepositories
430 -S --subrepos recurse into subrepositories
429 -n --dry-run do not perform actions, just print output
431 -n --dry-run do not perform actions, just print output
430
432
431 (use "hg add -h" to show more help)
433 (use "hg add -h" to show more help)
432 [255]
434 [255]
433
435
434 Test ambiguous command help
436 Test ambiguous command help
435
437
436 $ hg help ad
438 $ hg help ad
437 list of commands:
439 list of commands:
438
440
439 add add the specified files on the next commit
441 add add the specified files on the next commit
440 addremove add all new files, delete all missing files
442 addremove add all new files, delete all missing files
441
443
442 (use "hg help -v ad" to show built-in aliases and global options)
444 (use "hg help -v ad" to show built-in aliases and global options)
443
445
444 Test command without options
446 Test command without options
445
447
446 $ hg help verify
448 $ hg help verify
447 hg verify
449 hg verify
448
450
449 verify the integrity of the repository
451 verify the integrity of the repository
450
452
451 Verify the integrity of the current repository.
453 Verify the integrity of the current repository.
452
454
453 This will perform an extensive check of the repository's integrity,
455 This will perform an extensive check of the repository's integrity,
454 validating the hashes and checksums of each entry in the changelog,
456 validating the hashes and checksums of each entry in the changelog,
455 manifest, and tracked files, as well as the integrity of their crosslinks
457 manifest, and tracked files, as well as the integrity of their crosslinks
456 and indices.
458 and indices.
457
459
458 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
460 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
459 information about recovery from corruption of the repository.
461 information about recovery from corruption of the repository.
460
462
461 Returns 0 on success, 1 if errors are encountered.
463 Returns 0 on success, 1 if errors are encountered.
462
464
463 (some details hidden, use --verbose to show complete help)
465 (some details hidden, use --verbose to show complete help)
464
466
465 $ hg help diff
467 $ hg help diff
466 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
468 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
467
469
468 diff repository (or selected files)
470 diff repository (or selected files)
469
471
470 Show differences between revisions for the specified files.
472 Show differences between revisions for the specified files.
471
473
472 Differences between files are shown using the unified diff format.
474 Differences between files are shown using the unified diff format.
473
475
474 Note:
476 Note:
475 diff may generate unexpected results for merges, as it will default to
477 diff may generate unexpected results for merges, as it will default to
476 comparing against the working directory's first parent changeset if no
478 comparing against the working directory's first parent changeset if no
477 revisions are specified.
479 revisions are specified.
478
480
479 When two revision arguments are given, then changes are shown between
481 When two revision arguments are given, then changes are shown between
480 those revisions. If only one revision is specified then that revision is
482 those revisions. If only one revision is specified then that revision is
481 compared to the working directory, and, when no revisions are specified,
483 compared to the working directory, and, when no revisions are specified,
482 the working directory files are compared to its parent.
484 the working directory files are compared to its parent.
483
485
484 Alternatively you can specify -c/--change with a revision to see the
486 Alternatively you can specify -c/--change with a revision to see the
485 changes in that changeset relative to its first parent.
487 changes in that changeset relative to its first parent.
486
488
487 Without the -a/--text option, diff will avoid generating diffs of files it
489 Without the -a/--text option, diff will avoid generating diffs of files it
488 detects as binary. With -a, diff will generate a diff anyway, probably
490 detects as binary. With -a, diff will generate a diff anyway, probably
489 with undesirable results.
491 with undesirable results.
490
492
491 Use the -g/--git option to generate diffs in the git extended diff format.
493 Use the -g/--git option to generate diffs in the git extended diff format.
492 For more information, read "hg help diffs".
494 For more information, read "hg help diffs".
493
495
494 Returns 0 on success.
496 Returns 0 on success.
495
497
496 options ([+] can be repeated):
498 options ([+] can be repeated):
497
499
498 -r --rev REV [+] revision
500 -r --rev REV [+] revision
499 -c --change REV change made by revision
501 -c --change REV change made by revision
500 -a --text treat all files as text
502 -a --text treat all files as text
501 -g --git use git extended diff format
503 -g --git use git extended diff format
502 --nodates omit dates from diff headers
504 --nodates omit dates from diff headers
503 --noprefix omit a/ and b/ prefixes from filenames
505 --noprefix omit a/ and b/ prefixes from filenames
504 -p --show-function show which function each change is in
506 -p --show-function show which function each change is in
505 --reverse produce a diff that undoes the changes
507 --reverse produce a diff that undoes the changes
506 -w --ignore-all-space ignore white space when comparing lines
508 -w --ignore-all-space ignore white space when comparing lines
507 -b --ignore-space-change ignore changes in the amount of white space
509 -b --ignore-space-change ignore changes in the amount of white space
508 -B --ignore-blank-lines ignore changes whose lines are all blank
510 -B --ignore-blank-lines ignore changes whose lines are all blank
509 -U --unified NUM number of lines of context to show
511 -U --unified NUM number of lines of context to show
510 --stat output diffstat-style summary of changes
512 --stat output diffstat-style summary of changes
511 --root DIR produce diffs relative to subdirectory
513 --root DIR produce diffs relative to subdirectory
512 -I --include PATTERN [+] include names matching the given patterns
514 -I --include PATTERN [+] include names matching the given patterns
513 -X --exclude PATTERN [+] exclude names matching the given patterns
515 -X --exclude PATTERN [+] exclude names matching the given patterns
514 -S --subrepos recurse into subrepositories
516 -S --subrepos recurse into subrepositories
515
517
516 (some details hidden, use --verbose to show complete help)
518 (some details hidden, use --verbose to show complete help)
517
519
518 $ hg help status
520 $ hg help status
519 hg status [OPTION]... [FILE]...
521 hg status [OPTION]... [FILE]...
520
522
521 aliases: st
523 aliases: st
522
524
523 show changed files in the working directory
525 show changed files in the working directory
524
526
525 Show status of files in the repository. If names are given, only files
527 Show status of files in the repository. If names are given, only files
526 that match are shown. Files that are clean or ignored or the source of a
528 that match are shown. Files that are clean or ignored or the source of a
527 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
529 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
528 -C/--copies or -A/--all are given. Unless options described with "show
530 -C/--copies or -A/--all are given. Unless options described with "show
529 only ..." are given, the options -mardu are used.
531 only ..." are given, the options -mardu are used.
530
532
531 Option -q/--quiet hides untracked (unknown and ignored) files unless
533 Option -q/--quiet hides untracked (unknown and ignored) files unless
532 explicitly requested with -u/--unknown or -i/--ignored.
534 explicitly requested with -u/--unknown or -i/--ignored.
533
535
534 Note:
536 Note:
535 status may appear to disagree with diff if permissions have changed or
537 status may appear to disagree with diff if permissions have changed or
536 a merge has occurred. The standard diff format does not report
538 a merge has occurred. The standard diff format does not report
537 permission changes and diff only reports changes relative to one merge
539 permission changes and diff only reports changes relative to one merge
538 parent.
540 parent.
539
541
540 If one revision is given, it is used as the base revision. If two
542 If one revision is given, it is used as the base revision. If two
541 revisions are given, the differences between them are shown. The --change
543 revisions are given, the differences between them are shown. The --change
542 option can also be used as a shortcut to list the changed files of a
544 option can also be used as a shortcut to list the changed files of a
543 revision from its first parent.
545 revision from its first parent.
544
546
545 The codes used to show the status of files are:
547 The codes used to show the status of files are:
546
548
547 M = modified
549 M = modified
548 A = added
550 A = added
549 R = removed
551 R = removed
550 C = clean
552 C = clean
551 ! = missing (deleted by non-hg command, but still tracked)
553 ! = missing (deleted by non-hg command, but still tracked)
552 ? = not tracked
554 ? = not tracked
553 I = ignored
555 I = ignored
554 = origin of the previous file (with --copies)
556 = origin of the previous file (with --copies)
555
557
556 Returns 0 on success.
558 Returns 0 on success.
557
559
558 options ([+] can be repeated):
560 options ([+] can be repeated):
559
561
560 -A --all show status of all files
562 -A --all show status of all files
561 -m --modified show only modified files
563 -m --modified show only modified files
562 -a --added show only added files
564 -a --added show only added files
563 -r --removed show only removed files
565 -r --removed show only removed files
564 -d --deleted show only deleted (but tracked) files
566 -d --deleted show only deleted (but tracked) files
565 -c --clean show only files without changes
567 -c --clean show only files without changes
566 -u --unknown show only unknown (not tracked) files
568 -u --unknown show only unknown (not tracked) files
567 -i --ignored show only ignored files
569 -i --ignored show only ignored files
568 -n --no-status hide status prefix
570 -n --no-status hide status prefix
569 -C --copies show source of copied files
571 -C --copies show source of copied files
570 -0 --print0 end filenames with NUL, for use with xargs
572 -0 --print0 end filenames with NUL, for use with xargs
571 --rev REV [+] show difference from revision
573 --rev REV [+] show difference from revision
572 --change REV list the changed files of a revision
574 --change REV list the changed files of a revision
573 -I --include PATTERN [+] include names matching the given patterns
575 -I --include PATTERN [+] include names matching the given patterns
574 -X --exclude PATTERN [+] exclude names matching the given patterns
576 -X --exclude PATTERN [+] exclude names matching the given patterns
575 -S --subrepos recurse into subrepositories
577 -S --subrepos recurse into subrepositories
576
578
577 (some details hidden, use --verbose to show complete help)
579 (some details hidden, use --verbose to show complete help)
578
580
579 $ hg -q help status
581 $ hg -q help status
580 hg status [OPTION]... [FILE]...
582 hg status [OPTION]... [FILE]...
581
583
582 show changed files in the working directory
584 show changed files in the working directory
583
585
584 $ hg help foo
586 $ hg help foo
585 abort: no such help topic: foo
587 abort: no such help topic: foo
586 (try "hg help --keyword foo")
588 (try "hg help --keyword foo")
587 [255]
589 [255]
588
590
589 $ hg skjdfks
591 $ hg skjdfks
590 hg: unknown command 'skjdfks'
592 hg: unknown command 'skjdfks'
591 Mercurial Distributed SCM
593 Mercurial Distributed SCM
592
594
593 basic commands:
595 basic commands:
594
596
595 add add the specified files on the next commit
597 add add the specified files on the next commit
596 annotate show changeset information by line for each file
598 annotate show changeset information by line for each file
597 clone make a copy of an existing repository
599 clone make a copy of an existing repository
598 commit commit the specified files or all outstanding changes
600 commit commit the specified files or all outstanding changes
599 diff diff repository (or selected files)
601 diff diff repository (or selected files)
600 export dump the header and diffs for one or more changesets
602 export dump the header and diffs for one or more changesets
601 forget forget the specified files on the next commit
603 forget forget the specified files on the next commit
602 init create a new repository in the given directory
604 init create a new repository in the given directory
603 log show revision history of entire repository or files
605 log show revision history of entire repository or files
604 merge merge another revision into working directory
606 merge merge another revision into working directory
605 pull pull changes from the specified source
607 pull pull changes from the specified source
606 push push changes to the specified destination
608 push push changes to the specified destination
607 remove remove the specified files on the next commit
609 remove remove the specified files on the next commit
608 serve start stand-alone webserver
610 serve start stand-alone webserver
609 status show changed files in the working directory
611 status show changed files in the working directory
610 summary summarize working directory state
612 summary summarize working directory state
611 update update working directory (or switch revisions)
613 update update working directory (or switch revisions)
612
614
613 (use "hg help" for the full list of commands or "hg -v" for details)
615 (use "hg help" for the full list of commands or "hg -v" for details)
614 [255]
616 [255]
615
617
616
618
617 $ cat > helpext.py <<EOF
619 $ cat > helpext.py <<EOF
618 > import os
620 > import os
619 > from mercurial import cmdutil, commands
621 > from mercurial import cmdutil, commands
620 >
622 >
621 > cmdtable = {}
623 > cmdtable = {}
622 > command = cmdutil.command(cmdtable)
624 > command = cmdutil.command(cmdtable)
623 >
625 >
624 > @command('nohelp',
626 > @command('nohelp',
625 > [('', 'longdesc', 3, 'x'*90),
627 > [('', 'longdesc', 3, 'x'*90),
626 > ('n', '', None, 'normal desc'),
628 > ('n', '', None, 'normal desc'),
627 > ('', 'newline', '', 'line1\nline2')],
629 > ('', 'newline', '', 'line1\nline2')],
628 > 'hg nohelp',
630 > 'hg nohelp',
629 > norepo=True)
631 > norepo=True)
630 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
632 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
631 > @command('debugoptEXP', [('', 'eopt', None, 'option is EXPERIMENTAL')])
633 > @command('debugoptEXP', [('', 'eopt', None, 'option is EXPERIMENTAL')])
632 > def nohelp(ui, *args, **kwargs):
634 > def nohelp(ui, *args, **kwargs):
633 > pass
635 > pass
634 >
636 >
635 > EOF
637 > EOF
636 $ echo '[extensions]' >> $HGRCPATH
638 $ echo '[extensions]' >> $HGRCPATH
637 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
639 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
638
640
639 Test command with no help text
641 Test command with no help text
640
642
641 $ hg help nohelp
643 $ hg help nohelp
642 hg nohelp
644 hg nohelp
643
645
644 (no help text available)
646 (no help text available)
645
647
646 options:
648 options:
647
649
648 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
650 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
649 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
651 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
650 -n -- normal desc
652 -n -- normal desc
651 --newline VALUE line1 line2
653 --newline VALUE line1 line2
652
654
653 (some details hidden, use --verbose to show complete help)
655 (some details hidden, use --verbose to show complete help)
654
656
655 $ hg help -k nohelp
657 $ hg help -k nohelp
656 Commands:
658 Commands:
657
659
658 nohelp hg nohelp
660 nohelp hg nohelp
659
661
660 Extension Commands:
662 Extension Commands:
661
663
662 nohelp (no help text available)
664 nohelp (no help text available)
663
665
664 Test that default list of commands omits extension commands
666 Test that default list of commands omits extension commands
665
667
666 $ hg help
668 $ hg help
667 Mercurial Distributed SCM
669 Mercurial Distributed SCM
668
670
669 list of commands:
671 list of commands:
670
672
671 add add the specified files on the next commit
673 add add the specified files on the next commit
672 addremove add all new files, delete all missing files
674 addremove add all new files, delete all missing files
673 annotate show changeset information by line for each file
675 annotate show changeset information by line for each file
674 archive create an unversioned archive of a repository revision
676 archive create an unversioned archive of a repository revision
675 backout reverse effect of earlier changeset
677 backout reverse effect of earlier changeset
676 bisect subdivision search of changesets
678 bisect subdivision search of changesets
677 bookmarks create a new bookmark or list existing bookmarks
679 bookmarks create a new bookmark or list existing bookmarks
678 branch set or show the current branch name
680 branch set or show the current branch name
679 branches list repository named branches
681 branches list repository named branches
680 bundle create a changegroup file
682 bundle create a changegroup file
681 cat output the current or given revision of files
683 cat output the current or given revision of files
682 clone make a copy of an existing repository
684 clone make a copy of an existing repository
683 commit commit the specified files or all outstanding changes
685 commit commit the specified files or all outstanding changes
684 config show combined config settings from all hgrc files
686 config show combined config settings from all hgrc files
685 copy mark files as copied for the next commit
687 copy mark files as copied for the next commit
686 diff diff repository (or selected files)
688 diff diff repository (or selected files)
687 export dump the header and diffs for one or more changesets
689 export dump the header and diffs for one or more changesets
688 files list tracked files
690 files list tracked files
689 forget forget the specified files on the next commit
691 forget forget the specified files on the next commit
690 graft copy changes from other branches onto the current branch
692 graft copy changes from other branches onto the current branch
691 grep search for a pattern in specified files and revisions
693 grep search for a pattern in specified files and revisions
692 heads show branch heads
694 heads show branch heads
693 help show help for a given topic or a help overview
695 help show help for a given topic or a help overview
694 identify identify the working directory or specified revision
696 identify identify the working directory or specified revision
695 import import an ordered set of patches
697 import import an ordered set of patches
696 incoming show new changesets found in source
698 incoming show new changesets found in source
697 init create a new repository in the given directory
699 init create a new repository in the given directory
698 log show revision history of entire repository or files
700 log show revision history of entire repository or files
699 manifest output the current or given revision of the project manifest
701 manifest output the current or given revision of the project manifest
700 merge merge another revision into working directory
702 merge merge another revision into working directory
701 outgoing show changesets not found in the destination
703 outgoing show changesets not found in the destination
702 paths show aliases for remote repositories
704 paths show aliases for remote repositories
703 phase set or show the current phase name
705 phase set or show the current phase name
704 pull pull changes from the specified source
706 pull pull changes from the specified source
705 push push changes to the specified destination
707 push push changes to the specified destination
706 recover roll back an interrupted transaction
708 recover roll back an interrupted transaction
707 remove remove the specified files on the next commit
709 remove remove the specified files on the next commit
708 rename rename files; equivalent of copy + remove
710 rename rename files; equivalent of copy + remove
709 resolve redo merges or set/view the merge status of files
711 resolve redo merges or set/view the merge status of files
710 revert restore files to their checkout state
712 revert restore files to their checkout state
711 root print the root (top) of the current working directory
713 root print the root (top) of the current working directory
712 serve start stand-alone webserver
714 serve start stand-alone webserver
713 status show changed files in the working directory
715 status show changed files in the working directory
714 summary summarize working directory state
716 summary summarize working directory state
715 tag add one or more tags for the current or given revision
717 tag add one or more tags for the current or given revision
716 tags list repository tags
718 tags list repository tags
717 unbundle apply one or more changegroup files
719 unbundle apply one or more changegroup files
718 update update working directory (or switch revisions)
720 update update working directory (or switch revisions)
719 verify verify the integrity of the repository
721 verify verify the integrity of the repository
720 version output version and copyright information
722 version output version and copyright information
721
723
722 enabled extensions:
724 enabled extensions:
723
725
724 helpext (no help text available)
726 helpext (no help text available)
725
727
726 additional help topics:
728 additional help topics:
727
729
728 config Configuration Files
730 config Configuration Files
729 dates Date Formats
731 dates Date Formats
730 diffs Diff Formats
732 diffs Diff Formats
731 environment Environment Variables
733 environment Environment Variables
732 extensions Using Additional Features
734 extensions Using Additional Features
733 filesets Specifying File Sets
735 filesets Specifying File Sets
734 glossary Glossary
736 glossary Glossary
735 hgignore Syntax for Mercurial Ignore Files
737 hgignore Syntax for Mercurial Ignore Files
736 hgweb Configuring hgweb
738 hgweb Configuring hgweb
737 merge-tools Merge Tools
739 merge-tools Merge Tools
738 multirevs Specifying Multiple Revisions
740 multirevs Specifying Multiple Revisions
739 patterns File Name Patterns
741 patterns File Name Patterns
740 phases Working with Phases
742 phases Working with Phases
741 revisions Specifying Single Revisions
743 revisions Specifying Single Revisions
742 revsets Specifying Revision Sets
744 revsets Specifying Revision Sets
745 scripting Using Mercurial from scripts and automation
743 subrepos Subrepositories
746 subrepos Subrepositories
744 templating Template Usage
747 templating Template Usage
745 urls URL Paths
748 urls URL Paths
746
749
747 (use "hg help -v" to show built-in aliases and global options)
750 (use "hg help -v" to show built-in aliases and global options)
748
751
749
752
750 Test list of internal help commands
753 Test list of internal help commands
751
754
752 $ hg help debug
755 $ hg help debug
753 debug commands (internal and unsupported):
756 debug commands (internal and unsupported):
754
757
755 debugancestor
758 debugancestor
756 find the ancestor revision of two revisions in a given index
759 find the ancestor revision of two revisions in a given index
757 debugbuilddag
760 debugbuilddag
758 builds a repo with a given DAG from scratch in the current
761 builds a repo with a given DAG from scratch in the current
759 empty repo
762 empty repo
760 debugbundle lists the contents of a bundle
763 debugbundle lists the contents of a bundle
761 debugcheckstate
764 debugcheckstate
762 validate the correctness of the current dirstate
765 validate the correctness of the current dirstate
763 debugcommands
766 debugcommands
764 list all available commands and options
767 list all available commands and options
765 debugcomplete
768 debugcomplete
766 returns the completion list associated with the given command
769 returns the completion list associated with the given command
767 debugdag format the changelog or an index DAG as a concise textual
770 debugdag format the changelog or an index DAG as a concise textual
768 description
771 description
769 debugdata dump the contents of a data file revision
772 debugdata dump the contents of a data file revision
770 debugdate parse and display a date
773 debugdate parse and display a date
771 debugdirstate
774 debugdirstate
772 show the contents of the current dirstate
775 show the contents of the current dirstate
773 debugdiscovery
776 debugdiscovery
774 runs the changeset discovery protocol in isolation
777 runs the changeset discovery protocol in isolation
775 debugfileset parse and apply a fileset specification
778 debugfileset parse and apply a fileset specification
776 debugfsinfo show information detected about current filesystem
779 debugfsinfo show information detected about current filesystem
777 debuggetbundle
780 debuggetbundle
778 retrieves a bundle from a repo
781 retrieves a bundle from a repo
779 debugignore display the combined ignore pattern
782 debugignore display the combined ignore pattern
780 debugindex dump the contents of an index file
783 debugindex dump the contents of an index file
781 debugindexdot
784 debugindexdot
782 dump an index DAG as a graphviz dot file
785 dump an index DAG as a graphviz dot file
783 debuginstall test Mercurial installation
786 debuginstall test Mercurial installation
784 debugknown test whether node ids are known to a repo
787 debugknown test whether node ids are known to a repo
785 debuglocks show or modify state of locks
788 debuglocks show or modify state of locks
786 debugnamecomplete
789 debugnamecomplete
787 complete "names" - tags, open branch names, bookmark names
790 complete "names" - tags, open branch names, bookmark names
788 debugobsolete
791 debugobsolete
789 create arbitrary obsolete marker
792 create arbitrary obsolete marker
790 debugoptDEP (no help text available)
793 debugoptDEP (no help text available)
791 debugoptEXP (no help text available)
794 debugoptEXP (no help text available)
792 debugpathcomplete
795 debugpathcomplete
793 complete part or all of a tracked path
796 complete part or all of a tracked path
794 debugpushkey access the pushkey key/value protocol
797 debugpushkey access the pushkey key/value protocol
795 debugpvec (no help text available)
798 debugpvec (no help text available)
796 debugrebuilddirstate
799 debugrebuilddirstate
797 rebuild the dirstate as it would look like for the given
800 rebuild the dirstate as it would look like for the given
798 revision
801 revision
799 debugrebuildfncache
802 debugrebuildfncache
800 rebuild the fncache file
803 rebuild the fncache file
801 debugrename dump rename information
804 debugrename dump rename information
802 debugrevlog show data and statistics about a revlog
805 debugrevlog show data and statistics about a revlog
803 debugrevspec parse and apply a revision specification
806 debugrevspec parse and apply a revision specification
804 debugsetparents
807 debugsetparents
805 manually set the parents of the current working directory
808 manually set the parents of the current working directory
806 debugsub (no help text available)
809 debugsub (no help text available)
807 debugsuccessorssets
810 debugsuccessorssets
808 show set of successors for revision
811 show set of successors for revision
809 debugwalk show how files match on given patterns
812 debugwalk show how files match on given patterns
810 debugwireargs
813 debugwireargs
811 (no help text available)
814 (no help text available)
812
815
813 (use "hg help -v debug" to show built-in aliases and global options)
816 (use "hg help -v debug" to show built-in aliases and global options)
814
817
815
818
816 Test list of commands with command with no help text
819 Test list of commands with command with no help text
817
820
818 $ hg help helpext
821 $ hg help helpext
819 helpext extension - no help text available
822 helpext extension - no help text available
820
823
821 list of commands:
824 list of commands:
822
825
823 nohelp (no help text available)
826 nohelp (no help text available)
824
827
825 (use "hg help -v helpext" to show built-in aliases and global options)
828 (use "hg help -v helpext" to show built-in aliases and global options)
826
829
827
830
828 test deprecated and experimental options are hidden in command help
831 test deprecated and experimental options are hidden in command help
829 $ hg help debugoptDEP
832 $ hg help debugoptDEP
830 hg debugoptDEP
833 hg debugoptDEP
831
834
832 (no help text available)
835 (no help text available)
833
836
834 options:
837 options:
835
838
836 (some details hidden, use --verbose to show complete help)
839 (some details hidden, use --verbose to show complete help)
837
840
838 $ hg help debugoptEXP
841 $ hg help debugoptEXP
839 hg debugoptEXP
842 hg debugoptEXP
840
843
841 (no help text available)
844 (no help text available)
842
845
843 options:
846 options:
844
847
845 (some details hidden, use --verbose to show complete help)
848 (some details hidden, use --verbose to show complete help)
846
849
847 test deprecated and experimental options is shown with -v
850 test deprecated and experimental options is shown with -v
848 $ hg help -v debugoptDEP | grep dopt
851 $ hg help -v debugoptDEP | grep dopt
849 --dopt option is DEPRECATED
852 --dopt option is DEPRECATED
850 $ hg help -v debugoptEXP | grep eopt
853 $ hg help -v debugoptEXP | grep eopt
851 --eopt option is EXPERIMENTAL
854 --eopt option is EXPERIMENTAL
852
855
853 #if gettext
856 #if gettext
854 test deprecated option is hidden with translation with untranslated description
857 test deprecated option is hidden with translation with untranslated description
855 (use many globy for not failing on changed transaction)
858 (use many globy for not failing on changed transaction)
856 $ LANGUAGE=sv hg help debugoptDEP
859 $ LANGUAGE=sv hg help debugoptDEP
857 hg debugoptDEP
860 hg debugoptDEP
858
861
859 (*) (glob)
862 (*) (glob)
860
863
861 options:
864 options:
862
865
863 (some details hidden, use --verbose to show complete help)
866 (some details hidden, use --verbose to show complete help)
864 #endif
867 #endif
865
868
866 Test commands that collide with topics (issue4240)
869 Test commands that collide with topics (issue4240)
867
870
868 $ hg config -hq
871 $ hg config -hq
869 hg config [-u] [NAME]...
872 hg config [-u] [NAME]...
870
873
871 show combined config settings from all hgrc files
874 show combined config settings from all hgrc files
872 $ hg showconfig -hq
875 $ hg showconfig -hq
873 hg config [-u] [NAME]...
876 hg config [-u] [NAME]...
874
877
875 show combined config settings from all hgrc files
878 show combined config settings from all hgrc files
876
879
877 Test a help topic
880 Test a help topic
878
881
879 $ hg help revs
882 $ hg help revs
880 Specifying Single Revisions
883 Specifying Single Revisions
881 """""""""""""""""""""""""""
884 """""""""""""""""""""""""""
882
885
883 Mercurial supports several ways to specify individual revisions.
886 Mercurial supports several ways to specify individual revisions.
884
887
885 A plain integer is treated as a revision number. Negative integers are
888 A plain integer is treated as a revision number. Negative integers are
886 treated as sequential offsets from the tip, with -1 denoting the tip, -2
889 treated as sequential offsets from the tip, with -1 denoting the tip, -2
887 denoting the revision prior to the tip, and so forth.
890 denoting the revision prior to the tip, and so forth.
888
891
889 A 40-digit hexadecimal string is treated as a unique revision identifier.
892 A 40-digit hexadecimal string is treated as a unique revision identifier.
890
893
891 A hexadecimal string less than 40 characters long is treated as a unique
894 A hexadecimal string less than 40 characters long is treated as a unique
892 revision identifier and is referred to as a short-form identifier. A
895 revision identifier and is referred to as a short-form identifier. A
893 short-form identifier is only valid if it is the prefix of exactly one
896 short-form identifier is only valid if it is the prefix of exactly one
894 full-length identifier.
897 full-length identifier.
895
898
896 Any other string is treated as a bookmark, tag, or branch name. A bookmark
899 Any other string is treated as a bookmark, tag, or branch name. A bookmark
897 is a movable pointer to a revision. A tag is a permanent name associated
900 is a movable pointer to a revision. A tag is a permanent name associated
898 with a revision. A branch name denotes the tipmost open branch head of
901 with a revision. A branch name denotes the tipmost open branch head of
899 that branch - or if they are all closed, the tipmost closed head of the
902 that branch - or if they are all closed, the tipmost closed head of the
900 branch. Bookmark, tag, and branch names must not contain the ":"
903 branch. Bookmark, tag, and branch names must not contain the ":"
901 character.
904 character.
902
905
903 The reserved name "tip" always identifies the most recent revision.
906 The reserved name "tip" always identifies the most recent revision.
904
907
905 The reserved name "null" indicates the null revision. This is the revision
908 The reserved name "null" indicates the null revision. This is the revision
906 of an empty repository, and the parent of revision 0.
909 of an empty repository, and the parent of revision 0.
907
910
908 The reserved name "." indicates the working directory parent. If no
911 The reserved name "." indicates the working directory parent. If no
909 working directory is checked out, it is equivalent to null. If an
912 working directory is checked out, it is equivalent to null. If an
910 uncommitted merge is in progress, "." is the revision of the first parent.
913 uncommitted merge is in progress, "." is the revision of the first parent.
911
914
912 Test templating help
915 Test templating help
913
916
914 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
917 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
915 desc String. The text of the changeset description.
918 desc String. The text of the changeset description.
916 diffstat String. Statistics of changes with the following format:
919 diffstat String. Statistics of changes with the following format:
917 firstline Any text. Returns the first line of text.
920 firstline Any text. Returns the first line of text.
918 nonempty Any text. Returns '(none)' if the string is empty.
921 nonempty Any text. Returns '(none)' if the string is empty.
919
922
920 Test help hooks
923 Test help hooks
921
924
922 $ cat > helphook1.py <<EOF
925 $ cat > helphook1.py <<EOF
923 > from mercurial import help
926 > from mercurial import help
924 >
927 >
925 > def rewrite(topic, doc):
928 > def rewrite(topic, doc):
926 > return doc + '\nhelphook1\n'
929 > return doc + '\nhelphook1\n'
927 >
930 >
928 > def extsetup(ui):
931 > def extsetup(ui):
929 > help.addtopichook('revsets', rewrite)
932 > help.addtopichook('revsets', rewrite)
930 > EOF
933 > EOF
931 $ cat > helphook2.py <<EOF
934 $ cat > helphook2.py <<EOF
932 > from mercurial import help
935 > from mercurial import help
933 >
936 >
934 > def rewrite(topic, doc):
937 > def rewrite(topic, doc):
935 > return doc + '\nhelphook2\n'
938 > return doc + '\nhelphook2\n'
936 >
939 >
937 > def extsetup(ui):
940 > def extsetup(ui):
938 > help.addtopichook('revsets', rewrite)
941 > help.addtopichook('revsets', rewrite)
939 > EOF
942 > EOF
940 $ echo '[extensions]' >> $HGRCPATH
943 $ echo '[extensions]' >> $HGRCPATH
941 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
944 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
942 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
945 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
943 $ hg help revsets | grep helphook
946 $ hg help revsets | grep helphook
944 helphook1
947 helphook1
945 helphook2
948 helphook2
946
949
947 Test keyword search help
950 Test keyword search help
948
951
949 $ cat > prefixedname.py <<EOF
952 $ cat > prefixedname.py <<EOF
950 > '''matched against word "clone"
953 > '''matched against word "clone"
951 > '''
954 > '''
952 > EOF
955 > EOF
953 $ echo '[extensions]' >> $HGRCPATH
956 $ echo '[extensions]' >> $HGRCPATH
954 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
957 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
955 $ hg help -k clone
958 $ hg help -k clone
956 Topics:
959 Topics:
957
960
958 config Configuration Files
961 config Configuration Files
959 extensions Using Additional Features
962 extensions Using Additional Features
960 glossary Glossary
963 glossary Glossary
961 phases Working with Phases
964 phases Working with Phases
962 subrepos Subrepositories
965 subrepos Subrepositories
963 urls URL Paths
966 urls URL Paths
964
967
965 Commands:
968 Commands:
966
969
967 bookmarks create a new bookmark or list existing bookmarks
970 bookmarks create a new bookmark or list existing bookmarks
968 clone make a copy of an existing repository
971 clone make a copy of an existing repository
969 paths show aliases for remote repositories
972 paths show aliases for remote repositories
970 update update working directory (or switch revisions)
973 update update working directory (or switch revisions)
971
974
972 Extensions:
975 Extensions:
973
976
974 prefixedname matched against word "clone"
977 prefixedname matched against word "clone"
975 relink recreates hardlinks between repository clones
978 relink recreates hardlinks between repository clones
976
979
977 Extension Commands:
980 Extension Commands:
978
981
979 qclone clone main and patch repository at same time
982 qclone clone main and patch repository at same time
980
983
981 Test unfound topic
984 Test unfound topic
982
985
983 $ hg help nonexistingtopicthatwillneverexisteverever
986 $ hg help nonexistingtopicthatwillneverexisteverever
984 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
987 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
985 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
988 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
986 [255]
989 [255]
987
990
988 Test unfound keyword
991 Test unfound keyword
989
992
990 $ hg help --keyword nonexistingwordthatwillneverexisteverever
993 $ hg help --keyword nonexistingwordthatwillneverexisteverever
991 abort: no matches
994 abort: no matches
992 (try "hg help" for a list of topics)
995 (try "hg help" for a list of topics)
993 [255]
996 [255]
994
997
995 Test omit indicating for help
998 Test omit indicating for help
996
999
997 $ cat > addverboseitems.py <<EOF
1000 $ cat > addverboseitems.py <<EOF
998 > '''extension to test omit indicating.
1001 > '''extension to test omit indicating.
999 >
1002 >
1000 > This paragraph is never omitted (for extension)
1003 > This paragraph is never omitted (for extension)
1001 >
1004 >
1002 > .. container:: verbose
1005 > .. container:: verbose
1003 >
1006 >
1004 > This paragraph is omitted,
1007 > This paragraph is omitted,
1005 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1008 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1006 >
1009 >
1007 > This paragraph is never omitted, too (for extension)
1010 > This paragraph is never omitted, too (for extension)
1008 > '''
1011 > '''
1009 >
1012 >
1010 > from mercurial import help, commands
1013 > from mercurial import help, commands
1011 > testtopic = """This paragraph is never omitted (for topic).
1014 > testtopic = """This paragraph is never omitted (for topic).
1012 >
1015 >
1013 > .. container:: verbose
1016 > .. container:: verbose
1014 >
1017 >
1015 > This paragraph is omitted,
1018 > This paragraph is omitted,
1016 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1019 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1017 >
1020 >
1018 > This paragraph is never omitted, too (for topic)
1021 > This paragraph is never omitted, too (for topic)
1019 > """
1022 > """
1020 > def extsetup(ui):
1023 > def extsetup(ui):
1021 > help.helptable.append((["topic-containing-verbose"],
1024 > help.helptable.append((["topic-containing-verbose"],
1022 > "This is the topic to test omit indicating.",
1025 > "This is the topic to test omit indicating.",
1023 > lambda : testtopic))
1026 > lambda : testtopic))
1024 > EOF
1027 > EOF
1025 $ echo '[extensions]' >> $HGRCPATH
1028 $ echo '[extensions]' >> $HGRCPATH
1026 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1029 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1027 $ hg help addverboseitems
1030 $ hg help addverboseitems
1028 addverboseitems extension - extension to test omit indicating.
1031 addverboseitems extension - extension to test omit indicating.
1029
1032
1030 This paragraph is never omitted (for extension)
1033 This paragraph is never omitted (for extension)
1031
1034
1032 This paragraph is never omitted, too (for extension)
1035 This paragraph is never omitted, too (for extension)
1033
1036
1034 (some details hidden, use --verbose to show complete help)
1037 (some details hidden, use --verbose to show complete help)
1035
1038
1036 no commands defined
1039 no commands defined
1037 $ hg help -v addverboseitems
1040 $ hg help -v addverboseitems
1038 addverboseitems extension - extension to test omit indicating.
1041 addverboseitems extension - extension to test omit indicating.
1039
1042
1040 This paragraph is never omitted (for extension)
1043 This paragraph is never omitted (for extension)
1041
1044
1042 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1045 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1043 extension)
1046 extension)
1044
1047
1045 This paragraph is never omitted, too (for extension)
1048 This paragraph is never omitted, too (for extension)
1046
1049
1047 no commands defined
1050 no commands defined
1048 $ hg help topic-containing-verbose
1051 $ hg help topic-containing-verbose
1049 This is the topic to test omit indicating.
1052 This is the topic to test omit indicating.
1050 """"""""""""""""""""""""""""""""""""""""""
1053 """"""""""""""""""""""""""""""""""""""""""
1051
1054
1052 This paragraph is never omitted (for topic).
1055 This paragraph is never omitted (for topic).
1053
1056
1054 This paragraph is never omitted, too (for topic)
1057 This paragraph is never omitted, too (for topic)
1055
1058
1056 (some details hidden, use --verbose to show complete help)
1059 (some details hidden, use --verbose to show complete help)
1057 $ hg help -v topic-containing-verbose
1060 $ hg help -v topic-containing-verbose
1058 This is the topic to test omit indicating.
1061 This is the topic to test omit indicating.
1059 """"""""""""""""""""""""""""""""""""""""""
1062 """"""""""""""""""""""""""""""""""""""""""
1060
1063
1061 This paragraph is never omitted (for topic).
1064 This paragraph is never omitted (for topic).
1062
1065
1063 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1066 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1064 topic)
1067 topic)
1065
1068
1066 This paragraph is never omitted, too (for topic)
1069 This paragraph is never omitted, too (for topic)
1067
1070
1068 Test section lookup
1071 Test section lookup
1069
1072
1070 $ hg help revset.merge
1073 $ hg help revset.merge
1071 "merge()"
1074 "merge()"
1072 Changeset is a merge changeset.
1075 Changeset is a merge changeset.
1073
1076
1074 $ hg help glossary.dag
1077 $ hg help glossary.dag
1075 DAG
1078 DAG
1076 The repository of changesets of a distributed version control system
1079 The repository of changesets of a distributed version control system
1077 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1080 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1078 of nodes and edges, where nodes correspond to changesets and edges
1081 of nodes and edges, where nodes correspond to changesets and edges
1079 imply a parent -> child relation. This graph can be visualized by
1082 imply a parent -> child relation. This graph can be visualized by
1080 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1083 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1081 limited by the requirement for children to have at most two parents.
1084 limited by the requirement for children to have at most two parents.
1082
1085
1083
1086
1084 $ hg help hgrc.paths
1087 $ hg help hgrc.paths
1085 "paths"
1088 "paths"
1086 -------
1089 -------
1087
1090
1088 Assigns symbolic names to repositories. The left side is the symbolic
1091 Assigns symbolic names to repositories. The left side is the symbolic
1089 name, and the right gives the directory or URL that is the location of the
1092 name, and the right gives the directory or URL that is the location of the
1090 repository. Default paths can be declared by setting the following
1093 repository. Default paths can be declared by setting the following
1091 entries.
1094 entries.
1092
1095
1093 "default"
1096 "default"
1094 Directory or URL to use when pulling if no source is specified.
1097 Directory or URL to use when pulling if no source is specified.
1095 Default is set to repository from which the current repository was
1098 Default is set to repository from which the current repository was
1096 cloned.
1099 cloned.
1097
1100
1098 "default-push"
1101 "default-push"
1099 Optional. Directory or URL to use when pushing if no destination is
1102 Optional. Directory or URL to use when pushing if no destination is
1100 specified.
1103 specified.
1101
1104
1102 Custom paths can be defined by assigning the path to a name that later can
1105 Custom paths can be defined by assigning the path to a name that later can
1103 be used from the command line. Example:
1106 be used from the command line. Example:
1104
1107
1105 [paths]
1108 [paths]
1106 my_path = http://example.com/path
1109 my_path = http://example.com/path
1107
1110
1108 To push to the path defined in "my_path" run the command:
1111 To push to the path defined in "my_path" run the command:
1109
1112
1110 hg push my_path
1113 hg push my_path
1111
1114
1112 $ hg help glossary.mcguffin
1115 $ hg help glossary.mcguffin
1113 abort: help section not found
1116 abort: help section not found
1114 [255]
1117 [255]
1115
1118
1116 $ hg help glossary.mc.guffin
1119 $ hg help glossary.mc.guffin
1117 abort: help section not found
1120 abort: help section not found
1118 [255]
1121 [255]
1119
1122
1120 $ hg help template.files
1123 $ hg help template.files
1121 files List of strings. All files modified, added, or removed by
1124 files List of strings. All files modified, added, or removed by
1122 this changeset.
1125 this changeset.
1123
1126
1124 Test dynamic list of merge tools only shows up once
1127 Test dynamic list of merge tools only shows up once
1125 $ hg help merge-tools
1128 $ hg help merge-tools
1126 Merge Tools
1129 Merge Tools
1127 """""""""""
1130 """""""""""
1128
1131
1129 To merge files Mercurial uses merge tools.
1132 To merge files Mercurial uses merge tools.
1130
1133
1131 A merge tool combines two different versions of a file into a merged file.
1134 A merge tool combines two different versions of a file into a merged file.
1132 Merge tools are given the two files and the greatest common ancestor of
1135 Merge tools are given the two files and the greatest common ancestor of
1133 the two file versions, so they can determine the changes made on both
1136 the two file versions, so they can determine the changes made on both
1134 branches.
1137 branches.
1135
1138
1136 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1139 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1137 backout" and in several extensions.
1140 backout" and in several extensions.
1138
1141
1139 Usually, the merge tool tries to automatically reconcile the files by
1142 Usually, the merge tool tries to automatically reconcile the files by
1140 combining all non-overlapping changes that occurred separately in the two
1143 combining all non-overlapping changes that occurred separately in the two
1141 different evolutions of the same initial base file. Furthermore, some
1144 different evolutions of the same initial base file. Furthermore, some
1142 interactive merge programs make it easier to manually resolve conflicting
1145 interactive merge programs make it easier to manually resolve conflicting
1143 merges, either in a graphical way, or by inserting some conflict markers.
1146 merges, either in a graphical way, or by inserting some conflict markers.
1144 Mercurial does not include any interactive merge programs but relies on
1147 Mercurial does not include any interactive merge programs but relies on
1145 external tools for that.
1148 external tools for that.
1146
1149
1147 Available merge tools
1150 Available merge tools
1148 =====================
1151 =====================
1149
1152
1150 External merge tools and their properties are configured in the merge-
1153 External merge tools and their properties are configured in the merge-
1151 tools configuration section - see hgrc(5) - but they can often just be
1154 tools configuration section - see hgrc(5) - but they can often just be
1152 named by their executable.
1155 named by their executable.
1153
1156
1154 A merge tool is generally usable if its executable can be found on the
1157 A merge tool is generally usable if its executable can be found on the
1155 system and if it can handle the merge. The executable is found if it is an
1158 system and if it can handle the merge. The executable is found if it is an
1156 absolute or relative executable path or the name of an application in the
1159 absolute or relative executable path or the name of an application in the
1157 executable search path. The tool is assumed to be able to handle the merge
1160 executable search path. The tool is assumed to be able to handle the merge
1158 if it can handle symlinks if the file is a symlink, if it can handle
1161 if it can handle symlinks if the file is a symlink, if it can handle
1159 binary files if the file is binary, and if a GUI is available if the tool
1162 binary files if the file is binary, and if a GUI is available if the tool
1160 requires a GUI.
1163 requires a GUI.
1161
1164
1162 There are some internal merge tools which can be used. The internal merge
1165 There are some internal merge tools which can be used. The internal merge
1163 tools are:
1166 tools are:
1164
1167
1165 ":dump"
1168 ":dump"
1166 Creates three versions of the files to merge, containing the contents of
1169 Creates three versions of the files to merge, containing the contents of
1167 local, other and base. These files can then be used to perform a merge
1170 local, other and base. These files can then be used to perform a merge
1168 manually. If the file to be merged is named "a.txt", these files will
1171 manually. If the file to be merged is named "a.txt", these files will
1169 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1172 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1170 they will be placed in the same directory as "a.txt".
1173 they will be placed in the same directory as "a.txt".
1171
1174
1172 ":fail"
1175 ":fail"
1173 Rather than attempting to merge files that were modified on both
1176 Rather than attempting to merge files that were modified on both
1174 branches, it marks them as unresolved. The resolve command must be used
1177 branches, it marks them as unresolved. The resolve command must be used
1175 to resolve these conflicts.
1178 to resolve these conflicts.
1176
1179
1177 ":local"
1180 ":local"
1178 Uses the local version of files as the merged version.
1181 Uses the local version of files as the merged version.
1179
1182
1180 ":merge"
1183 ":merge"
1181 Uses the internal non-interactive simple merge algorithm for merging
1184 Uses the internal non-interactive simple merge algorithm for merging
1182 files. It will fail if there are any conflicts and leave markers in the
1185 files. It will fail if there are any conflicts and leave markers in the
1183 partially merged file. Markers will have two sections, one for each side
1186 partially merged file. Markers will have two sections, one for each side
1184 of merge.
1187 of merge.
1185
1188
1186 ":merge3"
1189 ":merge3"
1187 Uses the internal non-interactive simple merge algorithm for merging
1190 Uses the internal non-interactive simple merge algorithm for merging
1188 files. It will fail if there are any conflicts and leave markers in the
1191 files. It will fail if there are any conflicts and leave markers in the
1189 partially merged file. Marker will have three sections, one from each
1192 partially merged file. Marker will have three sections, one from each
1190 side of the merge and one for the base content.
1193 side of the merge and one for the base content.
1191
1194
1192 ":other"
1195 ":other"
1193 Uses the other version of files as the merged version.
1196 Uses the other version of files as the merged version.
1194
1197
1195 ":prompt"
1198 ":prompt"
1196 Asks the user which of the local or the other version to keep as the
1199 Asks the user which of the local or the other version to keep as the
1197 merged version.
1200 merged version.
1198
1201
1199 ":tagmerge"
1202 ":tagmerge"
1200 Uses the internal tag merge algorithm (experimental).
1203 Uses the internal tag merge algorithm (experimental).
1201
1204
1202 Internal tools are always available and do not require a GUI but will by
1205 Internal tools are always available and do not require a GUI but will by
1203 default not handle symlinks or binary files.
1206 default not handle symlinks or binary files.
1204
1207
1205 Choosing a merge tool
1208 Choosing a merge tool
1206 =====================
1209 =====================
1207
1210
1208 Mercurial uses these rules when deciding which merge tool to use:
1211 Mercurial uses these rules when deciding which merge tool to use:
1209
1212
1210 1. If a tool has been specified with the --tool option to merge or
1213 1. If a tool has been specified with the --tool option to merge or
1211 resolve, it is used. If it is the name of a tool in the merge-tools
1214 resolve, it is used. If it is the name of a tool in the merge-tools
1212 configuration, its configuration is used. Otherwise the specified tool
1215 configuration, its configuration is used. Otherwise the specified tool
1213 must be executable by the shell.
1216 must be executable by the shell.
1214 2. If the "HGMERGE" environment variable is present, its value is used and
1217 2. If the "HGMERGE" environment variable is present, its value is used and
1215 must be executable by the shell.
1218 must be executable by the shell.
1216 3. If the filename of the file to be merged matches any of the patterns in
1219 3. If the filename of the file to be merged matches any of the patterns in
1217 the merge-patterns configuration section, the first usable merge tool
1220 the merge-patterns configuration section, the first usable merge tool
1218 corresponding to a matching pattern is used. Here, binary capabilities
1221 corresponding to a matching pattern is used. Here, binary capabilities
1219 of the merge tool are not considered.
1222 of the merge tool are not considered.
1220 4. If ui.merge is set it will be considered next. If the value is not the
1223 4. If ui.merge is set it will be considered next. If the value is not the
1221 name of a configured tool, the specified value is used and must be
1224 name of a configured tool, the specified value is used and must be
1222 executable by the shell. Otherwise the named tool is used if it is
1225 executable by the shell. Otherwise the named tool is used if it is
1223 usable.
1226 usable.
1224 5. If any usable merge tools are present in the merge-tools configuration
1227 5. If any usable merge tools are present in the merge-tools configuration
1225 section, the one with the highest priority is used.
1228 section, the one with the highest priority is used.
1226 6. If a program named "hgmerge" can be found on the system, it is used -
1229 6. If a program named "hgmerge" can be found on the system, it is used -
1227 but it will by default not be used for symlinks and binary files.
1230 but it will by default not be used for symlinks and binary files.
1228 7. If the file to be merged is not binary and is not a symlink, then
1231 7. If the file to be merged is not binary and is not a symlink, then
1229 internal ":merge" is used.
1232 internal ":merge" is used.
1230 8. The merge of the file fails and must be resolved before commit.
1233 8. The merge of the file fails and must be resolved before commit.
1231
1234
1232 Note:
1235 Note:
1233 After selecting a merge program, Mercurial will by default attempt to
1236 After selecting a merge program, Mercurial will by default attempt to
1234 merge the files using a simple merge algorithm first. Only if it
1237 merge the files using a simple merge algorithm first. Only if it
1235 doesn't succeed because of conflicting changes Mercurial will actually
1238 doesn't succeed because of conflicting changes Mercurial will actually
1236 execute the merge program. Whether to use the simple merge algorithm
1239 execute the merge program. Whether to use the simple merge algorithm
1237 first can be controlled by the premerge setting of the merge tool.
1240 first can be controlled by the premerge setting of the merge tool.
1238 Premerge is enabled by default unless the file is binary or a symlink.
1241 Premerge is enabled by default unless the file is binary or a symlink.
1239
1242
1240 See the merge-tools and ui sections of hgrc(5) for details on the
1243 See the merge-tools and ui sections of hgrc(5) for details on the
1241 configuration of merge tools.
1244 configuration of merge tools.
1242
1245
1243 Test usage of section marks in help documents
1246 Test usage of section marks in help documents
1244
1247
1245 $ cd "$TESTDIR"/../doc
1248 $ cd "$TESTDIR"/../doc
1246 $ python check-seclevel.py
1249 $ python check-seclevel.py
1247 $ cd $TESTTMP
1250 $ cd $TESTTMP
1248
1251
1249 #if serve
1252 #if serve
1250
1253
1251 Test the help pages in hgweb.
1254 Test the help pages in hgweb.
1252
1255
1253 Dish up an empty repo; serve it cold.
1256 Dish up an empty repo; serve it cold.
1254
1257
1255 $ hg init "$TESTTMP/test"
1258 $ hg init "$TESTTMP/test"
1256 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1259 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1257 $ cat hg.pid >> $DAEMON_PIDS
1260 $ cat hg.pid >> $DAEMON_PIDS
1258
1261
1259 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1262 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1260 200 Script output follows
1263 200 Script output follows
1261
1264
1262 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1265 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1263 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1266 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1264 <head>
1267 <head>
1265 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1268 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1266 <meta name="robots" content="index, nofollow" />
1269 <meta name="robots" content="index, nofollow" />
1267 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1270 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1268 <script type="text/javascript" src="/static/mercurial.js"></script>
1271 <script type="text/javascript" src="/static/mercurial.js"></script>
1269
1272
1270 <title>Help: Index</title>
1273 <title>Help: Index</title>
1271 </head>
1274 </head>
1272 <body>
1275 <body>
1273
1276
1274 <div class="container">
1277 <div class="container">
1275 <div class="menu">
1278 <div class="menu">
1276 <div class="logo">
1279 <div class="logo">
1277 <a href="http://mercurial.selenic.com/">
1280 <a href="http://mercurial.selenic.com/">
1278 <img src="/static/hglogo.png" alt="mercurial" /></a>
1281 <img src="/static/hglogo.png" alt="mercurial" /></a>
1279 </div>
1282 </div>
1280 <ul>
1283 <ul>
1281 <li><a href="/shortlog">log</a></li>
1284 <li><a href="/shortlog">log</a></li>
1282 <li><a href="/graph">graph</a></li>
1285 <li><a href="/graph">graph</a></li>
1283 <li><a href="/tags">tags</a></li>
1286 <li><a href="/tags">tags</a></li>
1284 <li><a href="/bookmarks">bookmarks</a></li>
1287 <li><a href="/bookmarks">bookmarks</a></li>
1285 <li><a href="/branches">branches</a></li>
1288 <li><a href="/branches">branches</a></li>
1286 </ul>
1289 </ul>
1287 <ul>
1290 <ul>
1288 <li class="active">help</li>
1291 <li class="active">help</li>
1289 </ul>
1292 </ul>
1290 </div>
1293 </div>
1291
1294
1292 <div class="main">
1295 <div class="main">
1293 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1296 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1294 <form class="search" action="/log">
1297 <form class="search" action="/log">
1295
1298
1296 <p><input name="rev" id="search1" type="text" size="30" /></p>
1299 <p><input name="rev" id="search1" type="text" size="30" /></p>
1297 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1300 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1298 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1301 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1299 </form>
1302 </form>
1300 <table class="bigtable">
1303 <table class="bigtable">
1301 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1304 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1302
1305
1303 <tr><td>
1306 <tr><td>
1304 <a href="/help/config">
1307 <a href="/help/config">
1305 config
1308 config
1306 </a>
1309 </a>
1307 </td><td>
1310 </td><td>
1308 Configuration Files
1311 Configuration Files
1309 </td></tr>
1312 </td></tr>
1310 <tr><td>
1313 <tr><td>
1311 <a href="/help/dates">
1314 <a href="/help/dates">
1312 dates
1315 dates
1313 </a>
1316 </a>
1314 </td><td>
1317 </td><td>
1315 Date Formats
1318 Date Formats
1316 </td></tr>
1319 </td></tr>
1317 <tr><td>
1320 <tr><td>
1318 <a href="/help/diffs">
1321 <a href="/help/diffs">
1319 diffs
1322 diffs
1320 </a>
1323 </a>
1321 </td><td>
1324 </td><td>
1322 Diff Formats
1325 Diff Formats
1323 </td></tr>
1326 </td></tr>
1324 <tr><td>
1327 <tr><td>
1325 <a href="/help/environment">
1328 <a href="/help/environment">
1326 environment
1329 environment
1327 </a>
1330 </a>
1328 </td><td>
1331 </td><td>
1329 Environment Variables
1332 Environment Variables
1330 </td></tr>
1333 </td></tr>
1331 <tr><td>
1334 <tr><td>
1332 <a href="/help/extensions">
1335 <a href="/help/extensions">
1333 extensions
1336 extensions
1334 </a>
1337 </a>
1335 </td><td>
1338 </td><td>
1336 Using Additional Features
1339 Using Additional Features
1337 </td></tr>
1340 </td></tr>
1338 <tr><td>
1341 <tr><td>
1339 <a href="/help/filesets">
1342 <a href="/help/filesets">
1340 filesets
1343 filesets
1341 </a>
1344 </a>
1342 </td><td>
1345 </td><td>
1343 Specifying File Sets
1346 Specifying File Sets
1344 </td></tr>
1347 </td></tr>
1345 <tr><td>
1348 <tr><td>
1346 <a href="/help/glossary">
1349 <a href="/help/glossary">
1347 glossary
1350 glossary
1348 </a>
1351 </a>
1349 </td><td>
1352 </td><td>
1350 Glossary
1353 Glossary
1351 </td></tr>
1354 </td></tr>
1352 <tr><td>
1355 <tr><td>
1353 <a href="/help/hgignore">
1356 <a href="/help/hgignore">
1354 hgignore
1357 hgignore
1355 </a>
1358 </a>
1356 </td><td>
1359 </td><td>
1357 Syntax for Mercurial Ignore Files
1360 Syntax for Mercurial Ignore Files
1358 </td></tr>
1361 </td></tr>
1359 <tr><td>
1362 <tr><td>
1360 <a href="/help/hgweb">
1363 <a href="/help/hgweb">
1361 hgweb
1364 hgweb
1362 </a>
1365 </a>
1363 </td><td>
1366 </td><td>
1364 Configuring hgweb
1367 Configuring hgweb
1365 </td></tr>
1368 </td></tr>
1366 <tr><td>
1369 <tr><td>
1367 <a href="/help/merge-tools">
1370 <a href="/help/merge-tools">
1368 merge-tools
1371 merge-tools
1369 </a>
1372 </a>
1370 </td><td>
1373 </td><td>
1371 Merge Tools
1374 Merge Tools
1372 </td></tr>
1375 </td></tr>
1373 <tr><td>
1376 <tr><td>
1374 <a href="/help/multirevs">
1377 <a href="/help/multirevs">
1375 multirevs
1378 multirevs
1376 </a>
1379 </a>
1377 </td><td>
1380 </td><td>
1378 Specifying Multiple Revisions
1381 Specifying Multiple Revisions
1379 </td></tr>
1382 </td></tr>
1380 <tr><td>
1383 <tr><td>
1381 <a href="/help/patterns">
1384 <a href="/help/patterns">
1382 patterns
1385 patterns
1383 </a>
1386 </a>
1384 </td><td>
1387 </td><td>
1385 File Name Patterns
1388 File Name Patterns
1386 </td></tr>
1389 </td></tr>
1387 <tr><td>
1390 <tr><td>
1388 <a href="/help/phases">
1391 <a href="/help/phases">
1389 phases
1392 phases
1390 </a>
1393 </a>
1391 </td><td>
1394 </td><td>
1392 Working with Phases
1395 Working with Phases
1393 </td></tr>
1396 </td></tr>
1394 <tr><td>
1397 <tr><td>
1395 <a href="/help/revisions">
1398 <a href="/help/revisions">
1396 revisions
1399 revisions
1397 </a>
1400 </a>
1398 </td><td>
1401 </td><td>
1399 Specifying Single Revisions
1402 Specifying Single Revisions
1400 </td></tr>
1403 </td></tr>
1401 <tr><td>
1404 <tr><td>
1402 <a href="/help/revsets">
1405 <a href="/help/revsets">
1403 revsets
1406 revsets
1404 </a>
1407 </a>
1405 </td><td>
1408 </td><td>
1406 Specifying Revision Sets
1409 Specifying Revision Sets
1407 </td></tr>
1410 </td></tr>
1408 <tr><td>
1411 <tr><td>
1412 <a href="/help/scripting">
1413 scripting
1414 </a>
1415 </td><td>
1416 Using Mercurial from scripts and automation
1417 </td></tr>
1418 <tr><td>
1409 <a href="/help/subrepos">
1419 <a href="/help/subrepos">
1410 subrepos
1420 subrepos
1411 </a>
1421 </a>
1412 </td><td>
1422 </td><td>
1413 Subrepositories
1423 Subrepositories
1414 </td></tr>
1424 </td></tr>
1415 <tr><td>
1425 <tr><td>
1416 <a href="/help/templating">
1426 <a href="/help/templating">
1417 templating
1427 templating
1418 </a>
1428 </a>
1419 </td><td>
1429 </td><td>
1420 Template Usage
1430 Template Usage
1421 </td></tr>
1431 </td></tr>
1422 <tr><td>
1432 <tr><td>
1423 <a href="/help/urls">
1433 <a href="/help/urls">
1424 urls
1434 urls
1425 </a>
1435 </a>
1426 </td><td>
1436 </td><td>
1427 URL Paths
1437 URL Paths
1428 </td></tr>
1438 </td></tr>
1429 <tr><td>
1439 <tr><td>
1430 <a href="/help/topic-containing-verbose">
1440 <a href="/help/topic-containing-verbose">
1431 topic-containing-verbose
1441 topic-containing-verbose
1432 </a>
1442 </a>
1433 </td><td>
1443 </td><td>
1434 This is the topic to test omit indicating.
1444 This is the topic to test omit indicating.
1435 </td></tr>
1445 </td></tr>
1436
1446
1437 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1447 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1438
1448
1439 <tr><td>
1449 <tr><td>
1440 <a href="/help/add">
1450 <a href="/help/add">
1441 add
1451 add
1442 </a>
1452 </a>
1443 </td><td>
1453 </td><td>
1444 add the specified files on the next commit
1454 add the specified files on the next commit
1445 </td></tr>
1455 </td></tr>
1446 <tr><td>
1456 <tr><td>
1447 <a href="/help/annotate">
1457 <a href="/help/annotate">
1448 annotate
1458 annotate
1449 </a>
1459 </a>
1450 </td><td>
1460 </td><td>
1451 show changeset information by line for each file
1461 show changeset information by line for each file
1452 </td></tr>
1462 </td></tr>
1453 <tr><td>
1463 <tr><td>
1454 <a href="/help/clone">
1464 <a href="/help/clone">
1455 clone
1465 clone
1456 </a>
1466 </a>
1457 </td><td>
1467 </td><td>
1458 make a copy of an existing repository
1468 make a copy of an existing repository
1459 </td></tr>
1469 </td></tr>
1460 <tr><td>
1470 <tr><td>
1461 <a href="/help/commit">
1471 <a href="/help/commit">
1462 commit
1472 commit
1463 </a>
1473 </a>
1464 </td><td>
1474 </td><td>
1465 commit the specified files or all outstanding changes
1475 commit the specified files or all outstanding changes
1466 </td></tr>
1476 </td></tr>
1467 <tr><td>
1477 <tr><td>
1468 <a href="/help/diff">
1478 <a href="/help/diff">
1469 diff
1479 diff
1470 </a>
1480 </a>
1471 </td><td>
1481 </td><td>
1472 diff repository (or selected files)
1482 diff repository (or selected files)
1473 </td></tr>
1483 </td></tr>
1474 <tr><td>
1484 <tr><td>
1475 <a href="/help/export">
1485 <a href="/help/export">
1476 export
1486 export
1477 </a>
1487 </a>
1478 </td><td>
1488 </td><td>
1479 dump the header and diffs for one or more changesets
1489 dump the header and diffs for one or more changesets
1480 </td></tr>
1490 </td></tr>
1481 <tr><td>
1491 <tr><td>
1482 <a href="/help/forget">
1492 <a href="/help/forget">
1483 forget
1493 forget
1484 </a>
1494 </a>
1485 </td><td>
1495 </td><td>
1486 forget the specified files on the next commit
1496 forget the specified files on the next commit
1487 </td></tr>
1497 </td></tr>
1488 <tr><td>
1498 <tr><td>
1489 <a href="/help/init">
1499 <a href="/help/init">
1490 init
1500 init
1491 </a>
1501 </a>
1492 </td><td>
1502 </td><td>
1493 create a new repository in the given directory
1503 create a new repository in the given directory
1494 </td></tr>
1504 </td></tr>
1495 <tr><td>
1505 <tr><td>
1496 <a href="/help/log">
1506 <a href="/help/log">
1497 log
1507 log
1498 </a>
1508 </a>
1499 </td><td>
1509 </td><td>
1500 show revision history of entire repository or files
1510 show revision history of entire repository or files
1501 </td></tr>
1511 </td></tr>
1502 <tr><td>
1512 <tr><td>
1503 <a href="/help/merge">
1513 <a href="/help/merge">
1504 merge
1514 merge
1505 </a>
1515 </a>
1506 </td><td>
1516 </td><td>
1507 merge another revision into working directory
1517 merge another revision into working directory
1508 </td></tr>
1518 </td></tr>
1509 <tr><td>
1519 <tr><td>
1510 <a href="/help/pull">
1520 <a href="/help/pull">
1511 pull
1521 pull
1512 </a>
1522 </a>
1513 </td><td>
1523 </td><td>
1514 pull changes from the specified source
1524 pull changes from the specified source
1515 </td></tr>
1525 </td></tr>
1516 <tr><td>
1526 <tr><td>
1517 <a href="/help/push">
1527 <a href="/help/push">
1518 push
1528 push
1519 </a>
1529 </a>
1520 </td><td>
1530 </td><td>
1521 push changes to the specified destination
1531 push changes to the specified destination
1522 </td></tr>
1532 </td></tr>
1523 <tr><td>
1533 <tr><td>
1524 <a href="/help/remove">
1534 <a href="/help/remove">
1525 remove
1535 remove
1526 </a>
1536 </a>
1527 </td><td>
1537 </td><td>
1528 remove the specified files on the next commit
1538 remove the specified files on the next commit
1529 </td></tr>
1539 </td></tr>
1530 <tr><td>
1540 <tr><td>
1531 <a href="/help/serve">
1541 <a href="/help/serve">
1532 serve
1542 serve
1533 </a>
1543 </a>
1534 </td><td>
1544 </td><td>
1535 start stand-alone webserver
1545 start stand-alone webserver
1536 </td></tr>
1546 </td></tr>
1537 <tr><td>
1547 <tr><td>
1538 <a href="/help/status">
1548 <a href="/help/status">
1539 status
1549 status
1540 </a>
1550 </a>
1541 </td><td>
1551 </td><td>
1542 show changed files in the working directory
1552 show changed files in the working directory
1543 </td></tr>
1553 </td></tr>
1544 <tr><td>
1554 <tr><td>
1545 <a href="/help/summary">
1555 <a href="/help/summary">
1546 summary
1556 summary
1547 </a>
1557 </a>
1548 </td><td>
1558 </td><td>
1549 summarize working directory state
1559 summarize working directory state
1550 </td></tr>
1560 </td></tr>
1551 <tr><td>
1561 <tr><td>
1552 <a href="/help/update">
1562 <a href="/help/update">
1553 update
1563 update
1554 </a>
1564 </a>
1555 </td><td>
1565 </td><td>
1556 update working directory (or switch revisions)
1566 update working directory (or switch revisions)
1557 </td></tr>
1567 </td></tr>
1558
1568
1559 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1569 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1560
1570
1561 <tr><td>
1571 <tr><td>
1562 <a href="/help/addremove">
1572 <a href="/help/addremove">
1563 addremove
1573 addremove
1564 </a>
1574 </a>
1565 </td><td>
1575 </td><td>
1566 add all new files, delete all missing files
1576 add all new files, delete all missing files
1567 </td></tr>
1577 </td></tr>
1568 <tr><td>
1578 <tr><td>
1569 <a href="/help/archive">
1579 <a href="/help/archive">
1570 archive
1580 archive
1571 </a>
1581 </a>
1572 </td><td>
1582 </td><td>
1573 create an unversioned archive of a repository revision
1583 create an unversioned archive of a repository revision
1574 </td></tr>
1584 </td></tr>
1575 <tr><td>
1585 <tr><td>
1576 <a href="/help/backout">
1586 <a href="/help/backout">
1577 backout
1587 backout
1578 </a>
1588 </a>
1579 </td><td>
1589 </td><td>
1580 reverse effect of earlier changeset
1590 reverse effect of earlier changeset
1581 </td></tr>
1591 </td></tr>
1582 <tr><td>
1592 <tr><td>
1583 <a href="/help/bisect">
1593 <a href="/help/bisect">
1584 bisect
1594 bisect
1585 </a>
1595 </a>
1586 </td><td>
1596 </td><td>
1587 subdivision search of changesets
1597 subdivision search of changesets
1588 </td></tr>
1598 </td></tr>
1589 <tr><td>
1599 <tr><td>
1590 <a href="/help/bookmarks">
1600 <a href="/help/bookmarks">
1591 bookmarks
1601 bookmarks
1592 </a>
1602 </a>
1593 </td><td>
1603 </td><td>
1594 create a new bookmark or list existing bookmarks
1604 create a new bookmark or list existing bookmarks
1595 </td></tr>
1605 </td></tr>
1596 <tr><td>
1606 <tr><td>
1597 <a href="/help/branch">
1607 <a href="/help/branch">
1598 branch
1608 branch
1599 </a>
1609 </a>
1600 </td><td>
1610 </td><td>
1601 set or show the current branch name
1611 set or show the current branch name
1602 </td></tr>
1612 </td></tr>
1603 <tr><td>
1613 <tr><td>
1604 <a href="/help/branches">
1614 <a href="/help/branches">
1605 branches
1615 branches
1606 </a>
1616 </a>
1607 </td><td>
1617 </td><td>
1608 list repository named branches
1618 list repository named branches
1609 </td></tr>
1619 </td></tr>
1610 <tr><td>
1620 <tr><td>
1611 <a href="/help/bundle">
1621 <a href="/help/bundle">
1612 bundle
1622 bundle
1613 </a>
1623 </a>
1614 </td><td>
1624 </td><td>
1615 create a changegroup file
1625 create a changegroup file
1616 </td></tr>
1626 </td></tr>
1617 <tr><td>
1627 <tr><td>
1618 <a href="/help/cat">
1628 <a href="/help/cat">
1619 cat
1629 cat
1620 </a>
1630 </a>
1621 </td><td>
1631 </td><td>
1622 output the current or given revision of files
1632 output the current or given revision of files
1623 </td></tr>
1633 </td></tr>
1624 <tr><td>
1634 <tr><td>
1625 <a href="/help/config">
1635 <a href="/help/config">
1626 config
1636 config
1627 </a>
1637 </a>
1628 </td><td>
1638 </td><td>
1629 show combined config settings from all hgrc files
1639 show combined config settings from all hgrc files
1630 </td></tr>
1640 </td></tr>
1631 <tr><td>
1641 <tr><td>
1632 <a href="/help/copy">
1642 <a href="/help/copy">
1633 copy
1643 copy
1634 </a>
1644 </a>
1635 </td><td>
1645 </td><td>
1636 mark files as copied for the next commit
1646 mark files as copied for the next commit
1637 </td></tr>
1647 </td></tr>
1638 <tr><td>
1648 <tr><td>
1639 <a href="/help/files">
1649 <a href="/help/files">
1640 files
1650 files
1641 </a>
1651 </a>
1642 </td><td>
1652 </td><td>
1643 list tracked files
1653 list tracked files
1644 </td></tr>
1654 </td></tr>
1645 <tr><td>
1655 <tr><td>
1646 <a href="/help/graft">
1656 <a href="/help/graft">
1647 graft
1657 graft
1648 </a>
1658 </a>
1649 </td><td>
1659 </td><td>
1650 copy changes from other branches onto the current branch
1660 copy changes from other branches onto the current branch
1651 </td></tr>
1661 </td></tr>
1652 <tr><td>
1662 <tr><td>
1653 <a href="/help/grep">
1663 <a href="/help/grep">
1654 grep
1664 grep
1655 </a>
1665 </a>
1656 </td><td>
1666 </td><td>
1657 search for a pattern in specified files and revisions
1667 search for a pattern in specified files and revisions
1658 </td></tr>
1668 </td></tr>
1659 <tr><td>
1669 <tr><td>
1660 <a href="/help/heads">
1670 <a href="/help/heads">
1661 heads
1671 heads
1662 </a>
1672 </a>
1663 </td><td>
1673 </td><td>
1664 show branch heads
1674 show branch heads
1665 </td></tr>
1675 </td></tr>
1666 <tr><td>
1676 <tr><td>
1667 <a href="/help/help">
1677 <a href="/help/help">
1668 help
1678 help
1669 </a>
1679 </a>
1670 </td><td>
1680 </td><td>
1671 show help for a given topic or a help overview
1681 show help for a given topic or a help overview
1672 </td></tr>
1682 </td></tr>
1673 <tr><td>
1683 <tr><td>
1674 <a href="/help/identify">
1684 <a href="/help/identify">
1675 identify
1685 identify
1676 </a>
1686 </a>
1677 </td><td>
1687 </td><td>
1678 identify the working directory or specified revision
1688 identify the working directory or specified revision
1679 </td></tr>
1689 </td></tr>
1680 <tr><td>
1690 <tr><td>
1681 <a href="/help/import">
1691 <a href="/help/import">
1682 import
1692 import
1683 </a>
1693 </a>
1684 </td><td>
1694 </td><td>
1685 import an ordered set of patches
1695 import an ordered set of patches
1686 </td></tr>
1696 </td></tr>
1687 <tr><td>
1697 <tr><td>
1688 <a href="/help/incoming">
1698 <a href="/help/incoming">
1689 incoming
1699 incoming
1690 </a>
1700 </a>
1691 </td><td>
1701 </td><td>
1692 show new changesets found in source
1702 show new changesets found in source
1693 </td></tr>
1703 </td></tr>
1694 <tr><td>
1704 <tr><td>
1695 <a href="/help/manifest">
1705 <a href="/help/manifest">
1696 manifest
1706 manifest
1697 </a>
1707 </a>
1698 </td><td>
1708 </td><td>
1699 output the current or given revision of the project manifest
1709 output the current or given revision of the project manifest
1700 </td></tr>
1710 </td></tr>
1701 <tr><td>
1711 <tr><td>
1702 <a href="/help/nohelp">
1712 <a href="/help/nohelp">
1703 nohelp
1713 nohelp
1704 </a>
1714 </a>
1705 </td><td>
1715 </td><td>
1706 (no help text available)
1716 (no help text available)
1707 </td></tr>
1717 </td></tr>
1708 <tr><td>
1718 <tr><td>
1709 <a href="/help/outgoing">
1719 <a href="/help/outgoing">
1710 outgoing
1720 outgoing
1711 </a>
1721 </a>
1712 </td><td>
1722 </td><td>
1713 show changesets not found in the destination
1723 show changesets not found in the destination
1714 </td></tr>
1724 </td></tr>
1715 <tr><td>
1725 <tr><td>
1716 <a href="/help/paths">
1726 <a href="/help/paths">
1717 paths
1727 paths
1718 </a>
1728 </a>
1719 </td><td>
1729 </td><td>
1720 show aliases for remote repositories
1730 show aliases for remote repositories
1721 </td></tr>
1731 </td></tr>
1722 <tr><td>
1732 <tr><td>
1723 <a href="/help/phase">
1733 <a href="/help/phase">
1724 phase
1734 phase
1725 </a>
1735 </a>
1726 </td><td>
1736 </td><td>
1727 set or show the current phase name
1737 set or show the current phase name
1728 </td></tr>
1738 </td></tr>
1729 <tr><td>
1739 <tr><td>
1730 <a href="/help/recover">
1740 <a href="/help/recover">
1731 recover
1741 recover
1732 </a>
1742 </a>
1733 </td><td>
1743 </td><td>
1734 roll back an interrupted transaction
1744 roll back an interrupted transaction
1735 </td></tr>
1745 </td></tr>
1736 <tr><td>
1746 <tr><td>
1737 <a href="/help/rename">
1747 <a href="/help/rename">
1738 rename
1748 rename
1739 </a>
1749 </a>
1740 </td><td>
1750 </td><td>
1741 rename files; equivalent of copy + remove
1751 rename files; equivalent of copy + remove
1742 </td></tr>
1752 </td></tr>
1743 <tr><td>
1753 <tr><td>
1744 <a href="/help/resolve">
1754 <a href="/help/resolve">
1745 resolve
1755 resolve
1746 </a>
1756 </a>
1747 </td><td>
1757 </td><td>
1748 redo merges or set/view the merge status of files
1758 redo merges or set/view the merge status of files
1749 </td></tr>
1759 </td></tr>
1750 <tr><td>
1760 <tr><td>
1751 <a href="/help/revert">
1761 <a href="/help/revert">
1752 revert
1762 revert
1753 </a>
1763 </a>
1754 </td><td>
1764 </td><td>
1755 restore files to their checkout state
1765 restore files to their checkout state
1756 </td></tr>
1766 </td></tr>
1757 <tr><td>
1767 <tr><td>
1758 <a href="/help/root">
1768 <a href="/help/root">
1759 root
1769 root
1760 </a>
1770 </a>
1761 </td><td>
1771 </td><td>
1762 print the root (top) of the current working directory
1772 print the root (top) of the current working directory
1763 </td></tr>
1773 </td></tr>
1764 <tr><td>
1774 <tr><td>
1765 <a href="/help/tag">
1775 <a href="/help/tag">
1766 tag
1776 tag
1767 </a>
1777 </a>
1768 </td><td>
1778 </td><td>
1769 add one or more tags for the current or given revision
1779 add one or more tags for the current or given revision
1770 </td></tr>
1780 </td></tr>
1771 <tr><td>
1781 <tr><td>
1772 <a href="/help/tags">
1782 <a href="/help/tags">
1773 tags
1783 tags
1774 </a>
1784 </a>
1775 </td><td>
1785 </td><td>
1776 list repository tags
1786 list repository tags
1777 </td></tr>
1787 </td></tr>
1778 <tr><td>
1788 <tr><td>
1779 <a href="/help/unbundle">
1789 <a href="/help/unbundle">
1780 unbundle
1790 unbundle
1781 </a>
1791 </a>
1782 </td><td>
1792 </td><td>
1783 apply one or more changegroup files
1793 apply one or more changegroup files
1784 </td></tr>
1794 </td></tr>
1785 <tr><td>
1795 <tr><td>
1786 <a href="/help/verify">
1796 <a href="/help/verify">
1787 verify
1797 verify
1788 </a>
1798 </a>
1789 </td><td>
1799 </td><td>
1790 verify the integrity of the repository
1800 verify the integrity of the repository
1791 </td></tr>
1801 </td></tr>
1792 <tr><td>
1802 <tr><td>
1793 <a href="/help/version">
1803 <a href="/help/version">
1794 version
1804 version
1795 </a>
1805 </a>
1796 </td><td>
1806 </td><td>
1797 output version and copyright information
1807 output version and copyright information
1798 </td></tr>
1808 </td></tr>
1799 </table>
1809 </table>
1800 </div>
1810 </div>
1801 </div>
1811 </div>
1802
1812
1803 <script type="text/javascript">process_dates()</script>
1813 <script type="text/javascript">process_dates()</script>
1804
1814
1805
1815
1806 </body>
1816 </body>
1807 </html>
1817 </html>
1808
1818
1809
1819
1810 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
1820 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
1811 200 Script output follows
1821 200 Script output follows
1812
1822
1813 <!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">
1814 <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">
1815 <head>
1825 <head>
1816 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1826 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1817 <meta name="robots" content="index, nofollow" />
1827 <meta name="robots" content="index, nofollow" />
1818 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1828 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1819 <script type="text/javascript" src="/static/mercurial.js"></script>
1829 <script type="text/javascript" src="/static/mercurial.js"></script>
1820
1830
1821 <title>Help: add</title>
1831 <title>Help: add</title>
1822 </head>
1832 </head>
1823 <body>
1833 <body>
1824
1834
1825 <div class="container">
1835 <div class="container">
1826 <div class="menu">
1836 <div class="menu">
1827 <div class="logo">
1837 <div class="logo">
1828 <a href="http://mercurial.selenic.com/">
1838 <a href="http://mercurial.selenic.com/">
1829 <img src="/static/hglogo.png" alt="mercurial" /></a>
1839 <img src="/static/hglogo.png" alt="mercurial" /></a>
1830 </div>
1840 </div>
1831 <ul>
1841 <ul>
1832 <li><a href="/shortlog">log</a></li>
1842 <li><a href="/shortlog">log</a></li>
1833 <li><a href="/graph">graph</a></li>
1843 <li><a href="/graph">graph</a></li>
1834 <li><a href="/tags">tags</a></li>
1844 <li><a href="/tags">tags</a></li>
1835 <li><a href="/bookmarks">bookmarks</a></li>
1845 <li><a href="/bookmarks">bookmarks</a></li>
1836 <li><a href="/branches">branches</a></li>
1846 <li><a href="/branches">branches</a></li>
1837 </ul>
1847 </ul>
1838 <ul>
1848 <ul>
1839 <li class="active"><a href="/help">help</a></li>
1849 <li class="active"><a href="/help">help</a></li>
1840 </ul>
1850 </ul>
1841 </div>
1851 </div>
1842
1852
1843 <div class="main">
1853 <div class="main">
1844 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1854 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1845 <h3>Help: add</h3>
1855 <h3>Help: add</h3>
1846
1856
1847 <form class="search" action="/log">
1857 <form class="search" action="/log">
1848
1858
1849 <p><input name="rev" id="search1" type="text" size="30" /></p>
1859 <p><input name="rev" id="search1" type="text" size="30" /></p>
1850 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1860 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1851 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1861 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1852 </form>
1862 </form>
1853 <div id="doc">
1863 <div id="doc">
1854 <p>
1864 <p>
1855 hg add [OPTION]... [FILE]...
1865 hg add [OPTION]... [FILE]...
1856 </p>
1866 </p>
1857 <p>
1867 <p>
1858 add the specified files on the next commit
1868 add the specified files on the next commit
1859 </p>
1869 </p>
1860 <p>
1870 <p>
1861 Schedule files to be version controlled and added to the
1871 Schedule files to be version controlled and added to the
1862 repository.
1872 repository.
1863 </p>
1873 </p>
1864 <p>
1874 <p>
1865 The files will be added to the repository at the next commit. To
1875 The files will be added to the repository at the next commit. To
1866 undo an add before that, see &quot;hg forget&quot;.
1876 undo an add before that, see &quot;hg forget&quot;.
1867 </p>
1877 </p>
1868 <p>
1878 <p>
1869 If no names are given, add all files to the repository.
1879 If no names are given, add all files to the repository.
1870 </p>
1880 </p>
1871 <p>
1881 <p>
1872 An example showing how new (unknown) files are added
1882 An example showing how new (unknown) files are added
1873 automatically by &quot;hg add&quot;:
1883 automatically by &quot;hg add&quot;:
1874 </p>
1884 </p>
1875 <pre>
1885 <pre>
1876 \$ ls (re)
1886 \$ ls (re)
1877 foo.c
1887 foo.c
1878 \$ hg status (re)
1888 \$ hg status (re)
1879 ? foo.c
1889 ? foo.c
1880 \$ hg add (re)
1890 \$ hg add (re)
1881 adding foo.c
1891 adding foo.c
1882 \$ hg status (re)
1892 \$ hg status (re)
1883 A foo.c
1893 A foo.c
1884 </pre>
1894 </pre>
1885 <p>
1895 <p>
1886 Returns 0 if all files are successfully added.
1896 Returns 0 if all files are successfully added.
1887 </p>
1897 </p>
1888 <p>
1898 <p>
1889 options ([+] can be repeated):
1899 options ([+] can be repeated):
1890 </p>
1900 </p>
1891 <table>
1901 <table>
1892 <tr><td>-I</td>
1902 <tr><td>-I</td>
1893 <td>--include PATTERN [+]</td>
1903 <td>--include PATTERN [+]</td>
1894 <td>include names matching the given patterns</td></tr>
1904 <td>include names matching the given patterns</td></tr>
1895 <tr><td>-X</td>
1905 <tr><td>-X</td>
1896 <td>--exclude PATTERN [+]</td>
1906 <td>--exclude PATTERN [+]</td>
1897 <td>exclude names matching the given patterns</td></tr>
1907 <td>exclude names matching the given patterns</td></tr>
1898 <tr><td>-S</td>
1908 <tr><td>-S</td>
1899 <td>--subrepos</td>
1909 <td>--subrepos</td>
1900 <td>recurse into subrepositories</td></tr>
1910 <td>recurse into subrepositories</td></tr>
1901 <tr><td>-n</td>
1911 <tr><td>-n</td>
1902 <td>--dry-run</td>
1912 <td>--dry-run</td>
1903 <td>do not perform actions, just print output</td></tr>
1913 <td>do not perform actions, just print output</td></tr>
1904 </table>
1914 </table>
1905 <p>
1915 <p>
1906 global options ([+] can be repeated):
1916 global options ([+] can be repeated):
1907 </p>
1917 </p>
1908 <table>
1918 <table>
1909 <tr><td>-R</td>
1919 <tr><td>-R</td>
1910 <td>--repository REPO</td>
1920 <td>--repository REPO</td>
1911 <td>repository root directory or name of overlay bundle file</td></tr>
1921 <td>repository root directory or name of overlay bundle file</td></tr>
1912 <tr><td></td>
1922 <tr><td></td>
1913 <td>--cwd DIR</td>
1923 <td>--cwd DIR</td>
1914 <td>change working directory</td></tr>
1924 <td>change working directory</td></tr>
1915 <tr><td>-y</td>
1925 <tr><td>-y</td>
1916 <td>--noninteractive</td>
1926 <td>--noninteractive</td>
1917 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1927 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1918 <tr><td>-q</td>
1928 <tr><td>-q</td>
1919 <td>--quiet</td>
1929 <td>--quiet</td>
1920 <td>suppress output</td></tr>
1930 <td>suppress output</td></tr>
1921 <tr><td>-v</td>
1931 <tr><td>-v</td>
1922 <td>--verbose</td>
1932 <td>--verbose</td>
1923 <td>enable additional output</td></tr>
1933 <td>enable additional output</td></tr>
1924 <tr><td></td>
1934 <tr><td></td>
1925 <td>--config CONFIG [+]</td>
1935 <td>--config CONFIG [+]</td>
1926 <td>set/override config option (use 'section.name=value')</td></tr>
1936 <td>set/override config option (use 'section.name=value')</td></tr>
1927 <tr><td></td>
1937 <tr><td></td>
1928 <td>--debug</td>
1938 <td>--debug</td>
1929 <td>enable debugging output</td></tr>
1939 <td>enable debugging output</td></tr>
1930 <tr><td></td>
1940 <tr><td></td>
1931 <td>--debugger</td>
1941 <td>--debugger</td>
1932 <td>start debugger</td></tr>
1942 <td>start debugger</td></tr>
1933 <tr><td></td>
1943 <tr><td></td>
1934 <td>--encoding ENCODE</td>
1944 <td>--encoding ENCODE</td>
1935 <td>set the charset encoding (default: ascii)</td></tr>
1945 <td>set the charset encoding (default: ascii)</td></tr>
1936 <tr><td></td>
1946 <tr><td></td>
1937 <td>--encodingmode MODE</td>
1947 <td>--encodingmode MODE</td>
1938 <td>set the charset encoding mode (default: strict)</td></tr>
1948 <td>set the charset encoding mode (default: strict)</td></tr>
1939 <tr><td></td>
1949 <tr><td></td>
1940 <td>--traceback</td>
1950 <td>--traceback</td>
1941 <td>always print a traceback on exception</td></tr>
1951 <td>always print a traceback on exception</td></tr>
1942 <tr><td></td>
1952 <tr><td></td>
1943 <td>--time</td>
1953 <td>--time</td>
1944 <td>time how long the command takes</td></tr>
1954 <td>time how long the command takes</td></tr>
1945 <tr><td></td>
1955 <tr><td></td>
1946 <td>--profile</td>
1956 <td>--profile</td>
1947 <td>print command execution profile</td></tr>
1957 <td>print command execution profile</td></tr>
1948 <tr><td></td>
1958 <tr><td></td>
1949 <td>--version</td>
1959 <td>--version</td>
1950 <td>output version information and exit</td></tr>
1960 <td>output version information and exit</td></tr>
1951 <tr><td>-h</td>
1961 <tr><td>-h</td>
1952 <td>--help</td>
1962 <td>--help</td>
1953 <td>display help and exit</td></tr>
1963 <td>display help and exit</td></tr>
1954 <tr><td></td>
1964 <tr><td></td>
1955 <td>--hidden</td>
1965 <td>--hidden</td>
1956 <td>consider hidden changesets</td></tr>
1966 <td>consider hidden changesets</td></tr>
1957 </table>
1967 </table>
1958
1968
1959 </div>
1969 </div>
1960 </div>
1970 </div>
1961 </div>
1971 </div>
1962
1972
1963 <script type="text/javascript">process_dates()</script>
1973 <script type="text/javascript">process_dates()</script>
1964
1974
1965
1975
1966 </body>
1976 </body>
1967 </html>
1977 </html>
1968
1978
1969
1979
1970 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
1980 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
1971 200 Script output follows
1981 200 Script output follows
1972
1982
1973 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1983 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1974 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1984 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1975 <head>
1985 <head>
1976 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1986 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1977 <meta name="robots" content="index, nofollow" />
1987 <meta name="robots" content="index, nofollow" />
1978 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1988 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1979 <script type="text/javascript" src="/static/mercurial.js"></script>
1989 <script type="text/javascript" src="/static/mercurial.js"></script>
1980
1990
1981 <title>Help: remove</title>
1991 <title>Help: remove</title>
1982 </head>
1992 </head>
1983 <body>
1993 <body>
1984
1994
1985 <div class="container">
1995 <div class="container">
1986 <div class="menu">
1996 <div class="menu">
1987 <div class="logo">
1997 <div class="logo">
1988 <a href="http://mercurial.selenic.com/">
1998 <a href="http://mercurial.selenic.com/">
1989 <img src="/static/hglogo.png" alt="mercurial" /></a>
1999 <img src="/static/hglogo.png" alt="mercurial" /></a>
1990 </div>
2000 </div>
1991 <ul>
2001 <ul>
1992 <li><a href="/shortlog">log</a></li>
2002 <li><a href="/shortlog">log</a></li>
1993 <li><a href="/graph">graph</a></li>
2003 <li><a href="/graph">graph</a></li>
1994 <li><a href="/tags">tags</a></li>
2004 <li><a href="/tags">tags</a></li>
1995 <li><a href="/bookmarks">bookmarks</a></li>
2005 <li><a href="/bookmarks">bookmarks</a></li>
1996 <li><a href="/branches">branches</a></li>
2006 <li><a href="/branches">branches</a></li>
1997 </ul>
2007 </ul>
1998 <ul>
2008 <ul>
1999 <li class="active"><a href="/help">help</a></li>
2009 <li class="active"><a href="/help">help</a></li>
2000 </ul>
2010 </ul>
2001 </div>
2011 </div>
2002
2012
2003 <div class="main">
2013 <div class="main">
2004 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2014 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2005 <h3>Help: remove</h3>
2015 <h3>Help: remove</h3>
2006
2016
2007 <form class="search" action="/log">
2017 <form class="search" action="/log">
2008
2018
2009 <p><input name="rev" id="search1" type="text" size="30" /></p>
2019 <p><input name="rev" id="search1" type="text" size="30" /></p>
2010 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2020 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2011 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2021 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2012 </form>
2022 </form>
2013 <div id="doc">
2023 <div id="doc">
2014 <p>
2024 <p>
2015 hg remove [OPTION]... FILE...
2025 hg remove [OPTION]... FILE...
2016 </p>
2026 </p>
2017 <p>
2027 <p>
2018 aliases: rm
2028 aliases: rm
2019 </p>
2029 </p>
2020 <p>
2030 <p>
2021 remove the specified files on the next commit
2031 remove the specified files on the next commit
2022 </p>
2032 </p>
2023 <p>
2033 <p>
2024 Schedule the indicated files for removal from the current branch.
2034 Schedule the indicated files for removal from the current branch.
2025 </p>
2035 </p>
2026 <p>
2036 <p>
2027 This command schedules the files to be removed at the next commit.
2037 This command schedules the files to be removed at the next commit.
2028 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2038 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2029 files, see &quot;hg forget&quot;.
2039 files, see &quot;hg forget&quot;.
2030 </p>
2040 </p>
2031 <p>
2041 <p>
2032 -A/--after can be used to remove only files that have already
2042 -A/--after can be used to remove only files that have already
2033 been deleted, -f/--force can be used to force deletion, and -Af
2043 been deleted, -f/--force can be used to force deletion, and -Af
2034 can be used to remove files from the next revision without
2044 can be used to remove files from the next revision without
2035 deleting them from the working directory.
2045 deleting them from the working directory.
2036 </p>
2046 </p>
2037 <p>
2047 <p>
2038 The following table details the behavior of remove for different
2048 The following table details the behavior of remove for different
2039 file states (columns) and option combinations (rows). The file
2049 file states (columns) and option combinations (rows). The file
2040 states are Added [A], Clean [C], Modified [M] and Missing [!]
2050 states are Added [A], Clean [C], Modified [M] and Missing [!]
2041 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2051 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2042 (from branch) and Delete (from disk):
2052 (from branch) and Delete (from disk):
2043 </p>
2053 </p>
2044 <table>
2054 <table>
2045 <tr><td>opt/state</td>
2055 <tr><td>opt/state</td>
2046 <td>A</td>
2056 <td>A</td>
2047 <td>C</td>
2057 <td>C</td>
2048 <td>M</td>
2058 <td>M</td>
2049 <td>!</td></tr>
2059 <td>!</td></tr>
2050 <tr><td>none</td>
2060 <tr><td>none</td>
2051 <td>W</td>
2061 <td>W</td>
2052 <td>RD</td>
2062 <td>RD</td>
2053 <td>W</td>
2063 <td>W</td>
2054 <td>R</td></tr>
2064 <td>R</td></tr>
2055 <tr><td>-f</td>
2065 <tr><td>-f</td>
2056 <td>R</td>
2066 <td>R</td>
2057 <td>RD</td>
2067 <td>RD</td>
2058 <td>RD</td>
2068 <td>RD</td>
2059 <td>R</td></tr>
2069 <td>R</td></tr>
2060 <tr><td>-A</td>
2070 <tr><td>-A</td>
2061 <td>W</td>
2071 <td>W</td>
2062 <td>W</td>
2072 <td>W</td>
2063 <td>W</td>
2073 <td>W</td>
2064 <td>R</td></tr>
2074 <td>R</td></tr>
2065 <tr><td>-Af</td>
2075 <tr><td>-Af</td>
2066 <td>R</td>
2076 <td>R</td>
2067 <td>R</td>
2077 <td>R</td>
2068 <td>R</td>
2078 <td>R</td>
2069 <td>R</td></tr>
2079 <td>R</td></tr>
2070 </table>
2080 </table>
2071 <p>
2081 <p>
2072 Note that remove never deletes files in Added [A] state from the
2082 Note that remove never deletes files in Added [A] state from the
2073 working directory, not even if option --force is specified.
2083 working directory, not even if option --force is specified.
2074 </p>
2084 </p>
2075 <p>
2085 <p>
2076 Returns 0 on success, 1 if any warnings encountered.
2086 Returns 0 on success, 1 if any warnings encountered.
2077 </p>
2087 </p>
2078 <p>
2088 <p>
2079 options ([+] can be repeated):
2089 options ([+] can be repeated):
2080 </p>
2090 </p>
2081 <table>
2091 <table>
2082 <tr><td>-A</td>
2092 <tr><td>-A</td>
2083 <td>--after</td>
2093 <td>--after</td>
2084 <td>record delete for missing files</td></tr>
2094 <td>record delete for missing files</td></tr>
2085 <tr><td>-f</td>
2095 <tr><td>-f</td>
2086 <td>--force</td>
2096 <td>--force</td>
2087 <td>remove (and delete) file even if added or modified</td></tr>
2097 <td>remove (and delete) file even if added or modified</td></tr>
2088 <tr><td>-S</td>
2098 <tr><td>-S</td>
2089 <td>--subrepos</td>
2099 <td>--subrepos</td>
2090 <td>recurse into subrepositories</td></tr>
2100 <td>recurse into subrepositories</td></tr>
2091 <tr><td>-I</td>
2101 <tr><td>-I</td>
2092 <td>--include PATTERN [+]</td>
2102 <td>--include PATTERN [+]</td>
2093 <td>include names matching the given patterns</td></tr>
2103 <td>include names matching the given patterns</td></tr>
2094 <tr><td>-X</td>
2104 <tr><td>-X</td>
2095 <td>--exclude PATTERN [+]</td>
2105 <td>--exclude PATTERN [+]</td>
2096 <td>exclude names matching the given patterns</td></tr>
2106 <td>exclude names matching the given patterns</td></tr>
2097 </table>
2107 </table>
2098 <p>
2108 <p>
2099 global options ([+] can be repeated):
2109 global options ([+] can be repeated):
2100 </p>
2110 </p>
2101 <table>
2111 <table>
2102 <tr><td>-R</td>
2112 <tr><td>-R</td>
2103 <td>--repository REPO</td>
2113 <td>--repository REPO</td>
2104 <td>repository root directory or name of overlay bundle file</td></tr>
2114 <td>repository root directory or name of overlay bundle file</td></tr>
2105 <tr><td></td>
2115 <tr><td></td>
2106 <td>--cwd DIR</td>
2116 <td>--cwd DIR</td>
2107 <td>change working directory</td></tr>
2117 <td>change working directory</td></tr>
2108 <tr><td>-y</td>
2118 <tr><td>-y</td>
2109 <td>--noninteractive</td>
2119 <td>--noninteractive</td>
2110 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2120 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2111 <tr><td>-q</td>
2121 <tr><td>-q</td>
2112 <td>--quiet</td>
2122 <td>--quiet</td>
2113 <td>suppress output</td></tr>
2123 <td>suppress output</td></tr>
2114 <tr><td>-v</td>
2124 <tr><td>-v</td>
2115 <td>--verbose</td>
2125 <td>--verbose</td>
2116 <td>enable additional output</td></tr>
2126 <td>enable additional output</td></tr>
2117 <tr><td></td>
2127 <tr><td></td>
2118 <td>--config CONFIG [+]</td>
2128 <td>--config CONFIG [+]</td>
2119 <td>set/override config option (use 'section.name=value')</td></tr>
2129 <td>set/override config option (use 'section.name=value')</td></tr>
2120 <tr><td></td>
2130 <tr><td></td>
2121 <td>--debug</td>
2131 <td>--debug</td>
2122 <td>enable debugging output</td></tr>
2132 <td>enable debugging output</td></tr>
2123 <tr><td></td>
2133 <tr><td></td>
2124 <td>--debugger</td>
2134 <td>--debugger</td>
2125 <td>start debugger</td></tr>
2135 <td>start debugger</td></tr>
2126 <tr><td></td>
2136 <tr><td></td>
2127 <td>--encoding ENCODE</td>
2137 <td>--encoding ENCODE</td>
2128 <td>set the charset encoding (default: ascii)</td></tr>
2138 <td>set the charset encoding (default: ascii)</td></tr>
2129 <tr><td></td>
2139 <tr><td></td>
2130 <td>--encodingmode MODE</td>
2140 <td>--encodingmode MODE</td>
2131 <td>set the charset encoding mode (default: strict)</td></tr>
2141 <td>set the charset encoding mode (default: strict)</td></tr>
2132 <tr><td></td>
2142 <tr><td></td>
2133 <td>--traceback</td>
2143 <td>--traceback</td>
2134 <td>always print a traceback on exception</td></tr>
2144 <td>always print a traceback on exception</td></tr>
2135 <tr><td></td>
2145 <tr><td></td>
2136 <td>--time</td>
2146 <td>--time</td>
2137 <td>time how long the command takes</td></tr>
2147 <td>time how long the command takes</td></tr>
2138 <tr><td></td>
2148 <tr><td></td>
2139 <td>--profile</td>
2149 <td>--profile</td>
2140 <td>print command execution profile</td></tr>
2150 <td>print command execution profile</td></tr>
2141 <tr><td></td>
2151 <tr><td></td>
2142 <td>--version</td>
2152 <td>--version</td>
2143 <td>output version information and exit</td></tr>
2153 <td>output version information and exit</td></tr>
2144 <tr><td>-h</td>
2154 <tr><td>-h</td>
2145 <td>--help</td>
2155 <td>--help</td>
2146 <td>display help and exit</td></tr>
2156 <td>display help and exit</td></tr>
2147 <tr><td></td>
2157 <tr><td></td>
2148 <td>--hidden</td>
2158 <td>--hidden</td>
2149 <td>consider hidden changesets</td></tr>
2159 <td>consider hidden changesets</td></tr>
2150 </table>
2160 </table>
2151
2161
2152 </div>
2162 </div>
2153 </div>
2163 </div>
2154 </div>
2164 </div>
2155
2165
2156 <script type="text/javascript">process_dates()</script>
2166 <script type="text/javascript">process_dates()</script>
2157
2167
2158
2168
2159 </body>
2169 </body>
2160 </html>
2170 </html>
2161
2171
2162
2172
2163 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2173 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2164 200 Script output follows
2174 200 Script output follows
2165
2175
2166 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2176 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2167 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2177 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2168 <head>
2178 <head>
2169 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2179 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2170 <meta name="robots" content="index, nofollow" />
2180 <meta name="robots" content="index, nofollow" />
2171 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2181 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2172 <script type="text/javascript" src="/static/mercurial.js"></script>
2182 <script type="text/javascript" src="/static/mercurial.js"></script>
2173
2183
2174 <title>Help: revisions</title>
2184 <title>Help: revisions</title>
2175 </head>
2185 </head>
2176 <body>
2186 <body>
2177
2187
2178 <div class="container">
2188 <div class="container">
2179 <div class="menu">
2189 <div class="menu">
2180 <div class="logo">
2190 <div class="logo">
2181 <a href="http://mercurial.selenic.com/">
2191 <a href="http://mercurial.selenic.com/">
2182 <img src="/static/hglogo.png" alt="mercurial" /></a>
2192 <img src="/static/hglogo.png" alt="mercurial" /></a>
2183 </div>
2193 </div>
2184 <ul>
2194 <ul>
2185 <li><a href="/shortlog">log</a></li>
2195 <li><a href="/shortlog">log</a></li>
2186 <li><a href="/graph">graph</a></li>
2196 <li><a href="/graph">graph</a></li>
2187 <li><a href="/tags">tags</a></li>
2197 <li><a href="/tags">tags</a></li>
2188 <li><a href="/bookmarks">bookmarks</a></li>
2198 <li><a href="/bookmarks">bookmarks</a></li>
2189 <li><a href="/branches">branches</a></li>
2199 <li><a href="/branches">branches</a></li>
2190 </ul>
2200 </ul>
2191 <ul>
2201 <ul>
2192 <li class="active"><a href="/help">help</a></li>
2202 <li class="active"><a href="/help">help</a></li>
2193 </ul>
2203 </ul>
2194 </div>
2204 </div>
2195
2205
2196 <div class="main">
2206 <div class="main">
2197 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2207 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2198 <h3>Help: revisions</h3>
2208 <h3>Help: revisions</h3>
2199
2209
2200 <form class="search" action="/log">
2210 <form class="search" action="/log">
2201
2211
2202 <p><input name="rev" id="search1" type="text" size="30" /></p>
2212 <p><input name="rev" id="search1" type="text" size="30" /></p>
2203 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2213 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2204 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2214 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2205 </form>
2215 </form>
2206 <div id="doc">
2216 <div id="doc">
2207 <h1>Specifying Single Revisions</h1>
2217 <h1>Specifying Single Revisions</h1>
2208 <p>
2218 <p>
2209 Mercurial supports several ways to specify individual revisions.
2219 Mercurial supports several ways to specify individual revisions.
2210 </p>
2220 </p>
2211 <p>
2221 <p>
2212 A plain integer is treated as a revision number. Negative integers are
2222 A plain integer is treated as a revision number. Negative integers are
2213 treated as sequential offsets from the tip, with -1 denoting the tip,
2223 treated as sequential offsets from the tip, with -1 denoting the tip,
2214 -2 denoting the revision prior to the tip, and so forth.
2224 -2 denoting the revision prior to the tip, and so forth.
2215 </p>
2225 </p>
2216 <p>
2226 <p>
2217 A 40-digit hexadecimal string is treated as a unique revision
2227 A 40-digit hexadecimal string is treated as a unique revision
2218 identifier.
2228 identifier.
2219 </p>
2229 </p>
2220 <p>
2230 <p>
2221 A hexadecimal string less than 40 characters long is treated as a
2231 A hexadecimal string less than 40 characters long is treated as a
2222 unique revision identifier and is referred to as a short-form
2232 unique revision identifier and is referred to as a short-form
2223 identifier. A short-form identifier is only valid if it is the prefix
2233 identifier. A short-form identifier is only valid if it is the prefix
2224 of exactly one full-length identifier.
2234 of exactly one full-length identifier.
2225 </p>
2235 </p>
2226 <p>
2236 <p>
2227 Any other string is treated as a bookmark, tag, or branch name. A
2237 Any other string is treated as a bookmark, tag, or branch name. A
2228 bookmark is a movable pointer to a revision. A tag is a permanent name
2238 bookmark is a movable pointer to a revision. A tag is a permanent name
2229 associated with a revision. A branch name denotes the tipmost open branch head
2239 associated with a revision. A branch name denotes the tipmost open branch head
2230 of that branch - or if they are all closed, the tipmost closed head of the
2240 of that branch - or if they are all closed, the tipmost closed head of the
2231 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2241 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2232 </p>
2242 </p>
2233 <p>
2243 <p>
2234 The reserved name &quot;tip&quot; always identifies the most recent revision.
2244 The reserved name &quot;tip&quot; always identifies the most recent revision.
2235 </p>
2245 </p>
2236 <p>
2246 <p>
2237 The reserved name &quot;null&quot; indicates the null revision. This is the
2247 The reserved name &quot;null&quot; indicates the null revision. This is the
2238 revision of an empty repository, and the parent of revision 0.
2248 revision of an empty repository, and the parent of revision 0.
2239 </p>
2249 </p>
2240 <p>
2250 <p>
2241 The reserved name &quot;.&quot; indicates the working directory parent. If no
2251 The reserved name &quot;.&quot; indicates the working directory parent. If no
2242 working directory is checked out, it is equivalent to null. If an
2252 working directory is checked out, it is equivalent to null. If an
2243 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2253 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2244 parent.
2254 parent.
2245 </p>
2255 </p>
2246
2256
2247 </div>
2257 </div>
2248 </div>
2258 </div>
2249 </div>
2259 </div>
2250
2260
2251 <script type="text/javascript">process_dates()</script>
2261 <script type="text/javascript">process_dates()</script>
2252
2262
2253
2263
2254 </body>
2264 </body>
2255 </html>
2265 </html>
2256
2266
2257
2267
2258 $ killdaemons.py
2268 $ killdaemons.py
2259
2269
2260 #endif
2270 #endif
@@ -1,1111 +1,1115 b''
1 #require json
1 #require json
2 #require serve
2 #require serve
3
3
4 $ request() {
4 $ request() {
5 > get-with-headers.py --json localhost:$HGPORT "$1"
5 > get-with-headers.py --json localhost:$HGPORT "$1"
6 > }
6 > }
7
7
8 $ hg init test
8 $ hg init test
9 $ cd test
9 $ cd test
10 $ mkdir da
10 $ mkdir da
11 $ echo foo > da/foo
11 $ echo foo > da/foo
12 $ echo foo > foo
12 $ echo foo > foo
13 $ hg -q ci -A -m initial
13 $ hg -q ci -A -m initial
14 $ echo bar > foo
14 $ echo bar > foo
15 $ hg ci -m 'modify foo'
15 $ hg ci -m 'modify foo'
16 $ echo bar > da/foo
16 $ echo bar > da/foo
17 $ hg ci -m 'modify da/foo'
17 $ hg ci -m 'modify da/foo'
18 $ hg bookmark bookmark1
18 $ hg bookmark bookmark1
19 $ hg up default
19 $ hg up default
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 (leaving bookmark bookmark1)
21 (leaving bookmark bookmark1)
22 $ hg mv foo foo-new
22 $ hg mv foo foo-new
23 $ hg commit -m 'move foo'
23 $ hg commit -m 'move foo'
24 $ hg tag -m 'create tag' tag1
24 $ hg tag -m 'create tag' tag1
25 $ hg phase --public -r .
25 $ hg phase --public -r .
26 $ echo baz > da/foo
26 $ echo baz > da/foo
27 $ hg commit -m 'another commit to da/foo'
27 $ hg commit -m 'another commit to da/foo'
28 $ hg tag -m 'create tag2' tag2
28 $ hg tag -m 'create tag2' tag2
29 $ hg bookmark bookmark2
29 $ hg bookmark bookmark2
30 $ hg -q up -r 0
30 $ hg -q up -r 0
31 $ hg -q branch test-branch
31 $ hg -q branch test-branch
32 $ echo branch > foo
32 $ echo branch > foo
33 $ hg commit -m 'create test branch'
33 $ hg commit -m 'create test branch'
34 $ echo branch_commit_2 > foo
34 $ echo branch_commit_2 > foo
35 $ hg commit -m 'another commit in test-branch'
35 $ hg commit -m 'another commit in test-branch'
36 $ hg -q up default
36 $ hg -q up default
37 $ hg merge --tool :local test-branch
37 $ hg merge --tool :local test-branch
38 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
38 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
39 (branch merge, don't forget to commit)
39 (branch merge, don't forget to commit)
40 $ hg commit -m 'merge test-branch into default'
40 $ hg commit -m 'merge test-branch into default'
41
41
42 $ hg log -G
42 $ hg log -G
43 @ changeset: 9:cc725e08502a
43 @ changeset: 9:cc725e08502a
44 |\ tag: tip
44 |\ tag: tip
45 | | parent: 6:ceed296fe500
45 | | parent: 6:ceed296fe500
46 | | parent: 8:ed66c30e87eb
46 | | parent: 8:ed66c30e87eb
47 | | user: test
47 | | user: test
48 | | date: Thu Jan 01 00:00:00 1970 +0000
48 | | date: Thu Jan 01 00:00:00 1970 +0000
49 | | summary: merge test-branch into default
49 | | summary: merge test-branch into default
50 | |
50 | |
51 | o changeset: 8:ed66c30e87eb
51 | o changeset: 8:ed66c30e87eb
52 | | branch: test-branch
52 | | branch: test-branch
53 | | user: test
53 | | user: test
54 | | date: Thu Jan 01 00:00:00 1970 +0000
54 | | date: Thu Jan 01 00:00:00 1970 +0000
55 | | summary: another commit in test-branch
55 | | summary: another commit in test-branch
56 | |
56 | |
57 | o changeset: 7:6ab967a8ab34
57 | o changeset: 7:6ab967a8ab34
58 | | branch: test-branch
58 | | branch: test-branch
59 | | parent: 0:06e557f3edf6
59 | | parent: 0:06e557f3edf6
60 | | user: test
60 | | user: test
61 | | date: Thu Jan 01 00:00:00 1970 +0000
61 | | date: Thu Jan 01 00:00:00 1970 +0000
62 | | summary: create test branch
62 | | summary: create test branch
63 | |
63 | |
64 o | changeset: 6:ceed296fe500
64 o | changeset: 6:ceed296fe500
65 | | bookmark: bookmark2
65 | | bookmark: bookmark2
66 | | user: test
66 | | user: test
67 | | date: Thu Jan 01 00:00:00 1970 +0000
67 | | date: Thu Jan 01 00:00:00 1970 +0000
68 | | summary: create tag2
68 | | summary: create tag2
69 | |
69 | |
70 o | changeset: 5:f2890a05fea4
70 o | changeset: 5:f2890a05fea4
71 | | tag: tag2
71 | | tag: tag2
72 | | user: test
72 | | user: test
73 | | date: Thu Jan 01 00:00:00 1970 +0000
73 | | date: Thu Jan 01 00:00:00 1970 +0000
74 | | summary: another commit to da/foo
74 | | summary: another commit to da/foo
75 | |
75 | |
76 o | changeset: 4:93a8ce14f891
76 o | changeset: 4:93a8ce14f891
77 | | user: test
77 | | user: test
78 | | date: Thu Jan 01 00:00:00 1970 +0000
78 | | date: Thu Jan 01 00:00:00 1970 +0000
79 | | summary: create tag
79 | | summary: create tag
80 | |
80 | |
81 o | changeset: 3:78896eb0e102
81 o | changeset: 3:78896eb0e102
82 | | tag: tag1
82 | | tag: tag1
83 | | user: test
83 | | user: test
84 | | date: Thu Jan 01 00:00:00 1970 +0000
84 | | date: Thu Jan 01 00:00:00 1970 +0000
85 | | summary: move foo
85 | | summary: move foo
86 | |
86 | |
87 o | changeset: 2:8d7c456572ac
87 o | changeset: 2:8d7c456572ac
88 | | bookmark: bookmark1
88 | | bookmark: bookmark1
89 | | user: test
89 | | user: test
90 | | date: Thu Jan 01 00:00:00 1970 +0000
90 | | date: Thu Jan 01 00:00:00 1970 +0000
91 | | summary: modify da/foo
91 | | summary: modify da/foo
92 | |
92 | |
93 o | changeset: 1:f8bbb9024b10
93 o | changeset: 1:f8bbb9024b10
94 |/ user: test
94 |/ user: test
95 | date: Thu Jan 01 00:00:00 1970 +0000
95 | date: Thu Jan 01 00:00:00 1970 +0000
96 | summary: modify foo
96 | summary: modify foo
97 |
97 |
98 o changeset: 0:06e557f3edf6
98 o changeset: 0:06e557f3edf6
99 user: test
99 user: test
100 date: Thu Jan 01 00:00:00 1970 +0000
100 date: Thu Jan 01 00:00:00 1970 +0000
101 summary: initial
101 summary: initial
102
102
103
103
104 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
104 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
105 $ cat hg.pid >> $DAEMON_PIDS
105 $ cat hg.pid >> $DAEMON_PIDS
106
106
107 (Try to keep these in roughly the order they are defined in webcommands.py)
107 (Try to keep these in roughly the order they are defined in webcommands.py)
108
108
109 (log is handled by filelog/ and changelog/ - ignore it)
109 (log is handled by filelog/ and changelog/ - ignore it)
110
110
111 (rawfile/ doesn't use templating - nothing to test)
111 (rawfile/ doesn't use templating - nothing to test)
112
112
113 file/{revision}/{path} shows file revision
113 file/{revision}/{path} shows file revision
114
114
115 $ request json-file/06e557f3edf6/foo
115 $ request json-file/06e557f3edf6/foo
116 200 Script output follows
116 200 Script output follows
117
117
118 "not yet implemented"
118 "not yet implemented"
119
119
120 file/{revision} shows root directory info
120 file/{revision} shows root directory info
121
121
122 $ request json-file/cc725e08502a
122 $ request json-file/cc725e08502a
123 200 Script output follows
123 200 Script output follows
124
124
125 {
125 {
126 "abspath": "/",
126 "abspath": "/",
127 "bookmarks": [],
127 "bookmarks": [],
128 "directories": [
128 "directories": [
129 {
129 {
130 "abspath": "/da",
130 "abspath": "/da",
131 "basename": "da",
131 "basename": "da",
132 "emptydirs": ""
132 "emptydirs": ""
133 }
133 }
134 ],
134 ],
135 "files": [
135 "files": [
136 {
136 {
137 "abspath": ".hgtags",
137 "abspath": ".hgtags",
138 "basename": ".hgtags",
138 "basename": ".hgtags",
139 "date": [
139 "date": [
140 0.0,
140 0.0,
141 0
141 0
142 ],
142 ],
143 "flags": "",
143 "flags": "",
144 "size": 92
144 "size": 92
145 },
145 },
146 {
146 {
147 "abspath": "foo-new",
147 "abspath": "foo-new",
148 "basename": "foo-new",
148 "basename": "foo-new",
149 "date": [
149 "date": [
150 0.0,
150 0.0,
151 0
151 0
152 ],
152 ],
153 "flags": "",
153 "flags": "",
154 "size": 4
154 "size": 4
155 }
155 }
156 ],
156 ],
157 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
157 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
158 "tags": [
158 "tags": [
159 "tip"
159 "tip"
160 ]
160 ]
161 }
161 }
162
162
163 changelog/ shows information about several changesets
163 changelog/ shows information about several changesets
164
164
165 $ request json-changelog
165 $ request json-changelog
166 200 Script output follows
166 200 Script output follows
167
167
168 {
168 {
169 "changeset_count": 10,
169 "changeset_count": 10,
170 "changesets": [
170 "changesets": [
171 {
171 {
172 "bookmarks": [],
172 "bookmarks": [],
173 "date": [
173 "date": [
174 0.0,
174 0.0,
175 0
175 0
176 ],
176 ],
177 "desc": "merge test-branch into default",
177 "desc": "merge test-branch into default",
178 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
178 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
179 "tags": [
179 "tags": [
180 "tip"
180 "tip"
181 ],
181 ],
182 "user": "test"
182 "user": "test"
183 },
183 },
184 {
184 {
185 "bookmarks": [],
185 "bookmarks": [],
186 "date": [
186 "date": [
187 0.0,
187 0.0,
188 0
188 0
189 ],
189 ],
190 "desc": "another commit in test-branch",
190 "desc": "another commit in test-branch",
191 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
191 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
192 "tags": [],
192 "tags": [],
193 "user": "test"
193 "user": "test"
194 },
194 },
195 {
195 {
196 "bookmarks": [],
196 "bookmarks": [],
197 "date": [
197 "date": [
198 0.0,
198 0.0,
199 0
199 0
200 ],
200 ],
201 "desc": "create test branch",
201 "desc": "create test branch",
202 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
202 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
203 "tags": [],
203 "tags": [],
204 "user": "test"
204 "user": "test"
205 },
205 },
206 {
206 {
207 "bookmarks": [
207 "bookmarks": [
208 "bookmark2"
208 "bookmark2"
209 ],
209 ],
210 "date": [
210 "date": [
211 0.0,
211 0.0,
212 0
212 0
213 ],
213 ],
214 "desc": "create tag2",
214 "desc": "create tag2",
215 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
215 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
216 "tags": [],
216 "tags": [],
217 "user": "test"
217 "user": "test"
218 },
218 },
219 {
219 {
220 "bookmarks": [],
220 "bookmarks": [],
221 "date": [
221 "date": [
222 0.0,
222 0.0,
223 0
223 0
224 ],
224 ],
225 "desc": "another commit to da/foo",
225 "desc": "another commit to da/foo",
226 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
226 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
227 "tags": [
227 "tags": [
228 "tag2"
228 "tag2"
229 ],
229 ],
230 "user": "test"
230 "user": "test"
231 },
231 },
232 {
232 {
233 "bookmarks": [],
233 "bookmarks": [],
234 "date": [
234 "date": [
235 0.0,
235 0.0,
236 0
236 0
237 ],
237 ],
238 "desc": "create tag",
238 "desc": "create tag",
239 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
239 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
240 "tags": [],
240 "tags": [],
241 "user": "test"
241 "user": "test"
242 },
242 },
243 {
243 {
244 "bookmarks": [],
244 "bookmarks": [],
245 "date": [
245 "date": [
246 0.0,
246 0.0,
247 0
247 0
248 ],
248 ],
249 "desc": "move foo",
249 "desc": "move foo",
250 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
250 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
251 "tags": [
251 "tags": [
252 "tag1"
252 "tag1"
253 ],
253 ],
254 "user": "test"
254 "user": "test"
255 },
255 },
256 {
256 {
257 "bookmarks": [
257 "bookmarks": [
258 "bookmark1"
258 "bookmark1"
259 ],
259 ],
260 "date": [
260 "date": [
261 0.0,
261 0.0,
262 0
262 0
263 ],
263 ],
264 "desc": "modify da/foo",
264 "desc": "modify da/foo",
265 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
265 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
266 "tags": [],
266 "tags": [],
267 "user": "test"
267 "user": "test"
268 },
268 },
269 {
269 {
270 "bookmarks": [],
270 "bookmarks": [],
271 "date": [
271 "date": [
272 0.0,
272 0.0,
273 0
273 0
274 ],
274 ],
275 "desc": "modify foo",
275 "desc": "modify foo",
276 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
276 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
277 "tags": [],
277 "tags": [],
278 "user": "test"
278 "user": "test"
279 },
279 },
280 {
280 {
281 "bookmarks": [],
281 "bookmarks": [],
282 "date": [
282 "date": [
283 0.0,
283 0.0,
284 0
284 0
285 ],
285 ],
286 "desc": "initial",
286 "desc": "initial",
287 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
287 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
288 "tags": [],
288 "tags": [],
289 "user": "test"
289 "user": "test"
290 }
290 }
291 ],
291 ],
292 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
292 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
293 }
293 }
294
294
295 changelog/{revision} shows information starting at a specific changeset
295 changelog/{revision} shows information starting at a specific changeset
296
296
297 $ request json-changelog/f8bbb9024b10
297 $ request json-changelog/f8bbb9024b10
298 200 Script output follows
298 200 Script output follows
299
299
300 {
300 {
301 "changeset_count": 10,
301 "changeset_count": 10,
302 "changesets": [
302 "changesets": [
303 {
303 {
304 "bookmarks": [],
304 "bookmarks": [],
305 "date": [
305 "date": [
306 0.0,
306 0.0,
307 0
307 0
308 ],
308 ],
309 "desc": "modify foo",
309 "desc": "modify foo",
310 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
310 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
311 "tags": [],
311 "tags": [],
312 "user": "test"
312 "user": "test"
313 },
313 },
314 {
314 {
315 "bookmarks": [],
315 "bookmarks": [],
316 "date": [
316 "date": [
317 0.0,
317 0.0,
318 0
318 0
319 ],
319 ],
320 "desc": "initial",
320 "desc": "initial",
321 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
321 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
322 "tags": [],
322 "tags": [],
323 "user": "test"
323 "user": "test"
324 }
324 }
325 ],
325 ],
326 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
326 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
327 }
327 }
328
328
329 shortlog/ shows information about a set of changesets
329 shortlog/ shows information about a set of changesets
330
330
331 $ request json-shortlog
331 $ request json-shortlog
332 200 Script output follows
332 200 Script output follows
333
333
334 {
334 {
335 "changeset_count": 10,
335 "changeset_count": 10,
336 "changesets": [
336 "changesets": [
337 {
337 {
338 "bookmarks": [],
338 "bookmarks": [],
339 "date": [
339 "date": [
340 0.0,
340 0.0,
341 0
341 0
342 ],
342 ],
343 "desc": "merge test-branch into default",
343 "desc": "merge test-branch into default",
344 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
344 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
345 "tags": [
345 "tags": [
346 "tip"
346 "tip"
347 ],
347 ],
348 "user": "test"
348 "user": "test"
349 },
349 },
350 {
350 {
351 "bookmarks": [],
351 "bookmarks": [],
352 "date": [
352 "date": [
353 0.0,
353 0.0,
354 0
354 0
355 ],
355 ],
356 "desc": "another commit in test-branch",
356 "desc": "another commit in test-branch",
357 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
357 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
358 "tags": [],
358 "tags": [],
359 "user": "test"
359 "user": "test"
360 },
360 },
361 {
361 {
362 "bookmarks": [],
362 "bookmarks": [],
363 "date": [
363 "date": [
364 0.0,
364 0.0,
365 0
365 0
366 ],
366 ],
367 "desc": "create test branch",
367 "desc": "create test branch",
368 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
368 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
369 "tags": [],
369 "tags": [],
370 "user": "test"
370 "user": "test"
371 },
371 },
372 {
372 {
373 "bookmarks": [
373 "bookmarks": [
374 "bookmark2"
374 "bookmark2"
375 ],
375 ],
376 "date": [
376 "date": [
377 0.0,
377 0.0,
378 0
378 0
379 ],
379 ],
380 "desc": "create tag2",
380 "desc": "create tag2",
381 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
381 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
382 "tags": [],
382 "tags": [],
383 "user": "test"
383 "user": "test"
384 },
384 },
385 {
385 {
386 "bookmarks": [],
386 "bookmarks": [],
387 "date": [
387 "date": [
388 0.0,
388 0.0,
389 0
389 0
390 ],
390 ],
391 "desc": "another commit to da/foo",
391 "desc": "another commit to da/foo",
392 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
392 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
393 "tags": [
393 "tags": [
394 "tag2"
394 "tag2"
395 ],
395 ],
396 "user": "test"
396 "user": "test"
397 },
397 },
398 {
398 {
399 "bookmarks": [],
399 "bookmarks": [],
400 "date": [
400 "date": [
401 0.0,
401 0.0,
402 0
402 0
403 ],
403 ],
404 "desc": "create tag",
404 "desc": "create tag",
405 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
405 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
406 "tags": [],
406 "tags": [],
407 "user": "test"
407 "user": "test"
408 },
408 },
409 {
409 {
410 "bookmarks": [],
410 "bookmarks": [],
411 "date": [
411 "date": [
412 0.0,
412 0.0,
413 0
413 0
414 ],
414 ],
415 "desc": "move foo",
415 "desc": "move foo",
416 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
416 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
417 "tags": [
417 "tags": [
418 "tag1"
418 "tag1"
419 ],
419 ],
420 "user": "test"
420 "user": "test"
421 },
421 },
422 {
422 {
423 "bookmarks": [
423 "bookmarks": [
424 "bookmark1"
424 "bookmark1"
425 ],
425 ],
426 "date": [
426 "date": [
427 0.0,
427 0.0,
428 0
428 0
429 ],
429 ],
430 "desc": "modify da/foo",
430 "desc": "modify da/foo",
431 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
431 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
432 "tags": [],
432 "tags": [],
433 "user": "test"
433 "user": "test"
434 },
434 },
435 {
435 {
436 "bookmarks": [],
436 "bookmarks": [],
437 "date": [
437 "date": [
438 0.0,
438 0.0,
439 0
439 0
440 ],
440 ],
441 "desc": "modify foo",
441 "desc": "modify foo",
442 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
442 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
443 "tags": [],
443 "tags": [],
444 "user": "test"
444 "user": "test"
445 },
445 },
446 {
446 {
447 "bookmarks": [],
447 "bookmarks": [],
448 "date": [
448 "date": [
449 0.0,
449 0.0,
450 0
450 0
451 ],
451 ],
452 "desc": "initial",
452 "desc": "initial",
453 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
453 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
454 "tags": [],
454 "tags": [],
455 "user": "test"
455 "user": "test"
456 }
456 }
457 ],
457 ],
458 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
458 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
459 }
459 }
460
460
461 changeset/ renders the tip changeset
461 changeset/ renders the tip changeset
462
462
463 $ request json-rev
463 $ request json-rev
464 200 Script output follows
464 200 Script output follows
465
465
466 {
466 {
467 "bookmarks": [],
467 "bookmarks": [],
468 "branch": "default",
468 "branch": "default",
469 "date": [
469 "date": [
470 0.0,
470 0.0,
471 0
471 0
472 ],
472 ],
473 "desc": "merge test-branch into default",
473 "desc": "merge test-branch into default",
474 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
474 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
475 "parents": [
475 "parents": [
476 "ceed296fe500c3fac9541e31dad860cb49c89e45",
476 "ceed296fe500c3fac9541e31dad860cb49c89e45",
477 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
477 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
478 ],
478 ],
479 "phase": "draft",
479 "phase": "draft",
480 "tags": [
480 "tags": [
481 "tip"
481 "tip"
482 ],
482 ],
483 "user": "test"
483 "user": "test"
484 }
484 }
485
485
486 changeset/{revision} shows tags
486 changeset/{revision} shows tags
487
487
488 $ request json-rev/78896eb0e102
488 $ request json-rev/78896eb0e102
489 200 Script output follows
489 200 Script output follows
490
490
491 {
491 {
492 "bookmarks": [],
492 "bookmarks": [],
493 "branch": "default",
493 "branch": "default",
494 "date": [
494 "date": [
495 0.0,
495 0.0,
496 0
496 0
497 ],
497 ],
498 "desc": "move foo",
498 "desc": "move foo",
499 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
499 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
500 "parents": [
500 "parents": [
501 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
501 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
502 ],
502 ],
503 "phase": "public",
503 "phase": "public",
504 "tags": [
504 "tags": [
505 "tag1"
505 "tag1"
506 ],
506 ],
507 "user": "test"
507 "user": "test"
508 }
508 }
509
509
510 changeset/{revision} shows bookmarks
510 changeset/{revision} shows bookmarks
511
511
512 $ request json-rev/8d7c456572ac
512 $ request json-rev/8d7c456572ac
513 200 Script output follows
513 200 Script output follows
514
514
515 {
515 {
516 "bookmarks": [
516 "bookmarks": [
517 "bookmark1"
517 "bookmark1"
518 ],
518 ],
519 "branch": "default",
519 "branch": "default",
520 "date": [
520 "date": [
521 0.0,
521 0.0,
522 0
522 0
523 ],
523 ],
524 "desc": "modify da/foo",
524 "desc": "modify da/foo",
525 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
525 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
526 "parents": [
526 "parents": [
527 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
527 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
528 ],
528 ],
529 "phase": "public",
529 "phase": "public",
530 "tags": [],
530 "tags": [],
531 "user": "test"
531 "user": "test"
532 }
532 }
533
533
534 changeset/{revision} shows branches
534 changeset/{revision} shows branches
535
535
536 $ request json-rev/6ab967a8ab34
536 $ request json-rev/6ab967a8ab34
537 200 Script output follows
537 200 Script output follows
538
538
539 {
539 {
540 "bookmarks": [],
540 "bookmarks": [],
541 "branch": "test-branch",
541 "branch": "test-branch",
542 "date": [
542 "date": [
543 0.0,
543 0.0,
544 0
544 0
545 ],
545 ],
546 "desc": "create test branch",
546 "desc": "create test branch",
547 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
547 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
548 "parents": [
548 "parents": [
549 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
549 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
550 ],
550 ],
551 "phase": "draft",
551 "phase": "draft",
552 "tags": [],
552 "tags": [],
553 "user": "test"
553 "user": "test"
554 }
554 }
555
555
556 manifest/{revision}/{path} shows info about a directory at a revision
556 manifest/{revision}/{path} shows info about a directory at a revision
557
557
558 $ request json-manifest/06e557f3edf6/
558 $ request json-manifest/06e557f3edf6/
559 200 Script output follows
559 200 Script output follows
560
560
561 {
561 {
562 "abspath": "/",
562 "abspath": "/",
563 "bookmarks": [],
563 "bookmarks": [],
564 "directories": [
564 "directories": [
565 {
565 {
566 "abspath": "/da",
566 "abspath": "/da",
567 "basename": "da",
567 "basename": "da",
568 "emptydirs": ""
568 "emptydirs": ""
569 }
569 }
570 ],
570 ],
571 "files": [
571 "files": [
572 {
572 {
573 "abspath": "foo",
573 "abspath": "foo",
574 "basename": "foo",
574 "basename": "foo",
575 "date": [
575 "date": [
576 0.0,
576 0.0,
577 0
577 0
578 ],
578 ],
579 "flags": "",
579 "flags": "",
580 "size": 4
580 "size": 4
581 }
581 }
582 ],
582 ],
583 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
583 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
584 "tags": []
584 "tags": []
585 }
585 }
586
586
587 tags/ shows tags info
587 tags/ shows tags info
588
588
589 $ request json-tags
589 $ request json-tags
590 200 Script output follows
590 200 Script output follows
591
591
592 {
592 {
593 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
593 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
594 "tags": [
594 "tags": [
595 {
595 {
596 "date": [
596 "date": [
597 0.0,
597 0.0,
598 0
598 0
599 ],
599 ],
600 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
600 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
601 "tag": "tag2"
601 "tag": "tag2"
602 },
602 },
603 {
603 {
604 "date": [
604 "date": [
605 0.0,
605 0.0,
606 0
606 0
607 ],
607 ],
608 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
608 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
609 "tag": "tag1"
609 "tag": "tag1"
610 }
610 }
611 ]
611 ]
612 }
612 }
613
613
614 bookmarks/ shows bookmarks info
614 bookmarks/ shows bookmarks info
615
615
616 $ request json-bookmarks
616 $ request json-bookmarks
617 200 Script output follows
617 200 Script output follows
618
618
619 {
619 {
620 "bookmarks": [
620 "bookmarks": [
621 {
621 {
622 "bookmark": "bookmark1",
622 "bookmark": "bookmark1",
623 "date": [
623 "date": [
624 0.0,
624 0.0,
625 0
625 0
626 ],
626 ],
627 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
627 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
628 },
628 },
629 {
629 {
630 "bookmark": "bookmark2",
630 "bookmark": "bookmark2",
631 "date": [
631 "date": [
632 0.0,
632 0.0,
633 0
633 0
634 ],
634 ],
635 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
635 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
636 }
636 }
637 ],
637 ],
638 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
638 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
639 }
639 }
640
640
641 branches/ shows branches info
641 branches/ shows branches info
642
642
643 $ request json-branches
643 $ request json-branches
644 200 Script output follows
644 200 Script output follows
645
645
646 {
646 {
647 "branches": [
647 "branches": [
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 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
654 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
655 "status": "open"
655 "status": "open"
656 },
656 },
657 {
657 {
658 "branch": "test-branch",
658 "branch": "test-branch",
659 "date": [
659 "date": [
660 0.0,
660 0.0,
661 0
661 0
662 ],
662 ],
663 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
663 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
664 "status": "inactive"
664 "status": "inactive"
665 }
665 }
666 ]
666 ]
667 }
667 }
668
668
669 summary/ shows a summary of repository state
669 summary/ shows a summary of repository state
670
670
671 $ request json-summary
671 $ request json-summary
672 200 Script output follows
672 200 Script output follows
673
673
674 "not yet implemented"
674 "not yet implemented"
675
675
676 filediff/{revision}/{path} shows changes to a file in a revision
676 filediff/{revision}/{path} shows changes to a file in a revision
677
677
678 $ request json-diff/f8bbb9024b10/foo
678 $ request json-diff/f8bbb9024b10/foo
679 200 Script output follows
679 200 Script output follows
680
680
681 {
681 {
682 "author": "test",
682 "author": "test",
683 "children": [],
683 "children": [],
684 "date": [
684 "date": [
685 0.0,
685 0.0,
686 0
686 0
687 ],
687 ],
688 "desc": "modify foo",
688 "desc": "modify foo",
689 "diff": [
689 "diff": [
690 {
690 {
691 "blockno": 1,
691 "blockno": 1,
692 "lines": [
692 "lines": [
693 {
693 {
694 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
694 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
695 "n": 1,
695 "n": 1,
696 "t": "-"
696 "t": "-"
697 },
697 },
698 {
698 {
699 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
699 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
700 "n": 2,
700 "n": 2,
701 "t": "+"
701 "t": "+"
702 },
702 },
703 {
703 {
704 "l": "@@ -1,1 +1,1 @@\n",
704 "l": "@@ -1,1 +1,1 @@\n",
705 "n": 3,
705 "n": 3,
706 "t": "@"
706 "t": "@"
707 },
707 },
708 {
708 {
709 "l": "-foo\n",
709 "l": "-foo\n",
710 "n": 4,
710 "n": 4,
711 "t": "-"
711 "t": "-"
712 },
712 },
713 {
713 {
714 "l": "+bar\n",
714 "l": "+bar\n",
715 "n": 5,
715 "n": 5,
716 "t": "+"
716 "t": "+"
717 }
717 }
718 ]
718 ]
719 }
719 }
720 ],
720 ],
721 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
721 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
722 "parents": [
722 "parents": [
723 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
723 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
724 ],
724 ],
725 "path": "foo"
725 "path": "foo"
726 }
726 }
727
727
728 comparison/{revision}/{path} shows information about before and after for a file
728 comparison/{revision}/{path} shows information about before and after for a file
729
729
730 $ request json-comparison/f8bbb9024b10/foo
730 $ request json-comparison/f8bbb9024b10/foo
731 200 Script output follows
731 200 Script output follows
732
732
733 {
733 {
734 "author": "test",
734 "author": "test",
735 "children": [],
735 "children": [],
736 "comparison": [
736 "comparison": [
737 {
737 {
738 "lines": [
738 "lines": [
739 {
739 {
740 "ll": "foo",
740 "ll": "foo",
741 "ln": 1,
741 "ln": 1,
742 "rl": "bar",
742 "rl": "bar",
743 "rn": 1,
743 "rn": 1,
744 "t": "replace"
744 "t": "replace"
745 }
745 }
746 ]
746 ]
747 }
747 }
748 ],
748 ],
749 "date": [
749 "date": [
750 0.0,
750 0.0,
751 0
751 0
752 ],
752 ],
753 "desc": "modify foo",
753 "desc": "modify foo",
754 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
754 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
755 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
755 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
756 "parents": [
756 "parents": [
757 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
757 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
758 ],
758 ],
759 "path": "foo",
759 "path": "foo",
760 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
760 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
761 }
761 }
762
762
763 annotate/{revision}/{path} shows annotations for each line
763 annotate/{revision}/{path} shows annotations for each line
764
764
765 $ request json-annotate/f8bbb9024b10/foo
765 $ request json-annotate/f8bbb9024b10/foo
766 200 Script output follows
766 200 Script output follows
767
767
768 {
768 {
769 "abspath": "foo",
769 "abspath": "foo",
770 "annotate": [
770 "annotate": [
771 {
771 {
772 "abspath": "foo",
772 "abspath": "foo",
773 "author": "test",
773 "author": "test",
774 "desc": "modify foo",
774 "desc": "modify foo",
775 "line": "bar\n",
775 "line": "bar\n",
776 "lineno": 1,
776 "lineno": 1,
777 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
777 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
778 "revdate": [
778 "revdate": [
779 0.0,
779 0.0,
780 0
780 0
781 ],
781 ],
782 "targetline": 1
782 "targetline": 1
783 }
783 }
784 ],
784 ],
785 "author": "test",
785 "author": "test",
786 "children": [],
786 "children": [],
787 "date": [
787 "date": [
788 0.0,
788 0.0,
789 0
789 0
790 ],
790 ],
791 "desc": "modify foo",
791 "desc": "modify foo",
792 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
792 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
793 "parents": [
793 "parents": [
794 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
794 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
795 ],
795 ],
796 "permissions": ""
796 "permissions": ""
797 }
797 }
798
798
799 filelog/{revision}/{path} shows history of a single file
799 filelog/{revision}/{path} shows history of a single file
800
800
801 $ request json-filelog/f8bbb9024b10/foo
801 $ request json-filelog/f8bbb9024b10/foo
802 200 Script output follows
802 200 Script output follows
803
803
804 "not yet implemented"
804 "not yet implemented"
805
805
806 (archive/ doesn't use templating, so ignore it)
806 (archive/ doesn't use templating, so ignore it)
807
807
808 (static/ doesn't use templating, so ignore it)
808 (static/ doesn't use templating, so ignore it)
809
809
810 graph/ shows information that can be used to render a graph of the DAG
810 graph/ shows information that can be used to render a graph of the DAG
811
811
812 $ request json-graph
812 $ request json-graph
813 200 Script output follows
813 200 Script output follows
814
814
815 "not yet implemented"
815 "not yet implemented"
816
816
817 help/ shows help topics
817 help/ shows help topics
818
818
819 $ request json-help
819 $ request json-help
820 200 Script output follows
820 200 Script output follows
821
821
822 {
822 {
823 "earlycommands": [
823 "earlycommands": [
824 {
824 {
825 "summary": "add the specified files on the next commit",
825 "summary": "add the specified files on the next commit",
826 "topic": "add"
826 "topic": "add"
827 },
827 },
828 {
828 {
829 "summary": "show changeset information by line for each file",
829 "summary": "show changeset information by line for each file",
830 "topic": "annotate"
830 "topic": "annotate"
831 },
831 },
832 {
832 {
833 "summary": "make a copy of an existing repository",
833 "summary": "make a copy of an existing repository",
834 "topic": "clone"
834 "topic": "clone"
835 },
835 },
836 {
836 {
837 "summary": "commit the specified files or all outstanding changes",
837 "summary": "commit the specified files or all outstanding changes",
838 "topic": "commit"
838 "topic": "commit"
839 },
839 },
840 {
840 {
841 "summary": "diff repository (or selected files)",
841 "summary": "diff repository (or selected files)",
842 "topic": "diff"
842 "topic": "diff"
843 },
843 },
844 {
844 {
845 "summary": "dump the header and diffs for one or more changesets",
845 "summary": "dump the header and diffs for one or more changesets",
846 "topic": "export"
846 "topic": "export"
847 },
847 },
848 {
848 {
849 "summary": "forget the specified files on the next commit",
849 "summary": "forget the specified files on the next commit",
850 "topic": "forget"
850 "topic": "forget"
851 },
851 },
852 {
852 {
853 "summary": "create a new repository in the given directory",
853 "summary": "create a new repository in the given directory",
854 "topic": "init"
854 "topic": "init"
855 },
855 },
856 {
856 {
857 "summary": "show revision history of entire repository or files",
857 "summary": "show revision history of entire repository or files",
858 "topic": "log"
858 "topic": "log"
859 },
859 },
860 {
860 {
861 "summary": "merge another revision into working directory",
861 "summary": "merge another revision into working directory",
862 "topic": "merge"
862 "topic": "merge"
863 },
863 },
864 {
864 {
865 "summary": "pull changes from the specified source",
865 "summary": "pull changes from the specified source",
866 "topic": "pull"
866 "topic": "pull"
867 },
867 },
868 {
868 {
869 "summary": "push changes to the specified destination",
869 "summary": "push changes to the specified destination",
870 "topic": "push"
870 "topic": "push"
871 },
871 },
872 {
872 {
873 "summary": "remove the specified files on the next commit",
873 "summary": "remove the specified files on the next commit",
874 "topic": "remove"
874 "topic": "remove"
875 },
875 },
876 {
876 {
877 "summary": "start stand-alone webserver",
877 "summary": "start stand-alone webserver",
878 "topic": "serve"
878 "topic": "serve"
879 },
879 },
880 {
880 {
881 "summary": "show changed files in the working directory",
881 "summary": "show changed files in the working directory",
882 "topic": "status"
882 "topic": "status"
883 },
883 },
884 {
884 {
885 "summary": "summarize working directory state",
885 "summary": "summarize working directory state",
886 "topic": "summary"
886 "topic": "summary"
887 },
887 },
888 {
888 {
889 "summary": "update working directory (or switch revisions)",
889 "summary": "update working directory (or switch revisions)",
890 "topic": "update"
890 "topic": "update"
891 }
891 }
892 ],
892 ],
893 "othercommands": [
893 "othercommands": [
894 {
894 {
895 "summary": "add all new files, delete all missing files",
895 "summary": "add all new files, delete all missing files",
896 "topic": "addremove"
896 "topic": "addremove"
897 },
897 },
898 {
898 {
899 "summary": "create an unversioned archive of a repository revision",
899 "summary": "create an unversioned archive of a repository revision",
900 "topic": "archive"
900 "topic": "archive"
901 },
901 },
902 {
902 {
903 "summary": "reverse effect of earlier changeset",
903 "summary": "reverse effect of earlier changeset",
904 "topic": "backout"
904 "topic": "backout"
905 },
905 },
906 {
906 {
907 "summary": "subdivision search of changesets",
907 "summary": "subdivision search of changesets",
908 "topic": "bisect"
908 "topic": "bisect"
909 },
909 },
910 {
910 {
911 "summary": "create a new bookmark or list existing bookmarks",
911 "summary": "create a new bookmark or list existing bookmarks",
912 "topic": "bookmarks"
912 "topic": "bookmarks"
913 },
913 },
914 {
914 {
915 "summary": "set or show the current branch name",
915 "summary": "set or show the current branch name",
916 "topic": "branch"
916 "topic": "branch"
917 },
917 },
918 {
918 {
919 "summary": "list repository named branches",
919 "summary": "list repository named branches",
920 "topic": "branches"
920 "topic": "branches"
921 },
921 },
922 {
922 {
923 "summary": "create a changegroup file",
923 "summary": "create a changegroup file",
924 "topic": "bundle"
924 "topic": "bundle"
925 },
925 },
926 {
926 {
927 "summary": "output the current or given revision of files",
927 "summary": "output the current or given revision of files",
928 "topic": "cat"
928 "topic": "cat"
929 },
929 },
930 {
930 {
931 "summary": "show combined config settings from all hgrc files",
931 "summary": "show combined config settings from all hgrc files",
932 "topic": "config"
932 "topic": "config"
933 },
933 },
934 {
934 {
935 "summary": "mark files as copied for the next commit",
935 "summary": "mark files as copied for the next commit",
936 "topic": "copy"
936 "topic": "copy"
937 },
937 },
938 {
938 {
939 "summary": "list tracked files",
939 "summary": "list tracked files",
940 "topic": "files"
940 "topic": "files"
941 },
941 },
942 {
942 {
943 "summary": "copy changes from other branches onto the current branch",
943 "summary": "copy changes from other branches onto the current branch",
944 "topic": "graft"
944 "topic": "graft"
945 },
945 },
946 {
946 {
947 "summary": "search for a pattern in specified files and revisions",
947 "summary": "search for a pattern in specified files and revisions",
948 "topic": "grep"
948 "topic": "grep"
949 },
949 },
950 {
950 {
951 "summary": "show branch heads",
951 "summary": "show branch heads",
952 "topic": "heads"
952 "topic": "heads"
953 },
953 },
954 {
954 {
955 "summary": "show help for a given topic or a help overview",
955 "summary": "show help for a given topic or a help overview",
956 "topic": "help"
956 "topic": "help"
957 },
957 },
958 {
958 {
959 "summary": "identify the working directory or specified revision",
959 "summary": "identify the working directory or specified revision",
960 "topic": "identify"
960 "topic": "identify"
961 },
961 },
962 {
962 {
963 "summary": "import an ordered set of patches",
963 "summary": "import an ordered set of patches",
964 "topic": "import"
964 "topic": "import"
965 },
965 },
966 {
966 {
967 "summary": "show new changesets found in source",
967 "summary": "show new changesets found in source",
968 "topic": "incoming"
968 "topic": "incoming"
969 },
969 },
970 {
970 {
971 "summary": "output the current or given revision of the project manifest",
971 "summary": "output the current or given revision of the project manifest",
972 "topic": "manifest"
972 "topic": "manifest"
973 },
973 },
974 {
974 {
975 "summary": "show changesets not found in the destination",
975 "summary": "show changesets not found in the destination",
976 "topic": "outgoing"
976 "topic": "outgoing"
977 },
977 },
978 {
978 {
979 "summary": "show aliases for remote repositories",
979 "summary": "show aliases for remote repositories",
980 "topic": "paths"
980 "topic": "paths"
981 },
981 },
982 {
982 {
983 "summary": "set or show the current phase name",
983 "summary": "set or show the current phase name",
984 "topic": "phase"
984 "topic": "phase"
985 },
985 },
986 {
986 {
987 "summary": "roll back an interrupted transaction",
987 "summary": "roll back an interrupted transaction",
988 "topic": "recover"
988 "topic": "recover"
989 },
989 },
990 {
990 {
991 "summary": "rename files; equivalent of copy + remove",
991 "summary": "rename files; equivalent of copy + remove",
992 "topic": "rename"
992 "topic": "rename"
993 },
993 },
994 {
994 {
995 "summary": "redo merges or set/view the merge status of files",
995 "summary": "redo merges or set/view the merge status of files",
996 "topic": "resolve"
996 "topic": "resolve"
997 },
997 },
998 {
998 {
999 "summary": "restore files to their checkout state",
999 "summary": "restore files to their checkout state",
1000 "topic": "revert"
1000 "topic": "revert"
1001 },
1001 },
1002 {
1002 {
1003 "summary": "print the root (top) of the current working directory",
1003 "summary": "print the root (top) of the current working directory",
1004 "topic": "root"
1004 "topic": "root"
1005 },
1005 },
1006 {
1006 {
1007 "summary": "add one or more tags for the current or given revision",
1007 "summary": "add one or more tags for the current or given revision",
1008 "topic": "tag"
1008 "topic": "tag"
1009 },
1009 },
1010 {
1010 {
1011 "summary": "list repository tags",
1011 "summary": "list repository tags",
1012 "topic": "tags"
1012 "topic": "tags"
1013 },
1013 },
1014 {
1014 {
1015 "summary": "apply one or more changegroup files",
1015 "summary": "apply one or more changegroup files",
1016 "topic": "unbundle"
1016 "topic": "unbundle"
1017 },
1017 },
1018 {
1018 {
1019 "summary": "verify the integrity of the repository",
1019 "summary": "verify the integrity of the repository",
1020 "topic": "verify"
1020 "topic": "verify"
1021 },
1021 },
1022 {
1022 {
1023 "summary": "output version and copyright information",
1023 "summary": "output version and copyright information",
1024 "topic": "version"
1024 "topic": "version"
1025 }
1025 }
1026 ],
1026 ],
1027 "topics": [
1027 "topics": [
1028 {
1028 {
1029 "summary": "Configuration Files",
1029 "summary": "Configuration Files",
1030 "topic": "config"
1030 "topic": "config"
1031 },
1031 },
1032 {
1032 {
1033 "summary": "Date Formats",
1033 "summary": "Date Formats",
1034 "topic": "dates"
1034 "topic": "dates"
1035 },
1035 },
1036 {
1036 {
1037 "summary": "Diff Formats",
1037 "summary": "Diff Formats",
1038 "topic": "diffs"
1038 "topic": "diffs"
1039 },
1039 },
1040 {
1040 {
1041 "summary": "Environment Variables",
1041 "summary": "Environment Variables",
1042 "topic": "environment"
1042 "topic": "environment"
1043 },
1043 },
1044 {
1044 {
1045 "summary": "Using Additional Features",
1045 "summary": "Using Additional Features",
1046 "topic": "extensions"
1046 "topic": "extensions"
1047 },
1047 },
1048 {
1048 {
1049 "summary": "Specifying File Sets",
1049 "summary": "Specifying File Sets",
1050 "topic": "filesets"
1050 "topic": "filesets"
1051 },
1051 },
1052 {
1052 {
1053 "summary": "Glossary",
1053 "summary": "Glossary",
1054 "topic": "glossary"
1054 "topic": "glossary"
1055 },
1055 },
1056 {
1056 {
1057 "summary": "Syntax for Mercurial Ignore Files",
1057 "summary": "Syntax for Mercurial Ignore Files",
1058 "topic": "hgignore"
1058 "topic": "hgignore"
1059 },
1059 },
1060 {
1060 {
1061 "summary": "Configuring hgweb",
1061 "summary": "Configuring hgweb",
1062 "topic": "hgweb"
1062 "topic": "hgweb"
1063 },
1063 },
1064 {
1064 {
1065 "summary": "Merge Tools",
1065 "summary": "Merge Tools",
1066 "topic": "merge-tools"
1066 "topic": "merge-tools"
1067 },
1067 },
1068 {
1068 {
1069 "summary": "Specifying Multiple Revisions",
1069 "summary": "Specifying Multiple Revisions",
1070 "topic": "multirevs"
1070 "topic": "multirevs"
1071 },
1071 },
1072 {
1072 {
1073 "summary": "File Name Patterns",
1073 "summary": "File Name Patterns",
1074 "topic": "patterns"
1074 "topic": "patterns"
1075 },
1075 },
1076 {
1076 {
1077 "summary": "Working with Phases",
1077 "summary": "Working with Phases",
1078 "topic": "phases"
1078 "topic": "phases"
1079 },
1079 },
1080 {
1080 {
1081 "summary": "Specifying Single Revisions",
1081 "summary": "Specifying Single Revisions",
1082 "topic": "revisions"
1082 "topic": "revisions"
1083 },
1083 },
1084 {
1084 {
1085 "summary": "Specifying Revision Sets",
1085 "summary": "Specifying Revision Sets",
1086 "topic": "revsets"
1086 "topic": "revsets"
1087 },
1087 },
1088 {
1088 {
1089 "summary": "Using Mercurial from scripts and automation",
1090 "topic": "scripting"
1091 },
1092 {
1089 "summary": "Subrepositories",
1093 "summary": "Subrepositories",
1090 "topic": "subrepos"
1094 "topic": "subrepos"
1091 },
1095 },
1092 {
1096 {
1093 "summary": "Template Usage",
1097 "summary": "Template Usage",
1094 "topic": "templating"
1098 "topic": "templating"
1095 },
1099 },
1096 {
1100 {
1097 "summary": "URL Paths",
1101 "summary": "URL Paths",
1098 "topic": "urls"
1102 "topic": "urls"
1099 }
1103 }
1100 ]
1104 ]
1101 }
1105 }
1102
1106
1103 help/{topic} shows an individual help topic
1107 help/{topic} shows an individual help topic
1104
1108
1105 $ request json-help/phases
1109 $ request json-help/phases
1106 200 Script output follows
1110 200 Script output follows
1107
1111
1108 {
1112 {
1109 "rawdoc": "Working with Phases\n*", (glob)
1113 "rawdoc": "Working with Phases\n*", (glob)
1110 "topic": "phases"
1114 "topic": "phases"
1111 }
1115 }
General Comments 0
You need to be logged in to leave comments. Login now