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