Show More
@@ -0,0 +1,115 b'' | |||||
|
1 | Bid merge is a feature introduced in Mercurial 3.0, a merge algorithm for | |||
|
2 | dealing with complicated merges. | |||
|
3 | ||||
|
4 | Bid merge is controled by the `merge.preferancestor` configuration option. The | |||
|
5 | default is set to `merge.preferancetors=*` and enable bid merge. Mercurial will | |||
|
6 | perform a bid merge in the cases where a merge otherwise would emit a note: | |||
|
7 | using X as ancestor of X and X message. | |||
|
8 | ||||
|
9 | Problem it is solving | |||
|
10 | ===================== | |||
|
11 | ||||
|
12 | Mercurial's core merge algorithm is the traditional "three-way merge". This | |||
|
13 | algorithm combines all the changes in two changesets relative to a common | |||
|
14 | ancestor. But with complex DAGs, it is often possible to have more than one | |||
|
15 | "best" common ancestor, with no easy way to distinguish between them. | |||
|
16 | ||||
|
17 | For example, C and D has 2 common ancestors in the following graph:: | |||
|
18 | ||||
|
19 | C D | |||
|
20 | |\ /| | |||
|
21 | | x | | |||
|
22 | |/ \| | |||
|
23 | A B | |||
|
24 | \ / | |||
|
25 | R | |||
|
26 | ||||
|
27 | Mercurial used to arbitrarily chooses the first of these, which can result in | |||
|
28 | various issues: | |||
|
29 | ||||
|
30 | * unexpected hard 3-way merges that would have been completely trivial if | |||
|
31 | another ancestor had been used | |||
|
32 | ||||
|
33 | * conflicts that have already been resolved may reappear | |||
|
34 | ||||
|
35 | * changes that have been reversed can silently oscillate | |||
|
36 | ||||
|
37 | One common problem is a merge which with the "right" ancestor would be trivial | |||
|
38 | to resolve because only one side changed. Using another ancestor where the same | |||
|
39 | lines are different, it will give an annoying 3-way merge. | |||
|
40 | ||||
|
41 | Other systems like Git have attacked some of these problems with a so-called | |||
|
42 | "recursive" merge strategy, that internally merges all the possible ancestors | |||
|
43 | to produce a single "virtual" ancestor to merge against. This is awkward as the | |||
|
44 | internal merge itself may involve conflicts (and possibly even multiple levels | |||
|
45 | of recursion), which either requires choosing a conflict disposition (e.g. | |||
|
46 | always choose the local version) or exposing the user to extremely confusing | |||
|
47 | merge prompts for old revisions. Generating the virtual merge also potentially | |||
|
48 | involves invoking filters and extensions. | |||
|
49 | ||||
|
50 | Concept | |||
|
51 | ======= | |||
|
52 | ||||
|
53 | (Bid merge is pretty much the same as Consensus merge.) | |||
|
54 | ||||
|
55 | Bid merge is a strategy that attempts to sensibly combine the results of the | |||
|
56 | multiple possible three-way merges directly without producing a virtual | |||
|
57 | ancestor. The basic idea is that for each ancestor, we perform a top-level | |||
|
58 | manifest merge and generate a list of proposed actions, which we consider | |||
|
59 | "bids". We then make an "auction" among all the bids for each file and pick the | |||
|
60 | most favourable. Some files might be trivial to merge with one ancestor, other | |||
|
61 | files with another ancestor. | |||
|
62 | ||||
|
63 | The most obvious advantage of considering multiple ancestors is the case where | |||
|
64 | some of the bids for a file is a "real" (interactive) merge but where one or | |||
|
65 | more bids just take on of the parent revisions. A bid for just taking an | |||
|
66 | existing revision is very simple and low risk and is an obvious winner. | |||
|
67 | ||||
|
68 | The auction algorithm for merging the bids is so far very simple: | |||
|
69 | ||||
|
70 | * If there is consensus from all the ancestors, there is no doubt what to do. A | |||
|
71 | clever result will be indistinguishable from just picking a random bid. The | |||
|
72 | consensus case is thus not only trivial, it is also already handled | |||
|
73 | perfectly. | |||
|
74 | ||||
|
75 | * If "keep local" or "get from other" actions is an option (and there is only | |||
|
76 | one such option), just do it. | |||
|
77 | ||||
|
78 | * If the auction doesn't have a single clear winner, pick one of the bids | |||
|
79 | "randomly" - just as it would have done if only one ancestor was considered. | |||
|
80 | ||||
|
81 | This meta merge algorithm has room for future improvements, especially for | |||
|
82 | doing better than picking a random bid. | |||
|
83 | ||||
|
84 | Some observations | |||
|
85 | ================= | |||
|
86 | ||||
|
87 | Experience with bid merge shows that many merges that actually have a very | |||
|
88 | simple solution (because only one side changed) only can be solved efficiently | |||
|
89 | when we start looking at file content in filemerge ... and it thus also | |||
|
90 | requires all ancestors passed to filemerge. That is because Mercurial includes | |||
|
91 | the history in filelog hashes. A file with changes that ends up not changing | |||
|
92 | the content (could be change + backout or graft + merge or criss cross merges) | |||
|
93 | still shows up as a changed file to manifestmerge. (The git data model has an | |||
|
94 | advantage here when it uses hashes of content without history.) One way to | |||
|
95 | handle that would be to refactor manifestmerge, mergestate/resolve and | |||
|
96 | filemerge so they become more of the same thing. | |||
|
97 | ||||
|
98 | There is also cases where different conflicting chunks could benefit from using | |||
|
99 | multiple ancestors in filemerge - but that will require merge tools with fancy | |||
|
100 | support for using multiple ancestors in 3+-way merge. That is left as an | |||
|
101 | exercise for another day. That seems to be a case where "recursive merge" has | |||
|
102 | an advantage. | |||
|
103 | ||||
|
104 | The current manifest merge actions are very low level imperative and not | |||
|
105 | symmetrical. They do not only describe how two manifests should be merged, they | |||
|
106 | also describe a strategy for changing a context from a state where it is one of | |||
|
107 | the parents to the state where it is the result of the merge with the other | |||
|
108 | parent. I can imagine that manifestmerge could be simplified (and made more | |||
|
109 | suitable for in memory merges) by separating the abstract merge actions from | |||
|
110 | the actual file system operation actions. A more clever wcontext could perhaps | |||
|
111 | also take care of some of the branchmerge special cases. | |||
|
112 | ||||
|
113 | We assume that the definition of Mercurial manifest merge will make sure that | |||
|
114 | exactly the same files will be produced, no matter which ancestor is used. That | |||
|
115 | assumption might be wrong in very rare cases that really not is a problem. |
@@ -1,1143 +1,1148 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 __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import itertools |
|
10 | import itertools | |
11 | import re |
|
11 | import re | |
12 | import textwrap |
|
12 | import textwrap | |
13 |
|
13 | |||
14 | from .i18n import ( |
|
14 | from .i18n import ( | |
15 | _, |
|
15 | _, | |
16 | gettext, |
|
16 | gettext, | |
17 | ) |
|
17 | ) | |
18 | from .pycompat import getattr |
|
18 | from .pycompat import getattr | |
19 | from . import ( |
|
19 | from . import ( | |
20 | cmdutil, |
|
20 | cmdutil, | |
21 | encoding, |
|
21 | encoding, | |
22 | error, |
|
22 | error, | |
23 | extensions, |
|
23 | extensions, | |
24 | fancyopts, |
|
24 | fancyopts, | |
25 | filemerge, |
|
25 | filemerge, | |
26 | fileset, |
|
26 | fileset, | |
27 | minirst, |
|
27 | minirst, | |
28 | pycompat, |
|
28 | pycompat, | |
29 | registrar, |
|
29 | registrar, | |
30 | revset, |
|
30 | revset, | |
31 | templatefilters, |
|
31 | templatefilters, | |
32 | templatefuncs, |
|
32 | templatefuncs, | |
33 | templatekw, |
|
33 | templatekw, | |
34 | ui as uimod, |
|
34 | ui as uimod, | |
35 | util, |
|
35 | util, | |
36 | ) |
|
36 | ) | |
37 | from .hgweb import webcommands |
|
37 | from .hgweb import webcommands | |
38 | from .utils import ( |
|
38 | from .utils import ( | |
39 | compression, |
|
39 | compression, | |
40 | resourceutil, |
|
40 | resourceutil, | |
41 | ) |
|
41 | ) | |
42 |
|
42 | |||
43 | _exclkeywords = { |
|
43 | _exclkeywords = { | |
44 | b"(ADVANCED)", |
|
44 | b"(ADVANCED)", | |
45 | b"(DEPRECATED)", |
|
45 | b"(DEPRECATED)", | |
46 | b"(EXPERIMENTAL)", |
|
46 | b"(EXPERIMENTAL)", | |
47 | # i18n: "(ADVANCED)" is a keyword, must be translated consistently |
|
47 | # i18n: "(ADVANCED)" is a keyword, must be translated consistently | |
48 | _(b"(ADVANCED)"), |
|
48 | _(b"(ADVANCED)"), | |
49 | # i18n: "(DEPRECATED)" is a keyword, must be translated consistently |
|
49 | # i18n: "(DEPRECATED)" is a keyword, must be translated consistently | |
50 | _(b"(DEPRECATED)"), |
|
50 | _(b"(DEPRECATED)"), | |
51 | # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently |
|
51 | # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently | |
52 | _(b"(EXPERIMENTAL)"), |
|
52 | _(b"(EXPERIMENTAL)"), | |
53 | } |
|
53 | } | |
54 |
|
54 | |||
55 | # The order in which command categories will be displayed. |
|
55 | # The order in which command categories will be displayed. | |
56 | # Extensions with custom categories should insert them into this list |
|
56 | # Extensions with custom categories should insert them into this list | |
57 | # after/before the appropriate item, rather than replacing the list or |
|
57 | # after/before the appropriate item, rather than replacing the list or | |
58 | # assuming absolute positions. |
|
58 | # assuming absolute positions. | |
59 | CATEGORY_ORDER = [ |
|
59 | CATEGORY_ORDER = [ | |
60 | registrar.command.CATEGORY_REPO_CREATION, |
|
60 | registrar.command.CATEGORY_REPO_CREATION, | |
61 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT, |
|
61 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT, | |
62 | registrar.command.CATEGORY_COMMITTING, |
|
62 | registrar.command.CATEGORY_COMMITTING, | |
63 | registrar.command.CATEGORY_CHANGE_MANAGEMENT, |
|
63 | registrar.command.CATEGORY_CHANGE_MANAGEMENT, | |
64 | registrar.command.CATEGORY_CHANGE_ORGANIZATION, |
|
64 | registrar.command.CATEGORY_CHANGE_ORGANIZATION, | |
65 | registrar.command.CATEGORY_FILE_CONTENTS, |
|
65 | registrar.command.CATEGORY_FILE_CONTENTS, | |
66 | registrar.command.CATEGORY_CHANGE_NAVIGATION, |
|
66 | registrar.command.CATEGORY_CHANGE_NAVIGATION, | |
67 | registrar.command.CATEGORY_WORKING_DIRECTORY, |
|
67 | registrar.command.CATEGORY_WORKING_DIRECTORY, | |
68 | registrar.command.CATEGORY_IMPORT_EXPORT, |
|
68 | registrar.command.CATEGORY_IMPORT_EXPORT, | |
69 | registrar.command.CATEGORY_MAINTENANCE, |
|
69 | registrar.command.CATEGORY_MAINTENANCE, | |
70 | registrar.command.CATEGORY_HELP, |
|
70 | registrar.command.CATEGORY_HELP, | |
71 | registrar.command.CATEGORY_MISC, |
|
71 | registrar.command.CATEGORY_MISC, | |
72 | registrar.command.CATEGORY_NONE, |
|
72 | registrar.command.CATEGORY_NONE, | |
73 | ] |
|
73 | ] | |
74 |
|
74 | |||
75 | # Human-readable category names. These are translated. |
|
75 | # Human-readable category names. These are translated. | |
76 | # Extensions with custom categories should add their names here. |
|
76 | # Extensions with custom categories should add their names here. | |
77 | CATEGORY_NAMES = { |
|
77 | CATEGORY_NAMES = { | |
78 | registrar.command.CATEGORY_REPO_CREATION: b'Repository creation', |
|
78 | registrar.command.CATEGORY_REPO_CREATION: b'Repository creation', | |
79 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: b'Remote repository management', |
|
79 | registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: b'Remote repository management', | |
80 | registrar.command.CATEGORY_COMMITTING: b'Change creation', |
|
80 | registrar.command.CATEGORY_COMMITTING: b'Change creation', | |
81 | registrar.command.CATEGORY_CHANGE_NAVIGATION: b'Change navigation', |
|
81 | registrar.command.CATEGORY_CHANGE_NAVIGATION: b'Change navigation', | |
82 | registrar.command.CATEGORY_CHANGE_MANAGEMENT: b'Change manipulation', |
|
82 | registrar.command.CATEGORY_CHANGE_MANAGEMENT: b'Change manipulation', | |
83 | registrar.command.CATEGORY_CHANGE_ORGANIZATION: b'Change organization', |
|
83 | registrar.command.CATEGORY_CHANGE_ORGANIZATION: b'Change organization', | |
84 | registrar.command.CATEGORY_WORKING_DIRECTORY: b'Working directory management', |
|
84 | registrar.command.CATEGORY_WORKING_DIRECTORY: b'Working directory management', | |
85 | registrar.command.CATEGORY_FILE_CONTENTS: b'File content management', |
|
85 | registrar.command.CATEGORY_FILE_CONTENTS: b'File content management', | |
86 | registrar.command.CATEGORY_IMPORT_EXPORT: b'Change import/export', |
|
86 | registrar.command.CATEGORY_IMPORT_EXPORT: b'Change import/export', | |
87 | registrar.command.CATEGORY_MAINTENANCE: b'Repository maintenance', |
|
87 | registrar.command.CATEGORY_MAINTENANCE: b'Repository maintenance', | |
88 | registrar.command.CATEGORY_HELP: b'Help', |
|
88 | registrar.command.CATEGORY_HELP: b'Help', | |
89 | registrar.command.CATEGORY_MISC: b'Miscellaneous commands', |
|
89 | registrar.command.CATEGORY_MISC: b'Miscellaneous commands', | |
90 | registrar.command.CATEGORY_NONE: b'Uncategorized commands', |
|
90 | registrar.command.CATEGORY_NONE: b'Uncategorized commands', | |
91 | } |
|
91 | } | |
92 |
|
92 | |||
93 | # Topic categories. |
|
93 | # Topic categories. | |
94 | TOPIC_CATEGORY_IDS = b'ids' |
|
94 | TOPIC_CATEGORY_IDS = b'ids' | |
95 | TOPIC_CATEGORY_OUTPUT = b'output' |
|
95 | TOPIC_CATEGORY_OUTPUT = b'output' | |
96 | TOPIC_CATEGORY_CONFIG = b'config' |
|
96 | TOPIC_CATEGORY_CONFIG = b'config' | |
97 | TOPIC_CATEGORY_CONCEPTS = b'concepts' |
|
97 | TOPIC_CATEGORY_CONCEPTS = b'concepts' | |
98 | TOPIC_CATEGORY_MISC = b'misc' |
|
98 | TOPIC_CATEGORY_MISC = b'misc' | |
99 | TOPIC_CATEGORY_NONE = b'none' |
|
99 | TOPIC_CATEGORY_NONE = b'none' | |
100 |
|
100 | |||
101 | # The order in which topic categories will be displayed. |
|
101 | # The order in which topic categories will be displayed. | |
102 | # Extensions with custom categories should insert them into this list |
|
102 | # Extensions with custom categories should insert them into this list | |
103 | # after/before the appropriate item, rather than replacing the list or |
|
103 | # after/before the appropriate item, rather than replacing the list or | |
104 | # assuming absolute positions. |
|
104 | # assuming absolute positions. | |
105 | TOPIC_CATEGORY_ORDER = [ |
|
105 | TOPIC_CATEGORY_ORDER = [ | |
106 | TOPIC_CATEGORY_IDS, |
|
106 | TOPIC_CATEGORY_IDS, | |
107 | TOPIC_CATEGORY_OUTPUT, |
|
107 | TOPIC_CATEGORY_OUTPUT, | |
108 | TOPIC_CATEGORY_CONFIG, |
|
108 | TOPIC_CATEGORY_CONFIG, | |
109 | TOPIC_CATEGORY_CONCEPTS, |
|
109 | TOPIC_CATEGORY_CONCEPTS, | |
110 | TOPIC_CATEGORY_MISC, |
|
110 | TOPIC_CATEGORY_MISC, | |
111 | TOPIC_CATEGORY_NONE, |
|
111 | TOPIC_CATEGORY_NONE, | |
112 | ] |
|
112 | ] | |
113 |
|
113 | |||
114 | # Human-readable topic category names. These are translated. |
|
114 | # Human-readable topic category names. These are translated. | |
115 | TOPIC_CATEGORY_NAMES = { |
|
115 | TOPIC_CATEGORY_NAMES = { | |
116 | TOPIC_CATEGORY_IDS: b'Mercurial identifiers', |
|
116 | TOPIC_CATEGORY_IDS: b'Mercurial identifiers', | |
117 | TOPIC_CATEGORY_OUTPUT: b'Mercurial output', |
|
117 | TOPIC_CATEGORY_OUTPUT: b'Mercurial output', | |
118 | TOPIC_CATEGORY_CONFIG: b'Mercurial configuration', |
|
118 | TOPIC_CATEGORY_CONFIG: b'Mercurial configuration', | |
119 | TOPIC_CATEGORY_CONCEPTS: b'Concepts', |
|
119 | TOPIC_CATEGORY_CONCEPTS: b'Concepts', | |
120 | TOPIC_CATEGORY_MISC: b'Miscellaneous', |
|
120 | TOPIC_CATEGORY_MISC: b'Miscellaneous', | |
121 | TOPIC_CATEGORY_NONE: b'Uncategorized topics', |
|
121 | TOPIC_CATEGORY_NONE: b'Uncategorized topics', | |
122 | } |
|
122 | } | |
123 |
|
123 | |||
124 |
|
124 | |||
125 | def listexts(header, exts, indent=1, showdeprecated=False): |
|
125 | def listexts(header, exts, indent=1, showdeprecated=False): | |
126 | '''return a text listing of the given extensions''' |
|
126 | '''return a text listing of the given extensions''' | |
127 | rst = [] |
|
127 | rst = [] | |
128 | if exts: |
|
128 | if exts: | |
129 | for name, desc in sorted(pycompat.iteritems(exts)): |
|
129 | for name, desc in sorted(pycompat.iteritems(exts)): | |
130 | if not showdeprecated and any(w in desc for w in _exclkeywords): |
|
130 | if not showdeprecated and any(w in desc for w in _exclkeywords): | |
131 | continue |
|
131 | continue | |
132 | rst.append(b'%s:%s: %s\n' % (b' ' * indent, name, desc)) |
|
132 | rst.append(b'%s:%s: %s\n' % (b' ' * indent, name, desc)) | |
133 | if rst: |
|
133 | if rst: | |
134 | rst.insert(0, b'\n%s\n\n' % header) |
|
134 | rst.insert(0, b'\n%s\n\n' % header) | |
135 | return rst |
|
135 | return rst | |
136 |
|
136 | |||
137 |
|
137 | |||
138 | def extshelp(ui): |
|
138 | def extshelp(ui): | |
139 | rst = loaddoc(b'extensions')(ui).splitlines(True) |
|
139 | rst = loaddoc(b'extensions')(ui).splitlines(True) | |
140 | rst.extend( |
|
140 | rst.extend( | |
141 | listexts( |
|
141 | listexts( | |
142 | _(b'enabled extensions:'), extensions.enabled(), showdeprecated=True |
|
142 | _(b'enabled extensions:'), extensions.enabled(), showdeprecated=True | |
143 | ) |
|
143 | ) | |
144 | ) |
|
144 | ) | |
145 | rst.extend( |
|
145 | rst.extend( | |
146 | listexts( |
|
146 | listexts( | |
147 | _(b'disabled extensions:'), |
|
147 | _(b'disabled extensions:'), | |
148 | extensions.disabled(), |
|
148 | extensions.disabled(), | |
149 | showdeprecated=ui.verbose, |
|
149 | showdeprecated=ui.verbose, | |
150 | ) |
|
150 | ) | |
151 | ) |
|
151 | ) | |
152 | doc = b''.join(rst) |
|
152 | doc = b''.join(rst) | |
153 | return doc |
|
153 | return doc | |
154 |
|
154 | |||
155 |
|
155 | |||
156 | def parsedefaultmarker(text): |
|
156 | def parsedefaultmarker(text): | |
157 | """given a text 'abc (DEFAULT: def.ghi)', |
|
157 | """given a text 'abc (DEFAULT: def.ghi)', | |
158 | returns (b'abc', (b'def', b'ghi')). Otherwise return None""" |
|
158 | returns (b'abc', (b'def', b'ghi')). Otherwise return None""" | |
159 | if text[-1:] == b')': |
|
159 | if text[-1:] == b')': | |
160 | marker = b' (DEFAULT: ' |
|
160 | marker = b' (DEFAULT: ' | |
161 | pos = text.find(marker) |
|
161 | pos = text.find(marker) | |
162 | if pos >= 0: |
|
162 | if pos >= 0: | |
163 | item = text[pos + len(marker) : -1] |
|
163 | item = text[pos + len(marker) : -1] | |
164 | return text[:pos], item.split(b'.', 2) |
|
164 | return text[:pos], item.split(b'.', 2) | |
165 |
|
165 | |||
166 |
|
166 | |||
167 | def optrst(header, options, verbose, ui): |
|
167 | def optrst(header, options, verbose, ui): | |
168 | data = [] |
|
168 | data = [] | |
169 | multioccur = False |
|
169 | multioccur = False | |
170 | for option in options: |
|
170 | for option in options: | |
171 | if len(option) == 5: |
|
171 | if len(option) == 5: | |
172 | shortopt, longopt, default, desc, optlabel = option |
|
172 | shortopt, longopt, default, desc, optlabel = option | |
173 | else: |
|
173 | else: | |
174 | shortopt, longopt, default, desc = option |
|
174 | shortopt, longopt, default, desc = option | |
175 | optlabel = _(b"VALUE") # default label |
|
175 | optlabel = _(b"VALUE") # default label | |
176 |
|
176 | |||
177 | if not verbose and any(w in desc for w in _exclkeywords): |
|
177 | if not verbose and any(w in desc for w in _exclkeywords): | |
178 | continue |
|
178 | continue | |
179 | defaultstrsuffix = b'' |
|
179 | defaultstrsuffix = b'' | |
180 | if default is None: |
|
180 | if default is None: | |
181 | parseresult = parsedefaultmarker(desc) |
|
181 | parseresult = parsedefaultmarker(desc) | |
182 | if parseresult is not None: |
|
182 | if parseresult is not None: | |
183 | (desc, (section, name)) = parseresult |
|
183 | (desc, (section, name)) = parseresult | |
184 | if ui.configbool(section, name): |
|
184 | if ui.configbool(section, name): | |
185 | default = True |
|
185 | default = True | |
186 | defaultstrsuffix = _(b' from config') |
|
186 | defaultstrsuffix = _(b' from config') | |
187 | so = b'' |
|
187 | so = b'' | |
188 | if shortopt: |
|
188 | if shortopt: | |
189 | so = b'-' + shortopt |
|
189 | so = b'-' + shortopt | |
190 | lo = b'--' + longopt |
|
190 | lo = b'--' + longopt | |
191 | if default is True: |
|
191 | if default is True: | |
192 | lo = b'--[no-]' + longopt |
|
192 | lo = b'--[no-]' + longopt | |
193 |
|
193 | |||
194 | if isinstance(default, fancyopts.customopt): |
|
194 | if isinstance(default, fancyopts.customopt): | |
195 | default = default.getdefaultvalue() |
|
195 | default = default.getdefaultvalue() | |
196 | if default and not callable(default): |
|
196 | if default and not callable(default): | |
197 | # default is of unknown type, and in Python 2 we abused |
|
197 | # default is of unknown type, and in Python 2 we abused | |
198 | # the %s-shows-repr property to handle integers etc. To |
|
198 | # the %s-shows-repr property to handle integers etc. To | |
199 | # match that behavior on Python 3, we do str(default) and |
|
199 | # match that behavior on Python 3, we do str(default) and | |
200 | # then convert it to bytes. |
|
200 | # then convert it to bytes. | |
201 | defaultstr = pycompat.bytestr(default) |
|
201 | defaultstr = pycompat.bytestr(default) | |
202 | if default is True: |
|
202 | if default is True: | |
203 | defaultstr = _(b"on") |
|
203 | defaultstr = _(b"on") | |
204 | desc += _(b" (default: %s)") % (defaultstr + defaultstrsuffix) |
|
204 | desc += _(b" (default: %s)") % (defaultstr + defaultstrsuffix) | |
205 |
|
205 | |||
206 | if isinstance(default, list): |
|
206 | if isinstance(default, list): | |
207 | lo += b" %s [+]" % optlabel |
|
207 | lo += b" %s [+]" % optlabel | |
208 | multioccur = True |
|
208 | multioccur = True | |
209 | elif (default is not None) and not isinstance(default, bool): |
|
209 | elif (default is not None) and not isinstance(default, bool): | |
210 | lo += b" %s" % optlabel |
|
210 | lo += b" %s" % optlabel | |
211 |
|
211 | |||
212 | data.append((so, lo, desc)) |
|
212 | data.append((so, lo, desc)) | |
213 |
|
213 | |||
214 | if multioccur: |
|
214 | if multioccur: | |
215 | header += _(b" ([+] can be repeated)") |
|
215 | header += _(b" ([+] can be repeated)") | |
216 |
|
216 | |||
217 | rst = [b'\n%s:\n\n' % header] |
|
217 | rst = [b'\n%s:\n\n' % header] | |
218 | rst.extend(minirst.maketable(data, 1)) |
|
218 | rst.extend(minirst.maketable(data, 1)) | |
219 |
|
219 | |||
220 | return b''.join(rst) |
|
220 | return b''.join(rst) | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | def indicateomitted(rst, omitted, notomitted=None): |
|
223 | def indicateomitted(rst, omitted, notomitted=None): | |
224 | rst.append(b'\n\n.. container:: omitted\n\n %s\n\n' % omitted) |
|
224 | rst.append(b'\n\n.. container:: omitted\n\n %s\n\n' % omitted) | |
225 | if notomitted: |
|
225 | if notomitted: | |
226 | rst.append(b'\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) |
|
226 | rst.append(b'\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) | |
227 |
|
227 | |||
228 |
|
228 | |||
229 | def filtercmd(ui, cmd, func, kw, doc): |
|
229 | def filtercmd(ui, cmd, func, kw, doc): | |
230 | if not ui.debugflag and cmd.startswith(b"debug") and kw != b"debug": |
|
230 | if not ui.debugflag and cmd.startswith(b"debug") and kw != b"debug": | |
231 | # Debug command, and user is not looking for those. |
|
231 | # Debug command, and user is not looking for those. | |
232 | return True |
|
232 | return True | |
233 | if not ui.verbose: |
|
233 | if not ui.verbose: | |
234 | if not kw and not doc: |
|
234 | if not kw and not doc: | |
235 | # Command had no documentation, no point in showing it by default. |
|
235 | # Command had no documentation, no point in showing it by default. | |
236 | return True |
|
236 | return True | |
237 | if getattr(func, 'alias', False) and not getattr(func, 'owndoc', False): |
|
237 | if getattr(func, 'alias', False) and not getattr(func, 'owndoc', False): | |
238 | # Alias didn't have its own documentation. |
|
238 | # Alias didn't have its own documentation. | |
239 | return True |
|
239 | return True | |
240 | if doc and any(w in doc for w in _exclkeywords): |
|
240 | if doc and any(w in doc for w in _exclkeywords): | |
241 | # Documentation has excluded keywords. |
|
241 | # Documentation has excluded keywords. | |
242 | return True |
|
242 | return True | |
243 | if kw == b"shortlist" and not getattr(func, 'helpbasic', False): |
|
243 | if kw == b"shortlist" and not getattr(func, 'helpbasic', False): | |
244 | # We're presenting the short list but the command is not basic. |
|
244 | # We're presenting the short list but the command is not basic. | |
245 | return True |
|
245 | return True | |
246 | if ui.configbool(b'help', b'hidden-command.%s' % cmd): |
|
246 | if ui.configbool(b'help', b'hidden-command.%s' % cmd): | |
247 | # Configuration explicitly hides the command. |
|
247 | # Configuration explicitly hides the command. | |
248 | return True |
|
248 | return True | |
249 | return False |
|
249 | return False | |
250 |
|
250 | |||
251 |
|
251 | |||
252 | def filtertopic(ui, topic): |
|
252 | def filtertopic(ui, topic): | |
253 | return ui.configbool(b'help', b'hidden-topic.%s' % topic, False) |
|
253 | return ui.configbool(b'help', b'hidden-topic.%s' % topic, False) | |
254 |
|
254 | |||
255 |
|
255 | |||
256 | def topicmatch(ui, commands, kw): |
|
256 | def topicmatch(ui, commands, kw): | |
257 | """Return help topics matching kw. |
|
257 | """Return help topics matching kw. | |
258 |
|
258 | |||
259 | Returns {'section': [(name, summary), ...], ...} where section is |
|
259 | Returns {'section': [(name, summary), ...], ...} where section is | |
260 | one of topics, commands, extensions, or extensioncommands. |
|
260 | one of topics, commands, extensions, or extensioncommands. | |
261 | """ |
|
261 | """ | |
262 | kw = encoding.lower(kw) |
|
262 | kw = encoding.lower(kw) | |
263 |
|
263 | |||
264 | def lowercontains(container): |
|
264 | def lowercontains(container): | |
265 | return kw in encoding.lower(container) # translated in helptable |
|
265 | return kw in encoding.lower(container) # translated in helptable | |
266 |
|
266 | |||
267 | results = { |
|
267 | results = { | |
268 | b'topics': [], |
|
268 | b'topics': [], | |
269 | b'commands': [], |
|
269 | b'commands': [], | |
270 | b'extensions': [], |
|
270 | b'extensions': [], | |
271 | b'extensioncommands': [], |
|
271 | b'extensioncommands': [], | |
272 | } |
|
272 | } | |
273 | for topic in helptable: |
|
273 | for topic in helptable: | |
274 | names, header, doc = topic[0:3] |
|
274 | names, header, doc = topic[0:3] | |
275 | # Old extensions may use a str as doc. |
|
275 | # Old extensions may use a str as doc. | |
276 | if ( |
|
276 | if ( | |
277 | sum(map(lowercontains, names)) |
|
277 | sum(map(lowercontains, names)) | |
278 | or lowercontains(header) |
|
278 | or lowercontains(header) | |
279 | or (callable(doc) and lowercontains(doc(ui))) |
|
279 | or (callable(doc) and lowercontains(doc(ui))) | |
280 | ): |
|
280 | ): | |
281 | name = names[0] |
|
281 | name = names[0] | |
282 | if not filtertopic(ui, name): |
|
282 | if not filtertopic(ui, name): | |
283 | results[b'topics'].append((names[0], header)) |
|
283 | results[b'topics'].append((names[0], header)) | |
284 | for cmd, entry in pycompat.iteritems(commands.table): |
|
284 | for cmd, entry in pycompat.iteritems(commands.table): | |
285 | if len(entry) == 3: |
|
285 | if len(entry) == 3: | |
286 | summary = entry[2] |
|
286 | summary = entry[2] | |
287 | else: |
|
287 | else: | |
288 | summary = b'' |
|
288 | summary = b'' | |
289 | # translate docs *before* searching there |
|
289 | # translate docs *before* searching there | |
290 | func = entry[0] |
|
290 | func = entry[0] | |
291 | docs = _(pycompat.getdoc(func)) or b'' |
|
291 | docs = _(pycompat.getdoc(func)) or b'' | |
292 | if kw in cmd or lowercontains(summary) or lowercontains(docs): |
|
292 | if kw in cmd or lowercontains(summary) or lowercontains(docs): | |
293 | doclines = docs.splitlines() |
|
293 | doclines = docs.splitlines() | |
294 | if doclines: |
|
294 | if doclines: | |
295 | summary = doclines[0] |
|
295 | summary = doclines[0] | |
296 | cmdname = cmdutil.parsealiases(cmd)[0] |
|
296 | cmdname = cmdutil.parsealiases(cmd)[0] | |
297 | if filtercmd(ui, cmdname, func, kw, docs): |
|
297 | if filtercmd(ui, cmdname, func, kw, docs): | |
298 | continue |
|
298 | continue | |
299 | results[b'commands'].append((cmdname, summary)) |
|
299 | results[b'commands'].append((cmdname, summary)) | |
300 | for name, docs in itertools.chain( |
|
300 | for name, docs in itertools.chain( | |
301 | pycompat.iteritems(extensions.enabled(False)), |
|
301 | pycompat.iteritems(extensions.enabled(False)), | |
302 | pycompat.iteritems(extensions.disabled()), |
|
302 | pycompat.iteritems(extensions.disabled()), | |
303 | ): |
|
303 | ): | |
304 | if not docs: |
|
304 | if not docs: | |
305 | continue |
|
305 | continue | |
306 | name = name.rpartition(b'.')[-1] |
|
306 | name = name.rpartition(b'.')[-1] | |
307 | if lowercontains(name) or lowercontains(docs): |
|
307 | if lowercontains(name) or lowercontains(docs): | |
308 | # extension docs are already translated |
|
308 | # extension docs are already translated | |
309 | results[b'extensions'].append((name, docs.splitlines()[0])) |
|
309 | results[b'extensions'].append((name, docs.splitlines()[0])) | |
310 | try: |
|
310 | try: | |
311 | mod = extensions.load(ui, name, b'') |
|
311 | mod = extensions.load(ui, name, b'') | |
312 | except ImportError: |
|
312 | except ImportError: | |
313 | # debug message would be printed in extensions.load() |
|
313 | # debug message would be printed in extensions.load() | |
314 | continue |
|
314 | continue | |
315 | for cmd, entry in pycompat.iteritems(getattr(mod, 'cmdtable', {})): |
|
315 | for cmd, entry in pycompat.iteritems(getattr(mod, 'cmdtable', {})): | |
316 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): |
|
316 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): | |
317 | cmdname = cmdutil.parsealiases(cmd)[0] |
|
317 | cmdname = cmdutil.parsealiases(cmd)[0] | |
318 | func = entry[0] |
|
318 | func = entry[0] | |
319 | cmddoc = pycompat.getdoc(func) |
|
319 | cmddoc = pycompat.getdoc(func) | |
320 | if cmddoc: |
|
320 | if cmddoc: | |
321 | cmddoc = gettext(cmddoc).splitlines()[0] |
|
321 | cmddoc = gettext(cmddoc).splitlines()[0] | |
322 | else: |
|
322 | else: | |
323 | cmddoc = _(b'(no help text available)') |
|
323 | cmddoc = _(b'(no help text available)') | |
324 | if filtercmd(ui, cmdname, func, kw, cmddoc): |
|
324 | if filtercmd(ui, cmdname, func, kw, cmddoc): | |
325 | continue |
|
325 | continue | |
326 | results[b'extensioncommands'].append((cmdname, cmddoc)) |
|
326 | results[b'extensioncommands'].append((cmdname, cmddoc)) | |
327 | return results |
|
327 | return results | |
328 |
|
328 | |||
329 |
|
329 | |||
330 | def loaddoc(topic, subdir=None): |
|
330 | def loaddoc(topic, subdir=None): | |
331 | """Return a delayed loader for help/topic.txt.""" |
|
331 | """Return a delayed loader for help/topic.txt.""" | |
332 |
|
332 | |||
333 | def loader(ui): |
|
333 | def loader(ui): | |
334 | package = b'mercurial.helptext' |
|
334 | package = b'mercurial.helptext' | |
335 | if subdir: |
|
335 | if subdir: | |
336 | package += b'.' + subdir |
|
336 | package += b'.' + subdir | |
337 | with resourceutil.open_resource(package, topic + b'.txt') as fp: |
|
337 | with resourceutil.open_resource(package, topic + b'.txt') as fp: | |
338 | doc = gettext(fp.read()) |
|
338 | doc = gettext(fp.read()) | |
339 | for rewriter in helphooks.get(topic, []): |
|
339 | for rewriter in helphooks.get(topic, []): | |
340 | doc = rewriter(ui, topic, doc) |
|
340 | doc = rewriter(ui, topic, doc) | |
341 | return doc |
|
341 | return doc | |
342 |
|
342 | |||
343 | return loader |
|
343 | return loader | |
344 |
|
344 | |||
345 |
|
345 | |||
346 | internalstable = sorted( |
|
346 | internalstable = sorted( | |
347 | [ |
|
347 | [ | |
|
348 | ( | |||
|
349 | [b'bid-merge'], | |||
|
350 | _(b'Bid Merge Algorithm'), | |||
|
351 | loaddoc(b'bid-merge', subdir=b'internals'), | |||
|
352 | ), | |||
348 | ([b'bundle2'], _(b'Bundle2'), loaddoc(b'bundle2', subdir=b'internals')), |
|
353 | ([b'bundle2'], _(b'Bundle2'), loaddoc(b'bundle2', subdir=b'internals')), | |
349 | ([b'bundles'], _(b'Bundles'), loaddoc(b'bundles', subdir=b'internals')), |
|
354 | ([b'bundles'], _(b'Bundles'), loaddoc(b'bundles', subdir=b'internals')), | |
350 | ([b'cbor'], _(b'CBOR'), loaddoc(b'cbor', subdir=b'internals')), |
|
355 | ([b'cbor'], _(b'CBOR'), loaddoc(b'cbor', subdir=b'internals')), | |
351 | ([b'censor'], _(b'Censor'), loaddoc(b'censor', subdir=b'internals')), |
|
356 | ([b'censor'], _(b'Censor'), loaddoc(b'censor', subdir=b'internals')), | |
352 | ( |
|
357 | ( | |
353 | [b'changegroups'], |
|
358 | [b'changegroups'], | |
354 | _(b'Changegroups'), |
|
359 | _(b'Changegroups'), | |
355 | loaddoc(b'changegroups', subdir=b'internals'), |
|
360 | loaddoc(b'changegroups', subdir=b'internals'), | |
356 | ), |
|
361 | ), | |
357 | ( |
|
362 | ( | |
358 | [b'config'], |
|
363 | [b'config'], | |
359 | _(b'Config Registrar'), |
|
364 | _(b'Config Registrar'), | |
360 | loaddoc(b'config', subdir=b'internals'), |
|
365 | loaddoc(b'config', subdir=b'internals'), | |
361 | ), |
|
366 | ), | |
362 | ( |
|
367 | ( | |
363 | [b'extensions', b'extension'], |
|
368 | [b'extensions', b'extension'], | |
364 | _(b'Extension API'), |
|
369 | _(b'Extension API'), | |
365 | loaddoc(b'extensions', subdir=b'internals'), |
|
370 | loaddoc(b'extensions', subdir=b'internals'), | |
366 | ), |
|
371 | ), | |
367 | ( |
|
372 | ( | |
368 | [b'mergestate'], |
|
373 | [b'mergestate'], | |
369 | _(b'Mergestate'), |
|
374 | _(b'Mergestate'), | |
370 | loaddoc(b'mergestate', subdir=b'internals'), |
|
375 | loaddoc(b'mergestate', subdir=b'internals'), | |
371 | ), |
|
376 | ), | |
372 | ( |
|
377 | ( | |
373 | [b'requirements'], |
|
378 | [b'requirements'], | |
374 | _(b'Repository Requirements'), |
|
379 | _(b'Repository Requirements'), | |
375 | loaddoc(b'requirements', subdir=b'internals'), |
|
380 | loaddoc(b'requirements', subdir=b'internals'), | |
376 | ), |
|
381 | ), | |
377 | ( |
|
382 | ( | |
378 | [b'revlogs'], |
|
383 | [b'revlogs'], | |
379 | _(b'Revision Logs'), |
|
384 | _(b'Revision Logs'), | |
380 | loaddoc(b'revlogs', subdir=b'internals'), |
|
385 | loaddoc(b'revlogs', subdir=b'internals'), | |
381 | ), |
|
386 | ), | |
382 | ( |
|
387 | ( | |
383 | [b'wireprotocol'], |
|
388 | [b'wireprotocol'], | |
384 | _(b'Wire Protocol'), |
|
389 | _(b'Wire Protocol'), | |
385 | loaddoc(b'wireprotocol', subdir=b'internals'), |
|
390 | loaddoc(b'wireprotocol', subdir=b'internals'), | |
386 | ), |
|
391 | ), | |
387 | ( |
|
392 | ( | |
388 | [b'wireprotocolrpc'], |
|
393 | [b'wireprotocolrpc'], | |
389 | _(b'Wire Protocol RPC'), |
|
394 | _(b'Wire Protocol RPC'), | |
390 | loaddoc(b'wireprotocolrpc', subdir=b'internals'), |
|
395 | loaddoc(b'wireprotocolrpc', subdir=b'internals'), | |
391 | ), |
|
396 | ), | |
392 | ( |
|
397 | ( | |
393 | [b'wireprotocolv2'], |
|
398 | [b'wireprotocolv2'], | |
394 | _(b'Wire Protocol Version 2'), |
|
399 | _(b'Wire Protocol Version 2'), | |
395 | loaddoc(b'wireprotocolv2', subdir=b'internals'), |
|
400 | loaddoc(b'wireprotocolv2', subdir=b'internals'), | |
396 | ), |
|
401 | ), | |
397 | ] |
|
402 | ] | |
398 | ) |
|
403 | ) | |
399 |
|
404 | |||
400 |
|
405 | |||
401 | def internalshelp(ui): |
|
406 | def internalshelp(ui): | |
402 | """Generate the index for the "internals" topic.""" |
|
407 | """Generate the index for the "internals" topic.""" | |
403 | lines = [ |
|
408 | lines = [ | |
404 | b'To access a subtopic, use "hg help internals.{subtopic-name}"\n', |
|
409 | b'To access a subtopic, use "hg help internals.{subtopic-name}"\n', | |
405 | b'\n', |
|
410 | b'\n', | |
406 | ] |
|
411 | ] | |
407 | for names, header, doc in internalstable: |
|
412 | for names, header, doc in internalstable: | |
408 | lines.append(b' :%s: %s\n' % (names[0], header)) |
|
413 | lines.append(b' :%s: %s\n' % (names[0], header)) | |
409 |
|
414 | |||
410 | return b''.join(lines) |
|
415 | return b''.join(lines) | |
411 |
|
416 | |||
412 |
|
417 | |||
413 | helptable = sorted( |
|
418 | helptable = sorted( | |
414 | [ |
|
419 | [ | |
415 | ( |
|
420 | ( | |
416 | [b'bundlespec'], |
|
421 | [b'bundlespec'], | |
417 | _(b"Bundle File Formats"), |
|
422 | _(b"Bundle File Formats"), | |
418 | loaddoc(b'bundlespec'), |
|
423 | loaddoc(b'bundlespec'), | |
419 | TOPIC_CATEGORY_CONCEPTS, |
|
424 | TOPIC_CATEGORY_CONCEPTS, | |
420 | ), |
|
425 | ), | |
421 | ( |
|
426 | ( | |
422 | [b'color'], |
|
427 | [b'color'], | |
423 | _(b"Colorizing Outputs"), |
|
428 | _(b"Colorizing Outputs"), | |
424 | loaddoc(b'color'), |
|
429 | loaddoc(b'color'), | |
425 | TOPIC_CATEGORY_OUTPUT, |
|
430 | TOPIC_CATEGORY_OUTPUT, | |
426 | ), |
|
431 | ), | |
427 | ( |
|
432 | ( | |
428 | [b"config", b"hgrc"], |
|
433 | [b"config", b"hgrc"], | |
429 | _(b"Configuration Files"), |
|
434 | _(b"Configuration Files"), | |
430 | loaddoc(b'config'), |
|
435 | loaddoc(b'config'), | |
431 | TOPIC_CATEGORY_CONFIG, |
|
436 | TOPIC_CATEGORY_CONFIG, | |
432 | ), |
|
437 | ), | |
433 | ( |
|
438 | ( | |
434 | [b'deprecated'], |
|
439 | [b'deprecated'], | |
435 | _(b"Deprecated Features"), |
|
440 | _(b"Deprecated Features"), | |
436 | loaddoc(b'deprecated'), |
|
441 | loaddoc(b'deprecated'), | |
437 | TOPIC_CATEGORY_MISC, |
|
442 | TOPIC_CATEGORY_MISC, | |
438 | ), |
|
443 | ), | |
439 | ( |
|
444 | ( | |
440 | [b"dates"], |
|
445 | [b"dates"], | |
441 | _(b"Date Formats"), |
|
446 | _(b"Date Formats"), | |
442 | loaddoc(b'dates'), |
|
447 | loaddoc(b'dates'), | |
443 | TOPIC_CATEGORY_OUTPUT, |
|
448 | TOPIC_CATEGORY_OUTPUT, | |
444 | ), |
|
449 | ), | |
445 | ( |
|
450 | ( | |
446 | [b"flags"], |
|
451 | [b"flags"], | |
447 | _(b"Command-line flags"), |
|
452 | _(b"Command-line flags"), | |
448 | loaddoc(b'flags'), |
|
453 | loaddoc(b'flags'), | |
449 | TOPIC_CATEGORY_CONFIG, |
|
454 | TOPIC_CATEGORY_CONFIG, | |
450 | ), |
|
455 | ), | |
451 | ( |
|
456 | ( | |
452 | [b"patterns"], |
|
457 | [b"patterns"], | |
453 | _(b"File Name Patterns"), |
|
458 | _(b"File Name Patterns"), | |
454 | loaddoc(b'patterns'), |
|
459 | loaddoc(b'patterns'), | |
455 | TOPIC_CATEGORY_IDS, |
|
460 | TOPIC_CATEGORY_IDS, | |
456 | ), |
|
461 | ), | |
457 | ( |
|
462 | ( | |
458 | [b'environment', b'env'], |
|
463 | [b'environment', b'env'], | |
459 | _(b'Environment Variables'), |
|
464 | _(b'Environment Variables'), | |
460 | loaddoc(b'environment'), |
|
465 | loaddoc(b'environment'), | |
461 | TOPIC_CATEGORY_CONFIG, |
|
466 | TOPIC_CATEGORY_CONFIG, | |
462 | ), |
|
467 | ), | |
463 | ( |
|
468 | ( | |
464 | [ |
|
469 | [ | |
465 | b'revisions', |
|
470 | b'revisions', | |
466 | b'revs', |
|
471 | b'revs', | |
467 | b'revsets', |
|
472 | b'revsets', | |
468 | b'revset', |
|
473 | b'revset', | |
469 | b'multirevs', |
|
474 | b'multirevs', | |
470 | b'mrevs', |
|
475 | b'mrevs', | |
471 | ], |
|
476 | ], | |
472 | _(b'Specifying Revisions'), |
|
477 | _(b'Specifying Revisions'), | |
473 | loaddoc(b'revisions'), |
|
478 | loaddoc(b'revisions'), | |
474 | TOPIC_CATEGORY_IDS, |
|
479 | TOPIC_CATEGORY_IDS, | |
475 | ), |
|
480 | ), | |
476 | ( |
|
481 | ( | |
477 | [b'filesets', b'fileset'], |
|
482 | [b'filesets', b'fileset'], | |
478 | _(b"Specifying File Sets"), |
|
483 | _(b"Specifying File Sets"), | |
479 | loaddoc(b'filesets'), |
|
484 | loaddoc(b'filesets'), | |
480 | TOPIC_CATEGORY_IDS, |
|
485 | TOPIC_CATEGORY_IDS, | |
481 | ), |
|
486 | ), | |
482 | ( |
|
487 | ( | |
483 | [b'diffs'], |
|
488 | [b'diffs'], | |
484 | _(b'Diff Formats'), |
|
489 | _(b'Diff Formats'), | |
485 | loaddoc(b'diffs'), |
|
490 | loaddoc(b'diffs'), | |
486 | TOPIC_CATEGORY_OUTPUT, |
|
491 | TOPIC_CATEGORY_OUTPUT, | |
487 | ), |
|
492 | ), | |
488 | ( |
|
493 | ( | |
489 | [b'merge-tools', b'mergetools', b'mergetool'], |
|
494 | [b'merge-tools', b'mergetools', b'mergetool'], | |
490 | _(b'Merge Tools'), |
|
495 | _(b'Merge Tools'), | |
491 | loaddoc(b'merge-tools'), |
|
496 | loaddoc(b'merge-tools'), | |
492 | TOPIC_CATEGORY_CONFIG, |
|
497 | TOPIC_CATEGORY_CONFIG, | |
493 | ), |
|
498 | ), | |
494 | ( |
|
499 | ( | |
495 | [b'templating', b'templates', b'template', b'style'], |
|
500 | [b'templating', b'templates', b'template', b'style'], | |
496 | _(b'Template Usage'), |
|
501 | _(b'Template Usage'), | |
497 | loaddoc(b'templates'), |
|
502 | loaddoc(b'templates'), | |
498 | TOPIC_CATEGORY_OUTPUT, |
|
503 | TOPIC_CATEGORY_OUTPUT, | |
499 | ), |
|
504 | ), | |
500 | ([b'urls'], _(b'URL Paths'), loaddoc(b'urls'), TOPIC_CATEGORY_IDS), |
|
505 | ([b'urls'], _(b'URL Paths'), loaddoc(b'urls'), TOPIC_CATEGORY_IDS), | |
501 | ( |
|
506 | ( | |
502 | [b"extensions"], |
|
507 | [b"extensions"], | |
503 | _(b"Using Additional Features"), |
|
508 | _(b"Using Additional Features"), | |
504 | extshelp, |
|
509 | extshelp, | |
505 | TOPIC_CATEGORY_CONFIG, |
|
510 | TOPIC_CATEGORY_CONFIG, | |
506 | ), |
|
511 | ), | |
507 | ( |
|
512 | ( | |
508 | [b"subrepos", b"subrepo"], |
|
513 | [b"subrepos", b"subrepo"], | |
509 | _(b"Subrepositories"), |
|
514 | _(b"Subrepositories"), | |
510 | loaddoc(b'subrepos'), |
|
515 | loaddoc(b'subrepos'), | |
511 | TOPIC_CATEGORY_CONCEPTS, |
|
516 | TOPIC_CATEGORY_CONCEPTS, | |
512 | ), |
|
517 | ), | |
513 | ( |
|
518 | ( | |
514 | [b"hgweb"], |
|
519 | [b"hgweb"], | |
515 | _(b"Configuring hgweb"), |
|
520 | _(b"Configuring hgweb"), | |
516 | loaddoc(b'hgweb'), |
|
521 | loaddoc(b'hgweb'), | |
517 | TOPIC_CATEGORY_CONFIG, |
|
522 | TOPIC_CATEGORY_CONFIG, | |
518 | ), |
|
523 | ), | |
519 | ( |
|
524 | ( | |
520 | [b"glossary"], |
|
525 | [b"glossary"], | |
521 | _(b"Glossary"), |
|
526 | _(b"Glossary"), | |
522 | loaddoc(b'glossary'), |
|
527 | loaddoc(b'glossary'), | |
523 | TOPIC_CATEGORY_CONCEPTS, |
|
528 | TOPIC_CATEGORY_CONCEPTS, | |
524 | ), |
|
529 | ), | |
525 | ( |
|
530 | ( | |
526 | [b"hgignore", b"ignore"], |
|
531 | [b"hgignore", b"ignore"], | |
527 | _(b"Syntax for Mercurial Ignore Files"), |
|
532 | _(b"Syntax for Mercurial Ignore Files"), | |
528 | loaddoc(b'hgignore'), |
|
533 | loaddoc(b'hgignore'), | |
529 | TOPIC_CATEGORY_IDS, |
|
534 | TOPIC_CATEGORY_IDS, | |
530 | ), |
|
535 | ), | |
531 | ( |
|
536 | ( | |
532 | [b"phases"], |
|
537 | [b"phases"], | |
533 | _(b"Working with Phases"), |
|
538 | _(b"Working with Phases"), | |
534 | loaddoc(b'phases'), |
|
539 | loaddoc(b'phases'), | |
535 | TOPIC_CATEGORY_CONCEPTS, |
|
540 | TOPIC_CATEGORY_CONCEPTS, | |
536 | ), |
|
541 | ), | |
537 | ( |
|
542 | ( | |
538 | [b'scripting'], |
|
543 | [b'scripting'], | |
539 | _(b'Using Mercurial from scripts and automation'), |
|
544 | _(b'Using Mercurial from scripts and automation'), | |
540 | loaddoc(b'scripting'), |
|
545 | loaddoc(b'scripting'), | |
541 | TOPIC_CATEGORY_MISC, |
|
546 | TOPIC_CATEGORY_MISC, | |
542 | ), |
|
547 | ), | |
543 | ( |
|
548 | ( | |
544 | [b'internals'], |
|
549 | [b'internals'], | |
545 | _(b"Technical implementation topics"), |
|
550 | _(b"Technical implementation topics"), | |
546 | internalshelp, |
|
551 | internalshelp, | |
547 | TOPIC_CATEGORY_MISC, |
|
552 | TOPIC_CATEGORY_MISC, | |
548 | ), |
|
553 | ), | |
549 | ( |
|
554 | ( | |
550 | [b'pager'], |
|
555 | [b'pager'], | |
551 | _(b"Pager Support"), |
|
556 | _(b"Pager Support"), | |
552 | loaddoc(b'pager'), |
|
557 | loaddoc(b'pager'), | |
553 | TOPIC_CATEGORY_CONFIG, |
|
558 | TOPIC_CATEGORY_CONFIG, | |
554 | ), |
|
559 | ), | |
555 | ] |
|
560 | ] | |
556 | ) |
|
561 | ) | |
557 |
|
562 | |||
558 | # Maps topics with sub-topics to a list of their sub-topics. |
|
563 | # Maps topics with sub-topics to a list of their sub-topics. | |
559 | subtopics = { |
|
564 | subtopics = { | |
560 | b'internals': internalstable, |
|
565 | b'internals': internalstable, | |
561 | } |
|
566 | } | |
562 |
|
567 | |||
563 | # Map topics to lists of callable taking the current topic help and |
|
568 | # Map topics to lists of callable taking the current topic help and | |
564 | # returning the updated version |
|
569 | # returning the updated version | |
565 | helphooks = {} |
|
570 | helphooks = {} | |
566 |
|
571 | |||
567 |
|
572 | |||
568 | def addtopichook(topic, rewriter): |
|
573 | def addtopichook(topic, rewriter): | |
569 | helphooks.setdefault(topic, []).append(rewriter) |
|
574 | helphooks.setdefault(topic, []).append(rewriter) | |
570 |
|
575 | |||
571 |
|
576 | |||
572 | def makeitemsdoc(ui, topic, doc, marker, items, dedent=False): |
|
577 | def makeitemsdoc(ui, topic, doc, marker, items, dedent=False): | |
573 | """Extract docstring from the items key to function mapping, build a |
|
578 | """Extract docstring from the items key to function mapping, build a | |
574 | single documentation block and use it to overwrite the marker in doc. |
|
579 | single documentation block and use it to overwrite the marker in doc. | |
575 | """ |
|
580 | """ | |
576 | entries = [] |
|
581 | entries = [] | |
577 | for name in sorted(items): |
|
582 | for name in sorted(items): | |
578 | text = (pycompat.getdoc(items[name]) or b'').rstrip() |
|
583 | text = (pycompat.getdoc(items[name]) or b'').rstrip() | |
579 | if not text or not ui.verbose and any(w in text for w in _exclkeywords): |
|
584 | if not text or not ui.verbose and any(w in text for w in _exclkeywords): | |
580 | continue |
|
585 | continue | |
581 | text = gettext(text) |
|
586 | text = gettext(text) | |
582 | if dedent: |
|
587 | if dedent: | |
583 | # Abuse latin1 to use textwrap.dedent() on bytes. |
|
588 | # Abuse latin1 to use textwrap.dedent() on bytes. | |
584 | text = textwrap.dedent(text.decode('latin1')).encode('latin1') |
|
589 | text = textwrap.dedent(text.decode('latin1')).encode('latin1') | |
585 | lines = text.splitlines() |
|
590 | lines = text.splitlines() | |
586 | doclines = [(lines[0])] |
|
591 | doclines = [(lines[0])] | |
587 | for l in lines[1:]: |
|
592 | for l in lines[1:]: | |
588 | # Stop once we find some Python doctest |
|
593 | # Stop once we find some Python doctest | |
589 | if l.strip().startswith(b'>>>'): |
|
594 | if l.strip().startswith(b'>>>'): | |
590 | break |
|
595 | break | |
591 | if dedent: |
|
596 | if dedent: | |
592 | doclines.append(l.rstrip()) |
|
597 | doclines.append(l.rstrip()) | |
593 | else: |
|
598 | else: | |
594 | doclines.append(b' ' + l.strip()) |
|
599 | doclines.append(b' ' + l.strip()) | |
595 | entries.append(b'\n'.join(doclines)) |
|
600 | entries.append(b'\n'.join(doclines)) | |
596 | entries = b'\n\n'.join(entries) |
|
601 | entries = b'\n\n'.join(entries) | |
597 | return doc.replace(marker, entries) |
|
602 | return doc.replace(marker, entries) | |
598 |
|
603 | |||
599 |
|
604 | |||
600 | def addtopicsymbols(topic, marker, symbols, dedent=False): |
|
605 | def addtopicsymbols(topic, marker, symbols, dedent=False): | |
601 | def add(ui, topic, doc): |
|
606 | def add(ui, topic, doc): | |
602 | return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent) |
|
607 | return makeitemsdoc(ui, topic, doc, marker, symbols, dedent=dedent) | |
603 |
|
608 | |||
604 | addtopichook(topic, add) |
|
609 | addtopichook(topic, add) | |
605 |
|
610 | |||
606 |
|
611 | |||
607 | addtopicsymbols( |
|
612 | addtopicsymbols( | |
608 | b'bundlespec', |
|
613 | b'bundlespec', | |
609 | b'.. bundlecompressionmarker', |
|
614 | b'.. bundlecompressionmarker', | |
610 | compression.bundlecompressiontopics(), |
|
615 | compression.bundlecompressiontopics(), | |
611 | ) |
|
616 | ) | |
612 | addtopicsymbols(b'filesets', b'.. predicatesmarker', fileset.symbols) |
|
617 | addtopicsymbols(b'filesets', b'.. predicatesmarker', fileset.symbols) | |
613 | addtopicsymbols( |
|
618 | addtopicsymbols( | |
614 | b'merge-tools', b'.. internaltoolsmarker', filemerge.internalsdoc |
|
619 | b'merge-tools', b'.. internaltoolsmarker', filemerge.internalsdoc | |
615 | ) |
|
620 | ) | |
616 | addtopicsymbols(b'revisions', b'.. predicatesmarker', revset.symbols) |
|
621 | addtopicsymbols(b'revisions', b'.. predicatesmarker', revset.symbols) | |
617 | addtopicsymbols(b'templates', b'.. keywordsmarker', templatekw.keywords) |
|
622 | addtopicsymbols(b'templates', b'.. keywordsmarker', templatekw.keywords) | |
618 | addtopicsymbols(b'templates', b'.. filtersmarker', templatefilters.filters) |
|
623 | addtopicsymbols(b'templates', b'.. filtersmarker', templatefilters.filters) | |
619 | addtopicsymbols(b'templates', b'.. functionsmarker', templatefuncs.funcs) |
|
624 | addtopicsymbols(b'templates', b'.. functionsmarker', templatefuncs.funcs) | |
620 | addtopicsymbols( |
|
625 | addtopicsymbols( | |
621 | b'hgweb', b'.. webcommandsmarker', webcommands.commands, dedent=True |
|
626 | b'hgweb', b'.. webcommandsmarker', webcommands.commands, dedent=True | |
622 | ) |
|
627 | ) | |
623 |
|
628 | |||
624 |
|
629 | |||
625 | def inserttweakrc(ui, topic, doc): |
|
630 | def inserttweakrc(ui, topic, doc): | |
626 | marker = b'.. tweakdefaultsmarker' |
|
631 | marker = b'.. tweakdefaultsmarker' | |
627 | repl = uimod.tweakrc |
|
632 | repl = uimod.tweakrc | |
628 |
|
633 | |||
629 | def sub(m): |
|
634 | def sub(m): | |
630 | lines = [m.group(1) + s for s in repl.splitlines()] |
|
635 | lines = [m.group(1) + s for s in repl.splitlines()] | |
631 | return b'\n'.join(lines) |
|
636 | return b'\n'.join(lines) | |
632 |
|
637 | |||
633 | return re.sub(br'( *)%s' % re.escape(marker), sub, doc) |
|
638 | return re.sub(br'( *)%s' % re.escape(marker), sub, doc) | |
634 |
|
639 | |||
635 |
|
640 | |||
636 | addtopichook(b'config', inserttweakrc) |
|
641 | addtopichook(b'config', inserttweakrc) | |
637 |
|
642 | |||
638 |
|
643 | |||
639 | def help_( |
|
644 | def help_( | |
640 | ui, |
|
645 | ui, | |
641 | commands, |
|
646 | commands, | |
642 | name, |
|
647 | name, | |
643 | unknowncmd=False, |
|
648 | unknowncmd=False, | |
644 | full=True, |
|
649 | full=True, | |
645 | subtopic=None, |
|
650 | subtopic=None, | |
646 | fullname=None, |
|
651 | fullname=None, | |
647 | **opts |
|
652 | **opts | |
648 | ): |
|
653 | ): | |
649 | ''' |
|
654 | ''' | |
650 | Generate the help for 'name' as unformatted restructured text. If |
|
655 | Generate the help for 'name' as unformatted restructured text. If | |
651 | 'name' is None, describe the commands available. |
|
656 | 'name' is None, describe the commands available. | |
652 | ''' |
|
657 | ''' | |
653 |
|
658 | |||
654 | opts = pycompat.byteskwargs(opts) |
|
659 | opts = pycompat.byteskwargs(opts) | |
655 |
|
660 | |||
656 | def helpcmd(name, subtopic=None): |
|
661 | def helpcmd(name, subtopic=None): | |
657 | try: |
|
662 | try: | |
658 | aliases, entry = cmdutil.findcmd( |
|
663 | aliases, entry = cmdutil.findcmd( | |
659 | name, commands.table, strict=unknowncmd |
|
664 | name, commands.table, strict=unknowncmd | |
660 | ) |
|
665 | ) | |
661 | except error.AmbiguousCommand as inst: |
|
666 | except error.AmbiguousCommand as inst: | |
662 | # py3 fix: except vars can't be used outside the scope of the |
|
667 | # py3 fix: except vars can't be used outside the scope of the | |
663 | # except block, nor can be used inside a lambda. python issue4617 |
|
668 | # except block, nor can be used inside a lambda. python issue4617 | |
664 | prefix = inst.args[0] |
|
669 | prefix = inst.args[0] | |
665 | select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix) |
|
670 | select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix) | |
666 | rst = helplist(select) |
|
671 | rst = helplist(select) | |
667 | return rst |
|
672 | return rst | |
668 |
|
673 | |||
669 | rst = [] |
|
674 | rst = [] | |
670 |
|
675 | |||
671 | # check if it's an invalid alias and display its error if it is |
|
676 | # check if it's an invalid alias and display its error if it is | |
672 | if getattr(entry[0], 'badalias', None): |
|
677 | if getattr(entry[0], 'badalias', None): | |
673 | rst.append(entry[0].badalias + b'\n') |
|
678 | rst.append(entry[0].badalias + b'\n') | |
674 | if entry[0].unknowncmd: |
|
679 | if entry[0].unknowncmd: | |
675 | try: |
|
680 | try: | |
676 | rst.extend(helpextcmd(entry[0].cmdname)) |
|
681 | rst.extend(helpextcmd(entry[0].cmdname)) | |
677 | except error.UnknownCommand: |
|
682 | except error.UnknownCommand: | |
678 | pass |
|
683 | pass | |
679 | return rst |
|
684 | return rst | |
680 |
|
685 | |||
681 | # synopsis |
|
686 | # synopsis | |
682 | if len(entry) > 2: |
|
687 | if len(entry) > 2: | |
683 | if entry[2].startswith(b'hg'): |
|
688 | if entry[2].startswith(b'hg'): | |
684 | rst.append(b"%s\n" % entry[2]) |
|
689 | rst.append(b"%s\n" % entry[2]) | |
685 | else: |
|
690 | else: | |
686 | rst.append(b'hg %s %s\n' % (aliases[0], entry[2])) |
|
691 | rst.append(b'hg %s %s\n' % (aliases[0], entry[2])) | |
687 | else: |
|
692 | else: | |
688 | rst.append(b'hg %s\n' % aliases[0]) |
|
693 | rst.append(b'hg %s\n' % aliases[0]) | |
689 | # aliases |
|
694 | # aliases | |
690 | if full and not ui.quiet and len(aliases) > 1: |
|
695 | if full and not ui.quiet and len(aliases) > 1: | |
691 | rst.append(_(b"\naliases: %s\n") % b', '.join(aliases[1:])) |
|
696 | rst.append(_(b"\naliases: %s\n") % b', '.join(aliases[1:])) | |
692 | rst.append(b'\n') |
|
697 | rst.append(b'\n') | |
693 |
|
698 | |||
694 | # description |
|
699 | # description | |
695 | doc = gettext(pycompat.getdoc(entry[0])) |
|
700 | doc = gettext(pycompat.getdoc(entry[0])) | |
696 | if not doc: |
|
701 | if not doc: | |
697 | doc = _(b"(no help text available)") |
|
702 | doc = _(b"(no help text available)") | |
698 | if util.safehasattr(entry[0], b'definition'): # aliased command |
|
703 | if util.safehasattr(entry[0], b'definition'): # aliased command | |
699 | source = entry[0].source |
|
704 | source = entry[0].source | |
700 | if entry[0].definition.startswith(b'!'): # shell alias |
|
705 | if entry[0].definition.startswith(b'!'): # shell alias | |
701 | doc = _(b'shell alias for: %s\n\n%s\n\ndefined by: %s\n') % ( |
|
706 | doc = _(b'shell alias for: %s\n\n%s\n\ndefined by: %s\n') % ( | |
702 | entry[0].definition[1:], |
|
707 | entry[0].definition[1:], | |
703 | doc, |
|
708 | doc, | |
704 | source, |
|
709 | source, | |
705 | ) |
|
710 | ) | |
706 | else: |
|
711 | else: | |
707 | doc = _(b'alias for: hg %s\n\n%s\n\ndefined by: %s\n') % ( |
|
712 | doc = _(b'alias for: hg %s\n\n%s\n\ndefined by: %s\n') % ( | |
708 | entry[0].definition, |
|
713 | entry[0].definition, | |
709 | doc, |
|
714 | doc, | |
710 | source, |
|
715 | source, | |
711 | ) |
|
716 | ) | |
712 | doc = doc.splitlines(True) |
|
717 | doc = doc.splitlines(True) | |
713 | if ui.quiet or not full: |
|
718 | if ui.quiet or not full: | |
714 | rst.append(doc[0]) |
|
719 | rst.append(doc[0]) | |
715 | else: |
|
720 | else: | |
716 | rst.extend(doc) |
|
721 | rst.extend(doc) | |
717 | rst.append(b'\n') |
|
722 | rst.append(b'\n') | |
718 |
|
723 | |||
719 | # check if this command shadows a non-trivial (multi-line) |
|
724 | # check if this command shadows a non-trivial (multi-line) | |
720 | # extension help text |
|
725 | # extension help text | |
721 | try: |
|
726 | try: | |
722 | mod = extensions.find(name) |
|
727 | mod = extensions.find(name) | |
723 | doc = gettext(pycompat.getdoc(mod)) or b'' |
|
728 | doc = gettext(pycompat.getdoc(mod)) or b'' | |
724 | if b'\n' in doc.strip(): |
|
729 | if b'\n' in doc.strip(): | |
725 | msg = _( |
|
730 | msg = _( | |
726 | b"(use 'hg help -e %s' to show help for " |
|
731 | b"(use 'hg help -e %s' to show help for " | |
727 | b"the %s extension)" |
|
732 | b"the %s extension)" | |
728 | ) % (name, name) |
|
733 | ) % (name, name) | |
729 | rst.append(b'\n%s\n' % msg) |
|
734 | rst.append(b'\n%s\n' % msg) | |
730 | except KeyError: |
|
735 | except KeyError: | |
731 | pass |
|
736 | pass | |
732 |
|
737 | |||
733 | # options |
|
738 | # options | |
734 | if not ui.quiet and entry[1]: |
|
739 | if not ui.quiet and entry[1]: | |
735 | rst.append(optrst(_(b"options"), entry[1], ui.verbose, ui)) |
|
740 | rst.append(optrst(_(b"options"), entry[1], ui.verbose, ui)) | |
736 |
|
741 | |||
737 | if ui.verbose: |
|
742 | if ui.verbose: | |
738 | rst.append( |
|
743 | rst.append( | |
739 | optrst( |
|
744 | optrst( | |
740 | _(b"global options"), commands.globalopts, ui.verbose, ui |
|
745 | _(b"global options"), commands.globalopts, ui.verbose, ui | |
741 | ) |
|
746 | ) | |
742 | ) |
|
747 | ) | |
743 |
|
748 | |||
744 | if not ui.verbose: |
|
749 | if not ui.verbose: | |
745 | if not full: |
|
750 | if not full: | |
746 | rst.append(_(b"\n(use 'hg %s -h' to show more help)\n") % name) |
|
751 | rst.append(_(b"\n(use 'hg %s -h' to show more help)\n") % name) | |
747 | elif not ui.quiet: |
|
752 | elif not ui.quiet: | |
748 | rst.append( |
|
753 | rst.append( | |
749 | _( |
|
754 | _( | |
750 | b'\n(some details hidden, use --verbose ' |
|
755 | b'\n(some details hidden, use --verbose ' | |
751 | b'to show complete help)' |
|
756 | b'to show complete help)' | |
752 | ) |
|
757 | ) | |
753 | ) |
|
758 | ) | |
754 |
|
759 | |||
755 | return rst |
|
760 | return rst | |
756 |
|
761 | |||
757 | def helplist(select=None, **opts): |
|
762 | def helplist(select=None, **opts): | |
758 | # Category -> list of commands |
|
763 | # Category -> list of commands | |
759 | cats = {} |
|
764 | cats = {} | |
760 | # Command -> short description |
|
765 | # Command -> short description | |
761 | h = {} |
|
766 | h = {} | |
762 | # Command -> string showing synonyms |
|
767 | # Command -> string showing synonyms | |
763 | syns = {} |
|
768 | syns = {} | |
764 | for c, e in pycompat.iteritems(commands.table): |
|
769 | for c, e in pycompat.iteritems(commands.table): | |
765 | fs = cmdutil.parsealiases(c) |
|
770 | fs = cmdutil.parsealiases(c) | |
766 | f = fs[0] |
|
771 | f = fs[0] | |
767 | syns[f] = b', '.join(fs) |
|
772 | syns[f] = b', '.join(fs) | |
768 | func = e[0] |
|
773 | func = e[0] | |
769 | if select and not select(f): |
|
774 | if select and not select(f): | |
770 | continue |
|
775 | continue | |
771 | doc = pycompat.getdoc(func) |
|
776 | doc = pycompat.getdoc(func) | |
772 | if filtercmd(ui, f, func, name, doc): |
|
777 | if filtercmd(ui, f, func, name, doc): | |
773 | continue |
|
778 | continue | |
774 | doc = gettext(doc) |
|
779 | doc = gettext(doc) | |
775 | if not doc: |
|
780 | if not doc: | |
776 | doc = _(b"(no help text available)") |
|
781 | doc = _(b"(no help text available)") | |
777 | h[f] = doc.splitlines()[0].rstrip() |
|
782 | h[f] = doc.splitlines()[0].rstrip() | |
778 |
|
783 | |||
779 | cat = getattr(func, 'helpcategory', None) or ( |
|
784 | cat = getattr(func, 'helpcategory', None) or ( | |
780 | registrar.command.CATEGORY_NONE |
|
785 | registrar.command.CATEGORY_NONE | |
781 | ) |
|
786 | ) | |
782 | cats.setdefault(cat, []).append(f) |
|
787 | cats.setdefault(cat, []).append(f) | |
783 |
|
788 | |||
784 | rst = [] |
|
789 | rst = [] | |
785 | if not h: |
|
790 | if not h: | |
786 | if not ui.quiet: |
|
791 | if not ui.quiet: | |
787 | rst.append(_(b'no commands defined\n')) |
|
792 | rst.append(_(b'no commands defined\n')) | |
788 | return rst |
|
793 | return rst | |
789 |
|
794 | |||
790 | # Output top header. |
|
795 | # Output top header. | |
791 | if not ui.quiet: |
|
796 | if not ui.quiet: | |
792 | if name == b"shortlist": |
|
797 | if name == b"shortlist": | |
793 | rst.append(_(b'basic commands:\n\n')) |
|
798 | rst.append(_(b'basic commands:\n\n')) | |
794 | elif name == b"debug": |
|
799 | elif name == b"debug": | |
795 | rst.append(_(b'debug commands (internal and unsupported):\n\n')) |
|
800 | rst.append(_(b'debug commands (internal and unsupported):\n\n')) | |
796 | else: |
|
801 | else: | |
797 | rst.append(_(b'list of commands:\n')) |
|
802 | rst.append(_(b'list of commands:\n')) | |
798 |
|
803 | |||
799 | def appendcmds(cmds): |
|
804 | def appendcmds(cmds): | |
800 | cmds = sorted(cmds) |
|
805 | cmds = sorted(cmds) | |
801 | for c in cmds: |
|
806 | for c in cmds: | |
802 | if ui.verbose: |
|
807 | if ui.verbose: | |
803 | rst.append(b" :%s: %s\n" % (syns[c], h[c])) |
|
808 | rst.append(b" :%s: %s\n" % (syns[c], h[c])) | |
804 | else: |
|
809 | else: | |
805 | rst.append(b' :%s: %s\n' % (c, h[c])) |
|
810 | rst.append(b' :%s: %s\n' % (c, h[c])) | |
806 |
|
811 | |||
807 | if name in (b'shortlist', b'debug'): |
|
812 | if name in (b'shortlist', b'debug'): | |
808 | # List without categories. |
|
813 | # List without categories. | |
809 | appendcmds(h) |
|
814 | appendcmds(h) | |
810 | else: |
|
815 | else: | |
811 | # Check that all categories have an order. |
|
816 | # Check that all categories have an order. | |
812 | missing_order = set(cats.keys()) - set(CATEGORY_ORDER) |
|
817 | missing_order = set(cats.keys()) - set(CATEGORY_ORDER) | |
813 | if missing_order: |
|
818 | if missing_order: | |
814 | ui.develwarn( |
|
819 | ui.develwarn( | |
815 | b'help categories missing from CATEGORY_ORDER: %s' |
|
820 | b'help categories missing from CATEGORY_ORDER: %s' | |
816 | % missing_order |
|
821 | % missing_order | |
817 | ) |
|
822 | ) | |
818 |
|
823 | |||
819 | # List per category. |
|
824 | # List per category. | |
820 | for cat in CATEGORY_ORDER: |
|
825 | for cat in CATEGORY_ORDER: | |
821 | catfns = cats.get(cat, []) |
|
826 | catfns = cats.get(cat, []) | |
822 | if catfns: |
|
827 | if catfns: | |
823 | if len(cats) > 1: |
|
828 | if len(cats) > 1: | |
824 | catname = gettext(CATEGORY_NAMES[cat]) |
|
829 | catname = gettext(CATEGORY_NAMES[cat]) | |
825 | rst.append(b"\n%s:\n" % catname) |
|
830 | rst.append(b"\n%s:\n" % catname) | |
826 | rst.append(b"\n") |
|
831 | rst.append(b"\n") | |
827 | appendcmds(catfns) |
|
832 | appendcmds(catfns) | |
828 |
|
833 | |||
829 | ex = opts.get |
|
834 | ex = opts.get | |
830 | anyopts = ex('keyword') or not (ex('command') or ex('extension')) |
|
835 | anyopts = ex('keyword') or not (ex('command') or ex('extension')) | |
831 | if not name and anyopts: |
|
836 | if not name and anyopts: | |
832 | exts = listexts( |
|
837 | exts = listexts( | |
833 | _(b'enabled extensions:'), |
|
838 | _(b'enabled extensions:'), | |
834 | extensions.enabled(), |
|
839 | extensions.enabled(), | |
835 | showdeprecated=ui.verbose, |
|
840 | showdeprecated=ui.verbose, | |
836 | ) |
|
841 | ) | |
837 | if exts: |
|
842 | if exts: | |
838 | rst.append(b'\n') |
|
843 | rst.append(b'\n') | |
839 | rst.extend(exts) |
|
844 | rst.extend(exts) | |
840 |
|
845 | |||
841 | rst.append(_(b"\nadditional help topics:\n")) |
|
846 | rst.append(_(b"\nadditional help topics:\n")) | |
842 | # Group commands by category. |
|
847 | # Group commands by category. | |
843 | topiccats = {} |
|
848 | topiccats = {} | |
844 | for topic in helptable: |
|
849 | for topic in helptable: | |
845 | names, header, doc = topic[0:3] |
|
850 | names, header, doc = topic[0:3] | |
846 | if len(topic) > 3 and topic[3]: |
|
851 | if len(topic) > 3 and topic[3]: | |
847 | category = topic[3] |
|
852 | category = topic[3] | |
848 | else: |
|
853 | else: | |
849 | category = TOPIC_CATEGORY_NONE |
|
854 | category = TOPIC_CATEGORY_NONE | |
850 |
|
855 | |||
851 | topicname = names[0] |
|
856 | topicname = names[0] | |
852 | if not filtertopic(ui, topicname): |
|
857 | if not filtertopic(ui, topicname): | |
853 | topiccats.setdefault(category, []).append( |
|
858 | topiccats.setdefault(category, []).append( | |
854 | (topicname, header) |
|
859 | (topicname, header) | |
855 | ) |
|
860 | ) | |
856 |
|
861 | |||
857 | # Check that all categories have an order. |
|
862 | # Check that all categories have an order. | |
858 | missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER) |
|
863 | missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER) | |
859 | if missing_order: |
|
864 | if missing_order: | |
860 | ui.develwarn( |
|
865 | ui.develwarn( | |
861 | b'help categories missing from TOPIC_CATEGORY_ORDER: %s' |
|
866 | b'help categories missing from TOPIC_CATEGORY_ORDER: %s' | |
862 | % missing_order |
|
867 | % missing_order | |
863 | ) |
|
868 | ) | |
864 |
|
869 | |||
865 | # Output topics per category. |
|
870 | # Output topics per category. | |
866 | for cat in TOPIC_CATEGORY_ORDER: |
|
871 | for cat in TOPIC_CATEGORY_ORDER: | |
867 | topics = topiccats.get(cat, []) |
|
872 | topics = topiccats.get(cat, []) | |
868 | if topics: |
|
873 | if topics: | |
869 | if len(topiccats) > 1: |
|
874 | if len(topiccats) > 1: | |
870 | catname = gettext(TOPIC_CATEGORY_NAMES[cat]) |
|
875 | catname = gettext(TOPIC_CATEGORY_NAMES[cat]) | |
871 | rst.append(b"\n%s:\n" % catname) |
|
876 | rst.append(b"\n%s:\n" % catname) | |
872 | rst.append(b"\n") |
|
877 | rst.append(b"\n") | |
873 | for t, desc in topics: |
|
878 | for t, desc in topics: | |
874 | rst.append(b" :%s: %s\n" % (t, desc)) |
|
879 | rst.append(b" :%s: %s\n" % (t, desc)) | |
875 |
|
880 | |||
876 | if ui.quiet: |
|
881 | if ui.quiet: | |
877 | pass |
|
882 | pass | |
878 | elif ui.verbose: |
|
883 | elif ui.verbose: | |
879 | rst.append( |
|
884 | rst.append( | |
880 | b'\n%s\n' |
|
885 | b'\n%s\n' | |
881 | % optrst( |
|
886 | % optrst( | |
882 | _(b"global options"), commands.globalopts, ui.verbose, ui |
|
887 | _(b"global options"), commands.globalopts, ui.verbose, ui | |
883 | ) |
|
888 | ) | |
884 | ) |
|
889 | ) | |
885 | if name == b'shortlist': |
|
890 | if name == b'shortlist': | |
886 | rst.append( |
|
891 | rst.append( | |
887 | _(b"\n(use 'hg help' for the full list of commands)\n") |
|
892 | _(b"\n(use 'hg help' for the full list of commands)\n") | |
888 | ) |
|
893 | ) | |
889 | else: |
|
894 | else: | |
890 | if name == b'shortlist': |
|
895 | if name == b'shortlist': | |
891 | rst.append( |
|
896 | rst.append( | |
892 | _( |
|
897 | _( | |
893 | b"\n(use 'hg help' for the full list of commands " |
|
898 | b"\n(use 'hg help' for the full list of commands " | |
894 | b"or 'hg -v' for details)\n" |
|
899 | b"or 'hg -v' for details)\n" | |
895 | ) |
|
900 | ) | |
896 | ) |
|
901 | ) | |
897 | elif name and not full: |
|
902 | elif name and not full: | |
898 | rst.append( |
|
903 | rst.append( | |
899 | _(b"\n(use 'hg help %s' to show the full help text)\n") |
|
904 | _(b"\n(use 'hg help %s' to show the full help text)\n") | |
900 | % name |
|
905 | % name | |
901 | ) |
|
906 | ) | |
902 | elif name and syns and name in syns.keys(): |
|
907 | elif name and syns and name in syns.keys(): | |
903 | rst.append( |
|
908 | rst.append( | |
904 | _( |
|
909 | _( | |
905 | b"\n(use 'hg help -v -e %s' to show built-in " |
|
910 | b"\n(use 'hg help -v -e %s' to show built-in " | |
906 | b"aliases and global options)\n" |
|
911 | b"aliases and global options)\n" | |
907 | ) |
|
912 | ) | |
908 | % name |
|
913 | % name | |
909 | ) |
|
914 | ) | |
910 | else: |
|
915 | else: | |
911 | rst.append( |
|
916 | rst.append( | |
912 | _( |
|
917 | _( | |
913 | b"\n(use 'hg help -v%s' to show built-in aliases " |
|
918 | b"\n(use 'hg help -v%s' to show built-in aliases " | |
914 | b"and global options)\n" |
|
919 | b"and global options)\n" | |
915 | ) |
|
920 | ) | |
916 | % (name and b" " + name or b"") |
|
921 | % (name and b" " + name or b"") | |
917 | ) |
|
922 | ) | |
918 | return rst |
|
923 | return rst | |
919 |
|
924 | |||
920 | def helptopic(name, subtopic=None): |
|
925 | def helptopic(name, subtopic=None): | |
921 | # Look for sub-topic entry first. |
|
926 | # Look for sub-topic entry first. | |
922 | header, doc = None, None |
|
927 | header, doc = None, None | |
923 | if subtopic and name in subtopics: |
|
928 | if subtopic and name in subtopics: | |
924 | for names, header, doc in subtopics[name]: |
|
929 | for names, header, doc in subtopics[name]: | |
925 | if subtopic in names: |
|
930 | if subtopic in names: | |
926 | break |
|
931 | break | |
927 | if not any(subtopic in s[0] for s in subtopics[name]): |
|
932 | if not any(subtopic in s[0] for s in subtopics[name]): | |
928 | raise error.UnknownCommand(name) |
|
933 | raise error.UnknownCommand(name) | |
929 |
|
934 | |||
930 | if not header: |
|
935 | if not header: | |
931 | for topic in helptable: |
|
936 | for topic in helptable: | |
932 | names, header, doc = topic[0:3] |
|
937 | names, header, doc = topic[0:3] | |
933 | if name in names: |
|
938 | if name in names: | |
934 | break |
|
939 | break | |
935 | else: |
|
940 | else: | |
936 | raise error.UnknownCommand(name) |
|
941 | raise error.UnknownCommand(name) | |
937 |
|
942 | |||
938 | rst = [minirst.section(header)] |
|
943 | rst = [minirst.section(header)] | |
939 |
|
944 | |||
940 | # description |
|
945 | # description | |
941 | if not doc: |
|
946 | if not doc: | |
942 | rst.append(b" %s\n" % _(b"(no help text available)")) |
|
947 | rst.append(b" %s\n" % _(b"(no help text available)")) | |
943 | if callable(doc): |
|
948 | if callable(doc): | |
944 | rst += [b" %s\n" % l for l in doc(ui).splitlines()] |
|
949 | rst += [b" %s\n" % l for l in doc(ui).splitlines()] | |
945 |
|
950 | |||
946 | if not ui.verbose: |
|
951 | if not ui.verbose: | |
947 | omitted = _( |
|
952 | omitted = _( | |
948 | b'(some details hidden, use --verbose' |
|
953 | b'(some details hidden, use --verbose' | |
949 | b' to show complete help)' |
|
954 | b' to show complete help)' | |
950 | ) |
|
955 | ) | |
951 | indicateomitted(rst, omitted) |
|
956 | indicateomitted(rst, omitted) | |
952 |
|
957 | |||
953 | try: |
|
958 | try: | |
954 | cmdutil.findcmd(name, commands.table) |
|
959 | cmdutil.findcmd(name, commands.table) | |
955 | rst.append( |
|
960 | rst.append( | |
956 | _(b"\nuse 'hg help -c %s' to see help for the %s command\n") |
|
961 | _(b"\nuse 'hg help -c %s' to see help for the %s command\n") | |
957 | % (name, name) |
|
962 | % (name, name) | |
958 | ) |
|
963 | ) | |
959 | except error.UnknownCommand: |
|
964 | except error.UnknownCommand: | |
960 | pass |
|
965 | pass | |
961 | return rst |
|
966 | return rst | |
962 |
|
967 | |||
963 | def helpext(name, subtopic=None): |
|
968 | def helpext(name, subtopic=None): | |
964 | try: |
|
969 | try: | |
965 | mod = extensions.find(name) |
|
970 | mod = extensions.find(name) | |
966 | doc = gettext(pycompat.getdoc(mod)) or _(b'no help text available') |
|
971 | doc = gettext(pycompat.getdoc(mod)) or _(b'no help text available') | |
967 | except KeyError: |
|
972 | except KeyError: | |
968 | mod = None |
|
973 | mod = None | |
969 | doc = extensions.disabled_help(name) |
|
974 | doc = extensions.disabled_help(name) | |
970 | if not doc: |
|
975 | if not doc: | |
971 | raise error.UnknownCommand(name) |
|
976 | raise error.UnknownCommand(name) | |
972 |
|
977 | |||
973 | if b'\n' not in doc: |
|
978 | if b'\n' not in doc: | |
974 | head, tail = doc, b"" |
|
979 | head, tail = doc, b"" | |
975 | else: |
|
980 | else: | |
976 | head, tail = doc.split(b'\n', 1) |
|
981 | head, tail = doc.split(b'\n', 1) | |
977 | rst = [_(b'%s extension - %s\n\n') % (name.rpartition(b'.')[-1], head)] |
|
982 | rst = [_(b'%s extension - %s\n\n') % (name.rpartition(b'.')[-1], head)] | |
978 | if tail: |
|
983 | if tail: | |
979 | rst.extend(tail.splitlines(True)) |
|
984 | rst.extend(tail.splitlines(True)) | |
980 | rst.append(b'\n') |
|
985 | rst.append(b'\n') | |
981 |
|
986 | |||
982 | if not ui.verbose: |
|
987 | if not ui.verbose: | |
983 | omitted = _( |
|
988 | omitted = _( | |
984 | b'(some details hidden, use --verbose' |
|
989 | b'(some details hidden, use --verbose' | |
985 | b' to show complete help)' |
|
990 | b' to show complete help)' | |
986 | ) |
|
991 | ) | |
987 | indicateomitted(rst, omitted) |
|
992 | indicateomitted(rst, omitted) | |
988 |
|
993 | |||
989 | if mod: |
|
994 | if mod: | |
990 | try: |
|
995 | try: | |
991 | ct = mod.cmdtable |
|
996 | ct = mod.cmdtable | |
992 | except AttributeError: |
|
997 | except AttributeError: | |
993 | ct = {} |
|
998 | ct = {} | |
994 | modcmds = {c.partition(b'|')[0] for c in ct} |
|
999 | modcmds = {c.partition(b'|')[0] for c in ct} | |
995 | rst.extend(helplist(modcmds.__contains__)) |
|
1000 | rst.extend(helplist(modcmds.__contains__)) | |
996 | else: |
|
1001 | else: | |
997 | rst.append( |
|
1002 | rst.append( | |
998 | _( |
|
1003 | _( | |
999 | b"(use 'hg help extensions' for information on enabling" |
|
1004 | b"(use 'hg help extensions' for information on enabling" | |
1000 | b" extensions)\n" |
|
1005 | b" extensions)\n" | |
1001 | ) |
|
1006 | ) | |
1002 | ) |
|
1007 | ) | |
1003 | return rst |
|
1008 | return rst | |
1004 |
|
1009 | |||
1005 | def helpextcmd(name, subtopic=None): |
|
1010 | def helpextcmd(name, subtopic=None): | |
1006 | cmd, ext, doc = extensions.disabledcmd( |
|
1011 | cmd, ext, doc = extensions.disabledcmd( | |
1007 | ui, name, ui.configbool(b'ui', b'strict') |
|
1012 | ui, name, ui.configbool(b'ui', b'strict') | |
1008 | ) |
|
1013 | ) | |
1009 | doc = doc.splitlines()[0] |
|
1014 | doc = doc.splitlines()[0] | |
1010 |
|
1015 | |||
1011 | rst = listexts( |
|
1016 | rst = listexts( | |
1012 | _(b"'%s' is provided by the following extension:") % cmd, |
|
1017 | _(b"'%s' is provided by the following extension:") % cmd, | |
1013 | {ext: doc}, |
|
1018 | {ext: doc}, | |
1014 | indent=4, |
|
1019 | indent=4, | |
1015 | showdeprecated=True, |
|
1020 | showdeprecated=True, | |
1016 | ) |
|
1021 | ) | |
1017 | rst.append(b'\n') |
|
1022 | rst.append(b'\n') | |
1018 | rst.append( |
|
1023 | rst.append( | |
1019 | _( |
|
1024 | _( | |
1020 | b"(use 'hg help extensions' for information on enabling " |
|
1025 | b"(use 'hg help extensions' for information on enabling " | |
1021 | b"extensions)\n" |
|
1026 | b"extensions)\n" | |
1022 | ) |
|
1027 | ) | |
1023 | ) |
|
1028 | ) | |
1024 | return rst |
|
1029 | return rst | |
1025 |
|
1030 | |||
1026 | rst = [] |
|
1031 | rst = [] | |
1027 | kw = opts.get(b'keyword') |
|
1032 | kw = opts.get(b'keyword') | |
1028 | if kw or name is None and any(opts[o] for o in opts): |
|
1033 | if kw or name is None and any(opts[o] for o in opts): | |
1029 | matches = topicmatch(ui, commands, name or b'') |
|
1034 | matches = topicmatch(ui, commands, name or b'') | |
1030 | helpareas = [] |
|
1035 | helpareas = [] | |
1031 | if opts.get(b'extension'): |
|
1036 | if opts.get(b'extension'): | |
1032 | helpareas += [(b'extensions', _(b'Extensions'))] |
|
1037 | helpareas += [(b'extensions', _(b'Extensions'))] | |
1033 | if opts.get(b'command'): |
|
1038 | if opts.get(b'command'): | |
1034 | helpareas += [(b'commands', _(b'Commands'))] |
|
1039 | helpareas += [(b'commands', _(b'Commands'))] | |
1035 | if not helpareas: |
|
1040 | if not helpareas: | |
1036 | helpareas = [ |
|
1041 | helpareas = [ | |
1037 | (b'topics', _(b'Topics')), |
|
1042 | (b'topics', _(b'Topics')), | |
1038 | (b'commands', _(b'Commands')), |
|
1043 | (b'commands', _(b'Commands')), | |
1039 | (b'extensions', _(b'Extensions')), |
|
1044 | (b'extensions', _(b'Extensions')), | |
1040 | (b'extensioncommands', _(b'Extension Commands')), |
|
1045 | (b'extensioncommands', _(b'Extension Commands')), | |
1041 | ] |
|
1046 | ] | |
1042 | for t, title in helpareas: |
|
1047 | for t, title in helpareas: | |
1043 | if matches[t]: |
|
1048 | if matches[t]: | |
1044 | rst.append(b'%s:\n\n' % title) |
|
1049 | rst.append(b'%s:\n\n' % title) | |
1045 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) |
|
1050 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) | |
1046 | rst.append(b'\n') |
|
1051 | rst.append(b'\n') | |
1047 | if not rst: |
|
1052 | if not rst: | |
1048 | msg = _(b'no matches') |
|
1053 | msg = _(b'no matches') | |
1049 | hint = _(b"try 'hg help' for a list of topics") |
|
1054 | hint = _(b"try 'hg help' for a list of topics") | |
1050 | raise error.Abort(msg, hint=hint) |
|
1055 | raise error.Abort(msg, hint=hint) | |
1051 | elif name and name != b'shortlist': |
|
1056 | elif name and name != b'shortlist': | |
1052 | queries = [] |
|
1057 | queries = [] | |
1053 | if unknowncmd: |
|
1058 | if unknowncmd: | |
1054 | queries += [helpextcmd] |
|
1059 | queries += [helpextcmd] | |
1055 | if opts.get(b'extension'): |
|
1060 | if opts.get(b'extension'): | |
1056 | queries += [helpext] |
|
1061 | queries += [helpext] | |
1057 | if opts.get(b'command'): |
|
1062 | if opts.get(b'command'): | |
1058 | queries += [helpcmd] |
|
1063 | queries += [helpcmd] | |
1059 | if not queries: |
|
1064 | if not queries: | |
1060 | queries = (helptopic, helpcmd, helpext, helpextcmd) |
|
1065 | queries = (helptopic, helpcmd, helpext, helpextcmd) | |
1061 | for f in queries: |
|
1066 | for f in queries: | |
1062 | try: |
|
1067 | try: | |
1063 | rst = f(name, subtopic) |
|
1068 | rst = f(name, subtopic) | |
1064 | break |
|
1069 | break | |
1065 | except error.UnknownCommand: |
|
1070 | except error.UnknownCommand: | |
1066 | pass |
|
1071 | pass | |
1067 | else: |
|
1072 | else: | |
1068 | if unknowncmd: |
|
1073 | if unknowncmd: | |
1069 | raise error.UnknownCommand(name) |
|
1074 | raise error.UnknownCommand(name) | |
1070 | else: |
|
1075 | else: | |
1071 | if fullname: |
|
1076 | if fullname: | |
1072 | formatname = fullname |
|
1077 | formatname = fullname | |
1073 | else: |
|
1078 | else: | |
1074 | formatname = name |
|
1079 | formatname = name | |
1075 | if subtopic: |
|
1080 | if subtopic: | |
1076 | hintname = subtopic |
|
1081 | hintname = subtopic | |
1077 | else: |
|
1082 | else: | |
1078 | hintname = name |
|
1083 | hintname = name | |
1079 | msg = _(b'no such help topic: %s') % formatname |
|
1084 | msg = _(b'no such help topic: %s') % formatname | |
1080 | hint = _(b"try 'hg help --keyword %s'") % hintname |
|
1085 | hint = _(b"try 'hg help --keyword %s'") % hintname | |
1081 | raise error.Abort(msg, hint=hint) |
|
1086 | raise error.Abort(msg, hint=hint) | |
1082 | else: |
|
1087 | else: | |
1083 | # program name |
|
1088 | # program name | |
1084 | if not ui.quiet: |
|
1089 | if not ui.quiet: | |
1085 | rst = [_(b"Mercurial Distributed SCM\n"), b'\n'] |
|
1090 | rst = [_(b"Mercurial Distributed SCM\n"), b'\n'] | |
1086 | rst.extend(helplist(None, **pycompat.strkwargs(opts))) |
|
1091 | rst.extend(helplist(None, **pycompat.strkwargs(opts))) | |
1087 |
|
1092 | |||
1088 | return b''.join(rst) |
|
1093 | return b''.join(rst) | |
1089 |
|
1094 | |||
1090 |
|
1095 | |||
1091 | def formattedhelp( |
|
1096 | def formattedhelp( | |
1092 | ui, commands, fullname, keep=None, unknowncmd=False, full=True, **opts |
|
1097 | ui, commands, fullname, keep=None, unknowncmd=False, full=True, **opts | |
1093 | ): |
|
1098 | ): | |
1094 | """get help for a given topic (as a dotted name) as rendered rst |
|
1099 | """get help for a given topic (as a dotted name) as rendered rst | |
1095 |
|
1100 | |||
1096 | Either returns the rendered help text or raises an exception. |
|
1101 | Either returns the rendered help text or raises an exception. | |
1097 | """ |
|
1102 | """ | |
1098 | if keep is None: |
|
1103 | if keep is None: | |
1099 | keep = [] |
|
1104 | keep = [] | |
1100 | else: |
|
1105 | else: | |
1101 | keep = list(keep) # make a copy so we can mutate this later |
|
1106 | keep = list(keep) # make a copy so we can mutate this later | |
1102 |
|
1107 | |||
1103 | # <fullname> := <name>[.<subtopic][.<section>] |
|
1108 | # <fullname> := <name>[.<subtopic][.<section>] | |
1104 | name = subtopic = section = None |
|
1109 | name = subtopic = section = None | |
1105 | if fullname is not None: |
|
1110 | if fullname is not None: | |
1106 | nameparts = fullname.split(b'.') |
|
1111 | nameparts = fullname.split(b'.') | |
1107 | name = nameparts.pop(0) |
|
1112 | name = nameparts.pop(0) | |
1108 | if nameparts and name in subtopics: |
|
1113 | if nameparts and name in subtopics: | |
1109 | subtopic = nameparts.pop(0) |
|
1114 | subtopic = nameparts.pop(0) | |
1110 | if nameparts: |
|
1115 | if nameparts: | |
1111 | section = encoding.lower(b'.'.join(nameparts)) |
|
1116 | section = encoding.lower(b'.'.join(nameparts)) | |
1112 |
|
1117 | |||
1113 | textwidth = ui.configint(b'ui', b'textwidth') |
|
1118 | textwidth = ui.configint(b'ui', b'textwidth') | |
1114 | termwidth = ui.termwidth() - 2 |
|
1119 | termwidth = ui.termwidth() - 2 | |
1115 | if textwidth <= 0 or termwidth < textwidth: |
|
1120 | if textwidth <= 0 or termwidth < textwidth: | |
1116 | textwidth = termwidth |
|
1121 | textwidth = termwidth | |
1117 | text = help_( |
|
1122 | text = help_( | |
1118 | ui, |
|
1123 | ui, | |
1119 | commands, |
|
1124 | commands, | |
1120 | name, |
|
1125 | name, | |
1121 | fullname=fullname, |
|
1126 | fullname=fullname, | |
1122 | subtopic=subtopic, |
|
1127 | subtopic=subtopic, | |
1123 | unknowncmd=unknowncmd, |
|
1128 | unknowncmd=unknowncmd, | |
1124 | full=full, |
|
1129 | full=full, | |
1125 | **opts |
|
1130 | **opts | |
1126 | ) |
|
1131 | ) | |
1127 |
|
1132 | |||
1128 | blocks, pruned = minirst.parse(text, keep=keep) |
|
1133 | blocks, pruned = minirst.parse(text, keep=keep) | |
1129 | if b'verbose' in pruned: |
|
1134 | if b'verbose' in pruned: | |
1130 | keep.append(b'omitted') |
|
1135 | keep.append(b'omitted') | |
1131 | else: |
|
1136 | else: | |
1132 | keep.append(b'notomitted') |
|
1137 | keep.append(b'notomitted') | |
1133 | blocks, pruned = minirst.parse(text, keep=keep) |
|
1138 | blocks, pruned = minirst.parse(text, keep=keep) | |
1134 | if section: |
|
1139 | if section: | |
1135 | blocks = minirst.filtersections(blocks, section) |
|
1140 | blocks = minirst.filtersections(blocks, section) | |
1136 |
|
1141 | |||
1137 | # We could have been given a weird ".foo" section without a name |
|
1142 | # We could have been given a weird ".foo" section without a name | |
1138 | # to look for, or we could have simply failed to found "foo.bar" |
|
1143 | # to look for, or we could have simply failed to found "foo.bar" | |
1139 | # because bar isn't a section of foo |
|
1144 | # because bar isn't a section of foo | |
1140 | if section and not (blocks and name): |
|
1145 | if section and not (blocks and name): | |
1141 | raise error.Abort(_(b"help section not found: %s") % fullname) |
|
1146 | raise error.Abort(_(b"help section not found: %s") % fullname) | |
1142 |
|
1147 | |||
1143 | return minirst.formatplain(blocks, textwidth) |
|
1148 | return minirst.formatplain(blocks, textwidth) |
@@ -1,3905 +1,3913 b'' | |||||
1 | Short help: |
|
1 | Short help: | |
2 |
|
2 | |||
3 | $ hg |
|
3 | $ hg | |
4 | Mercurial Distributed SCM |
|
4 | Mercurial Distributed SCM | |
5 |
|
5 | |||
6 | basic commands: |
|
6 | basic commands: | |
7 |
|
7 | |||
8 | add add the specified files on the next commit |
|
8 | add add the specified files on the next commit | |
9 | annotate show changeset information by line for each file |
|
9 | annotate show changeset information by line for each file | |
10 | clone make a copy of an existing repository |
|
10 | clone make a copy of an existing repository | |
11 | commit commit the specified files or all outstanding changes |
|
11 | commit commit the specified files or all outstanding changes | |
12 | diff diff repository (or selected files) |
|
12 | diff diff repository (or selected files) | |
13 | export dump the header and diffs for one or more changesets |
|
13 | export dump the header and diffs for one or more changesets | |
14 | forget forget the specified files on the next commit |
|
14 | forget forget the specified files on the next commit | |
15 | init create a new repository in the given directory |
|
15 | init create a new repository in the given directory | |
16 | log show revision history of entire repository or files |
|
16 | log show revision history of entire repository or files | |
17 | merge merge another revision into working directory |
|
17 | merge merge another revision into working directory | |
18 | pull pull changes from the specified source |
|
18 | pull pull changes from the specified source | |
19 | push push changes to the specified destination |
|
19 | push push changes to the specified destination | |
20 | remove remove the specified files on the next commit |
|
20 | remove remove the specified files on the next commit | |
21 | serve start stand-alone webserver |
|
21 | serve start stand-alone webserver | |
22 | status show changed files in the working directory |
|
22 | status show changed files in the working directory | |
23 | summary summarize working directory state |
|
23 | summary summarize working directory state | |
24 | update update working directory (or switch revisions) |
|
24 | update update working directory (or switch revisions) | |
25 |
|
25 | |||
26 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
26 | (use 'hg help' for the full list of commands or 'hg -v' for details) | |
27 |
|
27 | |||
28 | $ hg -q |
|
28 | $ hg -q | |
29 | add add the specified files on the next commit |
|
29 | add add the specified files on the next commit | |
30 | annotate show changeset information by line for each file |
|
30 | annotate show changeset information by line for each file | |
31 | clone make a copy of an existing repository |
|
31 | clone make a copy of an existing repository | |
32 | commit commit the specified files or all outstanding changes |
|
32 | commit commit the specified files or all outstanding changes | |
33 | diff diff repository (or selected files) |
|
33 | diff diff repository (or selected files) | |
34 | export dump the header and diffs for one or more changesets |
|
34 | export dump the header and diffs for one or more changesets | |
35 | forget forget the specified files on the next commit |
|
35 | forget forget the specified files on the next commit | |
36 | init create a new repository in the given directory |
|
36 | init create a new repository in the given directory | |
37 | log show revision history of entire repository or files |
|
37 | log show revision history of entire repository or files | |
38 | merge merge another revision into working directory |
|
38 | merge merge another revision into working directory | |
39 | pull pull changes from the specified source |
|
39 | pull pull changes from the specified source | |
40 | push push changes to the specified destination |
|
40 | push push changes to the specified destination | |
41 | remove remove the specified files on the next commit |
|
41 | remove remove the specified files on the next commit | |
42 | serve start stand-alone webserver |
|
42 | serve start stand-alone webserver | |
43 | status show changed files in the working directory |
|
43 | status show changed files in the working directory | |
44 | summary summarize working directory state |
|
44 | summary summarize working directory state | |
45 | update update working directory (or switch revisions) |
|
45 | update update working directory (or switch revisions) | |
46 |
|
46 | |||
47 | Extra extensions will be printed in help output in a non-reliable order since |
|
47 | Extra extensions will be printed in help output in a non-reliable order since | |
48 | the extension is unknown. |
|
48 | the extension is unknown. | |
49 | #if no-extraextensions |
|
49 | #if no-extraextensions | |
50 |
|
50 | |||
51 | $ hg help |
|
51 | $ hg help | |
52 | Mercurial Distributed SCM |
|
52 | Mercurial Distributed SCM | |
53 |
|
53 | |||
54 | list of commands: |
|
54 | list of commands: | |
55 |
|
55 | |||
56 | Repository creation: |
|
56 | Repository creation: | |
57 |
|
57 | |||
58 | clone make a copy of an existing repository |
|
58 | clone make a copy of an existing repository | |
59 | init create a new repository in the given directory |
|
59 | init create a new repository in the given directory | |
60 |
|
60 | |||
61 | Remote repository management: |
|
61 | Remote repository management: | |
62 |
|
62 | |||
63 | incoming show new changesets found in source |
|
63 | incoming show new changesets found in source | |
64 | outgoing show changesets not found in the destination |
|
64 | outgoing show changesets not found in the destination | |
65 | paths show aliases for remote repositories |
|
65 | paths show aliases for remote repositories | |
66 | pull pull changes from the specified source |
|
66 | pull pull changes from the specified source | |
67 | push push changes to the specified destination |
|
67 | push push changes to the specified destination | |
68 | serve start stand-alone webserver |
|
68 | serve start stand-alone webserver | |
69 |
|
69 | |||
70 | Change creation: |
|
70 | Change creation: | |
71 |
|
71 | |||
72 | commit commit the specified files or all outstanding changes |
|
72 | commit commit the specified files or all outstanding changes | |
73 |
|
73 | |||
74 | Change manipulation: |
|
74 | Change manipulation: | |
75 |
|
75 | |||
76 | backout reverse effect of earlier changeset |
|
76 | backout reverse effect of earlier changeset | |
77 | graft copy changes from other branches onto the current branch |
|
77 | graft copy changes from other branches onto the current branch | |
78 | merge merge another revision into working directory |
|
78 | merge merge another revision into working directory | |
79 |
|
79 | |||
80 | Change organization: |
|
80 | Change organization: | |
81 |
|
81 | |||
82 | bookmarks create a new bookmark or list existing bookmarks |
|
82 | bookmarks create a new bookmark or list existing bookmarks | |
83 | branch set or show the current branch name |
|
83 | branch set or show the current branch name | |
84 | branches list repository named branches |
|
84 | branches list repository named branches | |
85 | phase set or show the current phase name |
|
85 | phase set or show the current phase name | |
86 | tag add one or more tags for the current or given revision |
|
86 | tag add one or more tags for the current or given revision | |
87 | tags list repository tags |
|
87 | tags list repository tags | |
88 |
|
88 | |||
89 | File content management: |
|
89 | File content management: | |
90 |
|
90 | |||
91 | annotate show changeset information by line for each file |
|
91 | annotate show changeset information by line for each file | |
92 | cat output the current or given revision of files |
|
92 | cat output the current or given revision of files | |
93 | copy mark files as copied for the next commit |
|
93 | copy mark files as copied for the next commit | |
94 | diff diff repository (or selected files) |
|
94 | diff diff repository (or selected files) | |
95 | grep search for a pattern in specified files |
|
95 | grep search for a pattern in specified files | |
96 |
|
96 | |||
97 | Change navigation: |
|
97 | Change navigation: | |
98 |
|
98 | |||
99 | bisect subdivision search of changesets |
|
99 | bisect subdivision search of changesets | |
100 | heads show branch heads |
|
100 | heads show branch heads | |
101 | identify identify the working directory or specified revision |
|
101 | identify identify the working directory or specified revision | |
102 | log show revision history of entire repository or files |
|
102 | log show revision history of entire repository or files | |
103 |
|
103 | |||
104 | Working directory management: |
|
104 | Working directory management: | |
105 |
|
105 | |||
106 | add add the specified files on the next commit |
|
106 | add add the specified files on the next commit | |
107 | addremove add all new files, delete all missing files |
|
107 | addremove add all new files, delete all missing files | |
108 | files list tracked files |
|
108 | files list tracked files | |
109 | forget forget the specified files on the next commit |
|
109 | forget forget the specified files on the next commit | |
110 | remove remove the specified files on the next commit |
|
110 | remove remove the specified files on the next commit | |
111 | rename rename files; equivalent of copy + remove |
|
111 | rename rename files; equivalent of copy + remove | |
112 | resolve redo merges or set/view the merge status of files |
|
112 | resolve redo merges or set/view the merge status of files | |
113 | revert restore files to their checkout state |
|
113 | revert restore files to their checkout state | |
114 | root print the root (top) of the current working directory |
|
114 | root print the root (top) of the current working directory | |
115 | shelve save and set aside changes from the working directory |
|
115 | shelve save and set aside changes from the working directory | |
116 | status show changed files in the working directory |
|
116 | status show changed files in the working directory | |
117 | summary summarize working directory state |
|
117 | summary summarize working directory state | |
118 | unshelve restore a shelved change to the working directory |
|
118 | unshelve restore a shelved change to the working directory | |
119 | update update working directory (or switch revisions) |
|
119 | update update working directory (or switch revisions) | |
120 |
|
120 | |||
121 | Change import/export: |
|
121 | Change import/export: | |
122 |
|
122 | |||
123 | archive create an unversioned archive of a repository revision |
|
123 | archive create an unversioned archive of a repository revision | |
124 | bundle create a bundle file |
|
124 | bundle create a bundle file | |
125 | export dump the header and diffs for one or more changesets |
|
125 | export dump the header and diffs for one or more changesets | |
126 | import import an ordered set of patches |
|
126 | import import an ordered set of patches | |
127 | unbundle apply one or more bundle files |
|
127 | unbundle apply one or more bundle files | |
128 |
|
128 | |||
129 | Repository maintenance: |
|
129 | Repository maintenance: | |
130 |
|
130 | |||
131 | manifest output the current or given revision of the project manifest |
|
131 | manifest output the current or given revision of the project manifest | |
132 | recover roll back an interrupted transaction |
|
132 | recover roll back an interrupted transaction | |
133 | verify verify the integrity of the repository |
|
133 | verify verify the integrity of the repository | |
134 |
|
134 | |||
135 | Help: |
|
135 | Help: | |
136 |
|
136 | |||
137 | config show combined config settings from all hgrc files |
|
137 | config show combined config settings from all hgrc files | |
138 | help show help for a given topic or a help overview |
|
138 | help show help for a given topic or a help overview | |
139 | version output version and copyright information |
|
139 | version output version and copyright information | |
140 |
|
140 | |||
141 | additional help topics: |
|
141 | additional help topics: | |
142 |
|
142 | |||
143 | Mercurial identifiers: |
|
143 | Mercurial identifiers: | |
144 |
|
144 | |||
145 | filesets Specifying File Sets |
|
145 | filesets Specifying File Sets | |
146 | hgignore Syntax for Mercurial Ignore Files |
|
146 | hgignore Syntax for Mercurial Ignore Files | |
147 | patterns File Name Patterns |
|
147 | patterns File Name Patterns | |
148 | revisions Specifying Revisions |
|
148 | revisions Specifying Revisions | |
149 | urls URL Paths |
|
149 | urls URL Paths | |
150 |
|
150 | |||
151 | Mercurial output: |
|
151 | Mercurial output: | |
152 |
|
152 | |||
153 | color Colorizing Outputs |
|
153 | color Colorizing Outputs | |
154 | dates Date Formats |
|
154 | dates Date Formats | |
155 | diffs Diff Formats |
|
155 | diffs Diff Formats | |
156 | templating Template Usage |
|
156 | templating Template Usage | |
157 |
|
157 | |||
158 | Mercurial configuration: |
|
158 | Mercurial configuration: | |
159 |
|
159 | |||
160 | config Configuration Files |
|
160 | config Configuration Files | |
161 | environment Environment Variables |
|
161 | environment Environment Variables | |
162 | extensions Using Additional Features |
|
162 | extensions Using Additional Features | |
163 | flags Command-line flags |
|
163 | flags Command-line flags | |
164 | hgweb Configuring hgweb |
|
164 | hgweb Configuring hgweb | |
165 | merge-tools Merge Tools |
|
165 | merge-tools Merge Tools | |
166 | pager Pager Support |
|
166 | pager Pager Support | |
167 |
|
167 | |||
168 | Concepts: |
|
168 | Concepts: | |
169 |
|
169 | |||
170 | bundlespec Bundle File Formats |
|
170 | bundlespec Bundle File Formats | |
171 | glossary Glossary |
|
171 | glossary Glossary | |
172 | phases Working with Phases |
|
172 | phases Working with Phases | |
173 | subrepos Subrepositories |
|
173 | subrepos Subrepositories | |
174 |
|
174 | |||
175 | Miscellaneous: |
|
175 | Miscellaneous: | |
176 |
|
176 | |||
177 | deprecated Deprecated Features |
|
177 | deprecated Deprecated Features | |
178 | internals Technical implementation topics |
|
178 | internals Technical implementation topics | |
179 | scripting Using Mercurial from scripts and automation |
|
179 | scripting Using Mercurial from scripts and automation | |
180 |
|
180 | |||
181 | (use 'hg help -v' to show built-in aliases and global options) |
|
181 | (use 'hg help -v' to show built-in aliases and global options) | |
182 |
|
182 | |||
183 | $ hg -q help |
|
183 | $ hg -q help | |
184 | Repository creation: |
|
184 | Repository creation: | |
185 |
|
185 | |||
186 | clone make a copy of an existing repository |
|
186 | clone make a copy of an existing repository | |
187 | init create a new repository in the given directory |
|
187 | init create a new repository in the given directory | |
188 |
|
188 | |||
189 | Remote repository management: |
|
189 | Remote repository management: | |
190 |
|
190 | |||
191 | incoming show new changesets found in source |
|
191 | incoming show new changesets found in source | |
192 | outgoing show changesets not found in the destination |
|
192 | outgoing show changesets not found in the destination | |
193 | paths show aliases for remote repositories |
|
193 | paths show aliases for remote repositories | |
194 | pull pull changes from the specified source |
|
194 | pull pull changes from the specified source | |
195 | push push changes to the specified destination |
|
195 | push push changes to the specified destination | |
196 | serve start stand-alone webserver |
|
196 | serve start stand-alone webserver | |
197 |
|
197 | |||
198 | Change creation: |
|
198 | Change creation: | |
199 |
|
199 | |||
200 | commit commit the specified files or all outstanding changes |
|
200 | commit commit the specified files or all outstanding changes | |
201 |
|
201 | |||
202 | Change manipulation: |
|
202 | Change manipulation: | |
203 |
|
203 | |||
204 | backout reverse effect of earlier changeset |
|
204 | backout reverse effect of earlier changeset | |
205 | graft copy changes from other branches onto the current branch |
|
205 | graft copy changes from other branches onto the current branch | |
206 | merge merge another revision into working directory |
|
206 | merge merge another revision into working directory | |
207 |
|
207 | |||
208 | Change organization: |
|
208 | Change organization: | |
209 |
|
209 | |||
210 | bookmarks create a new bookmark or list existing bookmarks |
|
210 | bookmarks create a new bookmark or list existing bookmarks | |
211 | branch set or show the current branch name |
|
211 | branch set or show the current branch name | |
212 | branches list repository named branches |
|
212 | branches list repository named branches | |
213 | phase set or show the current phase name |
|
213 | phase set or show the current phase name | |
214 | tag add one or more tags for the current or given revision |
|
214 | tag add one or more tags for the current or given revision | |
215 | tags list repository tags |
|
215 | tags list repository tags | |
216 |
|
216 | |||
217 | File content management: |
|
217 | File content management: | |
218 |
|
218 | |||
219 | annotate show changeset information by line for each file |
|
219 | annotate show changeset information by line for each file | |
220 | cat output the current or given revision of files |
|
220 | cat output the current or given revision of files | |
221 | copy mark files as copied for the next commit |
|
221 | copy mark files as copied for the next commit | |
222 | diff diff repository (or selected files) |
|
222 | diff diff repository (or selected files) | |
223 | grep search for a pattern in specified files |
|
223 | grep search for a pattern in specified files | |
224 |
|
224 | |||
225 | Change navigation: |
|
225 | Change navigation: | |
226 |
|
226 | |||
227 | bisect subdivision search of changesets |
|
227 | bisect subdivision search of changesets | |
228 | heads show branch heads |
|
228 | heads show branch heads | |
229 | identify identify the working directory or specified revision |
|
229 | identify identify the working directory or specified revision | |
230 | log show revision history of entire repository or files |
|
230 | log show revision history of entire repository or files | |
231 |
|
231 | |||
232 | Working directory management: |
|
232 | Working directory management: | |
233 |
|
233 | |||
234 | add add the specified files on the next commit |
|
234 | add add the specified files on the next commit | |
235 | addremove add all new files, delete all missing files |
|
235 | addremove add all new files, delete all missing files | |
236 | files list tracked files |
|
236 | files list tracked files | |
237 | forget forget the specified files on the next commit |
|
237 | forget forget the specified files on the next commit | |
238 | remove remove the specified files on the next commit |
|
238 | remove remove the specified files on the next commit | |
239 | rename rename files; equivalent of copy + remove |
|
239 | rename rename files; equivalent of copy + remove | |
240 | resolve redo merges or set/view the merge status of files |
|
240 | resolve redo merges or set/view the merge status of files | |
241 | revert restore files to their checkout state |
|
241 | revert restore files to their checkout state | |
242 | root print the root (top) of the current working directory |
|
242 | root print the root (top) of the current working directory | |
243 | shelve save and set aside changes from the working directory |
|
243 | shelve save and set aside changes from the working directory | |
244 | status show changed files in the working directory |
|
244 | status show changed files in the working directory | |
245 | summary summarize working directory state |
|
245 | summary summarize working directory state | |
246 | unshelve restore a shelved change to the working directory |
|
246 | unshelve restore a shelved change to the working directory | |
247 | update update working directory (or switch revisions) |
|
247 | update update working directory (or switch revisions) | |
248 |
|
248 | |||
249 | Change import/export: |
|
249 | Change import/export: | |
250 |
|
250 | |||
251 | archive create an unversioned archive of a repository revision |
|
251 | archive create an unversioned archive of a repository revision | |
252 | bundle create a bundle file |
|
252 | bundle create a bundle file | |
253 | export dump the header and diffs for one or more changesets |
|
253 | export dump the header and diffs for one or more changesets | |
254 | import import an ordered set of patches |
|
254 | import import an ordered set of patches | |
255 | unbundle apply one or more bundle files |
|
255 | unbundle apply one or more bundle files | |
256 |
|
256 | |||
257 | Repository maintenance: |
|
257 | Repository maintenance: | |
258 |
|
258 | |||
259 | manifest output the current or given revision of the project manifest |
|
259 | manifest output the current or given revision of the project manifest | |
260 | recover roll back an interrupted transaction |
|
260 | recover roll back an interrupted transaction | |
261 | verify verify the integrity of the repository |
|
261 | verify verify the integrity of the repository | |
262 |
|
262 | |||
263 | Help: |
|
263 | Help: | |
264 |
|
264 | |||
265 | config show combined config settings from all hgrc files |
|
265 | config show combined config settings from all hgrc files | |
266 | help show help for a given topic or a help overview |
|
266 | help show help for a given topic or a help overview | |
267 | version output version and copyright information |
|
267 | version output version and copyright information | |
268 |
|
268 | |||
269 | additional help topics: |
|
269 | additional help topics: | |
270 |
|
270 | |||
271 | Mercurial identifiers: |
|
271 | Mercurial identifiers: | |
272 |
|
272 | |||
273 | filesets Specifying File Sets |
|
273 | filesets Specifying File Sets | |
274 | hgignore Syntax for Mercurial Ignore Files |
|
274 | hgignore Syntax for Mercurial Ignore Files | |
275 | patterns File Name Patterns |
|
275 | patterns File Name Patterns | |
276 | revisions Specifying Revisions |
|
276 | revisions Specifying Revisions | |
277 | urls URL Paths |
|
277 | urls URL Paths | |
278 |
|
278 | |||
279 | Mercurial output: |
|
279 | Mercurial output: | |
280 |
|
280 | |||
281 | color Colorizing Outputs |
|
281 | color Colorizing Outputs | |
282 | dates Date Formats |
|
282 | dates Date Formats | |
283 | diffs Diff Formats |
|
283 | diffs Diff Formats | |
284 | templating Template Usage |
|
284 | templating Template Usage | |
285 |
|
285 | |||
286 | Mercurial configuration: |
|
286 | Mercurial configuration: | |
287 |
|
287 | |||
288 | config Configuration Files |
|
288 | config Configuration Files | |
289 | environment Environment Variables |
|
289 | environment Environment Variables | |
290 | extensions Using Additional Features |
|
290 | extensions Using Additional Features | |
291 | flags Command-line flags |
|
291 | flags Command-line flags | |
292 | hgweb Configuring hgweb |
|
292 | hgweb Configuring hgweb | |
293 | merge-tools Merge Tools |
|
293 | merge-tools Merge Tools | |
294 | pager Pager Support |
|
294 | pager Pager Support | |
295 |
|
295 | |||
296 | Concepts: |
|
296 | Concepts: | |
297 |
|
297 | |||
298 | bundlespec Bundle File Formats |
|
298 | bundlespec Bundle File Formats | |
299 | glossary Glossary |
|
299 | glossary Glossary | |
300 | phases Working with Phases |
|
300 | phases Working with Phases | |
301 | subrepos Subrepositories |
|
301 | subrepos Subrepositories | |
302 |
|
302 | |||
303 | Miscellaneous: |
|
303 | Miscellaneous: | |
304 |
|
304 | |||
305 | deprecated Deprecated Features |
|
305 | deprecated Deprecated Features | |
306 | internals Technical implementation topics |
|
306 | internals Technical implementation topics | |
307 | scripting Using Mercurial from scripts and automation |
|
307 | scripting Using Mercurial from scripts and automation | |
308 |
|
308 | |||
309 | Test extension help: |
|
309 | Test extension help: | |
310 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
310 | $ hg help extensions --config extensions.rebase= --config extensions.children= | |
311 | Using Additional Features |
|
311 | Using Additional Features | |
312 | """"""""""""""""""""""""" |
|
312 | """"""""""""""""""""""""" | |
313 |
|
313 | |||
314 | Mercurial has the ability to add new features through the use of |
|
314 | Mercurial has the ability to add new features through the use of | |
315 | extensions. Extensions may add new commands, add options to existing |
|
315 | extensions. Extensions may add new commands, add options to existing | |
316 | commands, change the default behavior of commands, or implement hooks. |
|
316 | commands, change the default behavior of commands, or implement hooks. | |
317 |
|
317 | |||
318 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
318 | To enable the "foo" extension, either shipped with Mercurial or in the | |
319 | Python search path, create an entry for it in your configuration file, |
|
319 | Python search path, create an entry for it in your configuration file, | |
320 | like this: |
|
320 | like this: | |
321 |
|
321 | |||
322 | [extensions] |
|
322 | [extensions] | |
323 | foo = |
|
323 | foo = | |
324 |
|
324 | |||
325 | You may also specify the full path to an extension: |
|
325 | You may also specify the full path to an extension: | |
326 |
|
326 | |||
327 | [extensions] |
|
327 | [extensions] | |
328 | myfeature = ~/.hgext/myfeature.py |
|
328 | myfeature = ~/.hgext/myfeature.py | |
329 |
|
329 | |||
330 | See 'hg help config' for more information on configuration files. |
|
330 | See 'hg help config' for more information on configuration files. | |
331 |
|
331 | |||
332 | Extensions are not loaded by default for a variety of reasons: they can |
|
332 | Extensions are not loaded by default for a variety of reasons: they can | |
333 | increase startup overhead; they may be meant for advanced usage only; they |
|
333 | increase startup overhead; they may be meant for advanced usage only; they | |
334 | may provide potentially dangerous abilities (such as letting you destroy |
|
334 | may provide potentially dangerous abilities (such as letting you destroy | |
335 | or modify history); they might not be ready for prime time; or they may |
|
335 | or modify history); they might not be ready for prime time; or they may | |
336 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
336 | alter some usual behaviors of stock Mercurial. It is thus up to the user | |
337 | to activate extensions as needed. |
|
337 | to activate extensions as needed. | |
338 |
|
338 | |||
339 | To explicitly disable an extension enabled in a configuration file of |
|
339 | To explicitly disable an extension enabled in a configuration file of | |
340 | broader scope, prepend its path with !: |
|
340 | broader scope, prepend its path with !: | |
341 |
|
341 | |||
342 | [extensions] |
|
342 | [extensions] | |
343 | # disabling extension bar residing in /path/to/extension/bar.py |
|
343 | # disabling extension bar residing in /path/to/extension/bar.py | |
344 | bar = !/path/to/extension/bar.py |
|
344 | bar = !/path/to/extension/bar.py | |
345 | # ditto, but no path was supplied for extension baz |
|
345 | # ditto, but no path was supplied for extension baz | |
346 | baz = ! |
|
346 | baz = ! | |
347 |
|
347 | |||
348 | enabled extensions: |
|
348 | enabled extensions: | |
349 |
|
349 | |||
350 | children command to display child changesets (DEPRECATED) |
|
350 | children command to display child changesets (DEPRECATED) | |
351 | rebase command to move sets of revisions to a different ancestor |
|
351 | rebase command to move sets of revisions to a different ancestor | |
352 |
|
352 | |||
353 | disabled extensions: |
|
353 | disabled extensions: | |
354 |
|
354 | |||
355 | acl hooks for controlling repository access |
|
355 | acl hooks for controlling repository access | |
356 | blackbox log repository events to a blackbox for debugging |
|
356 | blackbox log repository events to a blackbox for debugging | |
357 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
357 | bugzilla hooks for integrating with the Bugzilla bug tracker | |
358 | censor erase file content at a given revision |
|
358 | censor erase file content at a given revision | |
359 | churn command to display statistics about repository history |
|
359 | churn command to display statistics about repository history | |
360 | clonebundles advertise pre-generated bundles to seed clones |
|
360 | clonebundles advertise pre-generated bundles to seed clones | |
361 | closehead close arbitrary heads without checking them out first |
|
361 | closehead close arbitrary heads without checking them out first | |
362 | convert import revisions from foreign VCS repositories into |
|
362 | convert import revisions from foreign VCS repositories into | |
363 | Mercurial |
|
363 | Mercurial | |
364 | eol automatically manage newlines in repository files |
|
364 | eol automatically manage newlines in repository files | |
365 | extdiff command to allow external programs to compare revisions |
|
365 | extdiff command to allow external programs to compare revisions | |
366 | factotum http authentication with factotum |
|
366 | factotum http authentication with factotum | |
367 | fastexport export repositories as git fast-import stream |
|
367 | fastexport export repositories as git fast-import stream | |
368 | githelp try mapping git commands to Mercurial commands |
|
368 | githelp try mapping git commands to Mercurial commands | |
369 | gpg commands to sign and verify changesets |
|
369 | gpg commands to sign and verify changesets | |
370 | hgk browse the repository in a graphical way |
|
370 | hgk browse the repository in a graphical way | |
371 | highlight syntax highlighting for hgweb (requires Pygments) |
|
371 | highlight syntax highlighting for hgweb (requires Pygments) | |
372 | histedit interactive history editing |
|
372 | histedit interactive history editing | |
373 | keyword expand keywords in tracked files |
|
373 | keyword expand keywords in tracked files | |
374 | largefiles track large binary files |
|
374 | largefiles track large binary files | |
375 | mq manage a stack of patches |
|
375 | mq manage a stack of patches | |
376 | notify hooks for sending email push notifications |
|
376 | notify hooks for sending email push notifications | |
377 | patchbomb command to send changesets as (a series of) patch emails |
|
377 | patchbomb command to send changesets as (a series of) patch emails | |
378 | purge command to delete untracked files from the working |
|
378 | purge command to delete untracked files from the working | |
379 | directory |
|
379 | directory | |
380 | relink recreates hardlinks between repository clones |
|
380 | relink recreates hardlinks between repository clones | |
381 | schemes extend schemes with shortcuts to repository swarms |
|
381 | schemes extend schemes with shortcuts to repository swarms | |
382 | share share a common history between several working directories |
|
382 | share share a common history between several working directories | |
383 | strip strip changesets and their descendants from history |
|
383 | strip strip changesets and their descendants from history | |
384 | transplant command to transplant changesets from another branch |
|
384 | transplant command to transplant changesets from another branch | |
385 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
385 | win32mbcs allow the use of MBCS paths with problematic encodings | |
386 | zeroconf discover and advertise repositories on the local network |
|
386 | zeroconf discover and advertise repositories on the local network | |
387 |
|
387 | |||
388 | #endif |
|
388 | #endif | |
389 |
|
389 | |||
390 | Verify that deprecated extensions are included if --verbose: |
|
390 | Verify that deprecated extensions are included if --verbose: | |
391 |
|
391 | |||
392 | $ hg -v help extensions | grep children |
|
392 | $ hg -v help extensions | grep children | |
393 | children command to display child changesets (DEPRECATED) |
|
393 | children command to display child changesets (DEPRECATED) | |
394 |
|
394 | |||
395 | Verify that extension keywords appear in help templates |
|
395 | Verify that extension keywords appear in help templates | |
396 |
|
396 | |||
397 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null |
|
397 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null | |
398 |
|
398 | |||
399 | Test short command list with verbose option |
|
399 | Test short command list with verbose option | |
400 |
|
400 | |||
401 | $ hg -v help shortlist |
|
401 | $ hg -v help shortlist | |
402 | Mercurial Distributed SCM |
|
402 | Mercurial Distributed SCM | |
403 |
|
403 | |||
404 | basic commands: |
|
404 | basic commands: | |
405 |
|
405 | |||
406 | abort abort an unfinished operation (EXPERIMENTAL) |
|
406 | abort abort an unfinished operation (EXPERIMENTAL) | |
407 | add add the specified files on the next commit |
|
407 | add add the specified files on the next commit | |
408 | annotate, blame |
|
408 | annotate, blame | |
409 | show changeset information by line for each file |
|
409 | show changeset information by line for each file | |
410 | clone make a copy of an existing repository |
|
410 | clone make a copy of an existing repository | |
411 | commit, ci commit the specified files or all outstanding changes |
|
411 | commit, ci commit the specified files or all outstanding changes | |
412 | continue resumes an interrupted operation (EXPERIMENTAL) |
|
412 | continue resumes an interrupted operation (EXPERIMENTAL) | |
413 | diff diff repository (or selected files) |
|
413 | diff diff repository (or selected files) | |
414 | export dump the header and diffs for one or more changesets |
|
414 | export dump the header and diffs for one or more changesets | |
415 | forget forget the specified files on the next commit |
|
415 | forget forget the specified files on the next commit | |
416 | init create a new repository in the given directory |
|
416 | init create a new repository in the given directory | |
417 | log, history show revision history of entire repository or files |
|
417 | log, history show revision history of entire repository or files | |
418 | merge merge another revision into working directory |
|
418 | merge merge another revision into working directory | |
419 | pull pull changes from the specified source |
|
419 | pull pull changes from the specified source | |
420 | push push changes to the specified destination |
|
420 | push push changes to the specified destination | |
421 | remove, rm remove the specified files on the next commit |
|
421 | remove, rm remove the specified files on the next commit | |
422 | serve start stand-alone webserver |
|
422 | serve start stand-alone webserver | |
423 | status, st show changed files in the working directory |
|
423 | status, st show changed files in the working directory | |
424 | summary, sum summarize working directory state |
|
424 | summary, sum summarize working directory state | |
425 | update, up, checkout, co |
|
425 | update, up, checkout, co | |
426 | update working directory (or switch revisions) |
|
426 | update working directory (or switch revisions) | |
427 |
|
427 | |||
428 | global options ([+] can be repeated): |
|
428 | global options ([+] can be repeated): | |
429 |
|
429 | |||
430 | -R --repository REPO repository root directory or name of overlay bundle |
|
430 | -R --repository REPO repository root directory or name of overlay bundle | |
431 | file |
|
431 | file | |
432 | --cwd DIR change working directory |
|
432 | --cwd DIR change working directory | |
433 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
433 | -y --noninteractive do not prompt, automatically pick the first choice for | |
434 | all prompts |
|
434 | all prompts | |
435 | -q --quiet suppress output |
|
435 | -q --quiet suppress output | |
436 | -v --verbose enable additional output |
|
436 | -v --verbose enable additional output | |
437 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
437 | --color TYPE when to colorize (boolean, always, auto, never, or | |
438 | debug) |
|
438 | debug) | |
439 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
439 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
440 | --debug enable debugging output |
|
440 | --debug enable debugging output | |
441 | --debugger start debugger |
|
441 | --debugger start debugger | |
442 | --encoding ENCODE set the charset encoding (default: ascii) |
|
442 | --encoding ENCODE set the charset encoding (default: ascii) | |
443 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
443 | --encodingmode MODE set the charset encoding mode (default: strict) | |
444 | --traceback always print a traceback on exception |
|
444 | --traceback always print a traceback on exception | |
445 | --time time how long the command takes |
|
445 | --time time how long the command takes | |
446 | --profile print command execution profile |
|
446 | --profile print command execution profile | |
447 | --version output version information and exit |
|
447 | --version output version information and exit | |
448 | -h --help display help and exit |
|
448 | -h --help display help and exit | |
449 | --hidden consider hidden changesets |
|
449 | --hidden consider hidden changesets | |
450 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
450 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
451 | (default: auto) |
|
451 | (default: auto) | |
452 |
|
452 | |||
453 | (use 'hg help' for the full list of commands) |
|
453 | (use 'hg help' for the full list of commands) | |
454 |
|
454 | |||
455 | $ hg add -h |
|
455 | $ hg add -h | |
456 | hg add [OPTION]... [FILE]... |
|
456 | hg add [OPTION]... [FILE]... | |
457 |
|
457 | |||
458 | add the specified files on the next commit |
|
458 | add the specified files on the next commit | |
459 |
|
459 | |||
460 | Schedule files to be version controlled and added to the repository. |
|
460 | Schedule files to be version controlled and added to the repository. | |
461 |
|
461 | |||
462 | The files will be added to the repository at the next commit. To undo an |
|
462 | The files will be added to the repository at the next commit. To undo an | |
463 | add before that, see 'hg forget'. |
|
463 | add before that, see 'hg forget'. | |
464 |
|
464 | |||
465 | If no names are given, add all files to the repository (except files |
|
465 | If no names are given, add all files to the repository (except files | |
466 | matching ".hgignore"). |
|
466 | matching ".hgignore"). | |
467 |
|
467 | |||
468 | Returns 0 if all files are successfully added. |
|
468 | Returns 0 if all files are successfully added. | |
469 |
|
469 | |||
470 | options ([+] can be repeated): |
|
470 | options ([+] can be repeated): | |
471 |
|
471 | |||
472 | -I --include PATTERN [+] include names matching the given patterns |
|
472 | -I --include PATTERN [+] include names matching the given patterns | |
473 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
473 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
474 | -S --subrepos recurse into subrepositories |
|
474 | -S --subrepos recurse into subrepositories | |
475 | -n --dry-run do not perform actions, just print output |
|
475 | -n --dry-run do not perform actions, just print output | |
476 |
|
476 | |||
477 | (some details hidden, use --verbose to show complete help) |
|
477 | (some details hidden, use --verbose to show complete help) | |
478 |
|
478 | |||
479 | Verbose help for add |
|
479 | Verbose help for add | |
480 |
|
480 | |||
481 | $ hg add -hv |
|
481 | $ hg add -hv | |
482 | hg add [OPTION]... [FILE]... |
|
482 | hg add [OPTION]... [FILE]... | |
483 |
|
483 | |||
484 | add the specified files on the next commit |
|
484 | add the specified files on the next commit | |
485 |
|
485 | |||
486 | Schedule files to be version controlled and added to the repository. |
|
486 | Schedule files to be version controlled and added to the repository. | |
487 |
|
487 | |||
488 | The files will be added to the repository at the next commit. To undo an |
|
488 | The files will be added to the repository at the next commit. To undo an | |
489 | add before that, see 'hg forget'. |
|
489 | add before that, see 'hg forget'. | |
490 |
|
490 | |||
491 | If no names are given, add all files to the repository (except files |
|
491 | If no names are given, add all files to the repository (except files | |
492 | matching ".hgignore"). |
|
492 | matching ".hgignore"). | |
493 |
|
493 | |||
494 | Examples: |
|
494 | Examples: | |
495 |
|
495 | |||
496 | - New (unknown) files are added automatically by 'hg add': |
|
496 | - New (unknown) files are added automatically by 'hg add': | |
497 |
|
497 | |||
498 | $ ls |
|
498 | $ ls | |
499 | foo.c |
|
499 | foo.c | |
500 | $ hg status |
|
500 | $ hg status | |
501 | ? foo.c |
|
501 | ? foo.c | |
502 | $ hg add |
|
502 | $ hg add | |
503 | adding foo.c |
|
503 | adding foo.c | |
504 | $ hg status |
|
504 | $ hg status | |
505 | A foo.c |
|
505 | A foo.c | |
506 |
|
506 | |||
507 | - Specific files to be added can be specified: |
|
507 | - Specific files to be added can be specified: | |
508 |
|
508 | |||
509 | $ ls |
|
509 | $ ls | |
510 | bar.c foo.c |
|
510 | bar.c foo.c | |
511 | $ hg status |
|
511 | $ hg status | |
512 | ? bar.c |
|
512 | ? bar.c | |
513 | ? foo.c |
|
513 | ? foo.c | |
514 | $ hg add bar.c |
|
514 | $ hg add bar.c | |
515 | $ hg status |
|
515 | $ hg status | |
516 | A bar.c |
|
516 | A bar.c | |
517 | ? foo.c |
|
517 | ? foo.c | |
518 |
|
518 | |||
519 | Returns 0 if all files are successfully added. |
|
519 | Returns 0 if all files are successfully added. | |
520 |
|
520 | |||
521 | options ([+] can be repeated): |
|
521 | options ([+] can be repeated): | |
522 |
|
522 | |||
523 | -I --include PATTERN [+] include names matching the given patterns |
|
523 | -I --include PATTERN [+] include names matching the given patterns | |
524 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
524 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
525 | -S --subrepos recurse into subrepositories |
|
525 | -S --subrepos recurse into subrepositories | |
526 | -n --dry-run do not perform actions, just print output |
|
526 | -n --dry-run do not perform actions, just print output | |
527 |
|
527 | |||
528 | global options ([+] can be repeated): |
|
528 | global options ([+] can be repeated): | |
529 |
|
529 | |||
530 | -R --repository REPO repository root directory or name of overlay bundle |
|
530 | -R --repository REPO repository root directory or name of overlay bundle | |
531 | file |
|
531 | file | |
532 | --cwd DIR change working directory |
|
532 | --cwd DIR change working directory | |
533 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
533 | -y --noninteractive do not prompt, automatically pick the first choice for | |
534 | all prompts |
|
534 | all prompts | |
535 | -q --quiet suppress output |
|
535 | -q --quiet suppress output | |
536 | -v --verbose enable additional output |
|
536 | -v --verbose enable additional output | |
537 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
537 | --color TYPE when to colorize (boolean, always, auto, never, or | |
538 | debug) |
|
538 | debug) | |
539 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
539 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
540 | --debug enable debugging output |
|
540 | --debug enable debugging output | |
541 | --debugger start debugger |
|
541 | --debugger start debugger | |
542 | --encoding ENCODE set the charset encoding (default: ascii) |
|
542 | --encoding ENCODE set the charset encoding (default: ascii) | |
543 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
543 | --encodingmode MODE set the charset encoding mode (default: strict) | |
544 | --traceback always print a traceback on exception |
|
544 | --traceback always print a traceback on exception | |
545 | --time time how long the command takes |
|
545 | --time time how long the command takes | |
546 | --profile print command execution profile |
|
546 | --profile print command execution profile | |
547 | --version output version information and exit |
|
547 | --version output version information and exit | |
548 | -h --help display help and exit |
|
548 | -h --help display help and exit | |
549 | --hidden consider hidden changesets |
|
549 | --hidden consider hidden changesets | |
550 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
550 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
551 | (default: auto) |
|
551 | (default: auto) | |
552 |
|
552 | |||
553 | Test the textwidth config option |
|
553 | Test the textwidth config option | |
554 |
|
554 | |||
555 | $ hg root -h --config ui.textwidth=50 |
|
555 | $ hg root -h --config ui.textwidth=50 | |
556 | hg root |
|
556 | hg root | |
557 |
|
557 | |||
558 | print the root (top) of the current working |
|
558 | print the root (top) of the current working | |
559 | directory |
|
559 | directory | |
560 |
|
560 | |||
561 | Print the root directory of the current |
|
561 | Print the root directory of the current | |
562 | repository. |
|
562 | repository. | |
563 |
|
563 | |||
564 | Returns 0 on success. |
|
564 | Returns 0 on success. | |
565 |
|
565 | |||
566 | options: |
|
566 | options: | |
567 |
|
567 | |||
568 | -T --template TEMPLATE display with template |
|
568 | -T --template TEMPLATE display with template | |
569 |
|
569 | |||
570 | (some details hidden, use --verbose to show |
|
570 | (some details hidden, use --verbose to show | |
571 | complete help) |
|
571 | complete help) | |
572 |
|
572 | |||
573 | Test help option with version option |
|
573 | Test help option with version option | |
574 |
|
574 | |||
575 | $ hg add -h --version |
|
575 | $ hg add -h --version | |
576 | Mercurial Distributed SCM (version *) (glob) |
|
576 | Mercurial Distributed SCM (version *) (glob) | |
577 | (see https://mercurial-scm.org for more information) |
|
577 | (see https://mercurial-scm.org for more information) | |
578 |
|
578 | |||
579 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
579 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
580 | This is free software; see the source for copying conditions. There is NO |
|
580 | This is free software; see the source for copying conditions. There is NO | |
581 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
581 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
582 |
|
582 | |||
583 | $ hg add --skjdfks |
|
583 | $ hg add --skjdfks | |
584 | hg add: option --skjdfks not recognized |
|
584 | hg add: option --skjdfks not recognized | |
585 | hg add [OPTION]... [FILE]... |
|
585 | hg add [OPTION]... [FILE]... | |
586 |
|
586 | |||
587 | add the specified files on the next commit |
|
587 | add the specified files on the next commit | |
588 |
|
588 | |||
589 | options ([+] can be repeated): |
|
589 | options ([+] can be repeated): | |
590 |
|
590 | |||
591 | -I --include PATTERN [+] include names matching the given patterns |
|
591 | -I --include PATTERN [+] include names matching the given patterns | |
592 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
592 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
593 | -S --subrepos recurse into subrepositories |
|
593 | -S --subrepos recurse into subrepositories | |
594 | -n --dry-run do not perform actions, just print output |
|
594 | -n --dry-run do not perform actions, just print output | |
595 |
|
595 | |||
596 | (use 'hg add -h' to show more help) |
|
596 | (use 'hg add -h' to show more help) | |
597 | [255] |
|
597 | [255] | |
598 |
|
598 | |||
599 | Test ambiguous command help |
|
599 | Test ambiguous command help | |
600 |
|
600 | |||
601 | $ hg help ad |
|
601 | $ hg help ad | |
602 | list of commands: |
|
602 | list of commands: | |
603 |
|
603 | |||
604 | add add the specified files on the next commit |
|
604 | add add the specified files on the next commit | |
605 | addremove add all new files, delete all missing files |
|
605 | addremove add all new files, delete all missing files | |
606 |
|
606 | |||
607 | (use 'hg help -v ad' to show built-in aliases and global options) |
|
607 | (use 'hg help -v ad' to show built-in aliases and global options) | |
608 |
|
608 | |||
609 | Test command without options |
|
609 | Test command without options | |
610 |
|
610 | |||
611 | $ hg help verify |
|
611 | $ hg help verify | |
612 | hg verify |
|
612 | hg verify | |
613 |
|
613 | |||
614 | verify the integrity of the repository |
|
614 | verify the integrity of the repository | |
615 |
|
615 | |||
616 | Verify the integrity of the current repository. |
|
616 | Verify the integrity of the current repository. | |
617 |
|
617 | |||
618 | This will perform an extensive check of the repository's integrity, |
|
618 | This will perform an extensive check of the repository's integrity, | |
619 | validating the hashes and checksums of each entry in the changelog, |
|
619 | validating the hashes and checksums of each entry in the changelog, | |
620 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
620 | manifest, and tracked files, as well as the integrity of their crosslinks | |
621 | and indices. |
|
621 | and indices. | |
622 |
|
622 | |||
623 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more |
|
623 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more | |
624 | information about recovery from corruption of the repository. |
|
624 | information about recovery from corruption of the repository. | |
625 |
|
625 | |||
626 | Returns 0 on success, 1 if errors are encountered. |
|
626 | Returns 0 on success, 1 if errors are encountered. | |
627 |
|
627 | |||
628 | options: |
|
628 | options: | |
629 |
|
629 | |||
630 | (some details hidden, use --verbose to show complete help) |
|
630 | (some details hidden, use --verbose to show complete help) | |
631 |
|
631 | |||
632 | $ hg help diff |
|
632 | $ hg help diff | |
633 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
633 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
634 |
|
634 | |||
635 | diff repository (or selected files) |
|
635 | diff repository (or selected files) | |
636 |
|
636 | |||
637 | Show differences between revisions for the specified files. |
|
637 | Show differences between revisions for the specified files. | |
638 |
|
638 | |||
639 | Differences between files are shown using the unified diff format. |
|
639 | Differences between files are shown using the unified diff format. | |
640 |
|
640 | |||
641 | Note: |
|
641 | Note: | |
642 | 'hg diff' may generate unexpected results for merges, as it will |
|
642 | 'hg diff' may generate unexpected results for merges, as it will | |
643 | default to comparing against the working directory's first parent |
|
643 | default to comparing against the working directory's first parent | |
644 | changeset if no revisions are specified. |
|
644 | changeset if no revisions are specified. | |
645 |
|
645 | |||
646 | When two revision arguments are given, then changes are shown between |
|
646 | When two revision arguments are given, then changes are shown between | |
647 | those revisions. If only one revision is specified then that revision is |
|
647 | those revisions. If only one revision is specified then that revision is | |
648 | compared to the working directory, and, when no revisions are specified, |
|
648 | compared to the working directory, and, when no revisions are specified, | |
649 | the working directory files are compared to its first parent. |
|
649 | the working directory files are compared to its first parent. | |
650 |
|
650 | |||
651 | Alternatively you can specify -c/--change with a revision to see the |
|
651 | Alternatively you can specify -c/--change with a revision to see the | |
652 | changes in that changeset relative to its first parent. |
|
652 | changes in that changeset relative to its first parent. | |
653 |
|
653 | |||
654 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
654 | Without the -a/--text option, diff will avoid generating diffs of files it | |
655 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
655 | detects as binary. With -a, diff will generate a diff anyway, probably | |
656 | with undesirable results. |
|
656 | with undesirable results. | |
657 |
|
657 | |||
658 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
658 | Use the -g/--git option to generate diffs in the git extended diff format. | |
659 | For more information, read 'hg help diffs'. |
|
659 | For more information, read 'hg help diffs'. | |
660 |
|
660 | |||
661 | Returns 0 on success. |
|
661 | Returns 0 on success. | |
662 |
|
662 | |||
663 | options ([+] can be repeated): |
|
663 | options ([+] can be repeated): | |
664 |
|
664 | |||
665 | -r --rev REV [+] revision |
|
665 | -r --rev REV [+] revision | |
666 | -c --change REV change made by revision |
|
666 | -c --change REV change made by revision | |
667 | -a --text treat all files as text |
|
667 | -a --text treat all files as text | |
668 | -g --git use git extended diff format |
|
668 | -g --git use git extended diff format | |
669 | --binary generate binary diffs in git mode (default) |
|
669 | --binary generate binary diffs in git mode (default) | |
670 | --nodates omit dates from diff headers |
|
670 | --nodates omit dates from diff headers | |
671 | --noprefix omit a/ and b/ prefixes from filenames |
|
671 | --noprefix omit a/ and b/ prefixes from filenames | |
672 | -p --show-function show which function each change is in |
|
672 | -p --show-function show which function each change is in | |
673 | --reverse produce a diff that undoes the changes |
|
673 | --reverse produce a diff that undoes the changes | |
674 | -w --ignore-all-space ignore white space when comparing lines |
|
674 | -w --ignore-all-space ignore white space when comparing lines | |
675 | -b --ignore-space-change ignore changes in the amount of white space |
|
675 | -b --ignore-space-change ignore changes in the amount of white space | |
676 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
676 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
677 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL |
|
677 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL | |
678 | -U --unified NUM number of lines of context to show |
|
678 | -U --unified NUM number of lines of context to show | |
679 | --stat output diffstat-style summary of changes |
|
679 | --stat output diffstat-style summary of changes | |
680 | --root DIR produce diffs relative to subdirectory |
|
680 | --root DIR produce diffs relative to subdirectory | |
681 | -I --include PATTERN [+] include names matching the given patterns |
|
681 | -I --include PATTERN [+] include names matching the given patterns | |
682 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
682 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
683 | -S --subrepos recurse into subrepositories |
|
683 | -S --subrepos recurse into subrepositories | |
684 |
|
684 | |||
685 | (some details hidden, use --verbose to show complete help) |
|
685 | (some details hidden, use --verbose to show complete help) | |
686 |
|
686 | |||
687 | $ hg help status |
|
687 | $ hg help status | |
688 | hg status [OPTION]... [FILE]... |
|
688 | hg status [OPTION]... [FILE]... | |
689 |
|
689 | |||
690 | aliases: st |
|
690 | aliases: st | |
691 |
|
691 | |||
692 | show changed files in the working directory |
|
692 | show changed files in the working directory | |
693 |
|
693 | |||
694 | Show status of files in the repository. If names are given, only files |
|
694 | Show status of files in the repository. If names are given, only files | |
695 | that match are shown. Files that are clean or ignored or the source of a |
|
695 | that match are shown. Files that are clean or ignored or the source of a | |
696 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
696 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
697 | -C/--copies or -A/--all are given. Unless options described with "show |
|
697 | -C/--copies or -A/--all are given. Unless options described with "show | |
698 | only ..." are given, the options -mardu are used. |
|
698 | only ..." are given, the options -mardu are used. | |
699 |
|
699 | |||
700 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
700 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
701 | explicitly requested with -u/--unknown or -i/--ignored. |
|
701 | explicitly requested with -u/--unknown or -i/--ignored. | |
702 |
|
702 | |||
703 | Note: |
|
703 | Note: | |
704 | 'hg status' may appear to disagree with diff if permissions have |
|
704 | 'hg status' may appear to disagree with diff if permissions have | |
705 | changed or a merge has occurred. The standard diff format does not |
|
705 | changed or a merge has occurred. The standard diff format does not | |
706 | report permission changes and diff only reports changes relative to one |
|
706 | report permission changes and diff only reports changes relative to one | |
707 | merge parent. |
|
707 | merge parent. | |
708 |
|
708 | |||
709 | If one revision is given, it is used as the base revision. If two |
|
709 | If one revision is given, it is used as the base revision. If two | |
710 | revisions are given, the differences between them are shown. The --change |
|
710 | revisions are given, the differences between them are shown. The --change | |
711 | option can also be used as a shortcut to list the changed files of a |
|
711 | option can also be used as a shortcut to list the changed files of a | |
712 | revision from its first parent. |
|
712 | revision from its first parent. | |
713 |
|
713 | |||
714 | The codes used to show the status of files are: |
|
714 | The codes used to show the status of files are: | |
715 |
|
715 | |||
716 | M = modified |
|
716 | M = modified | |
717 | A = added |
|
717 | A = added | |
718 | R = removed |
|
718 | R = removed | |
719 | C = clean |
|
719 | C = clean | |
720 | ! = missing (deleted by non-hg command, but still tracked) |
|
720 | ! = missing (deleted by non-hg command, but still tracked) | |
721 | ? = not tracked |
|
721 | ? = not tracked | |
722 | I = ignored |
|
722 | I = ignored | |
723 | = origin of the previous file (with --copies) |
|
723 | = origin of the previous file (with --copies) | |
724 |
|
724 | |||
725 | Returns 0 on success. |
|
725 | Returns 0 on success. | |
726 |
|
726 | |||
727 | options ([+] can be repeated): |
|
727 | options ([+] can be repeated): | |
728 |
|
728 | |||
729 | -A --all show status of all files |
|
729 | -A --all show status of all files | |
730 | -m --modified show only modified files |
|
730 | -m --modified show only modified files | |
731 | -a --added show only added files |
|
731 | -a --added show only added files | |
732 | -r --removed show only removed files |
|
732 | -r --removed show only removed files | |
733 | -d --deleted show only deleted (but tracked) files |
|
733 | -d --deleted show only deleted (but tracked) files | |
734 | -c --clean show only files without changes |
|
734 | -c --clean show only files without changes | |
735 | -u --unknown show only unknown (not tracked) files |
|
735 | -u --unknown show only unknown (not tracked) files | |
736 | -i --ignored show only ignored files |
|
736 | -i --ignored show only ignored files | |
737 | -n --no-status hide status prefix |
|
737 | -n --no-status hide status prefix | |
738 | -C --copies show source of copied files |
|
738 | -C --copies show source of copied files | |
739 | -0 --print0 end filenames with NUL, for use with xargs |
|
739 | -0 --print0 end filenames with NUL, for use with xargs | |
740 | --rev REV [+] show difference from revision |
|
740 | --rev REV [+] show difference from revision | |
741 | --change REV list the changed files of a revision |
|
741 | --change REV list the changed files of a revision | |
742 | -I --include PATTERN [+] include names matching the given patterns |
|
742 | -I --include PATTERN [+] include names matching the given patterns | |
743 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
743 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
744 | -S --subrepos recurse into subrepositories |
|
744 | -S --subrepos recurse into subrepositories | |
745 | -T --template TEMPLATE display with template |
|
745 | -T --template TEMPLATE display with template | |
746 |
|
746 | |||
747 | (some details hidden, use --verbose to show complete help) |
|
747 | (some details hidden, use --verbose to show complete help) | |
748 |
|
748 | |||
749 | $ hg -q help status |
|
749 | $ hg -q help status | |
750 | hg status [OPTION]... [FILE]... |
|
750 | hg status [OPTION]... [FILE]... | |
751 |
|
751 | |||
752 | show changed files in the working directory |
|
752 | show changed files in the working directory | |
753 |
|
753 | |||
754 | $ hg help foo |
|
754 | $ hg help foo | |
755 | abort: no such help topic: foo |
|
755 | abort: no such help topic: foo | |
756 | (try 'hg help --keyword foo') |
|
756 | (try 'hg help --keyword foo') | |
757 | [255] |
|
757 | [255] | |
758 |
|
758 | |||
759 | $ hg skjdfks |
|
759 | $ hg skjdfks | |
760 | hg: unknown command 'skjdfks' |
|
760 | hg: unknown command 'skjdfks' | |
761 | (use 'hg help' for a list of commands) |
|
761 | (use 'hg help' for a list of commands) | |
762 | [255] |
|
762 | [255] | |
763 |
|
763 | |||
764 | Typoed command gives suggestion |
|
764 | Typoed command gives suggestion | |
765 | $ hg puls |
|
765 | $ hg puls | |
766 | hg: unknown command 'puls' |
|
766 | hg: unknown command 'puls' | |
767 | (did you mean one of pull, push?) |
|
767 | (did you mean one of pull, push?) | |
768 | [255] |
|
768 | [255] | |
769 |
|
769 | |||
770 | Not enabled extension gets suggested |
|
770 | Not enabled extension gets suggested | |
771 |
|
771 | |||
772 | $ hg rebase |
|
772 | $ hg rebase | |
773 | hg: unknown command 'rebase' |
|
773 | hg: unknown command 'rebase' | |
774 | 'rebase' is provided by the following extension: |
|
774 | 'rebase' is provided by the following extension: | |
775 |
|
775 | |||
776 | rebase command to move sets of revisions to a different ancestor |
|
776 | rebase command to move sets of revisions to a different ancestor | |
777 |
|
777 | |||
778 | (use 'hg help extensions' for information on enabling extensions) |
|
778 | (use 'hg help extensions' for information on enabling extensions) | |
779 | [255] |
|
779 | [255] | |
780 |
|
780 | |||
781 | Disabled extension gets suggested |
|
781 | Disabled extension gets suggested | |
782 | $ hg --config extensions.rebase=! rebase |
|
782 | $ hg --config extensions.rebase=! rebase | |
783 | hg: unknown command 'rebase' |
|
783 | hg: unknown command 'rebase' | |
784 | 'rebase' is provided by the following extension: |
|
784 | 'rebase' is provided by the following extension: | |
785 |
|
785 | |||
786 | rebase command to move sets of revisions to a different ancestor |
|
786 | rebase command to move sets of revisions to a different ancestor | |
787 |
|
787 | |||
788 | (use 'hg help extensions' for information on enabling extensions) |
|
788 | (use 'hg help extensions' for information on enabling extensions) | |
789 | [255] |
|
789 | [255] | |
790 |
|
790 | |||
791 | Checking that help adapts based on the config: |
|
791 | Checking that help adapts based on the config: | |
792 |
|
792 | |||
793 | $ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)' |
|
793 | $ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)' | |
794 | -g --[no-]git use git extended diff format (default: on from |
|
794 | -g --[no-]git use git extended diff format (default: on from | |
795 | config) |
|
795 | config) | |
796 |
|
796 | |||
797 | Make sure that we don't run afoul of the help system thinking that |
|
797 | Make sure that we don't run afoul of the help system thinking that | |
798 | this is a section and erroring out weirdly. |
|
798 | this is a section and erroring out weirdly. | |
799 |
|
799 | |||
800 | $ hg .log |
|
800 | $ hg .log | |
801 | hg: unknown command '.log' |
|
801 | hg: unknown command '.log' | |
802 | (did you mean log?) |
|
802 | (did you mean log?) | |
803 | [255] |
|
803 | [255] | |
804 |
|
804 | |||
805 | $ hg log. |
|
805 | $ hg log. | |
806 | hg: unknown command 'log.' |
|
806 | hg: unknown command 'log.' | |
807 | (did you mean log?) |
|
807 | (did you mean log?) | |
808 | [255] |
|
808 | [255] | |
809 | $ hg pu.lh |
|
809 | $ hg pu.lh | |
810 | hg: unknown command 'pu.lh' |
|
810 | hg: unknown command 'pu.lh' | |
811 | (did you mean one of pull, push?) |
|
811 | (did you mean one of pull, push?) | |
812 | [255] |
|
812 | [255] | |
813 |
|
813 | |||
814 | $ cat > helpext.py <<EOF |
|
814 | $ cat > helpext.py <<EOF | |
815 | > import os |
|
815 | > import os | |
816 | > from mercurial import commands, fancyopts, registrar |
|
816 | > from mercurial import commands, fancyopts, registrar | |
817 | > |
|
817 | > | |
818 | > def func(arg): |
|
818 | > def func(arg): | |
819 | > return '%sfoo' % arg |
|
819 | > return '%sfoo' % arg | |
820 | > class customopt(fancyopts.customopt): |
|
820 | > class customopt(fancyopts.customopt): | |
821 | > def newstate(self, oldstate, newparam, abort): |
|
821 | > def newstate(self, oldstate, newparam, abort): | |
822 | > return '%sbar' % oldstate |
|
822 | > return '%sbar' % oldstate | |
823 | > cmdtable = {} |
|
823 | > cmdtable = {} | |
824 | > command = registrar.command(cmdtable) |
|
824 | > command = registrar.command(cmdtable) | |
825 | > |
|
825 | > | |
826 | > @command(b'nohelp', |
|
826 | > @command(b'nohelp', | |
827 | > [(b'', b'longdesc', 3, b'x'*67), |
|
827 | > [(b'', b'longdesc', 3, b'x'*67), | |
828 | > (b'n', b'', None, b'normal desc'), |
|
828 | > (b'n', b'', None, b'normal desc'), | |
829 | > (b'', b'newline', b'', b'line1\nline2'), |
|
829 | > (b'', b'newline', b'', b'line1\nline2'), | |
830 | > (b'', b'default-off', False, b'enable X'), |
|
830 | > (b'', b'default-off', False, b'enable X'), | |
831 | > (b'', b'default-on', True, b'enable Y'), |
|
831 | > (b'', b'default-on', True, b'enable Y'), | |
832 | > (b'', b'callableopt', func, b'adds foo'), |
|
832 | > (b'', b'callableopt', func, b'adds foo'), | |
833 | > (b'', b'customopt', customopt(''), b'adds bar'), |
|
833 | > (b'', b'customopt', customopt(''), b'adds bar'), | |
834 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], |
|
834 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], | |
835 | > b'hg nohelp', |
|
835 | > b'hg nohelp', | |
836 | > norepo=True) |
|
836 | > norepo=True) | |
837 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) |
|
837 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) | |
838 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) |
|
838 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) | |
839 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) |
|
839 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) | |
840 | > def nohelp(ui, *args, **kwargs): |
|
840 | > def nohelp(ui, *args, **kwargs): | |
841 | > pass |
|
841 | > pass | |
842 | > |
|
842 | > | |
843 | > @command(b'hashelp', [], b'hg hashelp', norepo=True) |
|
843 | > @command(b'hashelp', [], b'hg hashelp', norepo=True) | |
844 | > def hashelp(ui, *args, **kwargs): |
|
844 | > def hashelp(ui, *args, **kwargs): | |
845 | > """Extension command's help""" |
|
845 | > """Extension command's help""" | |
846 | > |
|
846 | > | |
847 | > def uisetup(ui): |
|
847 | > def uisetup(ui): | |
848 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') |
|
848 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') | |
849 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') |
|
849 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') | |
850 | > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext') |
|
850 | > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext') | |
851 | > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext') |
|
851 | > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext') | |
852 | > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext') |
|
852 | > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext') | |
853 | > |
|
853 | > | |
854 | > EOF |
|
854 | > EOF | |
855 | $ echo '[extensions]' >> $HGRCPATH |
|
855 | $ echo '[extensions]' >> $HGRCPATH | |
856 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
856 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
857 |
|
857 | |||
858 | Test for aliases |
|
858 | Test for aliases | |
859 |
|
859 | |||
860 | $ hg help | grep hgalias |
|
860 | $ hg help | grep hgalias | |
861 | hgalias My doc |
|
861 | hgalias My doc | |
862 |
|
862 | |||
863 | $ hg help hgalias |
|
863 | $ hg help hgalias | |
864 | hg hgalias [--remote] |
|
864 | hg hgalias [--remote] | |
865 |
|
865 | |||
866 | alias for: hg summary |
|
866 | alias for: hg summary | |
867 |
|
867 | |||
868 | My doc |
|
868 | My doc | |
869 |
|
869 | |||
870 | defined by: helpext |
|
870 | defined by: helpext | |
871 |
|
871 | |||
872 | options: |
|
872 | options: | |
873 |
|
873 | |||
874 | --remote check for push and pull |
|
874 | --remote check for push and pull | |
875 |
|
875 | |||
876 | (some details hidden, use --verbose to show complete help) |
|
876 | (some details hidden, use --verbose to show complete help) | |
877 | $ hg help hgaliasnodoc |
|
877 | $ hg help hgaliasnodoc | |
878 | hg hgaliasnodoc [--remote] |
|
878 | hg hgaliasnodoc [--remote] | |
879 |
|
879 | |||
880 | alias for: hg summary |
|
880 | alias for: hg summary | |
881 |
|
881 | |||
882 | summarize working directory state |
|
882 | summarize working directory state | |
883 |
|
883 | |||
884 | This generates a brief summary of the working directory state, including |
|
884 | This generates a brief summary of the working directory state, including | |
885 | parents, branch, commit status, phase and available updates. |
|
885 | parents, branch, commit status, phase and available updates. | |
886 |
|
886 | |||
887 | With the --remote option, this will check the default paths for incoming |
|
887 | With the --remote option, this will check the default paths for incoming | |
888 | and outgoing changes. This can be time-consuming. |
|
888 | and outgoing changes. This can be time-consuming. | |
889 |
|
889 | |||
890 | Returns 0 on success. |
|
890 | Returns 0 on success. | |
891 |
|
891 | |||
892 | defined by: helpext |
|
892 | defined by: helpext | |
893 |
|
893 | |||
894 | options: |
|
894 | options: | |
895 |
|
895 | |||
896 | --remote check for push and pull |
|
896 | --remote check for push and pull | |
897 |
|
897 | |||
898 | (some details hidden, use --verbose to show complete help) |
|
898 | (some details hidden, use --verbose to show complete help) | |
899 |
|
899 | |||
900 | $ hg help shellalias |
|
900 | $ hg help shellalias | |
901 | hg shellalias |
|
901 | hg shellalias | |
902 |
|
902 | |||
903 | shell alias for: echo hi |
|
903 | shell alias for: echo hi | |
904 |
|
904 | |||
905 | (no help text available) |
|
905 | (no help text available) | |
906 |
|
906 | |||
907 | defined by: helpext |
|
907 | defined by: helpext | |
908 |
|
908 | |||
909 | (some details hidden, use --verbose to show complete help) |
|
909 | (some details hidden, use --verbose to show complete help) | |
910 |
|
910 | |||
911 | Test command with no help text |
|
911 | Test command with no help text | |
912 |
|
912 | |||
913 | $ hg help nohelp |
|
913 | $ hg help nohelp | |
914 | hg nohelp |
|
914 | hg nohelp | |
915 |
|
915 | |||
916 | (no help text available) |
|
916 | (no help text available) | |
917 |
|
917 | |||
918 | options: |
|
918 | options: | |
919 |
|
919 | |||
920 | --longdesc VALUE |
|
920 | --longdesc VALUE | |
921 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
921 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
922 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
922 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) | |
923 | -n -- normal desc |
|
923 | -n -- normal desc | |
924 | --newline VALUE line1 line2 |
|
924 | --newline VALUE line1 line2 | |
925 | --default-off enable X |
|
925 | --default-off enable X | |
926 | --[no-]default-on enable Y (default: on) |
|
926 | --[no-]default-on enable Y (default: on) | |
927 | --callableopt VALUE adds foo |
|
927 | --callableopt VALUE adds foo | |
928 | --customopt VALUE adds bar |
|
928 | --customopt VALUE adds bar | |
929 | --customopt-withdefault VALUE adds bar (default: foo) |
|
929 | --customopt-withdefault VALUE adds bar (default: foo) | |
930 |
|
930 | |||
931 | (some details hidden, use --verbose to show complete help) |
|
931 | (some details hidden, use --verbose to show complete help) | |
932 |
|
932 | |||
933 | Test that default list of commands includes extension commands that have help, |
|
933 | Test that default list of commands includes extension commands that have help, | |
934 | but not those that don't, except in verbose mode, when a keyword is passed, or |
|
934 | but not those that don't, except in verbose mode, when a keyword is passed, or | |
935 | when help about the extension is requested. |
|
935 | when help about the extension is requested. | |
936 |
|
936 | |||
937 | #if no-extraextensions |
|
937 | #if no-extraextensions | |
938 |
|
938 | |||
939 | $ hg help | grep hashelp |
|
939 | $ hg help | grep hashelp | |
940 | hashelp Extension command's help |
|
940 | hashelp Extension command's help | |
941 | $ hg help | grep nohelp |
|
941 | $ hg help | grep nohelp | |
942 | [1] |
|
942 | [1] | |
943 | $ hg help -v | grep nohelp |
|
943 | $ hg help -v | grep nohelp | |
944 | nohelp (no help text available) |
|
944 | nohelp (no help text available) | |
945 |
|
945 | |||
946 | $ hg help -k nohelp |
|
946 | $ hg help -k nohelp | |
947 | Commands: |
|
947 | Commands: | |
948 |
|
948 | |||
949 | nohelp hg nohelp |
|
949 | nohelp hg nohelp | |
950 |
|
950 | |||
951 | Extension Commands: |
|
951 | Extension Commands: | |
952 |
|
952 | |||
953 | nohelp (no help text available) |
|
953 | nohelp (no help text available) | |
954 |
|
954 | |||
955 | $ hg help helpext |
|
955 | $ hg help helpext | |
956 | helpext extension - no help text available |
|
956 | helpext extension - no help text available | |
957 |
|
957 | |||
958 | list of commands: |
|
958 | list of commands: | |
959 |
|
959 | |||
960 | hashelp Extension command's help |
|
960 | hashelp Extension command's help | |
961 | nohelp (no help text available) |
|
961 | nohelp (no help text available) | |
962 |
|
962 | |||
963 | (use 'hg help -v helpext' to show built-in aliases and global options) |
|
963 | (use 'hg help -v helpext' to show built-in aliases and global options) | |
964 |
|
964 | |||
965 | #endif |
|
965 | #endif | |
966 |
|
966 | |||
967 | Test list of internal help commands |
|
967 | Test list of internal help commands | |
968 |
|
968 | |||
969 | $ hg help debug |
|
969 | $ hg help debug | |
970 | debug commands (internal and unsupported): |
|
970 | debug commands (internal and unsupported): | |
971 |
|
971 | |||
972 | debugancestor |
|
972 | debugancestor | |
973 | find the ancestor revision of two revisions in a given index |
|
973 | find the ancestor revision of two revisions in a given index | |
974 | debugapplystreamclonebundle |
|
974 | debugapplystreamclonebundle | |
975 | apply a stream clone bundle file |
|
975 | apply a stream clone bundle file | |
976 | debugbackupbundle |
|
976 | debugbackupbundle | |
977 | lists the changesets available in backup bundles |
|
977 | lists the changesets available in backup bundles | |
978 | debugbuilddag |
|
978 | debugbuilddag | |
979 | builds a repo with a given DAG from scratch in the current |
|
979 | builds a repo with a given DAG from scratch in the current | |
980 | empty repo |
|
980 | empty repo | |
981 | debugbundle lists the contents of a bundle |
|
981 | debugbundle lists the contents of a bundle | |
982 | debugcapabilities |
|
982 | debugcapabilities | |
983 | lists the capabilities of a remote peer |
|
983 | lists the capabilities of a remote peer | |
984 | debugcheckstate |
|
984 | debugcheckstate | |
985 | validate the correctness of the current dirstate |
|
985 | validate the correctness of the current dirstate | |
986 | debugcolor show available color, effects or style |
|
986 | debugcolor show available color, effects or style | |
987 | debugcommands |
|
987 | debugcommands | |
988 | list all available commands and options |
|
988 | list all available commands and options | |
989 | debugcomplete |
|
989 | debugcomplete | |
990 | returns the completion list associated with the given command |
|
990 | returns the completion list associated with the given command | |
991 | debugcreatestreamclonebundle |
|
991 | debugcreatestreamclonebundle | |
992 | create a stream clone bundle file |
|
992 | create a stream clone bundle file | |
993 | debugdag format the changelog or an index DAG as a concise textual |
|
993 | debugdag format the changelog or an index DAG as a concise textual | |
994 | description |
|
994 | description | |
995 | debugdata dump the contents of a data file revision |
|
995 | debugdata dump the contents of a data file revision | |
996 | debugdate parse and display a date |
|
996 | debugdate parse and display a date | |
997 | debugdeltachain |
|
997 | debugdeltachain | |
998 | dump information about delta chains in a revlog |
|
998 | dump information about delta chains in a revlog | |
999 | debugdirstate |
|
999 | debugdirstate | |
1000 | show the contents of the current dirstate |
|
1000 | show the contents of the current dirstate | |
1001 | debugdiscovery |
|
1001 | debugdiscovery | |
1002 | runs the changeset discovery protocol in isolation |
|
1002 | runs the changeset discovery protocol in isolation | |
1003 | debugdownload |
|
1003 | debugdownload | |
1004 | download a resource using Mercurial logic and config |
|
1004 | download a resource using Mercurial logic and config | |
1005 | debugextensions |
|
1005 | debugextensions | |
1006 | show information about active extensions |
|
1006 | show information about active extensions | |
1007 | debugfileset parse and apply a fileset specification |
|
1007 | debugfileset parse and apply a fileset specification | |
1008 | debugformat display format information about the current repository |
|
1008 | debugformat display format information about the current repository | |
1009 | debugfsinfo show information detected about current filesystem |
|
1009 | debugfsinfo show information detected about current filesystem | |
1010 | debuggetbundle |
|
1010 | debuggetbundle | |
1011 | retrieves a bundle from a repo |
|
1011 | retrieves a bundle from a repo | |
1012 | debugignore display the combined ignore pattern and information about |
|
1012 | debugignore display the combined ignore pattern and information about | |
1013 | ignored files |
|
1013 | ignored files | |
1014 | debugindex dump index data for a storage primitive |
|
1014 | debugindex dump index data for a storage primitive | |
1015 | debugindexdot |
|
1015 | debugindexdot | |
1016 | dump an index DAG as a graphviz dot file |
|
1016 | dump an index DAG as a graphviz dot file | |
1017 | debugindexstats |
|
1017 | debugindexstats | |
1018 | show stats related to the changelog index |
|
1018 | show stats related to the changelog index | |
1019 | debuginstall test Mercurial installation |
|
1019 | debuginstall test Mercurial installation | |
1020 | debugknown test whether node ids are known to a repo |
|
1020 | debugknown test whether node ids are known to a repo | |
1021 | debuglocks show or modify state of locks |
|
1021 | debuglocks show or modify state of locks | |
1022 | debugmanifestfulltextcache |
|
1022 | debugmanifestfulltextcache | |
1023 | show, clear or amend the contents of the manifest fulltext |
|
1023 | show, clear or amend the contents of the manifest fulltext | |
1024 | cache |
|
1024 | cache | |
1025 | debugmergestate |
|
1025 | debugmergestate | |
1026 | print merge state |
|
1026 | print merge state | |
1027 | debugnamecomplete |
|
1027 | debugnamecomplete | |
1028 | complete "names" - tags, open branch names, bookmark names |
|
1028 | complete "names" - tags, open branch names, bookmark names | |
1029 | debugnodemap write and inspect on disk nodemap |
|
1029 | debugnodemap write and inspect on disk nodemap | |
1030 | debugobsolete |
|
1030 | debugobsolete | |
1031 | create arbitrary obsolete marker |
|
1031 | create arbitrary obsolete marker | |
1032 | debugoptADV (no help text available) |
|
1032 | debugoptADV (no help text available) | |
1033 | debugoptDEP (no help text available) |
|
1033 | debugoptDEP (no help text available) | |
1034 | debugoptEXP (no help text available) |
|
1034 | debugoptEXP (no help text available) | |
1035 | debugp1copies |
|
1035 | debugp1copies | |
1036 | dump copy information compared to p1 |
|
1036 | dump copy information compared to p1 | |
1037 | debugp2copies |
|
1037 | debugp2copies | |
1038 | dump copy information compared to p2 |
|
1038 | dump copy information compared to p2 | |
1039 | debugpathcomplete |
|
1039 | debugpathcomplete | |
1040 | complete part or all of a tracked path |
|
1040 | complete part or all of a tracked path | |
1041 | debugpathcopies |
|
1041 | debugpathcopies | |
1042 | show copies between two revisions |
|
1042 | show copies between two revisions | |
1043 | debugpeer establish a connection to a peer repository |
|
1043 | debugpeer establish a connection to a peer repository | |
1044 | debugpickmergetool |
|
1044 | debugpickmergetool | |
1045 | examine which merge tool is chosen for specified file |
|
1045 | examine which merge tool is chosen for specified file | |
1046 | debugpushkey access the pushkey key/value protocol |
|
1046 | debugpushkey access the pushkey key/value protocol | |
1047 | debugpvec (no help text available) |
|
1047 | debugpvec (no help text available) | |
1048 | debugrebuilddirstate |
|
1048 | debugrebuilddirstate | |
1049 | rebuild the dirstate as it would look like for the given |
|
1049 | rebuild the dirstate as it would look like for the given | |
1050 | revision |
|
1050 | revision | |
1051 | debugrebuildfncache |
|
1051 | debugrebuildfncache | |
1052 | rebuild the fncache file |
|
1052 | rebuild the fncache file | |
1053 | debugrename dump rename information |
|
1053 | debugrename dump rename information | |
1054 | debugrevlog show data and statistics about a revlog |
|
1054 | debugrevlog show data and statistics about a revlog | |
1055 | debugrevlogindex |
|
1055 | debugrevlogindex | |
1056 | dump the contents of a revlog index |
|
1056 | dump the contents of a revlog index | |
1057 | debugrevspec parse and apply a revision specification |
|
1057 | debugrevspec parse and apply a revision specification | |
1058 | debugserve run a server with advanced settings |
|
1058 | debugserve run a server with advanced settings | |
1059 | debugsetparents |
|
1059 | debugsetparents | |
1060 | manually set the parents of the current working directory |
|
1060 | manually set the parents of the current working directory | |
1061 | debugsidedata |
|
1061 | debugsidedata | |
1062 | dump the side data for a cl/manifest/file revision |
|
1062 | dump the side data for a cl/manifest/file revision | |
1063 | debugssl test a secure connection to a server |
|
1063 | debugssl test a secure connection to a server | |
1064 | debugsub (no help text available) |
|
1064 | debugsub (no help text available) | |
1065 | debugsuccessorssets |
|
1065 | debugsuccessorssets | |
1066 | show set of successors for revision |
|
1066 | show set of successors for revision | |
1067 | debugtagscache |
|
1067 | debugtagscache | |
1068 | display the contents of .hg/cache/hgtagsfnodes1 |
|
1068 | display the contents of .hg/cache/hgtagsfnodes1 | |
1069 | debugtemplate |
|
1069 | debugtemplate | |
1070 | parse and apply a template |
|
1070 | parse and apply a template | |
1071 | debuguigetpass |
|
1071 | debuguigetpass | |
1072 | show prompt to type password |
|
1072 | show prompt to type password | |
1073 | debuguiprompt |
|
1073 | debuguiprompt | |
1074 | show plain prompt |
|
1074 | show plain prompt | |
1075 | debugupdatecaches |
|
1075 | debugupdatecaches | |
1076 | warm all known caches in the repository |
|
1076 | warm all known caches in the repository | |
1077 | debugupgraderepo |
|
1077 | debugupgraderepo | |
1078 | upgrade a repository to use different features |
|
1078 | upgrade a repository to use different features | |
1079 | debugwalk show how files match on given patterns |
|
1079 | debugwalk show how files match on given patterns | |
1080 | debugwhyunstable |
|
1080 | debugwhyunstable | |
1081 | explain instabilities of a changeset |
|
1081 | explain instabilities of a changeset | |
1082 | debugwireargs |
|
1082 | debugwireargs | |
1083 | (no help text available) |
|
1083 | (no help text available) | |
1084 | debugwireproto |
|
1084 | debugwireproto | |
1085 | send wire protocol commands to a server |
|
1085 | send wire protocol commands to a server | |
1086 |
|
1086 | |||
1087 | (use 'hg help -v debug' to show built-in aliases and global options) |
|
1087 | (use 'hg help -v debug' to show built-in aliases and global options) | |
1088 |
|
1088 | |||
1089 | internals topic renders index of available sub-topics |
|
1089 | internals topic renders index of available sub-topics | |
1090 |
|
1090 | |||
1091 | $ hg help internals |
|
1091 | $ hg help internals | |
1092 | Technical implementation topics |
|
1092 | Technical implementation topics | |
1093 | """"""""""""""""""""""""""""""" |
|
1093 | """"""""""""""""""""""""""""""" | |
1094 |
|
1094 | |||
1095 | To access a subtopic, use "hg help internals.{subtopic-name}" |
|
1095 | To access a subtopic, use "hg help internals.{subtopic-name}" | |
1096 |
|
1096 | |||
|
1097 | bid-merge Bid Merge Algorithm | |||
1097 | bundle2 Bundle2 |
|
1098 | bundle2 Bundle2 | |
1098 | bundles Bundles |
|
1099 | bundles Bundles | |
1099 | cbor CBOR |
|
1100 | cbor CBOR | |
1100 | censor Censor |
|
1101 | censor Censor | |
1101 | changegroups Changegroups |
|
1102 | changegroups Changegroups | |
1102 | config Config Registrar |
|
1103 | config Config Registrar | |
1103 | extensions Extension API |
|
1104 | extensions Extension API | |
1104 | mergestate Mergestate |
|
1105 | mergestate Mergestate | |
1105 | requirements Repository Requirements |
|
1106 | requirements Repository Requirements | |
1106 | revlogs Revision Logs |
|
1107 | revlogs Revision Logs | |
1107 | wireprotocol Wire Protocol |
|
1108 | wireprotocol Wire Protocol | |
1108 | wireprotocolrpc |
|
1109 | wireprotocolrpc | |
1109 | Wire Protocol RPC |
|
1110 | Wire Protocol RPC | |
1110 | wireprotocolv2 |
|
1111 | wireprotocolv2 | |
1111 | Wire Protocol Version 2 |
|
1112 | Wire Protocol Version 2 | |
1112 |
|
1113 | |||
1113 | sub-topics can be accessed |
|
1114 | sub-topics can be accessed | |
1114 |
|
1115 | |||
1115 | $ hg help internals.changegroups |
|
1116 | $ hg help internals.changegroups | |
1116 | Changegroups |
|
1117 | Changegroups | |
1117 | """""""""""" |
|
1118 | """""""""""" | |
1118 |
|
1119 | |||
1119 | Changegroups are representations of repository revlog data, specifically |
|
1120 | Changegroups are representations of repository revlog data, specifically | |
1120 | the changelog data, root/flat manifest data, treemanifest data, and |
|
1121 | the changelog data, root/flat manifest data, treemanifest data, and | |
1121 | filelogs. |
|
1122 | filelogs. | |
1122 |
|
1123 | |||
1123 | There are 3 versions of changegroups: "1", "2", and "3". From a high- |
|
1124 | There are 3 versions of changegroups: "1", "2", and "3". From a high- | |
1124 | level, versions "1" and "2" are almost exactly the same, with the only |
|
1125 | level, versions "1" and "2" are almost exactly the same, with the only | |
1125 | difference being an additional item in the *delta header*. Version "3" |
|
1126 | difference being an additional item in the *delta header*. Version "3" | |
1126 | adds support for storage flags in the *delta header* and optionally |
|
1127 | adds support for storage flags in the *delta header* and optionally | |
1127 | exchanging treemanifests (enabled by setting an option on the |
|
1128 | exchanging treemanifests (enabled by setting an option on the | |
1128 | "changegroup" part in the bundle2). |
|
1129 | "changegroup" part in the bundle2). | |
1129 |
|
1130 | |||
1130 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
1131 | Changegroups when not exchanging treemanifests consist of 3 logical | |
1131 | segments: |
|
1132 | segments: | |
1132 |
|
1133 | |||
1133 | +---------------------------------+ |
|
1134 | +---------------------------------+ | |
1134 | | | | | |
|
1135 | | | | | | |
1135 | | changeset | manifest | filelogs | |
|
1136 | | changeset | manifest | filelogs | | |
1136 | | | | | |
|
1137 | | | | | | |
1137 | | | | | |
|
1138 | | | | | | |
1138 | +---------------------------------+ |
|
1139 | +---------------------------------+ | |
1139 |
|
1140 | |||
1140 | When exchanging treemanifests, there are 4 logical segments: |
|
1141 | When exchanging treemanifests, there are 4 logical segments: | |
1141 |
|
1142 | |||
1142 | +-------------------------------------------------+ |
|
1143 | +-------------------------------------------------+ | |
1143 | | | | | | |
|
1144 | | | | | | | |
1144 | | changeset | root | treemanifests | filelogs | |
|
1145 | | changeset | root | treemanifests | filelogs | | |
1145 | | | manifest | | | |
|
1146 | | | manifest | | | | |
1146 | | | | | | |
|
1147 | | | | | | | |
1147 | +-------------------------------------------------+ |
|
1148 | +-------------------------------------------------+ | |
1148 |
|
1149 | |||
1149 | The principle building block of each segment is a *chunk*. A *chunk* is a |
|
1150 | The principle building block of each segment is a *chunk*. A *chunk* is a | |
1150 | framed piece of data: |
|
1151 | framed piece of data: | |
1151 |
|
1152 | |||
1152 | +---------------------------------------+ |
|
1153 | +---------------------------------------+ | |
1153 | | | | |
|
1154 | | | | | |
1154 | | length | data | |
|
1155 | | length | data | | |
1155 | | (4 bytes) | (<length - 4> bytes) | |
|
1156 | | (4 bytes) | (<length - 4> bytes) | | |
1156 | | | | |
|
1157 | | | | | |
1157 | +---------------------------------------+ |
|
1158 | +---------------------------------------+ | |
1158 |
|
1159 | |||
1159 | All integers are big-endian signed integers. Each chunk starts with a |
|
1160 | All integers are big-endian signed integers. Each chunk starts with a | |
1160 | 32-bit integer indicating the length of the entire chunk (including the |
|
1161 | 32-bit integer indicating the length of the entire chunk (including the | |
1161 | length field itself). |
|
1162 | length field itself). | |
1162 |
|
1163 | |||
1163 | There is a special case chunk that has a value of 0 for the length |
|
1164 | There is a special case chunk that has a value of 0 for the length | |
1164 | ("0x00000000"). We call this an *empty chunk*. |
|
1165 | ("0x00000000"). We call this an *empty chunk*. | |
1165 |
|
1166 | |||
1166 | Delta Groups |
|
1167 | Delta Groups | |
1167 | ============ |
|
1168 | ============ | |
1168 |
|
1169 | |||
1169 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
1170 | A *delta group* expresses the content of a revlog as a series of deltas, | |
1170 | or patches against previous revisions. |
|
1171 | or patches against previous revisions. | |
1171 |
|
1172 | |||
1172 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
1173 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
1173 | to signal the end of the delta group: |
|
1174 | to signal the end of the delta group: | |
1174 |
|
1175 | |||
1175 | +------------------------------------------------------------------------+ |
|
1176 | +------------------------------------------------------------------------+ | |
1176 | | | | | | | |
|
1177 | | | | | | | | |
1177 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
1178 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
1178 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
1179 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
1179 | | | | | | | |
|
1180 | | | | | | | | |
1180 | +------------------------------------------------------------------------+ |
|
1181 | +------------------------------------------------------------------------+ | |
1181 |
|
1182 | |||
1182 | Each *chunk*'s data consists of the following: |
|
1183 | Each *chunk*'s data consists of the following: | |
1183 |
|
1184 | |||
1184 | +---------------------------------------+ |
|
1185 | +---------------------------------------+ | |
1185 | | | | |
|
1186 | | | | | |
1186 | | delta header | delta data | |
|
1187 | | delta header | delta data | | |
1187 | | (various by version) | (various) | |
|
1188 | | (various by version) | (various) | | |
1188 | | | | |
|
1189 | | | | | |
1189 | +---------------------------------------+ |
|
1190 | +---------------------------------------+ | |
1190 |
|
1191 | |||
1191 | The *delta data* is a series of *delta*s that describe a diff from an |
|
1192 | The *delta data* is a series of *delta*s that describe a diff from an | |
1192 | existing entry (either that the recipient already has, or previously |
|
1193 | existing entry (either that the recipient already has, or previously | |
1193 | specified in the bundle/changegroup). |
|
1194 | specified in the bundle/changegroup). | |
1194 |
|
1195 | |||
1195 | The *delta header* is different between versions "1", "2", and "3" of the |
|
1196 | The *delta header* is different between versions "1", "2", and "3" of the | |
1196 | changegroup format. |
|
1197 | changegroup format. | |
1197 |
|
1198 | |||
1198 | Version 1 (headerlen=80): |
|
1199 | Version 1 (headerlen=80): | |
1199 |
|
1200 | |||
1200 | +------------------------------------------------------+ |
|
1201 | +------------------------------------------------------+ | |
1201 | | | | | | |
|
1202 | | | | | | | |
1202 | | node | p1 node | p2 node | link node | |
|
1203 | | node | p1 node | p2 node | link node | | |
1203 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1204 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1204 | | | | | | |
|
1205 | | | | | | | |
1205 | +------------------------------------------------------+ |
|
1206 | +------------------------------------------------------+ | |
1206 |
|
1207 | |||
1207 | Version 2 (headerlen=100): |
|
1208 | Version 2 (headerlen=100): | |
1208 |
|
1209 | |||
1209 | +------------------------------------------------------------------+ |
|
1210 | +------------------------------------------------------------------+ | |
1210 | | | | | | | |
|
1211 | | | | | | | | |
1211 | | node | p1 node | p2 node | base node | link node | |
|
1212 | | node | p1 node | p2 node | base node | link node | | |
1212 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1213 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1213 | | | | | | | |
|
1214 | | | | | | | | |
1214 | +------------------------------------------------------------------+ |
|
1215 | +------------------------------------------------------------------+ | |
1215 |
|
1216 | |||
1216 | Version 3 (headerlen=102): |
|
1217 | Version 3 (headerlen=102): | |
1217 |
|
1218 | |||
1218 | +------------------------------------------------------------------------------+ |
|
1219 | +------------------------------------------------------------------------------+ | |
1219 | | | | | | | | |
|
1220 | | | | | | | | | |
1220 | | node | p1 node | p2 node | base node | link node | flags | |
|
1221 | | node | p1 node | p2 node | base node | link node | flags | | |
1221 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
1222 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
1222 | | | | | | | | |
|
1223 | | | | | | | | | |
1223 | +------------------------------------------------------------------------------+ |
|
1224 | +------------------------------------------------------------------------------+ | |
1224 |
|
1225 | |||
1225 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which |
|
1226 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which | |
1226 | contain a series of *delta*s, densely packed (no separators). These deltas |
|
1227 | contain a series of *delta*s, densely packed (no separators). These deltas | |
1227 | describe a diff from an existing entry (either that the recipient already |
|
1228 | describe a diff from an existing entry (either that the recipient already | |
1228 | has, or previously specified in the bundle/changegroup). The format is |
|
1229 | has, or previously specified in the bundle/changegroup). The format is | |
1229 | described more fully in "hg help internals.bdiff", but briefly: |
|
1230 | described more fully in "hg help internals.bdiff", but briefly: | |
1230 |
|
1231 | |||
1231 | +---------------------------------------------------------------+ |
|
1232 | +---------------------------------------------------------------+ | |
1232 | | | | | | |
|
1233 | | | | | | | |
1233 | | start offset | end offset | new length | content | |
|
1234 | | start offset | end offset | new length | content | | |
1234 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
1235 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
1235 | | | | | | |
|
1236 | | | | | | | |
1236 | +---------------------------------------------------------------+ |
|
1237 | +---------------------------------------------------------------+ | |
1237 |
|
1238 | |||
1238 | Please note that the length field in the delta data does *not* include |
|
1239 | Please note that the length field in the delta data does *not* include | |
1239 | itself. |
|
1240 | itself. | |
1240 |
|
1241 | |||
1241 | In version 1, the delta is always applied against the previous node from |
|
1242 | In version 1, the delta is always applied against the previous node from | |
1242 | the changegroup or the first parent if this is the first entry in the |
|
1243 | the changegroup or the first parent if this is the first entry in the | |
1243 | changegroup. |
|
1244 | changegroup. | |
1244 |
|
1245 | |||
1245 | In version 2 and up, the delta base node is encoded in the entry in the |
|
1246 | In version 2 and up, the delta base node is encoded in the entry in the | |
1246 | changegroup. This allows the delta to be expressed against any parent, |
|
1247 | changegroup. This allows the delta to be expressed against any parent, | |
1247 | which can result in smaller deltas and more efficient encoding of data. |
|
1248 | which can result in smaller deltas and more efficient encoding of data. | |
1248 |
|
1249 | |||
1249 | The *flags* field holds bitwise flags affecting the processing of revision |
|
1250 | The *flags* field holds bitwise flags affecting the processing of revision | |
1250 | data. The following flags are defined: |
|
1251 | data. The following flags are defined: | |
1251 |
|
1252 | |||
1252 | 32768 |
|
1253 | 32768 | |
1253 | Censored revision. The revision's fulltext has been replaced by censor |
|
1254 | Censored revision. The revision's fulltext has been replaced by censor | |
1254 | metadata. May only occur on file revisions. |
|
1255 | metadata. May only occur on file revisions. | |
1255 |
|
1256 | |||
1256 | 16384 |
|
1257 | 16384 | |
1257 | Ellipsis revision. Revision hash does not match data (likely due to |
|
1258 | Ellipsis revision. Revision hash does not match data (likely due to | |
1258 | rewritten parents). |
|
1259 | rewritten parents). | |
1259 |
|
1260 | |||
1260 | 8192 |
|
1261 | 8192 | |
1261 | Externally stored. The revision fulltext contains "key:value" "\n" |
|
1262 | Externally stored. The revision fulltext contains "key:value" "\n" | |
1262 | delimited metadata defining an object stored elsewhere. Used by the LFS |
|
1263 | delimited metadata defining an object stored elsewhere. Used by the LFS | |
1263 | extension. |
|
1264 | extension. | |
1264 |
|
1265 | |||
1265 | For historical reasons, the integer values are identical to revlog version |
|
1266 | For historical reasons, the integer values are identical to revlog version | |
1266 | 1 per-revision storage flags and correspond to bits being set in this |
|
1267 | 1 per-revision storage flags and correspond to bits being set in this | |
1267 | 2-byte field. Bits were allocated starting from the most-significant bit, |
|
1268 | 2-byte field. Bits were allocated starting from the most-significant bit, | |
1268 | hence the reverse ordering and allocation of these flags. |
|
1269 | hence the reverse ordering and allocation of these flags. | |
1269 |
|
1270 | |||
1270 | Changeset Segment |
|
1271 | Changeset Segment | |
1271 | ================= |
|
1272 | ================= | |
1272 |
|
1273 | |||
1273 | The *changeset segment* consists of a single *delta group* holding |
|
1274 | The *changeset segment* consists of a single *delta group* holding | |
1274 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
1275 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
1275 | the boundary to the *manifest segment*. |
|
1276 | the boundary to the *manifest segment*. | |
1276 |
|
1277 | |||
1277 | Manifest Segment |
|
1278 | Manifest Segment | |
1278 | ================ |
|
1279 | ================ | |
1279 |
|
1280 | |||
1280 | The *manifest segment* consists of a single *delta group* holding manifest |
|
1281 | The *manifest segment* consists of a single *delta group* holding manifest | |
1281 | data. If treemanifests are in use, it contains only the manifest for the |
|
1282 | data. If treemanifests are in use, it contains only the manifest for the | |
1282 | root directory of the repository. Otherwise, it contains the entire |
|
1283 | root directory of the repository. Otherwise, it contains the entire | |
1283 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
1284 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
1284 | the boundary to the next segment (either the *treemanifests segment* or |
|
1285 | the boundary to the next segment (either the *treemanifests segment* or | |
1285 | the *filelogs segment*, depending on version and the request options). |
|
1286 | the *filelogs segment*, depending on version and the request options). | |
1286 |
|
1287 | |||
1287 | Treemanifests Segment |
|
1288 | Treemanifests Segment | |
1288 | --------------------- |
|
1289 | --------------------- | |
1289 |
|
1290 | |||
1290 | The *treemanifests segment* only exists in changegroup version "3", and |
|
1291 | The *treemanifests segment* only exists in changegroup version "3", and | |
1291 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
1292 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
1292 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
1293 | (it is not possible to use changegroup version 3 outside of bundle2). | |
1293 | Aside from the filenames in the *treemanifests segment* containing a |
|
1294 | Aside from the filenames in the *treemanifests segment* containing a | |
1294 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
1295 | trailing "/" character, it behaves identically to the *filelogs segment* | |
1295 | (see below). The final sub-segment is followed by an *empty chunk* |
|
1296 | (see below). The final sub-segment is followed by an *empty chunk* | |
1296 | (logically, a sub-segment with filename size 0). This denotes the boundary |
|
1297 | (logically, a sub-segment with filename size 0). This denotes the boundary | |
1297 | to the *filelogs segment*. |
|
1298 | to the *filelogs segment*. | |
1298 |
|
1299 | |||
1299 | Filelogs Segment |
|
1300 | Filelogs Segment | |
1300 | ================ |
|
1301 | ================ | |
1301 |
|
1302 | |||
1302 | The *filelogs segment* consists of multiple sub-segments, each |
|
1303 | The *filelogs segment* consists of multiple sub-segments, each | |
1303 | corresponding to an individual file whose data is being described: |
|
1304 | corresponding to an individual file whose data is being described: | |
1304 |
|
1305 | |||
1305 | +--------------------------------------------------+ |
|
1306 | +--------------------------------------------------+ | |
1306 | | | | | | | |
|
1307 | | | | | | | | |
1307 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
1308 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
1308 | | | | | | (4 bytes) | |
|
1309 | | | | | | (4 bytes) | | |
1309 | | | | | | | |
|
1310 | | | | | | | | |
1310 | +--------------------------------------------------+ |
|
1311 | +--------------------------------------------------+ | |
1311 |
|
1312 | |||
1312 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
1313 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
1313 | a sub-segment with filename size 0). This denotes the end of the segment |
|
1314 | a sub-segment with filename size 0). This denotes the end of the segment | |
1314 | and of the overall changegroup. |
|
1315 | and of the overall changegroup. | |
1315 |
|
1316 | |||
1316 | Each filelog sub-segment consists of the following: |
|
1317 | Each filelog sub-segment consists of the following: | |
1317 |
|
1318 | |||
1318 | +------------------------------------------------------+ |
|
1319 | +------------------------------------------------------+ | |
1319 | | | | | |
|
1320 | | | | | | |
1320 | | filename length | filename | delta group | |
|
1321 | | filename length | filename | delta group | | |
1321 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
1322 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
1322 | | | | | |
|
1323 | | | | | | |
1323 | +------------------------------------------------------+ |
|
1324 | +------------------------------------------------------+ | |
1324 |
|
1325 | |||
1325 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
1326 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
1326 | followed by N chunks constituting the *delta group* for this file. The |
|
1327 | followed by N chunks constituting the *delta group* for this file. The | |
1327 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
1328 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
1328 | next filelog sub-segment. |
|
1329 | next filelog sub-segment. | |
1329 |
|
1330 | |||
1330 | non-existent subtopics print an error |
|
1331 | non-existent subtopics print an error | |
1331 |
|
1332 | |||
1332 | $ hg help internals.foo |
|
1333 | $ hg help internals.foo | |
1333 | abort: no such help topic: internals.foo |
|
1334 | abort: no such help topic: internals.foo | |
1334 | (try 'hg help --keyword foo') |
|
1335 | (try 'hg help --keyword foo') | |
1335 | [255] |
|
1336 | [255] | |
1336 |
|
1337 | |||
1337 | test advanced, deprecated and experimental options are hidden in command help |
|
1338 | test advanced, deprecated and experimental options are hidden in command help | |
1338 | $ hg help debugoptADV |
|
1339 | $ hg help debugoptADV | |
1339 | hg debugoptADV |
|
1340 | hg debugoptADV | |
1340 |
|
1341 | |||
1341 | (no help text available) |
|
1342 | (no help text available) | |
1342 |
|
1343 | |||
1343 | options: |
|
1344 | options: | |
1344 |
|
1345 | |||
1345 | (some details hidden, use --verbose to show complete help) |
|
1346 | (some details hidden, use --verbose to show complete help) | |
1346 | $ hg help debugoptDEP |
|
1347 | $ hg help debugoptDEP | |
1347 | hg debugoptDEP |
|
1348 | hg debugoptDEP | |
1348 |
|
1349 | |||
1349 | (no help text available) |
|
1350 | (no help text available) | |
1350 |
|
1351 | |||
1351 | options: |
|
1352 | options: | |
1352 |
|
1353 | |||
1353 | (some details hidden, use --verbose to show complete help) |
|
1354 | (some details hidden, use --verbose to show complete help) | |
1354 |
|
1355 | |||
1355 | $ hg help debugoptEXP |
|
1356 | $ hg help debugoptEXP | |
1356 | hg debugoptEXP |
|
1357 | hg debugoptEXP | |
1357 |
|
1358 | |||
1358 | (no help text available) |
|
1359 | (no help text available) | |
1359 |
|
1360 | |||
1360 | options: |
|
1361 | options: | |
1361 |
|
1362 | |||
1362 | (some details hidden, use --verbose to show complete help) |
|
1363 | (some details hidden, use --verbose to show complete help) | |
1363 |
|
1364 | |||
1364 | test advanced, deprecated and experimental options are shown with -v |
|
1365 | test advanced, deprecated and experimental options are shown with -v | |
1365 | $ hg help -v debugoptADV | grep aopt |
|
1366 | $ hg help -v debugoptADV | grep aopt | |
1366 | --aopt option is (ADVANCED) |
|
1367 | --aopt option is (ADVANCED) | |
1367 | $ hg help -v debugoptDEP | grep dopt |
|
1368 | $ hg help -v debugoptDEP | grep dopt | |
1368 | --dopt option is (DEPRECATED) |
|
1369 | --dopt option is (DEPRECATED) | |
1369 | $ hg help -v debugoptEXP | grep eopt |
|
1370 | $ hg help -v debugoptEXP | grep eopt | |
1370 | --eopt option is (EXPERIMENTAL) |
|
1371 | --eopt option is (EXPERIMENTAL) | |
1371 |
|
1372 | |||
1372 | #if gettext |
|
1373 | #if gettext | |
1373 | test deprecated option is hidden with translation with untranslated description |
|
1374 | test deprecated option is hidden with translation with untranslated description | |
1374 | (use many globy for not failing on changed transaction) |
|
1375 | (use many globy for not failing on changed transaction) | |
1375 | $ LANGUAGE=sv hg help debugoptDEP |
|
1376 | $ LANGUAGE=sv hg help debugoptDEP | |
1376 | hg debugoptDEP |
|
1377 | hg debugoptDEP | |
1377 |
|
1378 | |||
1378 | (*) (glob) |
|
1379 | (*) (glob) | |
1379 |
|
1380 | |||
1380 | options: |
|
1381 | options: | |
1381 |
|
1382 | |||
1382 | (some details hidden, use --verbose to show complete help) |
|
1383 | (some details hidden, use --verbose to show complete help) | |
1383 | #endif |
|
1384 | #endif | |
1384 |
|
1385 | |||
1385 | Test commands that collide with topics (issue4240) |
|
1386 | Test commands that collide with topics (issue4240) | |
1386 |
|
1387 | |||
1387 | $ hg config -hq |
|
1388 | $ hg config -hq | |
1388 | hg config [-u] [NAME]... |
|
1389 | hg config [-u] [NAME]... | |
1389 |
|
1390 | |||
1390 | show combined config settings from all hgrc files |
|
1391 | show combined config settings from all hgrc files | |
1391 | $ hg showconfig -hq |
|
1392 | $ hg showconfig -hq | |
1392 | hg config [-u] [NAME]... |
|
1393 | hg config [-u] [NAME]... | |
1393 |
|
1394 | |||
1394 | show combined config settings from all hgrc files |
|
1395 | show combined config settings from all hgrc files | |
1395 |
|
1396 | |||
1396 | Test a help topic |
|
1397 | Test a help topic | |
1397 |
|
1398 | |||
1398 | $ hg help dates |
|
1399 | $ hg help dates | |
1399 | Date Formats |
|
1400 | Date Formats | |
1400 | """""""""""" |
|
1401 | """""""""""" | |
1401 |
|
1402 | |||
1402 | Some commands allow the user to specify a date, e.g.: |
|
1403 | Some commands allow the user to specify a date, e.g.: | |
1403 |
|
1404 | |||
1404 | - backout, commit, import, tag: Specify the commit date. |
|
1405 | - backout, commit, import, tag: Specify the commit date. | |
1405 | - log, revert, update: Select revision(s) by date. |
|
1406 | - log, revert, update: Select revision(s) by date. | |
1406 |
|
1407 | |||
1407 | Many date formats are valid. Here are some examples: |
|
1408 | Many date formats are valid. Here are some examples: | |
1408 |
|
1409 | |||
1409 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
1410 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
1410 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
1411 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
1411 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
1412 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
1412 | - "Dec 6" (midnight) |
|
1413 | - "Dec 6" (midnight) | |
1413 | - "13:18" (today assumed) |
|
1414 | - "13:18" (today assumed) | |
1414 | - "3:39" (3:39AM assumed) |
|
1415 | - "3:39" (3:39AM assumed) | |
1415 | - "3:39pm" (15:39) |
|
1416 | - "3:39pm" (15:39) | |
1416 | - "2006-12-06 13:18:29" (ISO 8601 format) |
|
1417 | - "2006-12-06 13:18:29" (ISO 8601 format) | |
1417 | - "2006-12-6 13:18" |
|
1418 | - "2006-12-6 13:18" | |
1418 | - "2006-12-6" |
|
1419 | - "2006-12-6" | |
1419 | - "12-6" |
|
1420 | - "12-6" | |
1420 | - "12/6" |
|
1421 | - "12/6" | |
1421 | - "12/6/6" (Dec 6 2006) |
|
1422 | - "12/6/6" (Dec 6 2006) | |
1422 | - "today" (midnight) |
|
1423 | - "today" (midnight) | |
1423 | - "yesterday" (midnight) |
|
1424 | - "yesterday" (midnight) | |
1424 | - "now" - right now |
|
1425 | - "now" - right now | |
1425 |
|
1426 | |||
1426 | Lastly, there is Mercurial's internal format: |
|
1427 | Lastly, there is Mercurial's internal format: | |
1427 |
|
1428 | |||
1428 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
1429 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
1429 |
|
1430 | |||
1430 | This is the internal representation format for dates. The first number is |
|
1431 | This is the internal representation format for dates. The first number is | |
1431 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second |
|
1432 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second | |
1432 | is the offset of the local timezone, in seconds west of UTC (negative if |
|
1433 | is the offset of the local timezone, in seconds west of UTC (negative if | |
1433 | the timezone is east of UTC). |
|
1434 | the timezone is east of UTC). | |
1434 |
|
1435 | |||
1435 | The log command also accepts date ranges: |
|
1436 | The log command also accepts date ranges: | |
1436 |
|
1437 | |||
1437 | - "<DATE" - at or before a given date/time |
|
1438 | - "<DATE" - at or before a given date/time | |
1438 | - ">DATE" - on or after a given date/time |
|
1439 | - ">DATE" - on or after a given date/time | |
1439 | - "DATE to DATE" - a date range, inclusive |
|
1440 | - "DATE to DATE" - a date range, inclusive | |
1440 | - "-DAYS" - within a given number of days of today |
|
1441 | - "-DAYS" - within a given number of days of today | |
1441 |
|
1442 | |||
1442 | Test repeated config section name |
|
1443 | Test repeated config section name | |
1443 |
|
1444 | |||
1444 | $ hg help config.host |
|
1445 | $ hg help config.host | |
1445 | "http_proxy.host" |
|
1446 | "http_proxy.host" | |
1446 | Host name and (optional) port of the proxy server, for example |
|
1447 | Host name and (optional) port of the proxy server, for example | |
1447 | "myproxy:8000". |
|
1448 | "myproxy:8000". | |
1448 |
|
1449 | |||
1449 | "smtp.host" |
|
1450 | "smtp.host" | |
1450 | Host name of mail server, e.g. "mail.example.com". |
|
1451 | Host name of mail server, e.g. "mail.example.com". | |
1451 |
|
1452 | |||
1452 |
|
1453 | |||
1453 | Test section name with dot |
|
1454 | Test section name with dot | |
1454 |
|
1455 | |||
1455 | $ hg help config.ui.username |
|
1456 | $ hg help config.ui.username | |
1456 | "ui.username" |
|
1457 | "ui.username" | |
1457 | The committer of a changeset created when running "commit". Typically |
|
1458 | The committer of a changeset created when running "commit". Typically | |
1458 | a person's name and email address, e.g. "Fred Widget |
|
1459 | a person's name and email address, e.g. "Fred Widget | |
1459 | <fred@example.com>". Environment variables in the username are |
|
1460 | <fred@example.com>". Environment variables in the username are | |
1460 | expanded. |
|
1461 | expanded. | |
1461 |
|
1462 | |||
1462 | (default: "$EMAIL" or "username@hostname". If the username in hgrc is |
|
1463 | (default: "$EMAIL" or "username@hostname". If the username in hgrc is | |
1463 | empty, e.g. if the system admin set "username =" in the system hgrc, |
|
1464 | empty, e.g. if the system admin set "username =" in the system hgrc, | |
1464 | it has to be specified manually or in a different hgrc file) |
|
1465 | it has to be specified manually or in a different hgrc file) | |
1465 |
|
1466 | |||
1466 |
|
1467 | |||
1467 | $ hg help config.annotate.git |
|
1468 | $ hg help config.annotate.git | |
1468 | abort: help section not found: config.annotate.git |
|
1469 | abort: help section not found: config.annotate.git | |
1469 | [255] |
|
1470 | [255] | |
1470 |
|
1471 | |||
1471 | $ hg help config.update.check |
|
1472 | $ hg help config.update.check | |
1472 | "commands.update.check" |
|
1473 | "commands.update.check" | |
1473 | Determines what level of checking 'hg update' will perform before |
|
1474 | Determines what level of checking 'hg update' will perform before | |
1474 | moving to a destination revision. Valid values are "abort", "none", |
|
1475 | moving to a destination revision. Valid values are "abort", "none", | |
1475 | "linear", and "noconflict". "abort" always fails if the working |
|
1476 | "linear", and "noconflict". "abort" always fails if the working | |
1476 | directory has uncommitted changes. "none" performs no checking, and |
|
1477 | directory has uncommitted changes. "none" performs no checking, and | |
1477 | may result in a merge with uncommitted changes. "linear" allows any |
|
1478 | may result in a merge with uncommitted changes. "linear" allows any | |
1478 | update as long as it follows a straight line in the revision history, |
|
1479 | update as long as it follows a straight line in the revision history, | |
1479 | and may trigger a merge with uncommitted changes. "noconflict" will |
|
1480 | and may trigger a merge with uncommitted changes. "noconflict" will | |
1480 | allow any update which would not trigger a merge with uncommitted |
|
1481 | allow any update which would not trigger a merge with uncommitted | |
1481 | changes, if any are present. (default: "linear") |
|
1482 | changes, if any are present. (default: "linear") | |
1482 |
|
1483 | |||
1483 |
|
1484 | |||
1484 | $ hg help config.commands.update.check |
|
1485 | $ hg help config.commands.update.check | |
1485 | "commands.update.check" |
|
1486 | "commands.update.check" | |
1486 | Determines what level of checking 'hg update' will perform before |
|
1487 | Determines what level of checking 'hg update' will perform before | |
1487 | moving to a destination revision. Valid values are "abort", "none", |
|
1488 | moving to a destination revision. Valid values are "abort", "none", | |
1488 | "linear", and "noconflict". "abort" always fails if the working |
|
1489 | "linear", and "noconflict". "abort" always fails if the working | |
1489 | directory has uncommitted changes. "none" performs no checking, and |
|
1490 | directory has uncommitted changes. "none" performs no checking, and | |
1490 | may result in a merge with uncommitted changes. "linear" allows any |
|
1491 | may result in a merge with uncommitted changes. "linear" allows any | |
1491 | update as long as it follows a straight line in the revision history, |
|
1492 | update as long as it follows a straight line in the revision history, | |
1492 | and may trigger a merge with uncommitted changes. "noconflict" will |
|
1493 | and may trigger a merge with uncommitted changes. "noconflict" will | |
1493 | allow any update which would not trigger a merge with uncommitted |
|
1494 | allow any update which would not trigger a merge with uncommitted | |
1494 | changes, if any are present. (default: "linear") |
|
1495 | changes, if any are present. (default: "linear") | |
1495 |
|
1496 | |||
1496 |
|
1497 | |||
1497 | $ hg help config.ommands.update.check |
|
1498 | $ hg help config.ommands.update.check | |
1498 | abort: help section not found: config.ommands.update.check |
|
1499 | abort: help section not found: config.ommands.update.check | |
1499 | [255] |
|
1500 | [255] | |
1500 |
|
1501 | |||
1501 | Unrelated trailing paragraphs shouldn't be included |
|
1502 | Unrelated trailing paragraphs shouldn't be included | |
1502 |
|
1503 | |||
1503 | $ hg help config.extramsg | grep '^$' |
|
1504 | $ hg help config.extramsg | grep '^$' | |
1504 |
|
1505 | |||
1505 |
|
1506 | |||
1506 | Test capitalized section name |
|
1507 | Test capitalized section name | |
1507 |
|
1508 | |||
1508 | $ hg help scripting.HGPLAIN > /dev/null |
|
1509 | $ hg help scripting.HGPLAIN > /dev/null | |
1509 |
|
1510 | |||
1510 | Help subsection: |
|
1511 | Help subsection: | |
1511 |
|
1512 | |||
1512 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
1513 | $ hg help config.charsets |grep "Email example:" > /dev/null | |
1513 | [1] |
|
1514 | [1] | |
1514 |
|
1515 | |||
1515 | Show nested definitions |
|
1516 | Show nested definitions | |
1516 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
1517 | ("profiling.type"[break]"ls"[break]"stat"[break]) | |
1517 |
|
1518 | |||
1518 | $ hg help config.type | egrep '^$'|wc -l |
|
1519 | $ hg help config.type | egrep '^$'|wc -l | |
1519 | \s*3 (re) |
|
1520 | \s*3 (re) | |
1520 |
|
1521 | |||
1521 | $ hg help config.profiling.type.ls |
|
1522 | $ hg help config.profiling.type.ls | |
1522 | "profiling.type.ls" |
|
1523 | "profiling.type.ls" | |
1523 | Use Python's built-in instrumenting profiler. This profiler works on |
|
1524 | Use Python's built-in instrumenting profiler. This profiler works on | |
1524 | all platforms, but each line number it reports is the first line of |
|
1525 | all platforms, but each line number it reports is the first line of | |
1525 | a function. This restriction makes it difficult to identify the |
|
1526 | a function. This restriction makes it difficult to identify the | |
1526 | expensive parts of a non-trivial function. |
|
1527 | expensive parts of a non-trivial function. | |
1527 |
|
1528 | |||
1528 |
|
1529 | |||
1529 | Separate sections from subsections |
|
1530 | Separate sections from subsections | |
1530 |
|
1531 | |||
1531 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq |
|
1532 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq | |
1532 | "format" |
|
1533 | "format" | |
1533 | -------- |
|
1534 | -------- | |
1534 |
|
1535 | |||
1535 | "usegeneraldelta" |
|
1536 | "usegeneraldelta" | |
1536 |
|
1537 | |||
1537 | "dotencode" |
|
1538 | "dotencode" | |
1538 |
|
1539 | |||
1539 | "usefncache" |
|
1540 | "usefncache" | |
1540 |
|
1541 | |||
1541 | "usestore" |
|
1542 | "usestore" | |
1542 |
|
1543 | |||
1543 | "sparse-revlog" |
|
1544 | "sparse-revlog" | |
1544 |
|
1545 | |||
1545 | "revlog-compression" |
|
1546 | "revlog-compression" | |
1546 |
|
1547 | |||
1547 | "bookmarks-in-store" |
|
1548 | "bookmarks-in-store" | |
1548 |
|
1549 | |||
1549 | "profiling" |
|
1550 | "profiling" | |
1550 | ----------- |
|
1551 | ----------- | |
1551 |
|
1552 | |||
1552 | "format" |
|
1553 | "format" | |
1553 |
|
1554 | |||
1554 | "progress" |
|
1555 | "progress" | |
1555 | ---------- |
|
1556 | ---------- | |
1556 |
|
1557 | |||
1557 | "format" |
|
1558 | "format" | |
1558 |
|
1559 | |||
1559 |
|
1560 | |||
1560 | Last item in help config.*: |
|
1561 | Last item in help config.*: | |
1561 |
|
1562 | |||
1562 | $ hg help config.`hg help config|grep '^ "'| \ |
|
1563 | $ hg help config.`hg help config|grep '^ "'| \ | |
1563 | > tail -1|sed 's![ "]*!!g'`| \ |
|
1564 | > tail -1|sed 's![ "]*!!g'`| \ | |
1564 | > grep 'hg help -c config' > /dev/null |
|
1565 | > grep 'hg help -c config' > /dev/null | |
1565 | [1] |
|
1566 | [1] | |
1566 |
|
1567 | |||
1567 | note to use help -c for general hg help config: |
|
1568 | note to use help -c for general hg help config: | |
1568 |
|
1569 | |||
1569 | $ hg help config |grep 'hg help -c config' > /dev/null |
|
1570 | $ hg help config |grep 'hg help -c config' > /dev/null | |
1570 |
|
1571 | |||
1571 | Test templating help |
|
1572 | Test templating help | |
1572 |
|
1573 | |||
1573 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
1574 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
1574 | desc String. The text of the changeset description. |
|
1575 | desc String. The text of the changeset description. | |
1575 | diffstat String. Statistics of changes with the following format: |
|
1576 | diffstat String. Statistics of changes with the following format: | |
1576 | firstline Any text. Returns the first line of text. |
|
1577 | firstline Any text. Returns the first line of text. | |
1577 | nonempty Any text. Returns '(none)' if the string is empty. |
|
1578 | nonempty Any text. Returns '(none)' if the string is empty. | |
1578 |
|
1579 | |||
1579 | Test deprecated items |
|
1580 | Test deprecated items | |
1580 |
|
1581 | |||
1581 | $ hg help -v templating | grep currentbookmark |
|
1582 | $ hg help -v templating | grep currentbookmark | |
1582 | currentbookmark |
|
1583 | currentbookmark | |
1583 | $ hg help templating | (grep currentbookmark || true) |
|
1584 | $ hg help templating | (grep currentbookmark || true) | |
1584 |
|
1585 | |||
1585 | Test help hooks |
|
1586 | Test help hooks | |
1586 |
|
1587 | |||
1587 | $ cat > helphook1.py <<EOF |
|
1588 | $ cat > helphook1.py <<EOF | |
1588 | > from mercurial import help |
|
1589 | > from mercurial import help | |
1589 | > |
|
1590 | > | |
1590 | > def rewrite(ui, topic, doc): |
|
1591 | > def rewrite(ui, topic, doc): | |
1591 | > return doc + b'\nhelphook1\n' |
|
1592 | > return doc + b'\nhelphook1\n' | |
1592 | > |
|
1593 | > | |
1593 | > def extsetup(ui): |
|
1594 | > def extsetup(ui): | |
1594 | > help.addtopichook(b'revisions', rewrite) |
|
1595 | > help.addtopichook(b'revisions', rewrite) | |
1595 | > EOF |
|
1596 | > EOF | |
1596 | $ cat > helphook2.py <<EOF |
|
1597 | $ cat > helphook2.py <<EOF | |
1597 | > from mercurial import help |
|
1598 | > from mercurial import help | |
1598 | > |
|
1599 | > | |
1599 | > def rewrite(ui, topic, doc): |
|
1600 | > def rewrite(ui, topic, doc): | |
1600 | > return doc + b'\nhelphook2\n' |
|
1601 | > return doc + b'\nhelphook2\n' | |
1601 | > |
|
1602 | > | |
1602 | > def extsetup(ui): |
|
1603 | > def extsetup(ui): | |
1603 | > help.addtopichook(b'revisions', rewrite) |
|
1604 | > help.addtopichook(b'revisions', rewrite) | |
1604 | > EOF |
|
1605 | > EOF | |
1605 | $ echo '[extensions]' >> $HGRCPATH |
|
1606 | $ echo '[extensions]' >> $HGRCPATH | |
1606 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
1607 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
1607 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
1608 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
1608 | $ hg help revsets | grep helphook |
|
1609 | $ hg help revsets | grep helphook | |
1609 | helphook1 |
|
1610 | helphook1 | |
1610 | helphook2 |
|
1611 | helphook2 | |
1611 |
|
1612 | |||
1612 | help -c should only show debug --debug |
|
1613 | help -c should only show debug --debug | |
1613 |
|
1614 | |||
1614 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' |
|
1615 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' | |
1615 | [1] |
|
1616 | [1] | |
1616 |
|
1617 | |||
1617 | help -c should only show deprecated for -v |
|
1618 | help -c should only show deprecated for -v | |
1618 |
|
1619 | |||
1619 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1620 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' | |
1620 | [1] |
|
1621 | [1] | |
1621 |
|
1622 | |||
1622 | Test -s / --system |
|
1623 | Test -s / --system | |
1623 |
|
1624 | |||
1624 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ |
|
1625 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ | |
1625 | > wc -l | sed -e 's/ //g' |
|
1626 | > wc -l | sed -e 's/ //g' | |
1626 | 0 |
|
1627 | 0 | |
1627 | $ hg help config.files --system unix | grep 'USER' | \ |
|
1628 | $ hg help config.files --system unix | grep 'USER' | \ | |
1628 | > wc -l | sed -e 's/ //g' |
|
1629 | > wc -l | sed -e 's/ //g' | |
1629 | 0 |
|
1630 | 0 | |
1630 |
|
1631 | |||
1631 | Test -e / -c / -k combinations |
|
1632 | Test -e / -c / -k combinations | |
1632 |
|
1633 | |||
1633 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1634 | $ hg help -c|egrep '^[A-Z].*:|^ debug' | |
1634 | Commands: |
|
1635 | Commands: | |
1635 | $ hg help -e|egrep '^[A-Z].*:|^ debug' |
|
1636 | $ hg help -e|egrep '^[A-Z].*:|^ debug' | |
1636 | Extensions: |
|
1637 | Extensions: | |
1637 | $ hg help -k|egrep '^[A-Z].*:|^ debug' |
|
1638 | $ hg help -k|egrep '^[A-Z].*:|^ debug' | |
1638 | Topics: |
|
1639 | Topics: | |
1639 | Commands: |
|
1640 | Commands: | |
1640 | Extensions: |
|
1641 | Extensions: | |
1641 | Extension Commands: |
|
1642 | Extension Commands: | |
1642 | $ hg help -c schemes |
|
1643 | $ hg help -c schemes | |
1643 | abort: no such help topic: schemes |
|
1644 | abort: no such help topic: schemes | |
1644 | (try 'hg help --keyword schemes') |
|
1645 | (try 'hg help --keyword schemes') | |
1645 | [255] |
|
1646 | [255] | |
1646 | $ hg help -e schemes |head -1 |
|
1647 | $ hg help -e schemes |head -1 | |
1647 | schemes extension - extend schemes with shortcuts to repository swarms |
|
1648 | schemes extension - extend schemes with shortcuts to repository swarms | |
1648 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1649 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' | |
1649 | Commands: |
|
1650 | Commands: | |
1650 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1651 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' | |
1651 | Extensions: |
|
1652 | Extensions: | |
1652 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1653 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' | |
1653 | Extensions: |
|
1654 | Extensions: | |
1654 | Commands: |
|
1655 | Commands: | |
1655 | $ hg help -c commit > /dev/null |
|
1656 | $ hg help -c commit > /dev/null | |
1656 | $ hg help -e -c commit > /dev/null |
|
1657 | $ hg help -e -c commit > /dev/null | |
1657 | $ hg help -e commit |
|
1658 | $ hg help -e commit | |
1658 | abort: no such help topic: commit |
|
1659 | abort: no such help topic: commit | |
1659 | (try 'hg help --keyword commit') |
|
1660 | (try 'hg help --keyword commit') | |
1660 | [255] |
|
1661 | [255] | |
1661 |
|
1662 | |||
1662 | Test keyword search help |
|
1663 | Test keyword search help | |
1663 |
|
1664 | |||
1664 | $ cat > prefixedname.py <<EOF |
|
1665 | $ cat > prefixedname.py <<EOF | |
1665 | > '''matched against word "clone" |
|
1666 | > '''matched against word "clone" | |
1666 | > ''' |
|
1667 | > ''' | |
1667 | > EOF |
|
1668 | > EOF | |
1668 | $ echo '[extensions]' >> $HGRCPATH |
|
1669 | $ echo '[extensions]' >> $HGRCPATH | |
1669 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
1670 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH | |
1670 | $ hg help -k clone |
|
1671 | $ hg help -k clone | |
1671 | Topics: |
|
1672 | Topics: | |
1672 |
|
1673 | |||
1673 | config Configuration Files |
|
1674 | config Configuration Files | |
1674 | extensions Using Additional Features |
|
1675 | extensions Using Additional Features | |
1675 | glossary Glossary |
|
1676 | glossary Glossary | |
1676 | phases Working with Phases |
|
1677 | phases Working with Phases | |
1677 | subrepos Subrepositories |
|
1678 | subrepos Subrepositories | |
1678 | urls URL Paths |
|
1679 | urls URL Paths | |
1679 |
|
1680 | |||
1680 | Commands: |
|
1681 | Commands: | |
1681 |
|
1682 | |||
1682 | bookmarks create a new bookmark or list existing bookmarks |
|
1683 | bookmarks create a new bookmark or list existing bookmarks | |
1683 | clone make a copy of an existing repository |
|
1684 | clone make a copy of an existing repository | |
1684 | paths show aliases for remote repositories |
|
1685 | paths show aliases for remote repositories | |
1685 | pull pull changes from the specified source |
|
1686 | pull pull changes from the specified source | |
1686 | update update working directory (or switch revisions) |
|
1687 | update update working directory (or switch revisions) | |
1687 |
|
1688 | |||
1688 | Extensions: |
|
1689 | Extensions: | |
1689 |
|
1690 | |||
1690 | clonebundles advertise pre-generated bundles to seed clones |
|
1691 | clonebundles advertise pre-generated bundles to seed clones | |
1691 | narrow create clones which fetch history data for subset of files |
|
1692 | narrow create clones which fetch history data for subset of files | |
1692 | (EXPERIMENTAL) |
|
1693 | (EXPERIMENTAL) | |
1693 | prefixedname matched against word "clone" |
|
1694 | prefixedname matched against word "clone" | |
1694 | relink recreates hardlinks between repository clones |
|
1695 | relink recreates hardlinks between repository clones | |
1695 |
|
1696 | |||
1696 | Extension Commands: |
|
1697 | Extension Commands: | |
1697 |
|
1698 | |||
1698 | qclone clone main and patch repository at same time |
|
1699 | qclone clone main and patch repository at same time | |
1699 |
|
1700 | |||
1700 | Test unfound topic |
|
1701 | Test unfound topic | |
1701 |
|
1702 | |||
1702 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1703 | $ hg help nonexistingtopicthatwillneverexisteverever | |
1703 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1704 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever | |
1704 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') |
|
1705 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') | |
1705 | [255] |
|
1706 | [255] | |
1706 |
|
1707 | |||
1707 | Test unfound keyword |
|
1708 | Test unfound keyword | |
1708 |
|
1709 | |||
1709 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1710 | $ hg help --keyword nonexistingwordthatwillneverexisteverever | |
1710 | abort: no matches |
|
1711 | abort: no matches | |
1711 | (try 'hg help' for a list of topics) |
|
1712 | (try 'hg help' for a list of topics) | |
1712 | [255] |
|
1713 | [255] | |
1713 |
|
1714 | |||
1714 | Test omit indicating for help |
|
1715 | Test omit indicating for help | |
1715 |
|
1716 | |||
1716 | $ cat > addverboseitems.py <<EOF |
|
1717 | $ cat > addverboseitems.py <<EOF | |
1717 | > r'''extension to test omit indicating. |
|
1718 | > r'''extension to test omit indicating. | |
1718 | > |
|
1719 | > | |
1719 | > This paragraph is never omitted (for extension) |
|
1720 | > This paragraph is never omitted (for extension) | |
1720 | > |
|
1721 | > | |
1721 | > .. container:: verbose |
|
1722 | > .. container:: verbose | |
1722 | > |
|
1723 | > | |
1723 | > This paragraph is omitted, |
|
1724 | > This paragraph is omitted, | |
1724 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1725 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | |
1725 | > |
|
1726 | > | |
1726 | > This paragraph is never omitted, too (for extension) |
|
1727 | > This paragraph is never omitted, too (for extension) | |
1727 | > ''' |
|
1728 | > ''' | |
1728 | > from __future__ import absolute_import |
|
1729 | > from __future__ import absolute_import | |
1729 | > from mercurial import commands, help |
|
1730 | > from mercurial import commands, help | |
1730 | > testtopic = br"""This paragraph is never omitted (for topic). |
|
1731 | > testtopic = br"""This paragraph is never omitted (for topic). | |
1731 | > |
|
1732 | > | |
1732 | > .. container:: verbose |
|
1733 | > .. container:: verbose | |
1733 | > |
|
1734 | > | |
1734 | > This paragraph is omitted, |
|
1735 | > This paragraph is omitted, | |
1735 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1736 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | |
1736 | > |
|
1737 | > | |
1737 | > This paragraph is never omitted, too (for topic) |
|
1738 | > This paragraph is never omitted, too (for topic) | |
1738 | > """ |
|
1739 | > """ | |
1739 | > def extsetup(ui): |
|
1740 | > def extsetup(ui): | |
1740 | > help.helptable.append(([b"topic-containing-verbose"], |
|
1741 | > help.helptable.append(([b"topic-containing-verbose"], | |
1741 | > b"This is the topic to test omit indicating.", |
|
1742 | > b"This is the topic to test omit indicating.", | |
1742 | > lambda ui: testtopic)) |
|
1743 | > lambda ui: testtopic)) | |
1743 | > EOF |
|
1744 | > EOF | |
1744 | $ echo '[extensions]' >> $HGRCPATH |
|
1745 | $ echo '[extensions]' >> $HGRCPATH | |
1745 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1746 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | |
1746 | $ hg help addverboseitems |
|
1747 | $ hg help addverboseitems | |
1747 | addverboseitems extension - extension to test omit indicating. |
|
1748 | addverboseitems extension - extension to test omit indicating. | |
1748 |
|
1749 | |||
1749 | This paragraph is never omitted (for extension) |
|
1750 | This paragraph is never omitted (for extension) | |
1750 |
|
1751 | |||
1751 | This paragraph is never omitted, too (for extension) |
|
1752 | This paragraph is never omitted, too (for extension) | |
1752 |
|
1753 | |||
1753 | (some details hidden, use --verbose to show complete help) |
|
1754 | (some details hidden, use --verbose to show complete help) | |
1754 |
|
1755 | |||
1755 | no commands defined |
|
1756 | no commands defined | |
1756 | $ hg help -v addverboseitems |
|
1757 | $ hg help -v addverboseitems | |
1757 | addverboseitems extension - extension to test omit indicating. |
|
1758 | addverboseitems extension - extension to test omit indicating. | |
1758 |
|
1759 | |||
1759 | This paragraph is never omitted (for extension) |
|
1760 | This paragraph is never omitted (for extension) | |
1760 |
|
1761 | |||
1761 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1762 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1762 | extension) |
|
1763 | extension) | |
1763 |
|
1764 | |||
1764 | This paragraph is never omitted, too (for extension) |
|
1765 | This paragraph is never omitted, too (for extension) | |
1765 |
|
1766 | |||
1766 | no commands defined |
|
1767 | no commands defined | |
1767 | $ hg help topic-containing-verbose |
|
1768 | $ hg help topic-containing-verbose | |
1768 | This is the topic to test omit indicating. |
|
1769 | This is the topic to test omit indicating. | |
1769 | """""""""""""""""""""""""""""""""""""""""" |
|
1770 | """""""""""""""""""""""""""""""""""""""""" | |
1770 |
|
1771 | |||
1771 | This paragraph is never omitted (for topic). |
|
1772 | This paragraph is never omitted (for topic). | |
1772 |
|
1773 | |||
1773 | This paragraph is never omitted, too (for topic) |
|
1774 | This paragraph is never omitted, too (for topic) | |
1774 |
|
1775 | |||
1775 | (some details hidden, use --verbose to show complete help) |
|
1776 | (some details hidden, use --verbose to show complete help) | |
1776 | $ hg help -v topic-containing-verbose |
|
1777 | $ hg help -v topic-containing-verbose | |
1777 | This is the topic to test omit indicating. |
|
1778 | This is the topic to test omit indicating. | |
1778 | """""""""""""""""""""""""""""""""""""""""" |
|
1779 | """""""""""""""""""""""""""""""""""""""""" | |
1779 |
|
1780 | |||
1780 | This paragraph is never omitted (for topic). |
|
1781 | This paragraph is never omitted (for topic). | |
1781 |
|
1782 | |||
1782 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1783 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1783 | topic) |
|
1784 | topic) | |
1784 |
|
1785 | |||
1785 | This paragraph is never omitted, too (for topic) |
|
1786 | This paragraph is never omitted, too (for topic) | |
1786 |
|
1787 | |||
1787 | Test section lookup |
|
1788 | Test section lookup | |
1788 |
|
1789 | |||
1789 | $ hg help revset.merge |
|
1790 | $ hg help revset.merge | |
1790 | "merge()" |
|
1791 | "merge()" | |
1791 | Changeset is a merge changeset. |
|
1792 | Changeset is a merge changeset. | |
1792 |
|
1793 | |||
1793 | $ hg help glossary.dag |
|
1794 | $ hg help glossary.dag | |
1794 | DAG |
|
1795 | DAG | |
1795 | The repository of changesets of a distributed version control system |
|
1796 | The repository of changesets of a distributed version control system | |
1796 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1797 | (DVCS) can be described as a directed acyclic graph (DAG), consisting | |
1797 | of nodes and edges, where nodes correspond to changesets and edges |
|
1798 | of nodes and edges, where nodes correspond to changesets and edges | |
1798 | imply a parent -> child relation. This graph can be visualized by |
|
1799 | imply a parent -> child relation. This graph can be visualized by | |
1799 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is |
|
1800 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is | |
1800 | limited by the requirement for children to have at most two parents. |
|
1801 | limited by the requirement for children to have at most two parents. | |
1801 |
|
1802 | |||
1802 |
|
1803 | |||
1803 | $ hg help hgrc.paths |
|
1804 | $ hg help hgrc.paths | |
1804 | "paths" |
|
1805 | "paths" | |
1805 | ------- |
|
1806 | ------- | |
1806 |
|
1807 | |||
1807 | Assigns symbolic names and behavior to repositories. |
|
1808 | Assigns symbolic names and behavior to repositories. | |
1808 |
|
1809 | |||
1809 | Options are symbolic names defining the URL or directory that is the |
|
1810 | Options are symbolic names defining the URL or directory that is the | |
1810 | location of the repository. Example: |
|
1811 | location of the repository. Example: | |
1811 |
|
1812 | |||
1812 | [paths] |
|
1813 | [paths] | |
1813 | my_server = https://example.com/my_repo |
|
1814 | my_server = https://example.com/my_repo | |
1814 | local_path = /home/me/repo |
|
1815 | local_path = /home/me/repo | |
1815 |
|
1816 | |||
1816 | These symbolic names can be used from the command line. To pull from |
|
1817 | These symbolic names can be used from the command line. To pull from | |
1817 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push |
|
1818 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push | |
1818 | local_path'. |
|
1819 | local_path'. | |
1819 |
|
1820 | |||
1820 | Options containing colons (":") denote sub-options that can influence |
|
1821 | Options containing colons (":") denote sub-options that can influence | |
1821 | behavior for that specific path. Example: |
|
1822 | behavior for that specific path. Example: | |
1822 |
|
1823 | |||
1823 | [paths] |
|
1824 | [paths] | |
1824 | my_server = https://example.com/my_path |
|
1825 | my_server = https://example.com/my_path | |
1825 | my_server:pushurl = ssh://example.com/my_path |
|
1826 | my_server:pushurl = ssh://example.com/my_path | |
1826 |
|
1827 | |||
1827 | The following sub-options can be defined: |
|
1828 | The following sub-options can be defined: | |
1828 |
|
1829 | |||
1829 | "pushurl" |
|
1830 | "pushurl" | |
1830 | The URL to use for push operations. If not defined, the location |
|
1831 | The URL to use for push operations. If not defined, the location | |
1831 | defined by the path's main entry is used. |
|
1832 | defined by the path's main entry is used. | |
1832 |
|
1833 | |||
1833 | "pushrev" |
|
1834 | "pushrev" | |
1834 | A revset defining which revisions to push by default. |
|
1835 | A revset defining which revisions to push by default. | |
1835 |
|
1836 | |||
1836 | When 'hg push' is executed without a "-r" argument, the revset defined |
|
1837 | When 'hg push' is executed without a "-r" argument, the revset defined | |
1837 | by this sub-option is evaluated to determine what to push. |
|
1838 | by this sub-option is evaluated to determine what to push. | |
1838 |
|
1839 | |||
1839 | For example, a value of "." will push the working directory's revision |
|
1840 | For example, a value of "." will push the working directory's revision | |
1840 | by default. |
|
1841 | by default. | |
1841 |
|
1842 | |||
1842 | Revsets specifying bookmarks will not result in the bookmark being |
|
1843 | Revsets specifying bookmarks will not result in the bookmark being | |
1843 | pushed. |
|
1844 | pushed. | |
1844 |
|
1845 | |||
1845 | The following special named paths exist: |
|
1846 | The following special named paths exist: | |
1846 |
|
1847 | |||
1847 | "default" |
|
1848 | "default" | |
1848 | The URL or directory to use when no source or remote is specified. |
|
1849 | The URL or directory to use when no source or remote is specified. | |
1849 |
|
1850 | |||
1850 | 'hg clone' will automatically define this path to the location the |
|
1851 | 'hg clone' will automatically define this path to the location the | |
1851 | repository was cloned from. |
|
1852 | repository was cloned from. | |
1852 |
|
1853 | |||
1853 | "default-push" |
|
1854 | "default-push" | |
1854 | (deprecated) The URL or directory for the default 'hg push' location. |
|
1855 | (deprecated) The URL or directory for the default 'hg push' location. | |
1855 | "default:pushurl" should be used instead. |
|
1856 | "default:pushurl" should be used instead. | |
1856 |
|
1857 | |||
1857 | $ hg help glossary.mcguffin |
|
1858 | $ hg help glossary.mcguffin | |
1858 | abort: help section not found: glossary.mcguffin |
|
1859 | abort: help section not found: glossary.mcguffin | |
1859 | [255] |
|
1860 | [255] | |
1860 |
|
1861 | |||
1861 | $ hg help glossary.mc.guffin |
|
1862 | $ hg help glossary.mc.guffin | |
1862 | abort: help section not found: glossary.mc.guffin |
|
1863 | abort: help section not found: glossary.mc.guffin | |
1863 | [255] |
|
1864 | [255] | |
1864 |
|
1865 | |||
1865 | $ hg help template.files |
|
1866 | $ hg help template.files | |
1866 | files List of strings. All files modified, added, or removed by |
|
1867 | files List of strings. All files modified, added, or removed by | |
1867 | this changeset. |
|
1868 | this changeset. | |
1868 | files(pattern) |
|
1869 | files(pattern) | |
1869 | All files of the current changeset matching the pattern. See |
|
1870 | All files of the current changeset matching the pattern. See | |
1870 | 'hg help patterns'. |
|
1871 | 'hg help patterns'. | |
1871 |
|
1872 | |||
1872 | Test section lookup by translated message |
|
1873 | Test section lookup by translated message | |
1873 |
|
1874 | |||
1874 | str.lower() instead of encoding.lower(str) on translated message might |
|
1875 | str.lower() instead of encoding.lower(str) on translated message might | |
1875 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) |
|
1876 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) | |
1876 | as the second or later byte of multi-byte character. |
|
1877 | as the second or later byte of multi-byte character. | |
1877 |
|
1878 | |||
1878 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) |
|
1879 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) | |
1879 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this |
|
1880 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this | |
1880 | replacement makes message meaningless. |
|
1881 | replacement makes message meaningless. | |
1881 |
|
1882 | |||
1882 | This tests that section lookup by translated string isn't broken by |
|
1883 | This tests that section lookup by translated string isn't broken by | |
1883 | such str.lower(). |
|
1884 | such str.lower(). | |
1884 |
|
1885 | |||
1885 | $ "$PYTHON" <<EOF |
|
1886 | $ "$PYTHON" <<EOF | |
1886 | > def escape(s): |
|
1887 | > def escape(s): | |
1887 | > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932')) |
|
1888 | > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932')) | |
1888 | > # translation of "record" in ja_JP.cp932 |
|
1889 | > # translation of "record" in ja_JP.cp932 | |
1889 | > upper = b"\x8bL\x98^" |
|
1890 | > upper = b"\x8bL\x98^" | |
1890 | > # str.lower()-ed section name should be treated as different one |
|
1891 | > # str.lower()-ed section name should be treated as different one | |
1891 | > lower = b"\x8bl\x98^" |
|
1892 | > lower = b"\x8bl\x98^" | |
1892 | > with open('ambiguous.py', 'wb') as fp: |
|
1893 | > with open('ambiguous.py', 'wb') as fp: | |
1893 | > fp.write(b"""# ambiguous section names in ja_JP.cp932 |
|
1894 | > fp.write(b"""# ambiguous section names in ja_JP.cp932 | |
1894 | > u'''summary of extension |
|
1895 | > u'''summary of extension | |
1895 | > |
|
1896 | > | |
1896 | > %s |
|
1897 | > %s | |
1897 | > ---- |
|
1898 | > ---- | |
1898 | > |
|
1899 | > | |
1899 | > Upper name should show only this message |
|
1900 | > Upper name should show only this message | |
1900 | > |
|
1901 | > | |
1901 | > %s |
|
1902 | > %s | |
1902 | > ---- |
|
1903 | > ---- | |
1903 | > |
|
1904 | > | |
1904 | > Lower name should show only this message |
|
1905 | > Lower name should show only this message | |
1905 | > |
|
1906 | > | |
1906 | > subsequent section |
|
1907 | > subsequent section | |
1907 | > ------------------ |
|
1908 | > ------------------ | |
1908 | > |
|
1909 | > | |
1909 | > This should be hidden at 'hg help ambiguous' with section name. |
|
1910 | > This should be hidden at 'hg help ambiguous' with section name. | |
1910 | > ''' |
|
1911 | > ''' | |
1911 | > """ % (escape(upper), escape(lower))) |
|
1912 | > """ % (escape(upper), escape(lower))) | |
1912 | > EOF |
|
1913 | > EOF | |
1913 |
|
1914 | |||
1914 | $ cat >> $HGRCPATH <<EOF |
|
1915 | $ cat >> $HGRCPATH <<EOF | |
1915 | > [extensions] |
|
1916 | > [extensions] | |
1916 | > ambiguous = ./ambiguous.py |
|
1917 | > ambiguous = ./ambiguous.py | |
1917 | > EOF |
|
1918 | > EOF | |
1918 |
|
1919 | |||
1919 | $ "$PYTHON" <<EOF | sh |
|
1920 | $ "$PYTHON" <<EOF | sh | |
1920 | > from mercurial.utils import procutil |
|
1921 | > from mercurial.utils import procutil | |
1921 | > upper = b"\x8bL\x98^" |
|
1922 | > upper = b"\x8bL\x98^" | |
1922 | > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper) |
|
1923 | > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper) | |
1923 | > EOF |
|
1924 | > EOF | |
1924 | \x8bL\x98^ (esc) |
|
1925 | \x8bL\x98^ (esc) | |
1925 | ---- |
|
1926 | ---- | |
1926 |
|
1927 | |||
1927 | Upper name should show only this message |
|
1928 | Upper name should show only this message | |
1928 |
|
1929 | |||
1929 |
|
1930 | |||
1930 | $ "$PYTHON" <<EOF | sh |
|
1931 | $ "$PYTHON" <<EOF | sh | |
1931 | > from mercurial.utils import procutil |
|
1932 | > from mercurial.utils import procutil | |
1932 | > lower = b"\x8bl\x98^" |
|
1933 | > lower = b"\x8bl\x98^" | |
1933 | > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower) |
|
1934 | > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower) | |
1934 | > EOF |
|
1935 | > EOF | |
1935 | \x8bl\x98^ (esc) |
|
1936 | \x8bl\x98^ (esc) | |
1936 | ---- |
|
1937 | ---- | |
1937 |
|
1938 | |||
1938 | Lower name should show only this message |
|
1939 | Lower name should show only this message | |
1939 |
|
1940 | |||
1940 |
|
1941 | |||
1941 | $ cat >> $HGRCPATH <<EOF |
|
1942 | $ cat >> $HGRCPATH <<EOF | |
1942 | > [extensions] |
|
1943 | > [extensions] | |
1943 | > ambiguous = ! |
|
1944 | > ambiguous = ! | |
1944 | > EOF |
|
1945 | > EOF | |
1945 |
|
1946 | |||
1946 | Show help content of disabled extensions |
|
1947 | Show help content of disabled extensions | |
1947 |
|
1948 | |||
1948 | $ cat >> $HGRCPATH <<EOF |
|
1949 | $ cat >> $HGRCPATH <<EOF | |
1949 | > [extensions] |
|
1950 | > [extensions] | |
1950 | > ambiguous = !./ambiguous.py |
|
1951 | > ambiguous = !./ambiguous.py | |
1951 | > EOF |
|
1952 | > EOF | |
1952 | $ hg help -e ambiguous |
|
1953 | $ hg help -e ambiguous | |
1953 | ambiguous extension - (no help text available) |
|
1954 | ambiguous extension - (no help text available) | |
1954 |
|
1955 | |||
1955 | (use 'hg help extensions' for information on enabling extensions) |
|
1956 | (use 'hg help extensions' for information on enabling extensions) | |
1956 |
|
1957 | |||
1957 | Test dynamic list of merge tools only shows up once |
|
1958 | Test dynamic list of merge tools only shows up once | |
1958 | $ hg help merge-tools |
|
1959 | $ hg help merge-tools | |
1959 | Merge Tools |
|
1960 | Merge Tools | |
1960 | """"""""""" |
|
1961 | """"""""""" | |
1961 |
|
1962 | |||
1962 | To merge files Mercurial uses merge tools. |
|
1963 | To merge files Mercurial uses merge tools. | |
1963 |
|
1964 | |||
1964 | A merge tool combines two different versions of a file into a merged file. |
|
1965 | A merge tool combines two different versions of a file into a merged file. | |
1965 | Merge tools are given the two files and the greatest common ancestor of |
|
1966 | Merge tools are given the two files and the greatest common ancestor of | |
1966 | the two file versions, so they can determine the changes made on both |
|
1967 | the two file versions, so they can determine the changes made on both | |
1967 | branches. |
|
1968 | branches. | |
1968 |
|
1969 | |||
1969 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg |
|
1970 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg | |
1970 | backout' and in several extensions. |
|
1971 | backout' and in several extensions. | |
1971 |
|
1972 | |||
1972 | Usually, the merge tool tries to automatically reconcile the files by |
|
1973 | Usually, the merge tool tries to automatically reconcile the files by | |
1973 | combining all non-overlapping changes that occurred separately in the two |
|
1974 | combining all non-overlapping changes that occurred separately in the two | |
1974 | different evolutions of the same initial base file. Furthermore, some |
|
1975 | different evolutions of the same initial base file. Furthermore, some | |
1975 | interactive merge programs make it easier to manually resolve conflicting |
|
1976 | interactive merge programs make it easier to manually resolve conflicting | |
1976 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1977 | merges, either in a graphical way, or by inserting some conflict markers. | |
1977 | Mercurial does not include any interactive merge programs but relies on |
|
1978 | Mercurial does not include any interactive merge programs but relies on | |
1978 | external tools for that. |
|
1979 | external tools for that. | |
1979 |
|
1980 | |||
1980 | Available merge tools |
|
1981 | Available merge tools | |
1981 | ===================== |
|
1982 | ===================== | |
1982 |
|
1983 | |||
1983 | External merge tools and their properties are configured in the merge- |
|
1984 | External merge tools and their properties are configured in the merge- | |
1984 | tools configuration section - see hgrc(5) - but they can often just be |
|
1985 | tools configuration section - see hgrc(5) - but they can often just be | |
1985 | named by their executable. |
|
1986 | named by their executable. | |
1986 |
|
1987 | |||
1987 | A merge tool is generally usable if its executable can be found on the |
|
1988 | A merge tool is generally usable if its executable can be found on the | |
1988 | system and if it can handle the merge. The executable is found if it is an |
|
1989 | system and if it can handle the merge. The executable is found if it is an | |
1989 | absolute or relative executable path or the name of an application in the |
|
1990 | absolute or relative executable path or the name of an application in the | |
1990 | executable search path. The tool is assumed to be able to handle the merge |
|
1991 | executable search path. The tool is assumed to be able to handle the merge | |
1991 | if it can handle symlinks if the file is a symlink, if it can handle |
|
1992 | if it can handle symlinks if the file is a symlink, if it can handle | |
1992 | binary files if the file is binary, and if a GUI is available if the tool |
|
1993 | binary files if the file is binary, and if a GUI is available if the tool | |
1993 | requires a GUI. |
|
1994 | requires a GUI. | |
1994 |
|
1995 | |||
1995 | There are some internal merge tools which can be used. The internal merge |
|
1996 | There are some internal merge tools which can be used. The internal merge | |
1996 | tools are: |
|
1997 | tools are: | |
1997 |
|
1998 | |||
1998 | ":dump" |
|
1999 | ":dump" | |
1999 | Creates three versions of the files to merge, containing the contents of |
|
2000 | Creates three versions of the files to merge, containing the contents of | |
2000 | local, other and base. These files can then be used to perform a merge |
|
2001 | local, other and base. These files can then be used to perform a merge | |
2001 | manually. If the file to be merged is named "a.txt", these files will |
|
2002 | manually. If the file to be merged is named "a.txt", these files will | |
2002 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
2003 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and | |
2003 | they will be placed in the same directory as "a.txt". |
|
2004 | they will be placed in the same directory as "a.txt". | |
2004 |
|
2005 | |||
2005 | This implies premerge. Therefore, files aren't dumped, if premerge runs |
|
2006 | This implies premerge. Therefore, files aren't dumped, if premerge runs | |
2006 | successfully. Use :forcedump to forcibly write files out. |
|
2007 | successfully. Use :forcedump to forcibly write files out. | |
2007 |
|
2008 | |||
2008 | (actual capabilities: binary, symlink) |
|
2009 | (actual capabilities: binary, symlink) | |
2009 |
|
2010 | |||
2010 | ":fail" |
|
2011 | ":fail" | |
2011 | Rather than attempting to merge files that were modified on both |
|
2012 | Rather than attempting to merge files that were modified on both | |
2012 | branches, it marks them as unresolved. The resolve command must be used |
|
2013 | branches, it marks them as unresolved. The resolve command must be used | |
2013 | to resolve these conflicts. |
|
2014 | to resolve these conflicts. | |
2014 |
|
2015 | |||
2015 | (actual capabilities: binary, symlink) |
|
2016 | (actual capabilities: binary, symlink) | |
2016 |
|
2017 | |||
2017 | ":forcedump" |
|
2018 | ":forcedump" | |
2018 | Creates three versions of the files as same as :dump, but omits |
|
2019 | Creates three versions of the files as same as :dump, but omits | |
2019 | premerge. |
|
2020 | premerge. | |
2020 |
|
2021 | |||
2021 | (actual capabilities: binary, symlink) |
|
2022 | (actual capabilities: binary, symlink) | |
2022 |
|
2023 | |||
2023 | ":local" |
|
2024 | ":local" | |
2024 | Uses the local 'p1()' version of files as the merged version. |
|
2025 | Uses the local 'p1()' version of files as the merged version. | |
2025 |
|
2026 | |||
2026 | (actual capabilities: binary, symlink) |
|
2027 | (actual capabilities: binary, symlink) | |
2027 |
|
2028 | |||
2028 | ":merge" |
|
2029 | ":merge" | |
2029 | Uses the internal non-interactive simple merge algorithm for merging |
|
2030 | Uses the internal non-interactive simple merge algorithm for merging | |
2030 | files. It will fail if there are any conflicts and leave markers in the |
|
2031 | files. It will fail if there are any conflicts and leave markers in the | |
2031 | partially merged file. Markers will have two sections, one for each side |
|
2032 | partially merged file. Markers will have two sections, one for each side | |
2032 | of merge. |
|
2033 | of merge. | |
2033 |
|
2034 | |||
2034 | ":merge-local" |
|
2035 | ":merge-local" | |
2035 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
2036 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
2036 | local 'p1()' changes. |
|
2037 | local 'p1()' changes. | |
2037 |
|
2038 | |||
2038 | ":merge-other" |
|
2039 | ":merge-other" | |
2039 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
2040 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
2040 | other 'p2()' changes. |
|
2041 | other 'p2()' changes. | |
2041 |
|
2042 | |||
2042 | ":merge3" |
|
2043 | ":merge3" | |
2043 | Uses the internal non-interactive simple merge algorithm for merging |
|
2044 | Uses the internal non-interactive simple merge algorithm for merging | |
2044 | files. It will fail if there are any conflicts and leave markers in the |
|
2045 | files. It will fail if there are any conflicts and leave markers in the | |
2045 | partially merged file. Marker will have three sections, one from each |
|
2046 | partially merged file. Marker will have three sections, one from each | |
2046 | side of the merge and one for the base content. |
|
2047 | side of the merge and one for the base content. | |
2047 |
|
2048 | |||
2048 | ":other" |
|
2049 | ":other" | |
2049 | Uses the other 'p2()' version of files as the merged version. |
|
2050 | Uses the other 'p2()' version of files as the merged version. | |
2050 |
|
2051 | |||
2051 | (actual capabilities: binary, symlink) |
|
2052 | (actual capabilities: binary, symlink) | |
2052 |
|
2053 | |||
2053 | ":prompt" |
|
2054 | ":prompt" | |
2054 | Asks the user which of the local 'p1()' or the other 'p2()' version to |
|
2055 | Asks the user which of the local 'p1()' or the other 'p2()' version to | |
2055 | keep as the merged version. |
|
2056 | keep as the merged version. | |
2056 |
|
2057 | |||
2057 | (actual capabilities: binary, symlink) |
|
2058 | (actual capabilities: binary, symlink) | |
2058 |
|
2059 | |||
2059 | ":tagmerge" |
|
2060 | ":tagmerge" | |
2060 | Uses the internal tag merge algorithm (experimental). |
|
2061 | Uses the internal tag merge algorithm (experimental). | |
2061 |
|
2062 | |||
2062 | ":union" |
|
2063 | ":union" | |
2063 | Uses the internal non-interactive simple merge algorithm for merging |
|
2064 | Uses the internal non-interactive simple merge algorithm for merging | |
2064 | files. It will use both left and right sides for conflict regions. No |
|
2065 | files. It will use both left and right sides for conflict regions. No | |
2065 | markers are inserted. |
|
2066 | markers are inserted. | |
2066 |
|
2067 | |||
2067 | Internal tools are always available and do not require a GUI but will by |
|
2068 | Internal tools are always available and do not require a GUI but will by | |
2068 | default not handle symlinks or binary files. See next section for detail |
|
2069 | default not handle symlinks or binary files. See next section for detail | |
2069 | about "actual capabilities" described above. |
|
2070 | about "actual capabilities" described above. | |
2070 |
|
2071 | |||
2071 | Choosing a merge tool |
|
2072 | Choosing a merge tool | |
2072 | ===================== |
|
2073 | ===================== | |
2073 |
|
2074 | |||
2074 | Mercurial uses these rules when deciding which merge tool to use: |
|
2075 | Mercurial uses these rules when deciding which merge tool to use: | |
2075 |
|
2076 | |||
2076 | 1. If a tool has been specified with the --tool option to merge or |
|
2077 | 1. If a tool has been specified with the --tool option to merge or | |
2077 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
2078 | resolve, it is used. If it is the name of a tool in the merge-tools | |
2078 | configuration, its configuration is used. Otherwise the specified tool |
|
2079 | configuration, its configuration is used. Otherwise the specified tool | |
2079 | must be executable by the shell. |
|
2080 | must be executable by the shell. | |
2080 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
2081 | 2. If the "HGMERGE" environment variable is present, its value is used and | |
2081 | must be executable by the shell. |
|
2082 | must be executable by the shell. | |
2082 | 3. If the filename of the file to be merged matches any of the patterns in |
|
2083 | 3. If the filename of the file to be merged matches any of the patterns in | |
2083 | the merge-patterns configuration section, the first usable merge tool |
|
2084 | the merge-patterns configuration section, the first usable merge tool | |
2084 | corresponding to a matching pattern is used. |
|
2085 | corresponding to a matching pattern is used. | |
2085 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
2086 | 4. If ui.merge is set it will be considered next. If the value is not the | |
2086 | name of a configured tool, the specified value is used and must be |
|
2087 | name of a configured tool, the specified value is used and must be | |
2087 | executable by the shell. Otherwise the named tool is used if it is |
|
2088 | executable by the shell. Otherwise the named tool is used if it is | |
2088 | usable. |
|
2089 | usable. | |
2089 | 5. If any usable merge tools are present in the merge-tools configuration |
|
2090 | 5. If any usable merge tools are present in the merge-tools configuration | |
2090 | section, the one with the highest priority is used. |
|
2091 | section, the one with the highest priority is used. | |
2091 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
2092 | 6. If a program named "hgmerge" can be found on the system, it is used - | |
2092 | but it will by default not be used for symlinks and binary files. |
|
2093 | but it will by default not be used for symlinks and binary files. | |
2093 | 7. If the file to be merged is not binary and is not a symlink, then |
|
2094 | 7. If the file to be merged is not binary and is not a symlink, then | |
2094 | internal ":merge" is used. |
|
2095 | internal ":merge" is used. | |
2095 | 8. Otherwise, ":prompt" is used. |
|
2096 | 8. Otherwise, ":prompt" is used. | |
2096 |
|
2097 | |||
2097 | For historical reason, Mercurial treats merge tools as below while |
|
2098 | For historical reason, Mercurial treats merge tools as below while | |
2098 | examining rules above. |
|
2099 | examining rules above. | |
2099 |
|
2100 | |||
2100 | step specified via binary symlink |
|
2101 | step specified via binary symlink | |
2101 | ---------------------------------- |
|
2102 | ---------------------------------- | |
2102 | 1. --tool o/o o/o |
|
2103 | 1. --tool o/o o/o | |
2103 | 2. HGMERGE o/o o/o |
|
2104 | 2. HGMERGE o/o o/o | |
2104 | 3. merge-patterns o/o(*) x/?(*) |
|
2105 | 3. merge-patterns o/o(*) x/?(*) | |
2105 | 4. ui.merge x/?(*) x/?(*) |
|
2106 | 4. ui.merge x/?(*) x/?(*) | |
2106 |
|
2107 | |||
2107 | Each capability column indicates Mercurial behavior for internal/external |
|
2108 | Each capability column indicates Mercurial behavior for internal/external | |
2108 | merge tools at examining each rule. |
|
2109 | merge tools at examining each rule. | |
2109 |
|
2110 | |||
2110 | - "o": "assume that a tool has capability" |
|
2111 | - "o": "assume that a tool has capability" | |
2111 | - "x": "assume that a tool does not have capability" |
|
2112 | - "x": "assume that a tool does not have capability" | |
2112 | - "?": "check actual capability of a tool" |
|
2113 | - "?": "check actual capability of a tool" | |
2113 |
|
2114 | |||
2114 | If "merge.strict-capability-check" configuration is true, Mercurial checks |
|
2115 | If "merge.strict-capability-check" configuration is true, Mercurial checks | |
2115 | capabilities of merge tools strictly in (*) cases above (= each capability |
|
2116 | capabilities of merge tools strictly in (*) cases above (= each capability | |
2116 | column becomes "?/?"). It is false by default for backward compatibility. |
|
2117 | column becomes "?/?"). It is false by default for backward compatibility. | |
2117 |
|
2118 | |||
2118 | Note: |
|
2119 | Note: | |
2119 | After selecting a merge program, Mercurial will by default attempt to |
|
2120 | After selecting a merge program, Mercurial will by default attempt to | |
2120 | merge the files using a simple merge algorithm first. Only if it |
|
2121 | merge the files using a simple merge algorithm first. Only if it | |
2121 | doesn't succeed because of conflicting changes will Mercurial actually |
|
2122 | doesn't succeed because of conflicting changes will Mercurial actually | |
2122 | execute the merge program. Whether to use the simple merge algorithm |
|
2123 | execute the merge program. Whether to use the simple merge algorithm | |
2123 | first can be controlled by the premerge setting of the merge tool. |
|
2124 | first can be controlled by the premerge setting of the merge tool. | |
2124 | Premerge is enabled by default unless the file is binary or a symlink. |
|
2125 | Premerge is enabled by default unless the file is binary or a symlink. | |
2125 |
|
2126 | |||
2126 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
2127 | See the merge-tools and ui sections of hgrc(5) for details on the | |
2127 | configuration of merge tools. |
|
2128 | configuration of merge tools. | |
2128 |
|
2129 | |||
2129 | Compression engines listed in `hg help bundlespec` |
|
2130 | Compression engines listed in `hg help bundlespec` | |
2130 |
|
2131 | |||
2131 | $ hg help bundlespec | grep gzip |
|
2132 | $ hg help bundlespec | grep gzip | |
2132 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression |
|
2133 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression | |
2133 | An algorithm that produces smaller bundles than "gzip". |
|
2134 | An algorithm that produces smaller bundles than "gzip". | |
2134 | This engine will likely produce smaller bundles than "gzip" but will be |
|
2135 | This engine will likely produce smaller bundles than "gzip" but will be | |
2135 | "gzip" |
|
2136 | "gzip" | |
2136 | better compression than "gzip". It also frequently yields better (?) |
|
2137 | better compression than "gzip". It also frequently yields better (?) | |
2137 |
|
2138 | |||
2138 | Test usage of section marks in help documents |
|
2139 | Test usage of section marks in help documents | |
2139 |
|
2140 | |||
2140 | $ cd "$TESTDIR"/../doc |
|
2141 | $ cd "$TESTDIR"/../doc | |
2141 | $ "$PYTHON" check-seclevel.py |
|
2142 | $ "$PYTHON" check-seclevel.py | |
2142 | $ cd $TESTTMP |
|
2143 | $ cd $TESTTMP | |
2143 |
|
2144 | |||
2144 | #if serve |
|
2145 | #if serve | |
2145 |
|
2146 | |||
2146 | Test the help pages in hgweb. |
|
2147 | Test the help pages in hgweb. | |
2147 |
|
2148 | |||
2148 | Dish up an empty repo; serve it cold. |
|
2149 | Dish up an empty repo; serve it cold. | |
2149 |
|
2150 | |||
2150 | $ hg init "$TESTTMP/test" |
|
2151 | $ hg init "$TESTTMP/test" | |
2151 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
2152 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid | |
2152 | $ cat hg.pid >> $DAEMON_PIDS |
|
2153 | $ cat hg.pid >> $DAEMON_PIDS | |
2153 |
|
2154 | |||
2154 | $ get-with-headers.py $LOCALIP:$HGPORT "help" |
|
2155 | $ get-with-headers.py $LOCALIP:$HGPORT "help" | |
2155 | 200 Script output follows |
|
2156 | 200 Script output follows | |
2156 |
|
2157 | |||
2157 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2158 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2158 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2159 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2159 | <head> |
|
2160 | <head> | |
2160 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2161 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2161 | <meta name="robots" content="index, nofollow" /> |
|
2162 | <meta name="robots" content="index, nofollow" /> | |
2162 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2163 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2163 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2164 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2164 |
|
2165 | |||
2165 | <title>Help: Index</title> |
|
2166 | <title>Help: Index</title> | |
2166 | </head> |
|
2167 | </head> | |
2167 | <body> |
|
2168 | <body> | |
2168 |
|
2169 | |||
2169 | <div class="container"> |
|
2170 | <div class="container"> | |
2170 | <div class="menu"> |
|
2171 | <div class="menu"> | |
2171 | <div class="logo"> |
|
2172 | <div class="logo"> | |
2172 | <a href="https://mercurial-scm.org/"> |
|
2173 | <a href="https://mercurial-scm.org/"> | |
2173 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2174 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2174 | </div> |
|
2175 | </div> | |
2175 | <ul> |
|
2176 | <ul> | |
2176 | <li><a href="/shortlog">log</a></li> |
|
2177 | <li><a href="/shortlog">log</a></li> | |
2177 | <li><a href="/graph">graph</a></li> |
|
2178 | <li><a href="/graph">graph</a></li> | |
2178 | <li><a href="/tags">tags</a></li> |
|
2179 | <li><a href="/tags">tags</a></li> | |
2179 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2180 | <li><a href="/bookmarks">bookmarks</a></li> | |
2180 | <li><a href="/branches">branches</a></li> |
|
2181 | <li><a href="/branches">branches</a></li> | |
2181 | </ul> |
|
2182 | </ul> | |
2182 | <ul> |
|
2183 | <ul> | |
2183 | <li class="active">help</li> |
|
2184 | <li class="active">help</li> | |
2184 | </ul> |
|
2185 | </ul> | |
2185 | </div> |
|
2186 | </div> | |
2186 |
|
2187 | |||
2187 | <div class="main"> |
|
2188 | <div class="main"> | |
2188 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2189 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2189 |
|
2190 | |||
2190 | <form class="search" action="/log"> |
|
2191 | <form class="search" action="/log"> | |
2191 |
|
2192 | |||
2192 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2193 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2193 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2194 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2194 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2195 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2195 | </form> |
|
2196 | </form> | |
2196 | <table class="bigtable"> |
|
2197 | <table class="bigtable"> | |
2197 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
2198 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
2198 |
|
2199 | |||
2199 | <tr><td> |
|
2200 | <tr><td> | |
2200 | <a href="/help/bundlespec"> |
|
2201 | <a href="/help/bundlespec"> | |
2201 | bundlespec |
|
2202 | bundlespec | |
2202 | </a> |
|
2203 | </a> | |
2203 | </td><td> |
|
2204 | </td><td> | |
2204 | Bundle File Formats |
|
2205 | Bundle File Formats | |
2205 | </td></tr> |
|
2206 | </td></tr> | |
2206 | <tr><td> |
|
2207 | <tr><td> | |
2207 | <a href="/help/color"> |
|
2208 | <a href="/help/color"> | |
2208 | color |
|
2209 | color | |
2209 | </a> |
|
2210 | </a> | |
2210 | </td><td> |
|
2211 | </td><td> | |
2211 | Colorizing Outputs |
|
2212 | Colorizing Outputs | |
2212 | </td></tr> |
|
2213 | </td></tr> | |
2213 | <tr><td> |
|
2214 | <tr><td> | |
2214 | <a href="/help/config"> |
|
2215 | <a href="/help/config"> | |
2215 | config |
|
2216 | config | |
2216 | </a> |
|
2217 | </a> | |
2217 | </td><td> |
|
2218 | </td><td> | |
2218 | Configuration Files |
|
2219 | Configuration Files | |
2219 | </td></tr> |
|
2220 | </td></tr> | |
2220 | <tr><td> |
|
2221 | <tr><td> | |
2221 | <a href="/help/dates"> |
|
2222 | <a href="/help/dates"> | |
2222 | dates |
|
2223 | dates | |
2223 | </a> |
|
2224 | </a> | |
2224 | </td><td> |
|
2225 | </td><td> | |
2225 | Date Formats |
|
2226 | Date Formats | |
2226 | </td></tr> |
|
2227 | </td></tr> | |
2227 | <tr><td> |
|
2228 | <tr><td> | |
2228 | <a href="/help/deprecated"> |
|
2229 | <a href="/help/deprecated"> | |
2229 | deprecated |
|
2230 | deprecated | |
2230 | </a> |
|
2231 | </a> | |
2231 | </td><td> |
|
2232 | </td><td> | |
2232 | Deprecated Features |
|
2233 | Deprecated Features | |
2233 | </td></tr> |
|
2234 | </td></tr> | |
2234 | <tr><td> |
|
2235 | <tr><td> | |
2235 | <a href="/help/diffs"> |
|
2236 | <a href="/help/diffs"> | |
2236 | diffs |
|
2237 | diffs | |
2237 | </a> |
|
2238 | </a> | |
2238 | </td><td> |
|
2239 | </td><td> | |
2239 | Diff Formats |
|
2240 | Diff Formats | |
2240 | </td></tr> |
|
2241 | </td></tr> | |
2241 | <tr><td> |
|
2242 | <tr><td> | |
2242 | <a href="/help/environment"> |
|
2243 | <a href="/help/environment"> | |
2243 | environment |
|
2244 | environment | |
2244 | </a> |
|
2245 | </a> | |
2245 | </td><td> |
|
2246 | </td><td> | |
2246 | Environment Variables |
|
2247 | Environment Variables | |
2247 | </td></tr> |
|
2248 | </td></tr> | |
2248 | <tr><td> |
|
2249 | <tr><td> | |
2249 | <a href="/help/extensions"> |
|
2250 | <a href="/help/extensions"> | |
2250 | extensions |
|
2251 | extensions | |
2251 | </a> |
|
2252 | </a> | |
2252 | </td><td> |
|
2253 | </td><td> | |
2253 | Using Additional Features |
|
2254 | Using Additional Features | |
2254 | </td></tr> |
|
2255 | </td></tr> | |
2255 | <tr><td> |
|
2256 | <tr><td> | |
2256 | <a href="/help/filesets"> |
|
2257 | <a href="/help/filesets"> | |
2257 | filesets |
|
2258 | filesets | |
2258 | </a> |
|
2259 | </a> | |
2259 | </td><td> |
|
2260 | </td><td> | |
2260 | Specifying File Sets |
|
2261 | Specifying File Sets | |
2261 | </td></tr> |
|
2262 | </td></tr> | |
2262 | <tr><td> |
|
2263 | <tr><td> | |
2263 | <a href="/help/flags"> |
|
2264 | <a href="/help/flags"> | |
2264 | flags |
|
2265 | flags | |
2265 | </a> |
|
2266 | </a> | |
2266 | </td><td> |
|
2267 | </td><td> | |
2267 | Command-line flags |
|
2268 | Command-line flags | |
2268 | </td></tr> |
|
2269 | </td></tr> | |
2269 | <tr><td> |
|
2270 | <tr><td> | |
2270 | <a href="/help/glossary"> |
|
2271 | <a href="/help/glossary"> | |
2271 | glossary |
|
2272 | glossary | |
2272 | </a> |
|
2273 | </a> | |
2273 | </td><td> |
|
2274 | </td><td> | |
2274 | Glossary |
|
2275 | Glossary | |
2275 | </td></tr> |
|
2276 | </td></tr> | |
2276 | <tr><td> |
|
2277 | <tr><td> | |
2277 | <a href="/help/hgignore"> |
|
2278 | <a href="/help/hgignore"> | |
2278 | hgignore |
|
2279 | hgignore | |
2279 | </a> |
|
2280 | </a> | |
2280 | </td><td> |
|
2281 | </td><td> | |
2281 | Syntax for Mercurial Ignore Files |
|
2282 | Syntax for Mercurial Ignore Files | |
2282 | </td></tr> |
|
2283 | </td></tr> | |
2283 | <tr><td> |
|
2284 | <tr><td> | |
2284 | <a href="/help/hgweb"> |
|
2285 | <a href="/help/hgweb"> | |
2285 | hgweb |
|
2286 | hgweb | |
2286 | </a> |
|
2287 | </a> | |
2287 | </td><td> |
|
2288 | </td><td> | |
2288 | Configuring hgweb |
|
2289 | Configuring hgweb | |
2289 | </td></tr> |
|
2290 | </td></tr> | |
2290 | <tr><td> |
|
2291 | <tr><td> | |
2291 | <a href="/help/internals"> |
|
2292 | <a href="/help/internals"> | |
2292 | internals |
|
2293 | internals | |
2293 | </a> |
|
2294 | </a> | |
2294 | </td><td> |
|
2295 | </td><td> | |
2295 | Technical implementation topics |
|
2296 | Technical implementation topics | |
2296 | </td></tr> |
|
2297 | </td></tr> | |
2297 | <tr><td> |
|
2298 | <tr><td> | |
2298 | <a href="/help/merge-tools"> |
|
2299 | <a href="/help/merge-tools"> | |
2299 | merge-tools |
|
2300 | merge-tools | |
2300 | </a> |
|
2301 | </a> | |
2301 | </td><td> |
|
2302 | </td><td> | |
2302 | Merge Tools |
|
2303 | Merge Tools | |
2303 | </td></tr> |
|
2304 | </td></tr> | |
2304 | <tr><td> |
|
2305 | <tr><td> | |
2305 | <a href="/help/pager"> |
|
2306 | <a href="/help/pager"> | |
2306 | pager |
|
2307 | pager | |
2307 | </a> |
|
2308 | </a> | |
2308 | </td><td> |
|
2309 | </td><td> | |
2309 | Pager Support |
|
2310 | Pager Support | |
2310 | </td></tr> |
|
2311 | </td></tr> | |
2311 | <tr><td> |
|
2312 | <tr><td> | |
2312 | <a href="/help/patterns"> |
|
2313 | <a href="/help/patterns"> | |
2313 | patterns |
|
2314 | patterns | |
2314 | </a> |
|
2315 | </a> | |
2315 | </td><td> |
|
2316 | </td><td> | |
2316 | File Name Patterns |
|
2317 | File Name Patterns | |
2317 | </td></tr> |
|
2318 | </td></tr> | |
2318 | <tr><td> |
|
2319 | <tr><td> | |
2319 | <a href="/help/phases"> |
|
2320 | <a href="/help/phases"> | |
2320 | phases |
|
2321 | phases | |
2321 | </a> |
|
2322 | </a> | |
2322 | </td><td> |
|
2323 | </td><td> | |
2323 | Working with Phases |
|
2324 | Working with Phases | |
2324 | </td></tr> |
|
2325 | </td></tr> | |
2325 | <tr><td> |
|
2326 | <tr><td> | |
2326 | <a href="/help/revisions"> |
|
2327 | <a href="/help/revisions"> | |
2327 | revisions |
|
2328 | revisions | |
2328 | </a> |
|
2329 | </a> | |
2329 | </td><td> |
|
2330 | </td><td> | |
2330 | Specifying Revisions |
|
2331 | Specifying Revisions | |
2331 | </td></tr> |
|
2332 | </td></tr> | |
2332 | <tr><td> |
|
2333 | <tr><td> | |
2333 | <a href="/help/scripting"> |
|
2334 | <a href="/help/scripting"> | |
2334 | scripting |
|
2335 | scripting | |
2335 | </a> |
|
2336 | </a> | |
2336 | </td><td> |
|
2337 | </td><td> | |
2337 | Using Mercurial from scripts and automation |
|
2338 | Using Mercurial from scripts and automation | |
2338 | </td></tr> |
|
2339 | </td></tr> | |
2339 | <tr><td> |
|
2340 | <tr><td> | |
2340 | <a href="/help/subrepos"> |
|
2341 | <a href="/help/subrepos"> | |
2341 | subrepos |
|
2342 | subrepos | |
2342 | </a> |
|
2343 | </a> | |
2343 | </td><td> |
|
2344 | </td><td> | |
2344 | Subrepositories |
|
2345 | Subrepositories | |
2345 | </td></tr> |
|
2346 | </td></tr> | |
2346 | <tr><td> |
|
2347 | <tr><td> | |
2347 | <a href="/help/templating"> |
|
2348 | <a href="/help/templating"> | |
2348 | templating |
|
2349 | templating | |
2349 | </a> |
|
2350 | </a> | |
2350 | </td><td> |
|
2351 | </td><td> | |
2351 | Template Usage |
|
2352 | Template Usage | |
2352 | </td></tr> |
|
2353 | </td></tr> | |
2353 | <tr><td> |
|
2354 | <tr><td> | |
2354 | <a href="/help/urls"> |
|
2355 | <a href="/help/urls"> | |
2355 | urls |
|
2356 | urls | |
2356 | </a> |
|
2357 | </a> | |
2357 | </td><td> |
|
2358 | </td><td> | |
2358 | URL Paths |
|
2359 | URL Paths | |
2359 | </td></tr> |
|
2360 | </td></tr> | |
2360 | <tr><td> |
|
2361 | <tr><td> | |
2361 | <a href="/help/topic-containing-verbose"> |
|
2362 | <a href="/help/topic-containing-verbose"> | |
2362 | topic-containing-verbose |
|
2363 | topic-containing-verbose | |
2363 | </a> |
|
2364 | </a> | |
2364 | </td><td> |
|
2365 | </td><td> | |
2365 | This is the topic to test omit indicating. |
|
2366 | This is the topic to test omit indicating. | |
2366 | </td></tr> |
|
2367 | </td></tr> | |
2367 |
|
2368 | |||
2368 |
|
2369 | |||
2369 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
2370 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> | |
2370 |
|
2371 | |||
2371 | <tr><td> |
|
2372 | <tr><td> | |
2372 | <a href="/help/abort"> |
|
2373 | <a href="/help/abort"> | |
2373 | abort |
|
2374 | abort | |
2374 | </a> |
|
2375 | </a> | |
2375 | </td><td> |
|
2376 | </td><td> | |
2376 | abort an unfinished operation (EXPERIMENTAL) |
|
2377 | abort an unfinished operation (EXPERIMENTAL) | |
2377 | </td></tr> |
|
2378 | </td></tr> | |
2378 | <tr><td> |
|
2379 | <tr><td> | |
2379 | <a href="/help/add"> |
|
2380 | <a href="/help/add"> | |
2380 | add |
|
2381 | add | |
2381 | </a> |
|
2382 | </a> | |
2382 | </td><td> |
|
2383 | </td><td> | |
2383 | add the specified files on the next commit |
|
2384 | add the specified files on the next commit | |
2384 | </td></tr> |
|
2385 | </td></tr> | |
2385 | <tr><td> |
|
2386 | <tr><td> | |
2386 | <a href="/help/annotate"> |
|
2387 | <a href="/help/annotate"> | |
2387 | annotate |
|
2388 | annotate | |
2388 | </a> |
|
2389 | </a> | |
2389 | </td><td> |
|
2390 | </td><td> | |
2390 | show changeset information by line for each file |
|
2391 | show changeset information by line for each file | |
2391 | </td></tr> |
|
2392 | </td></tr> | |
2392 | <tr><td> |
|
2393 | <tr><td> | |
2393 | <a href="/help/clone"> |
|
2394 | <a href="/help/clone"> | |
2394 | clone |
|
2395 | clone | |
2395 | </a> |
|
2396 | </a> | |
2396 | </td><td> |
|
2397 | </td><td> | |
2397 | make a copy of an existing repository |
|
2398 | make a copy of an existing repository | |
2398 | </td></tr> |
|
2399 | </td></tr> | |
2399 | <tr><td> |
|
2400 | <tr><td> | |
2400 | <a href="/help/commit"> |
|
2401 | <a href="/help/commit"> | |
2401 | commit |
|
2402 | commit | |
2402 | </a> |
|
2403 | </a> | |
2403 | </td><td> |
|
2404 | </td><td> | |
2404 | commit the specified files or all outstanding changes |
|
2405 | commit the specified files or all outstanding changes | |
2405 | </td></tr> |
|
2406 | </td></tr> | |
2406 | <tr><td> |
|
2407 | <tr><td> | |
2407 | <a href="/help/continue"> |
|
2408 | <a href="/help/continue"> | |
2408 | continue |
|
2409 | continue | |
2409 | </a> |
|
2410 | </a> | |
2410 | </td><td> |
|
2411 | </td><td> | |
2411 | resumes an interrupted operation (EXPERIMENTAL) |
|
2412 | resumes an interrupted operation (EXPERIMENTAL) | |
2412 | </td></tr> |
|
2413 | </td></tr> | |
2413 | <tr><td> |
|
2414 | <tr><td> | |
2414 | <a href="/help/diff"> |
|
2415 | <a href="/help/diff"> | |
2415 | diff |
|
2416 | diff | |
2416 | </a> |
|
2417 | </a> | |
2417 | </td><td> |
|
2418 | </td><td> | |
2418 | diff repository (or selected files) |
|
2419 | diff repository (or selected files) | |
2419 | </td></tr> |
|
2420 | </td></tr> | |
2420 | <tr><td> |
|
2421 | <tr><td> | |
2421 | <a href="/help/export"> |
|
2422 | <a href="/help/export"> | |
2422 | export |
|
2423 | export | |
2423 | </a> |
|
2424 | </a> | |
2424 | </td><td> |
|
2425 | </td><td> | |
2425 | dump the header and diffs for one or more changesets |
|
2426 | dump the header and diffs for one or more changesets | |
2426 | </td></tr> |
|
2427 | </td></tr> | |
2427 | <tr><td> |
|
2428 | <tr><td> | |
2428 | <a href="/help/forget"> |
|
2429 | <a href="/help/forget"> | |
2429 | forget |
|
2430 | forget | |
2430 | </a> |
|
2431 | </a> | |
2431 | </td><td> |
|
2432 | </td><td> | |
2432 | forget the specified files on the next commit |
|
2433 | forget the specified files on the next commit | |
2433 | </td></tr> |
|
2434 | </td></tr> | |
2434 | <tr><td> |
|
2435 | <tr><td> | |
2435 | <a href="/help/init"> |
|
2436 | <a href="/help/init"> | |
2436 | init |
|
2437 | init | |
2437 | </a> |
|
2438 | </a> | |
2438 | </td><td> |
|
2439 | </td><td> | |
2439 | create a new repository in the given directory |
|
2440 | create a new repository in the given directory | |
2440 | </td></tr> |
|
2441 | </td></tr> | |
2441 | <tr><td> |
|
2442 | <tr><td> | |
2442 | <a href="/help/log"> |
|
2443 | <a href="/help/log"> | |
2443 | log |
|
2444 | log | |
2444 | </a> |
|
2445 | </a> | |
2445 | </td><td> |
|
2446 | </td><td> | |
2446 | show revision history of entire repository or files |
|
2447 | show revision history of entire repository or files | |
2447 | </td></tr> |
|
2448 | </td></tr> | |
2448 | <tr><td> |
|
2449 | <tr><td> | |
2449 | <a href="/help/merge"> |
|
2450 | <a href="/help/merge"> | |
2450 | merge |
|
2451 | merge | |
2451 | </a> |
|
2452 | </a> | |
2452 | </td><td> |
|
2453 | </td><td> | |
2453 | merge another revision into working directory |
|
2454 | merge another revision into working directory | |
2454 | </td></tr> |
|
2455 | </td></tr> | |
2455 | <tr><td> |
|
2456 | <tr><td> | |
2456 | <a href="/help/pull"> |
|
2457 | <a href="/help/pull"> | |
2457 | pull |
|
2458 | pull | |
2458 | </a> |
|
2459 | </a> | |
2459 | </td><td> |
|
2460 | </td><td> | |
2460 | pull changes from the specified source |
|
2461 | pull changes from the specified source | |
2461 | </td></tr> |
|
2462 | </td></tr> | |
2462 | <tr><td> |
|
2463 | <tr><td> | |
2463 | <a href="/help/push"> |
|
2464 | <a href="/help/push"> | |
2464 | push |
|
2465 | push | |
2465 | </a> |
|
2466 | </a> | |
2466 | </td><td> |
|
2467 | </td><td> | |
2467 | push changes to the specified destination |
|
2468 | push changes to the specified destination | |
2468 | </td></tr> |
|
2469 | </td></tr> | |
2469 | <tr><td> |
|
2470 | <tr><td> | |
2470 | <a href="/help/remove"> |
|
2471 | <a href="/help/remove"> | |
2471 | remove |
|
2472 | remove | |
2472 | </a> |
|
2473 | </a> | |
2473 | </td><td> |
|
2474 | </td><td> | |
2474 | remove the specified files on the next commit |
|
2475 | remove the specified files on the next commit | |
2475 | </td></tr> |
|
2476 | </td></tr> | |
2476 | <tr><td> |
|
2477 | <tr><td> | |
2477 | <a href="/help/serve"> |
|
2478 | <a href="/help/serve"> | |
2478 | serve |
|
2479 | serve | |
2479 | </a> |
|
2480 | </a> | |
2480 | </td><td> |
|
2481 | </td><td> | |
2481 | start stand-alone webserver |
|
2482 | start stand-alone webserver | |
2482 | </td></tr> |
|
2483 | </td></tr> | |
2483 | <tr><td> |
|
2484 | <tr><td> | |
2484 | <a href="/help/status"> |
|
2485 | <a href="/help/status"> | |
2485 | status |
|
2486 | status | |
2486 | </a> |
|
2487 | </a> | |
2487 | </td><td> |
|
2488 | </td><td> | |
2488 | show changed files in the working directory |
|
2489 | show changed files in the working directory | |
2489 | </td></tr> |
|
2490 | </td></tr> | |
2490 | <tr><td> |
|
2491 | <tr><td> | |
2491 | <a href="/help/summary"> |
|
2492 | <a href="/help/summary"> | |
2492 | summary |
|
2493 | summary | |
2493 | </a> |
|
2494 | </a> | |
2494 | </td><td> |
|
2495 | </td><td> | |
2495 | summarize working directory state |
|
2496 | summarize working directory state | |
2496 | </td></tr> |
|
2497 | </td></tr> | |
2497 | <tr><td> |
|
2498 | <tr><td> | |
2498 | <a href="/help/update"> |
|
2499 | <a href="/help/update"> | |
2499 | update |
|
2500 | update | |
2500 | </a> |
|
2501 | </a> | |
2501 | </td><td> |
|
2502 | </td><td> | |
2502 | update working directory (or switch revisions) |
|
2503 | update working directory (or switch revisions) | |
2503 | </td></tr> |
|
2504 | </td></tr> | |
2504 |
|
2505 | |||
2505 |
|
2506 | |||
2506 |
|
2507 | |||
2507 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
2508 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> | |
2508 |
|
2509 | |||
2509 | <tr><td> |
|
2510 | <tr><td> | |
2510 | <a href="/help/addremove"> |
|
2511 | <a href="/help/addremove"> | |
2511 | addremove |
|
2512 | addremove | |
2512 | </a> |
|
2513 | </a> | |
2513 | </td><td> |
|
2514 | </td><td> | |
2514 | add all new files, delete all missing files |
|
2515 | add all new files, delete all missing files | |
2515 | </td></tr> |
|
2516 | </td></tr> | |
2516 | <tr><td> |
|
2517 | <tr><td> | |
2517 | <a href="/help/archive"> |
|
2518 | <a href="/help/archive"> | |
2518 | archive |
|
2519 | archive | |
2519 | </a> |
|
2520 | </a> | |
2520 | </td><td> |
|
2521 | </td><td> | |
2521 | create an unversioned archive of a repository revision |
|
2522 | create an unversioned archive of a repository revision | |
2522 | </td></tr> |
|
2523 | </td></tr> | |
2523 | <tr><td> |
|
2524 | <tr><td> | |
2524 | <a href="/help/backout"> |
|
2525 | <a href="/help/backout"> | |
2525 | backout |
|
2526 | backout | |
2526 | </a> |
|
2527 | </a> | |
2527 | </td><td> |
|
2528 | </td><td> | |
2528 | reverse effect of earlier changeset |
|
2529 | reverse effect of earlier changeset | |
2529 | </td></tr> |
|
2530 | </td></tr> | |
2530 | <tr><td> |
|
2531 | <tr><td> | |
2531 | <a href="/help/bisect"> |
|
2532 | <a href="/help/bisect"> | |
2532 | bisect |
|
2533 | bisect | |
2533 | </a> |
|
2534 | </a> | |
2534 | </td><td> |
|
2535 | </td><td> | |
2535 | subdivision search of changesets |
|
2536 | subdivision search of changesets | |
2536 | </td></tr> |
|
2537 | </td></tr> | |
2537 | <tr><td> |
|
2538 | <tr><td> | |
2538 | <a href="/help/bookmarks"> |
|
2539 | <a href="/help/bookmarks"> | |
2539 | bookmarks |
|
2540 | bookmarks | |
2540 | </a> |
|
2541 | </a> | |
2541 | </td><td> |
|
2542 | </td><td> | |
2542 | create a new bookmark or list existing bookmarks |
|
2543 | create a new bookmark or list existing bookmarks | |
2543 | </td></tr> |
|
2544 | </td></tr> | |
2544 | <tr><td> |
|
2545 | <tr><td> | |
2545 | <a href="/help/branch"> |
|
2546 | <a href="/help/branch"> | |
2546 | branch |
|
2547 | branch | |
2547 | </a> |
|
2548 | </a> | |
2548 | </td><td> |
|
2549 | </td><td> | |
2549 | set or show the current branch name |
|
2550 | set or show the current branch name | |
2550 | </td></tr> |
|
2551 | </td></tr> | |
2551 | <tr><td> |
|
2552 | <tr><td> | |
2552 | <a href="/help/branches"> |
|
2553 | <a href="/help/branches"> | |
2553 | branches |
|
2554 | branches | |
2554 | </a> |
|
2555 | </a> | |
2555 | </td><td> |
|
2556 | </td><td> | |
2556 | list repository named branches |
|
2557 | list repository named branches | |
2557 | </td></tr> |
|
2558 | </td></tr> | |
2558 | <tr><td> |
|
2559 | <tr><td> | |
2559 | <a href="/help/bundle"> |
|
2560 | <a href="/help/bundle"> | |
2560 | bundle |
|
2561 | bundle | |
2561 | </a> |
|
2562 | </a> | |
2562 | </td><td> |
|
2563 | </td><td> | |
2563 | create a bundle file |
|
2564 | create a bundle file | |
2564 | </td></tr> |
|
2565 | </td></tr> | |
2565 | <tr><td> |
|
2566 | <tr><td> | |
2566 | <a href="/help/cat"> |
|
2567 | <a href="/help/cat"> | |
2567 | cat |
|
2568 | cat | |
2568 | </a> |
|
2569 | </a> | |
2569 | </td><td> |
|
2570 | </td><td> | |
2570 | output the current or given revision of files |
|
2571 | output the current or given revision of files | |
2571 | </td></tr> |
|
2572 | </td></tr> | |
2572 | <tr><td> |
|
2573 | <tr><td> | |
2573 | <a href="/help/config"> |
|
2574 | <a href="/help/config"> | |
2574 | config |
|
2575 | config | |
2575 | </a> |
|
2576 | </a> | |
2576 | </td><td> |
|
2577 | </td><td> | |
2577 | show combined config settings from all hgrc files |
|
2578 | show combined config settings from all hgrc files | |
2578 | </td></tr> |
|
2579 | </td></tr> | |
2579 | <tr><td> |
|
2580 | <tr><td> | |
2580 | <a href="/help/copy"> |
|
2581 | <a href="/help/copy"> | |
2581 | copy |
|
2582 | copy | |
2582 | </a> |
|
2583 | </a> | |
2583 | </td><td> |
|
2584 | </td><td> | |
2584 | mark files as copied for the next commit |
|
2585 | mark files as copied for the next commit | |
2585 | </td></tr> |
|
2586 | </td></tr> | |
2586 | <tr><td> |
|
2587 | <tr><td> | |
2587 | <a href="/help/files"> |
|
2588 | <a href="/help/files"> | |
2588 | files |
|
2589 | files | |
2589 | </a> |
|
2590 | </a> | |
2590 | </td><td> |
|
2591 | </td><td> | |
2591 | list tracked files |
|
2592 | list tracked files | |
2592 | </td></tr> |
|
2593 | </td></tr> | |
2593 | <tr><td> |
|
2594 | <tr><td> | |
2594 | <a href="/help/graft"> |
|
2595 | <a href="/help/graft"> | |
2595 | graft |
|
2596 | graft | |
2596 | </a> |
|
2597 | </a> | |
2597 | </td><td> |
|
2598 | </td><td> | |
2598 | copy changes from other branches onto the current branch |
|
2599 | copy changes from other branches onto the current branch | |
2599 | </td></tr> |
|
2600 | </td></tr> | |
2600 | <tr><td> |
|
2601 | <tr><td> | |
2601 | <a href="/help/grep"> |
|
2602 | <a href="/help/grep"> | |
2602 | grep |
|
2603 | grep | |
2603 | </a> |
|
2604 | </a> | |
2604 | </td><td> |
|
2605 | </td><td> | |
2605 | search for a pattern in specified files |
|
2606 | search for a pattern in specified files | |
2606 | </td></tr> |
|
2607 | </td></tr> | |
2607 | <tr><td> |
|
2608 | <tr><td> | |
2608 | <a href="/help/hashelp"> |
|
2609 | <a href="/help/hashelp"> | |
2609 | hashelp |
|
2610 | hashelp | |
2610 | </a> |
|
2611 | </a> | |
2611 | </td><td> |
|
2612 | </td><td> | |
2612 | Extension command's help |
|
2613 | Extension command's help | |
2613 | </td></tr> |
|
2614 | </td></tr> | |
2614 | <tr><td> |
|
2615 | <tr><td> | |
2615 | <a href="/help/heads"> |
|
2616 | <a href="/help/heads"> | |
2616 | heads |
|
2617 | heads | |
2617 | </a> |
|
2618 | </a> | |
2618 | </td><td> |
|
2619 | </td><td> | |
2619 | show branch heads |
|
2620 | show branch heads | |
2620 | </td></tr> |
|
2621 | </td></tr> | |
2621 | <tr><td> |
|
2622 | <tr><td> | |
2622 | <a href="/help/help"> |
|
2623 | <a href="/help/help"> | |
2623 | help |
|
2624 | help | |
2624 | </a> |
|
2625 | </a> | |
2625 | </td><td> |
|
2626 | </td><td> | |
2626 | show help for a given topic or a help overview |
|
2627 | show help for a given topic or a help overview | |
2627 | </td></tr> |
|
2628 | </td></tr> | |
2628 | <tr><td> |
|
2629 | <tr><td> | |
2629 | <a href="/help/hgalias"> |
|
2630 | <a href="/help/hgalias"> | |
2630 | hgalias |
|
2631 | hgalias | |
2631 | </a> |
|
2632 | </a> | |
2632 | </td><td> |
|
2633 | </td><td> | |
2633 | My doc |
|
2634 | My doc | |
2634 | </td></tr> |
|
2635 | </td></tr> | |
2635 | <tr><td> |
|
2636 | <tr><td> | |
2636 | <a href="/help/hgaliasnodoc"> |
|
2637 | <a href="/help/hgaliasnodoc"> | |
2637 | hgaliasnodoc |
|
2638 | hgaliasnodoc | |
2638 | </a> |
|
2639 | </a> | |
2639 | </td><td> |
|
2640 | </td><td> | |
2640 | summarize working directory state |
|
2641 | summarize working directory state | |
2641 | </td></tr> |
|
2642 | </td></tr> | |
2642 | <tr><td> |
|
2643 | <tr><td> | |
2643 | <a href="/help/identify"> |
|
2644 | <a href="/help/identify"> | |
2644 | identify |
|
2645 | identify | |
2645 | </a> |
|
2646 | </a> | |
2646 | </td><td> |
|
2647 | </td><td> | |
2647 | identify the working directory or specified revision |
|
2648 | identify the working directory or specified revision | |
2648 | </td></tr> |
|
2649 | </td></tr> | |
2649 | <tr><td> |
|
2650 | <tr><td> | |
2650 | <a href="/help/import"> |
|
2651 | <a href="/help/import"> | |
2651 | import |
|
2652 | import | |
2652 | </a> |
|
2653 | </a> | |
2653 | </td><td> |
|
2654 | </td><td> | |
2654 | import an ordered set of patches |
|
2655 | import an ordered set of patches | |
2655 | </td></tr> |
|
2656 | </td></tr> | |
2656 | <tr><td> |
|
2657 | <tr><td> | |
2657 | <a href="/help/incoming"> |
|
2658 | <a href="/help/incoming"> | |
2658 | incoming |
|
2659 | incoming | |
2659 | </a> |
|
2660 | </a> | |
2660 | </td><td> |
|
2661 | </td><td> | |
2661 | show new changesets found in source |
|
2662 | show new changesets found in source | |
2662 | </td></tr> |
|
2663 | </td></tr> | |
2663 | <tr><td> |
|
2664 | <tr><td> | |
2664 | <a href="/help/manifest"> |
|
2665 | <a href="/help/manifest"> | |
2665 | manifest |
|
2666 | manifest | |
2666 | </a> |
|
2667 | </a> | |
2667 | </td><td> |
|
2668 | </td><td> | |
2668 | output the current or given revision of the project manifest |
|
2669 | output the current or given revision of the project manifest | |
2669 | </td></tr> |
|
2670 | </td></tr> | |
2670 | <tr><td> |
|
2671 | <tr><td> | |
2671 | <a href="/help/nohelp"> |
|
2672 | <a href="/help/nohelp"> | |
2672 | nohelp |
|
2673 | nohelp | |
2673 | </a> |
|
2674 | </a> | |
2674 | </td><td> |
|
2675 | </td><td> | |
2675 | (no help text available) |
|
2676 | (no help text available) | |
2676 | </td></tr> |
|
2677 | </td></tr> | |
2677 | <tr><td> |
|
2678 | <tr><td> | |
2678 | <a href="/help/outgoing"> |
|
2679 | <a href="/help/outgoing"> | |
2679 | outgoing |
|
2680 | outgoing | |
2680 | </a> |
|
2681 | </a> | |
2681 | </td><td> |
|
2682 | </td><td> | |
2682 | show changesets not found in the destination |
|
2683 | show changesets not found in the destination | |
2683 | </td></tr> |
|
2684 | </td></tr> | |
2684 | <tr><td> |
|
2685 | <tr><td> | |
2685 | <a href="/help/paths"> |
|
2686 | <a href="/help/paths"> | |
2686 | paths |
|
2687 | paths | |
2687 | </a> |
|
2688 | </a> | |
2688 | </td><td> |
|
2689 | </td><td> | |
2689 | show aliases for remote repositories |
|
2690 | show aliases for remote repositories | |
2690 | </td></tr> |
|
2691 | </td></tr> | |
2691 | <tr><td> |
|
2692 | <tr><td> | |
2692 | <a href="/help/phase"> |
|
2693 | <a href="/help/phase"> | |
2693 | phase |
|
2694 | phase | |
2694 | </a> |
|
2695 | </a> | |
2695 | </td><td> |
|
2696 | </td><td> | |
2696 | set or show the current phase name |
|
2697 | set or show the current phase name | |
2697 | </td></tr> |
|
2698 | </td></tr> | |
2698 | <tr><td> |
|
2699 | <tr><td> | |
2699 | <a href="/help/recover"> |
|
2700 | <a href="/help/recover"> | |
2700 | recover |
|
2701 | recover | |
2701 | </a> |
|
2702 | </a> | |
2702 | </td><td> |
|
2703 | </td><td> | |
2703 | roll back an interrupted transaction |
|
2704 | roll back an interrupted transaction | |
2704 | </td></tr> |
|
2705 | </td></tr> | |
2705 | <tr><td> |
|
2706 | <tr><td> | |
2706 | <a href="/help/rename"> |
|
2707 | <a href="/help/rename"> | |
2707 | rename |
|
2708 | rename | |
2708 | </a> |
|
2709 | </a> | |
2709 | </td><td> |
|
2710 | </td><td> | |
2710 | rename files; equivalent of copy + remove |
|
2711 | rename files; equivalent of copy + remove | |
2711 | </td></tr> |
|
2712 | </td></tr> | |
2712 | <tr><td> |
|
2713 | <tr><td> | |
2713 | <a href="/help/resolve"> |
|
2714 | <a href="/help/resolve"> | |
2714 | resolve |
|
2715 | resolve | |
2715 | </a> |
|
2716 | </a> | |
2716 | </td><td> |
|
2717 | </td><td> | |
2717 | redo merges or set/view the merge status of files |
|
2718 | redo merges or set/view the merge status of files | |
2718 | </td></tr> |
|
2719 | </td></tr> | |
2719 | <tr><td> |
|
2720 | <tr><td> | |
2720 | <a href="/help/revert"> |
|
2721 | <a href="/help/revert"> | |
2721 | revert |
|
2722 | revert | |
2722 | </a> |
|
2723 | </a> | |
2723 | </td><td> |
|
2724 | </td><td> | |
2724 | restore files to their checkout state |
|
2725 | restore files to their checkout state | |
2725 | </td></tr> |
|
2726 | </td></tr> | |
2726 | <tr><td> |
|
2727 | <tr><td> | |
2727 | <a href="/help/root"> |
|
2728 | <a href="/help/root"> | |
2728 | root |
|
2729 | root | |
2729 | </a> |
|
2730 | </a> | |
2730 | </td><td> |
|
2731 | </td><td> | |
2731 | print the root (top) of the current working directory |
|
2732 | print the root (top) of the current working directory | |
2732 | </td></tr> |
|
2733 | </td></tr> | |
2733 | <tr><td> |
|
2734 | <tr><td> | |
2734 | <a href="/help/shellalias"> |
|
2735 | <a href="/help/shellalias"> | |
2735 | shellalias |
|
2736 | shellalias | |
2736 | </a> |
|
2737 | </a> | |
2737 | </td><td> |
|
2738 | </td><td> | |
2738 | (no help text available) |
|
2739 | (no help text available) | |
2739 | </td></tr> |
|
2740 | </td></tr> | |
2740 | <tr><td> |
|
2741 | <tr><td> | |
2741 | <a href="/help/shelve"> |
|
2742 | <a href="/help/shelve"> | |
2742 | shelve |
|
2743 | shelve | |
2743 | </a> |
|
2744 | </a> | |
2744 | </td><td> |
|
2745 | </td><td> | |
2745 | save and set aside changes from the working directory |
|
2746 | save and set aside changes from the working directory | |
2746 | </td></tr> |
|
2747 | </td></tr> | |
2747 | <tr><td> |
|
2748 | <tr><td> | |
2748 | <a href="/help/tag"> |
|
2749 | <a href="/help/tag"> | |
2749 | tag |
|
2750 | tag | |
2750 | </a> |
|
2751 | </a> | |
2751 | </td><td> |
|
2752 | </td><td> | |
2752 | add one or more tags for the current or given revision |
|
2753 | add one or more tags for the current or given revision | |
2753 | </td></tr> |
|
2754 | </td></tr> | |
2754 | <tr><td> |
|
2755 | <tr><td> | |
2755 | <a href="/help/tags"> |
|
2756 | <a href="/help/tags"> | |
2756 | tags |
|
2757 | tags | |
2757 | </a> |
|
2758 | </a> | |
2758 | </td><td> |
|
2759 | </td><td> | |
2759 | list repository tags |
|
2760 | list repository tags | |
2760 | </td></tr> |
|
2761 | </td></tr> | |
2761 | <tr><td> |
|
2762 | <tr><td> | |
2762 | <a href="/help/unbundle"> |
|
2763 | <a href="/help/unbundle"> | |
2763 | unbundle |
|
2764 | unbundle | |
2764 | </a> |
|
2765 | </a> | |
2765 | </td><td> |
|
2766 | </td><td> | |
2766 | apply one or more bundle files |
|
2767 | apply one or more bundle files | |
2767 | </td></tr> |
|
2768 | </td></tr> | |
2768 | <tr><td> |
|
2769 | <tr><td> | |
2769 | <a href="/help/unshelve"> |
|
2770 | <a href="/help/unshelve"> | |
2770 | unshelve |
|
2771 | unshelve | |
2771 | </a> |
|
2772 | </a> | |
2772 | </td><td> |
|
2773 | </td><td> | |
2773 | restore a shelved change to the working directory |
|
2774 | restore a shelved change to the working directory | |
2774 | </td></tr> |
|
2775 | </td></tr> | |
2775 | <tr><td> |
|
2776 | <tr><td> | |
2776 | <a href="/help/verify"> |
|
2777 | <a href="/help/verify"> | |
2777 | verify |
|
2778 | verify | |
2778 | </a> |
|
2779 | </a> | |
2779 | </td><td> |
|
2780 | </td><td> | |
2780 | verify the integrity of the repository |
|
2781 | verify the integrity of the repository | |
2781 | </td></tr> |
|
2782 | </td></tr> | |
2782 | <tr><td> |
|
2783 | <tr><td> | |
2783 | <a href="/help/version"> |
|
2784 | <a href="/help/version"> | |
2784 | version |
|
2785 | version | |
2785 | </a> |
|
2786 | </a> | |
2786 | </td><td> |
|
2787 | </td><td> | |
2787 | output version and copyright information |
|
2788 | output version and copyright information | |
2788 | </td></tr> |
|
2789 | </td></tr> | |
2789 |
|
2790 | |||
2790 |
|
2791 | |||
2791 | </table> |
|
2792 | </table> | |
2792 | </div> |
|
2793 | </div> | |
2793 | </div> |
|
2794 | </div> | |
2794 |
|
2795 | |||
2795 |
|
2796 | |||
2796 |
|
2797 | |||
2797 | </body> |
|
2798 | </body> | |
2798 | </html> |
|
2799 | </html> | |
2799 |
|
2800 | |||
2800 |
|
2801 | |||
2801 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" |
|
2802 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" | |
2802 | 200 Script output follows |
|
2803 | 200 Script output follows | |
2803 |
|
2804 | |||
2804 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2805 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2805 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2806 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2806 | <head> |
|
2807 | <head> | |
2807 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2808 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2808 | <meta name="robots" content="index, nofollow" /> |
|
2809 | <meta name="robots" content="index, nofollow" /> | |
2809 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2810 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2810 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2811 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2811 |
|
2812 | |||
2812 | <title>Help: add</title> |
|
2813 | <title>Help: add</title> | |
2813 | </head> |
|
2814 | </head> | |
2814 | <body> |
|
2815 | <body> | |
2815 |
|
2816 | |||
2816 | <div class="container"> |
|
2817 | <div class="container"> | |
2817 | <div class="menu"> |
|
2818 | <div class="menu"> | |
2818 | <div class="logo"> |
|
2819 | <div class="logo"> | |
2819 | <a href="https://mercurial-scm.org/"> |
|
2820 | <a href="https://mercurial-scm.org/"> | |
2820 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2821 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2821 | </div> |
|
2822 | </div> | |
2822 | <ul> |
|
2823 | <ul> | |
2823 | <li><a href="/shortlog">log</a></li> |
|
2824 | <li><a href="/shortlog">log</a></li> | |
2824 | <li><a href="/graph">graph</a></li> |
|
2825 | <li><a href="/graph">graph</a></li> | |
2825 | <li><a href="/tags">tags</a></li> |
|
2826 | <li><a href="/tags">tags</a></li> | |
2826 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2827 | <li><a href="/bookmarks">bookmarks</a></li> | |
2827 | <li><a href="/branches">branches</a></li> |
|
2828 | <li><a href="/branches">branches</a></li> | |
2828 | </ul> |
|
2829 | </ul> | |
2829 | <ul> |
|
2830 | <ul> | |
2830 | <li class="active"><a href="/help">help</a></li> |
|
2831 | <li class="active"><a href="/help">help</a></li> | |
2831 | </ul> |
|
2832 | </ul> | |
2832 | </div> |
|
2833 | </div> | |
2833 |
|
2834 | |||
2834 | <div class="main"> |
|
2835 | <div class="main"> | |
2835 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2836 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2836 | <h3>Help: add</h3> |
|
2837 | <h3>Help: add</h3> | |
2837 |
|
2838 | |||
2838 | <form class="search" action="/log"> |
|
2839 | <form class="search" action="/log"> | |
2839 |
|
2840 | |||
2840 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2841 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2841 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2842 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2842 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2843 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2843 | </form> |
|
2844 | </form> | |
2844 | <div id="doc"> |
|
2845 | <div id="doc"> | |
2845 | <p> |
|
2846 | <p> | |
2846 | hg add [OPTION]... [FILE]... |
|
2847 | hg add [OPTION]... [FILE]... | |
2847 | </p> |
|
2848 | </p> | |
2848 | <p> |
|
2849 | <p> | |
2849 | add the specified files on the next commit |
|
2850 | add the specified files on the next commit | |
2850 | </p> |
|
2851 | </p> | |
2851 | <p> |
|
2852 | <p> | |
2852 | Schedule files to be version controlled and added to the |
|
2853 | Schedule files to be version controlled and added to the | |
2853 | repository. |
|
2854 | repository. | |
2854 | </p> |
|
2855 | </p> | |
2855 | <p> |
|
2856 | <p> | |
2856 | The files will be added to the repository at the next commit. To |
|
2857 | The files will be added to the repository at the next commit. To | |
2857 | undo an add before that, see 'hg forget'. |
|
2858 | undo an add before that, see 'hg forget'. | |
2858 | </p> |
|
2859 | </p> | |
2859 | <p> |
|
2860 | <p> | |
2860 | If no names are given, add all files to the repository (except |
|
2861 | If no names are given, add all files to the repository (except | |
2861 | files matching ".hgignore"). |
|
2862 | files matching ".hgignore"). | |
2862 | </p> |
|
2863 | </p> | |
2863 | <p> |
|
2864 | <p> | |
2864 | Examples: |
|
2865 | Examples: | |
2865 | </p> |
|
2866 | </p> | |
2866 | <ul> |
|
2867 | <ul> | |
2867 | <li> New (unknown) files are added automatically by 'hg add': |
|
2868 | <li> New (unknown) files are added automatically by 'hg add': | |
2868 | <pre> |
|
2869 | <pre> | |
2869 | \$ ls (re) |
|
2870 | \$ ls (re) | |
2870 | foo.c |
|
2871 | foo.c | |
2871 | \$ hg status (re) |
|
2872 | \$ hg status (re) | |
2872 | ? foo.c |
|
2873 | ? foo.c | |
2873 | \$ hg add (re) |
|
2874 | \$ hg add (re) | |
2874 | adding foo.c |
|
2875 | adding foo.c | |
2875 | \$ hg status (re) |
|
2876 | \$ hg status (re) | |
2876 | A foo.c |
|
2877 | A foo.c | |
2877 | </pre> |
|
2878 | </pre> | |
2878 | <li> Specific files to be added can be specified: |
|
2879 | <li> Specific files to be added can be specified: | |
2879 | <pre> |
|
2880 | <pre> | |
2880 | \$ ls (re) |
|
2881 | \$ ls (re) | |
2881 | bar.c foo.c |
|
2882 | bar.c foo.c | |
2882 | \$ hg status (re) |
|
2883 | \$ hg status (re) | |
2883 | ? bar.c |
|
2884 | ? bar.c | |
2884 | ? foo.c |
|
2885 | ? foo.c | |
2885 | \$ hg add bar.c (re) |
|
2886 | \$ hg add bar.c (re) | |
2886 | \$ hg status (re) |
|
2887 | \$ hg status (re) | |
2887 | A bar.c |
|
2888 | A bar.c | |
2888 | ? foo.c |
|
2889 | ? foo.c | |
2889 | </pre> |
|
2890 | </pre> | |
2890 | </ul> |
|
2891 | </ul> | |
2891 | <p> |
|
2892 | <p> | |
2892 | Returns 0 if all files are successfully added. |
|
2893 | Returns 0 if all files are successfully added. | |
2893 | </p> |
|
2894 | </p> | |
2894 | <p> |
|
2895 | <p> | |
2895 | options ([+] can be repeated): |
|
2896 | options ([+] can be repeated): | |
2896 | </p> |
|
2897 | </p> | |
2897 | <table> |
|
2898 | <table> | |
2898 | <tr><td>-I</td> |
|
2899 | <tr><td>-I</td> | |
2899 | <td>--include PATTERN [+]</td> |
|
2900 | <td>--include PATTERN [+]</td> | |
2900 | <td>include names matching the given patterns</td></tr> |
|
2901 | <td>include names matching the given patterns</td></tr> | |
2901 | <tr><td>-X</td> |
|
2902 | <tr><td>-X</td> | |
2902 | <td>--exclude PATTERN [+]</td> |
|
2903 | <td>--exclude PATTERN [+]</td> | |
2903 | <td>exclude names matching the given patterns</td></tr> |
|
2904 | <td>exclude names matching the given patterns</td></tr> | |
2904 | <tr><td>-S</td> |
|
2905 | <tr><td>-S</td> | |
2905 | <td>--subrepos</td> |
|
2906 | <td>--subrepos</td> | |
2906 | <td>recurse into subrepositories</td></tr> |
|
2907 | <td>recurse into subrepositories</td></tr> | |
2907 | <tr><td>-n</td> |
|
2908 | <tr><td>-n</td> | |
2908 | <td>--dry-run</td> |
|
2909 | <td>--dry-run</td> | |
2909 | <td>do not perform actions, just print output</td></tr> |
|
2910 | <td>do not perform actions, just print output</td></tr> | |
2910 | </table> |
|
2911 | </table> | |
2911 | <p> |
|
2912 | <p> | |
2912 | global options ([+] can be repeated): |
|
2913 | global options ([+] can be repeated): | |
2913 | </p> |
|
2914 | </p> | |
2914 | <table> |
|
2915 | <table> | |
2915 | <tr><td>-R</td> |
|
2916 | <tr><td>-R</td> | |
2916 | <td>--repository REPO</td> |
|
2917 | <td>--repository REPO</td> | |
2917 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2918 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2918 | <tr><td></td> |
|
2919 | <tr><td></td> | |
2919 | <td>--cwd DIR</td> |
|
2920 | <td>--cwd DIR</td> | |
2920 | <td>change working directory</td></tr> |
|
2921 | <td>change working directory</td></tr> | |
2921 | <tr><td>-y</td> |
|
2922 | <tr><td>-y</td> | |
2922 | <td>--noninteractive</td> |
|
2923 | <td>--noninteractive</td> | |
2923 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2924 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2924 | <tr><td>-q</td> |
|
2925 | <tr><td>-q</td> | |
2925 | <td>--quiet</td> |
|
2926 | <td>--quiet</td> | |
2926 | <td>suppress output</td></tr> |
|
2927 | <td>suppress output</td></tr> | |
2927 | <tr><td>-v</td> |
|
2928 | <tr><td>-v</td> | |
2928 | <td>--verbose</td> |
|
2929 | <td>--verbose</td> | |
2929 | <td>enable additional output</td></tr> |
|
2930 | <td>enable additional output</td></tr> | |
2930 | <tr><td></td> |
|
2931 | <tr><td></td> | |
2931 | <td>--color TYPE</td> |
|
2932 | <td>--color TYPE</td> | |
2932 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2933 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
2933 | <tr><td></td> |
|
2934 | <tr><td></td> | |
2934 | <td>--config CONFIG [+]</td> |
|
2935 | <td>--config CONFIG [+]</td> | |
2935 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2936 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2936 | <tr><td></td> |
|
2937 | <tr><td></td> | |
2937 | <td>--debug</td> |
|
2938 | <td>--debug</td> | |
2938 | <td>enable debugging output</td></tr> |
|
2939 | <td>enable debugging output</td></tr> | |
2939 | <tr><td></td> |
|
2940 | <tr><td></td> | |
2940 | <td>--debugger</td> |
|
2941 | <td>--debugger</td> | |
2941 | <td>start debugger</td></tr> |
|
2942 | <td>start debugger</td></tr> | |
2942 | <tr><td></td> |
|
2943 | <tr><td></td> | |
2943 | <td>--encoding ENCODE</td> |
|
2944 | <td>--encoding ENCODE</td> | |
2944 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2945 | <td>set the charset encoding (default: ascii)</td></tr> | |
2945 | <tr><td></td> |
|
2946 | <tr><td></td> | |
2946 | <td>--encodingmode MODE</td> |
|
2947 | <td>--encodingmode MODE</td> | |
2947 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2948 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2948 | <tr><td></td> |
|
2949 | <tr><td></td> | |
2949 | <td>--traceback</td> |
|
2950 | <td>--traceback</td> | |
2950 | <td>always print a traceback on exception</td></tr> |
|
2951 | <td>always print a traceback on exception</td></tr> | |
2951 | <tr><td></td> |
|
2952 | <tr><td></td> | |
2952 | <td>--time</td> |
|
2953 | <td>--time</td> | |
2953 | <td>time how long the command takes</td></tr> |
|
2954 | <td>time how long the command takes</td></tr> | |
2954 | <tr><td></td> |
|
2955 | <tr><td></td> | |
2955 | <td>--profile</td> |
|
2956 | <td>--profile</td> | |
2956 | <td>print command execution profile</td></tr> |
|
2957 | <td>print command execution profile</td></tr> | |
2957 | <tr><td></td> |
|
2958 | <tr><td></td> | |
2958 | <td>--version</td> |
|
2959 | <td>--version</td> | |
2959 | <td>output version information and exit</td></tr> |
|
2960 | <td>output version information and exit</td></tr> | |
2960 | <tr><td>-h</td> |
|
2961 | <tr><td>-h</td> | |
2961 | <td>--help</td> |
|
2962 | <td>--help</td> | |
2962 | <td>display help and exit</td></tr> |
|
2963 | <td>display help and exit</td></tr> | |
2963 | <tr><td></td> |
|
2964 | <tr><td></td> | |
2964 | <td>--hidden</td> |
|
2965 | <td>--hidden</td> | |
2965 | <td>consider hidden changesets</td></tr> |
|
2966 | <td>consider hidden changesets</td></tr> | |
2966 | <tr><td></td> |
|
2967 | <tr><td></td> | |
2967 | <td>--pager TYPE</td> |
|
2968 | <td>--pager TYPE</td> | |
2968 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2969 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
2969 | </table> |
|
2970 | </table> | |
2970 |
|
2971 | |||
2971 | </div> |
|
2972 | </div> | |
2972 | </div> |
|
2973 | </div> | |
2973 | </div> |
|
2974 | </div> | |
2974 |
|
2975 | |||
2975 |
|
2976 | |||
2976 |
|
2977 | |||
2977 | </body> |
|
2978 | </body> | |
2978 | </html> |
|
2979 | </html> | |
2979 |
|
2980 | |||
2980 |
|
2981 | |||
2981 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" |
|
2982 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" | |
2982 | 200 Script output follows |
|
2983 | 200 Script output follows | |
2983 |
|
2984 | |||
2984 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2985 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2985 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2986 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2986 | <head> |
|
2987 | <head> | |
2987 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2988 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2988 | <meta name="robots" content="index, nofollow" /> |
|
2989 | <meta name="robots" content="index, nofollow" /> | |
2989 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2990 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2990 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2991 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2991 |
|
2992 | |||
2992 | <title>Help: remove</title> |
|
2993 | <title>Help: remove</title> | |
2993 | </head> |
|
2994 | </head> | |
2994 | <body> |
|
2995 | <body> | |
2995 |
|
2996 | |||
2996 | <div class="container"> |
|
2997 | <div class="container"> | |
2997 | <div class="menu"> |
|
2998 | <div class="menu"> | |
2998 | <div class="logo"> |
|
2999 | <div class="logo"> | |
2999 | <a href="https://mercurial-scm.org/"> |
|
3000 | <a href="https://mercurial-scm.org/"> | |
3000 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3001 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3001 | </div> |
|
3002 | </div> | |
3002 | <ul> |
|
3003 | <ul> | |
3003 | <li><a href="/shortlog">log</a></li> |
|
3004 | <li><a href="/shortlog">log</a></li> | |
3004 | <li><a href="/graph">graph</a></li> |
|
3005 | <li><a href="/graph">graph</a></li> | |
3005 | <li><a href="/tags">tags</a></li> |
|
3006 | <li><a href="/tags">tags</a></li> | |
3006 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3007 | <li><a href="/bookmarks">bookmarks</a></li> | |
3007 | <li><a href="/branches">branches</a></li> |
|
3008 | <li><a href="/branches">branches</a></li> | |
3008 | </ul> |
|
3009 | </ul> | |
3009 | <ul> |
|
3010 | <ul> | |
3010 | <li class="active"><a href="/help">help</a></li> |
|
3011 | <li class="active"><a href="/help">help</a></li> | |
3011 | </ul> |
|
3012 | </ul> | |
3012 | </div> |
|
3013 | </div> | |
3013 |
|
3014 | |||
3014 | <div class="main"> |
|
3015 | <div class="main"> | |
3015 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3016 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3016 | <h3>Help: remove</h3> |
|
3017 | <h3>Help: remove</h3> | |
3017 |
|
3018 | |||
3018 | <form class="search" action="/log"> |
|
3019 | <form class="search" action="/log"> | |
3019 |
|
3020 | |||
3020 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3021 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3021 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3022 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3022 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3023 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3023 | </form> |
|
3024 | </form> | |
3024 | <div id="doc"> |
|
3025 | <div id="doc"> | |
3025 | <p> |
|
3026 | <p> | |
3026 | hg remove [OPTION]... FILE... |
|
3027 | hg remove [OPTION]... FILE... | |
3027 | </p> |
|
3028 | </p> | |
3028 | <p> |
|
3029 | <p> | |
3029 | aliases: rm |
|
3030 | aliases: rm | |
3030 | </p> |
|
3031 | </p> | |
3031 | <p> |
|
3032 | <p> | |
3032 | remove the specified files on the next commit |
|
3033 | remove the specified files on the next commit | |
3033 | </p> |
|
3034 | </p> | |
3034 | <p> |
|
3035 | <p> | |
3035 | Schedule the indicated files for removal from the current branch. |
|
3036 | Schedule the indicated files for removal from the current branch. | |
3036 | </p> |
|
3037 | </p> | |
3037 | <p> |
|
3038 | <p> | |
3038 | This command schedules the files to be removed at the next commit. |
|
3039 | This command schedules the files to be removed at the next commit. | |
3039 | To undo a remove before that, see 'hg revert'. To undo added |
|
3040 | To undo a remove before that, see 'hg revert'. To undo added | |
3040 | files, see 'hg forget'. |
|
3041 | files, see 'hg forget'. | |
3041 | </p> |
|
3042 | </p> | |
3042 | <p> |
|
3043 | <p> | |
3043 | -A/--after can be used to remove only files that have already |
|
3044 | -A/--after can be used to remove only files that have already | |
3044 | been deleted, -f/--force can be used to force deletion, and -Af |
|
3045 | been deleted, -f/--force can be used to force deletion, and -Af | |
3045 | can be used to remove files from the next revision without |
|
3046 | can be used to remove files from the next revision without | |
3046 | deleting them from the working directory. |
|
3047 | deleting them from the working directory. | |
3047 | </p> |
|
3048 | </p> | |
3048 | <p> |
|
3049 | <p> | |
3049 | The following table details the behavior of remove for different |
|
3050 | The following table details the behavior of remove for different | |
3050 | file states (columns) and option combinations (rows). The file |
|
3051 | file states (columns) and option combinations (rows). The file | |
3051 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
3052 | states are Added [A], Clean [C], Modified [M] and Missing [!] | |
3052 | (as reported by 'hg status'). The actions are Warn, Remove |
|
3053 | (as reported by 'hg status'). The actions are Warn, Remove | |
3053 | (from branch) and Delete (from disk): |
|
3054 | (from branch) and Delete (from disk): | |
3054 | </p> |
|
3055 | </p> | |
3055 | <table> |
|
3056 | <table> | |
3056 | <tr><td>opt/state</td> |
|
3057 | <tr><td>opt/state</td> | |
3057 | <td>A</td> |
|
3058 | <td>A</td> | |
3058 | <td>C</td> |
|
3059 | <td>C</td> | |
3059 | <td>M</td> |
|
3060 | <td>M</td> | |
3060 | <td>!</td></tr> |
|
3061 | <td>!</td></tr> | |
3061 | <tr><td>none</td> |
|
3062 | <tr><td>none</td> | |
3062 | <td>W</td> |
|
3063 | <td>W</td> | |
3063 | <td>RD</td> |
|
3064 | <td>RD</td> | |
3064 | <td>W</td> |
|
3065 | <td>W</td> | |
3065 | <td>R</td></tr> |
|
3066 | <td>R</td></tr> | |
3066 | <tr><td>-f</td> |
|
3067 | <tr><td>-f</td> | |
3067 | <td>R</td> |
|
3068 | <td>R</td> | |
3068 | <td>RD</td> |
|
3069 | <td>RD</td> | |
3069 | <td>RD</td> |
|
3070 | <td>RD</td> | |
3070 | <td>R</td></tr> |
|
3071 | <td>R</td></tr> | |
3071 | <tr><td>-A</td> |
|
3072 | <tr><td>-A</td> | |
3072 | <td>W</td> |
|
3073 | <td>W</td> | |
3073 | <td>W</td> |
|
3074 | <td>W</td> | |
3074 | <td>W</td> |
|
3075 | <td>W</td> | |
3075 | <td>R</td></tr> |
|
3076 | <td>R</td></tr> | |
3076 | <tr><td>-Af</td> |
|
3077 | <tr><td>-Af</td> | |
3077 | <td>R</td> |
|
3078 | <td>R</td> | |
3078 | <td>R</td> |
|
3079 | <td>R</td> | |
3079 | <td>R</td> |
|
3080 | <td>R</td> | |
3080 | <td>R</td></tr> |
|
3081 | <td>R</td></tr> | |
3081 | </table> |
|
3082 | </table> | |
3082 | <p> |
|
3083 | <p> | |
3083 | <b>Note:</b> |
|
3084 | <b>Note:</b> | |
3084 | </p> |
|
3085 | </p> | |
3085 | <p> |
|
3086 | <p> | |
3086 | 'hg remove' never deletes files in Added [A] state from the |
|
3087 | 'hg remove' never deletes files in Added [A] state from the | |
3087 | working directory, not even if "--force" is specified. |
|
3088 | working directory, not even if "--force" is specified. | |
3088 | </p> |
|
3089 | </p> | |
3089 | <p> |
|
3090 | <p> | |
3090 | Returns 0 on success, 1 if any warnings encountered. |
|
3091 | Returns 0 on success, 1 if any warnings encountered. | |
3091 | </p> |
|
3092 | </p> | |
3092 | <p> |
|
3093 | <p> | |
3093 | options ([+] can be repeated): |
|
3094 | options ([+] can be repeated): | |
3094 | </p> |
|
3095 | </p> | |
3095 | <table> |
|
3096 | <table> | |
3096 | <tr><td>-A</td> |
|
3097 | <tr><td>-A</td> | |
3097 | <td>--after</td> |
|
3098 | <td>--after</td> | |
3098 | <td>record delete for missing files</td></tr> |
|
3099 | <td>record delete for missing files</td></tr> | |
3099 | <tr><td>-f</td> |
|
3100 | <tr><td>-f</td> | |
3100 | <td>--force</td> |
|
3101 | <td>--force</td> | |
3101 | <td>forget added files, delete modified files</td></tr> |
|
3102 | <td>forget added files, delete modified files</td></tr> | |
3102 | <tr><td>-S</td> |
|
3103 | <tr><td>-S</td> | |
3103 | <td>--subrepos</td> |
|
3104 | <td>--subrepos</td> | |
3104 | <td>recurse into subrepositories</td></tr> |
|
3105 | <td>recurse into subrepositories</td></tr> | |
3105 | <tr><td>-I</td> |
|
3106 | <tr><td>-I</td> | |
3106 | <td>--include PATTERN [+]</td> |
|
3107 | <td>--include PATTERN [+]</td> | |
3107 | <td>include names matching the given patterns</td></tr> |
|
3108 | <td>include names matching the given patterns</td></tr> | |
3108 | <tr><td>-X</td> |
|
3109 | <tr><td>-X</td> | |
3109 | <td>--exclude PATTERN [+]</td> |
|
3110 | <td>--exclude PATTERN [+]</td> | |
3110 | <td>exclude names matching the given patterns</td></tr> |
|
3111 | <td>exclude names matching the given patterns</td></tr> | |
3111 | <tr><td>-n</td> |
|
3112 | <tr><td>-n</td> | |
3112 | <td>--dry-run</td> |
|
3113 | <td>--dry-run</td> | |
3113 | <td>do not perform actions, just print output</td></tr> |
|
3114 | <td>do not perform actions, just print output</td></tr> | |
3114 | </table> |
|
3115 | </table> | |
3115 | <p> |
|
3116 | <p> | |
3116 | global options ([+] can be repeated): |
|
3117 | global options ([+] can be repeated): | |
3117 | </p> |
|
3118 | </p> | |
3118 | <table> |
|
3119 | <table> | |
3119 | <tr><td>-R</td> |
|
3120 | <tr><td>-R</td> | |
3120 | <td>--repository REPO</td> |
|
3121 | <td>--repository REPO</td> | |
3121 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
3122 | <td>repository root directory or name of overlay bundle file</td></tr> | |
3122 | <tr><td></td> |
|
3123 | <tr><td></td> | |
3123 | <td>--cwd DIR</td> |
|
3124 | <td>--cwd DIR</td> | |
3124 | <td>change working directory</td></tr> |
|
3125 | <td>change working directory</td></tr> | |
3125 | <tr><td>-y</td> |
|
3126 | <tr><td>-y</td> | |
3126 | <td>--noninteractive</td> |
|
3127 | <td>--noninteractive</td> | |
3127 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
3128 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
3128 | <tr><td>-q</td> |
|
3129 | <tr><td>-q</td> | |
3129 | <td>--quiet</td> |
|
3130 | <td>--quiet</td> | |
3130 | <td>suppress output</td></tr> |
|
3131 | <td>suppress output</td></tr> | |
3131 | <tr><td>-v</td> |
|
3132 | <tr><td>-v</td> | |
3132 | <td>--verbose</td> |
|
3133 | <td>--verbose</td> | |
3133 | <td>enable additional output</td></tr> |
|
3134 | <td>enable additional output</td></tr> | |
3134 | <tr><td></td> |
|
3135 | <tr><td></td> | |
3135 | <td>--color TYPE</td> |
|
3136 | <td>--color TYPE</td> | |
3136 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
3137 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
3137 | <tr><td></td> |
|
3138 | <tr><td></td> | |
3138 | <td>--config CONFIG [+]</td> |
|
3139 | <td>--config CONFIG [+]</td> | |
3139 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
3140 | <td>set/override config option (use 'section.name=value')</td></tr> | |
3140 | <tr><td></td> |
|
3141 | <tr><td></td> | |
3141 | <td>--debug</td> |
|
3142 | <td>--debug</td> | |
3142 | <td>enable debugging output</td></tr> |
|
3143 | <td>enable debugging output</td></tr> | |
3143 | <tr><td></td> |
|
3144 | <tr><td></td> | |
3144 | <td>--debugger</td> |
|
3145 | <td>--debugger</td> | |
3145 | <td>start debugger</td></tr> |
|
3146 | <td>start debugger</td></tr> | |
3146 | <tr><td></td> |
|
3147 | <tr><td></td> | |
3147 | <td>--encoding ENCODE</td> |
|
3148 | <td>--encoding ENCODE</td> | |
3148 | <td>set the charset encoding (default: ascii)</td></tr> |
|
3149 | <td>set the charset encoding (default: ascii)</td></tr> | |
3149 | <tr><td></td> |
|
3150 | <tr><td></td> | |
3150 | <td>--encodingmode MODE</td> |
|
3151 | <td>--encodingmode MODE</td> | |
3151 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
3152 | <td>set the charset encoding mode (default: strict)</td></tr> | |
3152 | <tr><td></td> |
|
3153 | <tr><td></td> | |
3153 | <td>--traceback</td> |
|
3154 | <td>--traceback</td> | |
3154 | <td>always print a traceback on exception</td></tr> |
|
3155 | <td>always print a traceback on exception</td></tr> | |
3155 | <tr><td></td> |
|
3156 | <tr><td></td> | |
3156 | <td>--time</td> |
|
3157 | <td>--time</td> | |
3157 | <td>time how long the command takes</td></tr> |
|
3158 | <td>time how long the command takes</td></tr> | |
3158 | <tr><td></td> |
|
3159 | <tr><td></td> | |
3159 | <td>--profile</td> |
|
3160 | <td>--profile</td> | |
3160 | <td>print command execution profile</td></tr> |
|
3161 | <td>print command execution profile</td></tr> | |
3161 | <tr><td></td> |
|
3162 | <tr><td></td> | |
3162 | <td>--version</td> |
|
3163 | <td>--version</td> | |
3163 | <td>output version information and exit</td></tr> |
|
3164 | <td>output version information and exit</td></tr> | |
3164 | <tr><td>-h</td> |
|
3165 | <tr><td>-h</td> | |
3165 | <td>--help</td> |
|
3166 | <td>--help</td> | |
3166 | <td>display help and exit</td></tr> |
|
3167 | <td>display help and exit</td></tr> | |
3167 | <tr><td></td> |
|
3168 | <tr><td></td> | |
3168 | <td>--hidden</td> |
|
3169 | <td>--hidden</td> | |
3169 | <td>consider hidden changesets</td></tr> |
|
3170 | <td>consider hidden changesets</td></tr> | |
3170 | <tr><td></td> |
|
3171 | <tr><td></td> | |
3171 | <td>--pager TYPE</td> |
|
3172 | <td>--pager TYPE</td> | |
3172 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
3173 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
3173 | </table> |
|
3174 | </table> | |
3174 |
|
3175 | |||
3175 | </div> |
|
3176 | </div> | |
3176 | </div> |
|
3177 | </div> | |
3177 | </div> |
|
3178 | </div> | |
3178 |
|
3179 | |||
3179 |
|
3180 | |||
3180 |
|
3181 | |||
3181 | </body> |
|
3182 | </body> | |
3182 | </html> |
|
3183 | </html> | |
3183 |
|
3184 | |||
3184 |
|
3185 | |||
3185 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" |
|
3186 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" | |
3186 | 200 Script output follows |
|
3187 | 200 Script output follows | |
3187 |
|
3188 | |||
3188 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3189 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3189 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3190 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3190 | <head> |
|
3191 | <head> | |
3191 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3192 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3192 | <meta name="robots" content="index, nofollow" /> |
|
3193 | <meta name="robots" content="index, nofollow" /> | |
3193 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3194 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3194 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3195 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3195 |
|
3196 | |||
3196 | <title>Help: dates</title> |
|
3197 | <title>Help: dates</title> | |
3197 | </head> |
|
3198 | </head> | |
3198 | <body> |
|
3199 | <body> | |
3199 |
|
3200 | |||
3200 | <div class="container"> |
|
3201 | <div class="container"> | |
3201 | <div class="menu"> |
|
3202 | <div class="menu"> | |
3202 | <div class="logo"> |
|
3203 | <div class="logo"> | |
3203 | <a href="https://mercurial-scm.org/"> |
|
3204 | <a href="https://mercurial-scm.org/"> | |
3204 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3205 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3205 | </div> |
|
3206 | </div> | |
3206 | <ul> |
|
3207 | <ul> | |
3207 | <li><a href="/shortlog">log</a></li> |
|
3208 | <li><a href="/shortlog">log</a></li> | |
3208 | <li><a href="/graph">graph</a></li> |
|
3209 | <li><a href="/graph">graph</a></li> | |
3209 | <li><a href="/tags">tags</a></li> |
|
3210 | <li><a href="/tags">tags</a></li> | |
3210 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3211 | <li><a href="/bookmarks">bookmarks</a></li> | |
3211 | <li><a href="/branches">branches</a></li> |
|
3212 | <li><a href="/branches">branches</a></li> | |
3212 | </ul> |
|
3213 | </ul> | |
3213 | <ul> |
|
3214 | <ul> | |
3214 | <li class="active"><a href="/help">help</a></li> |
|
3215 | <li class="active"><a href="/help">help</a></li> | |
3215 | </ul> |
|
3216 | </ul> | |
3216 | </div> |
|
3217 | </div> | |
3217 |
|
3218 | |||
3218 | <div class="main"> |
|
3219 | <div class="main"> | |
3219 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3220 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3220 | <h3>Help: dates</h3> |
|
3221 | <h3>Help: dates</h3> | |
3221 |
|
3222 | |||
3222 | <form class="search" action="/log"> |
|
3223 | <form class="search" action="/log"> | |
3223 |
|
3224 | |||
3224 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3225 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3225 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3226 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3226 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3227 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3227 | </form> |
|
3228 | </form> | |
3228 | <div id="doc"> |
|
3229 | <div id="doc"> | |
3229 | <h1>Date Formats</h1> |
|
3230 | <h1>Date Formats</h1> | |
3230 | <p> |
|
3231 | <p> | |
3231 | Some commands allow the user to specify a date, e.g.: |
|
3232 | Some commands allow the user to specify a date, e.g.: | |
3232 | </p> |
|
3233 | </p> | |
3233 | <ul> |
|
3234 | <ul> | |
3234 | <li> backout, commit, import, tag: Specify the commit date. |
|
3235 | <li> backout, commit, import, tag: Specify the commit date. | |
3235 | <li> log, revert, update: Select revision(s) by date. |
|
3236 | <li> log, revert, update: Select revision(s) by date. | |
3236 | </ul> |
|
3237 | </ul> | |
3237 | <p> |
|
3238 | <p> | |
3238 | Many date formats are valid. Here are some examples: |
|
3239 | Many date formats are valid. Here are some examples: | |
3239 | </p> |
|
3240 | </p> | |
3240 | <ul> |
|
3241 | <ul> | |
3241 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
3242 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
3242 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
3243 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
3243 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
3244 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
3244 | <li> "Dec 6" (midnight) |
|
3245 | <li> "Dec 6" (midnight) | |
3245 | <li> "13:18" (today assumed) |
|
3246 | <li> "13:18" (today assumed) | |
3246 | <li> "3:39" (3:39AM assumed) |
|
3247 | <li> "3:39" (3:39AM assumed) | |
3247 | <li> "3:39pm" (15:39) |
|
3248 | <li> "3:39pm" (15:39) | |
3248 | <li> "2006-12-06 13:18:29" (ISO 8601 format) |
|
3249 | <li> "2006-12-06 13:18:29" (ISO 8601 format) | |
3249 | <li> "2006-12-6 13:18" |
|
3250 | <li> "2006-12-6 13:18" | |
3250 | <li> "2006-12-6" |
|
3251 | <li> "2006-12-6" | |
3251 | <li> "12-6" |
|
3252 | <li> "12-6" | |
3252 | <li> "12/6" |
|
3253 | <li> "12/6" | |
3253 | <li> "12/6/6" (Dec 6 2006) |
|
3254 | <li> "12/6/6" (Dec 6 2006) | |
3254 | <li> "today" (midnight) |
|
3255 | <li> "today" (midnight) | |
3255 | <li> "yesterday" (midnight) |
|
3256 | <li> "yesterday" (midnight) | |
3256 | <li> "now" - right now |
|
3257 | <li> "now" - right now | |
3257 | </ul> |
|
3258 | </ul> | |
3258 | <p> |
|
3259 | <p> | |
3259 | Lastly, there is Mercurial's internal format: |
|
3260 | Lastly, there is Mercurial's internal format: | |
3260 | </p> |
|
3261 | </p> | |
3261 | <ul> |
|
3262 | <ul> | |
3262 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
3263 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
3263 | </ul> |
|
3264 | </ul> | |
3264 | <p> |
|
3265 | <p> | |
3265 | This is the internal representation format for dates. The first number |
|
3266 | This is the internal representation format for dates. The first number | |
3266 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The |
|
3267 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The | |
3267 | second is the offset of the local timezone, in seconds west of UTC |
|
3268 | second is the offset of the local timezone, in seconds west of UTC | |
3268 | (negative if the timezone is east of UTC). |
|
3269 | (negative if the timezone is east of UTC). | |
3269 | </p> |
|
3270 | </p> | |
3270 | <p> |
|
3271 | <p> | |
3271 | The log command also accepts date ranges: |
|
3272 | The log command also accepts date ranges: | |
3272 | </p> |
|
3273 | </p> | |
3273 | <ul> |
|
3274 | <ul> | |
3274 | <li> "<DATE" - at or before a given date/time |
|
3275 | <li> "<DATE" - at or before a given date/time | |
3275 | <li> ">DATE" - on or after a given date/time |
|
3276 | <li> ">DATE" - on or after a given date/time | |
3276 | <li> "DATE to DATE" - a date range, inclusive |
|
3277 | <li> "DATE to DATE" - a date range, inclusive | |
3277 | <li> "-DAYS" - within a given number of days of today |
|
3278 | <li> "-DAYS" - within a given number of days of today | |
3278 | </ul> |
|
3279 | </ul> | |
3279 |
|
3280 | |||
3280 | </div> |
|
3281 | </div> | |
3281 | </div> |
|
3282 | </div> | |
3282 | </div> |
|
3283 | </div> | |
3283 |
|
3284 | |||
3284 |
|
3285 | |||
3285 |
|
3286 | |||
3286 | </body> |
|
3287 | </body> | |
3287 | </html> |
|
3288 | </html> | |
3288 |
|
3289 | |||
3289 |
|
3290 | |||
3290 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" |
|
3291 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" | |
3291 | 200 Script output follows |
|
3292 | 200 Script output follows | |
3292 |
|
3293 | |||
3293 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3294 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3294 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3295 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3295 | <head> |
|
3296 | <head> | |
3296 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3297 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3297 | <meta name="robots" content="index, nofollow" /> |
|
3298 | <meta name="robots" content="index, nofollow" /> | |
3298 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3299 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3299 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3300 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3300 |
|
3301 | |||
3301 | <title>Help: pager</title> |
|
3302 | <title>Help: pager</title> | |
3302 | </head> |
|
3303 | </head> | |
3303 | <body> |
|
3304 | <body> | |
3304 |
|
3305 | |||
3305 | <div class="container"> |
|
3306 | <div class="container"> | |
3306 | <div class="menu"> |
|
3307 | <div class="menu"> | |
3307 | <div class="logo"> |
|
3308 | <div class="logo"> | |
3308 | <a href="https://mercurial-scm.org/"> |
|
3309 | <a href="https://mercurial-scm.org/"> | |
3309 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3310 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3310 | </div> |
|
3311 | </div> | |
3311 | <ul> |
|
3312 | <ul> | |
3312 | <li><a href="/shortlog">log</a></li> |
|
3313 | <li><a href="/shortlog">log</a></li> | |
3313 | <li><a href="/graph">graph</a></li> |
|
3314 | <li><a href="/graph">graph</a></li> | |
3314 | <li><a href="/tags">tags</a></li> |
|
3315 | <li><a href="/tags">tags</a></li> | |
3315 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3316 | <li><a href="/bookmarks">bookmarks</a></li> | |
3316 | <li><a href="/branches">branches</a></li> |
|
3317 | <li><a href="/branches">branches</a></li> | |
3317 | </ul> |
|
3318 | </ul> | |
3318 | <ul> |
|
3319 | <ul> | |
3319 | <li class="active"><a href="/help">help</a></li> |
|
3320 | <li class="active"><a href="/help">help</a></li> | |
3320 | </ul> |
|
3321 | </ul> | |
3321 | </div> |
|
3322 | </div> | |
3322 |
|
3323 | |||
3323 | <div class="main"> |
|
3324 | <div class="main"> | |
3324 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3325 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3325 | <h3>Help: pager</h3> |
|
3326 | <h3>Help: pager</h3> | |
3326 |
|
3327 | |||
3327 | <form class="search" action="/log"> |
|
3328 | <form class="search" action="/log"> | |
3328 |
|
3329 | |||
3329 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3330 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3330 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3331 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3331 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3332 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3332 | </form> |
|
3333 | </form> | |
3333 | <div id="doc"> |
|
3334 | <div id="doc"> | |
3334 | <h1>Pager Support</h1> |
|
3335 | <h1>Pager Support</h1> | |
3335 | <p> |
|
3336 | <p> | |
3336 | Some Mercurial commands can produce a lot of output, and Mercurial will |
|
3337 | Some Mercurial commands can produce a lot of output, and Mercurial will | |
3337 | attempt to use a pager to make those commands more pleasant. |
|
3338 | attempt to use a pager to make those commands more pleasant. | |
3338 | </p> |
|
3339 | </p> | |
3339 | <p> |
|
3340 | <p> | |
3340 | To set the pager that should be used, set the application variable: |
|
3341 | To set the pager that should be used, set the application variable: | |
3341 | </p> |
|
3342 | </p> | |
3342 | <pre> |
|
3343 | <pre> | |
3343 | [pager] |
|
3344 | [pager] | |
3344 | pager = less -FRX |
|
3345 | pager = less -FRX | |
3345 | </pre> |
|
3346 | </pre> | |
3346 | <p> |
|
3347 | <p> | |
3347 | If no pager is set in the user or repository configuration, Mercurial uses the |
|
3348 | If no pager is set in the user or repository configuration, Mercurial uses the | |
3348 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default |
|
3349 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default | |
3349 | or system configuration is used. If none of these are set, a default pager will |
|
3350 | or system configuration is used. If none of these are set, a default pager will | |
3350 | be used, typically 'less' on Unix and 'more' on Windows. |
|
3351 | be used, typically 'less' on Unix and 'more' on Windows. | |
3351 | </p> |
|
3352 | </p> | |
3352 | <p> |
|
3353 | <p> | |
3353 | You can disable the pager for certain commands by adding them to the |
|
3354 | You can disable the pager for certain commands by adding them to the | |
3354 | pager.ignore list: |
|
3355 | pager.ignore list: | |
3355 | </p> |
|
3356 | </p> | |
3356 | <pre> |
|
3357 | <pre> | |
3357 | [pager] |
|
3358 | [pager] | |
3358 | ignore = version, help, update |
|
3359 | ignore = version, help, update | |
3359 | </pre> |
|
3360 | </pre> | |
3360 | <p> |
|
3361 | <p> | |
3361 | To ignore global commands like 'hg version' or 'hg help', you have |
|
3362 | To ignore global commands like 'hg version' or 'hg help', you have | |
3362 | to specify them in your user configuration file. |
|
3363 | to specify them in your user configuration file. | |
3363 | </p> |
|
3364 | </p> | |
3364 | <p> |
|
3365 | <p> | |
3365 | To control whether the pager is used at all for an individual command, |
|
3366 | To control whether the pager is used at all for an individual command, | |
3366 | you can use --pager=<value>: |
|
3367 | you can use --pager=<value>: | |
3367 | </p> |
|
3368 | </p> | |
3368 | <ul> |
|
3369 | <ul> | |
3369 | <li> use as needed: 'auto'. |
|
3370 | <li> use as needed: 'auto'. | |
3370 | <li> require the pager: 'yes' or 'on'. |
|
3371 | <li> require the pager: 'yes' or 'on'. | |
3371 | <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). |
|
3372 | <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). | |
3372 | </ul> |
|
3373 | </ul> | |
3373 | <p> |
|
3374 | <p> | |
3374 | To globally turn off all attempts to use a pager, set: |
|
3375 | To globally turn off all attempts to use a pager, set: | |
3375 | </p> |
|
3376 | </p> | |
3376 | <pre> |
|
3377 | <pre> | |
3377 | [ui] |
|
3378 | [ui] | |
3378 | paginate = never |
|
3379 | paginate = never | |
3379 | </pre> |
|
3380 | </pre> | |
3380 | <p> |
|
3381 | <p> | |
3381 | which will prevent the pager from running. |
|
3382 | which will prevent the pager from running. | |
3382 | </p> |
|
3383 | </p> | |
3383 |
|
3384 | |||
3384 | </div> |
|
3385 | </div> | |
3385 | </div> |
|
3386 | </div> | |
3386 | </div> |
|
3387 | </div> | |
3387 |
|
3388 | |||
3388 |
|
3389 | |||
3389 |
|
3390 | |||
3390 | </body> |
|
3391 | </body> | |
3391 | </html> |
|
3392 | </html> | |
3392 |
|
3393 | |||
3393 |
|
3394 | |||
3394 | Sub-topic indexes rendered properly |
|
3395 | Sub-topic indexes rendered properly | |
3395 |
|
3396 | |||
3396 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" |
|
3397 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" | |
3397 | 200 Script output follows |
|
3398 | 200 Script output follows | |
3398 |
|
3399 | |||
3399 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3400 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3400 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3401 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3401 | <head> |
|
3402 | <head> | |
3402 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3403 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3403 | <meta name="robots" content="index, nofollow" /> |
|
3404 | <meta name="robots" content="index, nofollow" /> | |
3404 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3405 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3405 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3406 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3406 |
|
3407 | |||
3407 | <title>Help: internals</title> |
|
3408 | <title>Help: internals</title> | |
3408 | </head> |
|
3409 | </head> | |
3409 | <body> |
|
3410 | <body> | |
3410 |
|
3411 | |||
3411 | <div class="container"> |
|
3412 | <div class="container"> | |
3412 | <div class="menu"> |
|
3413 | <div class="menu"> | |
3413 | <div class="logo"> |
|
3414 | <div class="logo"> | |
3414 | <a href="https://mercurial-scm.org/"> |
|
3415 | <a href="https://mercurial-scm.org/"> | |
3415 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3416 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3416 | </div> |
|
3417 | </div> | |
3417 | <ul> |
|
3418 | <ul> | |
3418 | <li><a href="/shortlog">log</a></li> |
|
3419 | <li><a href="/shortlog">log</a></li> | |
3419 | <li><a href="/graph">graph</a></li> |
|
3420 | <li><a href="/graph">graph</a></li> | |
3420 | <li><a href="/tags">tags</a></li> |
|
3421 | <li><a href="/tags">tags</a></li> | |
3421 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3422 | <li><a href="/bookmarks">bookmarks</a></li> | |
3422 | <li><a href="/branches">branches</a></li> |
|
3423 | <li><a href="/branches">branches</a></li> | |
3423 | </ul> |
|
3424 | </ul> | |
3424 | <ul> |
|
3425 | <ul> | |
3425 | <li><a href="/help">help</a></li> |
|
3426 | <li><a href="/help">help</a></li> | |
3426 | </ul> |
|
3427 | </ul> | |
3427 | </div> |
|
3428 | </div> | |
3428 |
|
3429 | |||
3429 | <div class="main"> |
|
3430 | <div class="main"> | |
3430 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3431 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3431 |
|
3432 | |||
3432 | <form class="search" action="/log"> |
|
3433 | <form class="search" action="/log"> | |
3433 |
|
3434 | |||
3434 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3435 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3435 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3436 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3436 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3437 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3437 | </form> |
|
3438 | </form> | |
3438 | <table class="bigtable"> |
|
3439 | <table class="bigtable"> | |
3439 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
3440 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
3440 |
|
3441 | |||
3441 | <tr><td> |
|
3442 | <tr><td> | |
|
3443 | <a href="/help/internals.bid-merge"> | |||
|
3444 | bid-merge | |||
|
3445 | </a> | |||
|
3446 | </td><td> | |||
|
3447 | Bid Merge Algorithm | |||
|
3448 | </td></tr> | |||
|
3449 | <tr><td> | |||
3442 | <a href="/help/internals.bundle2"> |
|
3450 | <a href="/help/internals.bundle2"> | |
3443 | bundle2 |
|
3451 | bundle2 | |
3444 | </a> |
|
3452 | </a> | |
3445 | </td><td> |
|
3453 | </td><td> | |
3446 | Bundle2 |
|
3454 | Bundle2 | |
3447 | </td></tr> |
|
3455 | </td></tr> | |
3448 | <tr><td> |
|
3456 | <tr><td> | |
3449 | <a href="/help/internals.bundles"> |
|
3457 | <a href="/help/internals.bundles"> | |
3450 | bundles |
|
3458 | bundles | |
3451 | </a> |
|
3459 | </a> | |
3452 | </td><td> |
|
3460 | </td><td> | |
3453 | Bundles |
|
3461 | Bundles | |
3454 | </td></tr> |
|
3462 | </td></tr> | |
3455 | <tr><td> |
|
3463 | <tr><td> | |
3456 | <a href="/help/internals.cbor"> |
|
3464 | <a href="/help/internals.cbor"> | |
3457 | cbor |
|
3465 | cbor | |
3458 | </a> |
|
3466 | </a> | |
3459 | </td><td> |
|
3467 | </td><td> | |
3460 | CBOR |
|
3468 | CBOR | |
3461 | </td></tr> |
|
3469 | </td></tr> | |
3462 | <tr><td> |
|
3470 | <tr><td> | |
3463 | <a href="/help/internals.censor"> |
|
3471 | <a href="/help/internals.censor"> | |
3464 | censor |
|
3472 | censor | |
3465 | </a> |
|
3473 | </a> | |
3466 | </td><td> |
|
3474 | </td><td> | |
3467 | Censor |
|
3475 | Censor | |
3468 | </td></tr> |
|
3476 | </td></tr> | |
3469 | <tr><td> |
|
3477 | <tr><td> | |
3470 | <a href="/help/internals.changegroups"> |
|
3478 | <a href="/help/internals.changegroups"> | |
3471 | changegroups |
|
3479 | changegroups | |
3472 | </a> |
|
3480 | </a> | |
3473 | </td><td> |
|
3481 | </td><td> | |
3474 | Changegroups |
|
3482 | Changegroups | |
3475 | </td></tr> |
|
3483 | </td></tr> | |
3476 | <tr><td> |
|
3484 | <tr><td> | |
3477 | <a href="/help/internals.config"> |
|
3485 | <a href="/help/internals.config"> | |
3478 | config |
|
3486 | config | |
3479 | </a> |
|
3487 | </a> | |
3480 | </td><td> |
|
3488 | </td><td> | |
3481 | Config Registrar |
|
3489 | Config Registrar | |
3482 | </td></tr> |
|
3490 | </td></tr> | |
3483 | <tr><td> |
|
3491 | <tr><td> | |
3484 | <a href="/help/internals.extensions"> |
|
3492 | <a href="/help/internals.extensions"> | |
3485 | extensions |
|
3493 | extensions | |
3486 | </a> |
|
3494 | </a> | |
3487 | </td><td> |
|
3495 | </td><td> | |
3488 | Extension API |
|
3496 | Extension API | |
3489 | </td></tr> |
|
3497 | </td></tr> | |
3490 | <tr><td> |
|
3498 | <tr><td> | |
3491 | <a href="/help/internals.mergestate"> |
|
3499 | <a href="/help/internals.mergestate"> | |
3492 | mergestate |
|
3500 | mergestate | |
3493 | </a> |
|
3501 | </a> | |
3494 | </td><td> |
|
3502 | </td><td> | |
3495 | Mergestate |
|
3503 | Mergestate | |
3496 | </td></tr> |
|
3504 | </td></tr> | |
3497 | <tr><td> |
|
3505 | <tr><td> | |
3498 | <a href="/help/internals.requirements"> |
|
3506 | <a href="/help/internals.requirements"> | |
3499 | requirements |
|
3507 | requirements | |
3500 | </a> |
|
3508 | </a> | |
3501 | </td><td> |
|
3509 | </td><td> | |
3502 | Repository Requirements |
|
3510 | Repository Requirements | |
3503 | </td></tr> |
|
3511 | </td></tr> | |
3504 | <tr><td> |
|
3512 | <tr><td> | |
3505 | <a href="/help/internals.revlogs"> |
|
3513 | <a href="/help/internals.revlogs"> | |
3506 | revlogs |
|
3514 | revlogs | |
3507 | </a> |
|
3515 | </a> | |
3508 | </td><td> |
|
3516 | </td><td> | |
3509 | Revision Logs |
|
3517 | Revision Logs | |
3510 | </td></tr> |
|
3518 | </td></tr> | |
3511 | <tr><td> |
|
3519 | <tr><td> | |
3512 | <a href="/help/internals.wireprotocol"> |
|
3520 | <a href="/help/internals.wireprotocol"> | |
3513 | wireprotocol |
|
3521 | wireprotocol | |
3514 | </a> |
|
3522 | </a> | |
3515 | </td><td> |
|
3523 | </td><td> | |
3516 | Wire Protocol |
|
3524 | Wire Protocol | |
3517 | </td></tr> |
|
3525 | </td></tr> | |
3518 | <tr><td> |
|
3526 | <tr><td> | |
3519 | <a href="/help/internals.wireprotocolrpc"> |
|
3527 | <a href="/help/internals.wireprotocolrpc"> | |
3520 | wireprotocolrpc |
|
3528 | wireprotocolrpc | |
3521 | </a> |
|
3529 | </a> | |
3522 | </td><td> |
|
3530 | </td><td> | |
3523 | Wire Protocol RPC |
|
3531 | Wire Protocol RPC | |
3524 | </td></tr> |
|
3532 | </td></tr> | |
3525 | <tr><td> |
|
3533 | <tr><td> | |
3526 | <a href="/help/internals.wireprotocolv2"> |
|
3534 | <a href="/help/internals.wireprotocolv2"> | |
3527 | wireprotocolv2 |
|
3535 | wireprotocolv2 | |
3528 | </a> |
|
3536 | </a> | |
3529 | </td><td> |
|
3537 | </td><td> | |
3530 | Wire Protocol Version 2 |
|
3538 | Wire Protocol Version 2 | |
3531 | </td></tr> |
|
3539 | </td></tr> | |
3532 |
|
3540 | |||
3533 |
|
3541 | |||
3534 |
|
3542 | |||
3535 |
|
3543 | |||
3536 |
|
3544 | |||
3537 | </table> |
|
3545 | </table> | |
3538 | </div> |
|
3546 | </div> | |
3539 | </div> |
|
3547 | </div> | |
3540 |
|
3548 | |||
3541 |
|
3549 | |||
3542 |
|
3550 | |||
3543 | </body> |
|
3551 | </body> | |
3544 | </html> |
|
3552 | </html> | |
3545 |
|
3553 | |||
3546 |
|
3554 | |||
3547 | Sub-topic topics rendered properly |
|
3555 | Sub-topic topics rendered properly | |
3548 |
|
3556 | |||
3549 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" |
|
3557 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" | |
3550 | 200 Script output follows |
|
3558 | 200 Script output follows | |
3551 |
|
3559 | |||
3552 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3560 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3553 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3561 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3554 | <head> |
|
3562 | <head> | |
3555 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3563 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3556 | <meta name="robots" content="index, nofollow" /> |
|
3564 | <meta name="robots" content="index, nofollow" /> | |
3557 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3565 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3558 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3566 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3559 |
|
3567 | |||
3560 | <title>Help: internals.changegroups</title> |
|
3568 | <title>Help: internals.changegroups</title> | |
3561 | </head> |
|
3569 | </head> | |
3562 | <body> |
|
3570 | <body> | |
3563 |
|
3571 | |||
3564 | <div class="container"> |
|
3572 | <div class="container"> | |
3565 | <div class="menu"> |
|
3573 | <div class="menu"> | |
3566 | <div class="logo"> |
|
3574 | <div class="logo"> | |
3567 | <a href="https://mercurial-scm.org/"> |
|
3575 | <a href="https://mercurial-scm.org/"> | |
3568 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3576 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3569 | </div> |
|
3577 | </div> | |
3570 | <ul> |
|
3578 | <ul> | |
3571 | <li><a href="/shortlog">log</a></li> |
|
3579 | <li><a href="/shortlog">log</a></li> | |
3572 | <li><a href="/graph">graph</a></li> |
|
3580 | <li><a href="/graph">graph</a></li> | |
3573 | <li><a href="/tags">tags</a></li> |
|
3581 | <li><a href="/tags">tags</a></li> | |
3574 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3582 | <li><a href="/bookmarks">bookmarks</a></li> | |
3575 | <li><a href="/branches">branches</a></li> |
|
3583 | <li><a href="/branches">branches</a></li> | |
3576 | </ul> |
|
3584 | </ul> | |
3577 | <ul> |
|
3585 | <ul> | |
3578 | <li class="active"><a href="/help">help</a></li> |
|
3586 | <li class="active"><a href="/help">help</a></li> | |
3579 | </ul> |
|
3587 | </ul> | |
3580 | </div> |
|
3588 | </div> | |
3581 |
|
3589 | |||
3582 | <div class="main"> |
|
3590 | <div class="main"> | |
3583 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3591 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3584 | <h3>Help: internals.changegroups</h3> |
|
3592 | <h3>Help: internals.changegroups</h3> | |
3585 |
|
3593 | |||
3586 | <form class="search" action="/log"> |
|
3594 | <form class="search" action="/log"> | |
3587 |
|
3595 | |||
3588 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3596 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3589 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3597 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3590 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3598 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3591 | </form> |
|
3599 | </form> | |
3592 | <div id="doc"> |
|
3600 | <div id="doc"> | |
3593 | <h1>Changegroups</h1> |
|
3601 | <h1>Changegroups</h1> | |
3594 | <p> |
|
3602 | <p> | |
3595 | Changegroups are representations of repository revlog data, specifically |
|
3603 | Changegroups are representations of repository revlog data, specifically | |
3596 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3604 | the changelog data, root/flat manifest data, treemanifest data, and | |
3597 | filelogs. |
|
3605 | filelogs. | |
3598 | </p> |
|
3606 | </p> | |
3599 | <p> |
|
3607 | <p> | |
3600 | There are 3 versions of changegroups: "1", "2", and "3". From a |
|
3608 | There are 3 versions of changegroups: "1", "2", and "3". From a | |
3601 | high-level, versions "1" and "2" are almost exactly the same, with the |
|
3609 | high-level, versions "1" and "2" are almost exactly the same, with the | |
3602 | only difference being an additional item in the *delta header*. Version |
|
3610 | only difference being an additional item in the *delta header*. Version | |
3603 | "3" adds support for storage flags in the *delta header* and optionally |
|
3611 | "3" adds support for storage flags in the *delta header* and optionally | |
3604 | exchanging treemanifests (enabled by setting an option on the |
|
3612 | exchanging treemanifests (enabled by setting an option on the | |
3605 | "changegroup" part in the bundle2). |
|
3613 | "changegroup" part in the bundle2). | |
3606 | </p> |
|
3614 | </p> | |
3607 | <p> |
|
3615 | <p> | |
3608 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
3616 | Changegroups when not exchanging treemanifests consist of 3 logical | |
3609 | segments: |
|
3617 | segments: | |
3610 | </p> |
|
3618 | </p> | |
3611 | <pre> |
|
3619 | <pre> | |
3612 | +---------------------------------+ |
|
3620 | +---------------------------------+ | |
3613 | | | | | |
|
3621 | | | | | | |
3614 | | changeset | manifest | filelogs | |
|
3622 | | changeset | manifest | filelogs | | |
3615 | | | | | |
|
3623 | | | | | | |
3616 | | | | | |
|
3624 | | | | | | |
3617 | +---------------------------------+ |
|
3625 | +---------------------------------+ | |
3618 | </pre> |
|
3626 | </pre> | |
3619 | <p> |
|
3627 | <p> | |
3620 | When exchanging treemanifests, there are 4 logical segments: |
|
3628 | When exchanging treemanifests, there are 4 logical segments: | |
3621 | </p> |
|
3629 | </p> | |
3622 | <pre> |
|
3630 | <pre> | |
3623 | +-------------------------------------------------+ |
|
3631 | +-------------------------------------------------+ | |
3624 | | | | | | |
|
3632 | | | | | | | |
3625 | | changeset | root | treemanifests | filelogs | |
|
3633 | | changeset | root | treemanifests | filelogs | | |
3626 | | | manifest | | | |
|
3634 | | | manifest | | | | |
3627 | | | | | | |
|
3635 | | | | | | | |
3628 | +-------------------------------------------------+ |
|
3636 | +-------------------------------------------------+ | |
3629 | </pre> |
|
3637 | </pre> | |
3630 | <p> |
|
3638 | <p> | |
3631 | The principle building block of each segment is a *chunk*. A *chunk* |
|
3639 | The principle building block of each segment is a *chunk*. A *chunk* | |
3632 | is a framed piece of data: |
|
3640 | is a framed piece of data: | |
3633 | </p> |
|
3641 | </p> | |
3634 | <pre> |
|
3642 | <pre> | |
3635 | +---------------------------------------+ |
|
3643 | +---------------------------------------+ | |
3636 | | | | |
|
3644 | | | | | |
3637 | | length | data | |
|
3645 | | length | data | | |
3638 | | (4 bytes) | (<length - 4> bytes) | |
|
3646 | | (4 bytes) | (<length - 4> bytes) | | |
3639 | | | | |
|
3647 | | | | | |
3640 | +---------------------------------------+ |
|
3648 | +---------------------------------------+ | |
3641 | </pre> |
|
3649 | </pre> | |
3642 | <p> |
|
3650 | <p> | |
3643 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
3651 | All integers are big-endian signed integers. Each chunk starts with a 32-bit | |
3644 | integer indicating the length of the entire chunk (including the length field |
|
3652 | integer indicating the length of the entire chunk (including the length field | |
3645 | itself). |
|
3653 | itself). | |
3646 | </p> |
|
3654 | </p> | |
3647 | <p> |
|
3655 | <p> | |
3648 | There is a special case chunk that has a value of 0 for the length |
|
3656 | There is a special case chunk that has a value of 0 for the length | |
3649 | ("0x00000000"). We call this an *empty chunk*. |
|
3657 | ("0x00000000"). We call this an *empty chunk*. | |
3650 | </p> |
|
3658 | </p> | |
3651 | <h2>Delta Groups</h2> |
|
3659 | <h2>Delta Groups</h2> | |
3652 | <p> |
|
3660 | <p> | |
3653 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
3661 | A *delta group* expresses the content of a revlog as a series of deltas, | |
3654 | or patches against previous revisions. |
|
3662 | or patches against previous revisions. | |
3655 | </p> |
|
3663 | </p> | |
3656 | <p> |
|
3664 | <p> | |
3657 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
3665 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
3658 | to signal the end of the delta group: |
|
3666 | to signal the end of the delta group: | |
3659 | </p> |
|
3667 | </p> | |
3660 | <pre> |
|
3668 | <pre> | |
3661 | +------------------------------------------------------------------------+ |
|
3669 | +------------------------------------------------------------------------+ | |
3662 | | | | | | | |
|
3670 | | | | | | | | |
3663 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
3671 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
3664 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
3672 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
3665 | | | | | | | |
|
3673 | | | | | | | | |
3666 | +------------------------------------------------------------------------+ |
|
3674 | +------------------------------------------------------------------------+ | |
3667 | </pre> |
|
3675 | </pre> | |
3668 | <p> |
|
3676 | <p> | |
3669 | Each *chunk*'s data consists of the following: |
|
3677 | Each *chunk*'s data consists of the following: | |
3670 | </p> |
|
3678 | </p> | |
3671 | <pre> |
|
3679 | <pre> | |
3672 | +---------------------------------------+ |
|
3680 | +---------------------------------------+ | |
3673 | | | | |
|
3681 | | | | | |
3674 | | delta header | delta data | |
|
3682 | | delta header | delta data | | |
3675 | | (various by version) | (various) | |
|
3683 | | (various by version) | (various) | | |
3676 | | | | |
|
3684 | | | | | |
3677 | +---------------------------------------+ |
|
3685 | +---------------------------------------+ | |
3678 | </pre> |
|
3686 | </pre> | |
3679 | <p> |
|
3687 | <p> | |
3680 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
3688 | The *delta data* is a series of *delta*s that describe a diff from an existing | |
3681 | entry (either that the recipient already has, or previously specified in the |
|
3689 | entry (either that the recipient already has, or previously specified in the | |
3682 | bundle/changegroup). |
|
3690 | bundle/changegroup). | |
3683 | </p> |
|
3691 | </p> | |
3684 | <p> |
|
3692 | <p> | |
3685 | The *delta header* is different between versions "1", "2", and |
|
3693 | The *delta header* is different between versions "1", "2", and | |
3686 | "3" of the changegroup format. |
|
3694 | "3" of the changegroup format. | |
3687 | </p> |
|
3695 | </p> | |
3688 | <p> |
|
3696 | <p> | |
3689 | Version 1 (headerlen=80): |
|
3697 | Version 1 (headerlen=80): | |
3690 | </p> |
|
3698 | </p> | |
3691 | <pre> |
|
3699 | <pre> | |
3692 | +------------------------------------------------------+ |
|
3700 | +------------------------------------------------------+ | |
3693 | | | | | | |
|
3701 | | | | | | | |
3694 | | node | p1 node | p2 node | link node | |
|
3702 | | node | p1 node | p2 node | link node | | |
3695 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3703 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3696 | | | | | | |
|
3704 | | | | | | | |
3697 | +------------------------------------------------------+ |
|
3705 | +------------------------------------------------------+ | |
3698 | </pre> |
|
3706 | </pre> | |
3699 | <p> |
|
3707 | <p> | |
3700 | Version 2 (headerlen=100): |
|
3708 | Version 2 (headerlen=100): | |
3701 | </p> |
|
3709 | </p> | |
3702 | <pre> |
|
3710 | <pre> | |
3703 | +------------------------------------------------------------------+ |
|
3711 | +------------------------------------------------------------------+ | |
3704 | | | | | | | |
|
3712 | | | | | | | | |
3705 | | node | p1 node | p2 node | base node | link node | |
|
3713 | | node | p1 node | p2 node | base node | link node | | |
3706 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3714 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3707 | | | | | | | |
|
3715 | | | | | | | | |
3708 | +------------------------------------------------------------------+ |
|
3716 | +------------------------------------------------------------------+ | |
3709 | </pre> |
|
3717 | </pre> | |
3710 | <p> |
|
3718 | <p> | |
3711 | Version 3 (headerlen=102): |
|
3719 | Version 3 (headerlen=102): | |
3712 | </p> |
|
3720 | </p> | |
3713 | <pre> |
|
3721 | <pre> | |
3714 | +------------------------------------------------------------------------------+ |
|
3722 | +------------------------------------------------------------------------------+ | |
3715 | | | | | | | | |
|
3723 | | | | | | | | | |
3716 | | node | p1 node | p2 node | base node | link node | flags | |
|
3724 | | node | p1 node | p2 node | base node | link node | flags | | |
3717 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
3725 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
3718 | | | | | | | | |
|
3726 | | | | | | | | | |
3719 | +------------------------------------------------------------------------------+ |
|
3727 | +------------------------------------------------------------------------------+ | |
3720 | </pre> |
|
3728 | </pre> | |
3721 | <p> |
|
3729 | <p> | |
3722 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a |
|
3730 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a | |
3723 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
3731 | series of *delta*s, densely packed (no separators). These deltas describe a diff | |
3724 | from an existing entry (either that the recipient already has, or previously |
|
3732 | from an existing entry (either that the recipient already has, or previously | |
3725 | specified in the bundle/changegroup). The format is described more fully in |
|
3733 | specified in the bundle/changegroup). The format is described more fully in | |
3726 | "hg help internals.bdiff", but briefly: |
|
3734 | "hg help internals.bdiff", but briefly: | |
3727 | </p> |
|
3735 | </p> | |
3728 | <pre> |
|
3736 | <pre> | |
3729 | +---------------------------------------------------------------+ |
|
3737 | +---------------------------------------------------------------+ | |
3730 | | | | | | |
|
3738 | | | | | | | |
3731 | | start offset | end offset | new length | content | |
|
3739 | | start offset | end offset | new length | content | | |
3732 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
3740 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
3733 | | | | | | |
|
3741 | | | | | | | |
3734 | +---------------------------------------------------------------+ |
|
3742 | +---------------------------------------------------------------+ | |
3735 | </pre> |
|
3743 | </pre> | |
3736 | <p> |
|
3744 | <p> | |
3737 | Please note that the length field in the delta data does *not* include itself. |
|
3745 | Please note that the length field in the delta data does *not* include itself. | |
3738 | </p> |
|
3746 | </p> | |
3739 | <p> |
|
3747 | <p> | |
3740 | In version 1, the delta is always applied against the previous node from |
|
3748 | In version 1, the delta is always applied against the previous node from | |
3741 | the changegroup or the first parent if this is the first entry in the |
|
3749 | the changegroup or the first parent if this is the first entry in the | |
3742 | changegroup. |
|
3750 | changegroup. | |
3743 | </p> |
|
3751 | </p> | |
3744 | <p> |
|
3752 | <p> | |
3745 | In version 2 and up, the delta base node is encoded in the entry in the |
|
3753 | In version 2 and up, the delta base node is encoded in the entry in the | |
3746 | changegroup. This allows the delta to be expressed against any parent, |
|
3754 | changegroup. This allows the delta to be expressed against any parent, | |
3747 | which can result in smaller deltas and more efficient encoding of data. |
|
3755 | which can result in smaller deltas and more efficient encoding of data. | |
3748 | </p> |
|
3756 | </p> | |
3749 | <p> |
|
3757 | <p> | |
3750 | The *flags* field holds bitwise flags affecting the processing of revision |
|
3758 | The *flags* field holds bitwise flags affecting the processing of revision | |
3751 | data. The following flags are defined: |
|
3759 | data. The following flags are defined: | |
3752 | </p> |
|
3760 | </p> | |
3753 | <dl> |
|
3761 | <dl> | |
3754 | <dt>32768 |
|
3762 | <dt>32768 | |
3755 | <dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions. |
|
3763 | <dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions. | |
3756 | <dt>16384 |
|
3764 | <dt>16384 | |
3757 | <dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents). |
|
3765 | <dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents). | |
3758 | <dt>8192 |
|
3766 | <dt>8192 | |
3759 | <dd>Externally stored. The revision fulltext contains "key:value" "\n" delimited metadata defining an object stored elsewhere. Used by the LFS extension. |
|
3767 | <dd>Externally stored. The revision fulltext contains "key:value" "\n" delimited metadata defining an object stored elsewhere. Used by the LFS extension. | |
3760 | </dl> |
|
3768 | </dl> | |
3761 | <p> |
|
3769 | <p> | |
3762 | For historical reasons, the integer values are identical to revlog version 1 |
|
3770 | For historical reasons, the integer values are identical to revlog version 1 | |
3763 | per-revision storage flags and correspond to bits being set in this 2-byte |
|
3771 | per-revision storage flags and correspond to bits being set in this 2-byte | |
3764 | field. Bits were allocated starting from the most-significant bit, hence the |
|
3772 | field. Bits were allocated starting from the most-significant bit, hence the | |
3765 | reverse ordering and allocation of these flags. |
|
3773 | reverse ordering and allocation of these flags. | |
3766 | </p> |
|
3774 | </p> | |
3767 | <h2>Changeset Segment</h2> |
|
3775 | <h2>Changeset Segment</h2> | |
3768 | <p> |
|
3776 | <p> | |
3769 | The *changeset segment* consists of a single *delta group* holding |
|
3777 | The *changeset segment* consists of a single *delta group* holding | |
3770 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
3778 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
3771 | the boundary to the *manifest segment*. |
|
3779 | the boundary to the *manifest segment*. | |
3772 | </p> |
|
3780 | </p> | |
3773 | <h2>Manifest Segment</h2> |
|
3781 | <h2>Manifest Segment</h2> | |
3774 | <p> |
|
3782 | <p> | |
3775 | The *manifest segment* consists of a single *delta group* holding manifest |
|
3783 | The *manifest segment* consists of a single *delta group* holding manifest | |
3776 | data. If treemanifests are in use, it contains only the manifest for the |
|
3784 | data. If treemanifests are in use, it contains only the manifest for the | |
3777 | root directory of the repository. Otherwise, it contains the entire |
|
3785 | root directory of the repository. Otherwise, it contains the entire | |
3778 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
3786 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
3779 | the boundary to the next segment (either the *treemanifests segment* or the |
|
3787 | the boundary to the next segment (either the *treemanifests segment* or the | |
3780 | *filelogs segment*, depending on version and the request options). |
|
3788 | *filelogs segment*, depending on version and the request options). | |
3781 | </p> |
|
3789 | </p> | |
3782 | <h3>Treemanifests Segment</h3> |
|
3790 | <h3>Treemanifests Segment</h3> | |
3783 | <p> |
|
3791 | <p> | |
3784 | The *treemanifests segment* only exists in changegroup version "3", and |
|
3792 | The *treemanifests segment* only exists in changegroup version "3", and | |
3785 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
3793 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
3786 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
3794 | (it is not possible to use changegroup version 3 outside of bundle2). | |
3787 | Aside from the filenames in the *treemanifests segment* containing a |
|
3795 | Aside from the filenames in the *treemanifests segment* containing a | |
3788 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
3796 | trailing "/" character, it behaves identically to the *filelogs segment* | |
3789 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
3797 | (see below). The final sub-segment is followed by an *empty chunk* (logically, | |
3790 | a sub-segment with filename size 0). This denotes the boundary to the |
|
3798 | a sub-segment with filename size 0). This denotes the boundary to the | |
3791 | *filelogs segment*. |
|
3799 | *filelogs segment*. | |
3792 | </p> |
|
3800 | </p> | |
3793 | <h2>Filelogs Segment</h2> |
|
3801 | <h2>Filelogs Segment</h2> | |
3794 | <p> |
|
3802 | <p> | |
3795 | The *filelogs segment* consists of multiple sub-segments, each |
|
3803 | The *filelogs segment* consists of multiple sub-segments, each | |
3796 | corresponding to an individual file whose data is being described: |
|
3804 | corresponding to an individual file whose data is being described: | |
3797 | </p> |
|
3805 | </p> | |
3798 | <pre> |
|
3806 | <pre> | |
3799 | +--------------------------------------------------+ |
|
3807 | +--------------------------------------------------+ | |
3800 | | | | | | | |
|
3808 | | | | | | | | |
3801 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
3809 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
3802 | | | | | | (4 bytes) | |
|
3810 | | | | | | (4 bytes) | | |
3803 | | | | | | | |
|
3811 | | | | | | | | |
3804 | +--------------------------------------------------+ |
|
3812 | +--------------------------------------------------+ | |
3805 | </pre> |
|
3813 | </pre> | |
3806 | <p> |
|
3814 | <p> | |
3807 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
3815 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
3808 | a sub-segment with filename size 0). This denotes the end of the segment |
|
3816 | a sub-segment with filename size 0). This denotes the end of the segment | |
3809 | and of the overall changegroup. |
|
3817 | and of the overall changegroup. | |
3810 | </p> |
|
3818 | </p> | |
3811 | <p> |
|
3819 | <p> | |
3812 | Each filelog sub-segment consists of the following: |
|
3820 | Each filelog sub-segment consists of the following: | |
3813 | </p> |
|
3821 | </p> | |
3814 | <pre> |
|
3822 | <pre> | |
3815 | +------------------------------------------------------+ |
|
3823 | +------------------------------------------------------+ | |
3816 | | | | | |
|
3824 | | | | | | |
3817 | | filename length | filename | delta group | |
|
3825 | | filename length | filename | delta group | | |
3818 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
3826 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
3819 | | | | | |
|
3827 | | | | | | |
3820 | +------------------------------------------------------+ |
|
3828 | +------------------------------------------------------+ | |
3821 | </pre> |
|
3829 | </pre> | |
3822 | <p> |
|
3830 | <p> | |
3823 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
3831 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
3824 | followed by N chunks constituting the *delta group* for this file. The |
|
3832 | followed by N chunks constituting the *delta group* for this file. The | |
3825 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
3833 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
3826 | next filelog sub-segment. |
|
3834 | next filelog sub-segment. | |
3827 | </p> |
|
3835 | </p> | |
3828 |
|
3836 | |||
3829 | </div> |
|
3837 | </div> | |
3830 | </div> |
|
3838 | </div> | |
3831 | </div> |
|
3839 | </div> | |
3832 |
|
3840 | |||
3833 |
|
3841 | |||
3834 |
|
3842 | |||
3835 | </body> |
|
3843 | </body> | |
3836 | </html> |
|
3844 | </html> | |
3837 |
|
3845 | |||
3838 |
|
3846 | |||
3839 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" |
|
3847 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" | |
3840 | 404 Not Found |
|
3848 | 404 Not Found | |
3841 |
|
3849 | |||
3842 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3850 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3843 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3851 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3844 | <head> |
|
3852 | <head> | |
3845 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3853 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3846 | <meta name="robots" content="index, nofollow" /> |
|
3854 | <meta name="robots" content="index, nofollow" /> | |
3847 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3855 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3848 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3856 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3849 |
|
3857 | |||
3850 | <title>test: error</title> |
|
3858 | <title>test: error</title> | |
3851 | </head> |
|
3859 | </head> | |
3852 | <body> |
|
3860 | <body> | |
3853 |
|
3861 | |||
3854 | <div class="container"> |
|
3862 | <div class="container"> | |
3855 | <div class="menu"> |
|
3863 | <div class="menu"> | |
3856 | <div class="logo"> |
|
3864 | <div class="logo"> | |
3857 | <a href="https://mercurial-scm.org/"> |
|
3865 | <a href="https://mercurial-scm.org/"> | |
3858 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
3866 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
3859 | </div> |
|
3867 | </div> | |
3860 | <ul> |
|
3868 | <ul> | |
3861 | <li><a href="/shortlog">log</a></li> |
|
3869 | <li><a href="/shortlog">log</a></li> | |
3862 | <li><a href="/graph">graph</a></li> |
|
3870 | <li><a href="/graph">graph</a></li> | |
3863 | <li><a href="/tags">tags</a></li> |
|
3871 | <li><a href="/tags">tags</a></li> | |
3864 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3872 | <li><a href="/bookmarks">bookmarks</a></li> | |
3865 | <li><a href="/branches">branches</a></li> |
|
3873 | <li><a href="/branches">branches</a></li> | |
3866 | </ul> |
|
3874 | </ul> | |
3867 | <ul> |
|
3875 | <ul> | |
3868 | <li><a href="/help">help</a></li> |
|
3876 | <li><a href="/help">help</a></li> | |
3869 | </ul> |
|
3877 | </ul> | |
3870 | </div> |
|
3878 | </div> | |
3871 |
|
3879 | |||
3872 | <div class="main"> |
|
3880 | <div class="main"> | |
3873 |
|
3881 | |||
3874 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3882 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3875 | <h3>error</h3> |
|
3883 | <h3>error</h3> | |
3876 |
|
3884 | |||
3877 |
|
3885 | |||
3878 | <form class="search" action="/log"> |
|
3886 | <form class="search" action="/log"> | |
3879 |
|
3887 | |||
3880 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3888 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3881 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3889 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3882 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3890 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3883 | </form> |
|
3891 | </form> | |
3884 |
|
3892 | |||
3885 | <div class="description"> |
|
3893 | <div class="description"> | |
3886 | <p> |
|
3894 | <p> | |
3887 | An error occurred while processing your request: |
|
3895 | An error occurred while processing your request: | |
3888 | </p> |
|
3896 | </p> | |
3889 | <p> |
|
3897 | <p> | |
3890 | Not Found |
|
3898 | Not Found | |
3891 | </p> |
|
3899 | </p> | |
3892 | </div> |
|
3900 | </div> | |
3893 | </div> |
|
3901 | </div> | |
3894 | </div> |
|
3902 | </div> | |
3895 |
|
3903 | |||
3896 |
|
3904 | |||
3897 |
|
3905 | |||
3898 | </body> |
|
3906 | </body> | |
3899 | </html> |
|
3907 | </html> | |
3900 |
|
3908 | |||
3901 | [1] |
|
3909 | [1] | |
3902 |
|
3910 | |||
3903 | $ killdaemons.py |
|
3911 | $ killdaemons.py | |
3904 |
|
3912 | |||
3905 | #endif |
|
3913 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now