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