##// END OF EJS Templates
censor: add censor command to hgext with basic client-side tests...
Mike Edgar -
r24347:1bcfecbb default
parent child Browse files
Show More
@@ -0,0 +1,168 b''
1 # Copyright (C) 2015 - Mike Edgar <adgar@google.com>
2 #
3 # This extension enables removal of file content at a given revision,
4 # rewriting the data/metadata of successive revisions to preserve revision log
5 # integrity.
6
7 """erase file content at a given revision
8
9 The censor command instructs Mercurial to erase all content of a file at a given
10 revision *without updating the changeset hash.* This allows existing history to
11 remain valid while preventing future clones/pulls from receiving the erased
12 data.
13
14 Typical uses for censor are due to security or legal requirements, including::
15
16 * Passwords, private keys, crytographic material
17 * Licensed data/code/libraries for which the license has expired
18 * Personally Identifiable Information or other private data
19
20 Censored file revisions are listed in a tracked file called .hgcensored stored
21 in the repository root. The censor command adds an entry to the .hgcensored file
22 in the working directory and commits it (much like ``hg tag`` and .hgtags). The
23 censored file data is then replaced with a pointer to the new commit, enabling
24 verification.
25
26 Censored nodes can interrupt mercurial's typical operation whenever the excised
27 data needs to be materialized. Some commands, like ``hg cat``/``hg revert``,
28 simply fail when asked to produce censored data. Others, like ``hg verify`` and
29 ``hg update``, must be capable of tolerating censored data to continue to
30 function in a meaningful way. Such commands only tolerate censored file
31 revisions if they are allowed by the policy specified by the "censor.allow"
32 config option.
33 """
34
35 from mercurial.node import short
36 from mercurial import cmdutil, error, filelog, revlog, scmutil, util
37 from mercurial.i18n import _
38
39 cmdtable = {}
40 command = cmdutil.command(cmdtable)
41 testedwith = 'internal'
42
43 @command('censor',
44 [('r', 'rev', '', _('censor file from specified revision'), _('REV')),
45 ('t', 'tombstone', '', _('replacement tombstone data'), _('TEXT'))],
46 _('-r REV [-t TEXT] [FILE]'))
47 def censor(ui, repo, path, rev='', tombstone='', **opts):
48 if not path:
49 raise util.Abort(_('must specify file path to censor'))
50 if not rev:
51 raise util.Abort(_('must specify revision to censor'))
52
53 flog = repo.file(path)
54 if not len(flog):
55 raise util.Abort(_('cannot censor file with no history'))
56
57 rev = scmutil.revsingle(repo, rev, rev).rev()
58 try:
59 ctx = repo[rev]
60 except KeyError:
61 raise util.Abort(_('invalid revision identifier %s') % rev)
62
63 try:
64 fctx = ctx.filectx(path)
65 except error.LookupError:
66 raise util.Abort(_('file does not exist at revision %s') % rev)
67
68 fnode = fctx.filenode()
69 headctxs = [repo[c] for c in repo.heads()]
70 heads = [c for c in headctxs if path in c and c.filenode(path) == fnode]
71 if heads:
72 headlist = ', '.join([short(c.node()) for c in heads])
73 raise util.Abort(_('cannot censor file in heads (%s)') % headlist,
74 hint=_('clean/delete and commit first'))
75
76 wctx = repo[None]
77 wp = wctx.parents()
78 if ctx.node() in [p.node() for p in wp]:
79 raise util.Abort(_('cannot censor working directory'),
80 hint=_('clean/delete/update first'))
81
82 flogv = flog.version & 0xFFFF
83 if flogv != revlog.REVLOGNG:
84 raise util.Abort(
85 _('censor does not support revlog version %d') % (flogv,))
86
87 tombstone = filelog.packmeta({"censored": tombstone}, "")
88
89 crev = fctx.filerev()
90
91 if len(tombstone) > flog.rawsize(crev):
92 raise util.Abort(_(
93 'censor tombstone must be no longer than censored data'))
94
95 # Using two files instead of one makes it easy to rewrite entry-by-entry
96 idxread = repo.svfs(flog.indexfile, 'r')
97 idxwrite = repo.svfs(flog.indexfile, 'wb', atomictemp=True)
98 if flog.version & revlog.REVLOGNGINLINEDATA:
99 dataread, datawrite = idxread, idxwrite
100 else:
101 dataread = repo.svfs(flog.datafile, 'r')
102 datawrite = repo.svfs(flog.datafile, 'wb', atomictemp=True)
103
104 # Copy all revlog data up to the entry to be censored.
105 rio = revlog.revlogio()
106 offset = flog.start(crev)
107
108 for chunk in util.filechunkiter(idxread, limit=crev * rio.size):
109 idxwrite.write(chunk)
110 for chunk in util.filechunkiter(dataread, limit=offset):
111 datawrite.write(chunk)
112
113 def rewriteindex(r, newoffs, newdata=None):
114 """Rewrite the index entry with a new data offset and optional new data.
115
116 The newdata argument, if given, is a tuple of three positive integers:
117 (new compressed, new uncompressed, added flag bits).
118 """
119 offlags, comp, uncomp, base, link, p1, p2, nodeid = flog.index[r]
120 flags = revlog.gettype(offlags)
121 if newdata:
122 comp, uncomp, nflags = newdata
123 flags |= nflags
124 offlags = revlog.offset_type(newoffs, flags)
125 e = (offlags, comp, uncomp, r, link, p1, p2, nodeid)
126 idxwrite.write(rio.packentry(e, None, flog.version, r))
127 idxread.seek(rio.size, 1)
128
129 def rewrite(r, offs, data, nflags=revlog.REVIDX_DEFAULT_FLAGS):
130 """Write the given full text to the filelog with the given data offset.
131
132 Returns:
133 The integer number of data bytes written, for tracking data offsets.
134 """
135 flag, compdata = flog.compress(data)
136 newcomp = len(flag) + len(compdata)
137 rewriteindex(r, offs, (newcomp, len(data), nflags))
138 datawrite.write(flag)
139 datawrite.write(compdata)
140 dataread.seek(flog.length(r), 1)
141 return newcomp
142
143 # Rewrite censored revlog entry with (padded) tombstone data.
144 pad = ' ' * (flog.rawsize(crev) - len(tombstone))
145 offset += rewrite(crev, offset, tombstone + pad, revlog.REVIDX_ISCENSORED)
146
147 # Rewrite all following filelog revisions fixing up offsets and deltas.
148 for srev in xrange(crev + 1, len(flog)):
149 if crev in flog.parentrevs(srev):
150 # Immediate children of censored node must be re-added as fulltext.
151 try:
152 revdata = flog.revision(srev)
153 except error.CensoredNodeError, e:
154 revdata = e.tombstone
155 dlen = rewrite(srev, offset, revdata)
156 else:
157 # Copy any other revision data verbatim after fixing up the offset.
158 rewriteindex(srev, offset)
159 dlen = flog.length(srev)
160 for chunk in util.filechunkiter(dataread, limit=dlen):
161 datawrite.write(chunk)
162 offset += dlen
163
164 idxread.close()
165 idxwrite.close()
166 if dataread is not idxread:
167 dataread.close()
168 datawrite.close()
@@ -0,0 +1,315 b''
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
3 > censor=
4 > EOF
5 $ cp $HGRCPATH $HGRCPATH.orig
6
7 Create repo with unimpeachable content
8
9 $ hg init r
10 $ cd r
11 $ echo 'Initially untainted file' > target
12 $ echo 'Normal file here' > bystander
13 $ hg add target bystander
14 $ hg ci -m init
15
16 Clone repo so we can test pull later
17
18 $ cd ..
19 $ hg clone r rpull
20 updating to branch default
21 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 $ cd r
23
24 Introduce content which will ultimately require censorship. Name the first
25 censored node C1, second C2, and so on
26
27 $ echo 'Tainted file' > target
28 $ echo 'Passwords: hunter2' >> target
29 $ hg ci -m taint target
30 $ C1=`hg id --debug -i`
31
32 $ echo 'hunter3' >> target
33 $ echo 'Normal file v2' > bystander
34 $ hg ci -m moretaint target bystander
35 $ C2=`hg id --debug -i`
36
37 Add a new sanitized versions to correct our mistake. Name the first head H1,
38 the second head H2, and so on
39
40 $ echo 'Tainted file is now sanitized' > target
41 $ hg ci -m sanitized target
42 $ H1=`hg id --debug -i`
43
44 $ hg update -r $C2
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ echo 'Tainted file now super sanitized' > target
47 $ hg ci -m 'super sanitized' target
48 created new head
49 $ H2=`hg id --debug -i`
50
51 Verify target contents before censorship at each revision
52
53 $ hg cat -r 3 target
54 Tainted file is now sanitized
55 $ hg cat -r $H2 target
56 Tainted file now super sanitized
57 $ hg cat -r $C2 target
58 Tainted file
59 Passwords: hunter2
60 hunter3
61 $ hg cat -r $C1 target
62 Tainted file
63 Passwords: hunter2
64 $ hg cat -r 0 target
65 Initially untainted file
66
67 Try to censor revision with too large of a tombstone message
68
69 $ hg censor -r $C1 -t 'blah blah blah blah blah blah blah blah bla' target
70 abort: censor tombstone must be no longer than censored data
71 [255]
72
73 Censor revision with 2 offenses
74
75 $ hg censor -r $C2 -t "remove password" target
76 $ hg cat -r 3 target
77 Tainted file is now sanitized
78 $ hg cat -r $H2 target
79 Tainted file now super sanitized
80 $ hg cat -r $C2 target
81 abort: censored node: 1e0247a9a4b7
82 (set censor.policy to ignore errors)
83 [255]
84 $ hg cat -r $C1 target
85 Tainted file
86 Passwords: hunter2
87 $ hg cat -r 0 target
88 Initially untainted file
89
90 Censor revision with 1 offense
91
92 $ hg censor -r $C1 target
93 $ hg cat -r 3 target
94 Tainted file is now sanitized
95 $ hg cat -r $H2 target
96 Tainted file now super sanitized
97 $ hg cat -r $C2 target
98 abort: censored node: 1e0247a9a4b7
99 (set censor.policy to ignore errors)
100 [255]
101 $ hg cat -r $C1 target
102 abort: censored node: 613bc869fceb
103 (set censor.policy to ignore errors)
104 [255]
105 $ hg cat -r 0 target
106 Initially untainted file
107
108 Can only checkout target at uncensored revisions, -X is workaround for --all
109
110 $ hg revert -r $C2 target
111 abort: censored node: 1e0247a9a4b7
112 (set censor.policy to ignore errors)
113 [255]
114 $ hg revert -r $C1 target
115 abort: censored node: 613bc869fceb
116 (set censor.policy to ignore errors)
117 [255]
118 $ hg revert -r $C1 --all
119 reverting bystander
120 reverting target
121 abort: censored node: 613bc869fceb
122 (set censor.policy to ignore errors)
123 [255]
124 $ hg revert -r $C1 --all -X target
125 $ cat target
126 Tainted file now super sanitized
127 $ hg revert -r 0 --all
128 reverting target
129 $ cat target
130 Initially untainted file
131 $ hg revert -r $H2 --all
132 reverting bystander
133 reverting target
134 $ cat target
135 Tainted file now super sanitized
136
137 Uncensored file can be viewed at any revision
138
139 $ hg cat -r 3 bystander
140 Normal file v2
141 $ hg cat -r $C2 bystander
142 Normal file v2
143 $ hg cat -r $C1 bystander
144 Normal file here
145 $ hg cat -r 0 bystander
146 Normal file here
147
148 Can update to children of censored revision
149
150 $ hg update -r 3
151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 $ cat target
153 Tainted file is now sanitized
154 $ hg update -r $H2
155 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
156 $ cat target
157 Tainted file now super sanitized
158
159 Set censor policy to abort in trusted $HGRC so hg verify fails
160
161 $ cp $HGRCPATH.orig $HGRCPATH
162 $ cat >> $HGRCPATH <<EOF
163 > [censor]
164 > policy = abort
165 > EOF
166
167 Repo fails verification due to censorship
168
169 $ hg verify
170 checking changesets
171 checking manifests
172 crosschecking files in changesets and manifests
173 checking files
174 target@1: censored file data
175 target@2: censored file data
176 2 files, 5 changesets, 7 total revisions
177 2 integrity errors encountered!
178 (first damaged changeset appears to be 1)
179 [1]
180
181 Cannot update to revision with censored data
182
183 $ hg update -r $C2
184 abort: censored node: 1e0247a9a4b7
185 (set censor.policy to ignore errors)
186 [255]
187 $ hg update -r $C1
188 abort: censored node: 613bc869fceb
189 (set censor.policy to ignore errors)
190 [255]
191 $ hg update -r 0
192 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
193 $ hg update -r $H2
194 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
195
196 Set censor policy to ignore in trusted $HGRC so hg verify passes
197
198 $ cp $HGRCPATH.orig $HGRCPATH
199 $ cat >> $HGRCPATH <<EOF
200 > [censor]
201 > policy = ignore
202 > EOF
203
204 Repo passes verification with warnings with explicit config
205
206 $ hg verify
207 checking changesets
208 checking manifests
209 crosschecking files in changesets and manifests
210 checking files
211 2 files, 5 changesets, 7 total revisions
212
213 May update to revision with censored data with explicit config
214
215 $ hg update -r $C2
216 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
217 $ cat target
218 $ hg update -r $C1
219 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
220 $ cat target
221 $ hg update -r 0
222 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
223 $ cat target
224 Initially untainted file
225 $ hg update -r $H2
226 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
227 $ cat target
228 Tainted file now super sanitized
229
230 Can merge in revision with censored data. Test requires one branch of history
231 with the file censored, but we can't censor at a head, so advance H1.
232
233 $ hg update -r $H1
234 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
235 $ C3=$H1
236 $ echo 'advanced head H1' > target
237 $ hg ci -m 'advance head H1' target
238 $ H1=`hg id --debug -i`
239 $ hg censor -r $C3 target
240 $ hg update -r $H2
241 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
242 $ hg merge -r $C3
243 merging target
244 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
245 (branch merge, don't forget to commit)
246
247 Revisions present in repository heads may not be censored
248
249 $ hg update -C -r $H2
250 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
251 $ hg censor -r $H2 target
252 abort: cannot censor file in heads (78a8fc215e79)
253 (clean/delete and commit first)
254 [255]
255 $ echo 'twiddling thumbs' > bystander
256 $ hg ci -m 'bystander commit'
257 $ H2=`hg id --debug -i`
258 $ hg censor -r "$H2^" target
259 abort: cannot censor file in heads (efbe78065929)
260 (clean/delete and commit first)
261 [255]
262
263 Cannot censor working directory
264
265 $ echo 'seriously no passwords' > target
266 $ hg ci -m 'extend second head arbitrarily' target
267 $ H2=`hg id --debug -i`
268 $ hg update -r "$H2^"
269 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
270 $ hg censor -r . target
271 abort: cannot censor working directory
272 (clean/delete/update first)
273 [255]
274 $ hg update -r $H2
275 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
276
277 Can re-add file after being deleted + censored
278
279 $ C4=$H2
280 $ hg rm target
281 $ hg ci -m 'delete target so it may be censored'
282 $ H2=`hg id --debug -i`
283 $ hg censor -r $C4 target
284 $ hg cat -r $C4 target
285 $ hg cat -r "$H2^^" target
286 Tainted file now super sanitized
287 $ echo 'fresh start' > target
288 $ hg add target
289 $ hg ci -m reincarnated target
290 $ H2=`hg id --debug -i`
291 $ hg cat -r $H2 target
292 fresh start
293 $ hg cat -r "$H2^" target
294 target: no such file in rev 452ec1762369
295 [1]
296 $ hg cat -r $C4 target
297 $ hg cat -r "$H2^^^" target
298 Tainted file now super sanitized
299
300 Can censor after revlog has expanded to no longer permit inline storage
301
302 $ for x in `seq 0 50000`
303 > do
304 > echo "Password: hunter$x" >> target
305 > done
306 $ hg ci -m 'add 100k passwords'
307 $ H2=`hg id --debug -i`
308 $ C5=$H2
309 $ hg revert -r "$H2^" target
310 $ hg ci -m 'cleaned 100k passwords'
311 $ H2=`hg id --debug -i`
312 $ hg censor -r $C5 target
313 $ hg cat -r $C5 target
314 $ hg cat -r $H2 target
315 fresh start
@@ -1,2240 +1,2241 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 copy or specified revision
75 identify identify the working copy 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 merge-tools Merge Tools
114 merge-tools Merge Tools
115 multirevs Specifying Multiple Revisions
115 multirevs Specifying Multiple Revisions
116 patterns File Name Patterns
116 patterns File Name Patterns
117 phases Working with Phases
117 phases Working with Phases
118 revisions Specifying Single Revisions
118 revisions Specifying Single Revisions
119 revsets Specifying Revision Sets
119 revsets Specifying Revision Sets
120 subrepos Subrepositories
120 subrepos Subrepositories
121 templating Template Usage
121 templating Template Usage
122 urls URL Paths
122 urls URL Paths
123
123
124 (use "hg help -v" to show built-in aliases and global options)
124 (use "hg help -v" to show built-in aliases and global options)
125
125
126 $ hg -q help
126 $ hg -q help
127 add add the specified files on the next commit
127 add add the specified files on the next commit
128 addremove add all new files, delete all missing files
128 addremove add all new files, delete all missing files
129 annotate show changeset information by line for each file
129 annotate show changeset information by line for each file
130 archive create an unversioned archive of a repository revision
130 archive create an unversioned archive of a repository revision
131 backout reverse effect of earlier changeset
131 backout reverse effect of earlier changeset
132 bisect subdivision search of changesets
132 bisect subdivision search of changesets
133 bookmarks create a new bookmark or list existing bookmarks
133 bookmarks create a new bookmark or list existing bookmarks
134 branch set or show the current branch name
134 branch set or show the current branch name
135 branches list repository named branches
135 branches list repository named branches
136 bundle create a changegroup file
136 bundle create a changegroup file
137 cat output the current or given revision of files
137 cat output the current or given revision of files
138 clone make a copy of an existing repository
138 clone make a copy of an existing repository
139 commit commit the specified files or all outstanding changes
139 commit commit the specified files or all outstanding changes
140 config show combined config settings from all hgrc files
140 config show combined config settings from all hgrc files
141 copy mark files as copied for the next commit
141 copy mark files as copied for the next commit
142 diff diff repository (or selected files)
142 diff diff repository (or selected files)
143 export dump the header and diffs for one or more changesets
143 export dump the header and diffs for one or more changesets
144 files list tracked files
144 files list tracked files
145 forget forget the specified files on the next commit
145 forget forget the specified files on the next commit
146 graft copy changes from other branches onto the current branch
146 graft copy changes from other branches onto the current branch
147 grep search for a pattern in specified files and revisions
147 grep search for a pattern in specified files and revisions
148 heads show branch heads
148 heads show branch heads
149 help show help for a given topic or a help overview
149 help show help for a given topic or a help overview
150 identify identify the working copy or specified revision
150 identify identify the working copy or specified revision
151 import import an ordered set of patches
151 import import an ordered set of patches
152 incoming show new changesets found in source
152 incoming show new changesets found in source
153 init create a new repository in the given directory
153 init create a new repository in the given directory
154 log show revision history of entire repository or files
154 log show revision history of entire repository or files
155 manifest output the current or given revision of the project manifest
155 manifest output the current or given revision of the project manifest
156 merge merge another revision into working directory
156 merge merge another revision into working directory
157 outgoing show changesets not found in the destination
157 outgoing show changesets not found in the destination
158 paths show aliases for remote repositories
158 paths show aliases for remote repositories
159 phase set or show the current phase name
159 phase set or show the current phase name
160 pull pull changes from the specified source
160 pull pull changes from the specified source
161 push push changes to the specified destination
161 push push changes to the specified destination
162 recover roll back an interrupted transaction
162 recover roll back an interrupted transaction
163 remove remove the specified files on the next commit
163 remove remove the specified files on the next commit
164 rename rename files; equivalent of copy + remove
164 rename rename files; equivalent of copy + remove
165 resolve redo merges or set/view the merge status of files
165 resolve redo merges or set/view the merge status of files
166 revert restore files to their checkout state
166 revert restore files to their checkout state
167 root print the root (top) of the current working directory
167 root print the root (top) of the current working directory
168 serve start stand-alone webserver
168 serve start stand-alone webserver
169 status show changed files in the working directory
169 status show changed files in the working directory
170 summary summarize working directory state
170 summary summarize working directory state
171 tag add one or more tags for the current or given revision
171 tag add one or more tags for the current or given revision
172 tags list repository tags
172 tags list repository tags
173 unbundle apply one or more changegroup files
173 unbundle apply one or more changegroup files
174 update update working directory (or switch revisions)
174 update update working directory (or switch revisions)
175 verify verify the integrity of the repository
175 verify verify the integrity of the repository
176 version output version and copyright information
176 version output version and copyright information
177
177
178 additional help topics:
178 additional help topics:
179
179
180 config Configuration Files
180 config Configuration Files
181 dates Date Formats
181 dates Date Formats
182 diffs Diff Formats
182 diffs Diff Formats
183 environment Environment Variables
183 environment Environment Variables
184 extensions Using Additional Features
184 extensions Using Additional Features
185 filesets Specifying File Sets
185 filesets Specifying File Sets
186 glossary Glossary
186 glossary Glossary
187 hgignore Syntax for Mercurial Ignore Files
187 hgignore Syntax for Mercurial Ignore Files
188 hgweb Configuring hgweb
188 hgweb Configuring hgweb
189 merge-tools Merge Tools
189 merge-tools Merge Tools
190 multirevs Specifying Multiple Revisions
190 multirevs Specifying Multiple Revisions
191 patterns File Name Patterns
191 patterns File Name Patterns
192 phases Working with Phases
192 phases Working with Phases
193 revisions Specifying Single Revisions
193 revisions Specifying Single Revisions
194 revsets Specifying Revision Sets
194 revsets Specifying Revision Sets
195 subrepos Subrepositories
195 subrepos Subrepositories
196 templating Template Usage
196 templating Template Usage
197 urls URL Paths
197 urls URL Paths
198
198
199 Test extension help:
199 Test extension help:
200 $ hg help extensions --config extensions.rebase= --config extensions.children=
200 $ hg help extensions --config extensions.rebase= --config extensions.children=
201 Using Additional Features
201 Using Additional Features
202 """""""""""""""""""""""""
202 """""""""""""""""""""""""
203
203
204 Mercurial has the ability to add new features through the use of
204 Mercurial has the ability to add new features through the use of
205 extensions. Extensions may add new commands, add options to existing
205 extensions. Extensions may add new commands, add options to existing
206 commands, change the default behavior of commands, or implement hooks.
206 commands, change the default behavior of commands, or implement hooks.
207
207
208 To enable the "foo" extension, either shipped with Mercurial or in the
208 To enable the "foo" extension, either shipped with Mercurial or in the
209 Python search path, create an entry for it in your configuration file,
209 Python search path, create an entry for it in your configuration file,
210 like this:
210 like this:
211
211
212 [extensions]
212 [extensions]
213 foo =
213 foo =
214
214
215 You may also specify the full path to an extension:
215 You may also specify the full path to an extension:
216
216
217 [extensions]
217 [extensions]
218 myfeature = ~/.hgext/myfeature.py
218 myfeature = ~/.hgext/myfeature.py
219
219
220 See "hg help config" for more information on configuration files.
220 See "hg help config" for more information on configuration files.
221
221
222 Extensions are not loaded by default for a variety of reasons: they can
222 Extensions are not loaded by default for a variety of reasons: they can
223 increase startup overhead; they may be meant for advanced usage only; they
223 increase startup overhead; they may be meant for advanced usage only; they
224 may provide potentially dangerous abilities (such as letting you destroy
224 may provide potentially dangerous abilities (such as letting you destroy
225 or modify history); they might not be ready for prime time; or they may
225 or modify history); they might not be ready for prime time; or they may
226 alter some usual behaviors of stock Mercurial. It is thus up to the user
226 alter some usual behaviors of stock Mercurial. It is thus up to the user
227 to activate extensions as needed.
227 to activate extensions as needed.
228
228
229 To explicitly disable an extension enabled in a configuration file of
229 To explicitly disable an extension enabled in a configuration file of
230 broader scope, prepend its path with !:
230 broader scope, prepend its path with !:
231
231
232 [extensions]
232 [extensions]
233 # disabling extension bar residing in /path/to/extension/bar.py
233 # disabling extension bar residing in /path/to/extension/bar.py
234 bar = !/path/to/extension/bar.py
234 bar = !/path/to/extension/bar.py
235 # ditto, but no path was supplied for extension baz
235 # ditto, but no path was supplied for extension baz
236 baz = !
236 baz = !
237
237
238 enabled extensions:
238 enabled extensions:
239
239
240 children command to display child changesets (DEPRECATED)
240 children command to display child changesets (DEPRECATED)
241 rebase command to move sets of revisions to a different ancestor
241 rebase command to move sets of revisions to a different ancestor
242
242
243 disabled extensions:
243 disabled extensions:
244
244
245 acl hooks for controlling repository access
245 acl hooks for controlling repository access
246 blackbox log repository events to a blackbox for debugging
246 blackbox log repository events to a blackbox for debugging
247 bugzilla hooks for integrating with the Bugzilla bug tracker
247 bugzilla hooks for integrating with the Bugzilla bug tracker
248 censor erase file content at a given revision
248 churn command to display statistics about repository history
249 churn command to display statistics about repository history
249 color colorize output from some commands
250 color colorize output from some commands
250 convert import revisions from foreign VCS repositories into
251 convert import revisions from foreign VCS repositories into
251 Mercurial
252 Mercurial
252 eol automatically manage newlines in repository files
253 eol automatically manage newlines in repository files
253 extdiff command to allow external programs to compare revisions
254 extdiff command to allow external programs to compare revisions
254 factotum http authentication with factotum
255 factotum http authentication with factotum
255 gpg commands to sign and verify changesets
256 gpg commands to sign and verify changesets
256 hgcia hooks for integrating with the CIA.vc notification service
257 hgcia hooks for integrating with the CIA.vc notification service
257 hgk browse the repository in a graphical way
258 hgk browse the repository in a graphical way
258 highlight syntax highlighting for hgweb (requires Pygments)
259 highlight syntax highlighting for hgweb (requires Pygments)
259 histedit interactive history editing
260 histedit interactive history editing
260 keyword expand keywords in tracked files
261 keyword expand keywords in tracked files
261 largefiles track large binary files
262 largefiles track large binary files
262 mq manage a stack of patches
263 mq manage a stack of patches
263 notify hooks for sending email push notifications
264 notify hooks for sending email push notifications
264 pager browse command output with an external pager
265 pager browse command output with an external pager
265 patchbomb command to send changesets as (a series of) patch emails
266 patchbomb command to send changesets as (a series of) patch emails
266 progress show progress bars for some actions
267 progress show progress bars for some actions
267 purge command to delete untracked files from the working
268 purge command to delete untracked files from the working
268 directory
269 directory
269 record commands to interactively select changes for
270 record commands to interactively select changes for
270 commit/qrefresh
271 commit/qrefresh
271 relink recreates hardlinks between repository clones
272 relink recreates hardlinks between repository clones
272 schemes extend schemes with shortcuts to repository swarms
273 schemes extend schemes with shortcuts to repository swarms
273 share share a common history between several working directories
274 share share a common history between several working directories
274 shelve save and restore changes to the working directory
275 shelve save and restore changes to the working directory
275 strip strip changesets and their descendants from history
276 strip strip changesets and their descendants from history
276 transplant command to transplant changesets from another branch
277 transplant command to transplant changesets from another branch
277 win32mbcs allow the use of MBCS paths with problematic encodings
278 win32mbcs allow the use of MBCS paths with problematic encodings
278 zeroconf discover and advertise repositories on the local network
279 zeroconf discover and advertise repositories on the local network
279 Test short command list with verbose option
280 Test short command list with verbose option
280
281
281 $ hg -v help shortlist
282 $ hg -v help shortlist
282 Mercurial Distributed SCM
283 Mercurial Distributed SCM
283
284
284 basic commands:
285 basic commands:
285
286
286 add add the specified files on the next commit
287 add add the specified files on the next commit
287 annotate, blame
288 annotate, blame
288 show changeset information by line for each file
289 show changeset information by line for each file
289 clone make a copy of an existing repository
290 clone make a copy of an existing repository
290 commit, ci commit the specified files or all outstanding changes
291 commit, ci commit the specified files or all outstanding changes
291 diff diff repository (or selected files)
292 diff diff repository (or selected files)
292 export dump the header and diffs for one or more changesets
293 export dump the header and diffs for one or more changesets
293 forget forget the specified files on the next commit
294 forget forget the specified files on the next commit
294 init create a new repository in the given directory
295 init create a new repository in the given directory
295 log, history show revision history of entire repository or files
296 log, history show revision history of entire repository or files
296 merge merge another revision into working directory
297 merge merge another revision into working directory
297 pull pull changes from the specified source
298 pull pull changes from the specified source
298 push push changes to the specified destination
299 push push changes to the specified destination
299 remove, rm remove the specified files on the next commit
300 remove, rm remove the specified files on the next commit
300 serve start stand-alone webserver
301 serve start stand-alone webserver
301 status, st show changed files in the working directory
302 status, st show changed files in the working directory
302 summary, sum summarize working directory state
303 summary, sum summarize working directory state
303 update, up, checkout, co
304 update, up, checkout, co
304 update working directory (or switch revisions)
305 update working directory (or switch revisions)
305
306
306 global options ([+] can be repeated):
307 global options ([+] can be repeated):
307
308
308 -R --repository REPO repository root directory or name of overlay bundle
309 -R --repository REPO repository root directory or name of overlay bundle
309 file
310 file
310 --cwd DIR change working directory
311 --cwd DIR change working directory
311 -y --noninteractive do not prompt, automatically pick the first choice for
312 -y --noninteractive do not prompt, automatically pick the first choice for
312 all prompts
313 all prompts
313 -q --quiet suppress output
314 -q --quiet suppress output
314 -v --verbose enable additional output
315 -v --verbose enable additional output
315 --config CONFIG [+] set/override config option (use 'section.name=value')
316 --config CONFIG [+] set/override config option (use 'section.name=value')
316 --debug enable debugging output
317 --debug enable debugging output
317 --debugger start debugger
318 --debugger start debugger
318 --encoding ENCODE set the charset encoding (default: ascii)
319 --encoding ENCODE set the charset encoding (default: ascii)
319 --encodingmode MODE set the charset encoding mode (default: strict)
320 --encodingmode MODE set the charset encoding mode (default: strict)
320 --traceback always print a traceback on exception
321 --traceback always print a traceback on exception
321 --time time how long the command takes
322 --time time how long the command takes
322 --profile print command execution profile
323 --profile print command execution profile
323 --version output version information and exit
324 --version output version information and exit
324 -h --help display help and exit
325 -h --help display help and exit
325 --hidden consider hidden changesets
326 --hidden consider hidden changesets
326
327
327 (use "hg help" for the full list of commands)
328 (use "hg help" for the full list of commands)
328
329
329 $ hg add -h
330 $ hg add -h
330 hg add [OPTION]... [FILE]...
331 hg add [OPTION]... [FILE]...
331
332
332 add the specified files on the next commit
333 add the specified files on the next commit
333
334
334 Schedule files to be version controlled and added to the repository.
335 Schedule files to be version controlled and added to the repository.
335
336
336 The files will be added to the repository at the next commit. To undo an
337 The files will be added to the repository at the next commit. To undo an
337 add before that, see "hg forget".
338 add before that, see "hg forget".
338
339
339 If no names are given, add all files to the repository.
340 If no names are given, add all files to the repository.
340
341
341 Returns 0 if all files are successfully added.
342 Returns 0 if all files are successfully added.
342
343
343 options ([+] can be repeated):
344 options ([+] can be repeated):
344
345
345 -I --include PATTERN [+] include names matching the given patterns
346 -I --include PATTERN [+] include names matching the given patterns
346 -X --exclude PATTERN [+] exclude names matching the given patterns
347 -X --exclude PATTERN [+] exclude names matching the given patterns
347 -S --subrepos recurse into subrepositories
348 -S --subrepos recurse into subrepositories
348 -n --dry-run do not perform actions, just print output
349 -n --dry-run do not perform actions, just print output
349
350
350 (some details hidden, use --verbose to show complete help)
351 (some details hidden, use --verbose to show complete help)
351
352
352 Verbose help for add
353 Verbose help for add
353
354
354 $ hg add -hv
355 $ hg add -hv
355 hg add [OPTION]... [FILE]...
356 hg add [OPTION]... [FILE]...
356
357
357 add the specified files on the next commit
358 add the specified files on the next commit
358
359
359 Schedule files to be version controlled and added to the repository.
360 Schedule files to be version controlled and added to the repository.
360
361
361 The files will be added to the repository at the next commit. To undo an
362 The files will be added to the repository at the next commit. To undo an
362 add before that, see "hg forget".
363 add before that, see "hg forget".
363
364
364 If no names are given, add all files to the repository.
365 If no names are given, add all files to the repository.
365
366
366 An example showing how new (unknown) files are added automatically by "hg
367 An example showing how new (unknown) files are added automatically by "hg
367 add":
368 add":
368
369
369 $ ls
370 $ ls
370 foo.c
371 foo.c
371 $ hg status
372 $ hg status
372 ? foo.c
373 ? foo.c
373 $ hg add
374 $ hg add
374 adding foo.c
375 adding foo.c
375 $ hg status
376 $ hg status
376 A foo.c
377 A foo.c
377
378
378 Returns 0 if all files are successfully added.
379 Returns 0 if all files are successfully added.
379
380
380 options ([+] can be repeated):
381 options ([+] can be repeated):
381
382
382 -I --include PATTERN [+] include names matching the given patterns
383 -I --include PATTERN [+] include names matching the given patterns
383 -X --exclude PATTERN [+] exclude names matching the given patterns
384 -X --exclude PATTERN [+] exclude names matching the given patterns
384 -S --subrepos recurse into subrepositories
385 -S --subrepos recurse into subrepositories
385 -n --dry-run do not perform actions, just print output
386 -n --dry-run do not perform actions, just print output
386
387
387 global options ([+] can be repeated):
388 global options ([+] can be repeated):
388
389
389 -R --repository REPO repository root directory or name of overlay bundle
390 -R --repository REPO repository root directory or name of overlay bundle
390 file
391 file
391 --cwd DIR change working directory
392 --cwd DIR change working directory
392 -y --noninteractive do not prompt, automatically pick the first choice for
393 -y --noninteractive do not prompt, automatically pick the first choice for
393 all prompts
394 all prompts
394 -q --quiet suppress output
395 -q --quiet suppress output
395 -v --verbose enable additional output
396 -v --verbose enable additional output
396 --config CONFIG [+] set/override config option (use 'section.name=value')
397 --config CONFIG [+] set/override config option (use 'section.name=value')
397 --debug enable debugging output
398 --debug enable debugging output
398 --debugger start debugger
399 --debugger start debugger
399 --encoding ENCODE set the charset encoding (default: ascii)
400 --encoding ENCODE set the charset encoding (default: ascii)
400 --encodingmode MODE set the charset encoding mode (default: strict)
401 --encodingmode MODE set the charset encoding mode (default: strict)
401 --traceback always print a traceback on exception
402 --traceback always print a traceback on exception
402 --time time how long the command takes
403 --time time how long the command takes
403 --profile print command execution profile
404 --profile print command execution profile
404 --version output version information and exit
405 --version output version information and exit
405 -h --help display help and exit
406 -h --help display help and exit
406 --hidden consider hidden changesets
407 --hidden consider hidden changesets
407
408
408 Test help option with version option
409 Test help option with version option
409
410
410 $ hg add -h --version
411 $ hg add -h --version
411 Mercurial Distributed SCM (version *) (glob)
412 Mercurial Distributed SCM (version *) (glob)
412 (see http://mercurial.selenic.com for more information)
413 (see http://mercurial.selenic.com for more information)
413
414
414 Copyright (C) 2005-2015 Matt Mackall and others
415 Copyright (C) 2005-2015 Matt Mackall and others
415 This is free software; see the source for copying conditions. There is NO
416 This is free software; see the source for copying conditions. There is NO
416 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
417 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
417
418
418 $ hg add --skjdfks
419 $ hg add --skjdfks
419 hg add: option --skjdfks not recognized
420 hg add: option --skjdfks not recognized
420 hg add [OPTION]... [FILE]...
421 hg add [OPTION]... [FILE]...
421
422
422 add the specified files on the next commit
423 add the specified files on the next commit
423
424
424 options ([+] can be repeated):
425 options ([+] can be repeated):
425
426
426 -I --include PATTERN [+] include names matching the given patterns
427 -I --include PATTERN [+] include names matching the given patterns
427 -X --exclude PATTERN [+] exclude names matching the given patterns
428 -X --exclude PATTERN [+] exclude names matching the given patterns
428 -S --subrepos recurse into subrepositories
429 -S --subrepos recurse into subrepositories
429 -n --dry-run do not perform actions, just print output
430 -n --dry-run do not perform actions, just print output
430
431
431 (use "hg add -h" to show more help)
432 (use "hg add -h" to show more help)
432 [255]
433 [255]
433
434
434 Test ambiguous command help
435 Test ambiguous command help
435
436
436 $ hg help ad
437 $ hg help ad
437 list of commands:
438 list of commands:
438
439
439 add add the specified files on the next commit
440 add add the specified files on the next commit
440 addremove add all new files, delete all missing files
441 addremove add all new files, delete all missing files
441
442
442 (use "hg help -v ad" to show built-in aliases and global options)
443 (use "hg help -v ad" to show built-in aliases and global options)
443
444
444 Test command without options
445 Test command without options
445
446
446 $ hg help verify
447 $ hg help verify
447 hg verify
448 hg verify
448
449
449 verify the integrity of the repository
450 verify the integrity of the repository
450
451
451 Verify the integrity of the current repository.
452 Verify the integrity of the current repository.
452
453
453 This will perform an extensive check of the repository's integrity,
454 This will perform an extensive check of the repository's integrity,
454 validating the hashes and checksums of each entry in the changelog,
455 validating the hashes and checksums of each entry in the changelog,
455 manifest, and tracked files, as well as the integrity of their crosslinks
456 manifest, and tracked files, as well as the integrity of their crosslinks
456 and indices.
457 and indices.
457
458
458 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
459 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
459 information about recovery from corruption of the repository.
460 information about recovery from corruption of the repository.
460
461
461 Returns 0 on success, 1 if errors are encountered.
462 Returns 0 on success, 1 if errors are encountered.
462
463
463 (some details hidden, use --verbose to show complete help)
464 (some details hidden, use --verbose to show complete help)
464
465
465 $ hg help diff
466 $ hg help diff
466 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
467 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
467
468
468 diff repository (or selected files)
469 diff repository (or selected files)
469
470
470 Show differences between revisions for the specified files.
471 Show differences between revisions for the specified files.
471
472
472 Differences between files are shown using the unified diff format.
473 Differences between files are shown using the unified diff format.
473
474
474 Note:
475 Note:
475 diff may generate unexpected results for merges, as it will default to
476 diff may generate unexpected results for merges, as it will default to
476 comparing against the working directory's first parent changeset if no
477 comparing against the working directory's first parent changeset if no
477 revisions are specified.
478 revisions are specified.
478
479
479 When two revision arguments are given, then changes are shown between
480 When two revision arguments are given, then changes are shown between
480 those revisions. If only one revision is specified then that revision is
481 those revisions. If only one revision is specified then that revision is
481 compared to the working directory, and, when no revisions are specified,
482 compared to the working directory, and, when no revisions are specified,
482 the working directory files are compared to its parent.
483 the working directory files are compared to its parent.
483
484
484 Alternatively you can specify -c/--change with a revision to see the
485 Alternatively you can specify -c/--change with a revision to see the
485 changes in that changeset relative to its first parent.
486 changes in that changeset relative to its first parent.
486
487
487 Without the -a/--text option, diff will avoid generating diffs of files it
488 Without the -a/--text option, diff will avoid generating diffs of files it
488 detects as binary. With -a, diff will generate a diff anyway, probably
489 detects as binary. With -a, diff will generate a diff anyway, probably
489 with undesirable results.
490 with undesirable results.
490
491
491 Use the -g/--git option to generate diffs in the git extended diff format.
492 Use the -g/--git option to generate diffs in the git extended diff format.
492 For more information, read "hg help diffs".
493 For more information, read "hg help diffs".
493
494
494 Returns 0 on success.
495 Returns 0 on success.
495
496
496 options ([+] can be repeated):
497 options ([+] can be repeated):
497
498
498 -r --rev REV [+] revision
499 -r --rev REV [+] revision
499 -c --change REV change made by revision
500 -c --change REV change made by revision
500 -a --text treat all files as text
501 -a --text treat all files as text
501 -g --git use git extended diff format
502 -g --git use git extended diff format
502 --nodates omit dates from diff headers
503 --nodates omit dates from diff headers
503 --noprefix omit a/ and b/ prefixes from filenames
504 --noprefix omit a/ and b/ prefixes from filenames
504 -p --show-function show which function each change is in
505 -p --show-function show which function each change is in
505 --reverse produce a diff that undoes the changes
506 --reverse produce a diff that undoes the changes
506 -w --ignore-all-space ignore white space when comparing lines
507 -w --ignore-all-space ignore white space when comparing lines
507 -b --ignore-space-change ignore changes in the amount of white space
508 -b --ignore-space-change ignore changes in the amount of white space
508 -B --ignore-blank-lines ignore changes whose lines are all blank
509 -B --ignore-blank-lines ignore changes whose lines are all blank
509 -U --unified NUM number of lines of context to show
510 -U --unified NUM number of lines of context to show
510 --stat output diffstat-style summary of changes
511 --stat output diffstat-style summary of changes
511 -I --include PATTERN [+] include names matching the given patterns
512 -I --include PATTERN [+] include names matching the given patterns
512 -X --exclude PATTERN [+] exclude names matching the given patterns
513 -X --exclude PATTERN [+] exclude names matching the given patterns
513 -S --subrepos recurse into subrepositories
514 -S --subrepos recurse into subrepositories
514
515
515 (some details hidden, use --verbose to show complete help)
516 (some details hidden, use --verbose to show complete help)
516
517
517 $ hg help status
518 $ hg help status
518 hg status [OPTION]... [FILE]...
519 hg status [OPTION]... [FILE]...
519
520
520 aliases: st
521 aliases: st
521
522
522 show changed files in the working directory
523 show changed files in the working directory
523
524
524 Show status of files in the repository. If names are given, only files
525 Show status of files in the repository. If names are given, only files
525 that match are shown. Files that are clean or ignored or the source of a
526 that match are shown. Files that are clean or ignored or the source of a
526 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
527 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
527 -C/--copies or -A/--all are given. Unless options described with "show
528 -C/--copies or -A/--all are given. Unless options described with "show
528 only ..." are given, the options -mardu are used.
529 only ..." are given, the options -mardu are used.
529
530
530 Option -q/--quiet hides untracked (unknown and ignored) files unless
531 Option -q/--quiet hides untracked (unknown and ignored) files unless
531 explicitly requested with -u/--unknown or -i/--ignored.
532 explicitly requested with -u/--unknown or -i/--ignored.
532
533
533 Note:
534 Note:
534 status may appear to disagree with diff if permissions have changed or
535 status may appear to disagree with diff if permissions have changed or
535 a merge has occurred. The standard diff format does not report
536 a merge has occurred. The standard diff format does not report
536 permission changes and diff only reports changes relative to one merge
537 permission changes and diff only reports changes relative to one merge
537 parent.
538 parent.
538
539
539 If one revision is given, it is used as the base revision. If two
540 If one revision is given, it is used as the base revision. If two
540 revisions are given, the differences between them are shown. The --change
541 revisions are given, the differences between them are shown. The --change
541 option can also be used as a shortcut to list the changed files of a
542 option can also be used as a shortcut to list the changed files of a
542 revision from its first parent.
543 revision from its first parent.
543
544
544 The codes used to show the status of files are:
545 The codes used to show the status of files are:
545
546
546 M = modified
547 M = modified
547 A = added
548 A = added
548 R = removed
549 R = removed
549 C = clean
550 C = clean
550 ! = missing (deleted by non-hg command, but still tracked)
551 ! = missing (deleted by non-hg command, but still tracked)
551 ? = not tracked
552 ? = not tracked
552 I = ignored
553 I = ignored
553 = origin of the previous file (with --copies)
554 = origin of the previous file (with --copies)
554
555
555 Returns 0 on success.
556 Returns 0 on success.
556
557
557 options ([+] can be repeated):
558 options ([+] can be repeated):
558
559
559 -A --all show status of all files
560 -A --all show status of all files
560 -m --modified show only modified files
561 -m --modified show only modified files
561 -a --added show only added files
562 -a --added show only added files
562 -r --removed show only removed files
563 -r --removed show only removed files
563 -d --deleted show only deleted (but tracked) files
564 -d --deleted show only deleted (but tracked) files
564 -c --clean show only files without changes
565 -c --clean show only files without changes
565 -u --unknown show only unknown (not tracked) files
566 -u --unknown show only unknown (not tracked) files
566 -i --ignored show only ignored files
567 -i --ignored show only ignored files
567 -n --no-status hide status prefix
568 -n --no-status hide status prefix
568 -C --copies show source of copied files
569 -C --copies show source of copied files
569 -0 --print0 end filenames with NUL, for use with xargs
570 -0 --print0 end filenames with NUL, for use with xargs
570 --rev REV [+] show difference from revision
571 --rev REV [+] show difference from revision
571 --change REV list the changed files of a revision
572 --change REV list the changed files of a revision
572 -I --include PATTERN [+] include names matching the given patterns
573 -I --include PATTERN [+] include names matching the given patterns
573 -X --exclude PATTERN [+] exclude names matching the given patterns
574 -X --exclude PATTERN [+] exclude names matching the given patterns
574 -S --subrepos recurse into subrepositories
575 -S --subrepos recurse into subrepositories
575
576
576 (some details hidden, use --verbose to show complete help)
577 (some details hidden, use --verbose to show complete help)
577
578
578 $ hg -q help status
579 $ hg -q help status
579 hg status [OPTION]... [FILE]...
580 hg status [OPTION]... [FILE]...
580
581
581 show changed files in the working directory
582 show changed files in the working directory
582
583
583 $ hg help foo
584 $ hg help foo
584 abort: no such help topic: foo
585 abort: no such help topic: foo
585 (try "hg help --keyword foo")
586 (try "hg help --keyword foo")
586 [255]
587 [255]
587
588
588 $ hg skjdfks
589 $ hg skjdfks
589 hg: unknown command 'skjdfks'
590 hg: unknown command 'skjdfks'
590 Mercurial Distributed SCM
591 Mercurial Distributed SCM
591
592
592 basic commands:
593 basic commands:
593
594
594 add add the specified files on the next commit
595 add add the specified files on the next commit
595 annotate show changeset information by line for each file
596 annotate show changeset information by line for each file
596 clone make a copy of an existing repository
597 clone make a copy of an existing repository
597 commit commit the specified files or all outstanding changes
598 commit commit the specified files or all outstanding changes
598 diff diff repository (or selected files)
599 diff diff repository (or selected files)
599 export dump the header and diffs for one or more changesets
600 export dump the header and diffs for one or more changesets
600 forget forget the specified files on the next commit
601 forget forget the specified files on the next commit
601 init create a new repository in the given directory
602 init create a new repository in the given directory
602 log show revision history of entire repository or files
603 log show revision history of entire repository or files
603 merge merge another revision into working directory
604 merge merge another revision into working directory
604 pull pull changes from the specified source
605 pull pull changes from the specified source
605 push push changes to the specified destination
606 push push changes to the specified destination
606 remove remove the specified files on the next commit
607 remove remove the specified files on the next commit
607 serve start stand-alone webserver
608 serve start stand-alone webserver
608 status show changed files in the working directory
609 status show changed files in the working directory
609 summary summarize working directory state
610 summary summarize working directory state
610 update update working directory (or switch revisions)
611 update update working directory (or switch revisions)
611
612
612 (use "hg help" for the full list of commands or "hg -v" for details)
613 (use "hg help" for the full list of commands or "hg -v" for details)
613 [255]
614 [255]
614
615
615
616
616 $ cat > helpext.py <<EOF
617 $ cat > helpext.py <<EOF
617 > import os
618 > import os
618 > from mercurial import cmdutil, commands
619 > from mercurial import cmdutil, commands
619 >
620 >
620 > cmdtable = {}
621 > cmdtable = {}
621 > command = cmdutil.command(cmdtable)
622 > command = cmdutil.command(cmdtable)
622 >
623 >
623 > @command('nohelp',
624 > @command('nohelp',
624 > [('', 'longdesc', 3, 'x'*90),
625 > [('', 'longdesc', 3, 'x'*90),
625 > ('n', '', None, 'normal desc'),
626 > ('n', '', None, 'normal desc'),
626 > ('', 'newline', '', 'line1\nline2')],
627 > ('', 'newline', '', 'line1\nline2')],
627 > 'hg nohelp',
628 > 'hg nohelp',
628 > norepo=True)
629 > norepo=True)
629 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
630 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
630 > def nohelp(ui, *args, **kwargs):
631 > def nohelp(ui, *args, **kwargs):
631 > pass
632 > pass
632 >
633 >
633 > EOF
634 > EOF
634 $ echo '[extensions]' >> $HGRCPATH
635 $ echo '[extensions]' >> $HGRCPATH
635 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
636 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
636
637
637 Test command with no help text
638 Test command with no help text
638
639
639 $ hg help nohelp
640 $ hg help nohelp
640 hg nohelp
641 hg nohelp
641
642
642 (no help text available)
643 (no help text available)
643
644
644 options:
645 options:
645
646
646 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
647 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
647 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
648 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
648 -n -- normal desc
649 -n -- normal desc
649 --newline VALUE line1 line2
650 --newline VALUE line1 line2
650
651
651 (some details hidden, use --verbose to show complete help)
652 (some details hidden, use --verbose to show complete help)
652
653
653 $ hg help -k nohelp
654 $ hg help -k nohelp
654 Commands:
655 Commands:
655
656
656 nohelp hg nohelp
657 nohelp hg nohelp
657
658
658 Extension Commands:
659 Extension Commands:
659
660
660 nohelp (no help text available)
661 nohelp (no help text available)
661
662
662 Test that default list of commands omits extension commands
663 Test that default list of commands omits extension commands
663
664
664 $ hg help
665 $ hg help
665 Mercurial Distributed SCM
666 Mercurial Distributed SCM
666
667
667 list of commands:
668 list of commands:
668
669
669 add add the specified files on the next commit
670 add add the specified files on the next commit
670 addremove add all new files, delete all missing files
671 addremove add all new files, delete all missing files
671 annotate show changeset information by line for each file
672 annotate show changeset information by line for each file
672 archive create an unversioned archive of a repository revision
673 archive create an unversioned archive of a repository revision
673 backout reverse effect of earlier changeset
674 backout reverse effect of earlier changeset
674 bisect subdivision search of changesets
675 bisect subdivision search of changesets
675 bookmarks create a new bookmark or list existing bookmarks
676 bookmarks create a new bookmark or list existing bookmarks
676 branch set or show the current branch name
677 branch set or show the current branch name
677 branches list repository named branches
678 branches list repository named branches
678 bundle create a changegroup file
679 bundle create a changegroup file
679 cat output the current or given revision of files
680 cat output the current or given revision of files
680 clone make a copy of an existing repository
681 clone make a copy of an existing repository
681 commit commit the specified files or all outstanding changes
682 commit commit the specified files or all outstanding changes
682 config show combined config settings from all hgrc files
683 config show combined config settings from all hgrc files
683 copy mark files as copied for the next commit
684 copy mark files as copied for the next commit
684 diff diff repository (or selected files)
685 diff diff repository (or selected files)
685 export dump the header and diffs for one or more changesets
686 export dump the header and diffs for one or more changesets
686 files list tracked files
687 files list tracked files
687 forget forget the specified files on the next commit
688 forget forget the specified files on the next commit
688 graft copy changes from other branches onto the current branch
689 graft copy changes from other branches onto the current branch
689 grep search for a pattern in specified files and revisions
690 grep search for a pattern in specified files and revisions
690 heads show branch heads
691 heads show branch heads
691 help show help for a given topic or a help overview
692 help show help for a given topic or a help overview
692 identify identify the working copy or specified revision
693 identify identify the working copy or specified revision
693 import import an ordered set of patches
694 import import an ordered set of patches
694 incoming show new changesets found in source
695 incoming show new changesets found in source
695 init create a new repository in the given directory
696 init create a new repository in the given directory
696 log show revision history of entire repository or files
697 log show revision history of entire repository or files
697 manifest output the current or given revision of the project manifest
698 manifest output the current or given revision of the project manifest
698 merge merge another revision into working directory
699 merge merge another revision into working directory
699 outgoing show changesets not found in the destination
700 outgoing show changesets not found in the destination
700 paths show aliases for remote repositories
701 paths show aliases for remote repositories
701 phase set or show the current phase name
702 phase set or show the current phase name
702 pull pull changes from the specified source
703 pull pull changes from the specified source
703 push push changes to the specified destination
704 push push changes to the specified destination
704 recover roll back an interrupted transaction
705 recover roll back an interrupted transaction
705 remove remove the specified files on the next commit
706 remove remove the specified files on the next commit
706 rename rename files; equivalent of copy + remove
707 rename rename files; equivalent of copy + remove
707 resolve redo merges or set/view the merge status of files
708 resolve redo merges or set/view the merge status of files
708 revert restore files to their checkout state
709 revert restore files to their checkout state
709 root print the root (top) of the current working directory
710 root print the root (top) of the current working directory
710 serve start stand-alone webserver
711 serve start stand-alone webserver
711 status show changed files in the working directory
712 status show changed files in the working directory
712 summary summarize working directory state
713 summary summarize working directory state
713 tag add one or more tags for the current or given revision
714 tag add one or more tags for the current or given revision
714 tags list repository tags
715 tags list repository tags
715 unbundle apply one or more changegroup files
716 unbundle apply one or more changegroup files
716 update update working directory (or switch revisions)
717 update update working directory (or switch revisions)
717 verify verify the integrity of the repository
718 verify verify the integrity of the repository
718 version output version and copyright information
719 version output version and copyright information
719
720
720 enabled extensions:
721 enabled extensions:
721
722
722 helpext (no help text available)
723 helpext (no help text available)
723
724
724 additional help topics:
725 additional help topics:
725
726
726 config Configuration Files
727 config Configuration Files
727 dates Date Formats
728 dates Date Formats
728 diffs Diff Formats
729 diffs Diff Formats
729 environment Environment Variables
730 environment Environment Variables
730 extensions Using Additional Features
731 extensions Using Additional Features
731 filesets Specifying File Sets
732 filesets Specifying File Sets
732 glossary Glossary
733 glossary Glossary
733 hgignore Syntax for Mercurial Ignore Files
734 hgignore Syntax for Mercurial Ignore Files
734 hgweb Configuring hgweb
735 hgweb Configuring hgweb
735 merge-tools Merge Tools
736 merge-tools Merge Tools
736 multirevs Specifying Multiple Revisions
737 multirevs Specifying Multiple Revisions
737 patterns File Name Patterns
738 patterns File Name Patterns
738 phases Working with Phases
739 phases Working with Phases
739 revisions Specifying Single Revisions
740 revisions Specifying Single Revisions
740 revsets Specifying Revision Sets
741 revsets Specifying Revision Sets
741 subrepos Subrepositories
742 subrepos Subrepositories
742 templating Template Usage
743 templating Template Usage
743 urls URL Paths
744 urls URL Paths
744
745
745 (use "hg help -v" to show built-in aliases and global options)
746 (use "hg help -v" to show built-in aliases and global options)
746
747
747
748
748 Test list of internal help commands
749 Test list of internal help commands
749
750
750 $ hg help debug
751 $ hg help debug
751 debug commands (internal and unsupported):
752 debug commands (internal and unsupported):
752
753
753 debugancestor
754 debugancestor
754 find the ancestor revision of two revisions in a given index
755 find the ancestor revision of two revisions in a given index
755 debugbuilddag
756 debugbuilddag
756 builds a repo with a given DAG from scratch in the current
757 builds a repo with a given DAG from scratch in the current
757 empty repo
758 empty repo
758 debugbundle lists the contents of a bundle
759 debugbundle lists the contents of a bundle
759 debugcheckstate
760 debugcheckstate
760 validate the correctness of the current dirstate
761 validate the correctness of the current dirstate
761 debugcommands
762 debugcommands
762 list all available commands and options
763 list all available commands and options
763 debugcomplete
764 debugcomplete
764 returns the completion list associated with the given command
765 returns the completion list associated with the given command
765 debugdag format the changelog or an index DAG as a concise textual
766 debugdag format the changelog or an index DAG as a concise textual
766 description
767 description
767 debugdata dump the contents of a data file revision
768 debugdata dump the contents of a data file revision
768 debugdate parse and display a date
769 debugdate parse and display a date
769 debugdirstate
770 debugdirstate
770 show the contents of the current dirstate
771 show the contents of the current dirstate
771 debugdiscovery
772 debugdiscovery
772 runs the changeset discovery protocol in isolation
773 runs the changeset discovery protocol in isolation
773 debugfileset parse and apply a fileset specification
774 debugfileset parse and apply a fileset specification
774 debugfsinfo show information detected about current filesystem
775 debugfsinfo show information detected about current filesystem
775 debuggetbundle
776 debuggetbundle
776 retrieves a bundle from a repo
777 retrieves a bundle from a repo
777 debugignore display the combined ignore pattern
778 debugignore display the combined ignore pattern
778 debugindex dump the contents of an index file
779 debugindex dump the contents of an index file
779 debugindexdot
780 debugindexdot
780 dump an index DAG as a graphviz dot file
781 dump an index DAG as a graphviz dot file
781 debuginstall test Mercurial installation
782 debuginstall test Mercurial installation
782 debugknown test whether node ids are known to a repo
783 debugknown test whether node ids are known to a repo
783 debuglocks show or modify state of locks
784 debuglocks show or modify state of locks
784 debugnamecomplete
785 debugnamecomplete
785 complete "names" - tags, open branch names, bookmark names
786 complete "names" - tags, open branch names, bookmark names
786 debugobsolete
787 debugobsolete
787 create arbitrary obsolete marker
788 create arbitrary obsolete marker
788 debugoptDEP (no help text available)
789 debugoptDEP (no help text available)
789 debugpathcomplete
790 debugpathcomplete
790 complete part or all of a tracked path
791 complete part or all of a tracked path
791 debugpushkey access the pushkey key/value protocol
792 debugpushkey access the pushkey key/value protocol
792 debugpvec (no help text available)
793 debugpvec (no help text available)
793 debugrebuilddirstate
794 debugrebuilddirstate
794 rebuild the dirstate as it would look like for the given
795 rebuild the dirstate as it would look like for the given
795 revision
796 revision
796 debugrename dump rename information
797 debugrename dump rename information
797 debugrevlog show data and statistics about a revlog
798 debugrevlog show data and statistics about a revlog
798 debugrevspec parse and apply a revision specification
799 debugrevspec parse and apply a revision specification
799 debugsetparents
800 debugsetparents
800 manually set the parents of the current working directory
801 manually set the parents of the current working directory
801 debugsub (no help text available)
802 debugsub (no help text available)
802 debugsuccessorssets
803 debugsuccessorssets
803 show set of successors for revision
804 show set of successors for revision
804 debugwalk show how files match on given patterns
805 debugwalk show how files match on given patterns
805 debugwireargs
806 debugwireargs
806 (no help text available)
807 (no help text available)
807
808
808 (use "hg help -v debug" to show built-in aliases and global options)
809 (use "hg help -v debug" to show built-in aliases and global options)
809
810
810
811
811 Test list of commands with command with no help text
812 Test list of commands with command with no help text
812
813
813 $ hg help helpext
814 $ hg help helpext
814 helpext extension - no help text available
815 helpext extension - no help text available
815
816
816 list of commands:
817 list of commands:
817
818
818 nohelp (no help text available)
819 nohelp (no help text available)
819
820
820 (use "hg help -v helpext" to show built-in aliases and global options)
821 (use "hg help -v helpext" to show built-in aliases and global options)
821
822
822
823
823 test deprecated option is hidden in command help
824 test deprecated option is hidden in command help
824 $ hg help debugoptDEP
825 $ hg help debugoptDEP
825 hg debugoptDEP
826 hg debugoptDEP
826
827
827 (no help text available)
828 (no help text available)
828
829
829 options:
830 options:
830
831
831 (some details hidden, use --verbose to show complete help)
832 (some details hidden, use --verbose to show complete help)
832
833
833 test deprecated option is shown with -v
834 test deprecated option is shown with -v
834 $ hg help -v debugoptDEP | grep dopt
835 $ hg help -v debugoptDEP | grep dopt
835 --dopt option is DEPRECATED
836 --dopt option is DEPRECATED
836
837
837 #if gettext
838 #if gettext
838 test deprecated option is hidden with translation with untranslated description
839 test deprecated option is hidden with translation with untranslated description
839 (use many globy for not failing on changed transaction)
840 (use many globy for not failing on changed transaction)
840 $ LANGUAGE=sv hg help debugoptDEP
841 $ LANGUAGE=sv hg help debugoptDEP
841 hg debugoptDEP
842 hg debugoptDEP
842
843
843 (*) (glob)
844 (*) (glob)
844
845
845 options:
846 options:
846
847
847 (some details hidden, use --verbose to show complete help)
848 (some details hidden, use --verbose to show complete help)
848 #endif
849 #endif
849
850
850 Test commands that collide with topics (issue4240)
851 Test commands that collide with topics (issue4240)
851
852
852 $ hg config -hq
853 $ hg config -hq
853 hg config [-u] [NAME]...
854 hg config [-u] [NAME]...
854
855
855 show combined config settings from all hgrc files
856 show combined config settings from all hgrc files
856 $ hg showconfig -hq
857 $ hg showconfig -hq
857 hg config [-u] [NAME]...
858 hg config [-u] [NAME]...
858
859
859 show combined config settings from all hgrc files
860 show combined config settings from all hgrc files
860
861
861 Test a help topic
862 Test a help topic
862
863
863 $ hg help revs
864 $ hg help revs
864 Specifying Single Revisions
865 Specifying Single Revisions
865 """""""""""""""""""""""""""
866 """""""""""""""""""""""""""
866
867
867 Mercurial supports several ways to specify individual revisions.
868 Mercurial supports several ways to specify individual revisions.
868
869
869 A plain integer is treated as a revision number. Negative integers are
870 A plain integer is treated as a revision number. Negative integers are
870 treated as sequential offsets from the tip, with -1 denoting the tip, -2
871 treated as sequential offsets from the tip, with -1 denoting the tip, -2
871 denoting the revision prior to the tip, and so forth.
872 denoting the revision prior to the tip, and so forth.
872
873
873 A 40-digit hexadecimal string is treated as a unique revision identifier.
874 A 40-digit hexadecimal string is treated as a unique revision identifier.
874
875
875 A hexadecimal string less than 40 characters long is treated as a unique
876 A hexadecimal string less than 40 characters long is treated as a unique
876 revision identifier and is referred to as a short-form identifier. A
877 revision identifier and is referred to as a short-form identifier. A
877 short-form identifier is only valid if it is the prefix of exactly one
878 short-form identifier is only valid if it is the prefix of exactly one
878 full-length identifier.
879 full-length identifier.
879
880
880 Any other string is treated as a bookmark, tag, or branch name. A bookmark
881 Any other string is treated as a bookmark, tag, or branch name. A bookmark
881 is a movable pointer to a revision. A tag is a permanent name associated
882 is a movable pointer to a revision. A tag is a permanent name associated
882 with a revision. A branch name denotes the tipmost open branch head of
883 with a revision. A branch name denotes the tipmost open branch head of
883 that branch - or if they are all closed, the tipmost closed head of the
884 that branch - or if they are all closed, the tipmost closed head of the
884 branch. Bookmark, tag, and branch names must not contain the ":"
885 branch. Bookmark, tag, and branch names must not contain the ":"
885 character.
886 character.
886
887
887 The reserved name "tip" always identifies the most recent revision.
888 The reserved name "tip" always identifies the most recent revision.
888
889
889 The reserved name "null" indicates the null revision. This is the revision
890 The reserved name "null" indicates the null revision. This is the revision
890 of an empty repository, and the parent of revision 0.
891 of an empty repository, and the parent of revision 0.
891
892
892 The reserved name "." indicates the working directory parent. If no
893 The reserved name "." indicates the working directory parent. If no
893 working directory is checked out, it is equivalent to null. If an
894 working directory is checked out, it is equivalent to null. If an
894 uncommitted merge is in progress, "." is the revision of the first parent.
895 uncommitted merge is in progress, "." is the revision of the first parent.
895
896
896 Test templating help
897 Test templating help
897
898
898 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
899 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
899 desc String. The text of the changeset description.
900 desc String. The text of the changeset description.
900 diffstat String. Statistics of changes with the following format:
901 diffstat String. Statistics of changes with the following format:
901 firstline Any text. Returns the first line of text.
902 firstline Any text. Returns the first line of text.
902 nonempty Any text. Returns '(none)' if the string is empty.
903 nonempty Any text. Returns '(none)' if the string is empty.
903
904
904 Test help hooks
905 Test help hooks
905
906
906 $ cat > helphook1.py <<EOF
907 $ cat > helphook1.py <<EOF
907 > from mercurial import help
908 > from mercurial import help
908 >
909 >
909 > def rewrite(topic, doc):
910 > def rewrite(topic, doc):
910 > return doc + '\nhelphook1\n'
911 > return doc + '\nhelphook1\n'
911 >
912 >
912 > def extsetup(ui):
913 > def extsetup(ui):
913 > help.addtopichook('revsets', rewrite)
914 > help.addtopichook('revsets', rewrite)
914 > EOF
915 > EOF
915 $ cat > helphook2.py <<EOF
916 $ cat > helphook2.py <<EOF
916 > from mercurial import help
917 > from mercurial import help
917 >
918 >
918 > def rewrite(topic, doc):
919 > def rewrite(topic, doc):
919 > return doc + '\nhelphook2\n'
920 > return doc + '\nhelphook2\n'
920 >
921 >
921 > def extsetup(ui):
922 > def extsetup(ui):
922 > help.addtopichook('revsets', rewrite)
923 > help.addtopichook('revsets', rewrite)
923 > EOF
924 > EOF
924 $ echo '[extensions]' >> $HGRCPATH
925 $ echo '[extensions]' >> $HGRCPATH
925 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
926 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
926 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
927 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
927 $ hg help revsets | grep helphook
928 $ hg help revsets | grep helphook
928 helphook1
929 helphook1
929 helphook2
930 helphook2
930
931
931 Test keyword search help
932 Test keyword search help
932
933
933 $ cat > prefixedname.py <<EOF
934 $ cat > prefixedname.py <<EOF
934 > '''matched against word "clone"
935 > '''matched against word "clone"
935 > '''
936 > '''
936 > EOF
937 > EOF
937 $ echo '[extensions]' >> $HGRCPATH
938 $ echo '[extensions]' >> $HGRCPATH
938 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
939 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
939 $ hg help -k clone
940 $ hg help -k clone
940 Topics:
941 Topics:
941
942
942 config Configuration Files
943 config Configuration Files
943 extensions Using Additional Features
944 extensions Using Additional Features
944 glossary Glossary
945 glossary Glossary
945 phases Working with Phases
946 phases Working with Phases
946 subrepos Subrepositories
947 subrepos Subrepositories
947 urls URL Paths
948 urls URL Paths
948
949
949 Commands:
950 Commands:
950
951
951 bookmarks create a new bookmark or list existing bookmarks
952 bookmarks create a new bookmark or list existing bookmarks
952 clone make a copy of an existing repository
953 clone make a copy of an existing repository
953 paths show aliases for remote repositories
954 paths show aliases for remote repositories
954 update update working directory (or switch revisions)
955 update update working directory (or switch revisions)
955
956
956 Extensions:
957 Extensions:
957
958
958 prefixedname matched against word "clone"
959 prefixedname matched against word "clone"
959 relink recreates hardlinks between repository clones
960 relink recreates hardlinks between repository clones
960
961
961 Extension Commands:
962 Extension Commands:
962
963
963 qclone clone main and patch repository at same time
964 qclone clone main and patch repository at same time
964
965
965 Test unfound topic
966 Test unfound topic
966
967
967 $ hg help nonexistingtopicthatwillneverexisteverever
968 $ hg help nonexistingtopicthatwillneverexisteverever
968 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
969 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
969 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
970 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
970 [255]
971 [255]
971
972
972 Test unfound keyword
973 Test unfound keyword
973
974
974 $ hg help --keyword nonexistingwordthatwillneverexisteverever
975 $ hg help --keyword nonexistingwordthatwillneverexisteverever
975 abort: no matches
976 abort: no matches
976 (try "hg help" for a list of topics)
977 (try "hg help" for a list of topics)
977 [255]
978 [255]
978
979
979 Test omit indicating for help
980 Test omit indicating for help
980
981
981 $ cat > addverboseitems.py <<EOF
982 $ cat > addverboseitems.py <<EOF
982 > '''extension to test omit indicating.
983 > '''extension to test omit indicating.
983 >
984 >
984 > This paragraph is never omitted (for extension)
985 > This paragraph is never omitted (for extension)
985 >
986 >
986 > .. container:: verbose
987 > .. container:: verbose
987 >
988 >
988 > This paragraph is omitted,
989 > This paragraph is omitted,
989 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
990 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
990 >
991 >
991 > This paragraph is never omitted, too (for extension)
992 > This paragraph is never omitted, too (for extension)
992 > '''
993 > '''
993 >
994 >
994 > from mercurial import help, commands
995 > from mercurial import help, commands
995 > testtopic = """This paragraph is never omitted (for topic).
996 > testtopic = """This paragraph is never omitted (for topic).
996 >
997 >
997 > .. container:: verbose
998 > .. container:: verbose
998 >
999 >
999 > This paragraph is omitted,
1000 > This paragraph is omitted,
1000 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1001 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1001 >
1002 >
1002 > This paragraph is never omitted, too (for topic)
1003 > This paragraph is never omitted, too (for topic)
1003 > """
1004 > """
1004 > def extsetup(ui):
1005 > def extsetup(ui):
1005 > help.helptable.append((["topic-containing-verbose"],
1006 > help.helptable.append((["topic-containing-verbose"],
1006 > "This is the topic to test omit indicating.",
1007 > "This is the topic to test omit indicating.",
1007 > lambda : testtopic))
1008 > lambda : testtopic))
1008 > EOF
1009 > EOF
1009 $ echo '[extensions]' >> $HGRCPATH
1010 $ echo '[extensions]' >> $HGRCPATH
1010 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1011 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1011 $ hg help addverboseitems
1012 $ hg help addverboseitems
1012 addverboseitems extension - extension to test omit indicating.
1013 addverboseitems extension - extension to test omit indicating.
1013
1014
1014 This paragraph is never omitted (for extension)
1015 This paragraph is never omitted (for extension)
1015
1016
1016 This paragraph is never omitted, too (for extension)
1017 This paragraph is never omitted, too (for extension)
1017
1018
1018 (some details hidden, use --verbose to show complete help)
1019 (some details hidden, use --verbose to show complete help)
1019
1020
1020 no commands defined
1021 no commands defined
1021 $ hg help -v addverboseitems
1022 $ hg help -v addverboseitems
1022 addverboseitems extension - extension to test omit indicating.
1023 addverboseitems extension - extension to test omit indicating.
1023
1024
1024 This paragraph is never omitted (for extension)
1025 This paragraph is never omitted (for extension)
1025
1026
1026 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1027 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1027 extension)
1028 extension)
1028
1029
1029 This paragraph is never omitted, too (for extension)
1030 This paragraph is never omitted, too (for extension)
1030
1031
1031 no commands defined
1032 no commands defined
1032 $ hg help topic-containing-verbose
1033 $ hg help topic-containing-verbose
1033 This is the topic to test omit indicating.
1034 This is the topic to test omit indicating.
1034 """"""""""""""""""""""""""""""""""""""""""
1035 """"""""""""""""""""""""""""""""""""""""""
1035
1036
1036 This paragraph is never omitted (for topic).
1037 This paragraph is never omitted (for topic).
1037
1038
1038 This paragraph is never omitted, too (for topic)
1039 This paragraph is never omitted, too (for topic)
1039
1040
1040 (some details hidden, use --verbose to show complete help)
1041 (some details hidden, use --verbose to show complete help)
1041 $ hg help -v topic-containing-verbose
1042 $ hg help -v topic-containing-verbose
1042 This is the topic to test omit indicating.
1043 This is the topic to test omit indicating.
1043 """"""""""""""""""""""""""""""""""""""""""
1044 """"""""""""""""""""""""""""""""""""""""""
1044
1045
1045 This paragraph is never omitted (for topic).
1046 This paragraph is never omitted (for topic).
1046
1047
1047 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1048 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1048 topic)
1049 topic)
1049
1050
1050 This paragraph is never omitted, too (for topic)
1051 This paragraph is never omitted, too (for topic)
1051
1052
1052 Test section lookup
1053 Test section lookup
1053
1054
1054 $ hg help revset.merge
1055 $ hg help revset.merge
1055 "merge()"
1056 "merge()"
1056 Changeset is a merge changeset.
1057 Changeset is a merge changeset.
1057
1058
1058 $ hg help glossary.dag
1059 $ hg help glossary.dag
1059 DAG
1060 DAG
1060 The repository of changesets of a distributed version control system
1061 The repository of changesets of a distributed version control system
1061 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1062 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1062 of nodes and edges, where nodes correspond to changesets and edges
1063 of nodes and edges, where nodes correspond to changesets and edges
1063 imply a parent -> child relation. This graph can be visualized by
1064 imply a parent -> child relation. This graph can be visualized by
1064 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1065 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1065 limited by the requirement for children to have at most two parents.
1066 limited by the requirement for children to have at most two parents.
1066
1067
1067
1068
1068 $ hg help hgrc.paths
1069 $ hg help hgrc.paths
1069 "paths"
1070 "paths"
1070 -------
1071 -------
1071
1072
1072 Assigns symbolic names to repositories. The left side is the symbolic
1073 Assigns symbolic names to repositories. The left side is the symbolic
1073 name, and the right gives the directory or URL that is the location of the
1074 name, and the right gives the directory or URL that is the location of the
1074 repository. Default paths can be declared by setting the following
1075 repository. Default paths can be declared by setting the following
1075 entries.
1076 entries.
1076
1077
1077 "default"
1078 "default"
1078 Directory or URL to use when pulling if no source is specified.
1079 Directory or URL to use when pulling if no source is specified.
1079 Default is set to repository from which the current repository was
1080 Default is set to repository from which the current repository was
1080 cloned.
1081 cloned.
1081
1082
1082 "default-push"
1083 "default-push"
1083 Optional. Directory or URL to use when pushing if no destination is
1084 Optional. Directory or URL to use when pushing if no destination is
1084 specified.
1085 specified.
1085
1086
1086 Custom paths can be defined by assigning the path to a name that later can
1087 Custom paths can be defined by assigning the path to a name that later can
1087 be used from the command line. Example:
1088 be used from the command line. Example:
1088
1089
1089 [paths]
1090 [paths]
1090 my_path = http://example.com/path
1091 my_path = http://example.com/path
1091
1092
1092 To push to the path defined in "my_path" run the command:
1093 To push to the path defined in "my_path" run the command:
1093
1094
1094 hg push my_path
1095 hg push my_path
1095
1096
1096 $ hg help glossary.mcguffin
1097 $ hg help glossary.mcguffin
1097 abort: help section not found
1098 abort: help section not found
1098 [255]
1099 [255]
1099
1100
1100 $ hg help glossary.mc.guffin
1101 $ hg help glossary.mc.guffin
1101 abort: help section not found
1102 abort: help section not found
1102 [255]
1103 [255]
1103
1104
1104 Test dynamic list of merge tools only shows up once
1105 Test dynamic list of merge tools only shows up once
1105 $ hg help merge-tools
1106 $ hg help merge-tools
1106 Merge Tools
1107 Merge Tools
1107 """""""""""
1108 """""""""""
1108
1109
1109 To merge files Mercurial uses merge tools.
1110 To merge files Mercurial uses merge tools.
1110
1111
1111 A merge tool combines two different versions of a file into a merged file.
1112 A merge tool combines two different versions of a file into a merged file.
1112 Merge tools are given the two files and the greatest common ancestor of
1113 Merge tools are given the two files and the greatest common ancestor of
1113 the two file versions, so they can determine the changes made on both
1114 the two file versions, so they can determine the changes made on both
1114 branches.
1115 branches.
1115
1116
1116 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1117 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1117 backout" and in several extensions.
1118 backout" and in several extensions.
1118
1119
1119 Usually, the merge tool tries to automatically reconcile the files by
1120 Usually, the merge tool tries to automatically reconcile the files by
1120 combining all non-overlapping changes that occurred separately in the two
1121 combining all non-overlapping changes that occurred separately in the two
1121 different evolutions of the same initial base file. Furthermore, some
1122 different evolutions of the same initial base file. Furthermore, some
1122 interactive merge programs make it easier to manually resolve conflicting
1123 interactive merge programs make it easier to manually resolve conflicting
1123 merges, either in a graphical way, or by inserting some conflict markers.
1124 merges, either in a graphical way, or by inserting some conflict markers.
1124 Mercurial does not include any interactive merge programs but relies on
1125 Mercurial does not include any interactive merge programs but relies on
1125 external tools for that.
1126 external tools for that.
1126
1127
1127 Available merge tools
1128 Available merge tools
1128 =====================
1129 =====================
1129
1130
1130 External merge tools and their properties are configured in the merge-
1131 External merge tools and their properties are configured in the merge-
1131 tools configuration section - see hgrc(5) - but they can often just be
1132 tools configuration section - see hgrc(5) - but they can often just be
1132 named by their executable.
1133 named by their executable.
1133
1134
1134 A merge tool is generally usable if its executable can be found on the
1135 A merge tool is generally usable if its executable can be found on the
1135 system and if it can handle the merge. The executable is found if it is an
1136 system and if it can handle the merge. The executable is found if it is an
1136 absolute or relative executable path or the name of an application in the
1137 absolute or relative executable path or the name of an application in the
1137 executable search path. The tool is assumed to be able to handle the merge
1138 executable search path. The tool is assumed to be able to handle the merge
1138 if it can handle symlinks if the file is a symlink, if it can handle
1139 if it can handle symlinks if the file is a symlink, if it can handle
1139 binary files if the file is binary, and if a GUI is available if the tool
1140 binary files if the file is binary, and if a GUI is available if the tool
1140 requires a GUI.
1141 requires a GUI.
1141
1142
1142 There are some internal merge tools which can be used. The internal merge
1143 There are some internal merge tools which can be used. The internal merge
1143 tools are:
1144 tools are:
1144
1145
1145 ":dump"
1146 ":dump"
1146 Creates three versions of the files to merge, containing the contents of
1147 Creates three versions of the files to merge, containing the contents of
1147 local, other and base. These files can then be used to perform a merge
1148 local, other and base. These files can then be used to perform a merge
1148 manually. If the file to be merged is named "a.txt", these files will
1149 manually. If the file to be merged is named "a.txt", these files will
1149 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1150 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1150 they will be placed in the same directory as "a.txt".
1151 they will be placed in the same directory as "a.txt".
1151
1152
1152 ":fail"
1153 ":fail"
1153 Rather than attempting to merge files that were modified on both
1154 Rather than attempting to merge files that were modified on both
1154 branches, it marks them as unresolved. The resolve command must be used
1155 branches, it marks them as unresolved. The resolve command must be used
1155 to resolve these conflicts.
1156 to resolve these conflicts.
1156
1157
1157 ":local"
1158 ":local"
1158 Uses the local version of files as the merged version.
1159 Uses the local version of files as the merged version.
1159
1160
1160 ":merge"
1161 ":merge"
1161 Uses the internal non-interactive simple merge algorithm for merging
1162 Uses the internal non-interactive simple merge algorithm for merging
1162 files. It will fail if there are any conflicts and leave markers in the
1163 files. It will fail if there are any conflicts and leave markers in the
1163 partially merged file. Markers will have two sections, one for each side
1164 partially merged file. Markers will have two sections, one for each side
1164 of merge.
1165 of merge.
1165
1166
1166 ":merge3"
1167 ":merge3"
1167 Uses the internal non-interactive simple merge algorithm for merging
1168 Uses the internal non-interactive simple merge algorithm for merging
1168 files. It will fail if there are any conflicts and leave markers in the
1169 files. It will fail if there are any conflicts and leave markers in the
1169 partially merged file. Marker will have three sections, one from each
1170 partially merged file. Marker will have three sections, one from each
1170 side of the merge and one for the base content.
1171 side of the merge and one for the base content.
1171
1172
1172 ":other"
1173 ":other"
1173 Uses the other version of files as the merged version.
1174 Uses the other version of files as the merged version.
1174
1175
1175 ":prompt"
1176 ":prompt"
1176 Asks the user which of the local or the other version to keep as the
1177 Asks the user which of the local or the other version to keep as the
1177 merged version.
1178 merged version.
1178
1179
1179 ":tagmerge"
1180 ":tagmerge"
1180 Uses the internal tag merge algorithm (experimental).
1181 Uses the internal tag merge algorithm (experimental).
1181
1182
1182 Internal tools are always available and do not require a GUI but will by
1183 Internal tools are always available and do not require a GUI but will by
1183 default not handle symlinks or binary files.
1184 default not handle symlinks or binary files.
1184
1185
1185 Choosing a merge tool
1186 Choosing a merge tool
1186 =====================
1187 =====================
1187
1188
1188 Mercurial uses these rules when deciding which merge tool to use:
1189 Mercurial uses these rules when deciding which merge tool to use:
1189
1190
1190 1. If a tool has been specified with the --tool option to merge or
1191 1. If a tool has been specified with the --tool option to merge or
1191 resolve, it is used. If it is the name of a tool in the merge-tools
1192 resolve, it is used. If it is the name of a tool in the merge-tools
1192 configuration, its configuration is used. Otherwise the specified tool
1193 configuration, its configuration is used. Otherwise the specified tool
1193 must be executable by the shell.
1194 must be executable by the shell.
1194 2. If the "HGMERGE" environment variable is present, its value is used and
1195 2. If the "HGMERGE" environment variable is present, its value is used and
1195 must be executable by the shell.
1196 must be executable by the shell.
1196 3. If the filename of the file to be merged matches any of the patterns in
1197 3. If the filename of the file to be merged matches any of the patterns in
1197 the merge-patterns configuration section, the first usable merge tool
1198 the merge-patterns configuration section, the first usable merge tool
1198 corresponding to a matching pattern is used. Here, binary capabilities
1199 corresponding to a matching pattern is used. Here, binary capabilities
1199 of the merge tool are not considered.
1200 of the merge tool are not considered.
1200 4. If ui.merge is set it will be considered next. If the value is not the
1201 4. If ui.merge is set it will be considered next. If the value is not the
1201 name of a configured tool, the specified value is used and must be
1202 name of a configured tool, the specified value is used and must be
1202 executable by the shell. Otherwise the named tool is used if it is
1203 executable by the shell. Otherwise the named tool is used if it is
1203 usable.
1204 usable.
1204 5. If any usable merge tools are present in the merge-tools configuration
1205 5. If any usable merge tools are present in the merge-tools configuration
1205 section, the one with the highest priority is used.
1206 section, the one with the highest priority is used.
1206 6. If a program named "hgmerge" can be found on the system, it is used -
1207 6. If a program named "hgmerge" can be found on the system, it is used -
1207 but it will by default not be used for symlinks and binary files.
1208 but it will by default not be used for symlinks and binary files.
1208 7. If the file to be merged is not binary and is not a symlink, then
1209 7. If the file to be merged is not binary and is not a symlink, then
1209 internal ":merge" is used.
1210 internal ":merge" is used.
1210 8. The merge of the file fails and must be resolved before commit.
1211 8. The merge of the file fails and must be resolved before commit.
1211
1212
1212 Note:
1213 Note:
1213 After selecting a merge program, Mercurial will by default attempt to
1214 After selecting a merge program, Mercurial will by default attempt to
1214 merge the files using a simple merge algorithm first. Only if it
1215 merge the files using a simple merge algorithm first. Only if it
1215 doesn't succeed because of conflicting changes Mercurial will actually
1216 doesn't succeed because of conflicting changes Mercurial will actually
1216 execute the merge program. Whether to use the simple merge algorithm
1217 execute the merge program. Whether to use the simple merge algorithm
1217 first can be controlled by the premerge setting of the merge tool.
1218 first can be controlled by the premerge setting of the merge tool.
1218 Premerge is enabled by default unless the file is binary or a symlink.
1219 Premerge is enabled by default unless the file is binary or a symlink.
1219
1220
1220 See the merge-tools and ui sections of hgrc(5) for details on the
1221 See the merge-tools and ui sections of hgrc(5) for details on the
1221 configuration of merge tools.
1222 configuration of merge tools.
1222
1223
1223 Test usage of section marks in help documents
1224 Test usage of section marks in help documents
1224
1225
1225 $ cd "$TESTDIR"/../doc
1226 $ cd "$TESTDIR"/../doc
1226 $ python check-seclevel.py
1227 $ python check-seclevel.py
1227 $ cd $TESTTMP
1228 $ cd $TESTTMP
1228
1229
1229 #if serve
1230 #if serve
1230
1231
1231 Test the help pages in hgweb.
1232 Test the help pages in hgweb.
1232
1233
1233 Dish up an empty repo; serve it cold.
1234 Dish up an empty repo; serve it cold.
1234
1235
1235 $ hg init "$TESTTMP/test"
1236 $ hg init "$TESTTMP/test"
1236 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1237 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1237 $ cat hg.pid >> $DAEMON_PIDS
1238 $ cat hg.pid >> $DAEMON_PIDS
1238
1239
1239 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
1240 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
1240 200 Script output follows
1241 200 Script output follows
1241
1242
1242 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1243 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1243 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1244 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1244 <head>
1245 <head>
1245 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1246 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1246 <meta name="robots" content="index, nofollow" />
1247 <meta name="robots" content="index, nofollow" />
1247 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1248 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1248 <script type="text/javascript" src="/static/mercurial.js"></script>
1249 <script type="text/javascript" src="/static/mercurial.js"></script>
1249
1250
1250 <title>Help: Index</title>
1251 <title>Help: Index</title>
1251 </head>
1252 </head>
1252 <body>
1253 <body>
1253
1254
1254 <div class="container">
1255 <div class="container">
1255 <div class="menu">
1256 <div class="menu">
1256 <div class="logo">
1257 <div class="logo">
1257 <a href="http://mercurial.selenic.com/">
1258 <a href="http://mercurial.selenic.com/">
1258 <img src="/static/hglogo.png" alt="mercurial" /></a>
1259 <img src="/static/hglogo.png" alt="mercurial" /></a>
1259 </div>
1260 </div>
1260 <ul>
1261 <ul>
1261 <li><a href="/shortlog">log</a></li>
1262 <li><a href="/shortlog">log</a></li>
1262 <li><a href="/graph">graph</a></li>
1263 <li><a href="/graph">graph</a></li>
1263 <li><a href="/tags">tags</a></li>
1264 <li><a href="/tags">tags</a></li>
1264 <li><a href="/bookmarks">bookmarks</a></li>
1265 <li><a href="/bookmarks">bookmarks</a></li>
1265 <li><a href="/branches">branches</a></li>
1266 <li><a href="/branches">branches</a></li>
1266 </ul>
1267 </ul>
1267 <ul>
1268 <ul>
1268 <li class="active">help</li>
1269 <li class="active">help</li>
1269 </ul>
1270 </ul>
1270 </div>
1271 </div>
1271
1272
1272 <div class="main">
1273 <div class="main">
1273 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1274 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1274 <form class="search" action="/log">
1275 <form class="search" action="/log">
1275
1276
1276 <p><input name="rev" id="search1" type="text" size="30" /></p>
1277 <p><input name="rev" id="search1" type="text" size="30" /></p>
1277 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1278 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1278 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1279 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1279 </form>
1280 </form>
1280 <table class="bigtable">
1281 <table class="bigtable">
1281 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1282 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1282
1283
1283 <tr><td>
1284 <tr><td>
1284 <a href="/help/config">
1285 <a href="/help/config">
1285 config
1286 config
1286 </a>
1287 </a>
1287 </td><td>
1288 </td><td>
1288 Configuration Files
1289 Configuration Files
1289 </td></tr>
1290 </td></tr>
1290 <tr><td>
1291 <tr><td>
1291 <a href="/help/dates">
1292 <a href="/help/dates">
1292 dates
1293 dates
1293 </a>
1294 </a>
1294 </td><td>
1295 </td><td>
1295 Date Formats
1296 Date Formats
1296 </td></tr>
1297 </td></tr>
1297 <tr><td>
1298 <tr><td>
1298 <a href="/help/diffs">
1299 <a href="/help/diffs">
1299 diffs
1300 diffs
1300 </a>
1301 </a>
1301 </td><td>
1302 </td><td>
1302 Diff Formats
1303 Diff Formats
1303 </td></tr>
1304 </td></tr>
1304 <tr><td>
1305 <tr><td>
1305 <a href="/help/environment">
1306 <a href="/help/environment">
1306 environment
1307 environment
1307 </a>
1308 </a>
1308 </td><td>
1309 </td><td>
1309 Environment Variables
1310 Environment Variables
1310 </td></tr>
1311 </td></tr>
1311 <tr><td>
1312 <tr><td>
1312 <a href="/help/extensions">
1313 <a href="/help/extensions">
1313 extensions
1314 extensions
1314 </a>
1315 </a>
1315 </td><td>
1316 </td><td>
1316 Using Additional Features
1317 Using Additional Features
1317 </td></tr>
1318 </td></tr>
1318 <tr><td>
1319 <tr><td>
1319 <a href="/help/filesets">
1320 <a href="/help/filesets">
1320 filesets
1321 filesets
1321 </a>
1322 </a>
1322 </td><td>
1323 </td><td>
1323 Specifying File Sets
1324 Specifying File Sets
1324 </td></tr>
1325 </td></tr>
1325 <tr><td>
1326 <tr><td>
1326 <a href="/help/glossary">
1327 <a href="/help/glossary">
1327 glossary
1328 glossary
1328 </a>
1329 </a>
1329 </td><td>
1330 </td><td>
1330 Glossary
1331 Glossary
1331 </td></tr>
1332 </td></tr>
1332 <tr><td>
1333 <tr><td>
1333 <a href="/help/hgignore">
1334 <a href="/help/hgignore">
1334 hgignore
1335 hgignore
1335 </a>
1336 </a>
1336 </td><td>
1337 </td><td>
1337 Syntax for Mercurial Ignore Files
1338 Syntax for Mercurial Ignore Files
1338 </td></tr>
1339 </td></tr>
1339 <tr><td>
1340 <tr><td>
1340 <a href="/help/hgweb">
1341 <a href="/help/hgweb">
1341 hgweb
1342 hgweb
1342 </a>
1343 </a>
1343 </td><td>
1344 </td><td>
1344 Configuring hgweb
1345 Configuring hgweb
1345 </td></tr>
1346 </td></tr>
1346 <tr><td>
1347 <tr><td>
1347 <a href="/help/merge-tools">
1348 <a href="/help/merge-tools">
1348 merge-tools
1349 merge-tools
1349 </a>
1350 </a>
1350 </td><td>
1351 </td><td>
1351 Merge Tools
1352 Merge Tools
1352 </td></tr>
1353 </td></tr>
1353 <tr><td>
1354 <tr><td>
1354 <a href="/help/multirevs">
1355 <a href="/help/multirevs">
1355 multirevs
1356 multirevs
1356 </a>
1357 </a>
1357 </td><td>
1358 </td><td>
1358 Specifying Multiple Revisions
1359 Specifying Multiple Revisions
1359 </td></tr>
1360 </td></tr>
1360 <tr><td>
1361 <tr><td>
1361 <a href="/help/patterns">
1362 <a href="/help/patterns">
1362 patterns
1363 patterns
1363 </a>
1364 </a>
1364 </td><td>
1365 </td><td>
1365 File Name Patterns
1366 File Name Patterns
1366 </td></tr>
1367 </td></tr>
1367 <tr><td>
1368 <tr><td>
1368 <a href="/help/phases">
1369 <a href="/help/phases">
1369 phases
1370 phases
1370 </a>
1371 </a>
1371 </td><td>
1372 </td><td>
1372 Working with Phases
1373 Working with Phases
1373 </td></tr>
1374 </td></tr>
1374 <tr><td>
1375 <tr><td>
1375 <a href="/help/revisions">
1376 <a href="/help/revisions">
1376 revisions
1377 revisions
1377 </a>
1378 </a>
1378 </td><td>
1379 </td><td>
1379 Specifying Single Revisions
1380 Specifying Single Revisions
1380 </td></tr>
1381 </td></tr>
1381 <tr><td>
1382 <tr><td>
1382 <a href="/help/revsets">
1383 <a href="/help/revsets">
1383 revsets
1384 revsets
1384 </a>
1385 </a>
1385 </td><td>
1386 </td><td>
1386 Specifying Revision Sets
1387 Specifying Revision Sets
1387 </td></tr>
1388 </td></tr>
1388 <tr><td>
1389 <tr><td>
1389 <a href="/help/subrepos">
1390 <a href="/help/subrepos">
1390 subrepos
1391 subrepos
1391 </a>
1392 </a>
1392 </td><td>
1393 </td><td>
1393 Subrepositories
1394 Subrepositories
1394 </td></tr>
1395 </td></tr>
1395 <tr><td>
1396 <tr><td>
1396 <a href="/help/templating">
1397 <a href="/help/templating">
1397 templating
1398 templating
1398 </a>
1399 </a>
1399 </td><td>
1400 </td><td>
1400 Template Usage
1401 Template Usage
1401 </td></tr>
1402 </td></tr>
1402 <tr><td>
1403 <tr><td>
1403 <a href="/help/urls">
1404 <a href="/help/urls">
1404 urls
1405 urls
1405 </a>
1406 </a>
1406 </td><td>
1407 </td><td>
1407 URL Paths
1408 URL Paths
1408 </td></tr>
1409 </td></tr>
1409 <tr><td>
1410 <tr><td>
1410 <a href="/help/topic-containing-verbose">
1411 <a href="/help/topic-containing-verbose">
1411 topic-containing-verbose
1412 topic-containing-verbose
1412 </a>
1413 </a>
1413 </td><td>
1414 </td><td>
1414 This is the topic to test omit indicating.
1415 This is the topic to test omit indicating.
1415 </td></tr>
1416 </td></tr>
1416
1417
1417 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1418 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1418
1419
1419 <tr><td>
1420 <tr><td>
1420 <a href="/help/add">
1421 <a href="/help/add">
1421 add
1422 add
1422 </a>
1423 </a>
1423 </td><td>
1424 </td><td>
1424 add the specified files on the next commit
1425 add the specified files on the next commit
1425 </td></tr>
1426 </td></tr>
1426 <tr><td>
1427 <tr><td>
1427 <a href="/help/annotate">
1428 <a href="/help/annotate">
1428 annotate
1429 annotate
1429 </a>
1430 </a>
1430 </td><td>
1431 </td><td>
1431 show changeset information by line for each file
1432 show changeset information by line for each file
1432 </td></tr>
1433 </td></tr>
1433 <tr><td>
1434 <tr><td>
1434 <a href="/help/clone">
1435 <a href="/help/clone">
1435 clone
1436 clone
1436 </a>
1437 </a>
1437 </td><td>
1438 </td><td>
1438 make a copy of an existing repository
1439 make a copy of an existing repository
1439 </td></tr>
1440 </td></tr>
1440 <tr><td>
1441 <tr><td>
1441 <a href="/help/commit">
1442 <a href="/help/commit">
1442 commit
1443 commit
1443 </a>
1444 </a>
1444 </td><td>
1445 </td><td>
1445 commit the specified files or all outstanding changes
1446 commit the specified files or all outstanding changes
1446 </td></tr>
1447 </td></tr>
1447 <tr><td>
1448 <tr><td>
1448 <a href="/help/diff">
1449 <a href="/help/diff">
1449 diff
1450 diff
1450 </a>
1451 </a>
1451 </td><td>
1452 </td><td>
1452 diff repository (or selected files)
1453 diff repository (or selected files)
1453 </td></tr>
1454 </td></tr>
1454 <tr><td>
1455 <tr><td>
1455 <a href="/help/export">
1456 <a href="/help/export">
1456 export
1457 export
1457 </a>
1458 </a>
1458 </td><td>
1459 </td><td>
1459 dump the header and diffs for one or more changesets
1460 dump the header and diffs for one or more changesets
1460 </td></tr>
1461 </td></tr>
1461 <tr><td>
1462 <tr><td>
1462 <a href="/help/forget">
1463 <a href="/help/forget">
1463 forget
1464 forget
1464 </a>
1465 </a>
1465 </td><td>
1466 </td><td>
1466 forget the specified files on the next commit
1467 forget the specified files on the next commit
1467 </td></tr>
1468 </td></tr>
1468 <tr><td>
1469 <tr><td>
1469 <a href="/help/init">
1470 <a href="/help/init">
1470 init
1471 init
1471 </a>
1472 </a>
1472 </td><td>
1473 </td><td>
1473 create a new repository in the given directory
1474 create a new repository in the given directory
1474 </td></tr>
1475 </td></tr>
1475 <tr><td>
1476 <tr><td>
1476 <a href="/help/log">
1477 <a href="/help/log">
1477 log
1478 log
1478 </a>
1479 </a>
1479 </td><td>
1480 </td><td>
1480 show revision history of entire repository or files
1481 show revision history of entire repository or files
1481 </td></tr>
1482 </td></tr>
1482 <tr><td>
1483 <tr><td>
1483 <a href="/help/merge">
1484 <a href="/help/merge">
1484 merge
1485 merge
1485 </a>
1486 </a>
1486 </td><td>
1487 </td><td>
1487 merge another revision into working directory
1488 merge another revision into working directory
1488 </td></tr>
1489 </td></tr>
1489 <tr><td>
1490 <tr><td>
1490 <a href="/help/pull">
1491 <a href="/help/pull">
1491 pull
1492 pull
1492 </a>
1493 </a>
1493 </td><td>
1494 </td><td>
1494 pull changes from the specified source
1495 pull changes from the specified source
1495 </td></tr>
1496 </td></tr>
1496 <tr><td>
1497 <tr><td>
1497 <a href="/help/push">
1498 <a href="/help/push">
1498 push
1499 push
1499 </a>
1500 </a>
1500 </td><td>
1501 </td><td>
1501 push changes to the specified destination
1502 push changes to the specified destination
1502 </td></tr>
1503 </td></tr>
1503 <tr><td>
1504 <tr><td>
1504 <a href="/help/remove">
1505 <a href="/help/remove">
1505 remove
1506 remove
1506 </a>
1507 </a>
1507 </td><td>
1508 </td><td>
1508 remove the specified files on the next commit
1509 remove the specified files on the next commit
1509 </td></tr>
1510 </td></tr>
1510 <tr><td>
1511 <tr><td>
1511 <a href="/help/serve">
1512 <a href="/help/serve">
1512 serve
1513 serve
1513 </a>
1514 </a>
1514 </td><td>
1515 </td><td>
1515 start stand-alone webserver
1516 start stand-alone webserver
1516 </td></tr>
1517 </td></tr>
1517 <tr><td>
1518 <tr><td>
1518 <a href="/help/status">
1519 <a href="/help/status">
1519 status
1520 status
1520 </a>
1521 </a>
1521 </td><td>
1522 </td><td>
1522 show changed files in the working directory
1523 show changed files in the working directory
1523 </td></tr>
1524 </td></tr>
1524 <tr><td>
1525 <tr><td>
1525 <a href="/help/summary">
1526 <a href="/help/summary">
1526 summary
1527 summary
1527 </a>
1528 </a>
1528 </td><td>
1529 </td><td>
1529 summarize working directory state
1530 summarize working directory state
1530 </td></tr>
1531 </td></tr>
1531 <tr><td>
1532 <tr><td>
1532 <a href="/help/update">
1533 <a href="/help/update">
1533 update
1534 update
1534 </a>
1535 </a>
1535 </td><td>
1536 </td><td>
1536 update working directory (or switch revisions)
1537 update working directory (or switch revisions)
1537 </td></tr>
1538 </td></tr>
1538
1539
1539 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1540 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1540
1541
1541 <tr><td>
1542 <tr><td>
1542 <a href="/help/addremove">
1543 <a href="/help/addremove">
1543 addremove
1544 addremove
1544 </a>
1545 </a>
1545 </td><td>
1546 </td><td>
1546 add all new files, delete all missing files
1547 add all new files, delete all missing files
1547 </td></tr>
1548 </td></tr>
1548 <tr><td>
1549 <tr><td>
1549 <a href="/help/archive">
1550 <a href="/help/archive">
1550 archive
1551 archive
1551 </a>
1552 </a>
1552 </td><td>
1553 </td><td>
1553 create an unversioned archive of a repository revision
1554 create an unversioned archive of a repository revision
1554 </td></tr>
1555 </td></tr>
1555 <tr><td>
1556 <tr><td>
1556 <a href="/help/backout">
1557 <a href="/help/backout">
1557 backout
1558 backout
1558 </a>
1559 </a>
1559 </td><td>
1560 </td><td>
1560 reverse effect of earlier changeset
1561 reverse effect of earlier changeset
1561 </td></tr>
1562 </td></tr>
1562 <tr><td>
1563 <tr><td>
1563 <a href="/help/bisect">
1564 <a href="/help/bisect">
1564 bisect
1565 bisect
1565 </a>
1566 </a>
1566 </td><td>
1567 </td><td>
1567 subdivision search of changesets
1568 subdivision search of changesets
1568 </td></tr>
1569 </td></tr>
1569 <tr><td>
1570 <tr><td>
1570 <a href="/help/bookmarks">
1571 <a href="/help/bookmarks">
1571 bookmarks
1572 bookmarks
1572 </a>
1573 </a>
1573 </td><td>
1574 </td><td>
1574 create a new bookmark or list existing bookmarks
1575 create a new bookmark or list existing bookmarks
1575 </td></tr>
1576 </td></tr>
1576 <tr><td>
1577 <tr><td>
1577 <a href="/help/branch">
1578 <a href="/help/branch">
1578 branch
1579 branch
1579 </a>
1580 </a>
1580 </td><td>
1581 </td><td>
1581 set or show the current branch name
1582 set or show the current branch name
1582 </td></tr>
1583 </td></tr>
1583 <tr><td>
1584 <tr><td>
1584 <a href="/help/branches">
1585 <a href="/help/branches">
1585 branches
1586 branches
1586 </a>
1587 </a>
1587 </td><td>
1588 </td><td>
1588 list repository named branches
1589 list repository named branches
1589 </td></tr>
1590 </td></tr>
1590 <tr><td>
1591 <tr><td>
1591 <a href="/help/bundle">
1592 <a href="/help/bundle">
1592 bundle
1593 bundle
1593 </a>
1594 </a>
1594 </td><td>
1595 </td><td>
1595 create a changegroup file
1596 create a changegroup file
1596 </td></tr>
1597 </td></tr>
1597 <tr><td>
1598 <tr><td>
1598 <a href="/help/cat">
1599 <a href="/help/cat">
1599 cat
1600 cat
1600 </a>
1601 </a>
1601 </td><td>
1602 </td><td>
1602 output the current or given revision of files
1603 output the current or given revision of files
1603 </td></tr>
1604 </td></tr>
1604 <tr><td>
1605 <tr><td>
1605 <a href="/help/config">
1606 <a href="/help/config">
1606 config
1607 config
1607 </a>
1608 </a>
1608 </td><td>
1609 </td><td>
1609 show combined config settings from all hgrc files
1610 show combined config settings from all hgrc files
1610 </td></tr>
1611 </td></tr>
1611 <tr><td>
1612 <tr><td>
1612 <a href="/help/copy">
1613 <a href="/help/copy">
1613 copy
1614 copy
1614 </a>
1615 </a>
1615 </td><td>
1616 </td><td>
1616 mark files as copied for the next commit
1617 mark files as copied for the next commit
1617 </td></tr>
1618 </td></tr>
1618 <tr><td>
1619 <tr><td>
1619 <a href="/help/files">
1620 <a href="/help/files">
1620 files
1621 files
1621 </a>
1622 </a>
1622 </td><td>
1623 </td><td>
1623 list tracked files
1624 list tracked files
1624 </td></tr>
1625 </td></tr>
1625 <tr><td>
1626 <tr><td>
1626 <a href="/help/graft">
1627 <a href="/help/graft">
1627 graft
1628 graft
1628 </a>
1629 </a>
1629 </td><td>
1630 </td><td>
1630 copy changes from other branches onto the current branch
1631 copy changes from other branches onto the current branch
1631 </td></tr>
1632 </td></tr>
1632 <tr><td>
1633 <tr><td>
1633 <a href="/help/grep">
1634 <a href="/help/grep">
1634 grep
1635 grep
1635 </a>
1636 </a>
1636 </td><td>
1637 </td><td>
1637 search for a pattern in specified files and revisions
1638 search for a pattern in specified files and revisions
1638 </td></tr>
1639 </td></tr>
1639 <tr><td>
1640 <tr><td>
1640 <a href="/help/heads">
1641 <a href="/help/heads">
1641 heads
1642 heads
1642 </a>
1643 </a>
1643 </td><td>
1644 </td><td>
1644 show branch heads
1645 show branch heads
1645 </td></tr>
1646 </td></tr>
1646 <tr><td>
1647 <tr><td>
1647 <a href="/help/help">
1648 <a href="/help/help">
1648 help
1649 help
1649 </a>
1650 </a>
1650 </td><td>
1651 </td><td>
1651 show help for a given topic or a help overview
1652 show help for a given topic or a help overview
1652 </td></tr>
1653 </td></tr>
1653 <tr><td>
1654 <tr><td>
1654 <a href="/help/identify">
1655 <a href="/help/identify">
1655 identify
1656 identify
1656 </a>
1657 </a>
1657 </td><td>
1658 </td><td>
1658 identify the working copy or specified revision
1659 identify the working copy or specified revision
1659 </td></tr>
1660 </td></tr>
1660 <tr><td>
1661 <tr><td>
1661 <a href="/help/import">
1662 <a href="/help/import">
1662 import
1663 import
1663 </a>
1664 </a>
1664 </td><td>
1665 </td><td>
1665 import an ordered set of patches
1666 import an ordered set of patches
1666 </td></tr>
1667 </td></tr>
1667 <tr><td>
1668 <tr><td>
1668 <a href="/help/incoming">
1669 <a href="/help/incoming">
1669 incoming
1670 incoming
1670 </a>
1671 </a>
1671 </td><td>
1672 </td><td>
1672 show new changesets found in source
1673 show new changesets found in source
1673 </td></tr>
1674 </td></tr>
1674 <tr><td>
1675 <tr><td>
1675 <a href="/help/manifest">
1676 <a href="/help/manifest">
1676 manifest
1677 manifest
1677 </a>
1678 </a>
1678 </td><td>
1679 </td><td>
1679 output the current or given revision of the project manifest
1680 output the current or given revision of the project manifest
1680 </td></tr>
1681 </td></tr>
1681 <tr><td>
1682 <tr><td>
1682 <a href="/help/nohelp">
1683 <a href="/help/nohelp">
1683 nohelp
1684 nohelp
1684 </a>
1685 </a>
1685 </td><td>
1686 </td><td>
1686 (no help text available)
1687 (no help text available)
1687 </td></tr>
1688 </td></tr>
1688 <tr><td>
1689 <tr><td>
1689 <a href="/help/outgoing">
1690 <a href="/help/outgoing">
1690 outgoing
1691 outgoing
1691 </a>
1692 </a>
1692 </td><td>
1693 </td><td>
1693 show changesets not found in the destination
1694 show changesets not found in the destination
1694 </td></tr>
1695 </td></tr>
1695 <tr><td>
1696 <tr><td>
1696 <a href="/help/paths">
1697 <a href="/help/paths">
1697 paths
1698 paths
1698 </a>
1699 </a>
1699 </td><td>
1700 </td><td>
1700 show aliases for remote repositories
1701 show aliases for remote repositories
1701 </td></tr>
1702 </td></tr>
1702 <tr><td>
1703 <tr><td>
1703 <a href="/help/phase">
1704 <a href="/help/phase">
1704 phase
1705 phase
1705 </a>
1706 </a>
1706 </td><td>
1707 </td><td>
1707 set or show the current phase name
1708 set or show the current phase name
1708 </td></tr>
1709 </td></tr>
1709 <tr><td>
1710 <tr><td>
1710 <a href="/help/recover">
1711 <a href="/help/recover">
1711 recover
1712 recover
1712 </a>
1713 </a>
1713 </td><td>
1714 </td><td>
1714 roll back an interrupted transaction
1715 roll back an interrupted transaction
1715 </td></tr>
1716 </td></tr>
1716 <tr><td>
1717 <tr><td>
1717 <a href="/help/rename">
1718 <a href="/help/rename">
1718 rename
1719 rename
1719 </a>
1720 </a>
1720 </td><td>
1721 </td><td>
1721 rename files; equivalent of copy + remove
1722 rename files; equivalent of copy + remove
1722 </td></tr>
1723 </td></tr>
1723 <tr><td>
1724 <tr><td>
1724 <a href="/help/resolve">
1725 <a href="/help/resolve">
1725 resolve
1726 resolve
1726 </a>
1727 </a>
1727 </td><td>
1728 </td><td>
1728 redo merges or set/view the merge status of files
1729 redo merges or set/view the merge status of files
1729 </td></tr>
1730 </td></tr>
1730 <tr><td>
1731 <tr><td>
1731 <a href="/help/revert">
1732 <a href="/help/revert">
1732 revert
1733 revert
1733 </a>
1734 </a>
1734 </td><td>
1735 </td><td>
1735 restore files to their checkout state
1736 restore files to their checkout state
1736 </td></tr>
1737 </td></tr>
1737 <tr><td>
1738 <tr><td>
1738 <a href="/help/root">
1739 <a href="/help/root">
1739 root
1740 root
1740 </a>
1741 </a>
1741 </td><td>
1742 </td><td>
1742 print the root (top) of the current working directory
1743 print the root (top) of the current working directory
1743 </td></tr>
1744 </td></tr>
1744 <tr><td>
1745 <tr><td>
1745 <a href="/help/tag">
1746 <a href="/help/tag">
1746 tag
1747 tag
1747 </a>
1748 </a>
1748 </td><td>
1749 </td><td>
1749 add one or more tags for the current or given revision
1750 add one or more tags for the current or given revision
1750 </td></tr>
1751 </td></tr>
1751 <tr><td>
1752 <tr><td>
1752 <a href="/help/tags">
1753 <a href="/help/tags">
1753 tags
1754 tags
1754 </a>
1755 </a>
1755 </td><td>
1756 </td><td>
1756 list repository tags
1757 list repository tags
1757 </td></tr>
1758 </td></tr>
1758 <tr><td>
1759 <tr><td>
1759 <a href="/help/unbundle">
1760 <a href="/help/unbundle">
1760 unbundle
1761 unbundle
1761 </a>
1762 </a>
1762 </td><td>
1763 </td><td>
1763 apply one or more changegroup files
1764 apply one or more changegroup files
1764 </td></tr>
1765 </td></tr>
1765 <tr><td>
1766 <tr><td>
1766 <a href="/help/verify">
1767 <a href="/help/verify">
1767 verify
1768 verify
1768 </a>
1769 </a>
1769 </td><td>
1770 </td><td>
1770 verify the integrity of the repository
1771 verify the integrity of the repository
1771 </td></tr>
1772 </td></tr>
1772 <tr><td>
1773 <tr><td>
1773 <a href="/help/version">
1774 <a href="/help/version">
1774 version
1775 version
1775 </a>
1776 </a>
1776 </td><td>
1777 </td><td>
1777 output version and copyright information
1778 output version and copyright information
1778 </td></tr>
1779 </td></tr>
1779 </table>
1780 </table>
1780 </div>
1781 </div>
1781 </div>
1782 </div>
1782
1783
1783 <script type="text/javascript">process_dates()</script>
1784 <script type="text/javascript">process_dates()</script>
1784
1785
1785
1786
1786 </body>
1787 </body>
1787 </html>
1788 </html>
1788
1789
1789
1790
1790 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1791 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1791 200 Script output follows
1792 200 Script output follows
1792
1793
1793 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1794 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1794 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1795 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1795 <head>
1796 <head>
1796 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1797 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1797 <meta name="robots" content="index, nofollow" />
1798 <meta name="robots" content="index, nofollow" />
1798 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1799 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1799 <script type="text/javascript" src="/static/mercurial.js"></script>
1800 <script type="text/javascript" src="/static/mercurial.js"></script>
1800
1801
1801 <title>Help: add</title>
1802 <title>Help: add</title>
1802 </head>
1803 </head>
1803 <body>
1804 <body>
1804
1805
1805 <div class="container">
1806 <div class="container">
1806 <div class="menu">
1807 <div class="menu">
1807 <div class="logo">
1808 <div class="logo">
1808 <a href="http://mercurial.selenic.com/">
1809 <a href="http://mercurial.selenic.com/">
1809 <img src="/static/hglogo.png" alt="mercurial" /></a>
1810 <img src="/static/hglogo.png" alt="mercurial" /></a>
1810 </div>
1811 </div>
1811 <ul>
1812 <ul>
1812 <li><a href="/shortlog">log</a></li>
1813 <li><a href="/shortlog">log</a></li>
1813 <li><a href="/graph">graph</a></li>
1814 <li><a href="/graph">graph</a></li>
1814 <li><a href="/tags">tags</a></li>
1815 <li><a href="/tags">tags</a></li>
1815 <li><a href="/bookmarks">bookmarks</a></li>
1816 <li><a href="/bookmarks">bookmarks</a></li>
1816 <li><a href="/branches">branches</a></li>
1817 <li><a href="/branches">branches</a></li>
1817 </ul>
1818 </ul>
1818 <ul>
1819 <ul>
1819 <li class="active"><a href="/help">help</a></li>
1820 <li class="active"><a href="/help">help</a></li>
1820 </ul>
1821 </ul>
1821 </div>
1822 </div>
1822
1823
1823 <div class="main">
1824 <div class="main">
1824 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1825 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1825 <h3>Help: add</h3>
1826 <h3>Help: add</h3>
1826
1827
1827 <form class="search" action="/log">
1828 <form class="search" action="/log">
1828
1829
1829 <p><input name="rev" id="search1" type="text" size="30" /></p>
1830 <p><input name="rev" id="search1" type="text" size="30" /></p>
1830 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1831 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1831 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1832 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1832 </form>
1833 </form>
1833 <div id="doc">
1834 <div id="doc">
1834 <p>
1835 <p>
1835 hg add [OPTION]... [FILE]...
1836 hg add [OPTION]... [FILE]...
1836 </p>
1837 </p>
1837 <p>
1838 <p>
1838 add the specified files on the next commit
1839 add the specified files on the next commit
1839 </p>
1840 </p>
1840 <p>
1841 <p>
1841 Schedule files to be version controlled and added to the
1842 Schedule files to be version controlled and added to the
1842 repository.
1843 repository.
1843 </p>
1844 </p>
1844 <p>
1845 <p>
1845 The files will be added to the repository at the next commit. To
1846 The files will be added to the repository at the next commit. To
1846 undo an add before that, see &quot;hg forget&quot;.
1847 undo an add before that, see &quot;hg forget&quot;.
1847 </p>
1848 </p>
1848 <p>
1849 <p>
1849 If no names are given, add all files to the repository.
1850 If no names are given, add all files to the repository.
1850 </p>
1851 </p>
1851 <p>
1852 <p>
1852 An example showing how new (unknown) files are added
1853 An example showing how new (unknown) files are added
1853 automatically by &quot;hg add&quot;:
1854 automatically by &quot;hg add&quot;:
1854 </p>
1855 </p>
1855 <pre>
1856 <pre>
1856 \$ ls (re)
1857 \$ ls (re)
1857 foo.c
1858 foo.c
1858 \$ hg status (re)
1859 \$ hg status (re)
1859 ? foo.c
1860 ? foo.c
1860 \$ hg add (re)
1861 \$ hg add (re)
1861 adding foo.c
1862 adding foo.c
1862 \$ hg status (re)
1863 \$ hg status (re)
1863 A foo.c
1864 A foo.c
1864 </pre>
1865 </pre>
1865 <p>
1866 <p>
1866 Returns 0 if all files are successfully added.
1867 Returns 0 if all files are successfully added.
1867 </p>
1868 </p>
1868 <p>
1869 <p>
1869 options ([+] can be repeated):
1870 options ([+] can be repeated):
1870 </p>
1871 </p>
1871 <table>
1872 <table>
1872 <tr><td>-I</td>
1873 <tr><td>-I</td>
1873 <td>--include PATTERN [+]</td>
1874 <td>--include PATTERN [+]</td>
1874 <td>include names matching the given patterns</td></tr>
1875 <td>include names matching the given patterns</td></tr>
1875 <tr><td>-X</td>
1876 <tr><td>-X</td>
1876 <td>--exclude PATTERN [+]</td>
1877 <td>--exclude PATTERN [+]</td>
1877 <td>exclude names matching the given patterns</td></tr>
1878 <td>exclude names matching the given patterns</td></tr>
1878 <tr><td>-S</td>
1879 <tr><td>-S</td>
1879 <td>--subrepos</td>
1880 <td>--subrepos</td>
1880 <td>recurse into subrepositories</td></tr>
1881 <td>recurse into subrepositories</td></tr>
1881 <tr><td>-n</td>
1882 <tr><td>-n</td>
1882 <td>--dry-run</td>
1883 <td>--dry-run</td>
1883 <td>do not perform actions, just print output</td></tr>
1884 <td>do not perform actions, just print output</td></tr>
1884 </table>
1885 </table>
1885 <p>
1886 <p>
1886 global options ([+] can be repeated):
1887 global options ([+] can be repeated):
1887 </p>
1888 </p>
1888 <table>
1889 <table>
1889 <tr><td>-R</td>
1890 <tr><td>-R</td>
1890 <td>--repository REPO</td>
1891 <td>--repository REPO</td>
1891 <td>repository root directory or name of overlay bundle file</td></tr>
1892 <td>repository root directory or name of overlay bundle file</td></tr>
1892 <tr><td></td>
1893 <tr><td></td>
1893 <td>--cwd DIR</td>
1894 <td>--cwd DIR</td>
1894 <td>change working directory</td></tr>
1895 <td>change working directory</td></tr>
1895 <tr><td>-y</td>
1896 <tr><td>-y</td>
1896 <td>--noninteractive</td>
1897 <td>--noninteractive</td>
1897 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1898 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1898 <tr><td>-q</td>
1899 <tr><td>-q</td>
1899 <td>--quiet</td>
1900 <td>--quiet</td>
1900 <td>suppress output</td></tr>
1901 <td>suppress output</td></tr>
1901 <tr><td>-v</td>
1902 <tr><td>-v</td>
1902 <td>--verbose</td>
1903 <td>--verbose</td>
1903 <td>enable additional output</td></tr>
1904 <td>enable additional output</td></tr>
1904 <tr><td></td>
1905 <tr><td></td>
1905 <td>--config CONFIG [+]</td>
1906 <td>--config CONFIG [+]</td>
1906 <td>set/override config option (use 'section.name=value')</td></tr>
1907 <td>set/override config option (use 'section.name=value')</td></tr>
1907 <tr><td></td>
1908 <tr><td></td>
1908 <td>--debug</td>
1909 <td>--debug</td>
1909 <td>enable debugging output</td></tr>
1910 <td>enable debugging output</td></tr>
1910 <tr><td></td>
1911 <tr><td></td>
1911 <td>--debugger</td>
1912 <td>--debugger</td>
1912 <td>start debugger</td></tr>
1913 <td>start debugger</td></tr>
1913 <tr><td></td>
1914 <tr><td></td>
1914 <td>--encoding ENCODE</td>
1915 <td>--encoding ENCODE</td>
1915 <td>set the charset encoding (default: ascii)</td></tr>
1916 <td>set the charset encoding (default: ascii)</td></tr>
1916 <tr><td></td>
1917 <tr><td></td>
1917 <td>--encodingmode MODE</td>
1918 <td>--encodingmode MODE</td>
1918 <td>set the charset encoding mode (default: strict)</td></tr>
1919 <td>set the charset encoding mode (default: strict)</td></tr>
1919 <tr><td></td>
1920 <tr><td></td>
1920 <td>--traceback</td>
1921 <td>--traceback</td>
1921 <td>always print a traceback on exception</td></tr>
1922 <td>always print a traceback on exception</td></tr>
1922 <tr><td></td>
1923 <tr><td></td>
1923 <td>--time</td>
1924 <td>--time</td>
1924 <td>time how long the command takes</td></tr>
1925 <td>time how long the command takes</td></tr>
1925 <tr><td></td>
1926 <tr><td></td>
1926 <td>--profile</td>
1927 <td>--profile</td>
1927 <td>print command execution profile</td></tr>
1928 <td>print command execution profile</td></tr>
1928 <tr><td></td>
1929 <tr><td></td>
1929 <td>--version</td>
1930 <td>--version</td>
1930 <td>output version information and exit</td></tr>
1931 <td>output version information and exit</td></tr>
1931 <tr><td>-h</td>
1932 <tr><td>-h</td>
1932 <td>--help</td>
1933 <td>--help</td>
1933 <td>display help and exit</td></tr>
1934 <td>display help and exit</td></tr>
1934 <tr><td></td>
1935 <tr><td></td>
1935 <td>--hidden</td>
1936 <td>--hidden</td>
1936 <td>consider hidden changesets</td></tr>
1937 <td>consider hidden changesets</td></tr>
1937 </table>
1938 </table>
1938
1939
1939 </div>
1940 </div>
1940 </div>
1941 </div>
1941 </div>
1942 </div>
1942
1943
1943 <script type="text/javascript">process_dates()</script>
1944 <script type="text/javascript">process_dates()</script>
1944
1945
1945
1946
1946 </body>
1947 </body>
1947 </html>
1948 </html>
1948
1949
1949
1950
1950 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1951 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1951 200 Script output follows
1952 200 Script output follows
1952
1953
1953 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1954 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1954 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1955 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1955 <head>
1956 <head>
1956 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1957 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1957 <meta name="robots" content="index, nofollow" />
1958 <meta name="robots" content="index, nofollow" />
1958 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1959 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1959 <script type="text/javascript" src="/static/mercurial.js"></script>
1960 <script type="text/javascript" src="/static/mercurial.js"></script>
1960
1961
1961 <title>Help: remove</title>
1962 <title>Help: remove</title>
1962 </head>
1963 </head>
1963 <body>
1964 <body>
1964
1965
1965 <div class="container">
1966 <div class="container">
1966 <div class="menu">
1967 <div class="menu">
1967 <div class="logo">
1968 <div class="logo">
1968 <a href="http://mercurial.selenic.com/">
1969 <a href="http://mercurial.selenic.com/">
1969 <img src="/static/hglogo.png" alt="mercurial" /></a>
1970 <img src="/static/hglogo.png" alt="mercurial" /></a>
1970 </div>
1971 </div>
1971 <ul>
1972 <ul>
1972 <li><a href="/shortlog">log</a></li>
1973 <li><a href="/shortlog">log</a></li>
1973 <li><a href="/graph">graph</a></li>
1974 <li><a href="/graph">graph</a></li>
1974 <li><a href="/tags">tags</a></li>
1975 <li><a href="/tags">tags</a></li>
1975 <li><a href="/bookmarks">bookmarks</a></li>
1976 <li><a href="/bookmarks">bookmarks</a></li>
1976 <li><a href="/branches">branches</a></li>
1977 <li><a href="/branches">branches</a></li>
1977 </ul>
1978 </ul>
1978 <ul>
1979 <ul>
1979 <li class="active"><a href="/help">help</a></li>
1980 <li class="active"><a href="/help">help</a></li>
1980 </ul>
1981 </ul>
1981 </div>
1982 </div>
1982
1983
1983 <div class="main">
1984 <div class="main">
1984 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1985 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1985 <h3>Help: remove</h3>
1986 <h3>Help: remove</h3>
1986
1987
1987 <form class="search" action="/log">
1988 <form class="search" action="/log">
1988
1989
1989 <p><input name="rev" id="search1" type="text" size="30" /></p>
1990 <p><input name="rev" id="search1" type="text" size="30" /></p>
1990 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1991 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1991 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1992 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1992 </form>
1993 </form>
1993 <div id="doc">
1994 <div id="doc">
1994 <p>
1995 <p>
1995 hg remove [OPTION]... FILE...
1996 hg remove [OPTION]... FILE...
1996 </p>
1997 </p>
1997 <p>
1998 <p>
1998 aliases: rm
1999 aliases: rm
1999 </p>
2000 </p>
2000 <p>
2001 <p>
2001 remove the specified files on the next commit
2002 remove the specified files on the next commit
2002 </p>
2003 </p>
2003 <p>
2004 <p>
2004 Schedule the indicated files for removal from the current branch.
2005 Schedule the indicated files for removal from the current branch.
2005 </p>
2006 </p>
2006 <p>
2007 <p>
2007 This command schedules the files to be removed at the next commit.
2008 This command schedules the files to be removed at the next commit.
2008 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2009 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2009 files, see &quot;hg forget&quot;.
2010 files, see &quot;hg forget&quot;.
2010 </p>
2011 </p>
2011 <p>
2012 <p>
2012 -A/--after can be used to remove only files that have already
2013 -A/--after can be used to remove only files that have already
2013 been deleted, -f/--force can be used to force deletion, and -Af
2014 been deleted, -f/--force can be used to force deletion, and -Af
2014 can be used to remove files from the next revision without
2015 can be used to remove files from the next revision without
2015 deleting them from the working directory.
2016 deleting them from the working directory.
2016 </p>
2017 </p>
2017 <p>
2018 <p>
2018 The following table details the behavior of remove for different
2019 The following table details the behavior of remove for different
2019 file states (columns) and option combinations (rows). The file
2020 file states (columns) and option combinations (rows). The file
2020 states are Added [A], Clean [C], Modified [M] and Missing [!]
2021 states are Added [A], Clean [C], Modified [M] and Missing [!]
2021 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2022 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2022 (from branch) and Delete (from disk):
2023 (from branch) and Delete (from disk):
2023 </p>
2024 </p>
2024 <table>
2025 <table>
2025 <tr><td>opt/state</td>
2026 <tr><td>opt/state</td>
2026 <td>A</td>
2027 <td>A</td>
2027 <td>C</td>
2028 <td>C</td>
2028 <td>M</td>
2029 <td>M</td>
2029 <td>!</td></tr>
2030 <td>!</td></tr>
2030 <tr><td>none</td>
2031 <tr><td>none</td>
2031 <td>W</td>
2032 <td>W</td>
2032 <td>RD</td>
2033 <td>RD</td>
2033 <td>W</td>
2034 <td>W</td>
2034 <td>R</td></tr>
2035 <td>R</td></tr>
2035 <tr><td>-f</td>
2036 <tr><td>-f</td>
2036 <td>R</td>
2037 <td>R</td>
2037 <td>RD</td>
2038 <td>RD</td>
2038 <td>RD</td>
2039 <td>RD</td>
2039 <td>R</td></tr>
2040 <td>R</td></tr>
2040 <tr><td>-A</td>
2041 <tr><td>-A</td>
2041 <td>W</td>
2042 <td>W</td>
2042 <td>W</td>
2043 <td>W</td>
2043 <td>W</td>
2044 <td>W</td>
2044 <td>R</td></tr>
2045 <td>R</td></tr>
2045 <tr><td>-Af</td>
2046 <tr><td>-Af</td>
2046 <td>R</td>
2047 <td>R</td>
2047 <td>R</td>
2048 <td>R</td>
2048 <td>R</td>
2049 <td>R</td>
2049 <td>R</td></tr>
2050 <td>R</td></tr>
2050 </table>
2051 </table>
2051 <p>
2052 <p>
2052 Note that remove never deletes files in Added [A] state from the
2053 Note that remove never deletes files in Added [A] state from the
2053 working directory, not even if option --force is specified.
2054 working directory, not even if option --force is specified.
2054 </p>
2055 </p>
2055 <p>
2056 <p>
2056 Returns 0 on success, 1 if any warnings encountered.
2057 Returns 0 on success, 1 if any warnings encountered.
2057 </p>
2058 </p>
2058 <p>
2059 <p>
2059 options ([+] can be repeated):
2060 options ([+] can be repeated):
2060 </p>
2061 </p>
2061 <table>
2062 <table>
2062 <tr><td>-A</td>
2063 <tr><td>-A</td>
2063 <td>--after</td>
2064 <td>--after</td>
2064 <td>record delete for missing files</td></tr>
2065 <td>record delete for missing files</td></tr>
2065 <tr><td>-f</td>
2066 <tr><td>-f</td>
2066 <td>--force</td>
2067 <td>--force</td>
2067 <td>remove (and delete) file even if added or modified</td></tr>
2068 <td>remove (and delete) file even if added or modified</td></tr>
2068 <tr><td>-S</td>
2069 <tr><td>-S</td>
2069 <td>--subrepos</td>
2070 <td>--subrepos</td>
2070 <td>recurse into subrepositories</td></tr>
2071 <td>recurse into subrepositories</td></tr>
2071 <tr><td>-I</td>
2072 <tr><td>-I</td>
2072 <td>--include PATTERN [+]</td>
2073 <td>--include PATTERN [+]</td>
2073 <td>include names matching the given patterns</td></tr>
2074 <td>include names matching the given patterns</td></tr>
2074 <tr><td>-X</td>
2075 <tr><td>-X</td>
2075 <td>--exclude PATTERN [+]</td>
2076 <td>--exclude PATTERN [+]</td>
2076 <td>exclude names matching the given patterns</td></tr>
2077 <td>exclude names matching the given patterns</td></tr>
2077 </table>
2078 </table>
2078 <p>
2079 <p>
2079 global options ([+] can be repeated):
2080 global options ([+] can be repeated):
2080 </p>
2081 </p>
2081 <table>
2082 <table>
2082 <tr><td>-R</td>
2083 <tr><td>-R</td>
2083 <td>--repository REPO</td>
2084 <td>--repository REPO</td>
2084 <td>repository root directory or name of overlay bundle file</td></tr>
2085 <td>repository root directory or name of overlay bundle file</td></tr>
2085 <tr><td></td>
2086 <tr><td></td>
2086 <td>--cwd DIR</td>
2087 <td>--cwd DIR</td>
2087 <td>change working directory</td></tr>
2088 <td>change working directory</td></tr>
2088 <tr><td>-y</td>
2089 <tr><td>-y</td>
2089 <td>--noninteractive</td>
2090 <td>--noninteractive</td>
2090 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2091 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2091 <tr><td>-q</td>
2092 <tr><td>-q</td>
2092 <td>--quiet</td>
2093 <td>--quiet</td>
2093 <td>suppress output</td></tr>
2094 <td>suppress output</td></tr>
2094 <tr><td>-v</td>
2095 <tr><td>-v</td>
2095 <td>--verbose</td>
2096 <td>--verbose</td>
2096 <td>enable additional output</td></tr>
2097 <td>enable additional output</td></tr>
2097 <tr><td></td>
2098 <tr><td></td>
2098 <td>--config CONFIG [+]</td>
2099 <td>--config CONFIG [+]</td>
2099 <td>set/override config option (use 'section.name=value')</td></tr>
2100 <td>set/override config option (use 'section.name=value')</td></tr>
2100 <tr><td></td>
2101 <tr><td></td>
2101 <td>--debug</td>
2102 <td>--debug</td>
2102 <td>enable debugging output</td></tr>
2103 <td>enable debugging output</td></tr>
2103 <tr><td></td>
2104 <tr><td></td>
2104 <td>--debugger</td>
2105 <td>--debugger</td>
2105 <td>start debugger</td></tr>
2106 <td>start debugger</td></tr>
2106 <tr><td></td>
2107 <tr><td></td>
2107 <td>--encoding ENCODE</td>
2108 <td>--encoding ENCODE</td>
2108 <td>set the charset encoding (default: ascii)</td></tr>
2109 <td>set the charset encoding (default: ascii)</td></tr>
2109 <tr><td></td>
2110 <tr><td></td>
2110 <td>--encodingmode MODE</td>
2111 <td>--encodingmode MODE</td>
2111 <td>set the charset encoding mode (default: strict)</td></tr>
2112 <td>set the charset encoding mode (default: strict)</td></tr>
2112 <tr><td></td>
2113 <tr><td></td>
2113 <td>--traceback</td>
2114 <td>--traceback</td>
2114 <td>always print a traceback on exception</td></tr>
2115 <td>always print a traceback on exception</td></tr>
2115 <tr><td></td>
2116 <tr><td></td>
2116 <td>--time</td>
2117 <td>--time</td>
2117 <td>time how long the command takes</td></tr>
2118 <td>time how long the command takes</td></tr>
2118 <tr><td></td>
2119 <tr><td></td>
2119 <td>--profile</td>
2120 <td>--profile</td>
2120 <td>print command execution profile</td></tr>
2121 <td>print command execution profile</td></tr>
2121 <tr><td></td>
2122 <tr><td></td>
2122 <td>--version</td>
2123 <td>--version</td>
2123 <td>output version information and exit</td></tr>
2124 <td>output version information and exit</td></tr>
2124 <tr><td>-h</td>
2125 <tr><td>-h</td>
2125 <td>--help</td>
2126 <td>--help</td>
2126 <td>display help and exit</td></tr>
2127 <td>display help and exit</td></tr>
2127 <tr><td></td>
2128 <tr><td></td>
2128 <td>--hidden</td>
2129 <td>--hidden</td>
2129 <td>consider hidden changesets</td></tr>
2130 <td>consider hidden changesets</td></tr>
2130 </table>
2131 </table>
2131
2132
2132 </div>
2133 </div>
2133 </div>
2134 </div>
2134 </div>
2135 </div>
2135
2136
2136 <script type="text/javascript">process_dates()</script>
2137 <script type="text/javascript">process_dates()</script>
2137
2138
2138
2139
2139 </body>
2140 </body>
2140 </html>
2141 </html>
2141
2142
2142
2143
2143 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
2144 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
2144 200 Script output follows
2145 200 Script output follows
2145
2146
2146 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2147 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2147 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2148 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2148 <head>
2149 <head>
2149 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2150 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2150 <meta name="robots" content="index, nofollow" />
2151 <meta name="robots" content="index, nofollow" />
2151 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2152 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2152 <script type="text/javascript" src="/static/mercurial.js"></script>
2153 <script type="text/javascript" src="/static/mercurial.js"></script>
2153
2154
2154 <title>Help: revisions</title>
2155 <title>Help: revisions</title>
2155 </head>
2156 </head>
2156 <body>
2157 <body>
2157
2158
2158 <div class="container">
2159 <div class="container">
2159 <div class="menu">
2160 <div class="menu">
2160 <div class="logo">
2161 <div class="logo">
2161 <a href="http://mercurial.selenic.com/">
2162 <a href="http://mercurial.selenic.com/">
2162 <img src="/static/hglogo.png" alt="mercurial" /></a>
2163 <img src="/static/hglogo.png" alt="mercurial" /></a>
2163 </div>
2164 </div>
2164 <ul>
2165 <ul>
2165 <li><a href="/shortlog">log</a></li>
2166 <li><a href="/shortlog">log</a></li>
2166 <li><a href="/graph">graph</a></li>
2167 <li><a href="/graph">graph</a></li>
2167 <li><a href="/tags">tags</a></li>
2168 <li><a href="/tags">tags</a></li>
2168 <li><a href="/bookmarks">bookmarks</a></li>
2169 <li><a href="/bookmarks">bookmarks</a></li>
2169 <li><a href="/branches">branches</a></li>
2170 <li><a href="/branches">branches</a></li>
2170 </ul>
2171 </ul>
2171 <ul>
2172 <ul>
2172 <li class="active"><a href="/help">help</a></li>
2173 <li class="active"><a href="/help">help</a></li>
2173 </ul>
2174 </ul>
2174 </div>
2175 </div>
2175
2176
2176 <div class="main">
2177 <div class="main">
2177 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2178 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2178 <h3>Help: revisions</h3>
2179 <h3>Help: revisions</h3>
2179
2180
2180 <form class="search" action="/log">
2181 <form class="search" action="/log">
2181
2182
2182 <p><input name="rev" id="search1" type="text" size="30" /></p>
2183 <p><input name="rev" id="search1" type="text" size="30" /></p>
2183 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2184 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2184 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2185 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2185 </form>
2186 </form>
2186 <div id="doc">
2187 <div id="doc">
2187 <h1>Specifying Single Revisions</h1>
2188 <h1>Specifying Single Revisions</h1>
2188 <p>
2189 <p>
2189 Mercurial supports several ways to specify individual revisions.
2190 Mercurial supports several ways to specify individual revisions.
2190 </p>
2191 </p>
2191 <p>
2192 <p>
2192 A plain integer is treated as a revision number. Negative integers are
2193 A plain integer is treated as a revision number. Negative integers are
2193 treated as sequential offsets from the tip, with -1 denoting the tip,
2194 treated as sequential offsets from the tip, with -1 denoting the tip,
2194 -2 denoting the revision prior to the tip, and so forth.
2195 -2 denoting the revision prior to the tip, and so forth.
2195 </p>
2196 </p>
2196 <p>
2197 <p>
2197 A 40-digit hexadecimal string is treated as a unique revision
2198 A 40-digit hexadecimal string is treated as a unique revision
2198 identifier.
2199 identifier.
2199 </p>
2200 </p>
2200 <p>
2201 <p>
2201 A hexadecimal string less than 40 characters long is treated as a
2202 A hexadecimal string less than 40 characters long is treated as a
2202 unique revision identifier and is referred to as a short-form
2203 unique revision identifier and is referred to as a short-form
2203 identifier. A short-form identifier is only valid if it is the prefix
2204 identifier. A short-form identifier is only valid if it is the prefix
2204 of exactly one full-length identifier.
2205 of exactly one full-length identifier.
2205 </p>
2206 </p>
2206 <p>
2207 <p>
2207 Any other string is treated as a bookmark, tag, or branch name. A
2208 Any other string is treated as a bookmark, tag, or branch name. A
2208 bookmark is a movable pointer to a revision. A tag is a permanent name
2209 bookmark is a movable pointer to a revision. A tag is a permanent name
2209 associated with a revision. A branch name denotes the tipmost open branch head
2210 associated with a revision. A branch name denotes the tipmost open branch head
2210 of that branch - or if they are all closed, the tipmost closed head of the
2211 of that branch - or if they are all closed, the tipmost closed head of the
2211 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2212 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2212 </p>
2213 </p>
2213 <p>
2214 <p>
2214 The reserved name &quot;tip&quot; always identifies the most recent revision.
2215 The reserved name &quot;tip&quot; always identifies the most recent revision.
2215 </p>
2216 </p>
2216 <p>
2217 <p>
2217 The reserved name &quot;null&quot; indicates the null revision. This is the
2218 The reserved name &quot;null&quot; indicates the null revision. This is the
2218 revision of an empty repository, and the parent of revision 0.
2219 revision of an empty repository, and the parent of revision 0.
2219 </p>
2220 </p>
2220 <p>
2221 <p>
2221 The reserved name &quot;.&quot; indicates the working directory parent. If no
2222 The reserved name &quot;.&quot; indicates the working directory parent. If no
2222 working directory is checked out, it is equivalent to null. If an
2223 working directory is checked out, it is equivalent to null. If an
2223 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2224 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2224 parent.
2225 parent.
2225 </p>
2226 </p>
2226
2227
2227 </div>
2228 </div>
2228 </div>
2229 </div>
2229 </div>
2230 </div>
2230
2231
2231 <script type="text/javascript">process_dates()</script>
2232 <script type="text/javascript">process_dates()</script>
2232
2233
2233
2234
2234 </body>
2235 </body>
2235 </html>
2236 </html>
2236
2237
2237
2238
2238 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
2239 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
2239
2240
2240 #endif
2241 #endif
General Comments 0
You need to be logged in to leave comments. Login now