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