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