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