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