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