##// END OF EJS Templates
help: describe more detail about capabilities while deciding merge tool...
FUJIWARA Katsunori -
r39157:7c604463 default
parent child Browse files
Show More
@@ -1,85 +1,97 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 by default
39 Internal tools are always available and do not require a GUI but will by default
40 not handle symlinks or binary files.
40 not handle symlinks or binary files.
41
41
42 Choosing a merge tool
42 Choosing a merge tool
43 =====================
43 =====================
44
44
45 Mercurial uses these rules when deciding which merge tool to use:
45 Mercurial uses these rules when deciding which merge tool to use:
46
46
47 1. If a tool has been specified with the --tool option to merge or resolve, it
47 1. If a tool has been specified with the --tool option to merge or resolve, it
48 is used. If it is the name of a tool in the merge-tools configuration, its
48 is used. If it is the name of a tool in the merge-tools configuration, its
49 configuration is used. Otherwise the specified tool must be executable by
49 configuration is used. Otherwise the specified tool must be executable by
50 the shell.
50 the shell.
51
51
52 2. If the ``HGMERGE`` environment variable is present, its value is used and
52 2. If the ``HGMERGE`` environment variable is present, its value is used and
53 must be executable by the shell.
53 must be executable by the shell.
54
54
55 3. If the filename of the file to be merged matches any of the patterns in the
55 3. If the filename of the file to be merged matches any of the patterns in the
56 merge-patterns configuration section, the first usable merge tool
56 merge-patterns configuration section, the first usable merge tool
57 corresponding to a matching pattern is used. Here, binary capabilities of the
57 corresponding to a matching pattern is used.
58 merge tool are not considered.
59
58
60 4. If ui.merge is set it will be considered next. If the value is not the name
59 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
60 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.
61 the shell. Otherwise the named tool is used if it is usable.
63
62
64 5. If any usable merge tools are present in the merge-tools configuration
63 5. If any usable merge tools are present in the merge-tools configuration
65 section, the one with the highest priority is used.
64 section, the one with the highest priority is used.
66
65
67 6. If a program named ``hgmerge`` can be found on the system, it is used - but
66 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.
67 it will by default not be used for symlinks and binary files.
69
68
70 7. If the file to be merged is not binary and is not a symlink, then
69 7. If the file to be merged is not binary and is not a symlink, then
71 internal ``:merge`` is used.
70 internal ``:merge`` is used.
72
71
73 8. Otherwise, ``:prompt`` is used.
72 8. Otherwise, ``:prompt`` is used.
74
73
74 For historical reason, Mercurial assumes capabilities of internal
75 merge tools as below while examining rules above, regardless of actual
76 capabilities of them.
77
78 ==== =============== ====== =======
79 step specified via binary symlink
80 ==== =============== ====== =======
81 1. --tool o o
82 2. HGMERGE o o
83 3. merge-patterns o x
84 4. ui.merge x x
85 ==== =============== ====== =======
86
75 .. note::
87 .. note::
76
88
77 After selecting a merge program, Mercurial will by default attempt
89 After selecting a merge program, Mercurial will by default attempt
78 to merge the files using a simple merge algorithm first. Only if it doesn't
90 to merge the files using a simple merge algorithm first. Only if it doesn't
79 succeed because of conflicting changes will Mercurial actually execute the
91 succeed because of conflicting changes will Mercurial actually execute the
80 merge program. Whether to use the simple merge algorithm first can be
92 merge program. Whether to use the simple merge algorithm first can be
81 controlled by the premerge setting of the merge tool. Premerge is enabled by
93 controlled by the premerge setting of the merge tool. Premerge is enabled by
82 default unless the file is binary or a symlink.
94 default unless the file is binary or a symlink.
83
95
84 See the merge-tools and ui sections of hgrc(5) for details on the
96 See the merge-tools and ui sections of hgrc(5) for details on the
85 configuration of merge tools.
97 configuration of merge tools.
@@ -1,3601 +1,3611 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 > /dev/null
1483 $ hg help -e commit > /dev/null
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 ":fail"
1832 ":fail"
1833 Rather than attempting to merge files that were modified on both
1833 Rather than attempting to merge files that were modified on both
1834 branches, it marks them as unresolved. The resolve command must be used
1834 branches, it marks them as unresolved. The resolve command must be used
1835 to resolve these conflicts.
1835 to resolve these conflicts.
1836
1836
1837 ":forcedump"
1837 ":forcedump"
1838 Creates three versions of the files as same as :dump, but omits
1838 Creates three versions of the files as same as :dump, but omits
1839 premerge.
1839 premerge.
1840
1840
1841 ":local"
1841 ":local"
1842 Uses the local 'p1()' version of files as the merged version.
1842 Uses the local 'p1()' version of files as the merged version.
1843
1843
1844 ":merge"
1844 ":merge"
1845 Uses the internal non-interactive simple merge algorithm for merging
1845 Uses the internal non-interactive simple merge algorithm for merging
1846 files. It will fail if there are any conflicts and leave markers in the
1846 files. It will fail if there are any conflicts and leave markers in the
1847 partially merged file. Markers will have two sections, one for each side
1847 partially merged file. Markers will have two sections, one for each side
1848 of merge.
1848 of merge.
1849
1849
1850 ":merge-local"
1850 ":merge-local"
1851 Like :merge, but resolve all conflicts non-interactively in favor of the
1851 Like :merge, but resolve all conflicts non-interactively in favor of the
1852 local 'p1()' changes.
1852 local 'p1()' changes.
1853
1853
1854 ":merge-other"
1854 ":merge-other"
1855 Like :merge, but resolve all conflicts non-interactively in favor of the
1855 Like :merge, but resolve all conflicts non-interactively in favor of the
1856 other 'p2()' changes.
1856 other 'p2()' changes.
1857
1857
1858 ":merge3"
1858 ":merge3"
1859 Uses the internal non-interactive simple merge algorithm for merging
1859 Uses the internal non-interactive simple merge algorithm for merging
1860 files. It will fail if there are any conflicts and leave markers in the
1860 files. It will fail if there are any conflicts and leave markers in the
1861 partially merged file. Marker will have three sections, one from each
1861 partially merged file. Marker will have three sections, one from each
1862 side of the merge and one for the base content.
1862 side of the merge and one for the base content.
1863
1863
1864 ":other"
1864 ":other"
1865 Uses the other 'p2()' version of files as the merged version.
1865 Uses the other 'p2()' version of files as the merged version.
1866
1866
1867 ":prompt"
1867 ":prompt"
1868 Asks the user which of the local 'p1()' or the other 'p2()' version to
1868 Asks the user which of the local 'p1()' or the other 'p2()' version to
1869 keep as the merged version.
1869 keep as the merged version.
1870
1870
1871 ":tagmerge"
1871 ":tagmerge"
1872 Uses the internal tag merge algorithm (experimental).
1872 Uses the internal tag merge algorithm (experimental).
1873
1873
1874 ":union"
1874 ":union"
1875 Uses the internal non-interactive simple merge algorithm for merging
1875 Uses the internal non-interactive simple merge algorithm for merging
1876 files. It will use both left and right sides for conflict regions. No
1876 files. It will use both left and right sides for conflict regions. No
1877 markers are inserted.
1877 markers are inserted.
1878
1878
1879 Internal tools are always available and do not require a GUI but will by
1879 Internal tools are always available and do not require a GUI but will by
1880 default not handle symlinks or binary files.
1880 default not handle symlinks or binary files.
1881
1881
1882 Choosing a merge tool
1882 Choosing a merge tool
1883 =====================
1883 =====================
1884
1884
1885 Mercurial uses these rules when deciding which merge tool to use:
1885 Mercurial uses these rules when deciding which merge tool to use:
1886
1886
1887 1. If a tool has been specified with the --tool option to merge or
1887 1. If a tool has been specified with the --tool option to merge or
1888 resolve, it is used. If it is the name of a tool in the merge-tools
1888 resolve, it is used. If it is the name of a tool in the merge-tools
1889 configuration, its configuration is used. Otherwise the specified tool
1889 configuration, its configuration is used. Otherwise the specified tool
1890 must be executable by the shell.
1890 must be executable by the shell.
1891 2. If the "HGMERGE" environment variable is present, its value is used and
1891 2. If the "HGMERGE" environment variable is present, its value is used and
1892 must be executable by the shell.
1892 must be executable by the shell.
1893 3. If the filename of the file to be merged matches any of the patterns in
1893 3. If the filename of the file to be merged matches any of the patterns in
1894 the merge-patterns configuration section, the first usable merge tool
1894 the merge-patterns configuration section, the first usable merge tool
1895 corresponding to a matching pattern is used. Here, binary capabilities
1895 corresponding to a matching pattern is used.
1896 of the merge tool are not considered.
1897 4. If ui.merge is set it will be considered next. If the value is not the
1896 4. If ui.merge is set it will be considered next. If the value is not the
1898 name of a configured tool, the specified value is used and must be
1897 name of a configured tool, the specified value is used and must be
1899 executable by the shell. Otherwise the named tool is used if it is
1898 executable by the shell. Otherwise the named tool is used if it is
1900 usable.
1899 usable.
1901 5. If any usable merge tools are present in the merge-tools configuration
1900 5. If any usable merge tools are present in the merge-tools configuration
1902 section, the one with the highest priority is used.
1901 section, the one with the highest priority is used.
1903 6. If a program named "hgmerge" can be found on the system, it is used -
1902 6. If a program named "hgmerge" can be found on the system, it is used -
1904 but it will by default not be used for symlinks and binary files.
1903 but it will by default not be used for symlinks and binary files.
1905 7. If the file to be merged is not binary and is not a symlink, then
1904 7. If the file to be merged is not binary and is not a symlink, then
1906 internal ":merge" is used.
1905 internal ":merge" is used.
1907 8. Otherwise, ":prompt" is used.
1906 8. Otherwise, ":prompt" is used.
1908
1907
1908 For historical reason, Mercurial assumes capabilities of internal merge
1909 tools as below while examining rules above, regardless of actual
1910 capabilities of them.
1911
1912 step specified via binary symlink
1913 ----------------------------------
1914 1. --tool o o
1915 2. HGMERGE o o
1916 3. merge-patterns o x
1917 4. ui.merge x x
1918
1909 Note:
1919 Note:
1910 After selecting a merge program, Mercurial will by default attempt to
1920 After selecting a merge program, Mercurial will by default attempt to
1911 merge the files using a simple merge algorithm first. Only if it
1921 merge the files using a simple merge algorithm first. Only if it
1912 doesn't succeed because of conflicting changes will Mercurial actually
1922 doesn't succeed because of conflicting changes will Mercurial actually
1913 execute the merge program. Whether to use the simple merge algorithm
1923 execute the merge program. Whether to use the simple merge algorithm
1914 first can be controlled by the premerge setting of the merge tool.
1924 first can be controlled by the premerge setting of the merge tool.
1915 Premerge is enabled by default unless the file is binary or a symlink.
1925 Premerge is enabled by default unless the file is binary or a symlink.
1916
1926
1917 See the merge-tools and ui sections of hgrc(5) for details on the
1927 See the merge-tools and ui sections of hgrc(5) for details on the
1918 configuration of merge tools.
1928 configuration of merge tools.
1919
1929
1920 Compression engines listed in `hg help bundlespec`
1930 Compression engines listed in `hg help bundlespec`
1921
1931
1922 $ hg help bundlespec | grep gzip
1932 $ hg help bundlespec | grep gzip
1923 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1933 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1924 An algorithm that produces smaller bundles than "gzip".
1934 An algorithm that produces smaller bundles than "gzip".
1925 This engine will likely produce smaller bundles than "gzip" but will be
1935 This engine will likely produce smaller bundles than "gzip" but will be
1926 "gzip"
1936 "gzip"
1927 better compression than "gzip". It also frequently yields better (?)
1937 better compression than "gzip". It also frequently yields better (?)
1928
1938
1929 Test usage of section marks in help documents
1939 Test usage of section marks in help documents
1930
1940
1931 $ cd "$TESTDIR"/../doc
1941 $ cd "$TESTDIR"/../doc
1932 $ $PYTHON check-seclevel.py
1942 $ $PYTHON check-seclevel.py
1933 $ cd $TESTTMP
1943 $ cd $TESTTMP
1934
1944
1935 #if serve
1945 #if serve
1936
1946
1937 Test the help pages in hgweb.
1947 Test the help pages in hgweb.
1938
1948
1939 Dish up an empty repo; serve it cold.
1949 Dish up an empty repo; serve it cold.
1940
1950
1941 $ hg init "$TESTTMP/test"
1951 $ hg init "$TESTTMP/test"
1942 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1952 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1943 $ cat hg.pid >> $DAEMON_PIDS
1953 $ cat hg.pid >> $DAEMON_PIDS
1944
1954
1945 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1955 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1946 200 Script output follows
1956 200 Script output follows
1947
1957
1948 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1958 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1949 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1959 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1950 <head>
1960 <head>
1951 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1961 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1952 <meta name="robots" content="index, nofollow" />
1962 <meta name="robots" content="index, nofollow" />
1953 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1963 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1954 <script type="text/javascript" src="/static/mercurial.js"></script>
1964 <script type="text/javascript" src="/static/mercurial.js"></script>
1955
1965
1956 <title>Help: Index</title>
1966 <title>Help: Index</title>
1957 </head>
1967 </head>
1958 <body>
1968 <body>
1959
1969
1960 <div class="container">
1970 <div class="container">
1961 <div class="menu">
1971 <div class="menu">
1962 <div class="logo">
1972 <div class="logo">
1963 <a href="https://mercurial-scm.org/">
1973 <a href="https://mercurial-scm.org/">
1964 <img src="/static/hglogo.png" alt="mercurial" /></a>
1974 <img src="/static/hglogo.png" alt="mercurial" /></a>
1965 </div>
1975 </div>
1966 <ul>
1976 <ul>
1967 <li><a href="/shortlog">log</a></li>
1977 <li><a href="/shortlog">log</a></li>
1968 <li><a href="/graph">graph</a></li>
1978 <li><a href="/graph">graph</a></li>
1969 <li><a href="/tags">tags</a></li>
1979 <li><a href="/tags">tags</a></li>
1970 <li><a href="/bookmarks">bookmarks</a></li>
1980 <li><a href="/bookmarks">bookmarks</a></li>
1971 <li><a href="/branches">branches</a></li>
1981 <li><a href="/branches">branches</a></li>
1972 </ul>
1982 </ul>
1973 <ul>
1983 <ul>
1974 <li class="active">help</li>
1984 <li class="active">help</li>
1975 </ul>
1985 </ul>
1976 </div>
1986 </div>
1977
1987
1978 <div class="main">
1988 <div class="main">
1979 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1989 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1980
1990
1981 <form class="search" action="/log">
1991 <form class="search" action="/log">
1982
1992
1983 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
1993 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
1984 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1994 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1985 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1995 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1986 </form>
1996 </form>
1987 <table class="bigtable">
1997 <table class="bigtable">
1988 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1998 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1989
1999
1990 <tr><td>
2000 <tr><td>
1991 <a href="/help/bundlespec">
2001 <a href="/help/bundlespec">
1992 bundlespec
2002 bundlespec
1993 </a>
2003 </a>
1994 </td><td>
2004 </td><td>
1995 Bundle File Formats
2005 Bundle File Formats
1996 </td></tr>
2006 </td></tr>
1997 <tr><td>
2007 <tr><td>
1998 <a href="/help/color">
2008 <a href="/help/color">
1999 color
2009 color
2000 </a>
2010 </a>
2001 </td><td>
2011 </td><td>
2002 Colorizing Outputs
2012 Colorizing Outputs
2003 </td></tr>
2013 </td></tr>
2004 <tr><td>
2014 <tr><td>
2005 <a href="/help/config">
2015 <a href="/help/config">
2006 config
2016 config
2007 </a>
2017 </a>
2008 </td><td>
2018 </td><td>
2009 Configuration Files
2019 Configuration Files
2010 </td></tr>
2020 </td></tr>
2011 <tr><td>
2021 <tr><td>
2012 <a href="/help/dates">
2022 <a href="/help/dates">
2013 dates
2023 dates
2014 </a>
2024 </a>
2015 </td><td>
2025 </td><td>
2016 Date Formats
2026 Date Formats
2017 </td></tr>
2027 </td></tr>
2018 <tr><td>
2028 <tr><td>
2019 <a href="/help/deprecated">
2029 <a href="/help/deprecated">
2020 deprecated
2030 deprecated
2021 </a>
2031 </a>
2022 </td><td>
2032 </td><td>
2023 Deprecated Features
2033 Deprecated Features
2024 </td></tr>
2034 </td></tr>
2025 <tr><td>
2035 <tr><td>
2026 <a href="/help/diffs">
2036 <a href="/help/diffs">
2027 diffs
2037 diffs
2028 </a>
2038 </a>
2029 </td><td>
2039 </td><td>
2030 Diff Formats
2040 Diff Formats
2031 </td></tr>
2041 </td></tr>
2032 <tr><td>
2042 <tr><td>
2033 <a href="/help/environment">
2043 <a href="/help/environment">
2034 environment
2044 environment
2035 </a>
2045 </a>
2036 </td><td>
2046 </td><td>
2037 Environment Variables
2047 Environment Variables
2038 </td></tr>
2048 </td></tr>
2039 <tr><td>
2049 <tr><td>
2040 <a href="/help/extensions">
2050 <a href="/help/extensions">
2041 extensions
2051 extensions
2042 </a>
2052 </a>
2043 </td><td>
2053 </td><td>
2044 Using Additional Features
2054 Using Additional Features
2045 </td></tr>
2055 </td></tr>
2046 <tr><td>
2056 <tr><td>
2047 <a href="/help/filesets">
2057 <a href="/help/filesets">
2048 filesets
2058 filesets
2049 </a>
2059 </a>
2050 </td><td>
2060 </td><td>
2051 Specifying File Sets
2061 Specifying File Sets
2052 </td></tr>
2062 </td></tr>
2053 <tr><td>
2063 <tr><td>
2054 <a href="/help/flags">
2064 <a href="/help/flags">
2055 flags
2065 flags
2056 </a>
2066 </a>
2057 </td><td>
2067 </td><td>
2058 Command-line flags
2068 Command-line flags
2059 </td></tr>
2069 </td></tr>
2060 <tr><td>
2070 <tr><td>
2061 <a href="/help/glossary">
2071 <a href="/help/glossary">
2062 glossary
2072 glossary
2063 </a>
2073 </a>
2064 </td><td>
2074 </td><td>
2065 Glossary
2075 Glossary
2066 </td></tr>
2076 </td></tr>
2067 <tr><td>
2077 <tr><td>
2068 <a href="/help/hgignore">
2078 <a href="/help/hgignore">
2069 hgignore
2079 hgignore
2070 </a>
2080 </a>
2071 </td><td>
2081 </td><td>
2072 Syntax for Mercurial Ignore Files
2082 Syntax for Mercurial Ignore Files
2073 </td></tr>
2083 </td></tr>
2074 <tr><td>
2084 <tr><td>
2075 <a href="/help/hgweb">
2085 <a href="/help/hgweb">
2076 hgweb
2086 hgweb
2077 </a>
2087 </a>
2078 </td><td>
2088 </td><td>
2079 Configuring hgweb
2089 Configuring hgweb
2080 </td></tr>
2090 </td></tr>
2081 <tr><td>
2091 <tr><td>
2082 <a href="/help/internals">
2092 <a href="/help/internals">
2083 internals
2093 internals
2084 </a>
2094 </a>
2085 </td><td>
2095 </td><td>
2086 Technical implementation topics
2096 Technical implementation topics
2087 </td></tr>
2097 </td></tr>
2088 <tr><td>
2098 <tr><td>
2089 <a href="/help/merge-tools">
2099 <a href="/help/merge-tools">
2090 merge-tools
2100 merge-tools
2091 </a>
2101 </a>
2092 </td><td>
2102 </td><td>
2093 Merge Tools
2103 Merge Tools
2094 </td></tr>
2104 </td></tr>
2095 <tr><td>
2105 <tr><td>
2096 <a href="/help/pager">
2106 <a href="/help/pager">
2097 pager
2107 pager
2098 </a>
2108 </a>
2099 </td><td>
2109 </td><td>
2100 Pager Support
2110 Pager Support
2101 </td></tr>
2111 </td></tr>
2102 <tr><td>
2112 <tr><td>
2103 <a href="/help/patterns">
2113 <a href="/help/patterns">
2104 patterns
2114 patterns
2105 </a>
2115 </a>
2106 </td><td>
2116 </td><td>
2107 File Name Patterns
2117 File Name Patterns
2108 </td></tr>
2118 </td></tr>
2109 <tr><td>
2119 <tr><td>
2110 <a href="/help/phases">
2120 <a href="/help/phases">
2111 phases
2121 phases
2112 </a>
2122 </a>
2113 </td><td>
2123 </td><td>
2114 Working with Phases
2124 Working with Phases
2115 </td></tr>
2125 </td></tr>
2116 <tr><td>
2126 <tr><td>
2117 <a href="/help/revisions">
2127 <a href="/help/revisions">
2118 revisions
2128 revisions
2119 </a>
2129 </a>
2120 </td><td>
2130 </td><td>
2121 Specifying Revisions
2131 Specifying Revisions
2122 </td></tr>
2132 </td></tr>
2123 <tr><td>
2133 <tr><td>
2124 <a href="/help/scripting">
2134 <a href="/help/scripting">
2125 scripting
2135 scripting
2126 </a>
2136 </a>
2127 </td><td>
2137 </td><td>
2128 Using Mercurial from scripts and automation
2138 Using Mercurial from scripts and automation
2129 </td></tr>
2139 </td></tr>
2130 <tr><td>
2140 <tr><td>
2131 <a href="/help/subrepos">
2141 <a href="/help/subrepos">
2132 subrepos
2142 subrepos
2133 </a>
2143 </a>
2134 </td><td>
2144 </td><td>
2135 Subrepositories
2145 Subrepositories
2136 </td></tr>
2146 </td></tr>
2137 <tr><td>
2147 <tr><td>
2138 <a href="/help/templating">
2148 <a href="/help/templating">
2139 templating
2149 templating
2140 </a>
2150 </a>
2141 </td><td>
2151 </td><td>
2142 Template Usage
2152 Template Usage
2143 </td></tr>
2153 </td></tr>
2144 <tr><td>
2154 <tr><td>
2145 <a href="/help/urls">
2155 <a href="/help/urls">
2146 urls
2156 urls
2147 </a>
2157 </a>
2148 </td><td>
2158 </td><td>
2149 URL Paths
2159 URL Paths
2150 </td></tr>
2160 </td></tr>
2151 <tr><td>
2161 <tr><td>
2152 <a href="/help/topic-containing-verbose">
2162 <a href="/help/topic-containing-verbose">
2153 topic-containing-verbose
2163 topic-containing-verbose
2154 </a>
2164 </a>
2155 </td><td>
2165 </td><td>
2156 This is the topic to test omit indicating.
2166 This is the topic to test omit indicating.
2157 </td></tr>
2167 </td></tr>
2158
2168
2159
2169
2160 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2170 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2161
2171
2162 <tr><td>
2172 <tr><td>
2163 <a href="/help/add">
2173 <a href="/help/add">
2164 add
2174 add
2165 </a>
2175 </a>
2166 </td><td>
2176 </td><td>
2167 add the specified files on the next commit
2177 add the specified files on the next commit
2168 </td></tr>
2178 </td></tr>
2169 <tr><td>
2179 <tr><td>
2170 <a href="/help/annotate">
2180 <a href="/help/annotate">
2171 annotate
2181 annotate
2172 </a>
2182 </a>
2173 </td><td>
2183 </td><td>
2174 show changeset information by line for each file
2184 show changeset information by line for each file
2175 </td></tr>
2185 </td></tr>
2176 <tr><td>
2186 <tr><td>
2177 <a href="/help/clone">
2187 <a href="/help/clone">
2178 clone
2188 clone
2179 </a>
2189 </a>
2180 </td><td>
2190 </td><td>
2181 make a copy of an existing repository
2191 make a copy of an existing repository
2182 </td></tr>
2192 </td></tr>
2183 <tr><td>
2193 <tr><td>
2184 <a href="/help/commit">
2194 <a href="/help/commit">
2185 commit
2195 commit
2186 </a>
2196 </a>
2187 </td><td>
2197 </td><td>
2188 commit the specified files or all outstanding changes
2198 commit the specified files or all outstanding changes
2189 </td></tr>
2199 </td></tr>
2190 <tr><td>
2200 <tr><td>
2191 <a href="/help/diff">
2201 <a href="/help/diff">
2192 diff
2202 diff
2193 </a>
2203 </a>
2194 </td><td>
2204 </td><td>
2195 diff repository (or selected files)
2205 diff repository (or selected files)
2196 </td></tr>
2206 </td></tr>
2197 <tr><td>
2207 <tr><td>
2198 <a href="/help/export">
2208 <a href="/help/export">
2199 export
2209 export
2200 </a>
2210 </a>
2201 </td><td>
2211 </td><td>
2202 dump the header and diffs for one or more changesets
2212 dump the header and diffs for one or more changesets
2203 </td></tr>
2213 </td></tr>
2204 <tr><td>
2214 <tr><td>
2205 <a href="/help/forget">
2215 <a href="/help/forget">
2206 forget
2216 forget
2207 </a>
2217 </a>
2208 </td><td>
2218 </td><td>
2209 forget the specified files on the next commit
2219 forget the specified files on the next commit
2210 </td></tr>
2220 </td></tr>
2211 <tr><td>
2221 <tr><td>
2212 <a href="/help/init">
2222 <a href="/help/init">
2213 init
2223 init
2214 </a>
2224 </a>
2215 </td><td>
2225 </td><td>
2216 create a new repository in the given directory
2226 create a new repository in the given directory
2217 </td></tr>
2227 </td></tr>
2218 <tr><td>
2228 <tr><td>
2219 <a href="/help/log">
2229 <a href="/help/log">
2220 log
2230 log
2221 </a>
2231 </a>
2222 </td><td>
2232 </td><td>
2223 show revision history of entire repository or files
2233 show revision history of entire repository or files
2224 </td></tr>
2234 </td></tr>
2225 <tr><td>
2235 <tr><td>
2226 <a href="/help/merge">
2236 <a href="/help/merge">
2227 merge
2237 merge
2228 </a>
2238 </a>
2229 </td><td>
2239 </td><td>
2230 merge another revision into working directory
2240 merge another revision into working directory
2231 </td></tr>
2241 </td></tr>
2232 <tr><td>
2242 <tr><td>
2233 <a href="/help/pull">
2243 <a href="/help/pull">
2234 pull
2244 pull
2235 </a>
2245 </a>
2236 </td><td>
2246 </td><td>
2237 pull changes from the specified source
2247 pull changes from the specified source
2238 </td></tr>
2248 </td></tr>
2239 <tr><td>
2249 <tr><td>
2240 <a href="/help/push">
2250 <a href="/help/push">
2241 push
2251 push
2242 </a>
2252 </a>
2243 </td><td>
2253 </td><td>
2244 push changes to the specified destination
2254 push changes to the specified destination
2245 </td></tr>
2255 </td></tr>
2246 <tr><td>
2256 <tr><td>
2247 <a href="/help/remove">
2257 <a href="/help/remove">
2248 remove
2258 remove
2249 </a>
2259 </a>
2250 </td><td>
2260 </td><td>
2251 remove the specified files on the next commit
2261 remove the specified files on the next commit
2252 </td></tr>
2262 </td></tr>
2253 <tr><td>
2263 <tr><td>
2254 <a href="/help/serve">
2264 <a href="/help/serve">
2255 serve
2265 serve
2256 </a>
2266 </a>
2257 </td><td>
2267 </td><td>
2258 start stand-alone webserver
2268 start stand-alone webserver
2259 </td></tr>
2269 </td></tr>
2260 <tr><td>
2270 <tr><td>
2261 <a href="/help/status">
2271 <a href="/help/status">
2262 status
2272 status
2263 </a>
2273 </a>
2264 </td><td>
2274 </td><td>
2265 show changed files in the working directory
2275 show changed files in the working directory
2266 </td></tr>
2276 </td></tr>
2267 <tr><td>
2277 <tr><td>
2268 <a href="/help/summary">
2278 <a href="/help/summary">
2269 summary
2279 summary
2270 </a>
2280 </a>
2271 </td><td>
2281 </td><td>
2272 summarize working directory state
2282 summarize working directory state
2273 </td></tr>
2283 </td></tr>
2274 <tr><td>
2284 <tr><td>
2275 <a href="/help/update">
2285 <a href="/help/update">
2276 update
2286 update
2277 </a>
2287 </a>
2278 </td><td>
2288 </td><td>
2279 update working directory (or switch revisions)
2289 update working directory (or switch revisions)
2280 </td></tr>
2290 </td></tr>
2281
2291
2282
2292
2283
2293
2284 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2294 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2285
2295
2286 <tr><td>
2296 <tr><td>
2287 <a href="/help/addremove">
2297 <a href="/help/addremove">
2288 addremove
2298 addremove
2289 </a>
2299 </a>
2290 </td><td>
2300 </td><td>
2291 add all new files, delete all missing files
2301 add all new files, delete all missing files
2292 </td></tr>
2302 </td></tr>
2293 <tr><td>
2303 <tr><td>
2294 <a href="/help/archive">
2304 <a href="/help/archive">
2295 archive
2305 archive
2296 </a>
2306 </a>
2297 </td><td>
2307 </td><td>
2298 create an unversioned archive of a repository revision
2308 create an unversioned archive of a repository revision
2299 </td></tr>
2309 </td></tr>
2300 <tr><td>
2310 <tr><td>
2301 <a href="/help/backout">
2311 <a href="/help/backout">
2302 backout
2312 backout
2303 </a>
2313 </a>
2304 </td><td>
2314 </td><td>
2305 reverse effect of earlier changeset
2315 reverse effect of earlier changeset
2306 </td></tr>
2316 </td></tr>
2307 <tr><td>
2317 <tr><td>
2308 <a href="/help/bisect">
2318 <a href="/help/bisect">
2309 bisect
2319 bisect
2310 </a>
2320 </a>
2311 </td><td>
2321 </td><td>
2312 subdivision search of changesets
2322 subdivision search of changesets
2313 </td></tr>
2323 </td></tr>
2314 <tr><td>
2324 <tr><td>
2315 <a href="/help/bookmarks">
2325 <a href="/help/bookmarks">
2316 bookmarks
2326 bookmarks
2317 </a>
2327 </a>
2318 </td><td>
2328 </td><td>
2319 create a new bookmark or list existing bookmarks
2329 create a new bookmark or list existing bookmarks
2320 </td></tr>
2330 </td></tr>
2321 <tr><td>
2331 <tr><td>
2322 <a href="/help/branch">
2332 <a href="/help/branch">
2323 branch
2333 branch
2324 </a>
2334 </a>
2325 </td><td>
2335 </td><td>
2326 set or show the current branch name
2336 set or show the current branch name
2327 </td></tr>
2337 </td></tr>
2328 <tr><td>
2338 <tr><td>
2329 <a href="/help/branches">
2339 <a href="/help/branches">
2330 branches
2340 branches
2331 </a>
2341 </a>
2332 </td><td>
2342 </td><td>
2333 list repository named branches
2343 list repository named branches
2334 </td></tr>
2344 </td></tr>
2335 <tr><td>
2345 <tr><td>
2336 <a href="/help/bundle">
2346 <a href="/help/bundle">
2337 bundle
2347 bundle
2338 </a>
2348 </a>
2339 </td><td>
2349 </td><td>
2340 create a bundle file
2350 create a bundle file
2341 </td></tr>
2351 </td></tr>
2342 <tr><td>
2352 <tr><td>
2343 <a href="/help/cat">
2353 <a href="/help/cat">
2344 cat
2354 cat
2345 </a>
2355 </a>
2346 </td><td>
2356 </td><td>
2347 output the current or given revision of files
2357 output the current or given revision of files
2348 </td></tr>
2358 </td></tr>
2349 <tr><td>
2359 <tr><td>
2350 <a href="/help/config">
2360 <a href="/help/config">
2351 config
2361 config
2352 </a>
2362 </a>
2353 </td><td>
2363 </td><td>
2354 show combined config settings from all hgrc files
2364 show combined config settings from all hgrc files
2355 </td></tr>
2365 </td></tr>
2356 <tr><td>
2366 <tr><td>
2357 <a href="/help/copy">
2367 <a href="/help/copy">
2358 copy
2368 copy
2359 </a>
2369 </a>
2360 </td><td>
2370 </td><td>
2361 mark files as copied for the next commit
2371 mark files as copied for the next commit
2362 </td></tr>
2372 </td></tr>
2363 <tr><td>
2373 <tr><td>
2364 <a href="/help/files">
2374 <a href="/help/files">
2365 files
2375 files
2366 </a>
2376 </a>
2367 </td><td>
2377 </td><td>
2368 list tracked files
2378 list tracked files
2369 </td></tr>
2379 </td></tr>
2370 <tr><td>
2380 <tr><td>
2371 <a href="/help/graft">
2381 <a href="/help/graft">
2372 graft
2382 graft
2373 </a>
2383 </a>
2374 </td><td>
2384 </td><td>
2375 copy changes from other branches onto the current branch
2385 copy changes from other branches onto the current branch
2376 </td></tr>
2386 </td></tr>
2377 <tr><td>
2387 <tr><td>
2378 <a href="/help/grep">
2388 <a href="/help/grep">
2379 grep
2389 grep
2380 </a>
2390 </a>
2381 </td><td>
2391 </td><td>
2382 search revision history for a pattern in specified files
2392 search revision history for a pattern in specified files
2383 </td></tr>
2393 </td></tr>
2384 <tr><td>
2394 <tr><td>
2385 <a href="/help/heads">
2395 <a href="/help/heads">
2386 heads
2396 heads
2387 </a>
2397 </a>
2388 </td><td>
2398 </td><td>
2389 show branch heads
2399 show branch heads
2390 </td></tr>
2400 </td></tr>
2391 <tr><td>
2401 <tr><td>
2392 <a href="/help/help">
2402 <a href="/help/help">
2393 help
2403 help
2394 </a>
2404 </a>
2395 </td><td>
2405 </td><td>
2396 show help for a given topic or a help overview
2406 show help for a given topic or a help overview
2397 </td></tr>
2407 </td></tr>
2398 <tr><td>
2408 <tr><td>
2399 <a href="/help/hgalias">
2409 <a href="/help/hgalias">
2400 hgalias
2410 hgalias
2401 </a>
2411 </a>
2402 </td><td>
2412 </td><td>
2403 summarize working directory state
2413 summarize working directory state
2404 </td></tr>
2414 </td></tr>
2405 <tr><td>
2415 <tr><td>
2406 <a href="/help/identify">
2416 <a href="/help/identify">
2407 identify
2417 identify
2408 </a>
2418 </a>
2409 </td><td>
2419 </td><td>
2410 identify the working directory or specified revision
2420 identify the working directory or specified revision
2411 </td></tr>
2421 </td></tr>
2412 <tr><td>
2422 <tr><td>
2413 <a href="/help/import">
2423 <a href="/help/import">
2414 import
2424 import
2415 </a>
2425 </a>
2416 </td><td>
2426 </td><td>
2417 import an ordered set of patches
2427 import an ordered set of patches
2418 </td></tr>
2428 </td></tr>
2419 <tr><td>
2429 <tr><td>
2420 <a href="/help/incoming">
2430 <a href="/help/incoming">
2421 incoming
2431 incoming
2422 </a>
2432 </a>
2423 </td><td>
2433 </td><td>
2424 show new changesets found in source
2434 show new changesets found in source
2425 </td></tr>
2435 </td></tr>
2426 <tr><td>
2436 <tr><td>
2427 <a href="/help/manifest">
2437 <a href="/help/manifest">
2428 manifest
2438 manifest
2429 </a>
2439 </a>
2430 </td><td>
2440 </td><td>
2431 output the current or given revision of the project manifest
2441 output the current or given revision of the project manifest
2432 </td></tr>
2442 </td></tr>
2433 <tr><td>
2443 <tr><td>
2434 <a href="/help/nohelp">
2444 <a href="/help/nohelp">
2435 nohelp
2445 nohelp
2436 </a>
2446 </a>
2437 </td><td>
2447 </td><td>
2438 (no help text available)
2448 (no help text available)
2439 </td></tr>
2449 </td></tr>
2440 <tr><td>
2450 <tr><td>
2441 <a href="/help/outgoing">
2451 <a href="/help/outgoing">
2442 outgoing
2452 outgoing
2443 </a>
2453 </a>
2444 </td><td>
2454 </td><td>
2445 show changesets not found in the destination
2455 show changesets not found in the destination
2446 </td></tr>
2456 </td></tr>
2447 <tr><td>
2457 <tr><td>
2448 <a href="/help/paths">
2458 <a href="/help/paths">
2449 paths
2459 paths
2450 </a>
2460 </a>
2451 </td><td>
2461 </td><td>
2452 show aliases for remote repositories
2462 show aliases for remote repositories
2453 </td></tr>
2463 </td></tr>
2454 <tr><td>
2464 <tr><td>
2455 <a href="/help/phase">
2465 <a href="/help/phase">
2456 phase
2466 phase
2457 </a>
2467 </a>
2458 </td><td>
2468 </td><td>
2459 set or show the current phase name
2469 set or show the current phase name
2460 </td></tr>
2470 </td></tr>
2461 <tr><td>
2471 <tr><td>
2462 <a href="/help/recover">
2472 <a href="/help/recover">
2463 recover
2473 recover
2464 </a>
2474 </a>
2465 </td><td>
2475 </td><td>
2466 roll back an interrupted transaction
2476 roll back an interrupted transaction
2467 </td></tr>
2477 </td></tr>
2468 <tr><td>
2478 <tr><td>
2469 <a href="/help/rename">
2479 <a href="/help/rename">
2470 rename
2480 rename
2471 </a>
2481 </a>
2472 </td><td>
2482 </td><td>
2473 rename files; equivalent of copy + remove
2483 rename files; equivalent of copy + remove
2474 </td></tr>
2484 </td></tr>
2475 <tr><td>
2485 <tr><td>
2476 <a href="/help/resolve">
2486 <a href="/help/resolve">
2477 resolve
2487 resolve
2478 </a>
2488 </a>
2479 </td><td>
2489 </td><td>
2480 redo merges or set/view the merge status of files
2490 redo merges or set/view the merge status of files
2481 </td></tr>
2491 </td></tr>
2482 <tr><td>
2492 <tr><td>
2483 <a href="/help/revert">
2493 <a href="/help/revert">
2484 revert
2494 revert
2485 </a>
2495 </a>
2486 </td><td>
2496 </td><td>
2487 restore files to their checkout state
2497 restore files to their checkout state
2488 </td></tr>
2498 </td></tr>
2489 <tr><td>
2499 <tr><td>
2490 <a href="/help/root">
2500 <a href="/help/root">
2491 root
2501 root
2492 </a>
2502 </a>
2493 </td><td>
2503 </td><td>
2494 print the root (top) of the current working directory
2504 print the root (top) of the current working directory
2495 </td></tr>
2505 </td></tr>
2496 <tr><td>
2506 <tr><td>
2497 <a href="/help/shellalias">
2507 <a href="/help/shellalias">
2498 shellalias
2508 shellalias
2499 </a>
2509 </a>
2500 </td><td>
2510 </td><td>
2501 (no help text available)
2511 (no help text available)
2502 </td></tr>
2512 </td></tr>
2503 <tr><td>
2513 <tr><td>
2504 <a href="/help/tag">
2514 <a href="/help/tag">
2505 tag
2515 tag
2506 </a>
2516 </a>
2507 </td><td>
2517 </td><td>
2508 add one or more tags for the current or given revision
2518 add one or more tags for the current or given revision
2509 </td></tr>
2519 </td></tr>
2510 <tr><td>
2520 <tr><td>
2511 <a href="/help/tags">
2521 <a href="/help/tags">
2512 tags
2522 tags
2513 </a>
2523 </a>
2514 </td><td>
2524 </td><td>
2515 list repository tags
2525 list repository tags
2516 </td></tr>
2526 </td></tr>
2517 <tr><td>
2527 <tr><td>
2518 <a href="/help/unbundle">
2528 <a href="/help/unbundle">
2519 unbundle
2529 unbundle
2520 </a>
2530 </a>
2521 </td><td>
2531 </td><td>
2522 apply one or more bundle files
2532 apply one or more bundle files
2523 </td></tr>
2533 </td></tr>
2524 <tr><td>
2534 <tr><td>
2525 <a href="/help/verify">
2535 <a href="/help/verify">
2526 verify
2536 verify
2527 </a>
2537 </a>
2528 </td><td>
2538 </td><td>
2529 verify the integrity of the repository
2539 verify the integrity of the repository
2530 </td></tr>
2540 </td></tr>
2531 <tr><td>
2541 <tr><td>
2532 <a href="/help/version">
2542 <a href="/help/version">
2533 version
2543 version
2534 </a>
2544 </a>
2535 </td><td>
2545 </td><td>
2536 output version and copyright information
2546 output version and copyright information
2537 </td></tr>
2547 </td></tr>
2538
2548
2539
2549
2540 </table>
2550 </table>
2541 </div>
2551 </div>
2542 </div>
2552 </div>
2543
2553
2544
2554
2545
2555
2546 </body>
2556 </body>
2547 </html>
2557 </html>
2548
2558
2549
2559
2550 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2560 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2551 200 Script output follows
2561 200 Script output follows
2552
2562
2553 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2563 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2554 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2564 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2555 <head>
2565 <head>
2556 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2566 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2557 <meta name="robots" content="index, nofollow" />
2567 <meta name="robots" content="index, nofollow" />
2558 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2568 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2559 <script type="text/javascript" src="/static/mercurial.js"></script>
2569 <script type="text/javascript" src="/static/mercurial.js"></script>
2560
2570
2561 <title>Help: add</title>
2571 <title>Help: add</title>
2562 </head>
2572 </head>
2563 <body>
2573 <body>
2564
2574
2565 <div class="container">
2575 <div class="container">
2566 <div class="menu">
2576 <div class="menu">
2567 <div class="logo">
2577 <div class="logo">
2568 <a href="https://mercurial-scm.org/">
2578 <a href="https://mercurial-scm.org/">
2569 <img src="/static/hglogo.png" alt="mercurial" /></a>
2579 <img src="/static/hglogo.png" alt="mercurial" /></a>
2570 </div>
2580 </div>
2571 <ul>
2581 <ul>
2572 <li><a href="/shortlog">log</a></li>
2582 <li><a href="/shortlog">log</a></li>
2573 <li><a href="/graph">graph</a></li>
2583 <li><a href="/graph">graph</a></li>
2574 <li><a href="/tags">tags</a></li>
2584 <li><a href="/tags">tags</a></li>
2575 <li><a href="/bookmarks">bookmarks</a></li>
2585 <li><a href="/bookmarks">bookmarks</a></li>
2576 <li><a href="/branches">branches</a></li>
2586 <li><a href="/branches">branches</a></li>
2577 </ul>
2587 </ul>
2578 <ul>
2588 <ul>
2579 <li class="active"><a href="/help">help</a></li>
2589 <li class="active"><a href="/help">help</a></li>
2580 </ul>
2590 </ul>
2581 </div>
2591 </div>
2582
2592
2583 <div class="main">
2593 <div class="main">
2584 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2594 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2585 <h3>Help: add</h3>
2595 <h3>Help: add</h3>
2586
2596
2587 <form class="search" action="/log">
2597 <form class="search" action="/log">
2588
2598
2589 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2599 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2590 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2600 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2591 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2601 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2592 </form>
2602 </form>
2593 <div id="doc">
2603 <div id="doc">
2594 <p>
2604 <p>
2595 hg add [OPTION]... [FILE]...
2605 hg add [OPTION]... [FILE]...
2596 </p>
2606 </p>
2597 <p>
2607 <p>
2598 add the specified files on the next commit
2608 add the specified files on the next commit
2599 </p>
2609 </p>
2600 <p>
2610 <p>
2601 Schedule files to be version controlled and added to the
2611 Schedule files to be version controlled and added to the
2602 repository.
2612 repository.
2603 </p>
2613 </p>
2604 <p>
2614 <p>
2605 The files will be added to the repository at the next commit. To
2615 The files will be added to the repository at the next commit. To
2606 undo an add before that, see 'hg forget'.
2616 undo an add before that, see 'hg forget'.
2607 </p>
2617 </p>
2608 <p>
2618 <p>
2609 If no names are given, add all files to the repository (except
2619 If no names are given, add all files to the repository (except
2610 files matching &quot;.hgignore&quot;).
2620 files matching &quot;.hgignore&quot;).
2611 </p>
2621 </p>
2612 <p>
2622 <p>
2613 Examples:
2623 Examples:
2614 </p>
2624 </p>
2615 <ul>
2625 <ul>
2616 <li> New (unknown) files are added automatically by 'hg add':
2626 <li> New (unknown) files are added automatically by 'hg add':
2617 <pre>
2627 <pre>
2618 \$ ls (re)
2628 \$ ls (re)
2619 foo.c
2629 foo.c
2620 \$ hg status (re)
2630 \$ hg status (re)
2621 ? foo.c
2631 ? foo.c
2622 \$ hg add (re)
2632 \$ hg add (re)
2623 adding foo.c
2633 adding foo.c
2624 \$ hg status (re)
2634 \$ hg status (re)
2625 A foo.c
2635 A foo.c
2626 </pre>
2636 </pre>
2627 <li> Specific files to be added can be specified:
2637 <li> Specific files to be added can be specified:
2628 <pre>
2638 <pre>
2629 \$ ls (re)
2639 \$ ls (re)
2630 bar.c foo.c
2640 bar.c foo.c
2631 \$ hg status (re)
2641 \$ hg status (re)
2632 ? bar.c
2642 ? bar.c
2633 ? foo.c
2643 ? foo.c
2634 \$ hg add bar.c (re)
2644 \$ hg add bar.c (re)
2635 \$ hg status (re)
2645 \$ hg status (re)
2636 A bar.c
2646 A bar.c
2637 ? foo.c
2647 ? foo.c
2638 </pre>
2648 </pre>
2639 </ul>
2649 </ul>
2640 <p>
2650 <p>
2641 Returns 0 if all files are successfully added.
2651 Returns 0 if all files are successfully added.
2642 </p>
2652 </p>
2643 <p>
2653 <p>
2644 options ([+] can be repeated):
2654 options ([+] can be repeated):
2645 </p>
2655 </p>
2646 <table>
2656 <table>
2647 <tr><td>-I</td>
2657 <tr><td>-I</td>
2648 <td>--include PATTERN [+]</td>
2658 <td>--include PATTERN [+]</td>
2649 <td>include names matching the given patterns</td></tr>
2659 <td>include names matching the given patterns</td></tr>
2650 <tr><td>-X</td>
2660 <tr><td>-X</td>
2651 <td>--exclude PATTERN [+]</td>
2661 <td>--exclude PATTERN [+]</td>
2652 <td>exclude names matching the given patterns</td></tr>
2662 <td>exclude names matching the given patterns</td></tr>
2653 <tr><td>-S</td>
2663 <tr><td>-S</td>
2654 <td>--subrepos</td>
2664 <td>--subrepos</td>
2655 <td>recurse into subrepositories</td></tr>
2665 <td>recurse into subrepositories</td></tr>
2656 <tr><td>-n</td>
2666 <tr><td>-n</td>
2657 <td>--dry-run</td>
2667 <td>--dry-run</td>
2658 <td>do not perform actions, just print output</td></tr>
2668 <td>do not perform actions, just print output</td></tr>
2659 </table>
2669 </table>
2660 <p>
2670 <p>
2661 global options ([+] can be repeated):
2671 global options ([+] can be repeated):
2662 </p>
2672 </p>
2663 <table>
2673 <table>
2664 <tr><td>-R</td>
2674 <tr><td>-R</td>
2665 <td>--repository REPO</td>
2675 <td>--repository REPO</td>
2666 <td>repository root directory or name of overlay bundle file</td></tr>
2676 <td>repository root directory or name of overlay bundle file</td></tr>
2667 <tr><td></td>
2677 <tr><td></td>
2668 <td>--cwd DIR</td>
2678 <td>--cwd DIR</td>
2669 <td>change working directory</td></tr>
2679 <td>change working directory</td></tr>
2670 <tr><td>-y</td>
2680 <tr><td>-y</td>
2671 <td>--noninteractive</td>
2681 <td>--noninteractive</td>
2672 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2682 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2673 <tr><td>-q</td>
2683 <tr><td>-q</td>
2674 <td>--quiet</td>
2684 <td>--quiet</td>
2675 <td>suppress output</td></tr>
2685 <td>suppress output</td></tr>
2676 <tr><td>-v</td>
2686 <tr><td>-v</td>
2677 <td>--verbose</td>
2687 <td>--verbose</td>
2678 <td>enable additional output</td></tr>
2688 <td>enable additional output</td></tr>
2679 <tr><td></td>
2689 <tr><td></td>
2680 <td>--color TYPE</td>
2690 <td>--color TYPE</td>
2681 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2691 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2682 <tr><td></td>
2692 <tr><td></td>
2683 <td>--config CONFIG [+]</td>
2693 <td>--config CONFIG [+]</td>
2684 <td>set/override config option (use 'section.name=value')</td></tr>
2694 <td>set/override config option (use 'section.name=value')</td></tr>
2685 <tr><td></td>
2695 <tr><td></td>
2686 <td>--debug</td>
2696 <td>--debug</td>
2687 <td>enable debugging output</td></tr>
2697 <td>enable debugging output</td></tr>
2688 <tr><td></td>
2698 <tr><td></td>
2689 <td>--debugger</td>
2699 <td>--debugger</td>
2690 <td>start debugger</td></tr>
2700 <td>start debugger</td></tr>
2691 <tr><td></td>
2701 <tr><td></td>
2692 <td>--encoding ENCODE</td>
2702 <td>--encoding ENCODE</td>
2693 <td>set the charset encoding (default: ascii)</td></tr>
2703 <td>set the charset encoding (default: ascii)</td></tr>
2694 <tr><td></td>
2704 <tr><td></td>
2695 <td>--encodingmode MODE</td>
2705 <td>--encodingmode MODE</td>
2696 <td>set the charset encoding mode (default: strict)</td></tr>
2706 <td>set the charset encoding mode (default: strict)</td></tr>
2697 <tr><td></td>
2707 <tr><td></td>
2698 <td>--traceback</td>
2708 <td>--traceback</td>
2699 <td>always print a traceback on exception</td></tr>
2709 <td>always print a traceback on exception</td></tr>
2700 <tr><td></td>
2710 <tr><td></td>
2701 <td>--time</td>
2711 <td>--time</td>
2702 <td>time how long the command takes</td></tr>
2712 <td>time how long the command takes</td></tr>
2703 <tr><td></td>
2713 <tr><td></td>
2704 <td>--profile</td>
2714 <td>--profile</td>
2705 <td>print command execution profile</td></tr>
2715 <td>print command execution profile</td></tr>
2706 <tr><td></td>
2716 <tr><td></td>
2707 <td>--version</td>
2717 <td>--version</td>
2708 <td>output version information and exit</td></tr>
2718 <td>output version information and exit</td></tr>
2709 <tr><td>-h</td>
2719 <tr><td>-h</td>
2710 <td>--help</td>
2720 <td>--help</td>
2711 <td>display help and exit</td></tr>
2721 <td>display help and exit</td></tr>
2712 <tr><td></td>
2722 <tr><td></td>
2713 <td>--hidden</td>
2723 <td>--hidden</td>
2714 <td>consider hidden changesets</td></tr>
2724 <td>consider hidden changesets</td></tr>
2715 <tr><td></td>
2725 <tr><td></td>
2716 <td>--pager TYPE</td>
2726 <td>--pager TYPE</td>
2717 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2727 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2718 </table>
2728 </table>
2719
2729
2720 </div>
2730 </div>
2721 </div>
2731 </div>
2722 </div>
2732 </div>
2723
2733
2724
2734
2725
2735
2726 </body>
2736 </body>
2727 </html>
2737 </html>
2728
2738
2729
2739
2730 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2740 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2731 200 Script output follows
2741 200 Script output follows
2732
2742
2733 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2743 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2734 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2744 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2735 <head>
2745 <head>
2736 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2746 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2737 <meta name="robots" content="index, nofollow" />
2747 <meta name="robots" content="index, nofollow" />
2738 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2748 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2739 <script type="text/javascript" src="/static/mercurial.js"></script>
2749 <script type="text/javascript" src="/static/mercurial.js"></script>
2740
2750
2741 <title>Help: remove</title>
2751 <title>Help: remove</title>
2742 </head>
2752 </head>
2743 <body>
2753 <body>
2744
2754
2745 <div class="container">
2755 <div class="container">
2746 <div class="menu">
2756 <div class="menu">
2747 <div class="logo">
2757 <div class="logo">
2748 <a href="https://mercurial-scm.org/">
2758 <a href="https://mercurial-scm.org/">
2749 <img src="/static/hglogo.png" alt="mercurial" /></a>
2759 <img src="/static/hglogo.png" alt="mercurial" /></a>
2750 </div>
2760 </div>
2751 <ul>
2761 <ul>
2752 <li><a href="/shortlog">log</a></li>
2762 <li><a href="/shortlog">log</a></li>
2753 <li><a href="/graph">graph</a></li>
2763 <li><a href="/graph">graph</a></li>
2754 <li><a href="/tags">tags</a></li>
2764 <li><a href="/tags">tags</a></li>
2755 <li><a href="/bookmarks">bookmarks</a></li>
2765 <li><a href="/bookmarks">bookmarks</a></li>
2756 <li><a href="/branches">branches</a></li>
2766 <li><a href="/branches">branches</a></li>
2757 </ul>
2767 </ul>
2758 <ul>
2768 <ul>
2759 <li class="active"><a href="/help">help</a></li>
2769 <li class="active"><a href="/help">help</a></li>
2760 </ul>
2770 </ul>
2761 </div>
2771 </div>
2762
2772
2763 <div class="main">
2773 <div class="main">
2764 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2774 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2765 <h3>Help: remove</h3>
2775 <h3>Help: remove</h3>
2766
2776
2767 <form class="search" action="/log">
2777 <form class="search" action="/log">
2768
2778
2769 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2779 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2770 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2780 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2771 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2781 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2772 </form>
2782 </form>
2773 <div id="doc">
2783 <div id="doc">
2774 <p>
2784 <p>
2775 hg remove [OPTION]... FILE...
2785 hg remove [OPTION]... FILE...
2776 </p>
2786 </p>
2777 <p>
2787 <p>
2778 aliases: rm
2788 aliases: rm
2779 </p>
2789 </p>
2780 <p>
2790 <p>
2781 remove the specified files on the next commit
2791 remove the specified files on the next commit
2782 </p>
2792 </p>
2783 <p>
2793 <p>
2784 Schedule the indicated files for removal from the current branch.
2794 Schedule the indicated files for removal from the current branch.
2785 </p>
2795 </p>
2786 <p>
2796 <p>
2787 This command schedules the files to be removed at the next commit.
2797 This command schedules the files to be removed at the next commit.
2788 To undo a remove before that, see 'hg revert'. To undo added
2798 To undo a remove before that, see 'hg revert'. To undo added
2789 files, see 'hg forget'.
2799 files, see 'hg forget'.
2790 </p>
2800 </p>
2791 <p>
2801 <p>
2792 -A/--after can be used to remove only files that have already
2802 -A/--after can be used to remove only files that have already
2793 been deleted, -f/--force can be used to force deletion, and -Af
2803 been deleted, -f/--force can be used to force deletion, and -Af
2794 can be used to remove files from the next revision without
2804 can be used to remove files from the next revision without
2795 deleting them from the working directory.
2805 deleting them from the working directory.
2796 </p>
2806 </p>
2797 <p>
2807 <p>
2798 The following table details the behavior of remove for different
2808 The following table details the behavior of remove for different
2799 file states (columns) and option combinations (rows). The file
2809 file states (columns) and option combinations (rows). The file
2800 states are Added [A], Clean [C], Modified [M] and Missing [!]
2810 states are Added [A], Clean [C], Modified [M] and Missing [!]
2801 (as reported by 'hg status'). The actions are Warn, Remove
2811 (as reported by 'hg status'). The actions are Warn, Remove
2802 (from branch) and Delete (from disk):
2812 (from branch) and Delete (from disk):
2803 </p>
2813 </p>
2804 <table>
2814 <table>
2805 <tr><td>opt/state</td>
2815 <tr><td>opt/state</td>
2806 <td>A</td>
2816 <td>A</td>
2807 <td>C</td>
2817 <td>C</td>
2808 <td>M</td>
2818 <td>M</td>
2809 <td>!</td></tr>
2819 <td>!</td></tr>
2810 <tr><td>none</td>
2820 <tr><td>none</td>
2811 <td>W</td>
2821 <td>W</td>
2812 <td>RD</td>
2822 <td>RD</td>
2813 <td>W</td>
2823 <td>W</td>
2814 <td>R</td></tr>
2824 <td>R</td></tr>
2815 <tr><td>-f</td>
2825 <tr><td>-f</td>
2816 <td>R</td>
2826 <td>R</td>
2817 <td>RD</td>
2827 <td>RD</td>
2818 <td>RD</td>
2828 <td>RD</td>
2819 <td>R</td></tr>
2829 <td>R</td></tr>
2820 <tr><td>-A</td>
2830 <tr><td>-A</td>
2821 <td>W</td>
2831 <td>W</td>
2822 <td>W</td>
2832 <td>W</td>
2823 <td>W</td>
2833 <td>W</td>
2824 <td>R</td></tr>
2834 <td>R</td></tr>
2825 <tr><td>-Af</td>
2835 <tr><td>-Af</td>
2826 <td>R</td>
2836 <td>R</td>
2827 <td>R</td>
2837 <td>R</td>
2828 <td>R</td>
2838 <td>R</td>
2829 <td>R</td></tr>
2839 <td>R</td></tr>
2830 </table>
2840 </table>
2831 <p>
2841 <p>
2832 <b>Note:</b>
2842 <b>Note:</b>
2833 </p>
2843 </p>
2834 <p>
2844 <p>
2835 'hg remove' never deletes files in Added [A] state from the
2845 'hg remove' never deletes files in Added [A] state from the
2836 working directory, not even if &quot;--force&quot; is specified.
2846 working directory, not even if &quot;--force&quot; is specified.
2837 </p>
2847 </p>
2838 <p>
2848 <p>
2839 Returns 0 on success, 1 if any warnings encountered.
2849 Returns 0 on success, 1 if any warnings encountered.
2840 </p>
2850 </p>
2841 <p>
2851 <p>
2842 options ([+] can be repeated):
2852 options ([+] can be repeated):
2843 </p>
2853 </p>
2844 <table>
2854 <table>
2845 <tr><td>-A</td>
2855 <tr><td>-A</td>
2846 <td>--after</td>
2856 <td>--after</td>
2847 <td>record delete for missing files</td></tr>
2857 <td>record delete for missing files</td></tr>
2848 <tr><td>-f</td>
2858 <tr><td>-f</td>
2849 <td>--force</td>
2859 <td>--force</td>
2850 <td>forget added files, delete modified files</td></tr>
2860 <td>forget added files, delete modified files</td></tr>
2851 <tr><td>-S</td>
2861 <tr><td>-S</td>
2852 <td>--subrepos</td>
2862 <td>--subrepos</td>
2853 <td>recurse into subrepositories</td></tr>
2863 <td>recurse into subrepositories</td></tr>
2854 <tr><td>-I</td>
2864 <tr><td>-I</td>
2855 <td>--include PATTERN [+]</td>
2865 <td>--include PATTERN [+]</td>
2856 <td>include names matching the given patterns</td></tr>
2866 <td>include names matching the given patterns</td></tr>
2857 <tr><td>-X</td>
2867 <tr><td>-X</td>
2858 <td>--exclude PATTERN [+]</td>
2868 <td>--exclude PATTERN [+]</td>
2859 <td>exclude names matching the given patterns</td></tr>
2869 <td>exclude names matching the given patterns</td></tr>
2860 <tr><td>-n</td>
2870 <tr><td>-n</td>
2861 <td>--dry-run</td>
2871 <td>--dry-run</td>
2862 <td>do not perform actions, just print output</td></tr>
2872 <td>do not perform actions, just print output</td></tr>
2863 </table>
2873 </table>
2864 <p>
2874 <p>
2865 global options ([+] can be repeated):
2875 global options ([+] can be repeated):
2866 </p>
2876 </p>
2867 <table>
2877 <table>
2868 <tr><td>-R</td>
2878 <tr><td>-R</td>
2869 <td>--repository REPO</td>
2879 <td>--repository REPO</td>
2870 <td>repository root directory or name of overlay bundle file</td></tr>
2880 <td>repository root directory or name of overlay bundle file</td></tr>
2871 <tr><td></td>
2881 <tr><td></td>
2872 <td>--cwd DIR</td>
2882 <td>--cwd DIR</td>
2873 <td>change working directory</td></tr>
2883 <td>change working directory</td></tr>
2874 <tr><td>-y</td>
2884 <tr><td>-y</td>
2875 <td>--noninteractive</td>
2885 <td>--noninteractive</td>
2876 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2886 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2877 <tr><td>-q</td>
2887 <tr><td>-q</td>
2878 <td>--quiet</td>
2888 <td>--quiet</td>
2879 <td>suppress output</td></tr>
2889 <td>suppress output</td></tr>
2880 <tr><td>-v</td>
2890 <tr><td>-v</td>
2881 <td>--verbose</td>
2891 <td>--verbose</td>
2882 <td>enable additional output</td></tr>
2892 <td>enable additional output</td></tr>
2883 <tr><td></td>
2893 <tr><td></td>
2884 <td>--color TYPE</td>
2894 <td>--color TYPE</td>
2885 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2895 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2886 <tr><td></td>
2896 <tr><td></td>
2887 <td>--config CONFIG [+]</td>
2897 <td>--config CONFIG [+]</td>
2888 <td>set/override config option (use 'section.name=value')</td></tr>
2898 <td>set/override config option (use 'section.name=value')</td></tr>
2889 <tr><td></td>
2899 <tr><td></td>
2890 <td>--debug</td>
2900 <td>--debug</td>
2891 <td>enable debugging output</td></tr>
2901 <td>enable debugging output</td></tr>
2892 <tr><td></td>
2902 <tr><td></td>
2893 <td>--debugger</td>
2903 <td>--debugger</td>
2894 <td>start debugger</td></tr>
2904 <td>start debugger</td></tr>
2895 <tr><td></td>
2905 <tr><td></td>
2896 <td>--encoding ENCODE</td>
2906 <td>--encoding ENCODE</td>
2897 <td>set the charset encoding (default: ascii)</td></tr>
2907 <td>set the charset encoding (default: ascii)</td></tr>
2898 <tr><td></td>
2908 <tr><td></td>
2899 <td>--encodingmode MODE</td>
2909 <td>--encodingmode MODE</td>
2900 <td>set the charset encoding mode (default: strict)</td></tr>
2910 <td>set the charset encoding mode (default: strict)</td></tr>
2901 <tr><td></td>
2911 <tr><td></td>
2902 <td>--traceback</td>
2912 <td>--traceback</td>
2903 <td>always print a traceback on exception</td></tr>
2913 <td>always print a traceback on exception</td></tr>
2904 <tr><td></td>
2914 <tr><td></td>
2905 <td>--time</td>
2915 <td>--time</td>
2906 <td>time how long the command takes</td></tr>
2916 <td>time how long the command takes</td></tr>
2907 <tr><td></td>
2917 <tr><td></td>
2908 <td>--profile</td>
2918 <td>--profile</td>
2909 <td>print command execution profile</td></tr>
2919 <td>print command execution profile</td></tr>
2910 <tr><td></td>
2920 <tr><td></td>
2911 <td>--version</td>
2921 <td>--version</td>
2912 <td>output version information and exit</td></tr>
2922 <td>output version information and exit</td></tr>
2913 <tr><td>-h</td>
2923 <tr><td>-h</td>
2914 <td>--help</td>
2924 <td>--help</td>
2915 <td>display help and exit</td></tr>
2925 <td>display help and exit</td></tr>
2916 <tr><td></td>
2926 <tr><td></td>
2917 <td>--hidden</td>
2927 <td>--hidden</td>
2918 <td>consider hidden changesets</td></tr>
2928 <td>consider hidden changesets</td></tr>
2919 <tr><td></td>
2929 <tr><td></td>
2920 <td>--pager TYPE</td>
2930 <td>--pager TYPE</td>
2921 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2931 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2922 </table>
2932 </table>
2923
2933
2924 </div>
2934 </div>
2925 </div>
2935 </div>
2926 </div>
2936 </div>
2927
2937
2928
2938
2929
2939
2930 </body>
2940 </body>
2931 </html>
2941 </html>
2932
2942
2933
2943
2934 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2944 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2935 200 Script output follows
2945 200 Script output follows
2936
2946
2937 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2947 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2938 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2948 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2939 <head>
2949 <head>
2940 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2950 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2941 <meta name="robots" content="index, nofollow" />
2951 <meta name="robots" content="index, nofollow" />
2942 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2952 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2943 <script type="text/javascript" src="/static/mercurial.js"></script>
2953 <script type="text/javascript" src="/static/mercurial.js"></script>
2944
2954
2945 <title>Help: dates</title>
2955 <title>Help: dates</title>
2946 </head>
2956 </head>
2947 <body>
2957 <body>
2948
2958
2949 <div class="container">
2959 <div class="container">
2950 <div class="menu">
2960 <div class="menu">
2951 <div class="logo">
2961 <div class="logo">
2952 <a href="https://mercurial-scm.org/">
2962 <a href="https://mercurial-scm.org/">
2953 <img src="/static/hglogo.png" alt="mercurial" /></a>
2963 <img src="/static/hglogo.png" alt="mercurial" /></a>
2954 </div>
2964 </div>
2955 <ul>
2965 <ul>
2956 <li><a href="/shortlog">log</a></li>
2966 <li><a href="/shortlog">log</a></li>
2957 <li><a href="/graph">graph</a></li>
2967 <li><a href="/graph">graph</a></li>
2958 <li><a href="/tags">tags</a></li>
2968 <li><a href="/tags">tags</a></li>
2959 <li><a href="/bookmarks">bookmarks</a></li>
2969 <li><a href="/bookmarks">bookmarks</a></li>
2960 <li><a href="/branches">branches</a></li>
2970 <li><a href="/branches">branches</a></li>
2961 </ul>
2971 </ul>
2962 <ul>
2972 <ul>
2963 <li class="active"><a href="/help">help</a></li>
2973 <li class="active"><a href="/help">help</a></li>
2964 </ul>
2974 </ul>
2965 </div>
2975 </div>
2966
2976
2967 <div class="main">
2977 <div class="main">
2968 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2978 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2969 <h3>Help: dates</h3>
2979 <h3>Help: dates</h3>
2970
2980
2971 <form class="search" action="/log">
2981 <form class="search" action="/log">
2972
2982
2973 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2983 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2974 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2984 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2975 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2985 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2976 </form>
2986 </form>
2977 <div id="doc">
2987 <div id="doc">
2978 <h1>Date Formats</h1>
2988 <h1>Date Formats</h1>
2979 <p>
2989 <p>
2980 Some commands allow the user to specify a date, e.g.:
2990 Some commands allow the user to specify a date, e.g.:
2981 </p>
2991 </p>
2982 <ul>
2992 <ul>
2983 <li> backout, commit, import, tag: Specify the commit date.
2993 <li> backout, commit, import, tag: Specify the commit date.
2984 <li> log, revert, update: Select revision(s) by date.
2994 <li> log, revert, update: Select revision(s) by date.
2985 </ul>
2995 </ul>
2986 <p>
2996 <p>
2987 Many date formats are valid. Here are some examples:
2997 Many date formats are valid. Here are some examples:
2988 </p>
2998 </p>
2989 <ul>
2999 <ul>
2990 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3000 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
2991 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3001 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
2992 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3002 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
2993 <li> &quot;Dec 6&quot; (midnight)
3003 <li> &quot;Dec 6&quot; (midnight)
2994 <li> &quot;13:18&quot; (today assumed)
3004 <li> &quot;13:18&quot; (today assumed)
2995 <li> &quot;3:39&quot; (3:39AM assumed)
3005 <li> &quot;3:39&quot; (3:39AM assumed)
2996 <li> &quot;3:39pm&quot; (15:39)
3006 <li> &quot;3:39pm&quot; (15:39)
2997 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3007 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
2998 <li> &quot;2006-12-6 13:18&quot;
3008 <li> &quot;2006-12-6 13:18&quot;
2999 <li> &quot;2006-12-6&quot;
3009 <li> &quot;2006-12-6&quot;
3000 <li> &quot;12-6&quot;
3010 <li> &quot;12-6&quot;
3001 <li> &quot;12/6&quot;
3011 <li> &quot;12/6&quot;
3002 <li> &quot;12/6/6&quot; (Dec 6 2006)
3012 <li> &quot;12/6/6&quot; (Dec 6 2006)
3003 <li> &quot;today&quot; (midnight)
3013 <li> &quot;today&quot; (midnight)
3004 <li> &quot;yesterday&quot; (midnight)
3014 <li> &quot;yesterday&quot; (midnight)
3005 <li> &quot;now&quot; - right now
3015 <li> &quot;now&quot; - right now
3006 </ul>
3016 </ul>
3007 <p>
3017 <p>
3008 Lastly, there is Mercurial's internal format:
3018 Lastly, there is Mercurial's internal format:
3009 </p>
3019 </p>
3010 <ul>
3020 <ul>
3011 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3021 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3012 </ul>
3022 </ul>
3013 <p>
3023 <p>
3014 This is the internal representation format for dates. The first number
3024 This is the internal representation format for dates. The first number
3015 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3025 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3016 second is the offset of the local timezone, in seconds west of UTC
3026 second is the offset of the local timezone, in seconds west of UTC
3017 (negative if the timezone is east of UTC).
3027 (negative if the timezone is east of UTC).
3018 </p>
3028 </p>
3019 <p>
3029 <p>
3020 The log command also accepts date ranges:
3030 The log command also accepts date ranges:
3021 </p>
3031 </p>
3022 <ul>
3032 <ul>
3023 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3033 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3024 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3034 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3025 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3035 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3026 <li> &quot;-DAYS&quot; - within a given number of days of today
3036 <li> &quot;-DAYS&quot; - within a given number of days of today
3027 </ul>
3037 </ul>
3028
3038
3029 </div>
3039 </div>
3030 </div>
3040 </div>
3031 </div>
3041 </div>
3032
3042
3033
3043
3034
3044
3035 </body>
3045 </body>
3036 </html>
3046 </html>
3037
3047
3038
3048
3039 $ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
3049 $ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
3040 200 Script output follows
3050 200 Script output follows
3041
3051
3042 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3052 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3043 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3053 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3044 <head>
3054 <head>
3045 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3055 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3046 <meta name="robots" content="index, nofollow" />
3056 <meta name="robots" content="index, nofollow" />
3047 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3057 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3048 <script type="text/javascript" src="/static/mercurial.js"></script>
3058 <script type="text/javascript" src="/static/mercurial.js"></script>
3049
3059
3050 <title>Help: pager</title>
3060 <title>Help: pager</title>
3051 </head>
3061 </head>
3052 <body>
3062 <body>
3053
3063
3054 <div class="container">
3064 <div class="container">
3055 <div class="menu">
3065 <div class="menu">
3056 <div class="logo">
3066 <div class="logo">
3057 <a href="https://mercurial-scm.org/">
3067 <a href="https://mercurial-scm.org/">
3058 <img src="/static/hglogo.png" alt="mercurial" /></a>
3068 <img src="/static/hglogo.png" alt="mercurial" /></a>
3059 </div>
3069 </div>
3060 <ul>
3070 <ul>
3061 <li><a href="/shortlog">log</a></li>
3071 <li><a href="/shortlog">log</a></li>
3062 <li><a href="/graph">graph</a></li>
3072 <li><a href="/graph">graph</a></li>
3063 <li><a href="/tags">tags</a></li>
3073 <li><a href="/tags">tags</a></li>
3064 <li><a href="/bookmarks">bookmarks</a></li>
3074 <li><a href="/bookmarks">bookmarks</a></li>
3065 <li><a href="/branches">branches</a></li>
3075 <li><a href="/branches">branches</a></li>
3066 </ul>
3076 </ul>
3067 <ul>
3077 <ul>
3068 <li class="active"><a href="/help">help</a></li>
3078 <li class="active"><a href="/help">help</a></li>
3069 </ul>
3079 </ul>
3070 </div>
3080 </div>
3071
3081
3072 <div class="main">
3082 <div class="main">
3073 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3083 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3074 <h3>Help: pager</h3>
3084 <h3>Help: pager</h3>
3075
3085
3076 <form class="search" action="/log">
3086 <form class="search" action="/log">
3077
3087
3078 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3088 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3079 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3089 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3080 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3090 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3081 </form>
3091 </form>
3082 <div id="doc">
3092 <div id="doc">
3083 <h1>Pager Support</h1>
3093 <h1>Pager Support</h1>
3084 <p>
3094 <p>
3085 Some Mercurial commands can produce a lot of output, and Mercurial will
3095 Some Mercurial commands can produce a lot of output, and Mercurial will
3086 attempt to use a pager to make those commands more pleasant.
3096 attempt to use a pager to make those commands more pleasant.
3087 </p>
3097 </p>
3088 <p>
3098 <p>
3089 To set the pager that should be used, set the application variable:
3099 To set the pager that should be used, set the application variable:
3090 </p>
3100 </p>
3091 <pre>
3101 <pre>
3092 [pager]
3102 [pager]
3093 pager = less -FRX
3103 pager = less -FRX
3094 </pre>
3104 </pre>
3095 <p>
3105 <p>
3096 If no pager is set in the user or repository configuration, Mercurial uses the
3106 If no pager is set in the user or repository configuration, Mercurial uses the
3097 environment variable $PAGER. If $PAGER is not set, pager.pager from the default
3107 environment variable $PAGER. If $PAGER is not set, pager.pager from the default
3098 or system configuration is used. If none of these are set, a default pager will
3108 or system configuration is used. If none of these are set, a default pager will
3099 be used, typically 'less' on Unix and 'more' on Windows.
3109 be used, typically 'less' on Unix and 'more' on Windows.
3100 </p>
3110 </p>
3101 <p>
3111 <p>
3102 You can disable the pager for certain commands by adding them to the
3112 You can disable the pager for certain commands by adding them to the
3103 pager.ignore list:
3113 pager.ignore list:
3104 </p>
3114 </p>
3105 <pre>
3115 <pre>
3106 [pager]
3116 [pager]
3107 ignore = version, help, update
3117 ignore = version, help, update
3108 </pre>
3118 </pre>
3109 <p>
3119 <p>
3110 To ignore global commands like 'hg version' or 'hg help', you have
3120 To ignore global commands like 'hg version' or 'hg help', you have
3111 to specify them in your user configuration file.
3121 to specify them in your user configuration file.
3112 </p>
3122 </p>
3113 <p>
3123 <p>
3114 To control whether the pager is used at all for an individual command,
3124 To control whether the pager is used at all for an individual command,
3115 you can use --pager=&lt;value&gt;:
3125 you can use --pager=&lt;value&gt;:
3116 </p>
3126 </p>
3117 <ul>
3127 <ul>
3118 <li> use as needed: 'auto'.
3128 <li> use as needed: 'auto'.
3119 <li> require the pager: 'yes' or 'on'.
3129 <li> require the pager: 'yes' or 'on'.
3120 <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
3130 <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
3121 </ul>
3131 </ul>
3122 <p>
3132 <p>
3123 To globally turn off all attempts to use a pager, set:
3133 To globally turn off all attempts to use a pager, set:
3124 </p>
3134 </p>
3125 <pre>
3135 <pre>
3126 [ui]
3136 [ui]
3127 paginate = never
3137 paginate = never
3128 </pre>
3138 </pre>
3129 <p>
3139 <p>
3130 which will prevent the pager from running.
3140 which will prevent the pager from running.
3131 </p>
3141 </p>
3132
3142
3133 </div>
3143 </div>
3134 </div>
3144 </div>
3135 </div>
3145 </div>
3136
3146
3137
3147
3138
3148
3139 </body>
3149 </body>
3140 </html>
3150 </html>
3141
3151
3142
3152
3143 Sub-topic indexes rendered properly
3153 Sub-topic indexes rendered properly
3144
3154
3145 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3155 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3146 200 Script output follows
3156 200 Script output follows
3147
3157
3148 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3158 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3149 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3159 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3150 <head>
3160 <head>
3151 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3161 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3152 <meta name="robots" content="index, nofollow" />
3162 <meta name="robots" content="index, nofollow" />
3153 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3163 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3154 <script type="text/javascript" src="/static/mercurial.js"></script>
3164 <script type="text/javascript" src="/static/mercurial.js"></script>
3155
3165
3156 <title>Help: internals</title>
3166 <title>Help: internals</title>
3157 </head>
3167 </head>
3158 <body>
3168 <body>
3159
3169
3160 <div class="container">
3170 <div class="container">
3161 <div class="menu">
3171 <div class="menu">
3162 <div class="logo">
3172 <div class="logo">
3163 <a href="https://mercurial-scm.org/">
3173 <a href="https://mercurial-scm.org/">
3164 <img src="/static/hglogo.png" alt="mercurial" /></a>
3174 <img src="/static/hglogo.png" alt="mercurial" /></a>
3165 </div>
3175 </div>
3166 <ul>
3176 <ul>
3167 <li><a href="/shortlog">log</a></li>
3177 <li><a href="/shortlog">log</a></li>
3168 <li><a href="/graph">graph</a></li>
3178 <li><a href="/graph">graph</a></li>
3169 <li><a href="/tags">tags</a></li>
3179 <li><a href="/tags">tags</a></li>
3170 <li><a href="/bookmarks">bookmarks</a></li>
3180 <li><a href="/bookmarks">bookmarks</a></li>
3171 <li><a href="/branches">branches</a></li>
3181 <li><a href="/branches">branches</a></li>
3172 </ul>
3182 </ul>
3173 <ul>
3183 <ul>
3174 <li><a href="/help">help</a></li>
3184 <li><a href="/help">help</a></li>
3175 </ul>
3185 </ul>
3176 </div>
3186 </div>
3177
3187
3178 <div class="main">
3188 <div class="main">
3179 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3189 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3180
3190
3181 <form class="search" action="/log">
3191 <form class="search" action="/log">
3182
3192
3183 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3193 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3184 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3194 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3185 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3195 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3186 </form>
3196 </form>
3187 <table class="bigtable">
3197 <table class="bigtable">
3188 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3198 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3189
3199
3190 <tr><td>
3200 <tr><td>
3191 <a href="/help/internals.bundle2">
3201 <a href="/help/internals.bundle2">
3192 bundle2
3202 bundle2
3193 </a>
3203 </a>
3194 </td><td>
3204 </td><td>
3195 Bundle2
3205 Bundle2
3196 </td></tr>
3206 </td></tr>
3197 <tr><td>
3207 <tr><td>
3198 <a href="/help/internals.bundles">
3208 <a href="/help/internals.bundles">
3199 bundles
3209 bundles
3200 </a>
3210 </a>
3201 </td><td>
3211 </td><td>
3202 Bundles
3212 Bundles
3203 </td></tr>
3213 </td></tr>
3204 <tr><td>
3214 <tr><td>
3205 <a href="/help/internals.censor">
3215 <a href="/help/internals.censor">
3206 censor
3216 censor
3207 </a>
3217 </a>
3208 </td><td>
3218 </td><td>
3209 Censor
3219 Censor
3210 </td></tr>
3220 </td></tr>
3211 <tr><td>
3221 <tr><td>
3212 <a href="/help/internals.changegroups">
3222 <a href="/help/internals.changegroups">
3213 changegroups
3223 changegroups
3214 </a>
3224 </a>
3215 </td><td>
3225 </td><td>
3216 Changegroups
3226 Changegroups
3217 </td></tr>
3227 </td></tr>
3218 <tr><td>
3228 <tr><td>
3219 <a href="/help/internals.config">
3229 <a href="/help/internals.config">
3220 config
3230 config
3221 </a>
3231 </a>
3222 </td><td>
3232 </td><td>
3223 Config Registrar
3233 Config Registrar
3224 </td></tr>
3234 </td></tr>
3225 <tr><td>
3235 <tr><td>
3226 <a href="/help/internals.requirements">
3236 <a href="/help/internals.requirements">
3227 requirements
3237 requirements
3228 </a>
3238 </a>
3229 </td><td>
3239 </td><td>
3230 Repository Requirements
3240 Repository Requirements
3231 </td></tr>
3241 </td></tr>
3232 <tr><td>
3242 <tr><td>
3233 <a href="/help/internals.revlogs">
3243 <a href="/help/internals.revlogs">
3234 revlogs
3244 revlogs
3235 </a>
3245 </a>
3236 </td><td>
3246 </td><td>
3237 Revision Logs
3247 Revision Logs
3238 </td></tr>
3248 </td></tr>
3239 <tr><td>
3249 <tr><td>
3240 <a href="/help/internals.wireprotocol">
3250 <a href="/help/internals.wireprotocol">
3241 wireprotocol
3251 wireprotocol
3242 </a>
3252 </a>
3243 </td><td>
3253 </td><td>
3244 Wire Protocol
3254 Wire Protocol
3245 </td></tr>
3255 </td></tr>
3246
3256
3247
3257
3248
3258
3249
3259
3250
3260
3251 </table>
3261 </table>
3252 </div>
3262 </div>
3253 </div>
3263 </div>
3254
3264
3255
3265
3256
3266
3257 </body>
3267 </body>
3258 </html>
3268 </html>
3259
3269
3260
3270
3261 Sub-topic topics rendered properly
3271 Sub-topic topics rendered properly
3262
3272
3263 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3273 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3264 200 Script output follows
3274 200 Script output follows
3265
3275
3266 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3276 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3267 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3277 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3268 <head>
3278 <head>
3269 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3279 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3270 <meta name="robots" content="index, nofollow" />
3280 <meta name="robots" content="index, nofollow" />
3271 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3281 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3272 <script type="text/javascript" src="/static/mercurial.js"></script>
3282 <script type="text/javascript" src="/static/mercurial.js"></script>
3273
3283
3274 <title>Help: internals.changegroups</title>
3284 <title>Help: internals.changegroups</title>
3275 </head>
3285 </head>
3276 <body>
3286 <body>
3277
3287
3278 <div class="container">
3288 <div class="container">
3279 <div class="menu">
3289 <div class="menu">
3280 <div class="logo">
3290 <div class="logo">
3281 <a href="https://mercurial-scm.org/">
3291 <a href="https://mercurial-scm.org/">
3282 <img src="/static/hglogo.png" alt="mercurial" /></a>
3292 <img src="/static/hglogo.png" alt="mercurial" /></a>
3283 </div>
3293 </div>
3284 <ul>
3294 <ul>
3285 <li><a href="/shortlog">log</a></li>
3295 <li><a href="/shortlog">log</a></li>
3286 <li><a href="/graph">graph</a></li>
3296 <li><a href="/graph">graph</a></li>
3287 <li><a href="/tags">tags</a></li>
3297 <li><a href="/tags">tags</a></li>
3288 <li><a href="/bookmarks">bookmarks</a></li>
3298 <li><a href="/bookmarks">bookmarks</a></li>
3289 <li><a href="/branches">branches</a></li>
3299 <li><a href="/branches">branches</a></li>
3290 </ul>
3300 </ul>
3291 <ul>
3301 <ul>
3292 <li class="active"><a href="/help">help</a></li>
3302 <li class="active"><a href="/help">help</a></li>
3293 </ul>
3303 </ul>
3294 </div>
3304 </div>
3295
3305
3296 <div class="main">
3306 <div class="main">
3297 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3307 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3298 <h3>Help: internals.changegroups</h3>
3308 <h3>Help: internals.changegroups</h3>
3299
3309
3300 <form class="search" action="/log">
3310 <form class="search" action="/log">
3301
3311
3302 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3312 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3303 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3313 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3304 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3314 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3305 </form>
3315 </form>
3306 <div id="doc">
3316 <div id="doc">
3307 <h1>Changegroups</h1>
3317 <h1>Changegroups</h1>
3308 <p>
3318 <p>
3309 Changegroups are representations of repository revlog data, specifically
3319 Changegroups are representations of repository revlog data, specifically
3310 the changelog data, root/flat manifest data, treemanifest data, and
3320 the changelog data, root/flat manifest data, treemanifest data, and
3311 filelogs.
3321 filelogs.
3312 </p>
3322 </p>
3313 <p>
3323 <p>
3314 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3324 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3315 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3325 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3316 only difference being an additional item in the *delta header*. Version
3326 only difference being an additional item in the *delta header*. Version
3317 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3327 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3318 exchanging treemanifests (enabled by setting an option on the
3328 exchanging treemanifests (enabled by setting an option on the
3319 &quot;changegroup&quot; part in the bundle2).
3329 &quot;changegroup&quot; part in the bundle2).
3320 </p>
3330 </p>
3321 <p>
3331 <p>
3322 Changegroups when not exchanging treemanifests consist of 3 logical
3332 Changegroups when not exchanging treemanifests consist of 3 logical
3323 segments:
3333 segments:
3324 </p>
3334 </p>
3325 <pre>
3335 <pre>
3326 +---------------------------------+
3336 +---------------------------------+
3327 | | | |
3337 | | | |
3328 | changeset | manifest | filelogs |
3338 | changeset | manifest | filelogs |
3329 | | | |
3339 | | | |
3330 | | | |
3340 | | | |
3331 +---------------------------------+
3341 +---------------------------------+
3332 </pre>
3342 </pre>
3333 <p>
3343 <p>
3334 When exchanging treemanifests, there are 4 logical segments:
3344 When exchanging treemanifests, there are 4 logical segments:
3335 </p>
3345 </p>
3336 <pre>
3346 <pre>
3337 +-------------------------------------------------+
3347 +-------------------------------------------------+
3338 | | | | |
3348 | | | | |
3339 | changeset | root | treemanifests | filelogs |
3349 | changeset | root | treemanifests | filelogs |
3340 | | manifest | | |
3350 | | manifest | | |
3341 | | | | |
3351 | | | | |
3342 +-------------------------------------------------+
3352 +-------------------------------------------------+
3343 </pre>
3353 </pre>
3344 <p>
3354 <p>
3345 The principle building block of each segment is a *chunk*. A *chunk*
3355 The principle building block of each segment is a *chunk*. A *chunk*
3346 is a framed piece of data:
3356 is a framed piece of data:
3347 </p>
3357 </p>
3348 <pre>
3358 <pre>
3349 +---------------------------------------+
3359 +---------------------------------------+
3350 | | |
3360 | | |
3351 | length | data |
3361 | length | data |
3352 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3362 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3353 | | |
3363 | | |
3354 +---------------------------------------+
3364 +---------------------------------------+
3355 </pre>
3365 </pre>
3356 <p>
3366 <p>
3357 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3367 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3358 integer indicating the length of the entire chunk (including the length field
3368 integer indicating the length of the entire chunk (including the length field
3359 itself).
3369 itself).
3360 </p>
3370 </p>
3361 <p>
3371 <p>
3362 There is a special case chunk that has a value of 0 for the length
3372 There is a special case chunk that has a value of 0 for the length
3363 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3373 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3364 </p>
3374 </p>
3365 <h2>Delta Groups</h2>
3375 <h2>Delta Groups</h2>
3366 <p>
3376 <p>
3367 A *delta group* expresses the content of a revlog as a series of deltas,
3377 A *delta group* expresses the content of a revlog as a series of deltas,
3368 or patches against previous revisions.
3378 or patches against previous revisions.
3369 </p>
3379 </p>
3370 <p>
3380 <p>
3371 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3381 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3372 to signal the end of the delta group:
3382 to signal the end of the delta group:
3373 </p>
3383 </p>
3374 <pre>
3384 <pre>
3375 +------------------------------------------------------------------------+
3385 +------------------------------------------------------------------------+
3376 | | | | | |
3386 | | | | | |
3377 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3387 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3378 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3388 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3379 | | | | | |
3389 | | | | | |
3380 +------------------------------------------------------------------------+
3390 +------------------------------------------------------------------------+
3381 </pre>
3391 </pre>
3382 <p>
3392 <p>
3383 Each *chunk*'s data consists of the following:
3393 Each *chunk*'s data consists of the following:
3384 </p>
3394 </p>
3385 <pre>
3395 <pre>
3386 +---------------------------------------+
3396 +---------------------------------------+
3387 | | |
3397 | | |
3388 | delta header | delta data |
3398 | delta header | delta data |
3389 | (various by version) | (various) |
3399 | (various by version) | (various) |
3390 | | |
3400 | | |
3391 +---------------------------------------+
3401 +---------------------------------------+
3392 </pre>
3402 </pre>
3393 <p>
3403 <p>
3394 The *delta data* is a series of *delta*s that describe a diff from an existing
3404 The *delta data* is a series of *delta*s that describe a diff from an existing
3395 entry (either that the recipient already has, or previously specified in the
3405 entry (either that the recipient already has, or previously specified in the
3396 bundle/changegroup).
3406 bundle/changegroup).
3397 </p>
3407 </p>
3398 <p>
3408 <p>
3399 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3409 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3400 &quot;3&quot; of the changegroup format.
3410 &quot;3&quot; of the changegroup format.
3401 </p>
3411 </p>
3402 <p>
3412 <p>
3403 Version 1 (headerlen=80):
3413 Version 1 (headerlen=80):
3404 </p>
3414 </p>
3405 <pre>
3415 <pre>
3406 +------------------------------------------------------+
3416 +------------------------------------------------------+
3407 | | | | |
3417 | | | | |
3408 | node | p1 node | p2 node | link node |
3418 | node | p1 node | p2 node | link node |
3409 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3419 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3410 | | | | |
3420 | | | | |
3411 +------------------------------------------------------+
3421 +------------------------------------------------------+
3412 </pre>
3422 </pre>
3413 <p>
3423 <p>
3414 Version 2 (headerlen=100):
3424 Version 2 (headerlen=100):
3415 </p>
3425 </p>
3416 <pre>
3426 <pre>
3417 +------------------------------------------------------------------+
3427 +------------------------------------------------------------------+
3418 | | | | | |
3428 | | | | | |
3419 | node | p1 node | p2 node | base node | link node |
3429 | node | p1 node | p2 node | base node | link node |
3420 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3430 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3421 | | | | | |
3431 | | | | | |
3422 +------------------------------------------------------------------+
3432 +------------------------------------------------------------------+
3423 </pre>
3433 </pre>
3424 <p>
3434 <p>
3425 Version 3 (headerlen=102):
3435 Version 3 (headerlen=102):
3426 </p>
3436 </p>
3427 <pre>
3437 <pre>
3428 +------------------------------------------------------------------------------+
3438 +------------------------------------------------------------------------------+
3429 | | | | | | |
3439 | | | | | | |
3430 | node | p1 node | p2 node | base node | link node | flags |
3440 | node | p1 node | p2 node | base node | link node | flags |
3431 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3441 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3432 | | | | | | |
3442 | | | | | | |
3433 +------------------------------------------------------------------------------+
3443 +------------------------------------------------------------------------------+
3434 </pre>
3444 </pre>
3435 <p>
3445 <p>
3436 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3446 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3437 series of *delta*s, densely packed (no separators). These deltas describe a diff
3447 series of *delta*s, densely packed (no separators). These deltas describe a diff
3438 from an existing entry (either that the recipient already has, or previously
3448 from an existing entry (either that the recipient already has, or previously
3439 specified in the bundle/changegroup). The format is described more fully in
3449 specified in the bundle/changegroup). The format is described more fully in
3440 &quot;hg help internals.bdiff&quot;, but briefly:
3450 &quot;hg help internals.bdiff&quot;, but briefly:
3441 </p>
3451 </p>
3442 <pre>
3452 <pre>
3443 +---------------------------------------------------------------+
3453 +---------------------------------------------------------------+
3444 | | | | |
3454 | | | | |
3445 | start offset | end offset | new length | content |
3455 | start offset | end offset | new length | content |
3446 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3456 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3447 | | | | |
3457 | | | | |
3448 +---------------------------------------------------------------+
3458 +---------------------------------------------------------------+
3449 </pre>
3459 </pre>
3450 <p>
3460 <p>
3451 Please note that the length field in the delta data does *not* include itself.
3461 Please note that the length field in the delta data does *not* include itself.
3452 </p>
3462 </p>
3453 <p>
3463 <p>
3454 In version 1, the delta is always applied against the previous node from
3464 In version 1, the delta is always applied against the previous node from
3455 the changegroup or the first parent if this is the first entry in the
3465 the changegroup or the first parent if this is the first entry in the
3456 changegroup.
3466 changegroup.
3457 </p>
3467 </p>
3458 <p>
3468 <p>
3459 In version 2 and up, the delta base node is encoded in the entry in the
3469 In version 2 and up, the delta base node is encoded in the entry in the
3460 changegroup. This allows the delta to be expressed against any parent,
3470 changegroup. This allows the delta to be expressed against any parent,
3461 which can result in smaller deltas and more efficient encoding of data.
3471 which can result in smaller deltas and more efficient encoding of data.
3462 </p>
3472 </p>
3463 <h2>Changeset Segment</h2>
3473 <h2>Changeset Segment</h2>
3464 <p>
3474 <p>
3465 The *changeset segment* consists of a single *delta group* holding
3475 The *changeset segment* consists of a single *delta group* holding
3466 changelog data. The *empty chunk* at the end of the *delta group* denotes
3476 changelog data. The *empty chunk* at the end of the *delta group* denotes
3467 the boundary to the *manifest segment*.
3477 the boundary to the *manifest segment*.
3468 </p>
3478 </p>
3469 <h2>Manifest Segment</h2>
3479 <h2>Manifest Segment</h2>
3470 <p>
3480 <p>
3471 The *manifest segment* consists of a single *delta group* holding manifest
3481 The *manifest segment* consists of a single *delta group* holding manifest
3472 data. If treemanifests are in use, it contains only the manifest for the
3482 data. If treemanifests are in use, it contains only the manifest for the
3473 root directory of the repository. Otherwise, it contains the entire
3483 root directory of the repository. Otherwise, it contains the entire
3474 manifest data. The *empty chunk* at the end of the *delta group* denotes
3484 manifest data. The *empty chunk* at the end of the *delta group* denotes
3475 the boundary to the next segment (either the *treemanifests segment* or the
3485 the boundary to the next segment (either the *treemanifests segment* or the
3476 *filelogs segment*, depending on version and the request options).
3486 *filelogs segment*, depending on version and the request options).
3477 </p>
3487 </p>
3478 <h3>Treemanifests Segment</h3>
3488 <h3>Treemanifests Segment</h3>
3479 <p>
3489 <p>
3480 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3490 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3481 only if the 'treemanifest' param is part of the bundle2 changegroup part
3491 only if the 'treemanifest' param is part of the bundle2 changegroup part
3482 (it is not possible to use changegroup version 3 outside of bundle2).
3492 (it is not possible to use changegroup version 3 outside of bundle2).
3483 Aside from the filenames in the *treemanifests segment* containing a
3493 Aside from the filenames in the *treemanifests segment* containing a
3484 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3494 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3485 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3495 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3486 a sub-segment with filename size 0). This denotes the boundary to the
3496 a sub-segment with filename size 0). This denotes the boundary to the
3487 *filelogs segment*.
3497 *filelogs segment*.
3488 </p>
3498 </p>
3489 <h2>Filelogs Segment</h2>
3499 <h2>Filelogs Segment</h2>
3490 <p>
3500 <p>
3491 The *filelogs segment* consists of multiple sub-segments, each
3501 The *filelogs segment* consists of multiple sub-segments, each
3492 corresponding to an individual file whose data is being described:
3502 corresponding to an individual file whose data is being described:
3493 </p>
3503 </p>
3494 <pre>
3504 <pre>
3495 +--------------------------------------------------+
3505 +--------------------------------------------------+
3496 | | | | | |
3506 | | | | | |
3497 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3507 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3498 | | | | | (4 bytes) |
3508 | | | | | (4 bytes) |
3499 | | | | | |
3509 | | | | | |
3500 +--------------------------------------------------+
3510 +--------------------------------------------------+
3501 </pre>
3511 </pre>
3502 <p>
3512 <p>
3503 The final filelog sub-segment is followed by an *empty chunk* (logically,
3513 The final filelog sub-segment is followed by an *empty chunk* (logically,
3504 a sub-segment with filename size 0). This denotes the end of the segment
3514 a sub-segment with filename size 0). This denotes the end of the segment
3505 and of the overall changegroup.
3515 and of the overall changegroup.
3506 </p>
3516 </p>
3507 <p>
3517 <p>
3508 Each filelog sub-segment consists of the following:
3518 Each filelog sub-segment consists of the following:
3509 </p>
3519 </p>
3510 <pre>
3520 <pre>
3511 +------------------------------------------------------+
3521 +------------------------------------------------------+
3512 | | | |
3522 | | | |
3513 | filename length | filename | delta group |
3523 | filename length | filename | delta group |
3514 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3524 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3515 | | | |
3525 | | | |
3516 +------------------------------------------------------+
3526 +------------------------------------------------------+
3517 </pre>
3527 </pre>
3518 <p>
3528 <p>
3519 That is, a *chunk* consisting of the filename (not terminated or padded)
3529 That is, a *chunk* consisting of the filename (not terminated or padded)
3520 followed by N chunks constituting the *delta group* for this file. The
3530 followed by N chunks constituting the *delta group* for this file. The
3521 *empty chunk* at the end of each *delta group* denotes the boundary to the
3531 *empty chunk* at the end of each *delta group* denotes the boundary to the
3522 next filelog sub-segment.
3532 next filelog sub-segment.
3523 </p>
3533 </p>
3524
3534
3525 </div>
3535 </div>
3526 </div>
3536 </div>
3527 </div>
3537 </div>
3528
3538
3529
3539
3530
3540
3531 </body>
3541 </body>
3532 </html>
3542 </html>
3533
3543
3534
3544
3535 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3545 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3536 404 Not Found
3546 404 Not Found
3537
3547
3538 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3548 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3539 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3549 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3540 <head>
3550 <head>
3541 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3551 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3542 <meta name="robots" content="index, nofollow" />
3552 <meta name="robots" content="index, nofollow" />
3543 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3553 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3544 <script type="text/javascript" src="/static/mercurial.js"></script>
3554 <script type="text/javascript" src="/static/mercurial.js"></script>
3545
3555
3546 <title>test: error</title>
3556 <title>test: error</title>
3547 </head>
3557 </head>
3548 <body>
3558 <body>
3549
3559
3550 <div class="container">
3560 <div class="container">
3551 <div class="menu">
3561 <div class="menu">
3552 <div class="logo">
3562 <div class="logo">
3553 <a href="https://mercurial-scm.org/">
3563 <a href="https://mercurial-scm.org/">
3554 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3564 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3555 </div>
3565 </div>
3556 <ul>
3566 <ul>
3557 <li><a href="/shortlog">log</a></li>
3567 <li><a href="/shortlog">log</a></li>
3558 <li><a href="/graph">graph</a></li>
3568 <li><a href="/graph">graph</a></li>
3559 <li><a href="/tags">tags</a></li>
3569 <li><a href="/tags">tags</a></li>
3560 <li><a href="/bookmarks">bookmarks</a></li>
3570 <li><a href="/bookmarks">bookmarks</a></li>
3561 <li><a href="/branches">branches</a></li>
3571 <li><a href="/branches">branches</a></li>
3562 </ul>
3572 </ul>
3563 <ul>
3573 <ul>
3564 <li><a href="/help">help</a></li>
3574 <li><a href="/help">help</a></li>
3565 </ul>
3575 </ul>
3566 </div>
3576 </div>
3567
3577
3568 <div class="main">
3578 <div class="main">
3569
3579
3570 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3580 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3571 <h3>error</h3>
3581 <h3>error</h3>
3572
3582
3573
3583
3574 <form class="search" action="/log">
3584 <form class="search" action="/log">
3575
3585
3576 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3586 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3577 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3587 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3578 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3588 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3579 </form>
3589 </form>
3580
3590
3581 <div class="description">
3591 <div class="description">
3582 <p>
3592 <p>
3583 An error occurred while processing your request:
3593 An error occurred while processing your request:
3584 </p>
3594 </p>
3585 <p>
3595 <p>
3586 Not Found
3596 Not Found
3587 </p>
3597 </p>
3588 </div>
3598 </div>
3589 </div>
3599 </div>
3590 </div>
3600 </div>
3591
3601
3592
3602
3593
3603
3594 </body>
3604 </body>
3595 </html>
3605 </html>
3596
3606
3597 [1]
3607 [1]
3598
3608
3599 $ killdaemons.py
3609 $ killdaemons.py
3600
3610
3601 #endif
3611 #endif
General Comments 0
You need to be logged in to leave comments. Login now