Show More
@@ -1,203 +1,203 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 extensions, revset, fileset, templatekw, templatefilters, filemerge |
|
10 | import extensions, revset, fileset, templatekw, templatefilters, filemerge | |
11 | import encoding, util, minirst |
|
11 | import encoding, util, minirst | |
12 |
|
12 | |||
13 | def listexts(header, exts, indent=1): |
|
13 | def listexts(header, exts, indent=1): | |
14 | '''return a text listing of the given extensions''' |
|
14 | '''return a text listing of the given extensions''' | |
15 | rst = [] |
|
15 | rst = [] | |
16 | if exts: |
|
16 | if exts: | |
17 | rst.append('\n%s\n\n' % header) |
|
17 | rst.append('\n%s\n\n' % header) | |
18 | for name, desc in sorted(exts.iteritems()): |
|
18 | for name, desc in sorted(exts.iteritems()): | |
19 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) |
|
19 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) | |
20 | return rst |
|
20 | return rst | |
21 |
|
21 | |||
22 | def extshelp(): |
|
22 | def extshelp(): | |
23 | rst = loaddoc('extensions')().splitlines(True) |
|
23 | rst = loaddoc('extensions')().splitlines(True) | |
24 | rst.extend(listexts(_('enabled extensions:'), extensions.enabled())) |
|
24 | rst.extend(listexts(_('enabled extensions:'), extensions.enabled())) | |
25 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled())) |
|
25 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled())) | |
26 | doc = ''.join(rst) |
|
26 | doc = ''.join(rst) | |
27 | return doc |
|
27 | return doc | |
28 |
|
28 | |||
29 | def optrst(options, verbose): |
|
29 | def optrst(options, verbose): | |
30 | data = [] |
|
30 | data = [] | |
31 | multioccur = False |
|
31 | multioccur = False | |
32 | for option in options: |
|
32 | for option in options: | |
33 | if len(option) == 5: |
|
33 | if len(option) == 5: | |
34 | shortopt, longopt, default, desc, optlabel = option |
|
34 | shortopt, longopt, default, desc, optlabel = option | |
35 | else: |
|
35 | else: | |
36 | shortopt, longopt, default, desc = option |
|
36 | shortopt, longopt, default, desc = option | |
37 | optlabel = _("VALUE") # default label |
|
37 | optlabel = _("VALUE") # default label | |
38 |
|
38 | |||
39 | if _("DEPRECATED") in desc and not verbose: |
|
39 | if _("DEPRECATED") in desc and not verbose: | |
40 | continue |
|
40 | continue | |
41 |
|
41 | |||
42 | so = '' |
|
42 | so = '' | |
43 | if shortopt: |
|
43 | if shortopt: | |
44 | so = '-' + shortopt |
|
44 | so = '-' + shortopt | |
45 | lo = '--' + longopt |
|
45 | lo = '--' + longopt | |
46 | if default: |
|
46 | if default: | |
47 | desc += _(" (default: %s)") % default |
|
47 | desc += _(" (default: %s)") % default | |
48 |
|
48 | |||
49 | if isinstance(default, list): |
|
49 | if isinstance(default, list): | |
50 | lo += " %s [+]" % optlabel |
|
50 | lo += " %s [+]" % optlabel | |
51 | multioccur = True |
|
51 | multioccur = True | |
52 | elif (default is not None) and not isinstance(default, bool): |
|
52 | elif (default is not None) and not isinstance(default, bool): | |
53 | lo += " %s" % optlabel |
|
53 | lo += " %s" % optlabel | |
54 |
|
54 | |||
55 | data.append((so, lo, desc)) |
|
55 | data.append((so, lo, desc)) | |
56 |
|
56 | |||
57 | rst = minirst.maketable(data, 1) |
|
57 | rst = minirst.maketable(data, 1) | |
58 |
|
58 | |||
59 | if multioccur: |
|
59 | if multioccur: | |
60 | rst.append(_("\n[+] marked option can be specified multiple times\n")) |
|
60 | rst.append(_("\n[+] marked option can be specified multiple times\n")) | |
61 |
|
61 | |||
62 | return ''.join(rst) |
|
62 | return ''.join(rst) | |
63 |
|
63 | |||
64 | def topicmatch(kw): |
|
64 | def topicmatch(kw): | |
65 | """Return help topics matching kw. |
|
65 | """Return help topics matching kw. | |
66 |
|
66 | |||
67 | Returns {'section': [(name, summary), ...], ...} where section is |
|
67 | Returns {'section': [(name, summary), ...], ...} where section is | |
68 | one of topics, commands, extensions, or extensioncommands. |
|
68 | one of topics, commands, extensions, or extensioncommands. | |
69 | """ |
|
69 | """ | |
70 | kw = encoding.lower(kw) |
|
70 | kw = encoding.lower(kw) | |
71 | def lowercontains(container): |
|
71 | def lowercontains(container): | |
72 | return kw in encoding.lower(container) # translated in helptable |
|
72 | return kw in encoding.lower(container) # translated in helptable | |
73 | results = {'topics': [], |
|
73 | results = {'topics': [], | |
74 | 'commands': [], |
|
74 | 'commands': [], | |
75 | 'extensions': [], |
|
75 | 'extensions': [], | |
76 | 'extensioncommands': [], |
|
76 | 'extensioncommands': [], | |
77 | } |
|
77 | } | |
78 | for names, header, doc in helptable: |
|
78 | for names, header, doc in helptable: | |
79 | if (sum(map(lowercontains, names)) |
|
79 | if (sum(map(lowercontains, names)) | |
80 | or lowercontains(header) |
|
80 | or lowercontains(header) | |
81 | or lowercontains(doc())): |
|
81 | or lowercontains(doc())): | |
82 | results['topics'].append((names[0], header)) |
|
82 | results['topics'].append((names[0], header)) | |
83 | import commands # avoid cycle |
|
83 | import commands # avoid cycle | |
84 | for cmd, entry in commands.table.iteritems(): |
|
84 | for cmd, entry in commands.table.iteritems(): | |
85 | if cmd.startswith('debug'): |
|
85 | if cmd.startswith('debug'): | |
86 | continue |
|
86 | continue | |
87 | if len(entry) == 3: |
|
87 | if len(entry) == 3: | |
88 | summary = entry[2] |
|
88 | summary = entry[2] | |
89 | else: |
|
89 | else: | |
90 | summary = '' |
|
90 | summary = '' | |
91 | # translate docs *before* searching there |
|
91 | # translate docs *before* searching there | |
92 | docs = _(getattr(entry[0], '__doc__', None)) or '' |
|
92 | docs = _(getattr(entry[0], '__doc__', None)) or '' | |
93 | if kw in cmd or lowercontains(summary) or lowercontains(docs): |
|
93 | if kw in cmd or lowercontains(summary) or lowercontains(docs): | |
94 | doclines = docs.splitlines() |
|
94 | doclines = docs.splitlines() | |
95 | if doclines: |
|
95 | if doclines: | |
96 | summary = doclines[0] |
|
96 | summary = doclines[0] | |
97 | cmdname = cmd.split('|')[0].lstrip('^') |
|
97 | cmdname = cmd.split('|')[0].lstrip('^') | |
98 | results['commands'].append((cmdname, summary)) |
|
98 | results['commands'].append((cmdname, summary)) | |
99 | for name, docs in itertools.chain( |
|
99 | for name, docs in itertools.chain( | |
100 | extensions.enabled().iteritems(), |
|
100 | extensions.enabled().iteritems(), | |
101 | extensions.disabled().iteritems()): |
|
101 | extensions.disabled().iteritems()): | |
102 | # extensions.load ignores the UI argument |
|
102 | # extensions.load ignores the UI argument | |
103 | mod = extensions.load(None, name, '') |
|
103 | mod = extensions.load(None, name, '') | |
104 | if lowercontains(name) or lowercontains(docs): |
|
104 | if lowercontains(name) or lowercontains(docs): | |
105 | # extension docs are already translated |
|
105 | # extension docs are already translated | |
106 | results['extensions'].append((name, docs.splitlines()[0])) |
|
106 | results['extensions'].append((name, docs.splitlines()[0])) | |
107 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): |
|
107 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): | |
108 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): |
|
108 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): | |
109 | cmdname = cmd.split('|')[0].lstrip('^') |
|
109 | cmdname = cmd.split('|')[0].lstrip('^') | |
110 |
if |
|
110 | if entry[0].__doc__: | |
111 |
cmddoc = gettext( |
|
111 | cmddoc = gettext(entry[0].__doc__).splitlines()[0] | |
112 | else: |
|
112 | else: | |
113 | cmddoc = _('(no help text available)') |
|
113 | cmddoc = _('(no help text available)') | |
114 | results['extensioncommands'].append((cmdname, cmddoc)) |
|
114 | results['extensioncommands'].append((cmdname, cmddoc)) | |
115 | return results |
|
115 | return results | |
116 |
|
116 | |||
117 | def loaddoc(topic): |
|
117 | def loaddoc(topic): | |
118 | """Return a delayed loader for help/topic.txt.""" |
|
118 | """Return a delayed loader for help/topic.txt.""" | |
119 |
|
119 | |||
120 | def loader(): |
|
120 | def loader(): | |
121 | if util.mainfrozen(): |
|
121 | if util.mainfrozen(): | |
122 | module = sys.executable |
|
122 | module = sys.executable | |
123 | else: |
|
123 | else: | |
124 | module = __file__ |
|
124 | module = __file__ | |
125 | base = os.path.dirname(module) |
|
125 | base = os.path.dirname(module) | |
126 |
|
126 | |||
127 | for dir in ('.', '..'): |
|
127 | for dir in ('.', '..'): | |
128 | docdir = os.path.join(base, dir, 'help') |
|
128 | docdir = os.path.join(base, dir, 'help') | |
129 | if os.path.isdir(docdir): |
|
129 | if os.path.isdir(docdir): | |
130 | break |
|
130 | break | |
131 |
|
131 | |||
132 | path = os.path.join(docdir, topic + ".txt") |
|
132 | path = os.path.join(docdir, topic + ".txt") | |
133 | doc = gettext(util.readfile(path)) |
|
133 | doc = gettext(util.readfile(path)) | |
134 | for rewriter in helphooks.get(topic, []): |
|
134 | for rewriter in helphooks.get(topic, []): | |
135 | doc = rewriter(topic, doc) |
|
135 | doc = rewriter(topic, doc) | |
136 | return doc |
|
136 | return doc | |
137 |
|
137 | |||
138 | return loader |
|
138 | return loader | |
139 |
|
139 | |||
140 | helptable = sorted([ |
|
140 | helptable = sorted([ | |
141 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), |
|
141 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), | |
142 | (["dates"], _("Date Formats"), loaddoc('dates')), |
|
142 | (["dates"], _("Date Formats"), loaddoc('dates')), | |
143 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), |
|
143 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), | |
144 | (['environment', 'env'], _('Environment Variables'), |
|
144 | (['environment', 'env'], _('Environment Variables'), | |
145 | loaddoc('environment')), |
|
145 | loaddoc('environment')), | |
146 | (['revs', 'revisions'], _('Specifying Single Revisions'), |
|
146 | (['revs', 'revisions'], _('Specifying Single Revisions'), | |
147 | loaddoc('revisions')), |
|
147 | loaddoc('revisions')), | |
148 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
|
148 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), | |
149 | loaddoc('multirevs')), |
|
149 | loaddoc('multirevs')), | |
150 | (['revset', 'revsets'], _("Specifying Revision Sets"), loaddoc('revsets')), |
|
150 | (['revset', 'revsets'], _("Specifying Revision Sets"), loaddoc('revsets')), | |
151 | (['fileset', 'filesets'], _("Specifying File Sets"), loaddoc('filesets')), |
|
151 | (['fileset', 'filesets'], _("Specifying File Sets"), loaddoc('filesets')), | |
152 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), |
|
152 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), | |
153 | (['merge-tools'], _('Merge Tools'), loaddoc('merge-tools')), |
|
153 | (['merge-tools'], _('Merge Tools'), loaddoc('merge-tools')), | |
154 | (['templating', 'templates', 'template', 'style'], _('Template Usage'), |
|
154 | (['templating', 'templates', 'template', 'style'], _('Template Usage'), | |
155 | loaddoc('templates')), |
|
155 | loaddoc('templates')), | |
156 | (['urls'], _('URL Paths'), loaddoc('urls')), |
|
156 | (['urls'], _('URL Paths'), loaddoc('urls')), | |
157 | (["extensions"], _("Using Additional Features"), extshelp), |
|
157 | (["extensions"], _("Using Additional Features"), extshelp), | |
158 | (["subrepo", "subrepos"], _("Subrepositories"), loaddoc('subrepos')), |
|
158 | (["subrepo", "subrepos"], _("Subrepositories"), loaddoc('subrepos')), | |
159 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), |
|
159 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), | |
160 | (["glossary"], _("Glossary"), loaddoc('glossary')), |
|
160 | (["glossary"], _("Glossary"), loaddoc('glossary')), | |
161 | (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), |
|
161 | (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), | |
162 | loaddoc('hgignore')), |
|
162 | loaddoc('hgignore')), | |
163 | (["phases"], _("Working with Phases"), loaddoc('phases')), |
|
163 | (["phases"], _("Working with Phases"), loaddoc('phases')), | |
164 | ]) |
|
164 | ]) | |
165 |
|
165 | |||
166 | # Map topics to lists of callable taking the current topic help and |
|
166 | # Map topics to lists of callable taking the current topic help and | |
167 | # returning the updated version |
|
167 | # returning the updated version | |
168 | helphooks = {} |
|
168 | helphooks = {} | |
169 |
|
169 | |||
170 | def addtopichook(topic, rewriter): |
|
170 | def addtopichook(topic, rewriter): | |
171 | helphooks.setdefault(topic, []).append(rewriter) |
|
171 | helphooks.setdefault(topic, []).append(rewriter) | |
172 |
|
172 | |||
173 | def makeitemsdoc(topic, doc, marker, items): |
|
173 | def makeitemsdoc(topic, doc, marker, items): | |
174 | """Extract docstring from the items key to function mapping, build a |
|
174 | """Extract docstring from the items key to function mapping, build a | |
175 | .single documentation block and use it to overwrite the marker in doc |
|
175 | .single documentation block and use it to overwrite the marker in doc | |
176 | """ |
|
176 | """ | |
177 | entries = [] |
|
177 | entries = [] | |
178 | for name in sorted(items): |
|
178 | for name in sorted(items): | |
179 | text = (items[name].__doc__ or '').rstrip() |
|
179 | text = (items[name].__doc__ or '').rstrip() | |
180 | if not text: |
|
180 | if not text: | |
181 | continue |
|
181 | continue | |
182 | text = gettext(text) |
|
182 | text = gettext(text) | |
183 | lines = text.splitlines() |
|
183 | lines = text.splitlines() | |
184 | doclines = [(lines[0])] |
|
184 | doclines = [(lines[0])] | |
185 | for l in lines[1:]: |
|
185 | for l in lines[1:]: | |
186 | # Stop once we find some Python doctest |
|
186 | # Stop once we find some Python doctest | |
187 | if l.strip().startswith('>>>'): |
|
187 | if l.strip().startswith('>>>'): | |
188 | break |
|
188 | break | |
189 | doclines.append(' ' + l.strip()) |
|
189 | doclines.append(' ' + l.strip()) | |
190 | entries.append('\n'.join(doclines)) |
|
190 | entries.append('\n'.join(doclines)) | |
191 | entries = '\n\n'.join(entries) |
|
191 | entries = '\n\n'.join(entries) | |
192 | return doc.replace(marker, entries) |
|
192 | return doc.replace(marker, entries) | |
193 |
|
193 | |||
194 | def addtopicsymbols(topic, marker, symbols): |
|
194 | def addtopicsymbols(topic, marker, symbols): | |
195 | def add(topic, doc): |
|
195 | def add(topic, doc): | |
196 | return makeitemsdoc(topic, doc, marker, symbols) |
|
196 | return makeitemsdoc(topic, doc, marker, symbols) | |
197 | addtopichook(topic, add) |
|
197 | addtopichook(topic, add) | |
198 |
|
198 | |||
199 | addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols) |
|
199 | addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols) | |
200 | addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals) |
|
200 | addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals) | |
201 | addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols) |
|
201 | addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols) | |
202 | addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords) |
|
202 | addtopicsymbols('templates', '.. keywordsmarker', templatekw.keywords) | |
203 | addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) |
|
203 | addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) |
@@ -1,777 +1,804 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 | phase set or show the current phase name |
|
18 | phase set or show the current phase name | |
19 | pull pull changes from the specified source |
|
19 | pull pull changes from the specified source | |
20 | push push changes to the specified destination |
|
20 | push push changes to the specified destination | |
21 | remove remove the specified files on the next commit |
|
21 | remove remove the specified files on the next commit | |
22 | serve start stand-alone webserver |
|
22 | serve start stand-alone webserver | |
23 | status show changed files in the working directory |
|
23 | status show changed files in the working directory | |
24 | summary summarize working directory state |
|
24 | summary summarize working directory state | |
25 | update update working directory (or switch revisions) |
|
25 | update update working directory (or switch revisions) | |
26 |
|
26 | |||
27 | use "hg help" for the full list of commands or "hg -v" for details |
|
27 | use "hg help" for the full list of commands or "hg -v" for details | |
28 |
|
28 | |||
29 | $ hg -q |
|
29 | $ hg -q | |
30 | add add the specified files on the next commit |
|
30 | add add the specified files on the next commit | |
31 | annotate show changeset information by line for each file |
|
31 | annotate show changeset information by line for each file | |
32 | clone make a copy of an existing repository |
|
32 | clone make a copy of an existing repository | |
33 | commit commit the specified files or all outstanding changes |
|
33 | commit commit the specified files or all outstanding changes | |
34 | diff diff repository (or selected files) |
|
34 | diff diff repository (or selected files) | |
35 | export dump the header and diffs for one or more changesets |
|
35 | export dump the header and diffs for one or more changesets | |
36 | forget forget the specified files on the next commit |
|
36 | forget forget the specified files on the next commit | |
37 | init create a new repository in the given directory |
|
37 | init create a new repository in the given directory | |
38 | log show revision history of entire repository or files |
|
38 | log show revision history of entire repository or files | |
39 | merge merge working directory with another revision |
|
39 | merge merge working directory with another revision | |
40 | phase set or show the current phase name |
|
40 | phase set or show the current phase name | |
41 | pull pull changes from the specified source |
|
41 | pull pull changes from the specified source | |
42 | push push changes to the specified destination |
|
42 | push push changes to the specified destination | |
43 | remove remove the specified files on the next commit |
|
43 | remove remove the specified files on the next commit | |
44 | serve start stand-alone webserver |
|
44 | serve start stand-alone webserver | |
45 | status show changed files in the working directory |
|
45 | status show changed files in the working directory | |
46 | summary summarize working directory state |
|
46 | summary summarize working directory state | |
47 | update update working directory (or switch revisions) |
|
47 | update update working directory (or switch revisions) | |
48 |
|
48 | |||
49 | $ hg help |
|
49 | $ hg help | |
50 | Mercurial Distributed SCM |
|
50 | Mercurial Distributed SCM | |
51 |
|
51 | |||
52 | list of commands: |
|
52 | list of commands: | |
53 |
|
53 | |||
54 | add add the specified files on the next commit |
|
54 | add add the specified files on the next commit | |
55 | addremove add all new files, delete all missing files |
|
55 | addremove add all new files, delete all missing files | |
56 | annotate show changeset information by line for each file |
|
56 | annotate show changeset information by line for each file | |
57 | archive create an unversioned archive of a repository revision |
|
57 | archive create an unversioned archive of a repository revision | |
58 | backout reverse effect of earlier changeset |
|
58 | backout reverse effect of earlier changeset | |
59 | bisect subdivision search of changesets |
|
59 | bisect subdivision search of changesets | |
60 | bookmarks track a line of development with movable markers |
|
60 | bookmarks track a line of development with movable markers | |
61 | branch set or show the current branch name |
|
61 | branch set or show the current branch name | |
62 | branches list repository named branches |
|
62 | branches list repository named branches | |
63 | bundle create a changegroup file |
|
63 | bundle create a changegroup file | |
64 | cat output the current or given revision of files |
|
64 | cat output the current or given revision of files | |
65 | clone make a copy of an existing repository |
|
65 | clone make a copy of an existing repository | |
66 | commit commit the specified files or all outstanding changes |
|
66 | commit commit the specified files or all outstanding changes | |
67 | copy mark files as copied for the next commit |
|
67 | copy mark files as copied for the next commit | |
68 | diff diff repository (or selected files) |
|
68 | diff diff repository (or selected files) | |
69 | export dump the header and diffs for one or more changesets |
|
69 | export dump the header and diffs for one or more changesets | |
70 | forget forget the specified files on the next commit |
|
70 | forget forget the specified files on the next commit | |
71 | graft copy changes from other branches onto the current branch |
|
71 | graft copy changes from other branches onto the current branch | |
72 | grep search for a pattern in specified files and revisions |
|
72 | grep search for a pattern in specified files and revisions | |
73 | heads show current repository heads or show branch heads |
|
73 | heads show current repository heads or show branch heads | |
74 | help show help for a given topic or a help overview |
|
74 | help show help for a given topic or a help overview | |
75 | identify identify the working copy or specified revision |
|
75 | identify identify the working copy or specified revision | |
76 | import import an ordered set of patches |
|
76 | import import an ordered set of patches | |
77 | incoming show new changesets found in source |
|
77 | incoming show new changesets found in source | |
78 | init create a new repository in the given directory |
|
78 | init create a new repository in the given directory | |
79 | locate locate files matching specific patterns |
|
79 | locate locate files matching specific patterns | |
80 | log show revision history of entire repository or files |
|
80 | log show revision history of entire repository or files | |
81 | manifest output the current or given revision of the project manifest |
|
81 | manifest output the current or given revision of the project manifest | |
82 | merge merge working directory with another revision |
|
82 | merge merge working directory with another revision | |
83 | outgoing show changesets not found in the destination |
|
83 | outgoing show changesets not found in the destination | |
84 | parents show the parents of the working directory or revision |
|
84 | parents show the parents of the working directory or revision | |
85 | paths show aliases for remote repositories |
|
85 | paths show aliases for remote repositories | |
86 | phase set or show the current phase name |
|
86 | phase set or show the current phase name | |
87 | pull pull changes from the specified source |
|
87 | pull pull changes from the specified source | |
88 | push push changes to the specified destination |
|
88 | push push changes to the specified destination | |
89 | recover roll back an interrupted transaction |
|
89 | recover roll back an interrupted transaction | |
90 | remove remove the specified files on the next commit |
|
90 | remove remove the specified files on the next commit | |
91 | rename rename files; equivalent of copy + remove |
|
91 | rename rename files; equivalent of copy + remove | |
92 | resolve redo merges or set/view the merge status of files |
|
92 | resolve redo merges or set/view the merge status of files | |
93 | revert restore files to their checkout state |
|
93 | revert restore files to their checkout state | |
94 | rollback roll back the last transaction (dangerous) |
|
94 | rollback roll back the last transaction (dangerous) | |
95 | root print the root (top) of the current working directory |
|
95 | root print the root (top) of the current working directory | |
96 | serve start stand-alone webserver |
|
96 | serve start stand-alone webserver | |
97 | showconfig show combined config settings from all hgrc files |
|
97 | showconfig show combined config settings from all hgrc files | |
98 | status show changed files in the working directory |
|
98 | status show changed files in the working directory | |
99 | summary summarize working directory state |
|
99 | summary summarize working directory state | |
100 | tag add one or more tags for the current or given revision |
|
100 | tag add one or more tags for the current or given revision | |
101 | tags list repository tags |
|
101 | tags list repository tags | |
102 | tip show the tip revision |
|
102 | tip show the tip revision | |
103 | unbundle apply one or more changegroup files |
|
103 | unbundle apply one or more changegroup files | |
104 | update update working directory (or switch revisions) |
|
104 | update update working directory (or switch revisions) | |
105 | verify verify the integrity of the repository |
|
105 | verify verify the integrity of the repository | |
106 | version output version and copyright information |
|
106 | version output version and copyright information | |
107 |
|
107 | |||
108 | additional help topics: |
|
108 | additional help topics: | |
109 |
|
109 | |||
110 | config Configuration Files |
|
110 | config Configuration Files | |
111 | dates Date Formats |
|
111 | dates Date Formats | |
112 | diffs Diff Formats |
|
112 | diffs Diff Formats | |
113 | environment Environment Variables |
|
113 | environment Environment Variables | |
114 | extensions Using Additional Features |
|
114 | extensions Using Additional Features | |
115 | filesets Specifying File Sets |
|
115 | filesets Specifying File Sets | |
116 | glossary Glossary |
|
116 | glossary Glossary | |
117 | hgignore Syntax for Mercurial Ignore Files |
|
117 | hgignore Syntax for Mercurial Ignore Files | |
118 | hgweb Configuring hgweb |
|
118 | hgweb Configuring hgweb | |
119 | merge-tools Merge Tools |
|
119 | merge-tools Merge Tools | |
120 | multirevs Specifying Multiple Revisions |
|
120 | multirevs Specifying Multiple Revisions | |
121 | patterns File Name Patterns |
|
121 | patterns File Name Patterns | |
122 | phases Working with Phases |
|
122 | phases Working with Phases | |
123 | revisions Specifying Single Revisions |
|
123 | revisions Specifying Single Revisions | |
124 | revsets Specifying Revision Sets |
|
124 | revsets Specifying Revision Sets | |
125 | subrepos Subrepositories |
|
125 | subrepos Subrepositories | |
126 | templating Template Usage |
|
126 | templating Template Usage | |
127 | urls URL Paths |
|
127 | urls URL Paths | |
128 |
|
128 | |||
129 | use "hg -v help" to show builtin aliases and global options |
|
129 | use "hg -v help" to show builtin aliases and global options | |
130 |
|
130 | |||
131 | $ hg -q help |
|
131 | $ hg -q help | |
132 | add add the specified files on the next commit |
|
132 | add add the specified files on the next commit | |
133 | addremove add all new files, delete all missing files |
|
133 | addremove add all new files, delete all missing files | |
134 | annotate show changeset information by line for each file |
|
134 | annotate show changeset information by line for each file | |
135 | archive create an unversioned archive of a repository revision |
|
135 | archive create an unversioned archive of a repository revision | |
136 | backout reverse effect of earlier changeset |
|
136 | backout reverse effect of earlier changeset | |
137 | bisect subdivision search of changesets |
|
137 | bisect subdivision search of changesets | |
138 | bookmarks track a line of development with movable markers |
|
138 | bookmarks track a line of development with movable markers | |
139 | branch set or show the current branch name |
|
139 | branch set or show the current branch name | |
140 | branches list repository named branches |
|
140 | branches list repository named branches | |
141 | bundle create a changegroup file |
|
141 | bundle create a changegroup file | |
142 | cat output the current or given revision of files |
|
142 | cat output the current or given revision of files | |
143 | clone make a copy of an existing repository |
|
143 | clone make a copy of an existing repository | |
144 | commit commit the specified files or all outstanding changes |
|
144 | commit commit the specified files or all outstanding changes | |
145 | copy mark files as copied for the next commit |
|
145 | copy mark files as copied for the next commit | |
146 | diff diff repository (or selected files) |
|
146 | diff diff repository (or selected files) | |
147 | export dump the header and diffs for one or more changesets |
|
147 | export dump the header and diffs for one or more changesets | |
148 | forget forget the specified files on the next commit |
|
148 | forget forget the specified files on the next commit | |
149 | graft copy changes from other branches onto the current branch |
|
149 | graft copy changes from other branches onto the current branch | |
150 | grep search for a pattern in specified files and revisions |
|
150 | grep search for a pattern in specified files and revisions | |
151 | heads show current repository heads or show branch heads |
|
151 | heads show current repository heads or show branch heads | |
152 | help show help for a given topic or a help overview |
|
152 | help show help for a given topic or a help overview | |
153 | identify identify the working copy or specified revision |
|
153 | identify identify the working copy or specified revision | |
154 | import import an ordered set of patches |
|
154 | import import an ordered set of patches | |
155 | incoming show new changesets found in source |
|
155 | incoming show new changesets found in source | |
156 | init create a new repository in the given directory |
|
156 | init create a new repository in the given directory | |
157 | locate locate files matching specific patterns |
|
157 | locate locate files matching specific patterns | |
158 | log show revision history of entire repository or files |
|
158 | log show revision history of entire repository or files | |
159 | manifest output the current or given revision of the project manifest |
|
159 | manifest output the current or given revision of the project manifest | |
160 | merge merge working directory with another revision |
|
160 | merge merge working directory with another revision | |
161 | outgoing show changesets not found in the destination |
|
161 | outgoing show changesets not found in the destination | |
162 | parents show the parents of the working directory or revision |
|
162 | parents show the parents of the working directory or revision | |
163 | paths show aliases for remote repositories |
|
163 | paths show aliases for remote repositories | |
164 | phase set or show the current phase name |
|
164 | phase set or show the current phase name | |
165 | pull pull changes from the specified source |
|
165 | pull pull changes from the specified source | |
166 | push push changes to the specified destination |
|
166 | push push changes to the specified destination | |
167 | recover roll back an interrupted transaction |
|
167 | recover roll back an interrupted transaction | |
168 | remove remove the specified files on the next commit |
|
168 | remove remove the specified files on the next commit | |
169 | rename rename files; equivalent of copy + remove |
|
169 | rename rename files; equivalent of copy + remove | |
170 | resolve redo merges or set/view the merge status of files |
|
170 | resolve redo merges or set/view the merge status of files | |
171 | revert restore files to their checkout state |
|
171 | revert restore files to their checkout state | |
172 | rollback roll back the last transaction (dangerous) |
|
172 | rollback roll back the last transaction (dangerous) | |
173 | root print the root (top) of the current working directory |
|
173 | root print the root (top) of the current working directory | |
174 | serve start stand-alone webserver |
|
174 | serve start stand-alone webserver | |
175 | showconfig show combined config settings from all hgrc files |
|
175 | showconfig show combined config settings from all hgrc files | |
176 | status show changed files in the working directory |
|
176 | status show changed files in the working directory | |
177 | summary summarize working directory state |
|
177 | summary summarize working directory state | |
178 | tag add one or more tags for the current or given revision |
|
178 | tag add one or more tags for the current or given revision | |
179 | tags list repository tags |
|
179 | tags list repository tags | |
180 | tip show the tip revision |
|
180 | tip show the tip revision | |
181 | unbundle apply one or more changegroup files |
|
181 | unbundle apply one or more changegroup files | |
182 | update update working directory (or switch revisions) |
|
182 | update update working directory (or switch revisions) | |
183 | verify verify the integrity of the repository |
|
183 | verify verify the integrity of the repository | |
184 | version output version and copyright information |
|
184 | version output version and copyright information | |
185 |
|
185 | |||
186 | additional help topics: |
|
186 | additional help topics: | |
187 |
|
187 | |||
188 | config Configuration Files |
|
188 | config Configuration Files | |
189 | dates Date Formats |
|
189 | dates Date Formats | |
190 | diffs Diff Formats |
|
190 | diffs Diff Formats | |
191 | environment Environment Variables |
|
191 | environment Environment Variables | |
192 | extensions Using Additional Features |
|
192 | extensions Using Additional Features | |
193 | filesets Specifying File Sets |
|
193 | filesets Specifying File Sets | |
194 | glossary Glossary |
|
194 | glossary Glossary | |
195 | hgignore Syntax for Mercurial Ignore Files |
|
195 | hgignore Syntax for Mercurial Ignore Files | |
196 | hgweb Configuring hgweb |
|
196 | hgweb Configuring hgweb | |
197 | merge-tools Merge Tools |
|
197 | merge-tools Merge Tools | |
198 | multirevs Specifying Multiple Revisions |
|
198 | multirevs Specifying Multiple Revisions | |
199 | patterns File Name Patterns |
|
199 | patterns File Name Patterns | |
200 | phases Working with Phases |
|
200 | phases Working with Phases | |
201 | revisions Specifying Single Revisions |
|
201 | revisions Specifying Single Revisions | |
202 | revsets Specifying Revision Sets |
|
202 | revsets Specifying Revision Sets | |
203 | subrepos Subrepositories |
|
203 | subrepos Subrepositories | |
204 | templating Template Usage |
|
204 | templating Template Usage | |
205 | urls URL Paths |
|
205 | urls URL Paths | |
206 |
|
206 | |||
207 | Test short command list with verbose option |
|
207 | Test short command list with verbose option | |
208 |
|
208 | |||
209 | $ hg -v help shortlist |
|
209 | $ hg -v help shortlist | |
210 | Mercurial Distributed SCM |
|
210 | Mercurial Distributed SCM | |
211 |
|
211 | |||
212 | basic commands: |
|
212 | basic commands: | |
213 |
|
213 | |||
214 | add add the specified files on the next commit |
|
214 | add add the specified files on the next commit | |
215 | annotate, blame |
|
215 | annotate, blame | |
216 | show changeset information by line for each file |
|
216 | show changeset information by line for each file | |
217 | clone make a copy of an existing repository |
|
217 | clone make a copy of an existing repository | |
218 | commit, ci commit the specified files or all outstanding changes |
|
218 | commit, ci commit the specified files or all outstanding changes | |
219 | diff diff repository (or selected files) |
|
219 | diff diff repository (or selected files) | |
220 | export dump the header and diffs for one or more changesets |
|
220 | export dump the header and diffs for one or more changesets | |
221 | forget forget the specified files on the next commit |
|
221 | forget forget the specified files on the next commit | |
222 | init create a new repository in the given directory |
|
222 | init create a new repository in the given directory | |
223 | log, history show revision history of entire repository or files |
|
223 | log, history show revision history of entire repository or files | |
224 | merge merge working directory with another revision |
|
224 | merge merge working directory with another revision | |
225 | phase set or show the current phase name |
|
225 | phase set or show the current phase name | |
226 | pull pull changes from the specified source |
|
226 | pull pull changes from the specified source | |
227 | push push changes to the specified destination |
|
227 | push push changes to the specified destination | |
228 | remove, rm remove the specified files on the next commit |
|
228 | remove, rm remove the specified files on the next commit | |
229 | serve start stand-alone webserver |
|
229 | serve start stand-alone webserver | |
230 | status, st show changed files in the working directory |
|
230 | status, st show changed files in the working directory | |
231 | summary, sum summarize working directory state |
|
231 | summary, sum summarize working directory state | |
232 | update, up, checkout, co |
|
232 | update, up, checkout, co | |
233 | update working directory (or switch revisions) |
|
233 | update working directory (or switch revisions) | |
234 |
|
234 | |||
235 | global options: |
|
235 | global options: | |
236 |
|
236 | |||
237 | -R --repository REPO repository root directory or name of overlay bundle |
|
237 | -R --repository REPO repository root directory or name of overlay bundle | |
238 | file |
|
238 | file | |
239 | --cwd DIR change working directory |
|
239 | --cwd DIR change working directory | |
240 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
240 | -y --noninteractive do not prompt, automatically pick the first choice for | |
241 | all prompts |
|
241 | all prompts | |
242 | -q --quiet suppress output |
|
242 | -q --quiet suppress output | |
243 | -v --verbose enable additional output |
|
243 | -v --verbose enable additional output | |
244 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
244 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
245 | --debug enable debugging output |
|
245 | --debug enable debugging output | |
246 | --debugger start debugger |
|
246 | --debugger start debugger | |
247 | --encoding ENCODE set the charset encoding (default: ascii) |
|
247 | --encoding ENCODE set the charset encoding (default: ascii) | |
248 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
248 | --encodingmode MODE set the charset encoding mode (default: strict) | |
249 | --traceback always print a traceback on exception |
|
249 | --traceback always print a traceback on exception | |
250 | --time time how long the command takes |
|
250 | --time time how long the command takes | |
251 | --profile print command execution profile |
|
251 | --profile print command execution profile | |
252 | --version output version information and exit |
|
252 | --version output version information and exit | |
253 | -h --help display help and exit |
|
253 | -h --help display help and exit | |
254 |
|
254 | |||
255 | [+] marked option can be specified multiple times |
|
255 | [+] marked option can be specified multiple times | |
256 |
|
256 | |||
257 | use "hg help" for the full list of commands |
|
257 | use "hg help" for the full list of commands | |
258 |
|
258 | |||
259 | $ hg add -h |
|
259 | $ hg add -h | |
260 | hg add [OPTION]... [FILE]... |
|
260 | hg add [OPTION]... [FILE]... | |
261 |
|
261 | |||
262 | add the specified files on the next commit |
|
262 | add the specified files on the next commit | |
263 |
|
263 | |||
264 | Schedule files to be version controlled and added to the repository. |
|
264 | Schedule files to be version controlled and added to the repository. | |
265 |
|
265 | |||
266 | The files will be added to the repository at the next commit. To undo an |
|
266 | The files will be added to the repository at the next commit. To undo an | |
267 | add before that, see "hg forget". |
|
267 | add before that, see "hg forget". | |
268 |
|
268 | |||
269 | If no names are given, add all files to the repository. |
|
269 | If no names are given, add all files to the repository. | |
270 |
|
270 | |||
271 | Returns 0 if all files are successfully added. |
|
271 | Returns 0 if all files are successfully added. | |
272 |
|
272 | |||
273 | options: |
|
273 | options: | |
274 |
|
274 | |||
275 | -I --include PATTERN [+] include names matching the given patterns |
|
275 | -I --include PATTERN [+] include names matching the given patterns | |
276 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
276 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
277 | -S --subrepos recurse into subrepositories |
|
277 | -S --subrepos recurse into subrepositories | |
278 | -n --dry-run do not perform actions, just print output |
|
278 | -n --dry-run do not perform actions, just print output | |
279 |
|
279 | |||
280 | [+] marked option can be specified multiple times |
|
280 | [+] marked option can be specified multiple times | |
281 |
|
281 | |||
282 | use "hg -v help add" to show more info |
|
282 | use "hg -v help add" to show more info | |
283 |
|
283 | |||
284 | Verbose help for add |
|
284 | Verbose help for add | |
285 |
|
285 | |||
286 | $ hg add -hv |
|
286 | $ hg add -hv | |
287 | hg add [OPTION]... [FILE]... |
|
287 | hg add [OPTION]... [FILE]... | |
288 |
|
288 | |||
289 | add the specified files on the next commit |
|
289 | add the specified files on the next commit | |
290 |
|
290 | |||
291 | Schedule files to be version controlled and added to the repository. |
|
291 | Schedule files to be version controlled and added to the repository. | |
292 |
|
292 | |||
293 | The files will be added to the repository at the next commit. To undo an |
|
293 | The files will be added to the repository at the next commit. To undo an | |
294 | add before that, see "hg forget". |
|
294 | add before that, see "hg forget". | |
295 |
|
295 | |||
296 | If no names are given, add all files to the repository. |
|
296 | If no names are given, add all files to the repository. | |
297 |
|
297 | |||
298 | An example showing how new (unknown) files are added automatically by "hg |
|
298 | An example showing how new (unknown) files are added automatically by "hg | |
299 | add": |
|
299 | add": | |
300 |
|
300 | |||
301 | $ ls |
|
301 | $ ls | |
302 | foo.c |
|
302 | foo.c | |
303 | $ hg status |
|
303 | $ hg status | |
304 | ? foo.c |
|
304 | ? foo.c | |
305 | $ hg add |
|
305 | $ hg add | |
306 | adding foo.c |
|
306 | adding foo.c | |
307 | $ hg status |
|
307 | $ hg status | |
308 | A foo.c |
|
308 | A foo.c | |
309 |
|
309 | |||
310 | Returns 0 if all files are successfully added. |
|
310 | Returns 0 if all files are successfully added. | |
311 |
|
311 | |||
312 | options: |
|
312 | options: | |
313 |
|
313 | |||
314 | -I --include PATTERN [+] include names matching the given patterns |
|
314 | -I --include PATTERN [+] include names matching the given patterns | |
315 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
315 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
316 | -S --subrepos recurse into subrepositories |
|
316 | -S --subrepos recurse into subrepositories | |
317 | -n --dry-run do not perform actions, just print output |
|
317 | -n --dry-run do not perform actions, just print output | |
318 |
|
318 | |||
319 | [+] marked option can be specified multiple times |
|
319 | [+] marked option can be specified multiple times | |
320 |
|
320 | |||
321 | global options: |
|
321 | global options: | |
322 |
|
322 | |||
323 | -R --repository REPO repository root directory or name of overlay bundle |
|
323 | -R --repository REPO repository root directory or name of overlay bundle | |
324 | file |
|
324 | file | |
325 | --cwd DIR change working directory |
|
325 | --cwd DIR change working directory | |
326 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
326 | -y --noninteractive do not prompt, automatically pick the first choice for | |
327 | all prompts |
|
327 | all prompts | |
328 | -q --quiet suppress output |
|
328 | -q --quiet suppress output | |
329 | -v --verbose enable additional output |
|
329 | -v --verbose enable additional output | |
330 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
330 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
331 | --debug enable debugging output |
|
331 | --debug enable debugging output | |
332 | --debugger start debugger |
|
332 | --debugger start debugger | |
333 | --encoding ENCODE set the charset encoding (default: ascii) |
|
333 | --encoding ENCODE set the charset encoding (default: ascii) | |
334 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
334 | --encodingmode MODE set the charset encoding mode (default: strict) | |
335 | --traceback always print a traceback on exception |
|
335 | --traceback always print a traceback on exception | |
336 | --time time how long the command takes |
|
336 | --time time how long the command takes | |
337 | --profile print command execution profile |
|
337 | --profile print command execution profile | |
338 | --version output version information and exit |
|
338 | --version output version information and exit | |
339 | -h --help display help and exit |
|
339 | -h --help display help and exit | |
340 |
|
340 | |||
341 | [+] marked option can be specified multiple times |
|
341 | [+] marked option can be specified multiple times | |
342 |
|
342 | |||
343 | Test help option with version option |
|
343 | Test help option with version option | |
344 |
|
344 | |||
345 | $ hg add -h --version |
|
345 | $ hg add -h --version | |
346 | Mercurial Distributed SCM (version *) (glob) |
|
346 | Mercurial Distributed SCM (version *) (glob) | |
347 | (see http://mercurial.selenic.com for more information) |
|
347 | (see http://mercurial.selenic.com for more information) | |
348 |
|
348 | |||
349 | Copyright (C) 2005-2012 Matt Mackall and others |
|
349 | Copyright (C) 2005-2012 Matt Mackall and others | |
350 | This is free software; see the source for copying conditions. There is NO |
|
350 | This is free software; see the source for copying conditions. There is NO | |
351 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
351 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
352 |
|
352 | |||
353 | $ hg add --skjdfks |
|
353 | $ hg add --skjdfks | |
354 | hg add: option --skjdfks not recognized |
|
354 | hg add: option --skjdfks not recognized | |
355 | hg add [OPTION]... [FILE]... |
|
355 | hg add [OPTION]... [FILE]... | |
356 |
|
356 | |||
357 | add the specified files on the next commit |
|
357 | add the specified files on the next commit | |
358 |
|
358 | |||
359 | options: |
|
359 | options: | |
360 |
|
360 | |||
361 | -I --include PATTERN [+] include names matching the given patterns |
|
361 | -I --include PATTERN [+] include names matching the given patterns | |
362 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
362 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
363 | -S --subrepos recurse into subrepositories |
|
363 | -S --subrepos recurse into subrepositories | |
364 | -n --dry-run do not perform actions, just print output |
|
364 | -n --dry-run do not perform actions, just print output | |
365 |
|
365 | |||
366 | [+] marked option can be specified multiple times |
|
366 | [+] marked option can be specified multiple times | |
367 |
|
367 | |||
368 | use "hg help add" to show the full help text |
|
368 | use "hg help add" to show the full help text | |
369 | [255] |
|
369 | [255] | |
370 |
|
370 | |||
371 | Test ambiguous command help |
|
371 | Test ambiguous command help | |
372 |
|
372 | |||
373 | $ hg help ad |
|
373 | $ hg help ad | |
374 | list of commands: |
|
374 | list of commands: | |
375 |
|
375 | |||
376 | add add the specified files on the next commit |
|
376 | add add the specified files on the next commit | |
377 | addremove add all new files, delete all missing files |
|
377 | addremove add all new files, delete all missing files | |
378 |
|
378 | |||
379 | use "hg -v help ad" to show builtin aliases and global options |
|
379 | use "hg -v help ad" to show builtin aliases and global options | |
380 |
|
380 | |||
381 | Test command without options |
|
381 | Test command without options | |
382 |
|
382 | |||
383 | $ hg help verify |
|
383 | $ hg help verify | |
384 | hg verify |
|
384 | hg verify | |
385 |
|
385 | |||
386 | verify the integrity of the repository |
|
386 | verify the integrity of the repository | |
387 |
|
387 | |||
388 | Verify the integrity of the current repository. |
|
388 | Verify the integrity of the current repository. | |
389 |
|
389 | |||
390 | This will perform an extensive check of the repository's integrity, |
|
390 | This will perform an extensive check of the repository's integrity, | |
391 | validating the hashes and checksums of each entry in the changelog, |
|
391 | validating the hashes and checksums of each entry in the changelog, | |
392 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
392 | manifest, and tracked files, as well as the integrity of their crosslinks | |
393 | and indices. |
|
393 | and indices. | |
394 |
|
394 | |||
395 | Returns 0 on success, 1 if errors are encountered. |
|
395 | Returns 0 on success, 1 if errors are encountered. | |
396 |
|
396 | |||
397 | use "hg -v help verify" to show more info |
|
397 | use "hg -v help verify" to show more info | |
398 |
|
398 | |||
399 | $ hg help diff |
|
399 | $ hg help diff | |
400 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
400 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
401 |
|
401 | |||
402 | diff repository (or selected files) |
|
402 | diff repository (or selected files) | |
403 |
|
403 | |||
404 | Show differences between revisions for the specified files. |
|
404 | Show differences between revisions for the specified files. | |
405 |
|
405 | |||
406 | Differences between files are shown using the unified diff format. |
|
406 | Differences between files are shown using the unified diff format. | |
407 |
|
407 | |||
408 | Note: |
|
408 | Note: | |
409 | diff may generate unexpected results for merges, as it will default to |
|
409 | diff may generate unexpected results for merges, as it will default to | |
410 | comparing against the working directory's first parent changeset if no |
|
410 | comparing against the working directory's first parent changeset if no | |
411 | revisions are specified. |
|
411 | revisions are specified. | |
412 |
|
412 | |||
413 | When two revision arguments are given, then changes are shown between |
|
413 | When two revision arguments are given, then changes are shown between | |
414 | those revisions. If only one revision is specified then that revision is |
|
414 | those revisions. If only one revision is specified then that revision is | |
415 | compared to the working directory, and, when no revisions are specified, |
|
415 | compared to the working directory, and, when no revisions are specified, | |
416 | the working directory files are compared to its parent. |
|
416 | the working directory files are compared to its parent. | |
417 |
|
417 | |||
418 | Alternatively you can specify -c/--change with a revision to see the |
|
418 | Alternatively you can specify -c/--change with a revision to see the | |
419 | changes in that changeset relative to its first parent. |
|
419 | changes in that changeset relative to its first parent. | |
420 |
|
420 | |||
421 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
421 | Without the -a/--text option, diff will avoid generating diffs of files it | |
422 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
422 | detects as binary. With -a, diff will generate a diff anyway, probably | |
423 | with undesirable results. |
|
423 | with undesirable results. | |
424 |
|
424 | |||
425 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
425 | Use the -g/--git option to generate diffs in the git extended diff format. | |
426 | For more information, read "hg help diffs". |
|
426 | For more information, read "hg help diffs". | |
427 |
|
427 | |||
428 | Returns 0 on success. |
|
428 | Returns 0 on success. | |
429 |
|
429 | |||
430 | options: |
|
430 | options: | |
431 |
|
431 | |||
432 | -r --rev REV [+] revision |
|
432 | -r --rev REV [+] revision | |
433 | -c --change REV change made by revision |
|
433 | -c --change REV change made by revision | |
434 | -a --text treat all files as text |
|
434 | -a --text treat all files as text | |
435 | -g --git use git extended diff format |
|
435 | -g --git use git extended diff format | |
436 | --nodates omit dates from diff headers |
|
436 | --nodates omit dates from diff headers | |
437 | -p --show-function show which function each change is in |
|
437 | -p --show-function show which function each change is in | |
438 | --reverse produce a diff that undoes the changes |
|
438 | --reverse produce a diff that undoes the changes | |
439 | -w --ignore-all-space ignore white space when comparing lines |
|
439 | -w --ignore-all-space ignore white space when comparing lines | |
440 | -b --ignore-space-change ignore changes in the amount of white space |
|
440 | -b --ignore-space-change ignore changes in the amount of white space | |
441 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
441 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
442 | -U --unified NUM number of lines of context to show |
|
442 | -U --unified NUM number of lines of context to show | |
443 | --stat output diffstat-style summary of changes |
|
443 | --stat output diffstat-style summary of changes | |
444 | -I --include PATTERN [+] include names matching the given patterns |
|
444 | -I --include PATTERN [+] include names matching the given patterns | |
445 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
445 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
446 | -S --subrepos recurse into subrepositories |
|
446 | -S --subrepos recurse into subrepositories | |
447 |
|
447 | |||
448 | [+] marked option can be specified multiple times |
|
448 | [+] marked option can be specified multiple times | |
449 |
|
449 | |||
450 | use "hg -v help diff" to show more info |
|
450 | use "hg -v help diff" to show more info | |
451 |
|
451 | |||
452 | $ hg help status |
|
452 | $ hg help status | |
453 | hg status [OPTION]... [FILE]... |
|
453 | hg status [OPTION]... [FILE]... | |
454 |
|
454 | |||
455 | aliases: st |
|
455 | aliases: st | |
456 |
|
456 | |||
457 | show changed files in the working directory |
|
457 | show changed files in the working directory | |
458 |
|
458 | |||
459 | Show status of files in the repository. If names are given, only files |
|
459 | Show status of files in the repository. If names are given, only files | |
460 | that match are shown. Files that are clean or ignored or the source of a |
|
460 | that match are shown. Files that are clean or ignored or the source of a | |
461 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
461 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
462 | -C/--copies or -A/--all are given. Unless options described with "show |
|
462 | -C/--copies or -A/--all are given. Unless options described with "show | |
463 | only ..." are given, the options -mardu are used. |
|
463 | only ..." are given, the options -mardu are used. | |
464 |
|
464 | |||
465 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
465 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
466 | explicitly requested with -u/--unknown or -i/--ignored. |
|
466 | explicitly requested with -u/--unknown or -i/--ignored. | |
467 |
|
467 | |||
468 | Note: |
|
468 | Note: | |
469 | status may appear to disagree with diff if permissions have changed or |
|
469 | status may appear to disagree with diff if permissions have changed or | |
470 | a merge has occurred. The standard diff format does not report |
|
470 | a merge has occurred. The standard diff format does not report | |
471 | permission changes and diff only reports changes relative to one merge |
|
471 | permission changes and diff only reports changes relative to one merge | |
472 | parent. |
|
472 | parent. | |
473 |
|
473 | |||
474 | If one revision is given, it is used as the base revision. If two |
|
474 | If one revision is given, it is used as the base revision. If two | |
475 | revisions are given, the differences between them are shown. The --change |
|
475 | revisions are given, the differences between them are shown. The --change | |
476 | option can also be used as a shortcut to list the changed files of a |
|
476 | option can also be used as a shortcut to list the changed files of a | |
477 | revision from its first parent. |
|
477 | revision from its first parent. | |
478 |
|
478 | |||
479 | The codes used to show the status of files are: |
|
479 | The codes used to show the status of files are: | |
480 |
|
480 | |||
481 | M = modified |
|
481 | M = modified | |
482 | A = added |
|
482 | A = added | |
483 | R = removed |
|
483 | R = removed | |
484 | C = clean |
|
484 | C = clean | |
485 | ! = missing (deleted by non-hg command, but still tracked) |
|
485 | ! = missing (deleted by non-hg command, but still tracked) | |
486 | ? = not tracked |
|
486 | ? = not tracked | |
487 | I = ignored |
|
487 | I = ignored | |
488 | = origin of the previous file listed as A (added) |
|
488 | = origin of the previous file listed as A (added) | |
489 |
|
489 | |||
490 | Returns 0 on success. |
|
490 | Returns 0 on success. | |
491 |
|
491 | |||
492 | options: |
|
492 | options: | |
493 |
|
493 | |||
494 | -A --all show status of all files |
|
494 | -A --all show status of all files | |
495 | -m --modified show only modified files |
|
495 | -m --modified show only modified files | |
496 | -a --added show only added files |
|
496 | -a --added show only added files | |
497 | -r --removed show only removed files |
|
497 | -r --removed show only removed files | |
498 | -d --deleted show only deleted (but tracked) files |
|
498 | -d --deleted show only deleted (but tracked) files | |
499 | -c --clean show only files without changes |
|
499 | -c --clean show only files without changes | |
500 | -u --unknown show only unknown (not tracked) files |
|
500 | -u --unknown show only unknown (not tracked) files | |
501 | -i --ignored show only ignored files |
|
501 | -i --ignored show only ignored files | |
502 | -n --no-status hide status prefix |
|
502 | -n --no-status hide status prefix | |
503 | -C --copies show source of copied files |
|
503 | -C --copies show source of copied files | |
504 | -0 --print0 end filenames with NUL, for use with xargs |
|
504 | -0 --print0 end filenames with NUL, for use with xargs | |
505 | --rev REV [+] show difference from revision |
|
505 | --rev REV [+] show difference from revision | |
506 | --change REV list the changed files of a revision |
|
506 | --change REV list the changed files of a revision | |
507 | -I --include PATTERN [+] include names matching the given patterns |
|
507 | -I --include PATTERN [+] include names matching the given patterns | |
508 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
508 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
509 | -S --subrepos recurse into subrepositories |
|
509 | -S --subrepos recurse into subrepositories | |
510 |
|
510 | |||
511 | [+] marked option can be specified multiple times |
|
511 | [+] marked option can be specified multiple times | |
512 |
|
512 | |||
513 | use "hg -v help status" to show more info |
|
513 | use "hg -v help status" to show more info | |
514 |
|
514 | |||
515 | $ hg -q help status |
|
515 | $ hg -q help status | |
516 | hg status [OPTION]... [FILE]... |
|
516 | hg status [OPTION]... [FILE]... | |
517 |
|
517 | |||
518 | show changed files in the working directory |
|
518 | show changed files in the working directory | |
519 |
|
519 | |||
520 | $ hg help foo |
|
520 | $ hg help foo | |
521 | hg: unknown command 'foo' |
|
521 | hg: unknown command 'foo' | |
522 | Mercurial Distributed SCM |
|
522 | Mercurial Distributed SCM | |
523 |
|
523 | |||
524 | basic commands: |
|
524 | basic commands: | |
525 |
|
525 | |||
526 | add add the specified files on the next commit |
|
526 | add add the specified files on the next commit | |
527 | annotate show changeset information by line for each file |
|
527 | annotate show changeset information by line for each file | |
528 | clone make a copy of an existing repository |
|
528 | clone make a copy of an existing repository | |
529 | commit commit the specified files or all outstanding changes |
|
529 | commit commit the specified files or all outstanding changes | |
530 | diff diff repository (or selected files) |
|
530 | diff diff repository (or selected files) | |
531 | export dump the header and diffs for one or more changesets |
|
531 | export dump the header and diffs for one or more changesets | |
532 | forget forget the specified files on the next commit |
|
532 | forget forget the specified files on the next commit | |
533 | init create a new repository in the given directory |
|
533 | init create a new repository in the given directory | |
534 | log show revision history of entire repository or files |
|
534 | log show revision history of entire repository or files | |
535 | merge merge working directory with another revision |
|
535 | merge merge working directory with another revision | |
536 | phase set or show the current phase name |
|
536 | phase set or show the current phase name | |
537 | pull pull changes from the specified source |
|
537 | pull pull changes from the specified source | |
538 | push push changes to the specified destination |
|
538 | push push changes to the specified destination | |
539 | remove remove the specified files on the next commit |
|
539 | remove remove the specified files on the next commit | |
540 | serve start stand-alone webserver |
|
540 | serve start stand-alone webserver | |
541 | status show changed files in the working directory |
|
541 | status show changed files in the working directory | |
542 | summary summarize working directory state |
|
542 | summary summarize working directory state | |
543 | update update working directory (or switch revisions) |
|
543 | update update working directory (or switch revisions) | |
544 |
|
544 | |||
545 | use "hg help" for the full list of commands or "hg -v" for details |
|
545 | use "hg help" for the full list of commands or "hg -v" for details | |
546 | [255] |
|
546 | [255] | |
547 |
|
547 | |||
548 | $ hg skjdfks |
|
548 | $ hg skjdfks | |
549 | hg: unknown command 'skjdfks' |
|
549 | hg: unknown command 'skjdfks' | |
550 | Mercurial Distributed SCM |
|
550 | Mercurial Distributed SCM | |
551 |
|
551 | |||
552 | basic commands: |
|
552 | basic commands: | |
553 |
|
553 | |||
554 | add add the specified files on the next commit |
|
554 | add add the specified files on the next commit | |
555 | annotate show changeset information by line for each file |
|
555 | annotate show changeset information by line for each file | |
556 | clone make a copy of an existing repository |
|
556 | clone make a copy of an existing repository | |
557 | commit commit the specified files or all outstanding changes |
|
557 | commit commit the specified files or all outstanding changes | |
558 | diff diff repository (or selected files) |
|
558 | diff diff repository (or selected files) | |
559 | export dump the header and diffs for one or more changesets |
|
559 | export dump the header and diffs for one or more changesets | |
560 | forget forget the specified files on the next commit |
|
560 | forget forget the specified files on the next commit | |
561 | init create a new repository in the given directory |
|
561 | init create a new repository in the given directory | |
562 | log show revision history of entire repository or files |
|
562 | log show revision history of entire repository or files | |
563 | merge merge working directory with another revision |
|
563 | merge merge working directory with another revision | |
564 | phase set or show the current phase name |
|
564 | phase set or show the current phase name | |
565 | pull pull changes from the specified source |
|
565 | pull pull changes from the specified source | |
566 | push push changes to the specified destination |
|
566 | push push changes to the specified destination | |
567 | remove remove the specified files on the next commit |
|
567 | remove remove the specified files on the next commit | |
568 | serve start stand-alone webserver |
|
568 | serve start stand-alone webserver | |
569 | status show changed files in the working directory |
|
569 | status show changed files in the working directory | |
570 | summary summarize working directory state |
|
570 | summary summarize working directory state | |
571 | update update working directory (or switch revisions) |
|
571 | update update working directory (or switch revisions) | |
572 |
|
572 | |||
573 | use "hg help" for the full list of commands or "hg -v" for details |
|
573 | use "hg help" for the full list of commands or "hg -v" for details | |
574 | [255] |
|
574 | [255] | |
575 |
|
575 | |||
576 | $ cat > helpext.py <<EOF |
|
576 | $ cat > helpext.py <<EOF | |
577 | > import os |
|
577 | > import os | |
578 | > from mercurial import commands |
|
578 | > from mercurial import commands | |
579 | > |
|
579 | > | |
580 | > def nohelp(ui, *args, **kwargs): |
|
580 | > def nohelp(ui, *args, **kwargs): | |
581 | > pass |
|
581 | > pass | |
582 | > |
|
582 | > | |
583 | > cmdtable = { |
|
583 | > cmdtable = { | |
584 | > "nohelp": (nohelp, [], "hg nohelp"), |
|
584 | > "nohelp": (nohelp, [], "hg nohelp"), | |
585 | > } |
|
585 | > } | |
586 | > |
|
586 | > | |
587 | > commands.norepo += ' nohelp' |
|
587 | > commands.norepo += ' nohelp' | |
588 | > EOF |
|
588 | > EOF | |
589 | $ echo '[extensions]' >> $HGRCPATH |
|
589 | $ echo '[extensions]' >> $HGRCPATH | |
590 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
590 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
591 |
|
591 | |||
592 | Test command with no help text |
|
592 | Test command with no help text | |
593 |
|
593 | |||
594 | $ hg help nohelp |
|
594 | $ hg help nohelp | |
595 | hg nohelp |
|
595 | hg nohelp | |
596 |
|
596 | |||
597 | (no help text available) |
|
597 | (no help text available) | |
598 |
|
598 | |||
599 | use "hg -v help nohelp" to show more info |
|
599 | use "hg -v help nohelp" to show more info | |
600 |
|
600 | |||
601 | $ hg help -k nohelp |
|
601 | $ hg help -k nohelp | |
602 | Commands: |
|
602 | Commands: | |
603 |
|
603 | |||
604 | nohelp hg nohelp |
|
604 | nohelp hg nohelp | |
605 |
|
605 | |||
606 | Extension Commands: |
|
606 | Extension Commands: | |
607 |
|
607 | |||
608 | nohelp (no help text available) |
|
608 | nohelp (no help text available) | |
609 |
|
609 | |||
610 | Test that default list of commands omits extension commands |
|
610 | Test that default list of commands omits extension commands | |
611 |
|
611 | |||
612 | $ hg help |
|
612 | $ hg help | |
613 | Mercurial Distributed SCM |
|
613 | Mercurial Distributed SCM | |
614 |
|
614 | |||
615 | list of commands: |
|
615 | list of commands: | |
616 |
|
616 | |||
617 | add add the specified files on the next commit |
|
617 | add add the specified files on the next commit | |
618 | addremove add all new files, delete all missing files |
|
618 | addremove add all new files, delete all missing files | |
619 | annotate show changeset information by line for each file |
|
619 | annotate show changeset information by line for each file | |
620 | archive create an unversioned archive of a repository revision |
|
620 | archive create an unversioned archive of a repository revision | |
621 | backout reverse effect of earlier changeset |
|
621 | backout reverse effect of earlier changeset | |
622 | bisect subdivision search of changesets |
|
622 | bisect subdivision search of changesets | |
623 | bookmarks track a line of development with movable markers |
|
623 | bookmarks track a line of development with movable markers | |
624 | branch set or show the current branch name |
|
624 | branch set or show the current branch name | |
625 | branches list repository named branches |
|
625 | branches list repository named branches | |
626 | bundle create a changegroup file |
|
626 | bundle create a changegroup file | |
627 | cat output the current or given revision of files |
|
627 | cat output the current or given revision of files | |
628 | clone make a copy of an existing repository |
|
628 | clone make a copy of an existing repository | |
629 | commit commit the specified files or all outstanding changes |
|
629 | commit commit the specified files or all outstanding changes | |
630 | copy mark files as copied for the next commit |
|
630 | copy mark files as copied for the next commit | |
631 | diff diff repository (or selected files) |
|
631 | diff diff repository (or selected files) | |
632 | export dump the header and diffs for one or more changesets |
|
632 | export dump the header and diffs for one or more changesets | |
633 | forget forget the specified files on the next commit |
|
633 | forget forget the specified files on the next commit | |
634 | graft copy changes from other branches onto the current branch |
|
634 | graft copy changes from other branches onto the current branch | |
635 | grep search for a pattern in specified files and revisions |
|
635 | grep search for a pattern in specified files and revisions | |
636 | heads show current repository heads or show branch heads |
|
636 | heads show current repository heads or show branch heads | |
637 | help show help for a given topic or a help overview |
|
637 | help show help for a given topic or a help overview | |
638 | identify identify the working copy or specified revision |
|
638 | identify identify the working copy or specified revision | |
639 | import import an ordered set of patches |
|
639 | import import an ordered set of patches | |
640 | incoming show new changesets found in source |
|
640 | incoming show new changesets found in source | |
641 | init create a new repository in the given directory |
|
641 | init create a new repository in the given directory | |
642 | locate locate files matching specific patterns |
|
642 | locate locate files matching specific patterns | |
643 | log show revision history of entire repository or files |
|
643 | log show revision history of entire repository or files | |
644 | manifest output the current or given revision of the project manifest |
|
644 | manifest output the current or given revision of the project manifest | |
645 | merge merge working directory with another revision |
|
645 | merge merge working directory with another revision | |
646 | outgoing show changesets not found in the destination |
|
646 | outgoing show changesets not found in the destination | |
647 | parents show the parents of the working directory or revision |
|
647 | parents show the parents of the working directory or revision | |
648 | paths show aliases for remote repositories |
|
648 | paths show aliases for remote repositories | |
649 | phase set or show the current phase name |
|
649 | phase set or show the current phase name | |
650 | pull pull changes from the specified source |
|
650 | pull pull changes from the specified source | |
651 | push push changes to the specified destination |
|
651 | push push changes to the specified destination | |
652 | recover roll back an interrupted transaction |
|
652 | recover roll back an interrupted transaction | |
653 | remove remove the specified files on the next commit |
|
653 | remove remove the specified files on the next commit | |
654 | rename rename files; equivalent of copy + remove |
|
654 | rename rename files; equivalent of copy + remove | |
655 | resolve redo merges or set/view the merge status of files |
|
655 | resolve redo merges or set/view the merge status of files | |
656 | revert restore files to their checkout state |
|
656 | revert restore files to their checkout state | |
657 | rollback roll back the last transaction (dangerous) |
|
657 | rollback roll back the last transaction (dangerous) | |
658 | root print the root (top) of the current working directory |
|
658 | root print the root (top) of the current working directory | |
659 | serve start stand-alone webserver |
|
659 | serve start stand-alone webserver | |
660 | showconfig show combined config settings from all hgrc files |
|
660 | showconfig show combined config settings from all hgrc files | |
661 | status show changed files in the working directory |
|
661 | status show changed files in the working directory | |
662 | summary summarize working directory state |
|
662 | summary summarize working directory state | |
663 | tag add one or more tags for the current or given revision |
|
663 | tag add one or more tags for the current or given revision | |
664 | tags list repository tags |
|
664 | tags list repository tags | |
665 | tip show the tip revision |
|
665 | tip show the tip revision | |
666 | unbundle apply one or more changegroup files |
|
666 | unbundle apply one or more changegroup files | |
667 | update update working directory (or switch revisions) |
|
667 | update update working directory (or switch revisions) | |
668 | verify verify the integrity of the repository |
|
668 | verify verify the integrity of the repository | |
669 | version output version and copyright information |
|
669 | version output version and copyright information | |
670 |
|
670 | |||
671 | enabled extensions: |
|
671 | enabled extensions: | |
672 |
|
672 | |||
673 | helpext (no help text available) |
|
673 | helpext (no help text available) | |
674 |
|
674 | |||
675 | additional help topics: |
|
675 | additional help topics: | |
676 |
|
676 | |||
677 | config Configuration Files |
|
677 | config Configuration Files | |
678 | dates Date Formats |
|
678 | dates Date Formats | |
679 | diffs Diff Formats |
|
679 | diffs Diff Formats | |
680 | environment Environment Variables |
|
680 | environment Environment Variables | |
681 | extensions Using Additional Features |
|
681 | extensions Using Additional Features | |
682 | filesets Specifying File Sets |
|
682 | filesets Specifying File Sets | |
683 | glossary Glossary |
|
683 | glossary Glossary | |
684 | hgignore Syntax for Mercurial Ignore Files |
|
684 | hgignore Syntax for Mercurial Ignore Files | |
685 | hgweb Configuring hgweb |
|
685 | hgweb Configuring hgweb | |
686 | merge-tools Merge Tools |
|
686 | merge-tools Merge Tools | |
687 | multirevs Specifying Multiple Revisions |
|
687 | multirevs Specifying Multiple Revisions | |
688 | patterns File Name Patterns |
|
688 | patterns File Name Patterns | |
689 | phases Working with Phases |
|
689 | phases Working with Phases | |
690 | revisions Specifying Single Revisions |
|
690 | revisions Specifying Single Revisions | |
691 | revsets Specifying Revision Sets |
|
691 | revsets Specifying Revision Sets | |
692 | subrepos Subrepositories |
|
692 | subrepos Subrepositories | |
693 | templating Template Usage |
|
693 | templating Template Usage | |
694 | urls URL Paths |
|
694 | urls URL Paths | |
695 |
|
695 | |||
696 | use "hg -v help" to show builtin aliases and global options |
|
696 | use "hg -v help" to show builtin aliases and global options | |
697 |
|
697 | |||
698 |
|
698 | |||
699 |
|
699 | |||
700 | Test list of commands with command with no help text |
|
700 | Test list of commands with command with no help text | |
701 |
|
701 | |||
702 | $ hg help helpext |
|
702 | $ hg help helpext | |
703 | helpext extension - no help text available |
|
703 | helpext extension - no help text available | |
704 |
|
704 | |||
705 | list of commands: |
|
705 | list of commands: | |
706 |
|
706 | |||
707 | nohelp (no help text available) |
|
707 | nohelp (no help text available) | |
708 |
|
708 | |||
709 | use "hg -v help helpext" to show builtin aliases and global options |
|
709 | use "hg -v help helpext" to show builtin aliases and global options | |
710 |
|
710 | |||
711 | Test a help topic |
|
711 | Test a help topic | |
712 |
|
712 | |||
713 | $ hg help revs |
|
713 | $ hg help revs | |
714 | Specifying Single Revisions |
|
714 | Specifying Single Revisions | |
715 |
|
715 | |||
716 | Mercurial supports several ways to specify individual revisions. |
|
716 | Mercurial supports several ways to specify individual revisions. | |
717 |
|
717 | |||
718 | A plain integer is treated as a revision number. Negative integers are |
|
718 | A plain integer is treated as a revision number. Negative integers are | |
719 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 |
|
719 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 | |
720 | denoting the revision prior to the tip, and so forth. |
|
720 | denoting the revision prior to the tip, and so forth. | |
721 |
|
721 | |||
722 | A 40-digit hexadecimal string is treated as a unique revision identifier. |
|
722 | A 40-digit hexadecimal string is treated as a unique revision identifier. | |
723 |
|
723 | |||
724 | A hexadecimal string less than 40 characters long is treated as a unique |
|
724 | A hexadecimal string less than 40 characters long is treated as a unique | |
725 | revision identifier and is referred to as a short-form identifier. A |
|
725 | revision identifier and is referred to as a short-form identifier. A | |
726 | short-form identifier is only valid if it is the prefix of exactly one |
|
726 | short-form identifier is only valid if it is the prefix of exactly one | |
727 | full-length identifier. |
|
727 | full-length identifier. | |
728 |
|
728 | |||
729 | Any other string is treated as a bookmark, tag, or branch name. A bookmark |
|
729 | Any other string is treated as a bookmark, tag, or branch name. A bookmark | |
730 | is a movable pointer to a revision. A tag is a permanent name associated |
|
730 | is a movable pointer to a revision. A tag is a permanent name associated | |
731 | with a revision. A branch name denotes the tipmost revision of that |
|
731 | with a revision. A branch name denotes the tipmost revision of that | |
732 | branch. Bookmark, tag, and branch names must not contain the ":" |
|
732 | branch. Bookmark, tag, and branch names must not contain the ":" | |
733 | character. |
|
733 | character. | |
734 |
|
734 | |||
735 | The reserved name "tip" always identifies the most recent revision. |
|
735 | The reserved name "tip" always identifies the most recent revision. | |
736 |
|
736 | |||
737 | The reserved name "null" indicates the null revision. This is the revision |
|
737 | The reserved name "null" indicates the null revision. This is the revision | |
738 | of an empty repository, and the parent of revision 0. |
|
738 | of an empty repository, and the parent of revision 0. | |
739 |
|
739 | |||
740 | The reserved name "." indicates the working directory parent. If no |
|
740 | The reserved name "." indicates the working directory parent. If no | |
741 | working directory is checked out, it is equivalent to null. If an |
|
741 | working directory is checked out, it is equivalent to null. If an | |
742 | uncommitted merge is in progress, "." is the revision of the first parent. |
|
742 | uncommitted merge is in progress, "." is the revision of the first parent. | |
743 |
|
743 | |||
744 | Test templating help |
|
744 | Test templating help | |
745 |
|
745 | |||
746 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
746 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
747 | desc String. The text of the changeset description. |
|
747 | desc String. The text of the changeset description. | |
748 | diffstat String. Statistics of changes with the following format: |
|
748 | diffstat String. Statistics of changes with the following format: | |
749 | firstline Any text. Returns the first line of text. |
|
749 | firstline Any text. Returns the first line of text. | |
750 | nonempty Any text. Returns '(none)' if the string is empty. |
|
750 | nonempty Any text. Returns '(none)' if the string is empty. | |
751 |
|
751 | |||
752 | Test help hooks |
|
752 | Test help hooks | |
753 |
|
753 | |||
754 | $ cat > helphook1.py <<EOF |
|
754 | $ cat > helphook1.py <<EOF | |
755 | > from mercurial import help |
|
755 | > from mercurial import help | |
756 | > |
|
756 | > | |
757 | > def rewrite(topic, doc): |
|
757 | > def rewrite(topic, doc): | |
758 | > return doc + '\nhelphook1\n' |
|
758 | > return doc + '\nhelphook1\n' | |
759 | > |
|
759 | > | |
760 | > def extsetup(ui): |
|
760 | > def extsetup(ui): | |
761 | > help.addtopichook('revsets', rewrite) |
|
761 | > help.addtopichook('revsets', rewrite) | |
762 | > EOF |
|
762 | > EOF | |
763 | $ cat > helphook2.py <<EOF |
|
763 | $ cat > helphook2.py <<EOF | |
764 | > from mercurial import help |
|
764 | > from mercurial import help | |
765 | > |
|
765 | > | |
766 | > def rewrite(topic, doc): |
|
766 | > def rewrite(topic, doc): | |
767 | > return doc + '\nhelphook2\n' |
|
767 | > return doc + '\nhelphook2\n' | |
768 | > |
|
768 | > | |
769 | > def extsetup(ui): |
|
769 | > def extsetup(ui): | |
770 | > help.addtopichook('revsets', rewrite) |
|
770 | > help.addtopichook('revsets', rewrite) | |
771 | > EOF |
|
771 | > EOF | |
772 | $ echo '[extensions]' >> $HGRCPATH |
|
772 | $ echo '[extensions]' >> $HGRCPATH | |
773 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
773 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
774 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
774 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
775 | $ hg help revsets | grep helphook |
|
775 | $ hg help revsets | grep helphook | |
776 | helphook1 |
|
776 | helphook1 | |
777 | helphook2 |
|
777 | helphook2 | |
|
778 | ||||
|
779 | Test keyword search help | |||
|
780 | ||||
|
781 | $ hg help -k clone | |||
|
782 | Topics: | |||
|
783 | ||||
|
784 | config Configuration Files | |||
|
785 | extensions Using Additional Features | |||
|
786 | glossary Glossary | |||
|
787 | phases Working with Phases | |||
|
788 | subrepo Subrepositories | |||
|
789 | urls URL Paths | |||
|
790 | ||||
|
791 | Commands: | |||
|
792 | ||||
|
793 | update update working directory (or switch revisions) | |||
|
794 | paths show aliases for remote repositories | |||
|
795 | clone make a copy of an existing repository | |||
|
796 | ||||
|
797 | Extensions: | |||
|
798 | ||||
|
799 | relink recreates hardlinks between repository clones | |||
|
800 | ||||
|
801 | Extension Commands: | |||
|
802 | ||||
|
803 | qclone clone main and patch repository at same time | |||
|
804 |
General Comments 0
You need to be logged in to leave comments.
Login now