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