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