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