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