##// END OF EJS Templates
help: tweak --verbose command help hint...
Matt Mackall -
r22110:26f7c803 default
parent child Browse files
Show More
@@ -1,516 +1,513 b''
1 # help.py - help data for mercurial
1 # help.py - help data for mercurial
2 #
2 #
3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
3 # Copyright 2006 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 i18n import gettext, _
8 from i18n import gettext, _
9 import itertools, sys, os
9 import itertools, sys, os
10 import error
10 import error
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge
12 import encoding, util, minirst
12 import encoding, util, minirst
13 import cmdutil
13 import cmdutil
14
14
15 def listexts(header, exts, indent=1, showdeprecated=False):
15 def listexts(header, exts, indent=1, showdeprecated=False):
16 '''return a text listing of the given extensions'''
16 '''return a text listing of the given extensions'''
17 rst = []
17 rst = []
18 if exts:
18 if exts:
19 rst.append('\n%s\n\n' % header)
19 rst.append('\n%s\n\n' % header)
20 for name, desc in sorted(exts.iteritems()):
20 for name, desc in sorted(exts.iteritems()):
21 if '(DEPRECATED)' in desc and not showdeprecated:
21 if '(DEPRECATED)' in desc and not showdeprecated:
22 continue
22 continue
23 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
23 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
24 return rst
24 return rst
25
25
26 def extshelp():
26 def extshelp():
27 rst = loaddoc('extensions')().splitlines(True)
27 rst = loaddoc('extensions')().splitlines(True)
28 rst.extend(listexts(
28 rst.extend(listexts(
29 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
29 _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
30 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
30 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
31 doc = ''.join(rst)
31 doc = ''.join(rst)
32 return doc
32 return doc
33
33
34 def optrst(options, verbose):
34 def optrst(options, verbose):
35 data = []
35 data = []
36 multioccur = False
36 multioccur = False
37 for option in options:
37 for option in options:
38 if len(option) == 5:
38 if len(option) == 5:
39 shortopt, longopt, default, desc, optlabel = option
39 shortopt, longopt, default, desc, optlabel = option
40 else:
40 else:
41 shortopt, longopt, default, desc = option
41 shortopt, longopt, default, desc = option
42 optlabel = _("VALUE") # default label
42 optlabel = _("VALUE") # default label
43
43
44 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc):
44 if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc):
45 continue
45 continue
46
46
47 so = ''
47 so = ''
48 if shortopt:
48 if shortopt:
49 so = '-' + shortopt
49 so = '-' + shortopt
50 lo = '--' + longopt
50 lo = '--' + longopt
51 if default:
51 if default:
52 desc += _(" (default: %s)") % default
52 desc += _(" (default: %s)") % default
53
53
54 if isinstance(default, list):
54 if isinstance(default, list):
55 lo += " %s [+]" % optlabel
55 lo += " %s [+]" % optlabel
56 multioccur = True
56 multioccur = True
57 elif (default is not None) and not isinstance(default, bool):
57 elif (default is not None) and not isinstance(default, bool):
58 lo += " %s" % optlabel
58 lo += " %s" % optlabel
59
59
60 data.append((so, lo, desc))
60 data.append((so, lo, desc))
61
61
62 rst = minirst.maketable(data, 1)
62 rst = minirst.maketable(data, 1)
63
63
64 if multioccur:
64 if multioccur:
65 rst.append(_("\n[+] marked option can be specified multiple times\n"))
65 rst.append(_("\n[+] marked option can be specified multiple times\n"))
66
66
67 return ''.join(rst)
67 return ''.join(rst)
68
68
69 def indicateomitted(rst, omitted, notomitted=None):
69 def indicateomitted(rst, omitted, notomitted=None):
70 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
70 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
71 if notomitted:
71 if notomitted:
72 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
72 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
73
73
74 def topicmatch(kw):
74 def topicmatch(kw):
75 """Return help topics matching kw.
75 """Return help topics matching kw.
76
76
77 Returns {'section': [(name, summary), ...], ...} where section is
77 Returns {'section': [(name, summary), ...], ...} where section is
78 one of topics, commands, extensions, or extensioncommands.
78 one of topics, commands, extensions, or extensioncommands.
79 """
79 """
80 kw = encoding.lower(kw)
80 kw = encoding.lower(kw)
81 def lowercontains(container):
81 def lowercontains(container):
82 return kw in encoding.lower(container) # translated in helptable
82 return kw in encoding.lower(container) # translated in helptable
83 results = {'topics': [],
83 results = {'topics': [],
84 'commands': [],
84 'commands': [],
85 'extensions': [],
85 'extensions': [],
86 'extensioncommands': [],
86 'extensioncommands': [],
87 }
87 }
88 for names, header, doc in helptable:
88 for names, header, doc in helptable:
89 if (sum(map(lowercontains, names))
89 if (sum(map(lowercontains, names))
90 or lowercontains(header)
90 or lowercontains(header)
91 or lowercontains(doc())):
91 or lowercontains(doc())):
92 results['topics'].append((names[0], header))
92 results['topics'].append((names[0], header))
93 import commands # avoid cycle
93 import commands # avoid cycle
94 for cmd, entry in commands.table.iteritems():
94 for cmd, entry in commands.table.iteritems():
95 if len(entry) == 3:
95 if len(entry) == 3:
96 summary = entry[2]
96 summary = entry[2]
97 else:
97 else:
98 summary = ''
98 summary = ''
99 # translate docs *before* searching there
99 # translate docs *before* searching there
100 docs = _(getattr(entry[0], '__doc__', None)) or ''
100 docs = _(getattr(entry[0], '__doc__', None)) or ''
101 if kw in cmd or lowercontains(summary) or lowercontains(docs):
101 if kw in cmd or lowercontains(summary) or lowercontains(docs):
102 doclines = docs.splitlines()
102 doclines = docs.splitlines()
103 if doclines:
103 if doclines:
104 summary = doclines[0]
104 summary = doclines[0]
105 cmdname = cmd.split('|')[0].lstrip('^')
105 cmdname = cmd.split('|')[0].lstrip('^')
106 results['commands'].append((cmdname, summary))
106 results['commands'].append((cmdname, summary))
107 for name, docs in itertools.chain(
107 for name, docs in itertools.chain(
108 extensions.enabled(False).iteritems(),
108 extensions.enabled(False).iteritems(),
109 extensions.disabled().iteritems()):
109 extensions.disabled().iteritems()):
110 # extensions.load ignores the UI argument
110 # extensions.load ignores the UI argument
111 mod = extensions.load(None, name, '')
111 mod = extensions.load(None, name, '')
112 name = name.split('.')[-1]
112 name = name.split('.')[-1]
113 if lowercontains(name) or lowercontains(docs):
113 if lowercontains(name) or lowercontains(docs):
114 # extension docs are already translated
114 # extension docs are already translated
115 results['extensions'].append((name, docs.splitlines()[0]))
115 results['extensions'].append((name, docs.splitlines()[0]))
116 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
116 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
117 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
117 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
118 cmdname = cmd.split('|')[0].lstrip('^')
118 cmdname = cmd.split('|')[0].lstrip('^')
119 if entry[0].__doc__:
119 if entry[0].__doc__:
120 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
120 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
121 else:
121 else:
122 cmddoc = _('(no help text available)')
122 cmddoc = _('(no help text available)')
123 results['extensioncommands'].append((cmdname, cmddoc))
123 results['extensioncommands'].append((cmdname, cmddoc))
124 return results
124 return results
125
125
126 def loaddoc(topic):
126 def loaddoc(topic):
127 """Return a delayed loader for help/topic.txt."""
127 """Return a delayed loader for help/topic.txt."""
128
128
129 def loader():
129 def loader():
130 if util.mainfrozen():
130 if util.mainfrozen():
131 module = sys.executable
131 module = sys.executable
132 else:
132 else:
133 module = __file__
133 module = __file__
134 base = os.path.dirname(module)
134 base = os.path.dirname(module)
135
135
136 for dir in ('.', '..'):
136 for dir in ('.', '..'):
137 docdir = os.path.join(base, dir, 'help')
137 docdir = os.path.join(base, dir, 'help')
138 if os.path.isdir(docdir):
138 if os.path.isdir(docdir):
139 break
139 break
140
140
141 path = os.path.join(docdir, topic + ".txt")
141 path = os.path.join(docdir, topic + ".txt")
142 doc = gettext(util.readfile(path))
142 doc = gettext(util.readfile(path))
143 for rewriter in helphooks.get(topic, []):
143 for rewriter in helphooks.get(topic, []):
144 doc = rewriter(topic, doc)
144 doc = rewriter(topic, doc)
145 return doc
145 return doc
146
146
147 return loader
147 return loader
148
148
149 helptable = sorted([
149 helptable = sorted([
150 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
150 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
151 (["dates"], _("Date Formats"), loaddoc('dates')),
151 (["dates"], _("Date Formats"), loaddoc('dates')),
152 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
152 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
153 (['environment', 'env'], _('Environment Variables'),
153 (['environment', 'env'], _('Environment Variables'),
154 loaddoc('environment')),
154 loaddoc('environment')),
155 (['revisions', 'revs'], _('Specifying Single Revisions'),
155 (['revisions', 'revs'], _('Specifying Single Revisions'),
156 loaddoc('revisions')),
156 loaddoc('revisions')),
157 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
157 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
158 loaddoc('multirevs')),
158 loaddoc('multirevs')),
159 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
159 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
160 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
160 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
161 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
161 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
162 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
162 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
163 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
163 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
164 loaddoc('templates')),
164 loaddoc('templates')),
165 (['urls'], _('URL Paths'), loaddoc('urls')),
165 (['urls'], _('URL Paths'), loaddoc('urls')),
166 (["extensions"], _("Using Additional Features"), extshelp),
166 (["extensions"], _("Using Additional Features"), extshelp),
167 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
167 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
168 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
168 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
169 (["glossary"], _("Glossary"), loaddoc('glossary')),
169 (["glossary"], _("Glossary"), loaddoc('glossary')),
170 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
170 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
171 loaddoc('hgignore')),
171 loaddoc('hgignore')),
172 (["phases"], _("Working with Phases"), loaddoc('phases')),
172 (["phases"], _("Working with Phases"), loaddoc('phases')),
173 ])
173 ])
174
174
175 # Map topics to lists of callable taking the current topic help and
175 # Map topics to lists of callable taking the current topic help and
176 # returning the updated version
176 # returning the updated version
177 helphooks = {}
177 helphooks = {}
178
178
179 def addtopichook(topic, rewriter):
179 def addtopichook(topic, rewriter):
180 helphooks.setdefault(topic, []).append(rewriter)
180 helphooks.setdefault(topic, []).append(rewriter)
181
181
182 def makeitemsdoc(topic, doc, marker, items):
182 def makeitemsdoc(topic, doc, marker, items):
183 """Extract docstring from the items key to function mapping, build a
183 """Extract docstring from the items key to function mapping, build a
184 .single documentation block and use it to overwrite the marker in doc
184 .single documentation block and use it to overwrite the marker in doc
185 """
185 """
186 entries = []
186 entries = []
187 for name in sorted(items):
187 for name in sorted(items):
188 text = (items[name].__doc__ or '').rstrip()
188 text = (items[name].__doc__ or '').rstrip()
189 if not text:
189 if not text:
190 continue
190 continue
191 text = gettext(text)
191 text = gettext(text)
192 lines = text.splitlines()
192 lines = text.splitlines()
193 doclines = [(lines[0])]
193 doclines = [(lines[0])]
194 for l in lines[1:]:
194 for l in lines[1:]:
195 # Stop once we find some Python doctest
195 # Stop once we find some Python doctest
196 if l.strip().startswith('>>>'):
196 if l.strip().startswith('>>>'):
197 break
197 break
198 doclines.append(' ' + l.strip())
198 doclines.append(' ' + l.strip())
199 entries.append('\n'.join(doclines))
199 entries.append('\n'.join(doclines))
200 entries = '\n\n'.join(entries)
200 entries = '\n\n'.join(entries)
201 return doc.replace(marker, entries)
201 return doc.replace(marker, entries)
202
202
203 def addtopicsymbols(topic, marker, symbols):
203 def addtopicsymbols(topic, marker, symbols):
204 def add(topic, doc):
204 def add(topic, doc):
205 return makeitemsdoc(topic, doc, marker, symbols)
205 return makeitemsdoc(topic, doc, marker, symbols)
206 addtopichook(topic, add)
206 addtopichook(topic, add)
207
207
208 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
208 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
209 addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals)
209 addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals)
210 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
210 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
211 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
211 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
212 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
212 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
213
213
214 def help_(ui, name, unknowncmd=False, full=True, **opts):
214 def help_(ui, name, unknowncmd=False, full=True, **opts):
215 '''
215 '''
216 Generate the help for 'name' as unformatted restructured text. If
216 Generate the help for 'name' as unformatted restructured text. If
217 'name' is None, describe the commands available.
217 'name' is None, describe the commands available.
218 '''
218 '''
219
219
220 import commands # avoid cycle
220 import commands # avoid cycle
221
221
222 def helpcmd(name):
222 def helpcmd(name):
223 try:
223 try:
224 aliases, entry = cmdutil.findcmd(name, commands.table,
224 aliases, entry = cmdutil.findcmd(name, commands.table,
225 strict=unknowncmd)
225 strict=unknowncmd)
226 except error.AmbiguousCommand, inst:
226 except error.AmbiguousCommand, inst:
227 # py3k fix: except vars can't be used outside the scope of the
227 # py3k fix: except vars can't be used outside the scope of the
228 # except block, nor can be used inside a lambda. python issue4617
228 # except block, nor can be used inside a lambda. python issue4617
229 prefix = inst.args[0]
229 prefix = inst.args[0]
230 select = lambda c: c.lstrip('^').startswith(prefix)
230 select = lambda c: c.lstrip('^').startswith(prefix)
231 rst = helplist(select)
231 rst = helplist(select)
232 return rst
232 return rst
233
233
234 rst = []
234 rst = []
235
235
236 # check if it's an invalid alias and display its error if it is
236 # check if it's an invalid alias and display its error if it is
237 if getattr(entry[0], 'badalias', False):
237 if getattr(entry[0], 'badalias', False):
238 if not unknowncmd:
238 if not unknowncmd:
239 ui.pushbuffer()
239 ui.pushbuffer()
240 entry[0](ui)
240 entry[0](ui)
241 rst.append(ui.popbuffer())
241 rst.append(ui.popbuffer())
242 return rst
242 return rst
243
243
244 # synopsis
244 # synopsis
245 if len(entry) > 2:
245 if len(entry) > 2:
246 if entry[2].startswith('hg'):
246 if entry[2].startswith('hg'):
247 rst.append("%s\n" % entry[2])
247 rst.append("%s\n" % entry[2])
248 else:
248 else:
249 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
249 rst.append('hg %s %s\n' % (aliases[0], entry[2]))
250 else:
250 else:
251 rst.append('hg %s\n' % aliases[0])
251 rst.append('hg %s\n' % aliases[0])
252 # aliases
252 # aliases
253 if full and not ui.quiet and len(aliases) > 1:
253 if full and not ui.quiet and len(aliases) > 1:
254 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
254 rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:]))
255 rst.append('\n')
255 rst.append('\n')
256
256
257 # description
257 # description
258 doc = gettext(entry[0].__doc__)
258 doc = gettext(entry[0].__doc__)
259 if not doc:
259 if not doc:
260 doc = _("(no help text available)")
260 doc = _("(no help text available)")
261 if util.safehasattr(entry[0], 'definition'): # aliased command
261 if util.safehasattr(entry[0], 'definition'): # aliased command
262 if entry[0].definition.startswith('!'): # shell alias
262 if entry[0].definition.startswith('!'): # shell alias
263 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
263 doc = _('shell alias for::\n\n %s') % entry[0].definition[1:]
264 else:
264 else:
265 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
265 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
266 doc = doc.splitlines(True)
266 doc = doc.splitlines(True)
267 if ui.quiet or not full:
267 if ui.quiet or not full:
268 rst.append(doc[0])
268 rst.append(doc[0])
269 else:
269 else:
270 rst.extend(doc)
270 rst.extend(doc)
271 rst.append('\n')
271 rst.append('\n')
272
272
273 # check if this command shadows a non-trivial (multi-line)
273 # check if this command shadows a non-trivial (multi-line)
274 # extension help text
274 # extension help text
275 try:
275 try:
276 mod = extensions.find(name)
276 mod = extensions.find(name)
277 doc = gettext(mod.__doc__) or ''
277 doc = gettext(mod.__doc__) or ''
278 if '\n' in doc.strip():
278 if '\n' in doc.strip():
279 msg = _('use "hg help -e %s" to show help for '
279 msg = _('use "hg help -e %s" to show help for '
280 'the %s extension') % (name, name)
280 'the %s extension') % (name, name)
281 rst.append('\n%s\n' % msg)
281 rst.append('\n%s\n' % msg)
282 except KeyError:
282 except KeyError:
283 pass
283 pass
284
284
285 # options
285 # options
286 if not ui.quiet and entry[1]:
286 if not ui.quiet and entry[1]:
287 rst.append('\n%s\n\n' % _("options:"))
287 rst.append('\n%s\n\n' % _("options:"))
288 rst.append(optrst(entry[1], ui.verbose))
288 rst.append(optrst(entry[1], ui.verbose))
289
289
290 if ui.verbose:
290 if ui.verbose:
291 rst.append('\n%s\n\n' % _("global options:"))
291 rst.append('\n%s\n\n' % _("global options:"))
292 rst.append(optrst(commands.globalopts, ui.verbose))
292 rst.append(optrst(commands.globalopts, ui.verbose))
293
293
294 if not ui.verbose:
294 if not ui.verbose:
295 if not full:
295 if not full:
296 rst.append(_('\nuse "hg help %s" to show the full help text\n')
296 rst.append(_('\nuse "hg help %s" to show the full help text\n')
297 % name)
297 % name)
298 elif not ui.quiet:
298 elif not ui.quiet:
299 omitted = _('use "hg -v help %s" to show more complete'
299 rst.append(_('\n(some details hidden, use --verbose '
300 ' help and the global options') % name
300 'to show complete help)'))
301 notomitted = _('use "hg -v help %s" to show'
302 ' the global options') % name
303 indicateomitted(rst, omitted, notomitted)
304
301
305 return rst
302 return rst
306
303
307
304
308 def helplist(select=None):
305 def helplist(select=None):
309 # list of commands
306 # list of commands
310 if name == "shortlist":
307 if name == "shortlist":
311 header = _('basic commands:\n\n')
308 header = _('basic commands:\n\n')
312 elif name == "debug":
309 elif name == "debug":
313 header = _('debug commands (internal and unsupported):\n\n')
310 header = _('debug commands (internal and unsupported):\n\n')
314 else:
311 else:
315 header = _('list of commands:\n\n')
312 header = _('list of commands:\n\n')
316
313
317 h = {}
314 h = {}
318 cmds = {}
315 cmds = {}
319 for c, e in commands.table.iteritems():
316 for c, e in commands.table.iteritems():
320 f = c.split("|", 1)[0]
317 f = c.split("|", 1)[0]
321 if select and not select(f):
318 if select and not select(f):
322 continue
319 continue
323 if (not select and name != 'shortlist' and
320 if (not select and name != 'shortlist' and
324 e[0].__module__ != commands.__name__):
321 e[0].__module__ != commands.__name__):
325 continue
322 continue
326 if name == "shortlist" and not f.startswith("^"):
323 if name == "shortlist" and not f.startswith("^"):
327 continue
324 continue
328 f = f.lstrip("^")
325 f = f.lstrip("^")
329 if not ui.debugflag and f.startswith("debug") and name != "debug":
326 if not ui.debugflag and f.startswith("debug") and name != "debug":
330 continue
327 continue
331 doc = e[0].__doc__
328 doc = e[0].__doc__
332 if doc and 'DEPRECATED' in doc and not ui.verbose:
329 if doc and 'DEPRECATED' in doc and not ui.verbose:
333 continue
330 continue
334 doc = gettext(doc)
331 doc = gettext(doc)
335 if not doc:
332 if not doc:
336 doc = _("(no help text available)")
333 doc = _("(no help text available)")
337 h[f] = doc.splitlines()[0].rstrip()
334 h[f] = doc.splitlines()[0].rstrip()
338 cmds[f] = c.lstrip("^")
335 cmds[f] = c.lstrip("^")
339
336
340 rst = []
337 rst = []
341 if not h:
338 if not h:
342 if not ui.quiet:
339 if not ui.quiet:
343 rst.append(_('no commands defined\n'))
340 rst.append(_('no commands defined\n'))
344 return rst
341 return rst
345
342
346 if not ui.quiet:
343 if not ui.quiet:
347 rst.append(header)
344 rst.append(header)
348 fns = sorted(h)
345 fns = sorted(h)
349 for f in fns:
346 for f in fns:
350 if ui.verbose:
347 if ui.verbose:
351 commacmds = cmds[f].replace("|",", ")
348 commacmds = cmds[f].replace("|",", ")
352 rst.append(" :%s: %s\n" % (commacmds, h[f]))
349 rst.append(" :%s: %s\n" % (commacmds, h[f]))
353 else:
350 else:
354 rst.append(' :%s: %s\n' % (f, h[f]))
351 rst.append(' :%s: %s\n' % (f, h[f]))
355
352
356 if not name:
353 if not name:
357 exts = listexts(_('enabled extensions:'), extensions.enabled())
354 exts = listexts(_('enabled extensions:'), extensions.enabled())
358 if exts:
355 if exts:
359 rst.append('\n')
356 rst.append('\n')
360 rst.extend(exts)
357 rst.extend(exts)
361
358
362 rst.append(_("\nadditional help topics:\n\n"))
359 rst.append(_("\nadditional help topics:\n\n"))
363 topics = []
360 topics = []
364 for names, header, doc in helptable:
361 for names, header, doc in helptable:
365 topics.append((names[0], header))
362 topics.append((names[0], header))
366 for t, desc in topics:
363 for t, desc in topics:
367 rst.append(" :%s: %s\n" % (t, desc))
364 rst.append(" :%s: %s\n" % (t, desc))
368
365
369 optlist = []
366 optlist = []
370 if not ui.quiet:
367 if not ui.quiet:
371 if ui.verbose:
368 if ui.verbose:
372 optlist.append((_("global options:"), commands.globalopts))
369 optlist.append((_("global options:"), commands.globalopts))
373 if name == 'shortlist':
370 if name == 'shortlist':
374 optlist.append((_('use "hg help" for the full list '
371 optlist.append((_('use "hg help" for the full list '
375 'of commands'), ()))
372 'of commands'), ()))
376 else:
373 else:
377 if name == 'shortlist':
374 if name == 'shortlist':
378 msg = _('use "hg help" for the full list of commands '
375 msg = _('use "hg help" for the full list of commands '
379 'or "hg -v" for details')
376 'or "hg -v" for details')
380 elif name and not full:
377 elif name and not full:
381 msg = _('use "hg help %s" to show the full help '
378 msg = _('use "hg help %s" to show the full help '
382 'text') % name
379 'text') % name
383 else:
380 else:
384 msg = _('use "hg -v help%s" to show builtin aliases and '
381 msg = _('use "hg -v help%s" to show builtin aliases and '
385 'global options') % (name and " " + name or "")
382 'global options') % (name and " " + name or "")
386 optlist.append((msg, ()))
383 optlist.append((msg, ()))
387
384
388 if optlist:
385 if optlist:
389 for title, options in optlist:
386 for title, options in optlist:
390 rst.append('\n%s\n' % title)
387 rst.append('\n%s\n' % title)
391 if options:
388 if options:
392 rst.append('\n%s\n' % optrst(options, ui.verbose))
389 rst.append('\n%s\n' % optrst(options, ui.verbose))
393 return rst
390 return rst
394
391
395 def helptopic(name):
392 def helptopic(name):
396 for names, header, doc in helptable:
393 for names, header, doc in helptable:
397 if name in names:
394 if name in names:
398 break
395 break
399 else:
396 else:
400 raise error.UnknownCommand(name)
397 raise error.UnknownCommand(name)
401
398
402 rst = [minirst.section(header)]
399 rst = [minirst.section(header)]
403
400
404 # description
401 # description
405 if not doc:
402 if not doc:
406 rst.append(" %s\n" % _("(no help text available)"))
403 rst.append(" %s\n" % _("(no help text available)"))
407 if callable(doc):
404 if callable(doc):
408 rst += [" %s\n" % l for l in doc().splitlines()]
405 rst += [" %s\n" % l for l in doc().splitlines()]
409
406
410 if not ui.verbose:
407 if not ui.verbose:
411 omitted = (_('use "hg help -v %s" to show more complete help') %
408 omitted = (_('use "hg help -v %s" to show more complete help') %
412 name)
409 name)
413 indicateomitted(rst, omitted)
410 indicateomitted(rst, omitted)
414
411
415 try:
412 try:
416 cmdutil.findcmd(name, commands.table)
413 cmdutil.findcmd(name, commands.table)
417 rst.append(_('\nuse "hg help -c %s" to see help for '
414 rst.append(_('\nuse "hg help -c %s" to see help for '
418 'the %s command\n') % (name, name))
415 'the %s command\n') % (name, name))
419 except error.UnknownCommand:
416 except error.UnknownCommand:
420 pass
417 pass
421 return rst
418 return rst
422
419
423 def helpext(name):
420 def helpext(name):
424 try:
421 try:
425 mod = extensions.find(name)
422 mod = extensions.find(name)
426 doc = gettext(mod.__doc__) or _('no help text available')
423 doc = gettext(mod.__doc__) or _('no help text available')
427 except KeyError:
424 except KeyError:
428 mod = None
425 mod = None
429 doc = extensions.disabledext(name)
426 doc = extensions.disabledext(name)
430 if not doc:
427 if not doc:
431 raise error.UnknownCommand(name)
428 raise error.UnknownCommand(name)
432
429
433 if '\n' not in doc:
430 if '\n' not in doc:
434 head, tail = doc, ""
431 head, tail = doc, ""
435 else:
432 else:
436 head, tail = doc.split('\n', 1)
433 head, tail = doc.split('\n', 1)
437 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)]
434 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)]
438 if tail:
435 if tail:
439 rst.extend(tail.splitlines(True))
436 rst.extend(tail.splitlines(True))
440 rst.append('\n')
437 rst.append('\n')
441
438
442 if not ui.verbose:
439 if not ui.verbose:
443 omitted = (_('use "hg help -v %s" to show more complete help') %
440 omitted = (_('use "hg help -v %s" to show more complete help') %
444 name)
441 name)
445 indicateomitted(rst, omitted)
442 indicateomitted(rst, omitted)
446
443
447 if mod:
444 if mod:
448 try:
445 try:
449 ct = mod.cmdtable
446 ct = mod.cmdtable
450 except AttributeError:
447 except AttributeError:
451 ct = {}
448 ct = {}
452 modcmds = set([c.split('|', 1)[0] for c in ct])
449 modcmds = set([c.split('|', 1)[0] for c in ct])
453 rst.extend(helplist(modcmds.__contains__))
450 rst.extend(helplist(modcmds.__contains__))
454 else:
451 else:
455 rst.append(_('use "hg help extensions" for information on enabling '
452 rst.append(_('use "hg help extensions" for information on enabling '
456 'extensions\n'))
453 'extensions\n'))
457 return rst
454 return rst
458
455
459 def helpextcmd(name):
456 def helpextcmd(name):
460 cmd, ext, mod = extensions.disabledcmd(ui, name,
457 cmd, ext, mod = extensions.disabledcmd(ui, name,
461 ui.configbool('ui', 'strict'))
458 ui.configbool('ui', 'strict'))
462 doc = gettext(mod.__doc__).splitlines()[0]
459 doc = gettext(mod.__doc__).splitlines()[0]
463
460
464 rst = listexts(_("'%s' is provided by the following "
461 rst = listexts(_("'%s' is provided by the following "
465 "extension:") % cmd, {ext: doc}, indent=4)
462 "extension:") % cmd, {ext: doc}, indent=4)
466 rst.append('\n')
463 rst.append('\n')
467 rst.append(_('use "hg help extensions" for information on enabling '
464 rst.append(_('use "hg help extensions" for information on enabling '
468 'extensions\n'))
465 'extensions\n'))
469 return rst
466 return rst
470
467
471
468
472 rst = []
469 rst = []
473 kw = opts.get('keyword')
470 kw = opts.get('keyword')
474 if kw:
471 if kw:
475 matches = topicmatch(kw)
472 matches = topicmatch(kw)
476 for t, title in (('topics', _('Topics')),
473 for t, title in (('topics', _('Topics')),
477 ('commands', _('Commands')),
474 ('commands', _('Commands')),
478 ('extensions', _('Extensions')),
475 ('extensions', _('Extensions')),
479 ('extensioncommands', _('Extension Commands'))):
476 ('extensioncommands', _('Extension Commands'))):
480 if matches[t]:
477 if matches[t]:
481 rst.append('%s:\n\n' % title)
478 rst.append('%s:\n\n' % title)
482 rst.extend(minirst.maketable(sorted(matches[t]), 1))
479 rst.extend(minirst.maketable(sorted(matches[t]), 1))
483 rst.append('\n')
480 rst.append('\n')
484 if not rst:
481 if not rst:
485 msg = _('no matches')
482 msg = _('no matches')
486 hint = _('try "hg help" for a list of topics')
483 hint = _('try "hg help" for a list of topics')
487 raise util.Abort(msg, hint=hint)
484 raise util.Abort(msg, hint=hint)
488 elif name and name != 'shortlist':
485 elif name and name != 'shortlist':
489 if unknowncmd:
486 if unknowncmd:
490 queries = (helpextcmd,)
487 queries = (helpextcmd,)
491 elif opts.get('extension'):
488 elif opts.get('extension'):
492 queries = (helpext,)
489 queries = (helpext,)
493 elif opts.get('command'):
490 elif opts.get('command'):
494 queries = (helpcmd,)
491 queries = (helpcmd,)
495 else:
492 else:
496 queries = (helptopic, helpcmd, helpext, helpextcmd)
493 queries = (helptopic, helpcmd, helpext, helpextcmd)
497 for f in queries:
494 for f in queries:
498 try:
495 try:
499 rst = f(name)
496 rst = f(name)
500 break
497 break
501 except error.UnknownCommand:
498 except error.UnknownCommand:
502 pass
499 pass
503 else:
500 else:
504 if unknowncmd:
501 if unknowncmd:
505 raise error.UnknownCommand(name)
502 raise error.UnknownCommand(name)
506 else:
503 else:
507 msg = _('no such help topic: %s') % name
504 msg = _('no such help topic: %s') % name
508 hint = _('try "hg help --keyword %s"') % name
505 hint = _('try "hg help --keyword %s"') % name
509 raise util.Abort(msg, hint=hint)
506 raise util.Abort(msg, hint=hint)
510 else:
507 else:
511 # program name
508 # program name
512 if not ui.quiet:
509 if not ui.quiet:
513 rst = [_("Mercurial Distributed SCM\n"), '\n']
510 rst = [_("Mercurial Distributed SCM\n"), '\n']
514 rst.extend(helplist())
511 rst.extend(helplist())
515
512
516 return ''.join(rst)
513 return ''.join(rst)
@@ -1,458 +1,458 b''
1 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
2 > [extensions]
3 > convert=
3 > convert=
4 > [convert]
4 > [convert]
5 > hg.saverev=False
5 > hg.saverev=False
6 > EOF
6 > EOF
7 $ hg help convert
7 $ hg help convert
8 hg convert [OPTION]... SOURCE [DEST [REVMAP]]
8 hg convert [OPTION]... SOURCE [DEST [REVMAP]]
9
9
10 convert a foreign SCM repository to a Mercurial one.
10 convert a foreign SCM repository to a Mercurial one.
11
11
12 Accepted source formats [identifiers]:
12 Accepted source formats [identifiers]:
13
13
14 - Mercurial [hg]
14 - Mercurial [hg]
15 - CVS [cvs]
15 - CVS [cvs]
16 - Darcs [darcs]
16 - Darcs [darcs]
17 - git [git]
17 - git [git]
18 - Subversion [svn]
18 - Subversion [svn]
19 - Monotone [mtn]
19 - Monotone [mtn]
20 - GNU Arch [gnuarch]
20 - GNU Arch [gnuarch]
21 - Bazaar [bzr]
21 - Bazaar [bzr]
22 - Perforce [p4]
22 - Perforce [p4]
23
23
24 Accepted destination formats [identifiers]:
24 Accepted destination formats [identifiers]:
25
25
26 - Mercurial [hg]
26 - Mercurial [hg]
27 - Subversion [svn] (history on branches is not preserved)
27 - Subversion [svn] (history on branches is not preserved)
28
28
29 If no revision is given, all revisions will be converted. Otherwise,
29 If no revision is given, all revisions will be converted. Otherwise,
30 convert will only import up to the named revision (given in a format
30 convert will only import up to the named revision (given in a format
31 understood by the source).
31 understood by the source).
32
32
33 If no destination directory name is specified, it defaults to the basename
33 If no destination directory name is specified, it defaults to the basename
34 of the source with "-hg" appended. If the destination repository doesn't
34 of the source with "-hg" appended. If the destination repository doesn't
35 exist, it will be created.
35 exist, it will be created.
36
36
37 By default, all sources except Mercurial will use --branchsort. Mercurial
37 By default, all sources except Mercurial will use --branchsort. Mercurial
38 uses --sourcesort to preserve original revision numbers order. Sort modes
38 uses --sourcesort to preserve original revision numbers order. Sort modes
39 have the following effects:
39 have the following effects:
40
40
41 --branchsort convert from parent to child revision when possible, which
41 --branchsort convert from parent to child revision when possible, which
42 means branches are usually converted one after the other.
42 means branches are usually converted one after the other.
43 It generates more compact repositories.
43 It generates more compact repositories.
44 --datesort sort revisions by date. Converted repositories have good-
44 --datesort sort revisions by date. Converted repositories have good-
45 looking changelogs but are often an order of magnitude
45 looking changelogs but are often an order of magnitude
46 larger than the same ones generated by --branchsort.
46 larger than the same ones generated by --branchsort.
47 --sourcesort try to preserve source revisions order, only supported by
47 --sourcesort try to preserve source revisions order, only supported by
48 Mercurial sources.
48 Mercurial sources.
49 --closesort try to move closed revisions as close as possible to parent
49 --closesort try to move closed revisions as close as possible to parent
50 branches, only supported by Mercurial sources.
50 branches, only supported by Mercurial sources.
51
51
52 If "REVMAP" isn't given, it will be put in a default location
52 If "REVMAP" isn't given, it will be put in a default location
53 ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that
53 ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that
54 maps each source commit ID to the destination ID for that revision, like
54 maps each source commit ID to the destination ID for that revision, like
55 so:
55 so:
56
56
57 <source ID> <destination ID>
57 <source ID> <destination ID>
58
58
59 If the file doesn't exist, it's automatically created. It's updated on
59 If the file doesn't exist, it's automatically created. It's updated on
60 each commit copied, so "hg convert" can be interrupted and can be run
60 each commit copied, so "hg convert" can be interrupted and can be run
61 repeatedly to copy new commits.
61 repeatedly to copy new commits.
62
62
63 The authormap is a simple text file that maps each source commit author to
63 The authormap is a simple text file that maps each source commit author to
64 a destination commit author. It is handy for source SCMs that use unix
64 a destination commit author. It is handy for source SCMs that use unix
65 logins to identify authors (e.g.: CVS). One line per author mapping and
65 logins to identify authors (e.g.: CVS). One line per author mapping and
66 the line format is:
66 the line format is:
67
67
68 source author = destination author
68 source author = destination author
69
69
70 Empty lines and lines starting with a "#" are ignored.
70 Empty lines and lines starting with a "#" are ignored.
71
71
72 The filemap is a file that allows filtering and remapping of files and
72 The filemap is a file that allows filtering and remapping of files and
73 directories. Each line can contain one of the following directives:
73 directories. Each line can contain one of the following directives:
74
74
75 include path/to/file-or-dir
75 include path/to/file-or-dir
76
76
77 exclude path/to/file-or-dir
77 exclude path/to/file-or-dir
78
78
79 rename path/to/source path/to/destination
79 rename path/to/source path/to/destination
80
80
81 Comment lines start with "#". A specified path matches if it equals the
81 Comment lines start with "#". A specified path matches if it equals the
82 full relative name of a file or one of its parent directories. The
82 full relative name of a file or one of its parent directories. The
83 "include" or "exclude" directive with the longest matching path applies,
83 "include" or "exclude" directive with the longest matching path applies,
84 so line order does not matter.
84 so line order does not matter.
85
85
86 The "include" directive causes a file, or all files under a directory, to
86 The "include" directive causes a file, or all files under a directory, to
87 be included in the destination repository. The default if there are no
87 be included in the destination repository. The default if there are no
88 "include" statements is to include everything. If there are any "include"
88 "include" statements is to include everything. If there are any "include"
89 statements, nothing else is included. The "exclude" directive causes files
89 statements, nothing else is included. The "exclude" directive causes files
90 or directories to be omitted. The "rename" directive renames a file or
90 or directories to be omitted. The "rename" directive renames a file or
91 directory if it is converted. To rename from a subdirectory into the root
91 directory if it is converted. To rename from a subdirectory into the root
92 of the repository, use "." as the path to rename to.
92 of the repository, use "." as the path to rename to.
93
93
94 The splicemap is a file that allows insertion of synthetic history,
94 The splicemap is a file that allows insertion of synthetic history,
95 letting you specify the parents of a revision. This is useful if you want
95 letting you specify the parents of a revision. This is useful if you want
96 to e.g. give a Subversion merge two parents, or graft two disconnected
96 to e.g. give a Subversion merge two parents, or graft two disconnected
97 series of history together. Each entry contains a key, followed by a
97 series of history together. Each entry contains a key, followed by a
98 space, followed by one or two comma-separated values:
98 space, followed by one or two comma-separated values:
99
99
100 key parent1, parent2
100 key parent1, parent2
101
101
102 The key is the revision ID in the source revision control system whose
102 The key is the revision ID in the source revision control system whose
103 parents should be modified (same format as a key in .hg/shamap). The
103 parents should be modified (same format as a key in .hg/shamap). The
104 values are the revision IDs (in either the source or destination revision
104 values are the revision IDs (in either the source or destination revision
105 control system) that should be used as the new parents for that node. For
105 control system) that should be used as the new parents for that node. For
106 example, if you have merged "release-1.0" into "trunk", then you should
106 example, if you have merged "release-1.0" into "trunk", then you should
107 specify the revision on "trunk" as the first parent and the one on the
107 specify the revision on "trunk" as the first parent and the one on the
108 "release-1.0" branch as the second.
108 "release-1.0" branch as the second.
109
109
110 The branchmap is a file that allows you to rename a branch when it is
110 The branchmap is a file that allows you to rename a branch when it is
111 being brought in from whatever external repository. When used in
111 being brought in from whatever external repository. When used in
112 conjunction with a splicemap, it allows for a powerful combination to help
112 conjunction with a splicemap, it allows for a powerful combination to help
113 fix even the most badly mismanaged repositories and turn them into nicely
113 fix even the most badly mismanaged repositories and turn them into nicely
114 structured Mercurial repositories. The branchmap contains lines of the
114 structured Mercurial repositories. The branchmap contains lines of the
115 form:
115 form:
116
116
117 original_branch_name new_branch_name
117 original_branch_name new_branch_name
118
118
119 where "original_branch_name" is the name of the branch in the source
119 where "original_branch_name" is the name of the branch in the source
120 repository, and "new_branch_name" is the name of the branch is the
120 repository, and "new_branch_name" is the name of the branch is the
121 destination repository. No whitespace is allowed in the branch names. This
121 destination repository. No whitespace is allowed in the branch names. This
122 can be used to (for instance) move code in one repository from "default"
122 can be used to (for instance) move code in one repository from "default"
123 to a named branch.
123 to a named branch.
124
124
125 Mercurial Source
125 Mercurial Source
126 ################
126 ################
127
127
128 The Mercurial source recognizes the following configuration options, which
128 The Mercurial source recognizes the following configuration options, which
129 you can set on the command line with "--config":
129 you can set on the command line with "--config":
130
130
131 convert.hg.ignoreerrors
131 convert.hg.ignoreerrors
132 ignore integrity errors when reading. Use it to fix
132 ignore integrity errors when reading. Use it to fix
133 Mercurial repositories with missing revlogs, by converting
133 Mercurial repositories with missing revlogs, by converting
134 from and to Mercurial. Default is False.
134 from and to Mercurial. Default is False.
135 convert.hg.saverev
135 convert.hg.saverev
136 store original revision ID in changeset (forces target IDs
136 store original revision ID in changeset (forces target IDs
137 to change). It takes a boolean argument and defaults to
137 to change). It takes a boolean argument and defaults to
138 False.
138 False.
139 convert.hg.revs
139 convert.hg.revs
140 revset specifying the source revisions to convert.
140 revset specifying the source revisions to convert.
141
141
142 CVS Source
142 CVS Source
143 ##########
143 ##########
144
144
145 CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
145 CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
146 indicate the starting point of what will be converted. Direct access to
146 indicate the starting point of what will be converted. Direct access to
147 the repository files is not needed, unless of course the repository is
147 the repository files is not needed, unless of course the repository is
148 ":local:". The conversion uses the top level directory in the sandbox to
148 ":local:". The conversion uses the top level directory in the sandbox to
149 find the CVS repository, and then uses CVS rlog commands to find files to
149 find the CVS repository, and then uses CVS rlog commands to find files to
150 convert. This means that unless a filemap is given, all files under the
150 convert. This means that unless a filemap is given, all files under the
151 starting directory will be converted, and that any directory
151 starting directory will be converted, and that any directory
152 reorganization in the CVS sandbox is ignored.
152 reorganization in the CVS sandbox is ignored.
153
153
154 The following options can be used with "--config":
154 The following options can be used with "--config":
155
155
156 convert.cvsps.cache
156 convert.cvsps.cache
157 Set to False to disable remote log caching, for testing and
157 Set to False to disable remote log caching, for testing and
158 debugging purposes. Default is True.
158 debugging purposes. Default is True.
159 convert.cvsps.fuzz
159 convert.cvsps.fuzz
160 Specify the maximum time (in seconds) that is allowed
160 Specify the maximum time (in seconds) that is allowed
161 between commits with identical user and log message in a
161 between commits with identical user and log message in a
162 single changeset. When very large files were checked in as
162 single changeset. When very large files were checked in as
163 part of a changeset then the default may not be long enough.
163 part of a changeset then the default may not be long enough.
164 The default is 60.
164 The default is 60.
165 convert.cvsps.mergeto
165 convert.cvsps.mergeto
166 Specify a regular expression to which commit log messages
166 Specify a regular expression to which commit log messages
167 are matched. If a match occurs, then the conversion process
167 are matched. If a match occurs, then the conversion process
168 will insert a dummy revision merging the branch on which
168 will insert a dummy revision merging the branch on which
169 this log message occurs to the branch indicated in the
169 this log message occurs to the branch indicated in the
170 regex. Default is "{{mergetobranch ([-\w]+)}}"
170 regex. Default is "{{mergetobranch ([-\w]+)}}"
171 convert.cvsps.mergefrom
171 convert.cvsps.mergefrom
172 Specify a regular expression to which commit log messages
172 Specify a regular expression to which commit log messages
173 are matched. If a match occurs, then the conversion process
173 are matched. If a match occurs, then the conversion process
174 will add the most recent revision on the branch indicated in
174 will add the most recent revision on the branch indicated in
175 the regex as the second parent of the changeset. Default is
175 the regex as the second parent of the changeset. Default is
176 "{{mergefrombranch ([-\w]+)}}"
176 "{{mergefrombranch ([-\w]+)}}"
177 convert.localtimezone
177 convert.localtimezone
178 use local time (as determined by the TZ environment
178 use local time (as determined by the TZ environment
179 variable) for changeset date/times. The default is False
179 variable) for changeset date/times. The default is False
180 (use UTC).
180 (use UTC).
181 hooks.cvslog Specify a Python function to be called at the end of
181 hooks.cvslog Specify a Python function to be called at the end of
182 gathering the CVS log. The function is passed a list with
182 gathering the CVS log. The function is passed a list with
183 the log entries, and can modify the entries in-place, or add
183 the log entries, and can modify the entries in-place, or add
184 or delete them.
184 or delete them.
185 hooks.cvschangesets
185 hooks.cvschangesets
186 Specify a Python function to be called after the changesets
186 Specify a Python function to be called after the changesets
187 are calculated from the CVS log. The function is passed a
187 are calculated from the CVS log. The function is passed a
188 list with the changeset entries, and can modify the
188 list with the changeset entries, and can modify the
189 changesets in-place, or add or delete them.
189 changesets in-place, or add or delete them.
190
190
191 An additional "debugcvsps" Mercurial command allows the builtin changeset
191 An additional "debugcvsps" Mercurial command allows the builtin changeset
192 merging code to be run without doing a conversion. Its parameters and
192 merging code to be run without doing a conversion. Its parameters and
193 output are similar to that of cvsps 2.1. Please see the command help for
193 output are similar to that of cvsps 2.1. Please see the command help for
194 more details.
194 more details.
195
195
196 Subversion Source
196 Subversion Source
197 #################
197 #################
198
198
199 Subversion source detects classical trunk/branches/tags layouts. By
199 Subversion source detects classical trunk/branches/tags layouts. By
200 default, the supplied "svn://repo/path/" source URL is converted as a
200 default, the supplied "svn://repo/path/" source URL is converted as a
201 single branch. If "svn://repo/path/trunk" exists it replaces the default
201 single branch. If "svn://repo/path/trunk" exists it replaces the default
202 branch. If "svn://repo/path/branches" exists, its subdirectories are
202 branch. If "svn://repo/path/branches" exists, its subdirectories are
203 listed as possible branches. If "svn://repo/path/tags" exists, it is
203 listed as possible branches. If "svn://repo/path/tags" exists, it is
204 looked for tags referencing converted branches. Default "trunk",
204 looked for tags referencing converted branches. Default "trunk",
205 "branches" and "tags" values can be overridden with following options. Set
205 "branches" and "tags" values can be overridden with following options. Set
206 them to paths relative to the source URL, or leave them blank to disable
206 them to paths relative to the source URL, or leave them blank to disable
207 auto detection.
207 auto detection.
208
208
209 The following options can be set with "--config":
209 The following options can be set with "--config":
210
210
211 convert.svn.branches
211 convert.svn.branches
212 specify the directory containing branches. The default is
212 specify the directory containing branches. The default is
213 "branches".
213 "branches".
214 convert.svn.tags
214 convert.svn.tags
215 specify the directory containing tags. The default is
215 specify the directory containing tags. The default is
216 "tags".
216 "tags".
217 convert.svn.trunk
217 convert.svn.trunk
218 specify the name of the trunk branch. The default is
218 specify the name of the trunk branch. The default is
219 "trunk".
219 "trunk".
220 convert.localtimezone
220 convert.localtimezone
221 use local time (as determined by the TZ environment
221 use local time (as determined by the TZ environment
222 variable) for changeset date/times. The default is False
222 variable) for changeset date/times. The default is False
223 (use UTC).
223 (use UTC).
224
224
225 Source history can be retrieved starting at a specific revision, instead
225 Source history can be retrieved starting at a specific revision, instead
226 of being integrally converted. Only single branch conversions are
226 of being integrally converted. Only single branch conversions are
227 supported.
227 supported.
228
228
229 convert.svn.startrev
229 convert.svn.startrev
230 specify start Subversion revision number. The default is 0.
230 specify start Subversion revision number. The default is 0.
231
231
232 Perforce Source
232 Perforce Source
233 ###############
233 ###############
234
234
235 The Perforce (P4) importer can be given a p4 depot path or a client
235 The Perforce (P4) importer can be given a p4 depot path or a client
236 specification as source. It will convert all files in the source to a flat
236 specification as source. It will convert all files in the source to a flat
237 Mercurial repository, ignoring labels, branches and integrations. Note
237 Mercurial repository, ignoring labels, branches and integrations. Note
238 that when a depot path is given you then usually should specify a target
238 that when a depot path is given you then usually should specify a target
239 directory, because otherwise the target may be named "...-hg".
239 directory, because otherwise the target may be named "...-hg".
240
240
241 It is possible to limit the amount of source history to be converted by
241 It is possible to limit the amount of source history to be converted by
242 specifying an initial Perforce revision:
242 specifying an initial Perforce revision:
243
243
244 convert.p4.startrev
244 convert.p4.startrev
245 specify initial Perforce revision (a Perforce changelist
245 specify initial Perforce revision (a Perforce changelist
246 number).
246 number).
247
247
248 Mercurial Destination
248 Mercurial Destination
249 #####################
249 #####################
250
250
251 The following options are supported:
251 The following options are supported:
252
252
253 convert.hg.clonebranches
253 convert.hg.clonebranches
254 dispatch source branches in separate clones. The default is
254 dispatch source branches in separate clones. The default is
255 False.
255 False.
256 convert.hg.tagsbranch
256 convert.hg.tagsbranch
257 branch name for tag revisions, defaults to "default".
257 branch name for tag revisions, defaults to "default".
258 convert.hg.usebranchnames
258 convert.hg.usebranchnames
259 preserve branch names. The default is True.
259 preserve branch names. The default is True.
260
260
261 options:
261 options:
262
262
263 -s --source-type TYPE source repository type
263 -s --source-type TYPE source repository type
264 -d --dest-type TYPE destination repository type
264 -d --dest-type TYPE destination repository type
265 -r --rev REV import up to source revision REV
265 -r --rev REV import up to source revision REV
266 -A --authormap FILE remap usernames using this file
266 -A --authormap FILE remap usernames using this file
267 --filemap FILE remap file names using contents of file
267 --filemap FILE remap file names using contents of file
268 --splicemap FILE splice synthesized history into place
268 --splicemap FILE splice synthesized history into place
269 --branchmap FILE change branch names while converting
269 --branchmap FILE change branch names while converting
270 --branchsort try to sort changesets by branches
270 --branchsort try to sort changesets by branches
271 --datesort try to sort changesets by date
271 --datesort try to sort changesets by date
272 --sourcesort preserve source changesets order
272 --sourcesort preserve source changesets order
273 --closesort try to reorder closed revisions
273 --closesort try to reorder closed revisions
274
274
275 use "hg -v help convert" to show the global options
275 (some details hidden, use --verbose to show complete help)
276 $ hg init a
276 $ hg init a
277 $ cd a
277 $ cd a
278 $ echo a > a
278 $ echo a > a
279 $ hg ci -d'0 0' -Ama
279 $ hg ci -d'0 0' -Ama
280 adding a
280 adding a
281 $ hg cp a b
281 $ hg cp a b
282 $ hg ci -d'1 0' -mb
282 $ hg ci -d'1 0' -mb
283 $ hg rm a
283 $ hg rm a
284 $ hg ci -d'2 0' -mc
284 $ hg ci -d'2 0' -mc
285 $ hg mv b a
285 $ hg mv b a
286 $ hg ci -d'3 0' -md
286 $ hg ci -d'3 0' -md
287 $ echo a >> a
287 $ echo a >> a
288 $ hg ci -d'4 0' -me
288 $ hg ci -d'4 0' -me
289 $ cd ..
289 $ cd ..
290 $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded'
290 $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded'
291 assuming destination a-hg
291 assuming destination a-hg
292 initializing destination a-hg repository
292 initializing destination a-hg repository
293 scanning source...
293 scanning source...
294 sorting...
294 sorting...
295 converting...
295 converting...
296 4 a
296 4 a
297 3 b
297 3 b
298 2 c
298 2 c
299 1 d
299 1 d
300 0 e
300 0 e
301 $ hg --cwd a-hg pull ../a
301 $ hg --cwd a-hg pull ../a
302 pulling from ../a
302 pulling from ../a
303 searching for changes
303 searching for changes
304 no changes found
304 no changes found
305
305
306 conversion to existing file should fail
306 conversion to existing file should fail
307
307
308 $ touch bogusfile
308 $ touch bogusfile
309 $ hg convert a bogusfile
309 $ hg convert a bogusfile
310 initializing destination bogusfile repository
310 initializing destination bogusfile repository
311 abort: cannot create new bundle repository
311 abort: cannot create new bundle repository
312 [255]
312 [255]
313
313
314 #if unix-permissions no-root
314 #if unix-permissions no-root
315
315
316 conversion to dir without permissions should fail
316 conversion to dir without permissions should fail
317
317
318 $ mkdir bogusdir
318 $ mkdir bogusdir
319 $ chmod 000 bogusdir
319 $ chmod 000 bogusdir
320
320
321 $ hg convert a bogusdir
321 $ hg convert a bogusdir
322 abort: Permission denied: 'bogusdir'
322 abort: Permission denied: 'bogusdir'
323 [255]
323 [255]
324
324
325 user permissions should succeed
325 user permissions should succeed
326
326
327 $ chmod 700 bogusdir
327 $ chmod 700 bogusdir
328 $ hg convert a bogusdir
328 $ hg convert a bogusdir
329 initializing destination bogusdir repository
329 initializing destination bogusdir repository
330 scanning source...
330 scanning source...
331 sorting...
331 sorting...
332 converting...
332 converting...
333 4 a
333 4 a
334 3 b
334 3 b
335 2 c
335 2 c
336 1 d
336 1 d
337 0 e
337 0 e
338
338
339 #endif
339 #endif
340
340
341 test pre and post conversion actions
341 test pre and post conversion actions
342
342
343 $ echo 'include b' > filemap
343 $ echo 'include b' > filemap
344 $ hg convert --debug --filemap filemap a partialb | \
344 $ hg convert --debug --filemap filemap a partialb | \
345 > grep 'run hg'
345 > grep 'run hg'
346 run hg source pre-conversion action
346 run hg source pre-conversion action
347 run hg sink pre-conversion action
347 run hg sink pre-conversion action
348 run hg sink post-conversion action
348 run hg sink post-conversion action
349 run hg source post-conversion action
349 run hg source post-conversion action
350
350
351 converting empty dir should fail "nicely
351 converting empty dir should fail "nicely
352
352
353 $ mkdir emptydir
353 $ mkdir emptydir
354
354
355 override $PATH to ensure p4 not visible; use $PYTHON in case we're
355 override $PATH to ensure p4 not visible; use $PYTHON in case we're
356 running from a devel copy, not a temp installation
356 running from a devel copy, not a temp installation
357
357
358 $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir
358 $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir
359 assuming destination emptydir-hg
359 assuming destination emptydir-hg
360 initializing destination emptydir-hg repository
360 initializing destination emptydir-hg repository
361 emptydir does not look like a CVS checkout
361 emptydir does not look like a CVS checkout
362 emptydir does not look like a Git repository
362 emptydir does not look like a Git repository
363 emptydir does not look like a Subversion repository
363 emptydir does not look like a Subversion repository
364 emptydir is not a local Mercurial repository
364 emptydir is not a local Mercurial repository
365 emptydir does not look like a darcs repository
365 emptydir does not look like a darcs repository
366 emptydir does not look like a monotone repository
366 emptydir does not look like a monotone repository
367 emptydir does not look like a GNU Arch repository
367 emptydir does not look like a GNU Arch repository
368 emptydir does not look like a Bazaar repository
368 emptydir does not look like a Bazaar repository
369 cannot find required "p4" tool
369 cannot find required "p4" tool
370 abort: emptydir: missing or unsupported repository
370 abort: emptydir: missing or unsupported repository
371 [255]
371 [255]
372
372
373 convert with imaginary source type
373 convert with imaginary source type
374
374
375 $ hg convert --source-type foo a a-foo
375 $ hg convert --source-type foo a a-foo
376 initializing destination a-foo repository
376 initializing destination a-foo repository
377 abort: foo: invalid source repository type
377 abort: foo: invalid source repository type
378 [255]
378 [255]
379
379
380 convert with imaginary sink type
380 convert with imaginary sink type
381
381
382 $ hg convert --dest-type foo a a-foo
382 $ hg convert --dest-type foo a a-foo
383 abort: foo: invalid destination repository type
383 abort: foo: invalid destination repository type
384 [255]
384 [255]
385
385
386 testing: convert must not produce duplicate entries in fncache
386 testing: convert must not produce duplicate entries in fncache
387
387
388 $ hg convert a b
388 $ hg convert a b
389 initializing destination b repository
389 initializing destination b repository
390 scanning source...
390 scanning source...
391 sorting...
391 sorting...
392 converting...
392 converting...
393 4 a
393 4 a
394 3 b
394 3 b
395 2 c
395 2 c
396 1 d
396 1 d
397 0 e
397 0 e
398
398
399 contents of fncache file:
399 contents of fncache file:
400
400
401 $ cat b/.hg/store/fncache | sort
401 $ cat b/.hg/store/fncache | sort
402 data/a.i
402 data/a.i
403 data/b.i
403 data/b.i
404
404
405 test bogus URL
405 test bogus URL
406
406
407 $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz
407 $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz
408 abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository
408 abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository
409 [255]
409 [255]
410
410
411 test revset converted() lookup
411 test revset converted() lookup
412
412
413 $ hg --config convert.hg.saverev=True convert a c
413 $ hg --config convert.hg.saverev=True convert a c
414 initializing destination c repository
414 initializing destination c repository
415 scanning source...
415 scanning source...
416 sorting...
416 sorting...
417 converting...
417 converting...
418 4 a
418 4 a
419 3 b
419 3 b
420 2 c
420 2 c
421 1 d
421 1 d
422 0 e
422 0 e
423 $ echo f > c/f
423 $ echo f > c/f
424 $ hg -R c ci -d'0 0' -Amf
424 $ hg -R c ci -d'0 0' -Amf
425 adding f
425 adding f
426 created new head
426 created new head
427 $ hg -R c log -r "converted(09d945a62ce6)"
427 $ hg -R c log -r "converted(09d945a62ce6)"
428 changeset: 1:98c3dd46a874
428 changeset: 1:98c3dd46a874
429 user: test
429 user: test
430 date: Thu Jan 01 00:00:01 1970 +0000
430 date: Thu Jan 01 00:00:01 1970 +0000
431 summary: b
431 summary: b
432
432
433 $ hg -R c log -r "converted()"
433 $ hg -R c log -r "converted()"
434 changeset: 0:31ed57b2037c
434 changeset: 0:31ed57b2037c
435 user: test
435 user: test
436 date: Thu Jan 01 00:00:00 1970 +0000
436 date: Thu Jan 01 00:00:00 1970 +0000
437 summary: a
437 summary: a
438
438
439 changeset: 1:98c3dd46a874
439 changeset: 1:98c3dd46a874
440 user: test
440 user: test
441 date: Thu Jan 01 00:00:01 1970 +0000
441 date: Thu Jan 01 00:00:01 1970 +0000
442 summary: b
442 summary: b
443
443
444 changeset: 2:3b9ca06ef716
444 changeset: 2:3b9ca06ef716
445 user: test
445 user: test
446 date: Thu Jan 01 00:00:02 1970 +0000
446 date: Thu Jan 01 00:00:02 1970 +0000
447 summary: c
447 summary: c
448
448
449 changeset: 3:4e0debd37cf2
449 changeset: 3:4e0debd37cf2
450 user: test
450 user: test
451 date: Thu Jan 01 00:00:03 1970 +0000
451 date: Thu Jan 01 00:00:03 1970 +0000
452 summary: d
452 summary: d
453
453
454 changeset: 4:9de3bc9349c5
454 changeset: 4:9de3bc9349c5
455 user: test
455 user: test
456 date: Thu Jan 01 00:00:04 1970 +0000
456 date: Thu Jan 01 00:00:04 1970 +0000
457 summary: e
457 summary: e
458
458
@@ -1,152 +1,152 b''
1 Test alignment of multibyte characters
1 Test alignment of multibyte characters
2
2
3 $ HGENCODING=utf-8
3 $ HGENCODING=utf-8
4 $ export HGENCODING
4 $ export HGENCODING
5 $ hg init t
5 $ hg init t
6 $ cd t
6 $ cd t
7 $ python << EOF
7 $ python << EOF
8 > # (byte, width) = (6, 4)
8 > # (byte, width) = (6, 4)
9 > s = "\xe7\x9f\xad\xe5\x90\x8d"
9 > s = "\xe7\x9f\xad\xe5\x90\x8d"
10 > # (byte, width) = (7, 7): odd width is good for alignment test
10 > # (byte, width) = (7, 7): odd width is good for alignment test
11 > m = "MIDDLE_"
11 > m = "MIDDLE_"
12 > # (byte, width) = (18, 12)
12 > # (byte, width) = (18, 12)
13 > l = "\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d"
13 > l = "\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d"
14 > f = file('s', 'w'); f.write(s); f.close()
14 > f = file('s', 'w'); f.write(s); f.close()
15 > f = file('m', 'w'); f.write(m); f.close()
15 > f = file('m', 'w'); f.write(m); f.close()
16 > f = file('l', 'w'); f.write(l); f.close()
16 > f = file('l', 'w'); f.write(l); f.close()
17 > # instant extension to show list of options
17 > # instant extension to show list of options
18 > f = file('showoptlist.py', 'w'); f.write("""# encoding: utf-8
18 > f = file('showoptlist.py', 'w'); f.write("""# encoding: utf-8
19 > from mercurial import cmdutil
19 > from mercurial import cmdutil
20 > cmdtable = {}
20 > cmdtable = {}
21 > command = cmdutil.command(cmdtable)
21 > command = cmdutil.command(cmdtable)
22 >
22 >
23 > @command('showoptlist',
23 > @command('showoptlist',
24 > [('s', 'opt1', '', 'short width' + ' %(s)s' * 8, '%(s)s'),
24 > [('s', 'opt1', '', 'short width' + ' %(s)s' * 8, '%(s)s'),
25 > ('m', 'opt2', '', 'middle width' + ' %(m)s' * 8, '%(m)s'),
25 > ('m', 'opt2', '', 'middle width' + ' %(m)s' * 8, '%(m)s'),
26 > ('l', 'opt3', '', 'long width' + ' %(l)s' * 8, '%(l)s')],
26 > ('l', 'opt3', '', 'long width' + ' %(l)s' * 8, '%(l)s')],
27 > '')
27 > '')
28 > def showoptlist(ui, repo, *pats, **opts):
28 > def showoptlist(ui, repo, *pats, **opts):
29 > '''dummy command to show option descriptions'''
29 > '''dummy command to show option descriptions'''
30 > return 0
30 > return 0
31 > """ % globals())
31 > """ % globals())
32 > f.close()
32 > f.close()
33 > EOF
33 > EOF
34 $ S=`cat s`
34 $ S=`cat s`
35 $ M=`cat m`
35 $ M=`cat m`
36 $ L=`cat l`
36 $ L=`cat l`
37
37
38 alignment of option descriptions in help
38 alignment of option descriptions in help
39
39
40 $ cat <<EOF > .hg/hgrc
40 $ cat <<EOF > .hg/hgrc
41 > [extensions]
41 > [extensions]
42 > ja_ext = `pwd`/showoptlist.py
42 > ja_ext = `pwd`/showoptlist.py
43 > EOF
43 > EOF
44
44
45 check alignment of option descriptions in help
45 check alignment of option descriptions in help
46
46
47 $ hg help showoptlist
47 $ hg help showoptlist
48 hg showoptlist
48 hg showoptlist
49
49
50 dummy command to show option descriptions
50 dummy command to show option descriptions
51
51
52 options:
52 options:
53
53
54 -s --opt1 \xe7\x9f\xad\xe5\x90\x8d short width \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d (esc)
54 -s --opt1 \xe7\x9f\xad\xe5\x90\x8d short width \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d (esc)
55 -m --opt2 MIDDLE_ middle width MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_
55 -m --opt2 MIDDLE_ middle width MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_
56 MIDDLE_ MIDDLE_ MIDDLE_
56 MIDDLE_ MIDDLE_ MIDDLE_
57 -l --opt3 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d long width \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
57 -l --opt3 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d long width \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
58 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
58 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
59 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
59 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
60
60
61 use "hg -v help showoptlist" to show the global options
61 (some details hidden, use --verbose to show complete help)
62
62
63
63
64 $ rm -f s; touch s
64 $ rm -f s; touch s
65 $ rm -f m; touch m
65 $ rm -f m; touch m
66 $ rm -f l; touch l
66 $ rm -f l; touch l
67
67
68 add files
68 add files
69
69
70 $ cp s $S
70 $ cp s $S
71 $ hg add $S
71 $ hg add $S
72 $ cp m $M
72 $ cp m $M
73 $ hg add $M
73 $ hg add $M
74 $ cp l $L
74 $ cp l $L
75 $ hg add $L
75 $ hg add $L
76
76
77 commit(1)
77 commit(1)
78
78
79 $ echo 'first line(1)' >> s; cp s $S
79 $ echo 'first line(1)' >> s; cp s $S
80 $ echo 'first line(2)' >> m; cp m $M
80 $ echo 'first line(2)' >> m; cp m $M
81 $ echo 'first line(3)' >> l; cp l $L
81 $ echo 'first line(3)' >> l; cp l $L
82 $ hg commit -m 'first commit' -u $S
82 $ hg commit -m 'first commit' -u $S
83
83
84 commit(2)
84 commit(2)
85
85
86 $ echo 'second line(1)' >> s; cp s $S
86 $ echo 'second line(1)' >> s; cp s $S
87 $ echo 'second line(2)' >> m; cp m $M
87 $ echo 'second line(2)' >> m; cp m $M
88 $ echo 'second line(3)' >> l; cp l $L
88 $ echo 'second line(3)' >> l; cp l $L
89 $ hg commit -m 'second commit' -u $M
89 $ hg commit -m 'second commit' -u $M
90
90
91 commit(3)
91 commit(3)
92
92
93 $ echo 'third line(1)' >> s; cp s $S
93 $ echo 'third line(1)' >> s; cp s $S
94 $ echo 'third line(2)' >> m; cp m $M
94 $ echo 'third line(2)' >> m; cp m $M
95 $ echo 'third line(3)' >> l; cp l $L
95 $ echo 'third line(3)' >> l; cp l $L
96 $ hg commit -m 'third commit' -u $L
96 $ hg commit -m 'third commit' -u $L
97
97
98 check alignment of user names in annotate
98 check alignment of user names in annotate
99
99
100 $ hg annotate -u $M
100 $ hg annotate -u $M
101 \xe7\x9f\xad\xe5\x90\x8d: first line(2) (esc)
101 \xe7\x9f\xad\xe5\x90\x8d: first line(2) (esc)
102 MIDDLE_: second line(2)
102 MIDDLE_: second line(2)
103 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d: third line(2) (esc)
103 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d: third line(2) (esc)
104
104
105 check alignment of filenames in diffstat
105 check alignment of filenames in diffstat
106
106
107 $ hg diff -c tip --stat
107 $ hg diff -c tip --stat
108 MIDDLE_ | 1 +
108 MIDDLE_ | 1 +
109 \xe7\x9f\xad\xe5\x90\x8d | 1 + (esc)
109 \xe7\x9f\xad\xe5\x90\x8d | 1 + (esc)
110 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d | 1 + (esc)
110 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d | 1 + (esc)
111 3 files changed, 3 insertions(+), 0 deletions(-)
111 3 files changed, 3 insertions(+), 0 deletions(-)
112
112
113 add branches/tags
113 add branches/tags
114
114
115 $ hg branch $S
115 $ hg branch $S
116 marked working directory as branch \xe7\x9f\xad\xe5\x90\x8d (esc)
116 marked working directory as branch \xe7\x9f\xad\xe5\x90\x8d (esc)
117 (branches are permanent and global, did you want a bookmark?)
117 (branches are permanent and global, did you want a bookmark?)
118 $ hg tag $S
118 $ hg tag $S
119 $ hg book -f $S
119 $ hg book -f $S
120 $ hg branch $M
120 $ hg branch $M
121 marked working directory as branch MIDDLE_
121 marked working directory as branch MIDDLE_
122 (branches are permanent and global, did you want a bookmark?)
122 (branches are permanent and global, did you want a bookmark?)
123 $ hg tag $M
123 $ hg tag $M
124 $ hg book -f $M
124 $ hg book -f $M
125 $ hg branch $L
125 $ hg branch $L
126 marked working directory as branch \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
126 marked working directory as branch \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
127 (branches are permanent and global, did you want a bookmark?)
127 (branches are permanent and global, did you want a bookmark?)
128 $ hg tag $L
128 $ hg tag $L
129 $ hg book -f $L
129 $ hg book -f $L
130
130
131 check alignment of branches
131 check alignment of branches
132
132
133 $ hg branches
133 $ hg branches
134 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 5:d745ff46155b (esc)
134 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 5:d745ff46155b (esc)
135 MIDDLE_ 4:9259be597f19 (inactive)
135 MIDDLE_ 4:9259be597f19 (inactive)
136 \xe7\x9f\xad\xe5\x90\x8d 3:b06c5b6def9e (inactive) (esc)
136 \xe7\x9f\xad\xe5\x90\x8d 3:b06c5b6def9e (inactive) (esc)
137 default 2:64a70663cee8 (inactive)
137 default 2:64a70663cee8 (inactive)
138
138
139 check alignment of tags
139 check alignment of tags
140
140
141 $ hg tags
141 $ hg tags
142 tip 5:d745ff46155b
142 tip 5:d745ff46155b
143 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 4:9259be597f19 (esc)
143 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 4:9259be597f19 (esc)
144 MIDDLE_ 3:b06c5b6def9e
144 MIDDLE_ 3:b06c5b6def9e
145 \xe7\x9f\xad\xe5\x90\x8d 2:64a70663cee8 (esc)
145 \xe7\x9f\xad\xe5\x90\x8d 2:64a70663cee8 (esc)
146
146
147 check alignment of bookmarks
147 check alignment of bookmarks
148
148
149 $ hg book
149 $ hg book
150 MIDDLE_ 5:d745ff46155b
150 MIDDLE_ 5:d745ff46155b
151 \xe7\x9f\xad\xe5\x90\x8d 4:9259be597f19 (esc)
151 \xe7\x9f\xad\xe5\x90\x8d 4:9259be597f19 (esc)
152 * \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 5:d745ff46155b (esc)
152 * \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 5:d745ff46155b (esc)
@@ -1,261 +1,261 b''
1 Test text wrapping for multibyte characters
1 Test text wrapping for multibyte characters
2
2
3 $ mkdir t
3 $ mkdir t
4 $ cd t
4 $ cd t
5
5
6 define commands to display help text
6 define commands to display help text
7
7
8 $ cat << EOF > show.py
8 $ cat << EOF > show.py
9 > from mercurial import cmdutil
9 > from mercurial import cmdutil
10 >
10 >
11 > cmdtable = {}
11 > cmdtable = {}
12 > command = cmdutil.command(cmdtable)
12 > command = cmdutil.command(cmdtable)
13 >
13 >
14 > # Japanese full-width characters:
14 > # Japanese full-width characters:
15 > @command('show_full_ja', [], '')
15 > @command('show_full_ja', [], '')
16 > def show_full_ja(ui, **opts):
16 > def show_full_ja(ui, **opts):
17 > u'''\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051
17 > u'''\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051
18 >
18 >
19 > \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051
19 > \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051
20 >
20 >
21 > \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051
21 > \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051
22 > '''
22 > '''
23 >
23 >
24 > # Japanese half-width characters:
24 > # Japanese half-width characters:
25 > @command('show_half_ja', [], '')
25 > @command('show_half_ja', [], '')
26 > def show_half_ja(ui, *opts):
26 > def show_half_ja(ui, *opts):
27 > u'''\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79
27 > u'''\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79
28 >
28 >
29 > \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79
29 > \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79
30 >
30 >
31 > \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79
31 > \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79
32 > '''
32 > '''
33 >
33 >
34 > # Japanese ambiguous-width characters:
34 > # Japanese ambiguous-width characters:
35 > @command('show_ambig_ja', [], '')
35 > @command('show_ambig_ja', [], '')
36 > def show_ambig_ja(ui, **opts):
36 > def show_ambig_ja(ui, **opts):
37 > u'''\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb
37 > u'''\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb
38 >
38 >
39 > \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb
39 > \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb
40 >
40 >
41 > \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb
41 > \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb
42 > '''
42 > '''
43 >
43 >
44 > # Russian ambiguous-width characters:
44 > # Russian ambiguous-width characters:
45 > @command('show_ambig_ru', [], '')
45 > @command('show_ambig_ru', [], '')
46 > def show_ambig_ru(ui, **opts):
46 > def show_ambig_ru(ui, **opts):
47 > u'''\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
47 > u'''\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
48 >
48 >
49 > \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
49 > \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
50 >
50 >
51 > \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
51 > \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
52 > '''
52 > '''
53 > EOF
53 > EOF
54
54
55 "COLUMNS=60" means that there is no lines which has grater than 58 width
55 "COLUMNS=60" means that there is no lines which has grater than 58 width
56
56
57 (1) test text wrapping for non-ambiguous-width characters
57 (1) test text wrapping for non-ambiguous-width characters
58
58
59 (1-1) display Japanese full-width characters in cp932
59 (1-1) display Japanese full-width characters in cp932
60
60
61 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_full_ja
61 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_full_ja
62 hg show_full_ja
62 hg show_full_ja
63
63
64 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
64 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
65
65
66 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
66 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
67 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
67 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
68
68
69 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
69 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
70 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
70 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
71
71
72 use "hg -v help show_full_ja" to show the global options
72 (some details hidden, use --verbose to show complete help)
73
73
74 (1-2) display Japanese full-width characters in utf-8
74 (1-2) display Japanese full-width characters in utf-8
75
75
76 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_full_ja
76 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_full_ja
77 hg show_full_ja
77 hg show_full_ja
78
78
79 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
79 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
80
80
81 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
81 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
82 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
82 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
83
83
84 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
84 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
85 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
85 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
86
86
87 use "hg -v help show_full_ja" to show the global options
87 (some details hidden, use --verbose to show complete help)
88
88
89
89
90 (1-3) display Japanese half-width characters in cp932
90 (1-3) display Japanese half-width characters in cp932
91
91
92 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_half_ja
92 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_half_ja
93 hg show_half_ja
93 hg show_half_ja
94
94
95 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
95 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
96
96
97 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
97 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
98 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
98 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
99
99
100 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
100 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
101 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
101 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
102
102
103 use "hg -v help show_half_ja" to show the global options
103 (some details hidden, use --verbose to show complete help)
104
104
105 (1-4) display Japanese half-width characters in utf-8
105 (1-4) display Japanese half-width characters in utf-8
106
106
107 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_half_ja
107 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_half_ja
108 hg show_half_ja
108 hg show_half_ja
109
109
110 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
110 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
111
111
112 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
112 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
113 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
113 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
114
114
115 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
115 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
116 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
116 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
117
117
118 use "hg -v help show_half_ja" to show the global options
118 (some details hidden, use --verbose to show complete help)
119
119
120
120
121
121
122 (2) test text wrapping for ambiguous-width characters
122 (2) test text wrapping for ambiguous-width characters
123
123
124 (2-1) treat width of ambiguous characters as narrow (default)
124 (2-1) treat width of ambiguous characters as narrow (default)
125
125
126 (2-1-1) display Japanese ambiguous-width characters in cp932
126 (2-1-1) display Japanese ambiguous-width characters in cp932
127
127
128 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
128 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
129 hg show_ambig_ja
129 hg show_ambig_ja
130
130
131 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
131 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
132
132
133 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
133 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
134 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
134 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
135
135
136 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
136 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
137 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
137 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
138
138
139 use "hg -v help show_ambig_ja" to show the global options
139 (some details hidden, use --verbose to show complete help)
140
140
141 (2-1-2) display Japanese ambiguous-width characters in utf-8
141 (2-1-2) display Japanese ambiguous-width characters in utf-8
142
142
143 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
143 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
144 hg show_ambig_ja
144 hg show_ambig_ja
145
145
146 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
146 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
147
147
148 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
148 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
149 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
149 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
150
150
151 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
151 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
152 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
152 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
153
153
154 use "hg -v help show_ambig_ja" to show the global options
154 (some details hidden, use --verbose to show complete help)
155
155
156 (2-1-3) display Russian ambiguous-width characters in cp1251
156 (2-1-3) display Russian ambiguous-width characters in cp1251
157
157
158 $ COLUMNS=60 hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
158 $ COLUMNS=60 hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
159 hg show_ambig_ru
159 hg show_ambig_ru
160
160
161 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
161 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
162
162
163 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
163 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
164 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
164 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
165
165
166 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
166 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
167 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
167 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
168
168
169 use "hg -v help show_ambig_ru" to show the global options
169 (some details hidden, use --verbose to show complete help)
170
170
171 (2-1-4) display Russian ambiguous-width characters in utf-8
171 (2-1-4) display Russian ambiguous-width characters in utf-8
172
172
173 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
173 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
174 hg show_ambig_ru
174 hg show_ambig_ru
175
175
176 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
176 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
177
177
178 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
178 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
179 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
179 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
180
180
181 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
181 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
182 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
182 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
183
183
184 use "hg -v help show_ambig_ru" to show the global options
184 (some details hidden, use --verbose to show complete help)
185
185
186
186
187 (2-2) treat width of ambiguous characters as wide
187 (2-2) treat width of ambiguous characters as wide
188
188
189 (2-2-1) display Japanese ambiguous-width characters in cp932
189 (2-2-1) display Japanese ambiguous-width characters in cp932
190
190
191 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
191 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
192 hg show_ambig_ja
192 hg show_ambig_ja
193
193
194 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
194 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
195
195
196 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
196 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
197 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
197 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
198 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
198 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
199 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
199 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
200
200
201 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
201 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
202 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
202 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
203 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
203 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
204
204
205 use "hg -v help show_ambig_ja" to show the global options
205 (some details hidden, use --verbose to show complete help)
206
206
207 (2-2-2) display Japanese ambiguous-width characters in utf-8
207 (2-2-2) display Japanese ambiguous-width characters in utf-8
208
208
209 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
209 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
210 hg show_ambig_ja
210 hg show_ambig_ja
211
211
212 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
212 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
213
213
214 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
214 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
215 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
215 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
216 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
216 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
217 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
217 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
218
218
219 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
219 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
220 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
220 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
221 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
221 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
222
222
223 use "hg -v help show_ambig_ja" to show the global options
223 (some details hidden, use --verbose to show complete help)
224
224
225 (2-2-3) display Russian ambiguous-width characters in cp1251
225 (2-2-3) display Russian ambiguous-width characters in cp1251
226
226
227 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
227 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
228 hg show_ambig_ru
228 hg show_ambig_ru
229
229
230 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
230 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
231 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
231 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
232
232
233 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
233 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
234 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
234 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
235 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
235 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
236
236
237 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
237 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
238 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
238 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
239 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
239 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
240
240
241 use "hg -v help show_ambig_ru" to show the global options
241 (some details hidden, use --verbose to show complete help)
242
242
243 (2-2-4) display Russian ambiguous-width characters in utf-8
243 (2-2-4) display Russian ambiguous-width characters in utf-8
244
244
245 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
245 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
246 hg show_ambig_ru
246 hg show_ambig_ru
247
247
248 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
248 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
249 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
249 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
250
250
251 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
251 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
252 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
252 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
253 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
253 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
254
254
255 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
255 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
256 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
256 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
257 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
257 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
258
258
259 use "hg -v help show_ambig_ru" to show the global options
259 (some details hidden, use --verbose to show complete help)
260
260
261 $ cd ..
261 $ cd ..
@@ -1,204 +1,204 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "extdiff=" >> $HGRCPATH
2 $ echo "extdiff=" >> $HGRCPATH
3
3
4 $ hg init a
4 $ hg init a
5 $ cd a
5 $ cd a
6 $ echo a > a
6 $ echo a > a
7 $ echo b > b
7 $ echo b > b
8 $ hg add
8 $ hg add
9 adding a
9 adding a
10 adding b
10 adding b
11
11
12 Should diff cloned directories:
12 Should diff cloned directories:
13
13
14 $ hg extdiff -o -r $opt
14 $ hg extdiff -o -r $opt
15 Only in a: a
15 Only in a: a
16 Only in a: b
16 Only in a: b
17 [1]
17 [1]
18
18
19 $ echo "[extdiff]" >> $HGRCPATH
19 $ echo "[extdiff]" >> $HGRCPATH
20 $ echo "cmd.falabala=echo" >> $HGRCPATH
20 $ echo "cmd.falabala=echo" >> $HGRCPATH
21 $ echo "opts.falabala=diffing" >> $HGRCPATH
21 $ echo "opts.falabala=diffing" >> $HGRCPATH
22
22
23 $ hg falabala
23 $ hg falabala
24 diffing a.000000000000 a
24 diffing a.000000000000 a
25 [1]
25 [1]
26
26
27 $ hg help falabala
27 $ hg help falabala
28 hg falabala [OPTION]... [FILE]...
28 hg falabala [OPTION]... [FILE]...
29
29
30 use 'echo' to diff repository (or selected files)
30 use 'echo' to diff repository (or selected files)
31
31
32 Show differences between revisions for the specified files, using the
32 Show differences between revisions for the specified files, using the
33 'echo' program.
33 'echo' program.
34
34
35 When two revision arguments are given, then changes are shown between
35 When two revision arguments are given, then changes are shown between
36 those revisions. If only one revision is specified then that revision is
36 those revisions. If only one revision is specified then that revision is
37 compared to the working directory, and, when no revisions are specified,
37 compared to the working directory, and, when no revisions are specified,
38 the working directory files are compared to its parent.
38 the working directory files are compared to its parent.
39
39
40 options:
40 options:
41
41
42 -o --option OPT [+] pass option to comparison program
42 -o --option OPT [+] pass option to comparison program
43 -r --rev REV [+] revision
43 -r --rev REV [+] revision
44 -c --change REV change made by revision
44 -c --change REV change made by revision
45 -I --include PATTERN [+] include names matching the given patterns
45 -I --include PATTERN [+] include names matching the given patterns
46 -X --exclude PATTERN [+] exclude names matching the given patterns
46 -X --exclude PATTERN [+] exclude names matching the given patterns
47
47
48 [+] marked option can be specified multiple times
48 [+] marked option can be specified multiple times
49
49
50 use "hg -v help falabala" to show the global options
50 (some details hidden, use --verbose to show complete help)
51
51
52 $ hg ci -d '0 0' -mtest1
52 $ hg ci -d '0 0' -mtest1
53
53
54 $ echo b >> a
54 $ echo b >> a
55 $ hg ci -d '1 0' -mtest2
55 $ hg ci -d '1 0' -mtest2
56
56
57 Should diff cloned files directly:
57 Should diff cloned files directly:
58
58
59 $ hg falabala -r 0:1
59 $ hg falabala -r 0:1
60 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
60 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
61 [1]
61 [1]
62
62
63 Test diff during merge:
63 Test diff during merge:
64
64
65 $ hg update -C 0
65 $ hg update -C 0
66 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
66 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 $ echo c >> c
67 $ echo c >> c
68 $ hg add c
68 $ hg add c
69 $ hg ci -m "new branch" -d '1 0'
69 $ hg ci -m "new branch" -d '1 0'
70 created new head
70 created new head
71 $ hg merge 1
71 $ hg merge 1
72 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
72 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
73 (branch merge, don't forget to commit)
73 (branch merge, don't forget to commit)
74
74
75 Should diff cloned file against wc file:
75 Should diff cloned file against wc file:
76
76
77 $ hg falabala
77 $ hg falabala
78 diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob)
78 diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob)
79 [1]
79 [1]
80
80
81
81
82 Test --change option:
82 Test --change option:
83
83
84 $ hg ci -d '2 0' -mtest3
84 $ hg ci -d '2 0' -mtest3
85 $ hg falabala -c 1
85 $ hg falabala -c 1
86 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
86 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
87 [1]
87 [1]
88
88
89 Check diff are made from the first parent:
89 Check diff are made from the first parent:
90
90
91 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
91 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
92 diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob)
92 diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob)
93 diff-like tools yield a non-zero exit code
93 diff-like tools yield a non-zero exit code
94
94
95 #if execbit
95 #if execbit
96
96
97 Test extdiff of multiple files in tmp dir:
97 Test extdiff of multiple files in tmp dir:
98
98
99 $ hg update -C 0 > /dev/null
99 $ hg update -C 0 > /dev/null
100 $ echo changed > a
100 $ echo changed > a
101 $ echo changed > b
101 $ echo changed > b
102 $ chmod +x b
102 $ chmod +x b
103
103
104 Diff in working directory, before:
104 Diff in working directory, before:
105
105
106 $ hg diff --git
106 $ hg diff --git
107 diff --git a/a b/a
107 diff --git a/a b/a
108 --- a/a
108 --- a/a
109 +++ b/a
109 +++ b/a
110 @@ -1,1 +1,1 @@
110 @@ -1,1 +1,1 @@
111 -a
111 -a
112 +changed
112 +changed
113 diff --git a/b b/b
113 diff --git a/b b/b
114 old mode 100644
114 old mode 100644
115 new mode 100755
115 new mode 100755
116 --- a/b
116 --- a/b
117 +++ b/b
117 +++ b/b
118 @@ -1,1 +1,1 @@
118 @@ -1,1 +1,1 @@
119 -b
119 -b
120 +changed
120 +changed
121
121
122
122
123 Edit with extdiff -p:
123 Edit with extdiff -p:
124
124
125 Prepare custom diff/edit tool:
125 Prepare custom diff/edit tool:
126
126
127 $ cat > 'diff tool.py' << EOT
127 $ cat > 'diff tool.py' << EOT
128 > #!/usr/bin/env python
128 > #!/usr/bin/env python
129 > import time
129 > import time
130 > time.sleep(1) # avoid unchanged-timestamp problems
130 > time.sleep(1) # avoid unchanged-timestamp problems
131 > file('a/a', 'ab').write('edited\n')
131 > file('a/a', 'ab').write('edited\n')
132 > file('a/b', 'ab').write('edited\n')
132 > file('a/b', 'ab').write('edited\n')
133 > EOT
133 > EOT
134
134
135 $ chmod +x 'diff tool.py'
135 $ chmod +x 'diff tool.py'
136
136
137 will change to /tmp/extdiff.TMP and populate directories a.TMP and a
137 will change to /tmp/extdiff.TMP and populate directories a.TMP and a
138 and start tool
138 and start tool
139
139
140 $ hg extdiff -p "`pwd`/diff tool.py"
140 $ hg extdiff -p "`pwd`/diff tool.py"
141 [1]
141 [1]
142
142
143 Diff in working directory, after:
143 Diff in working directory, after:
144
144
145 $ hg diff --git
145 $ hg diff --git
146 diff --git a/a b/a
146 diff --git a/a b/a
147 --- a/a
147 --- a/a
148 +++ b/a
148 +++ b/a
149 @@ -1,1 +1,2 @@
149 @@ -1,1 +1,2 @@
150 -a
150 -a
151 +changed
151 +changed
152 +edited
152 +edited
153 diff --git a/b b/b
153 diff --git a/b b/b
154 old mode 100644
154 old mode 100644
155 new mode 100755
155 new mode 100755
156 --- a/b
156 --- a/b
157 +++ b/b
157 +++ b/b
158 @@ -1,1 +1,2 @@
158 @@ -1,1 +1,2 @@
159 -b
159 -b
160 +changed
160 +changed
161 +edited
161 +edited
162
162
163 Test extdiff with --option:
163 Test extdiff with --option:
164
164
165 $ hg extdiff -p echo -o this -c 1
165 $ hg extdiff -p echo -o this -c 1
166 this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
166 this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
167 [1]
167 [1]
168
168
169 $ hg falabala -o this -c 1
169 $ hg falabala -o this -c 1
170 diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
170 diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
171 [1]
171 [1]
172
172
173 Test with revsets:
173 Test with revsets:
174
174
175 $ hg extdif -p echo -c "rev(1)"
175 $ hg extdif -p echo -c "rev(1)"
176 */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
176 */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
177 [1]
177 [1]
178
178
179 $ hg extdif -p echo -r "0::1"
179 $ hg extdif -p echo -r "0::1"
180 */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
180 */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
181 [1]
181 [1]
182
182
183 $ cd ..
183 $ cd ..
184
184
185 #endif
185 #endif
186
186
187 #if symlink
187 #if symlink
188
188
189 Test symlinks handling (issue1909)
189 Test symlinks handling (issue1909)
190
190
191 $ hg init testsymlinks
191 $ hg init testsymlinks
192 $ cd testsymlinks
192 $ cd testsymlinks
193 $ echo a > a
193 $ echo a > a
194 $ hg ci -Am adda
194 $ hg ci -Am adda
195 adding a
195 adding a
196 $ echo a >> a
196 $ echo a >> a
197 $ ln -s missing linka
197 $ ln -s missing linka
198 $ hg add linka
198 $ hg add linka
199 $ hg falabala -r 0 --traceback
199 $ hg falabala -r 0 --traceback
200 diffing testsymlinks.07f494440405 testsymlinks
200 diffing testsymlinks.07f494440405 testsymlinks
201 [1]
201 [1]
202 $ cd ..
202 $ cd ..
203
203
204 #endif
204 #endif
@@ -1,916 +1,916 b''
1 Test basic extension support
1 Test basic extension support
2
2
3 $ cat > foobar.py <<EOF
3 $ cat > foobar.py <<EOF
4 > import os
4 > import os
5 > from mercurial import cmdutil, commands
5 > from mercurial import cmdutil, commands
6 > cmdtable = {}
6 > cmdtable = {}
7 > command = cmdutil.command(cmdtable)
7 > command = cmdutil.command(cmdtable)
8 > def uisetup(ui):
8 > def uisetup(ui):
9 > ui.write("uisetup called\\n")
9 > ui.write("uisetup called\\n")
10 > def reposetup(ui, repo):
10 > def reposetup(ui, repo):
11 > ui.write("reposetup called for %s\\n" % os.path.basename(repo.root))
11 > ui.write("reposetup called for %s\\n" % os.path.basename(repo.root))
12 > ui.write("ui %s= repo.ui\\n" % (ui == repo.ui and "=" or "!"))
12 > ui.write("ui %s= repo.ui\\n" % (ui == repo.ui and "=" or "!"))
13 > @command('foo', [], 'hg foo')
13 > @command('foo', [], 'hg foo')
14 > def foo(ui, *args, **kwargs):
14 > def foo(ui, *args, **kwargs):
15 > ui.write("Foo\\n")
15 > ui.write("Foo\\n")
16 > @command('bar', [], 'hg bar', norepo=True)
16 > @command('bar', [], 'hg bar', norepo=True)
17 > def bar(ui, *args, **kwargs):
17 > def bar(ui, *args, **kwargs):
18 > ui.write("Bar\\n")
18 > ui.write("Bar\\n")
19 > EOF
19 > EOF
20 $ abspath=`pwd`/foobar.py
20 $ abspath=`pwd`/foobar.py
21
21
22 $ mkdir barfoo
22 $ mkdir barfoo
23 $ cp foobar.py barfoo/__init__.py
23 $ cp foobar.py barfoo/__init__.py
24 $ barfoopath=`pwd`/barfoo
24 $ barfoopath=`pwd`/barfoo
25
25
26 $ hg init a
26 $ hg init a
27 $ cd a
27 $ cd a
28 $ echo foo > file
28 $ echo foo > file
29 $ hg add file
29 $ hg add file
30 $ hg commit -m 'add file'
30 $ hg commit -m 'add file'
31
31
32 $ echo '[extensions]' >> $HGRCPATH
32 $ echo '[extensions]' >> $HGRCPATH
33 $ echo "foobar = $abspath" >> $HGRCPATH
33 $ echo "foobar = $abspath" >> $HGRCPATH
34 $ hg foo
34 $ hg foo
35 uisetup called
35 uisetup called
36 reposetup called for a
36 reposetup called for a
37 ui == repo.ui
37 ui == repo.ui
38 Foo
38 Foo
39
39
40 $ cd ..
40 $ cd ..
41 $ hg clone a b
41 $ hg clone a b
42 uisetup called
42 uisetup called
43 reposetup called for a
43 reposetup called for a
44 ui == repo.ui
44 ui == repo.ui
45 reposetup called for b
45 reposetup called for b
46 ui == repo.ui
46 ui == repo.ui
47 updating to branch default
47 updating to branch default
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49
49
50 $ hg bar
50 $ hg bar
51 uisetup called
51 uisetup called
52 Bar
52 Bar
53 $ echo 'foobar = !' >> $HGRCPATH
53 $ echo 'foobar = !' >> $HGRCPATH
54
54
55 module/__init__.py-style
55 module/__init__.py-style
56
56
57 $ echo "barfoo = $barfoopath" >> $HGRCPATH
57 $ echo "barfoo = $barfoopath" >> $HGRCPATH
58 $ cd a
58 $ cd a
59 $ hg foo
59 $ hg foo
60 uisetup called
60 uisetup called
61 reposetup called for a
61 reposetup called for a
62 ui == repo.ui
62 ui == repo.ui
63 Foo
63 Foo
64 $ echo 'barfoo = !' >> $HGRCPATH
64 $ echo 'barfoo = !' >> $HGRCPATH
65
65
66 Check that extensions are loaded in phases:
66 Check that extensions are loaded in phases:
67
67
68 $ cat > foo.py <<EOF
68 $ cat > foo.py <<EOF
69 > import os
69 > import os
70 > name = os.path.basename(__file__).rsplit('.', 1)[0]
70 > name = os.path.basename(__file__).rsplit('.', 1)[0]
71 > print "1) %s imported" % name
71 > print "1) %s imported" % name
72 > def uisetup(ui):
72 > def uisetup(ui):
73 > print "2) %s uisetup" % name
73 > print "2) %s uisetup" % name
74 > def extsetup():
74 > def extsetup():
75 > print "3) %s extsetup" % name
75 > print "3) %s extsetup" % name
76 > def reposetup(ui, repo):
76 > def reposetup(ui, repo):
77 > print "4) %s reposetup" % name
77 > print "4) %s reposetup" % name
78 > EOF
78 > EOF
79
79
80 $ cp foo.py bar.py
80 $ cp foo.py bar.py
81 $ echo 'foo = foo.py' >> $HGRCPATH
81 $ echo 'foo = foo.py' >> $HGRCPATH
82 $ echo 'bar = bar.py' >> $HGRCPATH
82 $ echo 'bar = bar.py' >> $HGRCPATH
83
83
84 Command with no output, we just want to see the extensions loaded:
84 Command with no output, we just want to see the extensions loaded:
85
85
86 $ hg paths
86 $ hg paths
87 1) foo imported
87 1) foo imported
88 1) bar imported
88 1) bar imported
89 2) foo uisetup
89 2) foo uisetup
90 2) bar uisetup
90 2) bar uisetup
91 3) foo extsetup
91 3) foo extsetup
92 3) bar extsetup
92 3) bar extsetup
93 4) foo reposetup
93 4) foo reposetup
94 4) bar reposetup
94 4) bar reposetup
95
95
96 Check hgweb's load order:
96 Check hgweb's load order:
97
97
98 $ cat > hgweb.cgi <<EOF
98 $ cat > hgweb.cgi <<EOF
99 > #!/usr/bin/env python
99 > #!/usr/bin/env python
100 > from mercurial import demandimport; demandimport.enable()
100 > from mercurial import demandimport; demandimport.enable()
101 > from mercurial.hgweb import hgweb
101 > from mercurial.hgweb import hgweb
102 > from mercurial.hgweb import wsgicgi
102 > from mercurial.hgweb import wsgicgi
103 > application = hgweb('.', 'test repo')
103 > application = hgweb('.', 'test repo')
104 > wsgicgi.launch(application)
104 > wsgicgi.launch(application)
105 > EOF
105 > EOF
106
106
107 $ REQUEST_METHOD='GET' PATH_INFO='/' SCRIPT_NAME='' QUERY_STRING='' \
107 $ REQUEST_METHOD='GET' PATH_INFO='/' SCRIPT_NAME='' QUERY_STRING='' \
108 > SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
108 > SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
109 > | grep '^[0-9]) ' # ignores HTML output
109 > | grep '^[0-9]) ' # ignores HTML output
110 1) foo imported
110 1) foo imported
111 1) bar imported
111 1) bar imported
112 2) foo uisetup
112 2) foo uisetup
113 2) bar uisetup
113 2) bar uisetup
114 3) foo extsetup
114 3) foo extsetup
115 3) bar extsetup
115 3) bar extsetup
116 4) foo reposetup
116 4) foo reposetup
117 4) bar reposetup
117 4) bar reposetup
118 4) foo reposetup
118 4) foo reposetup
119 4) bar reposetup
119 4) bar reposetup
120
120
121 $ echo 'foo = !' >> $HGRCPATH
121 $ echo 'foo = !' >> $HGRCPATH
122 $ echo 'bar = !' >> $HGRCPATH
122 $ echo 'bar = !' >> $HGRCPATH
123
123
124 Check "from __future__ import absolute_import" support for external libraries
124 Check "from __future__ import absolute_import" support for external libraries
125
125
126 #if windows
126 #if windows
127 $ PATHSEP=";"
127 $ PATHSEP=";"
128 #else
128 #else
129 $ PATHSEP=":"
129 $ PATHSEP=":"
130 #endif
130 #endif
131 $ export PATHSEP
131 $ export PATHSEP
132
132
133 $ mkdir $TESTTMP/libroot
133 $ mkdir $TESTTMP/libroot
134 $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py
134 $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py
135 $ mkdir $TESTTMP/libroot/mod
135 $ mkdir $TESTTMP/libroot/mod
136 $ touch $TESTTMP/libroot/mod/__init__.py
136 $ touch $TESTTMP/libroot/mod/__init__.py
137 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py
137 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py
138
138
139 #if absimport
139 #if absimport
140 $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF
140 $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF
141 > from __future__ import absolute_import
141 > from __future__ import absolute_import
142 > import ambig # should load "libroot/ambig.py"
142 > import ambig # should load "libroot/ambig.py"
143 > s = ambig.s
143 > s = ambig.s
144 > EOF
144 > EOF
145 $ cat > loadabs.py <<EOF
145 $ cat > loadabs.py <<EOF
146 > import mod.ambigabs as ambigabs
146 > import mod.ambigabs as ambigabs
147 > def extsetup():
147 > def extsetup():
148 > print 'ambigabs.s=%s' % ambigabs.s
148 > print 'ambigabs.s=%s' % ambigabs.s
149 > EOF
149 > EOF
150 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root)
150 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root)
151 ambigabs.s=libroot/ambig.py
151 ambigabs.s=libroot/ambig.py
152 $TESTTMP/a (glob)
152 $TESTTMP/a (glob)
153 #endif
153 #endif
154
154
155 #if no-py3k
155 #if no-py3k
156 $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF
156 $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF
157 > import ambig # should load "libroot/mod/ambig.py"
157 > import ambig # should load "libroot/mod/ambig.py"
158 > s = ambig.s
158 > s = ambig.s
159 > EOF
159 > EOF
160 $ cat > loadrel.py <<EOF
160 $ cat > loadrel.py <<EOF
161 > import mod.ambigrel as ambigrel
161 > import mod.ambigrel as ambigrel
162 > def extsetup():
162 > def extsetup():
163 > print 'ambigrel.s=%s' % ambigrel.s
163 > print 'ambigrel.s=%s' % ambigrel.s
164 > EOF
164 > EOF
165 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root)
165 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root)
166 ambigrel.s=libroot/mod/ambig.py
166 ambigrel.s=libroot/mod/ambig.py
167 $TESTTMP/a (glob)
167 $TESTTMP/a (glob)
168 #endif
168 #endif
169
169
170 Check absolute/relative import of extension specific modules
170 Check absolute/relative import of extension specific modules
171
171
172 $ mkdir $TESTTMP/extroot
172 $ mkdir $TESTTMP/extroot
173 $ cat > $TESTTMP/extroot/bar.py <<EOF
173 $ cat > $TESTTMP/extroot/bar.py <<EOF
174 > s = 'this is extroot.bar'
174 > s = 'this is extroot.bar'
175 > EOF
175 > EOF
176 $ mkdir $TESTTMP/extroot/sub1
176 $ mkdir $TESTTMP/extroot/sub1
177 $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF
177 $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF
178 > s = 'this is extroot.sub1.__init__'
178 > s = 'this is extroot.sub1.__init__'
179 > EOF
179 > EOF
180 $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF
180 $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF
181 > s = 'this is extroot.sub1.baz'
181 > s = 'this is extroot.sub1.baz'
182 > EOF
182 > EOF
183 $ cat > $TESTTMP/extroot/__init__.py <<EOF
183 $ cat > $TESTTMP/extroot/__init__.py <<EOF
184 > s = 'this is extroot.__init__'
184 > s = 'this is extroot.__init__'
185 > import foo
185 > import foo
186 > def extsetup(ui):
186 > def extsetup(ui):
187 > ui.write('(extroot) ', foo.func(), '\n')
187 > ui.write('(extroot) ', foo.func(), '\n')
188 > EOF
188 > EOF
189
189
190 $ cat > $TESTTMP/extroot/foo.py <<EOF
190 $ cat > $TESTTMP/extroot/foo.py <<EOF
191 > # test absolute import
191 > # test absolute import
192 > buf = []
192 > buf = []
193 > def func():
193 > def func():
194 > # "not locals" case
194 > # "not locals" case
195 > import extroot.bar
195 > import extroot.bar
196 > buf.append('import extroot.bar in func(): %s' % extroot.bar.s)
196 > buf.append('import extroot.bar in func(): %s' % extroot.bar.s)
197 > return '\n(extroot) '.join(buf)
197 > return '\n(extroot) '.join(buf)
198 > # "fromlist == ('*',)" case
198 > # "fromlist == ('*',)" case
199 > from extroot.bar import *
199 > from extroot.bar import *
200 > buf.append('from extroot.bar import *: %s' % s)
200 > buf.append('from extroot.bar import *: %s' % s)
201 > # "not fromlist" and "if '.' in name" case
201 > # "not fromlist" and "if '.' in name" case
202 > import extroot.sub1.baz
202 > import extroot.sub1.baz
203 > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s)
203 > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s)
204 > # "not fromlist" and NOT "if '.' in name" case
204 > # "not fromlist" and NOT "if '.' in name" case
205 > import extroot
205 > import extroot
206 > buf.append('import extroot: %s' % extroot.s)
206 > buf.append('import extroot: %s' % extroot.s)
207 > # NOT "not fromlist" and NOT "level != -1" case
207 > # NOT "not fromlist" and NOT "level != -1" case
208 > from extroot.bar import s
208 > from extroot.bar import s
209 > buf.append('from extroot.bar import s: %s' % s)
209 > buf.append('from extroot.bar import s: %s' % s)
210 > EOF
210 > EOF
211 $ hg --config extensions.extroot=$TESTTMP/extroot root
211 $ hg --config extensions.extroot=$TESTTMP/extroot root
212 (extroot) from extroot.bar import *: this is extroot.bar
212 (extroot) from extroot.bar import *: this is extroot.bar
213 (extroot) import extroot.sub1.baz: this is extroot.sub1.baz
213 (extroot) import extroot.sub1.baz: this is extroot.sub1.baz
214 (extroot) import extroot: this is extroot.__init__
214 (extroot) import extroot: this is extroot.__init__
215 (extroot) from extroot.bar import s: this is extroot.bar
215 (extroot) from extroot.bar import s: this is extroot.bar
216 (extroot) import extroot.bar in func(): this is extroot.bar
216 (extroot) import extroot.bar in func(): this is extroot.bar
217 $TESTTMP/a (glob)
217 $TESTTMP/a (glob)
218
218
219 #if no-py3k
219 #if no-py3k
220 $ rm "$TESTTMP"/extroot/foo.*
220 $ rm "$TESTTMP"/extroot/foo.*
221 $ cat > $TESTTMP/extroot/foo.py <<EOF
221 $ cat > $TESTTMP/extroot/foo.py <<EOF
222 > # test relative import
222 > # test relative import
223 > buf = []
223 > buf = []
224 > def func():
224 > def func():
225 > # "not locals" case
225 > # "not locals" case
226 > import bar
226 > import bar
227 > buf.append('import bar in func(): %s' % bar.s)
227 > buf.append('import bar in func(): %s' % bar.s)
228 > return '\n(extroot) '.join(buf)
228 > return '\n(extroot) '.join(buf)
229 > # "fromlist == ('*',)" case
229 > # "fromlist == ('*',)" case
230 > from bar import *
230 > from bar import *
231 > buf.append('from bar import *: %s' % s)
231 > buf.append('from bar import *: %s' % s)
232 > # "not fromlist" and "if '.' in name" case
232 > # "not fromlist" and "if '.' in name" case
233 > import sub1.baz
233 > import sub1.baz
234 > buf.append('import sub1.baz: %s' % sub1.baz.s)
234 > buf.append('import sub1.baz: %s' % sub1.baz.s)
235 > # "not fromlist" and NOT "if '.' in name" case
235 > # "not fromlist" and NOT "if '.' in name" case
236 > import sub1
236 > import sub1
237 > buf.append('import sub1: %s' % sub1.s)
237 > buf.append('import sub1: %s' % sub1.s)
238 > # NOT "not fromlist" and NOT "level != -1" case
238 > # NOT "not fromlist" and NOT "level != -1" case
239 > from bar import s
239 > from bar import s
240 > buf.append('from bar import s: %s' % s)
240 > buf.append('from bar import s: %s' % s)
241 > EOF
241 > EOF
242 $ hg --config extensions.extroot=$TESTTMP/extroot root
242 $ hg --config extensions.extroot=$TESTTMP/extroot root
243 (extroot) from bar import *: this is extroot.bar
243 (extroot) from bar import *: this is extroot.bar
244 (extroot) import sub1.baz: this is extroot.sub1.baz
244 (extroot) import sub1.baz: this is extroot.sub1.baz
245 (extroot) import sub1: this is extroot.sub1.__init__
245 (extroot) import sub1: this is extroot.sub1.__init__
246 (extroot) from bar import s: this is extroot.bar
246 (extroot) from bar import s: this is extroot.bar
247 (extroot) import bar in func(): this is extroot.bar
247 (extroot) import bar in func(): this is extroot.bar
248 $TESTTMP/a (glob)
248 $TESTTMP/a (glob)
249 #endif
249 #endif
250
250
251 $ cd ..
251 $ cd ..
252
252
253 hide outer repo
253 hide outer repo
254 $ hg init
254 $ hg init
255
255
256 $ cat > empty.py <<EOF
256 $ cat > empty.py <<EOF
257 > '''empty cmdtable
257 > '''empty cmdtable
258 > '''
258 > '''
259 > cmdtable = {}
259 > cmdtable = {}
260 > EOF
260 > EOF
261 $ emptypath=`pwd`/empty.py
261 $ emptypath=`pwd`/empty.py
262 $ echo "empty = $emptypath" >> $HGRCPATH
262 $ echo "empty = $emptypath" >> $HGRCPATH
263 $ hg help empty
263 $ hg help empty
264 empty extension - empty cmdtable
264 empty extension - empty cmdtable
265
265
266 no commands defined
266 no commands defined
267
267
268
268
269 $ echo 'empty = !' >> $HGRCPATH
269 $ echo 'empty = !' >> $HGRCPATH
270
270
271 $ cat > debugextension.py <<EOF
271 $ cat > debugextension.py <<EOF
272 > '''only debugcommands
272 > '''only debugcommands
273 > '''
273 > '''
274 > from mercurial import cmdutil
274 > from mercurial import cmdutil
275 > cmdtable = {}
275 > cmdtable = {}
276 > command = cmdutil.command(cmdtable)
276 > command = cmdutil.command(cmdtable)
277 > @command('debugfoobar', [], 'hg debugfoobar')
277 > @command('debugfoobar', [], 'hg debugfoobar')
278 > def debugfoobar(ui, repo, *args, **opts):
278 > def debugfoobar(ui, repo, *args, **opts):
279 > "yet another debug command"
279 > "yet another debug command"
280 > pass
280 > pass
281 > @command('foo', [], 'hg foo')
281 > @command('foo', [], 'hg foo')
282 > def foo(ui, repo, *args, **opts):
282 > def foo(ui, repo, *args, **opts):
283 > """yet another foo command
283 > """yet another foo command
284 > This command has been DEPRECATED since forever.
284 > This command has been DEPRECATED since forever.
285 > """
285 > """
286 > pass
286 > pass
287 > EOF
287 > EOF
288 $ debugpath=`pwd`/debugextension.py
288 $ debugpath=`pwd`/debugextension.py
289 $ echo "debugextension = $debugpath" >> $HGRCPATH
289 $ echo "debugextension = $debugpath" >> $HGRCPATH
290
290
291 $ hg help debugextension
291 $ hg help debugextension
292 debugextension extension - only debugcommands
292 debugextension extension - only debugcommands
293
293
294 no commands defined
294 no commands defined
295
295
296
296
297 $ hg --verbose help debugextension
297 $ hg --verbose help debugextension
298 debugextension extension - only debugcommands
298 debugextension extension - only debugcommands
299
299
300 list of commands:
300 list of commands:
301
301
302 foo yet another foo command
302 foo yet another foo command
303
303
304 global options:
304 global options:
305
305
306 -R --repository REPO repository root directory or name of overlay bundle
306 -R --repository REPO repository root directory or name of overlay bundle
307 file
307 file
308 --cwd DIR change working directory
308 --cwd DIR change working directory
309 -y --noninteractive do not prompt, automatically pick the first choice for
309 -y --noninteractive do not prompt, automatically pick the first choice for
310 all prompts
310 all prompts
311 -q --quiet suppress output
311 -q --quiet suppress output
312 -v --verbose enable additional output
312 -v --verbose enable additional output
313 --config CONFIG [+] set/override config option (use 'section.name=value')
313 --config CONFIG [+] set/override config option (use 'section.name=value')
314 --debug enable debugging output
314 --debug enable debugging output
315 --debugger start debugger
315 --debugger start debugger
316 --encoding ENCODE set the charset encoding (default: ascii)
316 --encoding ENCODE set the charset encoding (default: ascii)
317 --encodingmode MODE set the charset encoding mode (default: strict)
317 --encodingmode MODE set the charset encoding mode (default: strict)
318 --traceback always print a traceback on exception
318 --traceback always print a traceback on exception
319 --time time how long the command takes
319 --time time how long the command takes
320 --profile print command execution profile
320 --profile print command execution profile
321 --version output version information and exit
321 --version output version information and exit
322 -h --help display help and exit
322 -h --help display help and exit
323 --hidden consider hidden changesets
323 --hidden consider hidden changesets
324
324
325 [+] marked option can be specified multiple times
325 [+] marked option can be specified multiple times
326
326
327
327
328
328
329
329
330
330
331
331
332 $ hg --debug help debugextension
332 $ hg --debug help debugextension
333 debugextension extension - only debugcommands
333 debugextension extension - only debugcommands
334
334
335 list of commands:
335 list of commands:
336
336
337 debugfoobar yet another debug command
337 debugfoobar yet another debug command
338 foo yet another foo command
338 foo yet another foo command
339
339
340 global options:
340 global options:
341
341
342 -R --repository REPO repository root directory or name of overlay bundle
342 -R --repository REPO repository root directory or name of overlay bundle
343 file
343 file
344 --cwd DIR change working directory
344 --cwd DIR change working directory
345 -y --noninteractive do not prompt, automatically pick the first choice for
345 -y --noninteractive do not prompt, automatically pick the first choice for
346 all prompts
346 all prompts
347 -q --quiet suppress output
347 -q --quiet suppress output
348 -v --verbose enable additional output
348 -v --verbose enable additional output
349 --config CONFIG [+] set/override config option (use 'section.name=value')
349 --config CONFIG [+] set/override config option (use 'section.name=value')
350 --debug enable debugging output
350 --debug enable debugging output
351 --debugger start debugger
351 --debugger start debugger
352 --encoding ENCODE set the charset encoding (default: ascii)
352 --encoding ENCODE set the charset encoding (default: ascii)
353 --encodingmode MODE set the charset encoding mode (default: strict)
353 --encodingmode MODE set the charset encoding mode (default: strict)
354 --traceback always print a traceback on exception
354 --traceback always print a traceback on exception
355 --time time how long the command takes
355 --time time how long the command takes
356 --profile print command execution profile
356 --profile print command execution profile
357 --version output version information and exit
357 --version output version information and exit
358 -h --help display help and exit
358 -h --help display help and exit
359 --hidden consider hidden changesets
359 --hidden consider hidden changesets
360
360
361 [+] marked option can be specified multiple times
361 [+] marked option can be specified multiple times
362
362
363
363
364
364
365
365
366
366
367 $ echo 'debugextension = !' >> $HGRCPATH
367 $ echo 'debugextension = !' >> $HGRCPATH
368
368
369 Extension module help vs command help:
369 Extension module help vs command help:
370
370
371 $ echo 'extdiff =' >> $HGRCPATH
371 $ echo 'extdiff =' >> $HGRCPATH
372 $ hg help extdiff
372 $ hg help extdiff
373 hg extdiff [OPT]... [FILE]...
373 hg extdiff [OPT]... [FILE]...
374
374
375 use external program to diff repository (or selected files)
375 use external program to diff repository (or selected files)
376
376
377 Show differences between revisions for the specified files, using an
377 Show differences between revisions for the specified files, using an
378 external program. The default program used is diff, with default options
378 external program. The default program used is diff, with default options
379 "-Npru".
379 "-Npru".
380
380
381 To select a different program, use the -p/--program option. The program
381 To select a different program, use the -p/--program option. The program
382 will be passed the names of two directories to compare. To pass additional
382 will be passed the names of two directories to compare. To pass additional
383 options to the program, use -o/--option. These will be passed before the
383 options to the program, use -o/--option. These will be passed before the
384 names of the directories to compare.
384 names of the directories to compare.
385
385
386 When two revision arguments are given, then changes are shown between
386 When two revision arguments are given, then changes are shown between
387 those revisions. If only one revision is specified then that revision is
387 those revisions. If only one revision is specified then that revision is
388 compared to the working directory, and, when no revisions are specified,
388 compared to the working directory, and, when no revisions are specified,
389 the working directory files are compared to its parent.
389 the working directory files are compared to its parent.
390
390
391 use "hg help -e extdiff" to show help for the extdiff extension
391 use "hg help -e extdiff" to show help for the extdiff extension
392
392
393 options:
393 options:
394
394
395 -p --program CMD comparison program to run
395 -p --program CMD comparison program to run
396 -o --option OPT [+] pass option to comparison program
396 -o --option OPT [+] pass option to comparison program
397 -r --rev REV [+] revision
397 -r --rev REV [+] revision
398 -c --change REV change made by revision
398 -c --change REV change made by revision
399 -I --include PATTERN [+] include names matching the given patterns
399 -I --include PATTERN [+] include names matching the given patterns
400 -X --exclude PATTERN [+] exclude names matching the given patterns
400 -X --exclude PATTERN [+] exclude names matching the given patterns
401
401
402 [+] marked option can be specified multiple times
402 [+] marked option can be specified multiple times
403
403
404 use "hg -v help extdiff" to show the global options
404 (some details hidden, use --verbose to show complete help)
405
405
406
406
407
407
408
408
409
409
410
410
411
411
412
412
413
413
414
414
415 $ hg help --extension extdiff
415 $ hg help --extension extdiff
416 extdiff extension - command to allow external programs to compare revisions
416 extdiff extension - command to allow external programs to compare revisions
417
417
418 The extdiff Mercurial extension allows you to use external programs to compare
418 The extdiff Mercurial extension allows you to use external programs to compare
419 revisions, or revision with working directory. The external diff programs are
419 revisions, or revision with working directory. The external diff programs are
420 called with a configurable set of options and two non-option arguments: paths
420 called with a configurable set of options and two non-option arguments: paths
421 to directories containing snapshots of files to compare.
421 to directories containing snapshots of files to compare.
422
422
423 The extdiff extension also allows you to configure new diff commands, so you
423 The extdiff extension also allows you to configure new diff commands, so you
424 do not need to type "hg extdiff -p kdiff3" always.
424 do not need to type "hg extdiff -p kdiff3" always.
425
425
426 [extdiff]
426 [extdiff]
427 # add new command that runs GNU diff(1) in 'context diff' mode
427 # add new command that runs GNU diff(1) in 'context diff' mode
428 cdiff = gdiff -Nprc5
428 cdiff = gdiff -Nprc5
429 ## or the old way:
429 ## or the old way:
430 #cmd.cdiff = gdiff
430 #cmd.cdiff = gdiff
431 #opts.cdiff = -Nprc5
431 #opts.cdiff = -Nprc5
432
432
433 # add new command called vdiff, runs kdiff3
433 # add new command called vdiff, runs kdiff3
434 vdiff = kdiff3
434 vdiff = kdiff3
435
435
436 # add new command called meld, runs meld (no need to name twice)
436 # add new command called meld, runs meld (no need to name twice)
437 meld =
437 meld =
438
438
439 # add new command called vimdiff, runs gvimdiff with DirDiff plugin
439 # add new command called vimdiff, runs gvimdiff with DirDiff plugin
440 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
440 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
441 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
441 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
442 # your .vimrc
442 # your .vimrc
443 vimdiff = gvim -f "+next" \
443 vimdiff = gvim -f "+next" \
444 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
444 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
445
445
446 Tool arguments can include variables that are expanded at runtime:
446 Tool arguments can include variables that are expanded at runtime:
447
447
448 $parent1, $plabel1 - filename, descriptive label of first parent
448 $parent1, $plabel1 - filename, descriptive label of first parent
449 $child, $clabel - filename, descriptive label of child revision
449 $child, $clabel - filename, descriptive label of child revision
450 $parent2, $plabel2 - filename, descriptive label of second parent
450 $parent2, $plabel2 - filename, descriptive label of second parent
451 $root - repository root
451 $root - repository root
452 $parent is an alias for $parent1.
452 $parent is an alias for $parent1.
453
453
454 The extdiff extension will look in your [diff-tools] and [merge-tools]
454 The extdiff extension will look in your [diff-tools] and [merge-tools]
455 sections for diff tool arguments, when none are specified in [extdiff].
455 sections for diff tool arguments, when none are specified in [extdiff].
456
456
457 [extdiff]
457 [extdiff]
458 kdiff3 =
458 kdiff3 =
459
459
460 [diff-tools]
460 [diff-tools]
461 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
461 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
462
462
463 You can use -I/-X and list of file or directory names like normal "hg diff"
463 You can use -I/-X and list of file or directory names like normal "hg diff"
464 command. The extdiff extension makes snapshots of only needed files, so
464 command. The extdiff extension makes snapshots of only needed files, so
465 running the external diff program will actually be pretty fast (at least
465 running the external diff program will actually be pretty fast (at least
466 faster than having to compare the entire tree).
466 faster than having to compare the entire tree).
467
467
468 list of commands:
468 list of commands:
469
469
470 extdiff use external program to diff repository (or selected files)
470 extdiff use external program to diff repository (or selected files)
471
471
472 use "hg -v help extdiff" to show builtin aliases and global options
472 use "hg -v help extdiff" to show builtin aliases and global options
473
473
474
474
475
475
476
476
477
477
478
478
479
479
480
480
481
481
482
482
483
483
484
484
485
485
486
486
487
487
488
488
489 $ echo 'extdiff = !' >> $HGRCPATH
489 $ echo 'extdiff = !' >> $HGRCPATH
490
490
491 Test help topic with same name as extension
491 Test help topic with same name as extension
492
492
493 $ cat > multirevs.py <<EOF
493 $ cat > multirevs.py <<EOF
494 > from mercurial import cmdutil, commands
494 > from mercurial import cmdutil, commands
495 > cmdtable = {}
495 > cmdtable = {}
496 > command = cmdutil.command(cmdtable)
496 > command = cmdutil.command(cmdtable)
497 > """multirevs extension
497 > """multirevs extension
498 > Big multi-line module docstring."""
498 > Big multi-line module docstring."""
499 > @command('multirevs', [], 'ARG', norepo=True)
499 > @command('multirevs', [], 'ARG', norepo=True)
500 > def multirevs(ui, repo, arg, *args, **opts):
500 > def multirevs(ui, repo, arg, *args, **opts):
501 > """multirevs command"""
501 > """multirevs command"""
502 > pass
502 > pass
503 > EOF
503 > EOF
504 $ echo "multirevs = multirevs.py" >> $HGRCPATH
504 $ echo "multirevs = multirevs.py" >> $HGRCPATH
505
505
506 $ hg help multirevs
506 $ hg help multirevs
507 Specifying Multiple Revisions
507 Specifying Multiple Revisions
508 """""""""""""""""""""""""""""
508 """""""""""""""""""""""""""""
509
509
510 When Mercurial accepts more than one revision, they may be specified
510 When Mercurial accepts more than one revision, they may be specified
511 individually, or provided as a topologically continuous range, separated
511 individually, or provided as a topologically continuous range, separated
512 by the ":" character.
512 by the ":" character.
513
513
514 The syntax of range notation is [BEGIN]:[END], where BEGIN and END are
514 The syntax of range notation is [BEGIN]:[END], where BEGIN and END are
515 revision identifiers. Both BEGIN and END are optional. If BEGIN is not
515 revision identifiers. Both BEGIN and END are optional. If BEGIN is not
516 specified, it defaults to revision number 0. If END is not specified, it
516 specified, it defaults to revision number 0. If END is not specified, it
517 defaults to the tip. The range ":" thus means "all revisions".
517 defaults to the tip. The range ":" thus means "all revisions".
518
518
519 If BEGIN is greater than END, revisions are treated in reverse order.
519 If BEGIN is greater than END, revisions are treated in reverse order.
520
520
521 A range acts as a closed interval. This means that a range of 3:5 gives 3,
521 A range acts as a closed interval. This means that a range of 3:5 gives 3,
522 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.
522 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.
523
523
524 use "hg help -c multirevs" to see help for the multirevs command
524 use "hg help -c multirevs" to see help for the multirevs command
525
525
526
526
527
527
528
528
529
529
530
530
531 $ hg help -c multirevs
531 $ hg help -c multirevs
532 hg multirevs ARG
532 hg multirevs ARG
533
533
534 multirevs command
534 multirevs command
535
535
536 use "hg -v help multirevs" to show the global options
536 (some details hidden, use --verbose to show complete help)
537
537
538
538
539
539
540 $ hg multirevs
540 $ hg multirevs
541 hg multirevs: invalid arguments
541 hg multirevs: invalid arguments
542 hg multirevs ARG
542 hg multirevs ARG
543
543
544 multirevs command
544 multirevs command
545
545
546 use "hg help multirevs" to show the full help text
546 use "hg help multirevs" to show the full help text
547 [255]
547 [255]
548
548
549
549
550
550
551 $ echo "multirevs = !" >> $HGRCPATH
551 $ echo "multirevs = !" >> $HGRCPATH
552
552
553 Issue811: Problem loading extensions twice (by site and by user)
553 Issue811: Problem loading extensions twice (by site and by user)
554
554
555 $ debugpath=`pwd`/debugissue811.py
555 $ debugpath=`pwd`/debugissue811.py
556 $ cat > debugissue811.py <<EOF
556 $ cat > debugissue811.py <<EOF
557 > '''show all loaded extensions
557 > '''show all loaded extensions
558 > '''
558 > '''
559 > from mercurial import cmdutil, commands, extensions
559 > from mercurial import cmdutil, commands, extensions
560 > cmdtable = {}
560 > cmdtable = {}
561 > command = cmdutil.command(cmdtable)
561 > command = cmdutil.command(cmdtable)
562 > @command('debugextensions', [], 'hg debugextensions', norepo=True)
562 > @command('debugextensions', [], 'hg debugextensions', norepo=True)
563 > def debugextensions(ui):
563 > def debugextensions(ui):
564 > "yet another debug command"
564 > "yet another debug command"
565 > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()]))
565 > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()]))
566 > EOF
566 > EOF
567 $ echo "debugissue811 = $debugpath" >> $HGRCPATH
567 $ echo "debugissue811 = $debugpath" >> $HGRCPATH
568 $ echo "mq=" >> $HGRCPATH
568 $ echo "mq=" >> $HGRCPATH
569 $ echo "strip=" >> $HGRCPATH
569 $ echo "strip=" >> $HGRCPATH
570 $ echo "hgext.mq=" >> $HGRCPATH
570 $ echo "hgext.mq=" >> $HGRCPATH
571 $ echo "hgext/mq=" >> $HGRCPATH
571 $ echo "hgext/mq=" >> $HGRCPATH
572
572
573 Show extensions:
573 Show extensions:
574 (note that mq force load strip, also checking it's not loaded twice)
574 (note that mq force load strip, also checking it's not loaded twice)
575
575
576 $ hg debugextensions
576 $ hg debugextensions
577 debugissue811
577 debugissue811
578 strip
578 strip
579 mq
579 mq
580
580
581 Disabled extension commands:
581 Disabled extension commands:
582
582
583 $ ORGHGRCPATH=$HGRCPATH
583 $ ORGHGRCPATH=$HGRCPATH
584 $ HGRCPATH=
584 $ HGRCPATH=
585 $ export HGRCPATH
585 $ export HGRCPATH
586 $ hg help email
586 $ hg help email
587 'email' is provided by the following extension:
587 'email' is provided by the following extension:
588
588
589 patchbomb command to send changesets as (a series of) patch emails
589 patchbomb command to send changesets as (a series of) patch emails
590
590
591 use "hg help extensions" for information on enabling extensions
591 use "hg help extensions" for information on enabling extensions
592
592
593
593
594 $ hg qdel
594 $ hg qdel
595 hg: unknown command 'qdel'
595 hg: unknown command 'qdel'
596 'qdelete' is provided by the following extension:
596 'qdelete' is provided by the following extension:
597
597
598 mq manage a stack of patches
598 mq manage a stack of patches
599
599
600 use "hg help extensions" for information on enabling extensions
600 use "hg help extensions" for information on enabling extensions
601 [255]
601 [255]
602
602
603
603
604 $ hg churn
604 $ hg churn
605 hg: unknown command 'churn'
605 hg: unknown command 'churn'
606 'churn' is provided by the following extension:
606 'churn' is provided by the following extension:
607
607
608 churn command to display statistics about repository history
608 churn command to display statistics about repository history
609
609
610 use "hg help extensions" for information on enabling extensions
610 use "hg help extensions" for information on enabling extensions
611 [255]
611 [255]
612
612
613
613
614
614
615 Disabled extensions:
615 Disabled extensions:
616
616
617 $ hg help churn
617 $ hg help churn
618 churn extension - command to display statistics about repository history
618 churn extension - command to display statistics about repository history
619
619
620 use "hg help extensions" for information on enabling extensions
620 use "hg help extensions" for information on enabling extensions
621
621
622 $ hg help patchbomb
622 $ hg help patchbomb
623 patchbomb extension - command to send changesets as (a series of) patch emails
623 patchbomb extension - command to send changesets as (a series of) patch emails
624
624
625 use "hg help extensions" for information on enabling extensions
625 use "hg help extensions" for information on enabling extensions
626
626
627
627
628 Broken disabled extension and command:
628 Broken disabled extension and command:
629
629
630 $ mkdir hgext
630 $ mkdir hgext
631 $ echo > hgext/__init__.py
631 $ echo > hgext/__init__.py
632 $ cat > hgext/broken.py <<EOF
632 $ cat > hgext/broken.py <<EOF
633 > "broken extension'
633 > "broken extension'
634 > EOF
634 > EOF
635 $ cat > path.py <<EOF
635 $ cat > path.py <<EOF
636 > import os, sys
636 > import os, sys
637 > sys.path.insert(0, os.environ['HGEXTPATH'])
637 > sys.path.insert(0, os.environ['HGEXTPATH'])
638 > EOF
638 > EOF
639 $ HGEXTPATH=`pwd`
639 $ HGEXTPATH=`pwd`
640 $ export HGEXTPATH
640 $ export HGEXTPATH
641
641
642 $ hg --config extensions.path=./path.py help broken
642 $ hg --config extensions.path=./path.py help broken
643 broken extension - (no help text available)
643 broken extension - (no help text available)
644
644
645 use "hg help extensions" for information on enabling extensions
645 use "hg help extensions" for information on enabling extensions
646
646
647
647
648 $ cat > hgext/forest.py <<EOF
648 $ cat > hgext/forest.py <<EOF
649 > cmdtable = None
649 > cmdtable = None
650 > EOF
650 > EOF
651 $ hg --config extensions.path=./path.py help foo > /dev/null
651 $ hg --config extensions.path=./path.py help foo > /dev/null
652 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
652 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
653 abort: no such help topic: foo
653 abort: no such help topic: foo
654 (try "hg help --keyword foo")
654 (try "hg help --keyword foo")
655 [255]
655 [255]
656
656
657 $ cat > throw.py <<EOF
657 $ cat > throw.py <<EOF
658 > from mercurial import cmdutil, commands
658 > from mercurial import cmdutil, commands
659 > cmdtable = {}
659 > cmdtable = {}
660 > command = cmdutil.command(cmdtable)
660 > command = cmdutil.command(cmdtable)
661 > class Bogon(Exception): pass
661 > class Bogon(Exception): pass
662 > @command('throw', [], 'hg throw', norepo=True)
662 > @command('throw', [], 'hg throw', norepo=True)
663 > def throw(ui, **opts):
663 > def throw(ui, **opts):
664 > """throws an exception"""
664 > """throws an exception"""
665 > raise Bogon()
665 > raise Bogon()
666 > EOF
666 > EOF
667 No declared supported version, extension complains:
667 No declared supported version, extension complains:
668 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
668 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
669 ** Unknown exception encountered with possibly-broken third-party extension throw
669 ** Unknown exception encountered with possibly-broken third-party extension throw
670 ** which supports versions unknown of Mercurial.
670 ** which supports versions unknown of Mercurial.
671 ** Please disable throw and try your action again.
671 ** Please disable throw and try your action again.
672 ** If that fixes the bug please report it to the extension author.
672 ** If that fixes the bug please report it to the extension author.
673 ** Python * (glob)
673 ** Python * (glob)
674 ** Mercurial Distributed SCM * (glob)
674 ** Mercurial Distributed SCM * (glob)
675 ** Extensions loaded: throw
675 ** Extensions loaded: throw
676 empty declaration of supported version, extension complains:
676 empty declaration of supported version, extension complains:
677 $ echo "testedwith = ''" >> throw.py
677 $ echo "testedwith = ''" >> throw.py
678 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
678 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
679 ** Unknown exception encountered with possibly-broken third-party extension throw
679 ** Unknown exception encountered with possibly-broken third-party extension throw
680 ** which supports versions unknown of Mercurial.
680 ** which supports versions unknown of Mercurial.
681 ** Please disable throw and try your action again.
681 ** Please disable throw and try your action again.
682 ** If that fixes the bug please report it to the extension author.
682 ** If that fixes the bug please report it to the extension author.
683 ** Python * (glob)
683 ** Python * (glob)
684 ** Mercurial Distributed SCM (*) (glob)
684 ** Mercurial Distributed SCM (*) (glob)
685 ** Extensions loaded: throw
685 ** Extensions loaded: throw
686 If the extension specifies a buglink, show that:
686 If the extension specifies a buglink, show that:
687 $ echo 'buglink = "http://example.com/bts"' >> throw.py
687 $ echo 'buglink = "http://example.com/bts"' >> throw.py
688 $ rm -f throw.pyc throw.pyo
688 $ rm -f throw.pyc throw.pyo
689 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
689 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
690 ** Unknown exception encountered with possibly-broken third-party extension throw
690 ** Unknown exception encountered with possibly-broken third-party extension throw
691 ** which supports versions unknown of Mercurial.
691 ** which supports versions unknown of Mercurial.
692 ** Please disable throw and try your action again.
692 ** Please disable throw and try your action again.
693 ** If that fixes the bug please report it to http://example.com/bts
693 ** If that fixes the bug please report it to http://example.com/bts
694 ** Python * (glob)
694 ** Python * (glob)
695 ** Mercurial Distributed SCM (*) (glob)
695 ** Mercurial Distributed SCM (*) (glob)
696 ** Extensions loaded: throw
696 ** Extensions loaded: throw
697 If the extensions declare outdated versions, accuse the older extension first:
697 If the extensions declare outdated versions, accuse the older extension first:
698 $ echo "from mercurial import util" >> older.py
698 $ echo "from mercurial import util" >> older.py
699 $ echo "util.version = lambda:'2.2'" >> older.py
699 $ echo "util.version = lambda:'2.2'" >> older.py
700 $ echo "testedwith = '1.9.3'" >> older.py
700 $ echo "testedwith = '1.9.3'" >> older.py
701 $ echo "testedwith = '2.1.1'" >> throw.py
701 $ echo "testedwith = '2.1.1'" >> throw.py
702 $ rm -f throw.pyc throw.pyo
702 $ rm -f throw.pyc throw.pyo
703 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
703 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
704 > throw 2>&1 | egrep '^\*\*'
704 > throw 2>&1 | egrep '^\*\*'
705 ** Unknown exception encountered with possibly-broken third-party extension older
705 ** Unknown exception encountered with possibly-broken third-party extension older
706 ** which supports versions 1.9.3 of Mercurial.
706 ** which supports versions 1.9.3 of Mercurial.
707 ** Please disable older and try your action again.
707 ** Please disable older and try your action again.
708 ** If that fixes the bug please report it to the extension author.
708 ** If that fixes the bug please report it to the extension author.
709 ** Python * (glob)
709 ** Python * (glob)
710 ** Mercurial Distributed SCM (version 2.2)
710 ** Mercurial Distributed SCM (version 2.2)
711 ** Extensions loaded: throw, older
711 ** Extensions loaded: throw, older
712 One extension only tested with older, one only with newer versions:
712 One extension only tested with older, one only with newer versions:
713 $ echo "util.version = lambda:'2.1.0'" >> older.py
713 $ echo "util.version = lambda:'2.1.0'" >> older.py
714 $ rm -f older.pyc older.pyo
714 $ rm -f older.pyc older.pyo
715 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
715 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
716 > throw 2>&1 | egrep '^\*\*'
716 > throw 2>&1 | egrep '^\*\*'
717 ** Unknown exception encountered with possibly-broken third-party extension older
717 ** Unknown exception encountered with possibly-broken third-party extension older
718 ** which supports versions 1.9.3 of Mercurial.
718 ** which supports versions 1.9.3 of Mercurial.
719 ** Please disable older and try your action again.
719 ** Please disable older and try your action again.
720 ** If that fixes the bug please report it to the extension author.
720 ** If that fixes the bug please report it to the extension author.
721 ** Python * (glob)
721 ** Python * (glob)
722 ** Mercurial Distributed SCM (version 2.1.0)
722 ** Mercurial Distributed SCM (version 2.1.0)
723 ** Extensions loaded: throw, older
723 ** Extensions loaded: throw, older
724 Older extension is tested with current version, the other only with newer:
724 Older extension is tested with current version, the other only with newer:
725 $ echo "util.version = lambda:'1.9.3'" >> older.py
725 $ echo "util.version = lambda:'1.9.3'" >> older.py
726 $ rm -f older.pyc older.pyo
726 $ rm -f older.pyc older.pyo
727 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
727 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
728 > throw 2>&1 | egrep '^\*\*'
728 > throw 2>&1 | egrep '^\*\*'
729 ** Unknown exception encountered with possibly-broken third-party extension throw
729 ** Unknown exception encountered with possibly-broken third-party extension throw
730 ** which supports versions 2.1.1 of Mercurial.
730 ** which supports versions 2.1.1 of Mercurial.
731 ** Please disable throw and try your action again.
731 ** Please disable throw and try your action again.
732 ** If that fixes the bug please report it to http://example.com/bts
732 ** If that fixes the bug please report it to http://example.com/bts
733 ** Python * (glob)
733 ** Python * (glob)
734 ** Mercurial Distributed SCM (version 1.9.3)
734 ** Mercurial Distributed SCM (version 1.9.3)
735 ** Extensions loaded: throw, older
735 ** Extensions loaded: throw, older
736
736
737 Declare the version as supporting this hg version, show regular bts link:
737 Declare the version as supporting this hg version, show regular bts link:
738 $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'`
738 $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'`
739 $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
739 $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
740 $ rm -f throw.pyc throw.pyo
740 $ rm -f throw.pyc throw.pyo
741 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
741 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
742 ** unknown exception encountered, please report by visiting
742 ** unknown exception encountered, please report by visiting
743 ** http://mercurial.selenic.com/wiki/BugTracker
743 ** http://mercurial.selenic.com/wiki/BugTracker
744 ** Python * (glob)
744 ** Python * (glob)
745 ** Mercurial Distributed SCM (*) (glob)
745 ** Mercurial Distributed SCM (*) (glob)
746 ** Extensions loaded: throw
746 ** Extensions loaded: throw
747
747
748 Test version number support in 'hg version':
748 Test version number support in 'hg version':
749 $ echo '__version__ = (1, 2, 3)' >> throw.py
749 $ echo '__version__ = (1, 2, 3)' >> throw.py
750 $ rm -f throw.pyc throw.pyo
750 $ rm -f throw.pyc throw.pyo
751 $ hg version -v
751 $ hg version -v
752 Mercurial Distributed SCM (version *) (glob)
752 Mercurial Distributed SCM (version *) (glob)
753 (see http://mercurial.selenic.com for more information)
753 (see http://mercurial.selenic.com for more information)
754
754
755 Copyright (C) 2005-* Matt Mackall and others (glob)
755 Copyright (C) 2005-* Matt Mackall and others (glob)
756 This is free software; see the source for copying conditions. There is NO
756 This is free software; see the source for copying conditions. There is NO
757 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
757 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
758
758
759 Enabled extensions:
759 Enabled extensions:
760
760
761
761
762 $ hg version -v --config extensions.throw=throw.py
762 $ hg version -v --config extensions.throw=throw.py
763 Mercurial Distributed SCM (version *) (glob)
763 Mercurial Distributed SCM (version *) (glob)
764 (see http://mercurial.selenic.com for more information)
764 (see http://mercurial.selenic.com for more information)
765
765
766 Copyright (C) 2005-* Matt Mackall and others (glob)
766 Copyright (C) 2005-* Matt Mackall and others (glob)
767 This is free software; see the source for copying conditions. There is NO
767 This is free software; see the source for copying conditions. There is NO
768 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
768 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
769
769
770 Enabled extensions:
770 Enabled extensions:
771
771
772 throw 1.2.3
772 throw 1.2.3
773 $ echo 'getversion = lambda: "1.twentythree"' >> throw.py
773 $ echo 'getversion = lambda: "1.twentythree"' >> throw.py
774 $ rm -f throw.pyc throw.pyo
774 $ rm -f throw.pyc throw.pyo
775 $ hg version -v --config extensions.throw=throw.py
775 $ hg version -v --config extensions.throw=throw.py
776 Mercurial Distributed SCM (version *) (glob)
776 Mercurial Distributed SCM (version *) (glob)
777 (see http://mercurial.selenic.com for more information)
777 (see http://mercurial.selenic.com for more information)
778
778
779 Copyright (C) 2005-* Matt Mackall and others (glob)
779 Copyright (C) 2005-* Matt Mackall and others (glob)
780 This is free software; see the source for copying conditions. There is NO
780 This is free software; see the source for copying conditions. There is NO
781 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
781 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
782
782
783 Enabled extensions:
783 Enabled extensions:
784
784
785 throw 1.twentythree
785 throw 1.twentythree
786
786
787 Restore HGRCPATH
787 Restore HGRCPATH
788
788
789 $ HGRCPATH=$ORGHGRCPATH
789 $ HGRCPATH=$ORGHGRCPATH
790 $ export HGRCPATH
790 $ export HGRCPATH
791
791
792 Commands handling multiple repositories at a time should invoke only
792 Commands handling multiple repositories at a time should invoke only
793 "reposetup()" of extensions enabling in the target repository.
793 "reposetup()" of extensions enabling in the target repository.
794
794
795 $ mkdir reposetup-test
795 $ mkdir reposetup-test
796 $ cd reposetup-test
796 $ cd reposetup-test
797
797
798 $ cat > $TESTTMP/reposetuptest.py <<EOF
798 $ cat > $TESTTMP/reposetuptest.py <<EOF
799 > from mercurial import extensions
799 > from mercurial import extensions
800 > def reposetup(ui, repo):
800 > def reposetup(ui, repo):
801 > ui.write('reposetup() for %s\n' % (repo.root))
801 > ui.write('reposetup() for %s\n' % (repo.root))
802 > EOF
802 > EOF
803 $ hg init src
803 $ hg init src
804 $ echo a > src/a
804 $ echo a > src/a
805 $ hg -R src commit -Am '#0 at src/a'
805 $ hg -R src commit -Am '#0 at src/a'
806 adding a
806 adding a
807 $ echo '[extensions]' >> src/.hg/hgrc
807 $ echo '[extensions]' >> src/.hg/hgrc
808 $ echo '# enable extension locally' >> src/.hg/hgrc
808 $ echo '# enable extension locally' >> src/.hg/hgrc
809 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc
809 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc
810 $ hg -R src status
810 $ hg -R src status
811 reposetup() for $TESTTMP/reposetup-test/src (glob)
811 reposetup() for $TESTTMP/reposetup-test/src (glob)
812
812
813 $ hg clone -U src clone-dst1
813 $ hg clone -U src clone-dst1
814 reposetup() for $TESTTMP/reposetup-test/src (glob)
814 reposetup() for $TESTTMP/reposetup-test/src (glob)
815 $ hg init push-dst1
815 $ hg init push-dst1
816 $ hg -q -R src push push-dst1
816 $ hg -q -R src push push-dst1
817 reposetup() for $TESTTMP/reposetup-test/src (glob)
817 reposetup() for $TESTTMP/reposetup-test/src (glob)
818 $ hg init pull-src1
818 $ hg init pull-src1
819 $ hg -q -R pull-src1 pull src
819 $ hg -q -R pull-src1 pull src
820 reposetup() for $TESTTMP/reposetup-test/src (glob)
820 reposetup() for $TESTTMP/reposetup-test/src (glob)
821
821
822 $ echo '[extensions]' >> $HGRCPATH
822 $ echo '[extensions]' >> $HGRCPATH
823 $ echo '# disable extension globally and explicitly' >> $HGRCPATH
823 $ echo '# disable extension globally and explicitly' >> $HGRCPATH
824 $ echo 'reposetuptest = !' >> $HGRCPATH
824 $ echo 'reposetuptest = !' >> $HGRCPATH
825 $ hg clone -U src clone-dst2
825 $ hg clone -U src clone-dst2
826 reposetup() for $TESTTMP/reposetup-test/src (glob)
826 reposetup() for $TESTTMP/reposetup-test/src (glob)
827 $ hg init push-dst2
827 $ hg init push-dst2
828 $ hg -q -R src push push-dst2
828 $ hg -q -R src push push-dst2
829 reposetup() for $TESTTMP/reposetup-test/src (glob)
829 reposetup() for $TESTTMP/reposetup-test/src (glob)
830 $ hg init pull-src2
830 $ hg init pull-src2
831 $ hg -q -R pull-src2 pull src
831 $ hg -q -R pull-src2 pull src
832 reposetup() for $TESTTMP/reposetup-test/src (glob)
832 reposetup() for $TESTTMP/reposetup-test/src (glob)
833
833
834 $ echo '[extensions]' >> $HGRCPATH
834 $ echo '[extensions]' >> $HGRCPATH
835 $ echo '# enable extension globally' >> $HGRCPATH
835 $ echo '# enable extension globally' >> $HGRCPATH
836 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> $HGRCPATH
836 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> $HGRCPATH
837 $ hg clone -U src clone-dst3
837 $ hg clone -U src clone-dst3
838 reposetup() for $TESTTMP/reposetup-test/src (glob)
838 reposetup() for $TESTTMP/reposetup-test/src (glob)
839 reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob)
839 reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob)
840 $ hg init push-dst3
840 $ hg init push-dst3
841 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob)
841 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob)
842 $ hg -q -R src push push-dst3
842 $ hg -q -R src push push-dst3
843 reposetup() for $TESTTMP/reposetup-test/src (glob)
843 reposetup() for $TESTTMP/reposetup-test/src (glob)
844 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob)
844 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob)
845 $ hg init pull-src3
845 $ hg init pull-src3
846 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob)
846 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob)
847 $ hg -q -R pull-src3 pull src
847 $ hg -q -R pull-src3 pull src
848 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob)
848 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob)
849 reposetup() for $TESTTMP/reposetup-test/src (glob)
849 reposetup() for $TESTTMP/reposetup-test/src (glob)
850
850
851 $ echo '[extensions]' >> src/.hg/hgrc
851 $ echo '[extensions]' >> src/.hg/hgrc
852 $ echo '# disable extension locally' >> src/.hg/hgrc
852 $ echo '# disable extension locally' >> src/.hg/hgrc
853 $ echo 'reposetuptest = !' >> src/.hg/hgrc
853 $ echo 'reposetuptest = !' >> src/.hg/hgrc
854 $ hg clone -U src clone-dst4
854 $ hg clone -U src clone-dst4
855 reposetup() for $TESTTMP/reposetup-test/clone-dst4 (glob)
855 reposetup() for $TESTTMP/reposetup-test/clone-dst4 (glob)
856 $ hg init push-dst4
856 $ hg init push-dst4
857 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob)
857 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob)
858 $ hg -q -R src push push-dst4
858 $ hg -q -R src push push-dst4
859 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob)
859 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob)
860 $ hg init pull-src4
860 $ hg init pull-src4
861 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob)
861 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob)
862 $ hg -q -R pull-src4 pull src
862 $ hg -q -R pull-src4 pull src
863 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob)
863 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob)
864
864
865 disabling in command line overlays with all configuration
865 disabling in command line overlays with all configuration
866 $ hg --config extensions.reposetuptest=! clone -U src clone-dst5
866 $ hg --config extensions.reposetuptest=! clone -U src clone-dst5
867 $ hg --config extensions.reposetuptest=! init push-dst5
867 $ hg --config extensions.reposetuptest=! init push-dst5
868 $ hg --config extensions.reposetuptest=! -q -R src push push-dst5
868 $ hg --config extensions.reposetuptest=! -q -R src push push-dst5
869 $ hg --config extensions.reposetuptest=! init pull-src5
869 $ hg --config extensions.reposetuptest=! init pull-src5
870 $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src
870 $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src
871
871
872 $ echo '[extensions]' >> $HGRCPATH
872 $ echo '[extensions]' >> $HGRCPATH
873 $ echo '# disable extension globally and explicitly' >> $HGRCPATH
873 $ echo '# disable extension globally and explicitly' >> $HGRCPATH
874 $ echo 'reposetuptest = !' >> $HGRCPATH
874 $ echo 'reposetuptest = !' >> $HGRCPATH
875 $ hg init parent
875 $ hg init parent
876 $ hg init parent/sub1
876 $ hg init parent/sub1
877 $ echo 1 > parent/sub1/1
877 $ echo 1 > parent/sub1/1
878 $ hg -R parent/sub1 commit -Am '#0 at parent/sub1'
878 $ hg -R parent/sub1 commit -Am '#0 at parent/sub1'
879 adding 1
879 adding 1
880 $ hg init parent/sub2
880 $ hg init parent/sub2
881 $ hg init parent/sub2/sub21
881 $ hg init parent/sub2/sub21
882 $ echo 21 > parent/sub2/sub21/21
882 $ echo 21 > parent/sub2/sub21/21
883 $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21'
883 $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21'
884 adding 21
884 adding 21
885 $ cat > parent/sub2/.hgsub <<EOF
885 $ cat > parent/sub2/.hgsub <<EOF
886 > sub21 = sub21
886 > sub21 = sub21
887 > EOF
887 > EOF
888 $ hg -R parent/sub2 commit -Am '#0 at parent/sub2'
888 $ hg -R parent/sub2 commit -Am '#0 at parent/sub2'
889 adding .hgsub
889 adding .hgsub
890 $ hg init parent/sub3
890 $ hg init parent/sub3
891 $ echo 3 > parent/sub3/3
891 $ echo 3 > parent/sub3/3
892 $ hg -R parent/sub3 commit -Am '#0 at parent/sub3'
892 $ hg -R parent/sub3 commit -Am '#0 at parent/sub3'
893 adding 3
893 adding 3
894 $ cat > parent/.hgsub <<EOF
894 $ cat > parent/.hgsub <<EOF
895 > sub1 = sub1
895 > sub1 = sub1
896 > sub2 = sub2
896 > sub2 = sub2
897 > sub3 = sub3
897 > sub3 = sub3
898 > EOF
898 > EOF
899 $ hg -R parent commit -Am '#0 at parent'
899 $ hg -R parent commit -Am '#0 at parent'
900 adding .hgsub
900 adding .hgsub
901 $ echo '[extensions]' >> parent/.hg/hgrc
901 $ echo '[extensions]' >> parent/.hg/hgrc
902 $ echo '# enable extension locally' >> parent/.hg/hgrc
902 $ echo '# enable extension locally' >> parent/.hg/hgrc
903 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc
903 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc
904 $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc
904 $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc
905 $ hg -R parent status -S -A
905 $ hg -R parent status -S -A
906 reposetup() for $TESTTMP/reposetup-test/parent (glob)
906 reposetup() for $TESTTMP/reposetup-test/parent (glob)
907 reposetup() for $TESTTMP/reposetup-test/parent/sub2 (glob)
907 reposetup() for $TESTTMP/reposetup-test/parent/sub2 (glob)
908 C .hgsub
908 C .hgsub
909 C .hgsubstate
909 C .hgsubstate
910 C sub1/1
910 C sub1/1
911 C sub2/.hgsub
911 C sub2/.hgsub
912 C sub2/.hgsubstate
912 C sub2/.hgsubstate
913 C sub2/sub21/21
913 C sub2/sub21/21
914 C sub3/3
914 C sub3/3
915
915
916 $ cd ..
916 $ cd ..
@@ -1,2098 +1,2098 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 working directory with another revision
17 merge merge working directory with another revision
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 working directory with another revision
38 merge merge working directory with another revision
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 forget forget the specified files on the next commit
69 forget forget the specified files on the next commit
70 graft copy changes from other branches onto the current branch
70 graft copy changes from other branches onto the current branch
71 grep search for a pattern in specified files and revisions
71 grep search for a pattern in specified files and revisions
72 heads show branch heads
72 heads show branch heads
73 help show help for a given topic or a help overview
73 help show help for a given topic or a help overview
74 identify identify the working copy or specified revision
74 identify identify the working copy or specified revision
75 import import an ordered set of patches
75 import import an ordered set of patches
76 incoming show new changesets found in source
76 incoming show new changesets found in source
77 init create a new repository in the given directory
77 init create a new repository in the given directory
78 locate locate files matching specific patterns
78 locate locate files matching specific patterns
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 working directory with another revision
81 merge merge working directory with another revision
82 outgoing show changesets not found in the destination
82 outgoing show changesets not found in the destination
83 parents show the parents of the working directory or revision
83 parents show the parents of the working directory or revision
84 paths show aliases for remote repositories
84 paths show aliases for remote repositories
85 phase set or show the current phase name
85 phase set or show the current phase name
86 pull pull changes from the specified source
86 pull pull changes from the specified source
87 push push changes to the specified destination
87 push push changes to the specified destination
88 recover roll back an interrupted transaction
88 recover roll back an interrupted transaction
89 remove remove the specified files on the next commit
89 remove remove the specified files on the next commit
90 rename rename files; equivalent of copy + remove
90 rename rename files; equivalent of copy + remove
91 resolve redo merges or set/view the merge status of files
91 resolve redo merges or set/view the merge status of files
92 revert restore files to their checkout state
92 revert restore files to their checkout state
93 root print the root (top) of the current working directory
93 root print the root (top) of the current working directory
94 serve start stand-alone webserver
94 serve start stand-alone webserver
95 status show changed files in the working directory
95 status show changed files in the working directory
96 summary summarize working directory state
96 summary summarize working directory state
97 tag add one or more tags for the current or given revision
97 tag add one or more tags for the current or given revision
98 tags list repository tags
98 tags list repository tags
99 unbundle apply one or more changegroup files
99 unbundle apply one or more changegroup files
100 update update working directory (or switch revisions)
100 update update working directory (or switch revisions)
101 verify verify the integrity of the repository
101 verify verify the integrity of the repository
102 version output version and copyright information
102 version output version and copyright information
103
103
104 additional help topics:
104 additional help topics:
105
105
106 config Configuration Files
106 config Configuration Files
107 dates Date Formats
107 dates Date Formats
108 diffs Diff Formats
108 diffs Diff Formats
109 environment Environment Variables
109 environment Environment Variables
110 extensions Using Additional Features
110 extensions Using Additional Features
111 filesets Specifying File Sets
111 filesets Specifying File Sets
112 glossary Glossary
112 glossary Glossary
113 hgignore Syntax for Mercurial Ignore Files
113 hgignore Syntax for Mercurial Ignore Files
114 hgweb Configuring hgweb
114 hgweb Configuring hgweb
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 subrepos Subrepositories
121 subrepos Subrepositories
122 templating Template Usage
122 templating Template Usage
123 urls URL Paths
123 urls URL Paths
124
124
125 use "hg -v help" to show builtin aliases and global options
125 use "hg -v help" to show builtin aliases and global options
126
126
127 $ hg -q help
127 $ hg -q help
128 add add the specified files on the next commit
128 add add the specified files on the next commit
129 addremove add all new files, delete all missing files
129 addremove add all new files, delete all missing files
130 annotate show changeset information by line for each file
130 annotate show changeset information by line for each file
131 archive create an unversioned archive of a repository revision
131 archive create an unversioned archive of a repository revision
132 backout reverse effect of earlier changeset
132 backout reverse effect of earlier changeset
133 bisect subdivision search of changesets
133 bisect subdivision search of changesets
134 bookmarks create a new bookmark or list existing bookmarks
134 bookmarks create a new bookmark or list existing bookmarks
135 branch set or show the current branch name
135 branch set or show the current branch name
136 branches list repository named branches
136 branches list repository named branches
137 bundle create a changegroup file
137 bundle create a changegroup file
138 cat output the current or given revision of files
138 cat output the current or given revision of files
139 clone make a copy of an existing repository
139 clone make a copy of an existing repository
140 commit commit the specified files or all outstanding changes
140 commit commit the specified files or all outstanding changes
141 config show combined config settings from all hgrc files
141 config show combined config settings from all hgrc files
142 copy mark files as copied for the next commit
142 copy mark files as copied for the next commit
143 diff diff repository (or selected files)
143 diff diff repository (or selected files)
144 export dump the header and diffs for one or more changesets
144 export dump the header and diffs for one or more changesets
145 forget forget the specified files on the next commit
145 forget forget the specified files on the next commit
146 graft copy changes from other branches onto the current branch
146 graft copy changes from other branches onto the current branch
147 grep search for a pattern in specified files and revisions
147 grep search for a pattern in specified files and revisions
148 heads show branch heads
148 heads show branch heads
149 help show help for a given topic or a help overview
149 help show help for a given topic or a help overview
150 identify identify the working copy or specified revision
150 identify identify the working copy or specified revision
151 import import an ordered set of patches
151 import import an ordered set of patches
152 incoming show new changesets found in source
152 incoming show new changesets found in source
153 init create a new repository in the given directory
153 init create a new repository in the given directory
154 locate locate files matching specific patterns
154 locate locate files matching specific patterns
155 log show revision history of entire repository or files
155 log show revision history of entire repository or files
156 manifest output the current or given revision of the project manifest
156 manifest output the current or given revision of the project manifest
157 merge merge working directory with another revision
157 merge merge working directory with another revision
158 outgoing show changesets not found in the destination
158 outgoing show changesets not found in the destination
159 parents show the parents of the working directory or revision
159 parents show the parents of the working directory or revision
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 merge-tools Merge Tools
191 merge-tools Merge Tools
192 multirevs Specifying Multiple Revisions
192 multirevs Specifying Multiple Revisions
193 patterns File Name Patterns
193 patterns File Name Patterns
194 phases Working with Phases
194 phases Working with Phases
195 revisions Specifying Single Revisions
195 revisions Specifying Single Revisions
196 revsets Specifying Revision Sets
196 revsets Specifying Revision Sets
197 subrepos Subrepositories
197 subrepos Subrepositories
198 templating Template Usage
198 templating Template Usage
199 urls URL Paths
199 urls URL Paths
200
200
201 Test extension help:
201 Test extension help:
202 $ hg help extensions --config extensions.rebase= --config extensions.children=
202 $ hg help extensions --config extensions.rebase= --config extensions.children=
203 Using Additional Features
203 Using Additional Features
204 """""""""""""""""""""""""
204 """""""""""""""""""""""""
205
205
206 Mercurial has the ability to add new features through the use of
206 Mercurial has the ability to add new features through the use of
207 extensions. Extensions may add new commands, add options to existing
207 extensions. Extensions may add new commands, add options to existing
208 commands, change the default behavior of commands, or implement hooks.
208 commands, change the default behavior of commands, or implement hooks.
209
209
210 To enable the "foo" extension, either shipped with Mercurial or in the
210 To enable the "foo" extension, either shipped with Mercurial or in the
211 Python search path, create an entry for it in your configuration file,
211 Python search path, create an entry for it in your configuration file,
212 like this:
212 like this:
213
213
214 [extensions]
214 [extensions]
215 foo =
215 foo =
216
216
217 You may also specify the full path to an extension:
217 You may also specify the full path to an extension:
218
218
219 [extensions]
219 [extensions]
220 myfeature = ~/.hgext/myfeature.py
220 myfeature = ~/.hgext/myfeature.py
221
221
222 See "hg help config" for more information on configuration files.
222 See "hg help config" for more information on configuration files.
223
223
224 Extensions are not loaded by default for a variety of reasons: they can
224 Extensions are not loaded by default for a variety of reasons: they can
225 increase startup overhead; they may be meant for advanced usage only; they
225 increase startup overhead; they may be meant for advanced usage only; they
226 may provide potentially dangerous abilities (such as letting you destroy
226 may provide potentially dangerous abilities (such as letting you destroy
227 or modify history); they might not be ready for prime time; or they may
227 or modify history); they might not be ready for prime time; or they may
228 alter some usual behaviors of stock Mercurial. It is thus up to the user
228 alter some usual behaviors of stock Mercurial. It is thus up to the user
229 to activate extensions as needed.
229 to activate extensions as needed.
230
230
231 To explicitly disable an extension enabled in a configuration file of
231 To explicitly disable an extension enabled in a configuration file of
232 broader scope, prepend its path with !:
232 broader scope, prepend its path with !:
233
233
234 [extensions]
234 [extensions]
235 # disabling extension bar residing in /path/to/extension/bar.py
235 # disabling extension bar residing in /path/to/extension/bar.py
236 bar = !/path/to/extension/bar.py
236 bar = !/path/to/extension/bar.py
237 # ditto, but no path was supplied for extension baz
237 # ditto, but no path was supplied for extension baz
238 baz = !
238 baz = !
239
239
240 enabled extensions:
240 enabled extensions:
241
241
242 children command to display child changesets (DEPRECATED)
242 children command to display child changesets (DEPRECATED)
243 rebase command to move sets of revisions to a different ancestor
243 rebase command to move sets of revisions to a different ancestor
244
244
245 disabled extensions:
245 disabled extensions:
246
246
247 acl hooks for controlling repository access
247 acl hooks for controlling repository access
248 blackbox log repository events to a blackbox for debugging
248 blackbox log repository events to a blackbox for debugging
249 bugzilla hooks for integrating with the Bugzilla bug tracker
249 bugzilla hooks for integrating with the Bugzilla bug tracker
250 churn command to display statistics about repository history
250 churn command to display statistics about repository history
251 color colorize output from some commands
251 color colorize output from some commands
252 convert import revisions from foreign VCS repositories into
252 convert import revisions from foreign VCS repositories into
253 Mercurial
253 Mercurial
254 eol automatically manage newlines in repository files
254 eol automatically manage newlines in repository files
255 extdiff command to allow external programs to compare revisions
255 extdiff command to allow external programs to compare revisions
256 factotum http authentication with factotum
256 factotum http authentication with factotum
257 gpg commands to sign and verify changesets
257 gpg commands to sign and verify changesets
258 hgcia hooks for integrating with the CIA.vc notification service
258 hgcia hooks for integrating with the CIA.vc notification service
259 hgk browse the repository in a graphical way
259 hgk browse the repository in a graphical way
260 highlight syntax highlighting for hgweb (requires Pygments)
260 highlight syntax highlighting for hgweb (requires Pygments)
261 histedit interactive history editing
261 histedit interactive history editing
262 keyword expand keywords in tracked files
262 keyword expand keywords in tracked files
263 largefiles track large binary files
263 largefiles track large binary files
264 mq manage a stack of patches
264 mq manage a stack of patches
265 notify hooks for sending email push notifications
265 notify hooks for sending email push notifications
266 pager browse command output with an external pager
266 pager browse command output with an external pager
267 patchbomb command to send changesets as (a series of) patch emails
267 patchbomb command to send changesets as (a series of) patch emails
268 progress show progress bars for some actions
268 progress show progress bars for some actions
269 purge command to delete untracked files from the working
269 purge command to delete untracked files from the working
270 directory
270 directory
271 record commands to interactively select changes for
271 record commands to interactively select changes for
272 commit/qrefresh
272 commit/qrefresh
273 relink recreates hardlinks between repository clones
273 relink recreates hardlinks between repository clones
274 schemes extend schemes with shortcuts to repository swarms
274 schemes extend schemes with shortcuts to repository swarms
275 share share a common history between several working directories
275 share share a common history between several working directories
276 shelve save and restore changes to the working directory
276 shelve save and restore changes to the working directory
277 strip strip changesets and their descendents from history
277 strip strip changesets and their descendents from history
278 transplant command to transplant changesets from another branch
278 transplant command to transplant changesets from another branch
279 win32mbcs allow the use of MBCS paths with problematic encodings
279 win32mbcs allow the use of MBCS paths with problematic encodings
280 zeroconf discover and advertise repositories on the local network
280 zeroconf discover and advertise repositories on the local network
281 Test short command list with verbose option
281 Test short command list with verbose option
282
282
283 $ hg -v help shortlist
283 $ hg -v help shortlist
284 Mercurial Distributed SCM
284 Mercurial Distributed SCM
285
285
286 basic commands:
286 basic commands:
287
287
288 add add the specified files on the next commit
288 add add the specified files on the next commit
289 annotate, blame
289 annotate, blame
290 show changeset information by line for each file
290 show changeset information by line for each file
291 clone make a copy of an existing repository
291 clone make a copy of an existing repository
292 commit, ci commit the specified files or all outstanding changes
292 commit, ci commit the specified files or all outstanding changes
293 diff diff repository (or selected files)
293 diff diff repository (or selected files)
294 export dump the header and diffs for one or more changesets
294 export dump the header and diffs for one or more changesets
295 forget forget the specified files on the next commit
295 forget forget the specified files on the next commit
296 init create a new repository in the given directory
296 init create a new repository in the given directory
297 log, history show revision history of entire repository or files
297 log, history show revision history of entire repository or files
298 merge merge working directory with another revision
298 merge merge working directory with another revision
299 pull pull changes from the specified source
299 pull pull changes from the specified source
300 push push changes to the specified destination
300 push push changes to the specified destination
301 remove, rm remove the specified files on the next commit
301 remove, rm remove the specified files on the next commit
302 serve start stand-alone webserver
302 serve start stand-alone webserver
303 status, st show changed files in the working directory
303 status, st show changed files in the working directory
304 summary, sum summarize working directory state
304 summary, sum summarize working directory state
305 update, up, checkout, co
305 update, up, checkout, co
306 update working directory (or switch revisions)
306 update working directory (or switch revisions)
307
307
308 global options:
308 global options:
309
309
310 -R --repository REPO repository root directory or name of overlay bundle
310 -R --repository REPO repository root directory or name of overlay bundle
311 file
311 file
312 --cwd DIR change working directory
312 --cwd DIR change working directory
313 -y --noninteractive do not prompt, automatically pick the first choice for
313 -y --noninteractive do not prompt, automatically pick the first choice for
314 all prompts
314 all prompts
315 -q --quiet suppress output
315 -q --quiet suppress output
316 -v --verbose enable additional output
316 -v --verbose enable additional output
317 --config CONFIG [+] set/override config option (use 'section.name=value')
317 --config CONFIG [+] set/override config option (use 'section.name=value')
318 --debug enable debugging output
318 --debug enable debugging output
319 --debugger start debugger
319 --debugger start debugger
320 --encoding ENCODE set the charset encoding (default: ascii)
320 --encoding ENCODE set the charset encoding (default: ascii)
321 --encodingmode MODE set the charset encoding mode (default: strict)
321 --encodingmode MODE set the charset encoding mode (default: strict)
322 --traceback always print a traceback on exception
322 --traceback always print a traceback on exception
323 --time time how long the command takes
323 --time time how long the command takes
324 --profile print command execution profile
324 --profile print command execution profile
325 --version output version information and exit
325 --version output version information and exit
326 -h --help display help and exit
326 -h --help display help and exit
327 --hidden consider hidden changesets
327 --hidden consider hidden changesets
328
328
329 [+] marked option can be specified multiple times
329 [+] marked option can be specified multiple times
330
330
331 use "hg help" for the full list of commands
331 use "hg help" for the full list of commands
332
332
333 $ hg add -h
333 $ hg add -h
334 hg add [OPTION]... [FILE]...
334 hg add [OPTION]... [FILE]...
335
335
336 add the specified files on the next commit
336 add the specified files on the next commit
337
337
338 Schedule files to be version controlled and added to the repository.
338 Schedule files to be version controlled and added to the repository.
339
339
340 The files will be added to the repository at the next commit. To undo an
340 The files will be added to the repository at the next commit. To undo an
341 add before that, see "hg forget".
341 add before that, see "hg forget".
342
342
343 If no names are given, add all files to the repository.
343 If no names are given, add all files to the repository.
344
344
345 Returns 0 if all files are successfully added.
345 Returns 0 if all files are successfully added.
346
346
347 options:
347 options:
348
348
349 -I --include PATTERN [+] include names matching the given patterns
349 -I --include PATTERN [+] include names matching the given patterns
350 -X --exclude PATTERN [+] exclude names matching the given patterns
350 -X --exclude PATTERN [+] exclude names matching the given patterns
351 -S --subrepos recurse into subrepositories
351 -S --subrepos recurse into subrepositories
352 -n --dry-run do not perform actions, just print output
352 -n --dry-run do not perform actions, just print output
353
353
354 [+] marked option can be specified multiple times
354 [+] marked option can be specified multiple times
355
355
356 use "hg -v help add" to show more complete help and the global options
356 (some details hidden, use --verbose to show complete help)
357
357
358 Verbose help for add
358 Verbose help for add
359
359
360 $ hg add -hv
360 $ hg add -hv
361 hg add [OPTION]... [FILE]...
361 hg add [OPTION]... [FILE]...
362
362
363 add the specified files on the next commit
363 add the specified files on the next commit
364
364
365 Schedule files to be version controlled and added to the repository.
365 Schedule files to be version controlled and added to the repository.
366
366
367 The files will be added to the repository at the next commit. To undo an
367 The files will be added to the repository at the next commit. To undo an
368 add before that, see "hg forget".
368 add before that, see "hg forget".
369
369
370 If no names are given, add all files to the repository.
370 If no names are given, add all files to the repository.
371
371
372 An example showing how new (unknown) files are added automatically by "hg
372 An example showing how new (unknown) files are added automatically by "hg
373 add":
373 add":
374
374
375 $ ls
375 $ ls
376 foo.c
376 foo.c
377 $ hg status
377 $ hg status
378 ? foo.c
378 ? foo.c
379 $ hg add
379 $ hg add
380 adding foo.c
380 adding foo.c
381 $ hg status
381 $ hg status
382 A foo.c
382 A foo.c
383
383
384 Returns 0 if all files are successfully added.
384 Returns 0 if all files are successfully added.
385
385
386 options:
386 options:
387
387
388 -I --include PATTERN [+] include names matching the given patterns
388 -I --include PATTERN [+] include names matching the given patterns
389 -X --exclude PATTERN [+] exclude names matching the given patterns
389 -X --exclude PATTERN [+] exclude names matching the given patterns
390 -S --subrepos recurse into subrepositories
390 -S --subrepos recurse into subrepositories
391 -n --dry-run do not perform actions, just print output
391 -n --dry-run do not perform actions, just print output
392
392
393 [+] marked option can be specified multiple times
393 [+] marked option can be specified multiple times
394
394
395 global options:
395 global options:
396
396
397 -R --repository REPO repository root directory or name of overlay bundle
397 -R --repository REPO repository root directory or name of overlay bundle
398 file
398 file
399 --cwd DIR change working directory
399 --cwd DIR change working directory
400 -y --noninteractive do not prompt, automatically pick the first choice for
400 -y --noninteractive do not prompt, automatically pick the first choice for
401 all prompts
401 all prompts
402 -q --quiet suppress output
402 -q --quiet suppress output
403 -v --verbose enable additional output
403 -v --verbose enable additional output
404 --config CONFIG [+] set/override config option (use 'section.name=value')
404 --config CONFIG [+] set/override config option (use 'section.name=value')
405 --debug enable debugging output
405 --debug enable debugging output
406 --debugger start debugger
406 --debugger start debugger
407 --encoding ENCODE set the charset encoding (default: ascii)
407 --encoding ENCODE set the charset encoding (default: ascii)
408 --encodingmode MODE set the charset encoding mode (default: strict)
408 --encodingmode MODE set the charset encoding mode (default: strict)
409 --traceback always print a traceback on exception
409 --traceback always print a traceback on exception
410 --time time how long the command takes
410 --time time how long the command takes
411 --profile print command execution profile
411 --profile print command execution profile
412 --version output version information and exit
412 --version output version information and exit
413 -h --help display help and exit
413 -h --help display help and exit
414 --hidden consider hidden changesets
414 --hidden consider hidden changesets
415
415
416 [+] marked option can be specified multiple times
416 [+] marked option can be specified multiple times
417
417
418 Test help option with version option
418 Test help option with version option
419
419
420 $ hg add -h --version
420 $ hg add -h --version
421 Mercurial Distributed SCM (version *) (glob)
421 Mercurial Distributed SCM (version *) (glob)
422 (see http://mercurial.selenic.com for more information)
422 (see http://mercurial.selenic.com for more information)
423
423
424 Copyright (C) 2005-2014 Matt Mackall and others
424 Copyright (C) 2005-2014 Matt Mackall and others
425 This is free software; see the source for copying conditions. There is NO
425 This is free software; see the source for copying conditions. There is NO
426 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
426 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
427
427
428 $ hg add --skjdfks
428 $ hg add --skjdfks
429 hg add: option --skjdfks not recognized
429 hg add: option --skjdfks not recognized
430 hg add [OPTION]... [FILE]...
430 hg add [OPTION]... [FILE]...
431
431
432 add the specified files on the next commit
432 add the specified files on the next commit
433
433
434 options:
434 options:
435
435
436 -I --include PATTERN [+] include names matching the given patterns
436 -I --include PATTERN [+] include names matching the given patterns
437 -X --exclude PATTERN [+] exclude names matching the given patterns
437 -X --exclude PATTERN [+] exclude names matching the given patterns
438 -S --subrepos recurse into subrepositories
438 -S --subrepos recurse into subrepositories
439 -n --dry-run do not perform actions, just print output
439 -n --dry-run do not perform actions, just print output
440
440
441 [+] marked option can be specified multiple times
441 [+] marked option can be specified multiple times
442
442
443 use "hg help add" to show the full help text
443 use "hg help add" to show the full help text
444 [255]
444 [255]
445
445
446 Test ambiguous command help
446 Test ambiguous command help
447
447
448 $ hg help ad
448 $ hg help ad
449 list of commands:
449 list of commands:
450
450
451 add add the specified files on the next commit
451 add add the specified files on the next commit
452 addremove add all new files, delete all missing files
452 addremove add all new files, delete all missing files
453
453
454 use "hg -v help ad" to show builtin aliases and global options
454 use "hg -v help ad" to show builtin aliases and global options
455
455
456 Test command without options
456 Test command without options
457
457
458 $ hg help verify
458 $ hg help verify
459 hg verify
459 hg verify
460
460
461 verify the integrity of the repository
461 verify the integrity of the repository
462
462
463 Verify the integrity of the current repository.
463 Verify the integrity of the current repository.
464
464
465 This will perform an extensive check of the repository's integrity,
465 This will perform an extensive check of the repository's integrity,
466 validating the hashes and checksums of each entry in the changelog,
466 validating the hashes and checksums of each entry in the changelog,
467 manifest, and tracked files, as well as the integrity of their crosslinks
467 manifest, and tracked files, as well as the integrity of their crosslinks
468 and indices.
468 and indices.
469
469
470 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
470 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
471 information about recovery from corruption of the repository.
471 information about recovery from corruption of the repository.
472
472
473 Returns 0 on success, 1 if errors are encountered.
473 Returns 0 on success, 1 if errors are encountered.
474
474
475 use "hg -v help verify" to show the global options
475 (some details hidden, use --verbose to show complete help)
476
476
477 $ hg help diff
477 $ hg help diff
478 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
478 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
479
479
480 diff repository (or selected files)
480 diff repository (or selected files)
481
481
482 Show differences between revisions for the specified files.
482 Show differences between revisions for the specified files.
483
483
484 Differences between files are shown using the unified diff format.
484 Differences between files are shown using the unified diff format.
485
485
486 Note:
486 Note:
487 diff may generate unexpected results for merges, as it will default to
487 diff may generate unexpected results for merges, as it will default to
488 comparing against the working directory's first parent changeset if no
488 comparing against the working directory's first parent changeset if no
489 revisions are specified.
489 revisions are specified.
490
490
491 When two revision arguments are given, then changes are shown between
491 When two revision arguments are given, then changes are shown between
492 those revisions. If only one revision is specified then that revision is
492 those revisions. If only one revision is specified then that revision is
493 compared to the working directory, and, when no revisions are specified,
493 compared to the working directory, and, when no revisions are specified,
494 the working directory files are compared to its parent.
494 the working directory files are compared to its parent.
495
495
496 Alternatively you can specify -c/--change with a revision to see the
496 Alternatively you can specify -c/--change with a revision to see the
497 changes in that changeset relative to its first parent.
497 changes in that changeset relative to its first parent.
498
498
499 Without the -a/--text option, diff will avoid generating diffs of files it
499 Without the -a/--text option, diff will avoid generating diffs of files it
500 detects as binary. With -a, diff will generate a diff anyway, probably
500 detects as binary. With -a, diff will generate a diff anyway, probably
501 with undesirable results.
501 with undesirable results.
502
502
503 Use the -g/--git option to generate diffs in the git extended diff format.
503 Use the -g/--git option to generate diffs in the git extended diff format.
504 For more information, read "hg help diffs".
504 For more information, read "hg help diffs".
505
505
506 Returns 0 on success.
506 Returns 0 on success.
507
507
508 options:
508 options:
509
509
510 -r --rev REV [+] revision
510 -r --rev REV [+] revision
511 -c --change REV change made by revision
511 -c --change REV change made by revision
512 -a --text treat all files as text
512 -a --text treat all files as text
513 -g --git use git extended diff format
513 -g --git use git extended diff format
514 --nodates omit dates from diff headers
514 --nodates omit dates from diff headers
515 -p --show-function show which function each change is in
515 -p --show-function show which function each change is in
516 --reverse produce a diff that undoes the changes
516 --reverse produce a diff that undoes the changes
517 -w --ignore-all-space ignore white space when comparing lines
517 -w --ignore-all-space ignore white space when comparing lines
518 -b --ignore-space-change ignore changes in the amount of white space
518 -b --ignore-space-change ignore changes in the amount of white space
519 -B --ignore-blank-lines ignore changes whose lines are all blank
519 -B --ignore-blank-lines ignore changes whose lines are all blank
520 -U --unified NUM number of lines of context to show
520 -U --unified NUM number of lines of context to show
521 --stat output diffstat-style summary of changes
521 --stat output diffstat-style summary of changes
522 -I --include PATTERN [+] include names matching the given patterns
522 -I --include PATTERN [+] include names matching the given patterns
523 -X --exclude PATTERN [+] exclude names matching the given patterns
523 -X --exclude PATTERN [+] exclude names matching the given patterns
524 -S --subrepos recurse into subrepositories
524 -S --subrepos recurse into subrepositories
525
525
526 [+] marked option can be specified multiple times
526 [+] marked option can be specified multiple times
527
527
528 use "hg -v help diff" to show more complete help and the global options
528 (some details hidden, use --verbose to show complete help)
529
529
530 $ hg help status
530 $ hg help status
531 hg status [OPTION]... [FILE]...
531 hg status [OPTION]... [FILE]...
532
532
533 aliases: st
533 aliases: st
534
534
535 show changed files in the working directory
535 show changed files in the working directory
536
536
537 Show status of files in the repository. If names are given, only files
537 Show status of files in the repository. If names are given, only files
538 that match are shown. Files that are clean or ignored or the source of a
538 that match are shown. Files that are clean or ignored or the source of a
539 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
539 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
540 -C/--copies or -A/--all are given. Unless options described with "show
540 -C/--copies or -A/--all are given. Unless options described with "show
541 only ..." are given, the options -mardu are used.
541 only ..." are given, the options -mardu are used.
542
542
543 Option -q/--quiet hides untracked (unknown and ignored) files unless
543 Option -q/--quiet hides untracked (unknown and ignored) files unless
544 explicitly requested with -u/--unknown or -i/--ignored.
544 explicitly requested with -u/--unknown or -i/--ignored.
545
545
546 Note:
546 Note:
547 status may appear to disagree with diff if permissions have changed or
547 status may appear to disagree with diff if permissions have changed or
548 a merge has occurred. The standard diff format does not report
548 a merge has occurred. The standard diff format does not report
549 permission changes and diff only reports changes relative to one merge
549 permission changes and diff only reports changes relative to one merge
550 parent.
550 parent.
551
551
552 If one revision is given, it is used as the base revision. If two
552 If one revision is given, it is used as the base revision. If two
553 revisions are given, the differences between them are shown. The --change
553 revisions are given, the differences between them are shown. The --change
554 option can also be used as a shortcut to list the changed files of a
554 option can also be used as a shortcut to list the changed files of a
555 revision from its first parent.
555 revision from its first parent.
556
556
557 The codes used to show the status of files are:
557 The codes used to show the status of files are:
558
558
559 M = modified
559 M = modified
560 A = added
560 A = added
561 R = removed
561 R = removed
562 C = clean
562 C = clean
563 ! = missing (deleted by non-hg command, but still tracked)
563 ! = missing (deleted by non-hg command, but still tracked)
564 ? = not tracked
564 ? = not tracked
565 I = ignored
565 I = ignored
566 = origin of the previous file (with --copies)
566 = origin of the previous file (with --copies)
567
567
568 Returns 0 on success.
568 Returns 0 on success.
569
569
570 options:
570 options:
571
571
572 -A --all show status of all files
572 -A --all show status of all files
573 -m --modified show only modified files
573 -m --modified show only modified files
574 -a --added show only added files
574 -a --added show only added files
575 -r --removed show only removed files
575 -r --removed show only removed files
576 -d --deleted show only deleted (but tracked) files
576 -d --deleted show only deleted (but tracked) files
577 -c --clean show only files without changes
577 -c --clean show only files without changes
578 -u --unknown show only unknown (not tracked) files
578 -u --unknown show only unknown (not tracked) files
579 -i --ignored show only ignored files
579 -i --ignored show only ignored files
580 -n --no-status hide status prefix
580 -n --no-status hide status prefix
581 -C --copies show source of copied files
581 -C --copies show source of copied files
582 -0 --print0 end filenames with NUL, for use with xargs
582 -0 --print0 end filenames with NUL, for use with xargs
583 --rev REV [+] show difference from revision
583 --rev REV [+] show difference from revision
584 --change REV list the changed files of a revision
584 --change REV list the changed files of a revision
585 -I --include PATTERN [+] include names matching the given patterns
585 -I --include PATTERN [+] include names matching the given patterns
586 -X --exclude PATTERN [+] exclude names matching the given patterns
586 -X --exclude PATTERN [+] exclude names matching the given patterns
587 -S --subrepos recurse into subrepositories
587 -S --subrepos recurse into subrepositories
588
588
589 [+] marked option can be specified multiple times
589 [+] marked option can be specified multiple times
590
590
591 use "hg -v help status" to show more complete help and the global options
591 (some details hidden, use --verbose to show complete help)
592
592
593 $ hg -q help status
593 $ hg -q help status
594 hg status [OPTION]... [FILE]...
594 hg status [OPTION]... [FILE]...
595
595
596 show changed files in the working directory
596 show changed files in the working directory
597
597
598 $ hg help foo
598 $ hg help foo
599 abort: no such help topic: foo
599 abort: no such help topic: foo
600 (try "hg help --keyword foo")
600 (try "hg help --keyword foo")
601 [255]
601 [255]
602
602
603 $ hg skjdfks
603 $ hg skjdfks
604 hg: unknown command 'skjdfks'
604 hg: unknown command 'skjdfks'
605 Mercurial Distributed SCM
605 Mercurial Distributed SCM
606
606
607 basic commands:
607 basic commands:
608
608
609 add add the specified files on the next commit
609 add add the specified files on the next commit
610 annotate show changeset information by line for each file
610 annotate show changeset information by line for each file
611 clone make a copy of an existing repository
611 clone make a copy of an existing repository
612 commit commit the specified files or all outstanding changes
612 commit commit the specified files or all outstanding changes
613 diff diff repository (or selected files)
613 diff diff repository (or selected files)
614 export dump the header and diffs for one or more changesets
614 export dump the header and diffs for one or more changesets
615 forget forget the specified files on the next commit
615 forget forget the specified files on the next commit
616 init create a new repository in the given directory
616 init create a new repository in the given directory
617 log show revision history of entire repository or files
617 log show revision history of entire repository or files
618 merge merge working directory with another revision
618 merge merge working directory with another revision
619 pull pull changes from the specified source
619 pull pull changes from the specified source
620 push push changes to the specified destination
620 push push changes to the specified destination
621 remove remove the specified files on the next commit
621 remove remove the specified files on the next commit
622 serve start stand-alone webserver
622 serve start stand-alone webserver
623 status show changed files in the working directory
623 status show changed files in the working directory
624 summary summarize working directory state
624 summary summarize working directory state
625 update update working directory (or switch revisions)
625 update update working directory (or switch revisions)
626
626
627 use "hg help" for the full list of commands or "hg -v" for details
627 use "hg help" for the full list of commands or "hg -v" for details
628 [255]
628 [255]
629
629
630
630
631 $ cat > helpext.py <<EOF
631 $ cat > helpext.py <<EOF
632 > import os
632 > import os
633 > from mercurial import cmdutil, commands
633 > from mercurial import cmdutil, commands
634 >
634 >
635 > cmdtable = {}
635 > cmdtable = {}
636 > command = cmdutil.command(cmdtable)
636 > command = cmdutil.command(cmdtable)
637 >
637 >
638 > @command('nohelp',
638 > @command('nohelp',
639 > [('', 'longdesc', 3, 'x'*90),
639 > [('', 'longdesc', 3, 'x'*90),
640 > ('n', '', None, 'normal desc'),
640 > ('n', '', None, 'normal desc'),
641 > ('', 'newline', '', 'line1\nline2')],
641 > ('', 'newline', '', 'line1\nline2')],
642 > 'hg nohelp',
642 > 'hg nohelp',
643 > norepo=True)
643 > norepo=True)
644 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
644 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
645 > def nohelp(ui, *args, **kwargs):
645 > def nohelp(ui, *args, **kwargs):
646 > pass
646 > pass
647 >
647 >
648 > EOF
648 > EOF
649 $ echo '[extensions]' >> $HGRCPATH
649 $ echo '[extensions]' >> $HGRCPATH
650 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
650 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
651
651
652 Test command with no help text
652 Test command with no help text
653
653
654 $ hg help nohelp
654 $ hg help nohelp
655 hg nohelp
655 hg nohelp
656
656
657 (no help text available)
657 (no help text available)
658
658
659 options:
659 options:
660
660
661 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
661 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
662 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
662 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
663 -n -- normal desc
663 -n -- normal desc
664 --newline VALUE line1 line2
664 --newline VALUE line1 line2
665
665
666 use "hg -v help nohelp" to show the global options
666 (some details hidden, use --verbose to show complete help)
667
667
668 $ hg help -k nohelp
668 $ hg help -k nohelp
669 Commands:
669 Commands:
670
670
671 nohelp hg nohelp
671 nohelp hg nohelp
672
672
673 Extension Commands:
673 Extension Commands:
674
674
675 nohelp (no help text available)
675 nohelp (no help text available)
676
676
677 Test that default list of commands omits extension commands
677 Test that default list of commands omits extension commands
678
678
679 $ hg help
679 $ hg help
680 Mercurial Distributed SCM
680 Mercurial Distributed SCM
681
681
682 list of commands:
682 list of commands:
683
683
684 add add the specified files on the next commit
684 add add the specified files on the next commit
685 addremove add all new files, delete all missing files
685 addremove add all new files, delete all missing files
686 annotate show changeset information by line for each file
686 annotate show changeset information by line for each file
687 archive create an unversioned archive of a repository revision
687 archive create an unversioned archive of a repository revision
688 backout reverse effect of earlier changeset
688 backout reverse effect of earlier changeset
689 bisect subdivision search of changesets
689 bisect subdivision search of changesets
690 bookmarks create a new bookmark or list existing bookmarks
690 bookmarks create a new bookmark or list existing bookmarks
691 branch set or show the current branch name
691 branch set or show the current branch name
692 branches list repository named branches
692 branches list repository named branches
693 bundle create a changegroup file
693 bundle create a changegroup file
694 cat output the current or given revision of files
694 cat output the current or given revision of files
695 clone make a copy of an existing repository
695 clone make a copy of an existing repository
696 commit commit the specified files or all outstanding changes
696 commit commit the specified files or all outstanding changes
697 config show combined config settings from all hgrc files
697 config show combined config settings from all hgrc files
698 copy mark files as copied for the next commit
698 copy mark files as copied for the next commit
699 diff diff repository (or selected files)
699 diff diff repository (or selected files)
700 export dump the header and diffs for one or more changesets
700 export dump the header and diffs for one or more changesets
701 forget forget the specified files on the next commit
701 forget forget the specified files on the next commit
702 graft copy changes from other branches onto the current branch
702 graft copy changes from other branches onto the current branch
703 grep search for a pattern in specified files and revisions
703 grep search for a pattern in specified files and revisions
704 heads show branch heads
704 heads show branch heads
705 help show help for a given topic or a help overview
705 help show help for a given topic or a help overview
706 identify identify the working copy or specified revision
706 identify identify the working copy or specified revision
707 import import an ordered set of patches
707 import import an ordered set of patches
708 incoming show new changesets found in source
708 incoming show new changesets found in source
709 init create a new repository in the given directory
709 init create a new repository in the given directory
710 locate locate files matching specific patterns
710 locate locate files matching specific patterns
711 log show revision history of entire repository or files
711 log show revision history of entire repository or files
712 manifest output the current or given revision of the project manifest
712 manifest output the current or given revision of the project manifest
713 merge merge working directory with another revision
713 merge merge working directory with another revision
714 outgoing show changesets not found in the destination
714 outgoing show changesets not found in the destination
715 parents show the parents of the working directory or revision
715 parents show the parents of the working directory or revision
716 paths show aliases for remote repositories
716 paths show aliases for remote repositories
717 phase set or show the current phase name
717 phase set or show the current phase name
718 pull pull changes from the specified source
718 pull pull changes from the specified source
719 push push changes to the specified destination
719 push push changes to the specified destination
720 recover roll back an interrupted transaction
720 recover roll back an interrupted transaction
721 remove remove the specified files on the next commit
721 remove remove the specified files on the next commit
722 rename rename files; equivalent of copy + remove
722 rename rename files; equivalent of copy + remove
723 resolve redo merges or set/view the merge status of files
723 resolve redo merges or set/view the merge status of files
724 revert restore files to their checkout state
724 revert restore files to their checkout state
725 root print the root (top) of the current working directory
725 root print the root (top) of the current working directory
726 serve start stand-alone webserver
726 serve start stand-alone webserver
727 status show changed files in the working directory
727 status show changed files in the working directory
728 summary summarize working directory state
728 summary summarize working directory state
729 tag add one or more tags for the current or given revision
729 tag add one or more tags for the current or given revision
730 tags list repository tags
730 tags list repository tags
731 unbundle apply one or more changegroup files
731 unbundle apply one or more changegroup files
732 update update working directory (or switch revisions)
732 update update working directory (or switch revisions)
733 verify verify the integrity of the repository
733 verify verify the integrity of the repository
734 version output version and copyright information
734 version output version and copyright information
735
735
736 enabled extensions:
736 enabled extensions:
737
737
738 helpext (no help text available)
738 helpext (no help text available)
739
739
740 additional help topics:
740 additional help topics:
741
741
742 config Configuration Files
742 config Configuration Files
743 dates Date Formats
743 dates Date Formats
744 diffs Diff Formats
744 diffs Diff Formats
745 environment Environment Variables
745 environment Environment Variables
746 extensions Using Additional Features
746 extensions Using Additional Features
747 filesets Specifying File Sets
747 filesets Specifying File Sets
748 glossary Glossary
748 glossary Glossary
749 hgignore Syntax for Mercurial Ignore Files
749 hgignore Syntax for Mercurial Ignore Files
750 hgweb Configuring hgweb
750 hgweb Configuring hgweb
751 merge-tools Merge Tools
751 merge-tools Merge Tools
752 multirevs Specifying Multiple Revisions
752 multirevs Specifying Multiple Revisions
753 patterns File Name Patterns
753 patterns File Name Patterns
754 phases Working with Phases
754 phases Working with Phases
755 revisions Specifying Single Revisions
755 revisions Specifying Single Revisions
756 revsets Specifying Revision Sets
756 revsets Specifying Revision Sets
757 subrepos Subrepositories
757 subrepos Subrepositories
758 templating Template Usage
758 templating Template Usage
759 urls URL Paths
759 urls URL Paths
760
760
761 use "hg -v help" to show builtin aliases and global options
761 use "hg -v help" to show builtin aliases and global options
762
762
763
763
764 Test list of internal help commands
764 Test list of internal help commands
765
765
766 $ hg help debug
766 $ hg help debug
767 debug commands (internal and unsupported):
767 debug commands (internal and unsupported):
768
768
769 debugancestor
769 debugancestor
770 find the ancestor revision of two revisions in a given index
770 find the ancestor revision of two revisions in a given index
771 debugbuilddag
771 debugbuilddag
772 builds a repo with a given DAG from scratch in the current
772 builds a repo with a given DAG from scratch in the current
773 empty repo
773 empty repo
774 debugbundle lists the contents of a bundle
774 debugbundle lists the contents of a bundle
775 debugcheckstate
775 debugcheckstate
776 validate the correctness of the current dirstate
776 validate the correctness of the current dirstate
777 debugcommands
777 debugcommands
778 list all available commands and options
778 list all available commands and options
779 debugcomplete
779 debugcomplete
780 returns the completion list associated with the given command
780 returns the completion list associated with the given command
781 debugdag format the changelog or an index DAG as a concise textual
781 debugdag format the changelog or an index DAG as a concise textual
782 description
782 description
783 debugdata dump the contents of a data file revision
783 debugdata dump the contents of a data file revision
784 debugdate parse and display a date
784 debugdate parse and display a date
785 debugdirstate
785 debugdirstate
786 show the contents of the current dirstate
786 show the contents of the current dirstate
787 debugdiscovery
787 debugdiscovery
788 runs the changeset discovery protocol in isolation
788 runs the changeset discovery protocol in isolation
789 debugfileset parse and apply a fileset specification
789 debugfileset parse and apply a fileset specification
790 debugfsinfo show information detected about current filesystem
790 debugfsinfo show information detected about current filesystem
791 debuggetbundle
791 debuggetbundle
792 retrieves a bundle from a repo
792 retrieves a bundle from a repo
793 debugignore display the combined ignore pattern
793 debugignore display the combined ignore pattern
794 debugindex dump the contents of an index file
794 debugindex dump the contents of an index file
795 debugindexdot
795 debugindexdot
796 dump an index DAG as a graphviz dot file
796 dump an index DAG as a graphviz dot file
797 debuginstall test Mercurial installation
797 debuginstall test Mercurial installation
798 debugknown test whether node ids are known to a repo
798 debugknown test whether node ids are known to a repo
799 debuglabelcomplete
799 debuglabelcomplete
800 complete "labels" - tags, open branch names, bookmark names
800 complete "labels" - tags, open branch names, bookmark names
801 debugobsolete
801 debugobsolete
802 create arbitrary obsolete marker
802 create arbitrary obsolete marker
803 debugoptDEP (no help text available)
803 debugoptDEP (no help text available)
804 debugpathcomplete
804 debugpathcomplete
805 complete part or all of a tracked path
805 complete part or all of a tracked path
806 debugpushkey access the pushkey key/value protocol
806 debugpushkey access the pushkey key/value protocol
807 debugpvec (no help text available)
807 debugpvec (no help text available)
808 debugrebuilddirstate
808 debugrebuilddirstate
809 rebuild the dirstate as it would look like for the given
809 rebuild the dirstate as it would look like for the given
810 revision
810 revision
811 debugrename dump rename information
811 debugrename dump rename information
812 debugrevlog show data and statistics about a revlog
812 debugrevlog show data and statistics about a revlog
813 debugrevspec parse and apply a revision specification
813 debugrevspec parse and apply a revision specification
814 debugsetparents
814 debugsetparents
815 manually set the parents of the current working directory
815 manually set the parents of the current working directory
816 debugsub (no help text available)
816 debugsub (no help text available)
817 debugsuccessorssets
817 debugsuccessorssets
818 show set of successors for revision
818 show set of successors for revision
819 debugwalk show how files match on given patterns
819 debugwalk show how files match on given patterns
820 debugwireargs
820 debugwireargs
821 (no help text available)
821 (no help text available)
822
822
823 use "hg -v help debug" to show builtin aliases and global options
823 use "hg -v help debug" to show builtin aliases and global options
824
824
825
825
826 Test list of commands with command with no help text
826 Test list of commands with command with no help text
827
827
828 $ hg help helpext
828 $ hg help helpext
829 helpext extension - no help text available
829 helpext extension - no help text available
830
830
831 list of commands:
831 list of commands:
832
832
833 nohelp (no help text available)
833 nohelp (no help text available)
834
834
835 use "hg -v help helpext" to show builtin aliases and global options
835 use "hg -v help helpext" to show builtin aliases and global options
836
836
837
837
838 test deprecated option is hidden in command help
838 test deprecated option is hidden in command help
839 $ hg help debugoptDEP
839 $ hg help debugoptDEP
840 hg debugoptDEP
840 hg debugoptDEP
841
841
842 (no help text available)
842 (no help text available)
843
843
844 options:
844 options:
845
845
846 use "hg -v help debugoptDEP" to show the global options
846 (some details hidden, use --verbose to show complete help)
847
847
848 test deprecated option is shown with -v
848 test deprecated option is shown with -v
849 $ hg help -v debugoptDEP | grep dopt
849 $ hg help -v debugoptDEP | grep dopt
850 --dopt option is DEPRECATED
850 --dopt option is DEPRECATED
851
851
852 #if gettext
852 #if gettext
853 test deprecated option is hidden with translation with untranslated description
853 test deprecated option is hidden with translation with untranslated description
854 (use many globy for not failing on changed transaction)
854 (use many globy for not failing on changed transaction)
855 $ LANGUAGE=sv hg help debugoptDEP
855 $ LANGUAGE=sv hg help debugoptDEP
856 hg debugoptDEP
856 hg debugoptDEP
857
857
858 (*) (glob)
858 (*) (glob)
859
859
860 flaggor:
860 flaggor:
861
861
862 *"hg -v help debugoptDEP"* (glob)
862 (some details hidden, use --verbose to show complete help)
863 #endif
863 #endif
864
864
865 Test commands that collide with topics (issue4240)
865 Test commands that collide with topics (issue4240)
866
866
867 $ hg config -hq
867 $ hg config -hq
868 hg config [-u] [NAME]...
868 hg config [-u] [NAME]...
869
869
870 show combined config settings from all hgrc files
870 show combined config settings from all hgrc files
871 $ hg showconfig -hq
871 $ hg showconfig -hq
872 hg config [-u] [NAME]...
872 hg config [-u] [NAME]...
873
873
874 show combined config settings from all hgrc files
874 show combined config settings from all hgrc files
875
875
876 Test a help topic
876 Test a help topic
877
877
878 $ hg help revs
878 $ hg help revs
879 Specifying Single Revisions
879 Specifying Single Revisions
880 """""""""""""""""""""""""""
880 """""""""""""""""""""""""""
881
881
882 Mercurial supports several ways to specify individual revisions.
882 Mercurial supports several ways to specify individual revisions.
883
883
884 A plain integer is treated as a revision number. Negative integers are
884 A plain integer is treated as a revision number. Negative integers are
885 treated as sequential offsets from the tip, with -1 denoting the tip, -2
885 treated as sequential offsets from the tip, with -1 denoting the tip, -2
886 denoting the revision prior to the tip, and so forth.
886 denoting the revision prior to the tip, and so forth.
887
887
888 A 40-digit hexadecimal string is treated as a unique revision identifier.
888 A 40-digit hexadecimal string is treated as a unique revision identifier.
889
889
890 A hexadecimal string less than 40 characters long is treated as a unique
890 A hexadecimal string less than 40 characters long is treated as a unique
891 revision identifier and is referred to as a short-form identifier. A
891 revision identifier and is referred to as a short-form identifier. A
892 short-form identifier is only valid if it is the prefix of exactly one
892 short-form identifier is only valid if it is the prefix of exactly one
893 full-length identifier.
893 full-length identifier.
894
894
895 Any other string is treated as a bookmark, tag, or branch name. A bookmark
895 Any other string is treated as a bookmark, tag, or branch name. A bookmark
896 is a movable pointer to a revision. A tag is a permanent name associated
896 is a movable pointer to a revision. A tag is a permanent name associated
897 with a revision. A branch name denotes the tipmost open branch head of
897 with a revision. A branch name denotes the tipmost open branch head of
898 that branch - or if they are all closed, the tipmost closed head of the
898 that branch - or if they are all closed, the tipmost closed head of the
899 branch. Bookmark, tag, and branch names must not contain the ":"
899 branch. Bookmark, tag, and branch names must not contain the ":"
900 character.
900 character.
901
901
902 The reserved name "tip" always identifies the most recent revision.
902 The reserved name "tip" always identifies the most recent revision.
903
903
904 The reserved name "null" indicates the null revision. This is the revision
904 The reserved name "null" indicates the null revision. This is the revision
905 of an empty repository, and the parent of revision 0.
905 of an empty repository, and the parent of revision 0.
906
906
907 The reserved name "." indicates the working directory parent. If no
907 The reserved name "." indicates the working directory parent. If no
908 working directory is checked out, it is equivalent to null. If an
908 working directory is checked out, it is equivalent to null. If an
909 uncommitted merge is in progress, "." is the revision of the first parent.
909 uncommitted merge is in progress, "." is the revision of the first parent.
910
910
911 Test templating help
911 Test templating help
912
912
913 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
913 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
914 desc String. The text of the changeset description.
914 desc String. The text of the changeset description.
915 diffstat String. Statistics of changes with the following format:
915 diffstat String. Statistics of changes with the following format:
916 firstline Any text. Returns the first line of text.
916 firstline Any text. Returns the first line of text.
917 nonempty Any text. Returns '(none)' if the string is empty.
917 nonempty Any text. Returns '(none)' if the string is empty.
918
918
919 Test help hooks
919 Test help hooks
920
920
921 $ cat > helphook1.py <<EOF
921 $ cat > helphook1.py <<EOF
922 > from mercurial import help
922 > from mercurial import help
923 >
923 >
924 > def rewrite(topic, doc):
924 > def rewrite(topic, doc):
925 > return doc + '\nhelphook1\n'
925 > return doc + '\nhelphook1\n'
926 >
926 >
927 > def extsetup(ui):
927 > def extsetup(ui):
928 > help.addtopichook('revsets', rewrite)
928 > help.addtopichook('revsets', rewrite)
929 > EOF
929 > EOF
930 $ cat > helphook2.py <<EOF
930 $ cat > helphook2.py <<EOF
931 > from mercurial import help
931 > from mercurial import help
932 >
932 >
933 > def rewrite(topic, doc):
933 > def rewrite(topic, doc):
934 > return doc + '\nhelphook2\n'
934 > return doc + '\nhelphook2\n'
935 >
935 >
936 > def extsetup(ui):
936 > def extsetup(ui):
937 > help.addtopichook('revsets', rewrite)
937 > help.addtopichook('revsets', rewrite)
938 > EOF
938 > EOF
939 $ echo '[extensions]' >> $HGRCPATH
939 $ echo '[extensions]' >> $HGRCPATH
940 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
940 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
941 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
941 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
942 $ hg help revsets | grep helphook
942 $ hg help revsets | grep helphook
943 helphook1
943 helphook1
944 helphook2
944 helphook2
945
945
946 Test keyword search help
946 Test keyword search help
947
947
948 $ cat > prefixedname.py <<EOF
948 $ cat > prefixedname.py <<EOF
949 > '''matched against word "clone"
949 > '''matched against word "clone"
950 > '''
950 > '''
951 > EOF
951 > EOF
952 $ echo '[extensions]' >> $HGRCPATH
952 $ echo '[extensions]' >> $HGRCPATH
953 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
953 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
954 $ hg help -k clone
954 $ hg help -k clone
955 Topics:
955 Topics:
956
956
957 config Configuration Files
957 config Configuration Files
958 extensions Using Additional Features
958 extensions Using Additional Features
959 glossary Glossary
959 glossary Glossary
960 phases Working with Phases
960 phases Working with Phases
961 subrepos Subrepositories
961 subrepos Subrepositories
962 urls URL Paths
962 urls URL Paths
963
963
964 Commands:
964 Commands:
965
965
966 bookmarks create a new bookmark or list existing bookmarks
966 bookmarks create a new bookmark or list existing bookmarks
967 clone make a copy of an existing repository
967 clone make a copy of an existing repository
968 paths show aliases for remote repositories
968 paths show aliases for remote repositories
969 update update working directory (or switch revisions)
969 update update working directory (or switch revisions)
970
970
971 Extensions:
971 Extensions:
972
972
973 prefixedname matched against word "clone"
973 prefixedname matched against word "clone"
974 relink recreates hardlinks between repository clones
974 relink recreates hardlinks between repository clones
975
975
976 Extension Commands:
976 Extension Commands:
977
977
978 qclone clone main and patch repository at same time
978 qclone clone main and patch repository at same time
979
979
980 Test unfound topic
980 Test unfound topic
981
981
982 $ hg help nonexistingtopicthatwillneverexisteverever
982 $ hg help nonexistingtopicthatwillneverexisteverever
983 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
983 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
984 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
984 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
985 [255]
985 [255]
986
986
987 Test unfound keyword
987 Test unfound keyword
988
988
989 $ hg help --keyword nonexistingwordthatwillneverexisteverever
989 $ hg help --keyword nonexistingwordthatwillneverexisteverever
990 abort: no matches
990 abort: no matches
991 (try "hg help" for a list of topics)
991 (try "hg help" for a list of topics)
992 [255]
992 [255]
993
993
994 Test omit indicating for help
994 Test omit indicating for help
995
995
996 $ cat > addverboseitems.py <<EOF
996 $ cat > addverboseitems.py <<EOF
997 > '''extension to test omit indicating.
997 > '''extension to test omit indicating.
998 >
998 >
999 > This paragraph is never omitted (for extension)
999 > This paragraph is never omitted (for extension)
1000 >
1000 >
1001 > .. container:: verbose
1001 > .. container:: verbose
1002 >
1002 >
1003 > This paragraph is omitted,
1003 > This paragraph is omitted,
1004 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension)
1004 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension)
1005 >
1005 >
1006 > This paragraph is never omitted, too (for extension)
1006 > This paragraph is never omitted, too (for extension)
1007 > '''
1007 > '''
1008 >
1008 >
1009 > from mercurial import help, commands
1009 > from mercurial import help, commands
1010 > testtopic = """This paragraph is never omitted (for topic).
1010 > testtopic = """This paragraph is never omitted (for topic).
1011 >
1011 >
1012 > .. container:: verbose
1012 > .. container:: verbose
1013 >
1013 >
1014 > This paragraph is omitted,
1014 > This paragraph is omitted,
1015 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic)
1015 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic)
1016 >
1016 >
1017 > This paragraph is never omitted, too (for topic)
1017 > This paragraph is never omitted, too (for topic)
1018 > """
1018 > """
1019 > def extsetup(ui):
1019 > def extsetup(ui):
1020 > help.helptable.append((["topic-containing-verbose"],
1020 > help.helptable.append((["topic-containing-verbose"],
1021 > "This is the topic to test omit indicating.",
1021 > "This is the topic to test omit indicating.",
1022 > lambda : testtopic))
1022 > lambda : testtopic))
1023 > EOF
1023 > EOF
1024 $ echo '[extensions]' >> $HGRCPATH
1024 $ echo '[extensions]' >> $HGRCPATH
1025 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1025 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1026 $ hg help addverboseitems
1026 $ hg help addverboseitems
1027 addverboseitems extension - extension to test omit indicating.
1027 addverboseitems extension - extension to test omit indicating.
1028
1028
1029 This paragraph is never omitted (for extension)
1029 This paragraph is never omitted (for extension)
1030
1030
1031 This paragraph is never omitted, too (for extension)
1031 This paragraph is never omitted, too (for extension)
1032
1032
1033 use "hg help -v addverboseitems" to show more complete help
1033 use "hg help -v addverboseitems" to show more complete help
1034
1034
1035 no commands defined
1035 no commands defined
1036 $ hg help -v addverboseitems
1036 $ hg help -v addverboseitems
1037 addverboseitems extension - extension to test omit indicating.
1037 addverboseitems extension - extension to test omit indicating.
1038
1038
1039 This paragraph is never omitted (for extension)
1039 This paragraph is never omitted (for extension)
1040
1040
1041 This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension)
1041 This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension)
1042
1042
1043 This paragraph is never omitted, too (for extension)
1043 This paragraph is never omitted, too (for extension)
1044
1044
1045 no commands defined
1045 no commands defined
1046 $ hg help topic-containing-verbose
1046 $ hg help topic-containing-verbose
1047 This is the topic to test omit indicating.
1047 This is the topic to test omit indicating.
1048 """"""""""""""""""""""""""""""""""""""""""
1048 """"""""""""""""""""""""""""""""""""""""""
1049
1049
1050 This paragraph is never omitted (for topic).
1050 This paragraph is never omitted (for topic).
1051
1051
1052 This paragraph is never omitted, too (for topic)
1052 This paragraph is never omitted, too (for topic)
1053
1053
1054 use "hg help -v topic-containing-verbose" to show more complete help
1054 use "hg help -v topic-containing-verbose" to show more complete help
1055 $ hg help -v topic-containing-verbose
1055 $ hg help -v topic-containing-verbose
1056 This is the topic to test omit indicating.
1056 This is the topic to test omit indicating.
1057 """"""""""""""""""""""""""""""""""""""""""
1057 """"""""""""""""""""""""""""""""""""""""""
1058
1058
1059 This paragraph is never omitted (for topic).
1059 This paragraph is never omitted (for topic).
1060
1060
1061 This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic)
1061 This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic)
1062
1062
1063 This paragraph is never omitted, too (for topic)
1063 This paragraph is never omitted, too (for topic)
1064
1064
1065 Test usage of section marks in help documents
1065 Test usage of section marks in help documents
1066
1066
1067 $ cd "$TESTDIR"/../doc
1067 $ cd "$TESTDIR"/../doc
1068 $ python check-seclevel.py
1068 $ python check-seclevel.py
1069 $ cd $TESTTMP
1069 $ cd $TESTTMP
1070
1070
1071 #if serve
1071 #if serve
1072
1072
1073 Test the help pages in hgweb.
1073 Test the help pages in hgweb.
1074
1074
1075 Dish up an empty repo; serve it cold.
1075 Dish up an empty repo; serve it cold.
1076
1076
1077 $ hg init "$TESTTMP/test"
1077 $ hg init "$TESTTMP/test"
1078 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1078 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1079 $ cat hg.pid >> $DAEMON_PIDS
1079 $ cat hg.pid >> $DAEMON_PIDS
1080
1080
1081 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
1081 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help"
1082 200 Script output follows
1082 200 Script output follows
1083
1083
1084 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1084 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1085 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1085 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1086 <head>
1086 <head>
1087 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1087 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1088 <meta name="robots" content="index, nofollow" />
1088 <meta name="robots" content="index, nofollow" />
1089 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1089 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1090 <script type="text/javascript" src="/static/mercurial.js"></script>
1090 <script type="text/javascript" src="/static/mercurial.js"></script>
1091
1091
1092 <title>Help: Index</title>
1092 <title>Help: Index</title>
1093 </head>
1093 </head>
1094 <body>
1094 <body>
1095
1095
1096 <div class="container">
1096 <div class="container">
1097 <div class="menu">
1097 <div class="menu">
1098 <div class="logo">
1098 <div class="logo">
1099 <a href="http://mercurial.selenic.com/">
1099 <a href="http://mercurial.selenic.com/">
1100 <img src="/static/hglogo.png" alt="mercurial" /></a>
1100 <img src="/static/hglogo.png" alt="mercurial" /></a>
1101 </div>
1101 </div>
1102 <ul>
1102 <ul>
1103 <li><a href="/shortlog">log</a></li>
1103 <li><a href="/shortlog">log</a></li>
1104 <li><a href="/graph">graph</a></li>
1104 <li><a href="/graph">graph</a></li>
1105 <li><a href="/tags">tags</a></li>
1105 <li><a href="/tags">tags</a></li>
1106 <li><a href="/bookmarks">bookmarks</a></li>
1106 <li><a href="/bookmarks">bookmarks</a></li>
1107 <li><a href="/branches">branches</a></li>
1107 <li><a href="/branches">branches</a></li>
1108 </ul>
1108 </ul>
1109 <ul>
1109 <ul>
1110 <li class="active">help</li>
1110 <li class="active">help</li>
1111 </ul>
1111 </ul>
1112 </div>
1112 </div>
1113
1113
1114 <div class="main">
1114 <div class="main">
1115 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1115 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1116 <form class="search" action="/log">
1116 <form class="search" action="/log">
1117
1117
1118 <p><input name="rev" id="search1" type="text" size="30" /></p>
1118 <p><input name="rev" id="search1" type="text" size="30" /></p>
1119 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1119 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1120 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1120 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1121 </form>
1121 </form>
1122 <table class="bigtable">
1122 <table class="bigtable">
1123 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1123 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1124
1124
1125 <tr><td>
1125 <tr><td>
1126 <a href="/help/config">
1126 <a href="/help/config">
1127 config
1127 config
1128 </a>
1128 </a>
1129 </td><td>
1129 </td><td>
1130 Configuration Files
1130 Configuration Files
1131 </td></tr>
1131 </td></tr>
1132 <tr><td>
1132 <tr><td>
1133 <a href="/help/dates">
1133 <a href="/help/dates">
1134 dates
1134 dates
1135 </a>
1135 </a>
1136 </td><td>
1136 </td><td>
1137 Date Formats
1137 Date Formats
1138 </td></tr>
1138 </td></tr>
1139 <tr><td>
1139 <tr><td>
1140 <a href="/help/diffs">
1140 <a href="/help/diffs">
1141 diffs
1141 diffs
1142 </a>
1142 </a>
1143 </td><td>
1143 </td><td>
1144 Diff Formats
1144 Diff Formats
1145 </td></tr>
1145 </td></tr>
1146 <tr><td>
1146 <tr><td>
1147 <a href="/help/environment">
1147 <a href="/help/environment">
1148 environment
1148 environment
1149 </a>
1149 </a>
1150 </td><td>
1150 </td><td>
1151 Environment Variables
1151 Environment Variables
1152 </td></tr>
1152 </td></tr>
1153 <tr><td>
1153 <tr><td>
1154 <a href="/help/extensions">
1154 <a href="/help/extensions">
1155 extensions
1155 extensions
1156 </a>
1156 </a>
1157 </td><td>
1157 </td><td>
1158 Using Additional Features
1158 Using Additional Features
1159 </td></tr>
1159 </td></tr>
1160 <tr><td>
1160 <tr><td>
1161 <a href="/help/filesets">
1161 <a href="/help/filesets">
1162 filesets
1162 filesets
1163 </a>
1163 </a>
1164 </td><td>
1164 </td><td>
1165 Specifying File Sets
1165 Specifying File Sets
1166 </td></tr>
1166 </td></tr>
1167 <tr><td>
1167 <tr><td>
1168 <a href="/help/glossary">
1168 <a href="/help/glossary">
1169 glossary
1169 glossary
1170 </a>
1170 </a>
1171 </td><td>
1171 </td><td>
1172 Glossary
1172 Glossary
1173 </td></tr>
1173 </td></tr>
1174 <tr><td>
1174 <tr><td>
1175 <a href="/help/hgignore">
1175 <a href="/help/hgignore">
1176 hgignore
1176 hgignore
1177 </a>
1177 </a>
1178 </td><td>
1178 </td><td>
1179 Syntax for Mercurial Ignore Files
1179 Syntax for Mercurial Ignore Files
1180 </td></tr>
1180 </td></tr>
1181 <tr><td>
1181 <tr><td>
1182 <a href="/help/hgweb">
1182 <a href="/help/hgweb">
1183 hgweb
1183 hgweb
1184 </a>
1184 </a>
1185 </td><td>
1185 </td><td>
1186 Configuring hgweb
1186 Configuring hgweb
1187 </td></tr>
1187 </td></tr>
1188 <tr><td>
1188 <tr><td>
1189 <a href="/help/merge-tools">
1189 <a href="/help/merge-tools">
1190 merge-tools
1190 merge-tools
1191 </a>
1191 </a>
1192 </td><td>
1192 </td><td>
1193 Merge Tools
1193 Merge Tools
1194 </td></tr>
1194 </td></tr>
1195 <tr><td>
1195 <tr><td>
1196 <a href="/help/multirevs">
1196 <a href="/help/multirevs">
1197 multirevs
1197 multirevs
1198 </a>
1198 </a>
1199 </td><td>
1199 </td><td>
1200 Specifying Multiple Revisions
1200 Specifying Multiple Revisions
1201 </td></tr>
1201 </td></tr>
1202 <tr><td>
1202 <tr><td>
1203 <a href="/help/patterns">
1203 <a href="/help/patterns">
1204 patterns
1204 patterns
1205 </a>
1205 </a>
1206 </td><td>
1206 </td><td>
1207 File Name Patterns
1207 File Name Patterns
1208 </td></tr>
1208 </td></tr>
1209 <tr><td>
1209 <tr><td>
1210 <a href="/help/phases">
1210 <a href="/help/phases">
1211 phases
1211 phases
1212 </a>
1212 </a>
1213 </td><td>
1213 </td><td>
1214 Working with Phases
1214 Working with Phases
1215 </td></tr>
1215 </td></tr>
1216 <tr><td>
1216 <tr><td>
1217 <a href="/help/revisions">
1217 <a href="/help/revisions">
1218 revisions
1218 revisions
1219 </a>
1219 </a>
1220 </td><td>
1220 </td><td>
1221 Specifying Single Revisions
1221 Specifying Single Revisions
1222 </td></tr>
1222 </td></tr>
1223 <tr><td>
1223 <tr><td>
1224 <a href="/help/revsets">
1224 <a href="/help/revsets">
1225 revsets
1225 revsets
1226 </a>
1226 </a>
1227 </td><td>
1227 </td><td>
1228 Specifying Revision Sets
1228 Specifying Revision Sets
1229 </td></tr>
1229 </td></tr>
1230 <tr><td>
1230 <tr><td>
1231 <a href="/help/subrepos">
1231 <a href="/help/subrepos">
1232 subrepos
1232 subrepos
1233 </a>
1233 </a>
1234 </td><td>
1234 </td><td>
1235 Subrepositories
1235 Subrepositories
1236 </td></tr>
1236 </td></tr>
1237 <tr><td>
1237 <tr><td>
1238 <a href="/help/templating">
1238 <a href="/help/templating">
1239 templating
1239 templating
1240 </a>
1240 </a>
1241 </td><td>
1241 </td><td>
1242 Template Usage
1242 Template Usage
1243 </td></tr>
1243 </td></tr>
1244 <tr><td>
1244 <tr><td>
1245 <a href="/help/urls">
1245 <a href="/help/urls">
1246 urls
1246 urls
1247 </a>
1247 </a>
1248 </td><td>
1248 </td><td>
1249 URL Paths
1249 URL Paths
1250 </td></tr>
1250 </td></tr>
1251 <tr><td>
1251 <tr><td>
1252 <a href="/help/topic-containing-verbose">
1252 <a href="/help/topic-containing-verbose">
1253 topic-containing-verbose
1253 topic-containing-verbose
1254 </a>
1254 </a>
1255 </td><td>
1255 </td><td>
1256 This is the topic to test omit indicating.
1256 This is the topic to test omit indicating.
1257 </td></tr>
1257 </td></tr>
1258
1258
1259 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1259 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1260
1260
1261 <tr><td>
1261 <tr><td>
1262 <a href="/help/add">
1262 <a href="/help/add">
1263 add
1263 add
1264 </a>
1264 </a>
1265 </td><td>
1265 </td><td>
1266 add the specified files on the next commit
1266 add the specified files on the next commit
1267 </td></tr>
1267 </td></tr>
1268 <tr><td>
1268 <tr><td>
1269 <a href="/help/annotate">
1269 <a href="/help/annotate">
1270 annotate
1270 annotate
1271 </a>
1271 </a>
1272 </td><td>
1272 </td><td>
1273 show changeset information by line for each file
1273 show changeset information by line for each file
1274 </td></tr>
1274 </td></tr>
1275 <tr><td>
1275 <tr><td>
1276 <a href="/help/clone">
1276 <a href="/help/clone">
1277 clone
1277 clone
1278 </a>
1278 </a>
1279 </td><td>
1279 </td><td>
1280 make a copy of an existing repository
1280 make a copy of an existing repository
1281 </td></tr>
1281 </td></tr>
1282 <tr><td>
1282 <tr><td>
1283 <a href="/help/commit">
1283 <a href="/help/commit">
1284 commit
1284 commit
1285 </a>
1285 </a>
1286 </td><td>
1286 </td><td>
1287 commit the specified files or all outstanding changes
1287 commit the specified files or all outstanding changes
1288 </td></tr>
1288 </td></tr>
1289 <tr><td>
1289 <tr><td>
1290 <a href="/help/diff">
1290 <a href="/help/diff">
1291 diff
1291 diff
1292 </a>
1292 </a>
1293 </td><td>
1293 </td><td>
1294 diff repository (or selected files)
1294 diff repository (or selected files)
1295 </td></tr>
1295 </td></tr>
1296 <tr><td>
1296 <tr><td>
1297 <a href="/help/export">
1297 <a href="/help/export">
1298 export
1298 export
1299 </a>
1299 </a>
1300 </td><td>
1300 </td><td>
1301 dump the header and diffs for one or more changesets
1301 dump the header and diffs for one or more changesets
1302 </td></tr>
1302 </td></tr>
1303 <tr><td>
1303 <tr><td>
1304 <a href="/help/forget">
1304 <a href="/help/forget">
1305 forget
1305 forget
1306 </a>
1306 </a>
1307 </td><td>
1307 </td><td>
1308 forget the specified files on the next commit
1308 forget the specified files on the next commit
1309 </td></tr>
1309 </td></tr>
1310 <tr><td>
1310 <tr><td>
1311 <a href="/help/init">
1311 <a href="/help/init">
1312 init
1312 init
1313 </a>
1313 </a>
1314 </td><td>
1314 </td><td>
1315 create a new repository in the given directory
1315 create a new repository in the given directory
1316 </td></tr>
1316 </td></tr>
1317 <tr><td>
1317 <tr><td>
1318 <a href="/help/log">
1318 <a href="/help/log">
1319 log
1319 log
1320 </a>
1320 </a>
1321 </td><td>
1321 </td><td>
1322 show revision history of entire repository or files
1322 show revision history of entire repository or files
1323 </td></tr>
1323 </td></tr>
1324 <tr><td>
1324 <tr><td>
1325 <a href="/help/merge">
1325 <a href="/help/merge">
1326 merge
1326 merge
1327 </a>
1327 </a>
1328 </td><td>
1328 </td><td>
1329 merge working directory with another revision
1329 merge working directory with another revision
1330 </td></tr>
1330 </td></tr>
1331 <tr><td>
1331 <tr><td>
1332 <a href="/help/pull">
1332 <a href="/help/pull">
1333 pull
1333 pull
1334 </a>
1334 </a>
1335 </td><td>
1335 </td><td>
1336 pull changes from the specified source
1336 pull changes from the specified source
1337 </td></tr>
1337 </td></tr>
1338 <tr><td>
1338 <tr><td>
1339 <a href="/help/push">
1339 <a href="/help/push">
1340 push
1340 push
1341 </a>
1341 </a>
1342 </td><td>
1342 </td><td>
1343 push changes to the specified destination
1343 push changes to the specified destination
1344 </td></tr>
1344 </td></tr>
1345 <tr><td>
1345 <tr><td>
1346 <a href="/help/remove">
1346 <a href="/help/remove">
1347 remove
1347 remove
1348 </a>
1348 </a>
1349 </td><td>
1349 </td><td>
1350 remove the specified files on the next commit
1350 remove the specified files on the next commit
1351 </td></tr>
1351 </td></tr>
1352 <tr><td>
1352 <tr><td>
1353 <a href="/help/serve">
1353 <a href="/help/serve">
1354 serve
1354 serve
1355 </a>
1355 </a>
1356 </td><td>
1356 </td><td>
1357 start stand-alone webserver
1357 start stand-alone webserver
1358 </td></tr>
1358 </td></tr>
1359 <tr><td>
1359 <tr><td>
1360 <a href="/help/status">
1360 <a href="/help/status">
1361 status
1361 status
1362 </a>
1362 </a>
1363 </td><td>
1363 </td><td>
1364 show changed files in the working directory
1364 show changed files in the working directory
1365 </td></tr>
1365 </td></tr>
1366 <tr><td>
1366 <tr><td>
1367 <a href="/help/summary">
1367 <a href="/help/summary">
1368 summary
1368 summary
1369 </a>
1369 </a>
1370 </td><td>
1370 </td><td>
1371 summarize working directory state
1371 summarize working directory state
1372 </td></tr>
1372 </td></tr>
1373 <tr><td>
1373 <tr><td>
1374 <a href="/help/update">
1374 <a href="/help/update">
1375 update
1375 update
1376 </a>
1376 </a>
1377 </td><td>
1377 </td><td>
1378 update working directory (or switch revisions)
1378 update working directory (or switch revisions)
1379 </td></tr>
1379 </td></tr>
1380
1380
1381 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1381 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1382
1382
1383 <tr><td>
1383 <tr><td>
1384 <a href="/help/addremove">
1384 <a href="/help/addremove">
1385 addremove
1385 addremove
1386 </a>
1386 </a>
1387 </td><td>
1387 </td><td>
1388 add all new files, delete all missing files
1388 add all new files, delete all missing files
1389 </td></tr>
1389 </td></tr>
1390 <tr><td>
1390 <tr><td>
1391 <a href="/help/archive">
1391 <a href="/help/archive">
1392 archive
1392 archive
1393 </a>
1393 </a>
1394 </td><td>
1394 </td><td>
1395 create an unversioned archive of a repository revision
1395 create an unversioned archive of a repository revision
1396 </td></tr>
1396 </td></tr>
1397 <tr><td>
1397 <tr><td>
1398 <a href="/help/backout">
1398 <a href="/help/backout">
1399 backout
1399 backout
1400 </a>
1400 </a>
1401 </td><td>
1401 </td><td>
1402 reverse effect of earlier changeset
1402 reverse effect of earlier changeset
1403 </td></tr>
1403 </td></tr>
1404 <tr><td>
1404 <tr><td>
1405 <a href="/help/bisect">
1405 <a href="/help/bisect">
1406 bisect
1406 bisect
1407 </a>
1407 </a>
1408 </td><td>
1408 </td><td>
1409 subdivision search of changesets
1409 subdivision search of changesets
1410 </td></tr>
1410 </td></tr>
1411 <tr><td>
1411 <tr><td>
1412 <a href="/help/bookmarks">
1412 <a href="/help/bookmarks">
1413 bookmarks
1413 bookmarks
1414 </a>
1414 </a>
1415 </td><td>
1415 </td><td>
1416 create a new bookmark or list existing bookmarks
1416 create a new bookmark or list existing bookmarks
1417 </td></tr>
1417 </td></tr>
1418 <tr><td>
1418 <tr><td>
1419 <a href="/help/branch">
1419 <a href="/help/branch">
1420 branch
1420 branch
1421 </a>
1421 </a>
1422 </td><td>
1422 </td><td>
1423 set or show the current branch name
1423 set or show the current branch name
1424 </td></tr>
1424 </td></tr>
1425 <tr><td>
1425 <tr><td>
1426 <a href="/help/branches">
1426 <a href="/help/branches">
1427 branches
1427 branches
1428 </a>
1428 </a>
1429 </td><td>
1429 </td><td>
1430 list repository named branches
1430 list repository named branches
1431 </td></tr>
1431 </td></tr>
1432 <tr><td>
1432 <tr><td>
1433 <a href="/help/bundle">
1433 <a href="/help/bundle">
1434 bundle
1434 bundle
1435 </a>
1435 </a>
1436 </td><td>
1436 </td><td>
1437 create a changegroup file
1437 create a changegroup file
1438 </td></tr>
1438 </td></tr>
1439 <tr><td>
1439 <tr><td>
1440 <a href="/help/cat">
1440 <a href="/help/cat">
1441 cat
1441 cat
1442 </a>
1442 </a>
1443 </td><td>
1443 </td><td>
1444 output the current or given revision of files
1444 output the current or given revision of files
1445 </td></tr>
1445 </td></tr>
1446 <tr><td>
1446 <tr><td>
1447 <a href="/help/config">
1447 <a href="/help/config">
1448 config
1448 config
1449 </a>
1449 </a>
1450 </td><td>
1450 </td><td>
1451 show combined config settings from all hgrc files
1451 show combined config settings from all hgrc files
1452 </td></tr>
1452 </td></tr>
1453 <tr><td>
1453 <tr><td>
1454 <a href="/help/copy">
1454 <a href="/help/copy">
1455 copy
1455 copy
1456 </a>
1456 </a>
1457 </td><td>
1457 </td><td>
1458 mark files as copied for the next commit
1458 mark files as copied for the next commit
1459 </td></tr>
1459 </td></tr>
1460 <tr><td>
1460 <tr><td>
1461 <a href="/help/graft">
1461 <a href="/help/graft">
1462 graft
1462 graft
1463 </a>
1463 </a>
1464 </td><td>
1464 </td><td>
1465 copy changes from other branches onto the current branch
1465 copy changes from other branches onto the current branch
1466 </td></tr>
1466 </td></tr>
1467 <tr><td>
1467 <tr><td>
1468 <a href="/help/grep">
1468 <a href="/help/grep">
1469 grep
1469 grep
1470 </a>
1470 </a>
1471 </td><td>
1471 </td><td>
1472 search for a pattern in specified files and revisions
1472 search for a pattern in specified files and revisions
1473 </td></tr>
1473 </td></tr>
1474 <tr><td>
1474 <tr><td>
1475 <a href="/help/heads">
1475 <a href="/help/heads">
1476 heads
1476 heads
1477 </a>
1477 </a>
1478 </td><td>
1478 </td><td>
1479 show branch heads
1479 show branch heads
1480 </td></tr>
1480 </td></tr>
1481 <tr><td>
1481 <tr><td>
1482 <a href="/help/help">
1482 <a href="/help/help">
1483 help
1483 help
1484 </a>
1484 </a>
1485 </td><td>
1485 </td><td>
1486 show help for a given topic or a help overview
1486 show help for a given topic or a help overview
1487 </td></tr>
1487 </td></tr>
1488 <tr><td>
1488 <tr><td>
1489 <a href="/help/identify">
1489 <a href="/help/identify">
1490 identify
1490 identify
1491 </a>
1491 </a>
1492 </td><td>
1492 </td><td>
1493 identify the working copy or specified revision
1493 identify the working copy or specified revision
1494 </td></tr>
1494 </td></tr>
1495 <tr><td>
1495 <tr><td>
1496 <a href="/help/import">
1496 <a href="/help/import">
1497 import
1497 import
1498 </a>
1498 </a>
1499 </td><td>
1499 </td><td>
1500 import an ordered set of patches
1500 import an ordered set of patches
1501 </td></tr>
1501 </td></tr>
1502 <tr><td>
1502 <tr><td>
1503 <a href="/help/incoming">
1503 <a href="/help/incoming">
1504 incoming
1504 incoming
1505 </a>
1505 </a>
1506 </td><td>
1506 </td><td>
1507 show new changesets found in source
1507 show new changesets found in source
1508 </td></tr>
1508 </td></tr>
1509 <tr><td>
1509 <tr><td>
1510 <a href="/help/locate">
1510 <a href="/help/locate">
1511 locate
1511 locate
1512 </a>
1512 </a>
1513 </td><td>
1513 </td><td>
1514 locate files matching specific patterns
1514 locate files matching specific patterns
1515 </td></tr>
1515 </td></tr>
1516 <tr><td>
1516 <tr><td>
1517 <a href="/help/manifest">
1517 <a href="/help/manifest">
1518 manifest
1518 manifest
1519 </a>
1519 </a>
1520 </td><td>
1520 </td><td>
1521 output the current or given revision of the project manifest
1521 output the current or given revision of the project manifest
1522 </td></tr>
1522 </td></tr>
1523 <tr><td>
1523 <tr><td>
1524 <a href="/help/nohelp">
1524 <a href="/help/nohelp">
1525 nohelp
1525 nohelp
1526 </a>
1526 </a>
1527 </td><td>
1527 </td><td>
1528 (no help text available)
1528 (no help text available)
1529 </td></tr>
1529 </td></tr>
1530 <tr><td>
1530 <tr><td>
1531 <a href="/help/outgoing">
1531 <a href="/help/outgoing">
1532 outgoing
1532 outgoing
1533 </a>
1533 </a>
1534 </td><td>
1534 </td><td>
1535 show changesets not found in the destination
1535 show changesets not found in the destination
1536 </td></tr>
1536 </td></tr>
1537 <tr><td>
1537 <tr><td>
1538 <a href="/help/parents">
1538 <a href="/help/parents">
1539 parents
1539 parents
1540 </a>
1540 </a>
1541 </td><td>
1541 </td><td>
1542 show the parents of the working directory or revision
1542 show the parents of the working directory or revision
1543 </td></tr>
1543 </td></tr>
1544 <tr><td>
1544 <tr><td>
1545 <a href="/help/paths">
1545 <a href="/help/paths">
1546 paths
1546 paths
1547 </a>
1547 </a>
1548 </td><td>
1548 </td><td>
1549 show aliases for remote repositories
1549 show aliases for remote repositories
1550 </td></tr>
1550 </td></tr>
1551 <tr><td>
1551 <tr><td>
1552 <a href="/help/phase">
1552 <a href="/help/phase">
1553 phase
1553 phase
1554 </a>
1554 </a>
1555 </td><td>
1555 </td><td>
1556 set or show the current phase name
1556 set or show the current phase name
1557 </td></tr>
1557 </td></tr>
1558 <tr><td>
1558 <tr><td>
1559 <a href="/help/recover">
1559 <a href="/help/recover">
1560 recover
1560 recover
1561 </a>
1561 </a>
1562 </td><td>
1562 </td><td>
1563 roll back an interrupted transaction
1563 roll back an interrupted transaction
1564 </td></tr>
1564 </td></tr>
1565 <tr><td>
1565 <tr><td>
1566 <a href="/help/rename">
1566 <a href="/help/rename">
1567 rename
1567 rename
1568 </a>
1568 </a>
1569 </td><td>
1569 </td><td>
1570 rename files; equivalent of copy + remove
1570 rename files; equivalent of copy + remove
1571 </td></tr>
1571 </td></tr>
1572 <tr><td>
1572 <tr><td>
1573 <a href="/help/resolve">
1573 <a href="/help/resolve">
1574 resolve
1574 resolve
1575 </a>
1575 </a>
1576 </td><td>
1576 </td><td>
1577 redo merges or set/view the merge status of files
1577 redo merges or set/view the merge status of files
1578 </td></tr>
1578 </td></tr>
1579 <tr><td>
1579 <tr><td>
1580 <a href="/help/revert">
1580 <a href="/help/revert">
1581 revert
1581 revert
1582 </a>
1582 </a>
1583 </td><td>
1583 </td><td>
1584 restore files to their checkout state
1584 restore files to their checkout state
1585 </td></tr>
1585 </td></tr>
1586 <tr><td>
1586 <tr><td>
1587 <a href="/help/root">
1587 <a href="/help/root">
1588 root
1588 root
1589 </a>
1589 </a>
1590 </td><td>
1590 </td><td>
1591 print the root (top) of the current working directory
1591 print the root (top) of the current working directory
1592 </td></tr>
1592 </td></tr>
1593 <tr><td>
1593 <tr><td>
1594 <a href="/help/tag">
1594 <a href="/help/tag">
1595 tag
1595 tag
1596 </a>
1596 </a>
1597 </td><td>
1597 </td><td>
1598 add one or more tags for the current or given revision
1598 add one or more tags for the current or given revision
1599 </td></tr>
1599 </td></tr>
1600 <tr><td>
1600 <tr><td>
1601 <a href="/help/tags">
1601 <a href="/help/tags">
1602 tags
1602 tags
1603 </a>
1603 </a>
1604 </td><td>
1604 </td><td>
1605 list repository tags
1605 list repository tags
1606 </td></tr>
1606 </td></tr>
1607 <tr><td>
1607 <tr><td>
1608 <a href="/help/unbundle">
1608 <a href="/help/unbundle">
1609 unbundle
1609 unbundle
1610 </a>
1610 </a>
1611 </td><td>
1611 </td><td>
1612 apply one or more changegroup files
1612 apply one or more changegroup files
1613 </td></tr>
1613 </td></tr>
1614 <tr><td>
1614 <tr><td>
1615 <a href="/help/verify">
1615 <a href="/help/verify">
1616 verify
1616 verify
1617 </a>
1617 </a>
1618 </td><td>
1618 </td><td>
1619 verify the integrity of the repository
1619 verify the integrity of the repository
1620 </td></tr>
1620 </td></tr>
1621 <tr><td>
1621 <tr><td>
1622 <a href="/help/version">
1622 <a href="/help/version">
1623 version
1623 version
1624 </a>
1624 </a>
1625 </td><td>
1625 </td><td>
1626 output version and copyright information
1626 output version and copyright information
1627 </td></tr>
1627 </td></tr>
1628 </table>
1628 </table>
1629 </div>
1629 </div>
1630 </div>
1630 </div>
1631
1631
1632 <script type="text/javascript">process_dates()</script>
1632 <script type="text/javascript">process_dates()</script>
1633
1633
1634
1634
1635 </body>
1635 </body>
1636 </html>
1636 </html>
1637
1637
1638
1638
1639 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1639 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add"
1640 200 Script output follows
1640 200 Script output follows
1641
1641
1642 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1642 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1643 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1643 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1644 <head>
1644 <head>
1645 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1645 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1646 <meta name="robots" content="index, nofollow" />
1646 <meta name="robots" content="index, nofollow" />
1647 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1647 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1648 <script type="text/javascript" src="/static/mercurial.js"></script>
1648 <script type="text/javascript" src="/static/mercurial.js"></script>
1649
1649
1650 <title>Help: add</title>
1650 <title>Help: add</title>
1651 </head>
1651 </head>
1652 <body>
1652 <body>
1653
1653
1654 <div class="container">
1654 <div class="container">
1655 <div class="menu">
1655 <div class="menu">
1656 <div class="logo">
1656 <div class="logo">
1657 <a href="http://mercurial.selenic.com/">
1657 <a href="http://mercurial.selenic.com/">
1658 <img src="/static/hglogo.png" alt="mercurial" /></a>
1658 <img src="/static/hglogo.png" alt="mercurial" /></a>
1659 </div>
1659 </div>
1660 <ul>
1660 <ul>
1661 <li><a href="/shortlog">log</a></li>
1661 <li><a href="/shortlog">log</a></li>
1662 <li><a href="/graph">graph</a></li>
1662 <li><a href="/graph">graph</a></li>
1663 <li><a href="/tags">tags</a></li>
1663 <li><a href="/tags">tags</a></li>
1664 <li><a href="/bookmarks">bookmarks</a></li>
1664 <li><a href="/bookmarks">bookmarks</a></li>
1665 <li><a href="/branches">branches</a></li>
1665 <li><a href="/branches">branches</a></li>
1666 </ul>
1666 </ul>
1667 <ul>
1667 <ul>
1668 <li class="active"><a href="/help">help</a></li>
1668 <li class="active"><a href="/help">help</a></li>
1669 </ul>
1669 </ul>
1670 </div>
1670 </div>
1671
1671
1672 <div class="main">
1672 <div class="main">
1673 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1673 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1674 <h3>Help: add</h3>
1674 <h3>Help: add</h3>
1675
1675
1676 <form class="search" action="/log">
1676 <form class="search" action="/log">
1677
1677
1678 <p><input name="rev" id="search1" type="text" size="30" /></p>
1678 <p><input name="rev" id="search1" type="text" size="30" /></p>
1679 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1679 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1680 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1680 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1681 </form>
1681 </form>
1682 <div id="doc">
1682 <div id="doc">
1683 <p>
1683 <p>
1684 hg add [OPTION]... [FILE]...
1684 hg add [OPTION]... [FILE]...
1685 </p>
1685 </p>
1686 <p>
1686 <p>
1687 add the specified files on the next commit
1687 add the specified files on the next commit
1688 </p>
1688 </p>
1689 <p>
1689 <p>
1690 Schedule files to be version controlled and added to the
1690 Schedule files to be version controlled and added to the
1691 repository.
1691 repository.
1692 </p>
1692 </p>
1693 <p>
1693 <p>
1694 The files will be added to the repository at the next commit. To
1694 The files will be added to the repository at the next commit. To
1695 undo an add before that, see &quot;hg forget&quot;.
1695 undo an add before that, see &quot;hg forget&quot;.
1696 </p>
1696 </p>
1697 <p>
1697 <p>
1698 If no names are given, add all files to the repository.
1698 If no names are given, add all files to the repository.
1699 </p>
1699 </p>
1700 <p>
1700 <p>
1701 An example showing how new (unknown) files are added
1701 An example showing how new (unknown) files are added
1702 automatically by &quot;hg add&quot;:
1702 automatically by &quot;hg add&quot;:
1703 </p>
1703 </p>
1704 <pre>
1704 <pre>
1705 \$ ls (re)
1705 \$ ls (re)
1706 foo.c
1706 foo.c
1707 \$ hg status (re)
1707 \$ hg status (re)
1708 ? foo.c
1708 ? foo.c
1709 \$ hg add (re)
1709 \$ hg add (re)
1710 adding foo.c
1710 adding foo.c
1711 \$ hg status (re)
1711 \$ hg status (re)
1712 A foo.c
1712 A foo.c
1713 </pre>
1713 </pre>
1714 <p>
1714 <p>
1715 Returns 0 if all files are successfully added.
1715 Returns 0 if all files are successfully added.
1716 </p>
1716 </p>
1717 <p>
1717 <p>
1718 options:
1718 options:
1719 </p>
1719 </p>
1720 <table>
1720 <table>
1721 <tr><td>-I</td>
1721 <tr><td>-I</td>
1722 <td>--include PATTERN [+]</td>
1722 <td>--include PATTERN [+]</td>
1723 <td>include names matching the given patterns</td></tr>
1723 <td>include names matching the given patterns</td></tr>
1724 <tr><td>-X</td>
1724 <tr><td>-X</td>
1725 <td>--exclude PATTERN [+]</td>
1725 <td>--exclude PATTERN [+]</td>
1726 <td>exclude names matching the given patterns</td></tr>
1726 <td>exclude names matching the given patterns</td></tr>
1727 <tr><td>-S</td>
1727 <tr><td>-S</td>
1728 <td>--subrepos</td>
1728 <td>--subrepos</td>
1729 <td>recurse into subrepositories</td></tr>
1729 <td>recurse into subrepositories</td></tr>
1730 <tr><td>-n</td>
1730 <tr><td>-n</td>
1731 <td>--dry-run</td>
1731 <td>--dry-run</td>
1732 <td>do not perform actions, just print output</td></tr>
1732 <td>do not perform actions, just print output</td></tr>
1733 </table>
1733 </table>
1734 <p>
1734 <p>
1735 [+] marked option can be specified multiple times
1735 [+] marked option can be specified multiple times
1736 </p>
1736 </p>
1737 <p>
1737 <p>
1738 global options:
1738 global options:
1739 </p>
1739 </p>
1740 <table>
1740 <table>
1741 <tr><td>-R</td>
1741 <tr><td>-R</td>
1742 <td>--repository REPO</td>
1742 <td>--repository REPO</td>
1743 <td>repository root directory or name of overlay bundle file</td></tr>
1743 <td>repository root directory or name of overlay bundle file</td></tr>
1744 <tr><td></td>
1744 <tr><td></td>
1745 <td>--cwd DIR</td>
1745 <td>--cwd DIR</td>
1746 <td>change working directory</td></tr>
1746 <td>change working directory</td></tr>
1747 <tr><td>-y</td>
1747 <tr><td>-y</td>
1748 <td>--noninteractive</td>
1748 <td>--noninteractive</td>
1749 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1749 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1750 <tr><td>-q</td>
1750 <tr><td>-q</td>
1751 <td>--quiet</td>
1751 <td>--quiet</td>
1752 <td>suppress output</td></tr>
1752 <td>suppress output</td></tr>
1753 <tr><td>-v</td>
1753 <tr><td>-v</td>
1754 <td>--verbose</td>
1754 <td>--verbose</td>
1755 <td>enable additional output</td></tr>
1755 <td>enable additional output</td></tr>
1756 <tr><td></td>
1756 <tr><td></td>
1757 <td>--config CONFIG [+]</td>
1757 <td>--config CONFIG [+]</td>
1758 <td>set/override config option (use 'section.name=value')</td></tr>
1758 <td>set/override config option (use 'section.name=value')</td></tr>
1759 <tr><td></td>
1759 <tr><td></td>
1760 <td>--debug</td>
1760 <td>--debug</td>
1761 <td>enable debugging output</td></tr>
1761 <td>enable debugging output</td></tr>
1762 <tr><td></td>
1762 <tr><td></td>
1763 <td>--debugger</td>
1763 <td>--debugger</td>
1764 <td>start debugger</td></tr>
1764 <td>start debugger</td></tr>
1765 <tr><td></td>
1765 <tr><td></td>
1766 <td>--encoding ENCODE</td>
1766 <td>--encoding ENCODE</td>
1767 <td>set the charset encoding (default: ascii)</td></tr>
1767 <td>set the charset encoding (default: ascii)</td></tr>
1768 <tr><td></td>
1768 <tr><td></td>
1769 <td>--encodingmode MODE</td>
1769 <td>--encodingmode MODE</td>
1770 <td>set the charset encoding mode (default: strict)</td></tr>
1770 <td>set the charset encoding mode (default: strict)</td></tr>
1771 <tr><td></td>
1771 <tr><td></td>
1772 <td>--traceback</td>
1772 <td>--traceback</td>
1773 <td>always print a traceback on exception</td></tr>
1773 <td>always print a traceback on exception</td></tr>
1774 <tr><td></td>
1774 <tr><td></td>
1775 <td>--time</td>
1775 <td>--time</td>
1776 <td>time how long the command takes</td></tr>
1776 <td>time how long the command takes</td></tr>
1777 <tr><td></td>
1777 <tr><td></td>
1778 <td>--profile</td>
1778 <td>--profile</td>
1779 <td>print command execution profile</td></tr>
1779 <td>print command execution profile</td></tr>
1780 <tr><td></td>
1780 <tr><td></td>
1781 <td>--version</td>
1781 <td>--version</td>
1782 <td>output version information and exit</td></tr>
1782 <td>output version information and exit</td></tr>
1783 <tr><td>-h</td>
1783 <tr><td>-h</td>
1784 <td>--help</td>
1784 <td>--help</td>
1785 <td>display help and exit</td></tr>
1785 <td>display help and exit</td></tr>
1786 <tr><td></td>
1786 <tr><td></td>
1787 <td>--hidden</td>
1787 <td>--hidden</td>
1788 <td>consider hidden changesets</td></tr>
1788 <td>consider hidden changesets</td></tr>
1789 </table>
1789 </table>
1790 <p>
1790 <p>
1791 [+] marked option can be specified multiple times
1791 [+] marked option can be specified multiple times
1792 </p>
1792 </p>
1793
1793
1794 </div>
1794 </div>
1795 </div>
1795 </div>
1796 </div>
1796 </div>
1797
1797
1798 <script type="text/javascript">process_dates()</script>
1798 <script type="text/javascript">process_dates()</script>
1799
1799
1800
1800
1801 </body>
1801 </body>
1802 </html>
1802 </html>
1803
1803
1804
1804
1805 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1805 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove"
1806 200 Script output follows
1806 200 Script output follows
1807
1807
1808 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1808 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1809 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1809 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1810 <head>
1810 <head>
1811 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1811 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1812 <meta name="robots" content="index, nofollow" />
1812 <meta name="robots" content="index, nofollow" />
1813 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1813 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1814 <script type="text/javascript" src="/static/mercurial.js"></script>
1814 <script type="text/javascript" src="/static/mercurial.js"></script>
1815
1815
1816 <title>Help: remove</title>
1816 <title>Help: remove</title>
1817 </head>
1817 </head>
1818 <body>
1818 <body>
1819
1819
1820 <div class="container">
1820 <div class="container">
1821 <div class="menu">
1821 <div class="menu">
1822 <div class="logo">
1822 <div class="logo">
1823 <a href="http://mercurial.selenic.com/">
1823 <a href="http://mercurial.selenic.com/">
1824 <img src="/static/hglogo.png" alt="mercurial" /></a>
1824 <img src="/static/hglogo.png" alt="mercurial" /></a>
1825 </div>
1825 </div>
1826 <ul>
1826 <ul>
1827 <li><a href="/shortlog">log</a></li>
1827 <li><a href="/shortlog">log</a></li>
1828 <li><a href="/graph">graph</a></li>
1828 <li><a href="/graph">graph</a></li>
1829 <li><a href="/tags">tags</a></li>
1829 <li><a href="/tags">tags</a></li>
1830 <li><a href="/bookmarks">bookmarks</a></li>
1830 <li><a href="/bookmarks">bookmarks</a></li>
1831 <li><a href="/branches">branches</a></li>
1831 <li><a href="/branches">branches</a></li>
1832 </ul>
1832 </ul>
1833 <ul>
1833 <ul>
1834 <li class="active"><a href="/help">help</a></li>
1834 <li class="active"><a href="/help">help</a></li>
1835 </ul>
1835 </ul>
1836 </div>
1836 </div>
1837
1837
1838 <div class="main">
1838 <div class="main">
1839 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1839 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1840 <h3>Help: remove</h3>
1840 <h3>Help: remove</h3>
1841
1841
1842 <form class="search" action="/log">
1842 <form class="search" action="/log">
1843
1843
1844 <p><input name="rev" id="search1" type="text" size="30" /></p>
1844 <p><input name="rev" id="search1" type="text" size="30" /></p>
1845 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1845 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1846 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1846 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1847 </form>
1847 </form>
1848 <div id="doc">
1848 <div id="doc">
1849 <p>
1849 <p>
1850 hg remove [OPTION]... FILE...
1850 hg remove [OPTION]... FILE...
1851 </p>
1851 </p>
1852 <p>
1852 <p>
1853 aliases: rm
1853 aliases: rm
1854 </p>
1854 </p>
1855 <p>
1855 <p>
1856 remove the specified files on the next commit
1856 remove the specified files on the next commit
1857 </p>
1857 </p>
1858 <p>
1858 <p>
1859 Schedule the indicated files for removal from the current branch.
1859 Schedule the indicated files for removal from the current branch.
1860 </p>
1860 </p>
1861 <p>
1861 <p>
1862 This command schedules the files to be removed at the next commit.
1862 This command schedules the files to be removed at the next commit.
1863 To undo a remove before that, see &quot;hg revert&quot;. To undo added
1863 To undo a remove before that, see &quot;hg revert&quot;. To undo added
1864 files, see &quot;hg forget&quot;.
1864 files, see &quot;hg forget&quot;.
1865 </p>
1865 </p>
1866 <p>
1866 <p>
1867 -A/--after can be used to remove only files that have already
1867 -A/--after can be used to remove only files that have already
1868 been deleted, -f/--force can be used to force deletion, and -Af
1868 been deleted, -f/--force can be used to force deletion, and -Af
1869 can be used to remove files from the next revision without
1869 can be used to remove files from the next revision without
1870 deleting them from the working directory.
1870 deleting them from the working directory.
1871 </p>
1871 </p>
1872 <p>
1872 <p>
1873 The following table details the behavior of remove for different
1873 The following table details the behavior of remove for different
1874 file states (columns) and option combinations (rows). The file
1874 file states (columns) and option combinations (rows). The file
1875 states are Added [A], Clean [C], Modified [M] and Missing [!]
1875 states are Added [A], Clean [C], Modified [M] and Missing [!]
1876 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
1876 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
1877 (from branch) and Delete (from disk):
1877 (from branch) and Delete (from disk):
1878 </p>
1878 </p>
1879 <table>
1879 <table>
1880 <tr><td>opt/state</td>
1880 <tr><td>opt/state</td>
1881 <td>A</td>
1881 <td>A</td>
1882 <td>C</td>
1882 <td>C</td>
1883 <td>M</td>
1883 <td>M</td>
1884 <td>!</td></tr>
1884 <td>!</td></tr>
1885 <tr><td>none</td>
1885 <tr><td>none</td>
1886 <td>W</td>
1886 <td>W</td>
1887 <td>RD</td>
1887 <td>RD</td>
1888 <td>W</td>
1888 <td>W</td>
1889 <td>R</td></tr>
1889 <td>R</td></tr>
1890 <tr><td>-f</td>
1890 <tr><td>-f</td>
1891 <td>R</td>
1891 <td>R</td>
1892 <td>RD</td>
1892 <td>RD</td>
1893 <td>RD</td>
1893 <td>RD</td>
1894 <td>R</td></tr>
1894 <td>R</td></tr>
1895 <tr><td>-A</td>
1895 <tr><td>-A</td>
1896 <td>W</td>
1896 <td>W</td>
1897 <td>W</td>
1897 <td>W</td>
1898 <td>W</td>
1898 <td>W</td>
1899 <td>R</td></tr>
1899 <td>R</td></tr>
1900 <tr><td>-Af</td>
1900 <tr><td>-Af</td>
1901 <td>R</td>
1901 <td>R</td>
1902 <td>R</td>
1902 <td>R</td>
1903 <td>R</td>
1903 <td>R</td>
1904 <td>R</td></tr>
1904 <td>R</td></tr>
1905 </table>
1905 </table>
1906 <p>
1906 <p>
1907 Note that remove never deletes files in Added [A] state from the
1907 Note that remove never deletes files in Added [A] state from the
1908 working directory, not even if option --force is specified.
1908 working directory, not even if option --force is specified.
1909 </p>
1909 </p>
1910 <p>
1910 <p>
1911 Returns 0 on success, 1 if any warnings encountered.
1911 Returns 0 on success, 1 if any warnings encountered.
1912 </p>
1912 </p>
1913 <p>
1913 <p>
1914 options:
1914 options:
1915 </p>
1915 </p>
1916 <table>
1916 <table>
1917 <tr><td>-A</td>
1917 <tr><td>-A</td>
1918 <td>--after</td>
1918 <td>--after</td>
1919 <td>record delete for missing files</td></tr>
1919 <td>record delete for missing files</td></tr>
1920 <tr><td>-f</td>
1920 <tr><td>-f</td>
1921 <td>--force</td>
1921 <td>--force</td>
1922 <td>remove (and delete) file even if added or modified</td></tr>
1922 <td>remove (and delete) file even if added or modified</td></tr>
1923 <tr><td>-I</td>
1923 <tr><td>-I</td>
1924 <td>--include PATTERN [+]</td>
1924 <td>--include PATTERN [+]</td>
1925 <td>include names matching the given patterns</td></tr>
1925 <td>include names matching the given patterns</td></tr>
1926 <tr><td>-X</td>
1926 <tr><td>-X</td>
1927 <td>--exclude PATTERN [+]</td>
1927 <td>--exclude PATTERN [+]</td>
1928 <td>exclude names matching the given patterns</td></tr>
1928 <td>exclude names matching the given patterns</td></tr>
1929 </table>
1929 </table>
1930 <p>
1930 <p>
1931 [+] marked option can be specified multiple times
1931 [+] marked option can be specified multiple times
1932 </p>
1932 </p>
1933 <p>
1933 <p>
1934 global options:
1934 global options:
1935 </p>
1935 </p>
1936 <table>
1936 <table>
1937 <tr><td>-R</td>
1937 <tr><td>-R</td>
1938 <td>--repository REPO</td>
1938 <td>--repository REPO</td>
1939 <td>repository root directory or name of overlay bundle file</td></tr>
1939 <td>repository root directory or name of overlay bundle file</td></tr>
1940 <tr><td></td>
1940 <tr><td></td>
1941 <td>--cwd DIR</td>
1941 <td>--cwd DIR</td>
1942 <td>change working directory</td></tr>
1942 <td>change working directory</td></tr>
1943 <tr><td>-y</td>
1943 <tr><td>-y</td>
1944 <td>--noninteractive</td>
1944 <td>--noninteractive</td>
1945 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1945 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1946 <tr><td>-q</td>
1946 <tr><td>-q</td>
1947 <td>--quiet</td>
1947 <td>--quiet</td>
1948 <td>suppress output</td></tr>
1948 <td>suppress output</td></tr>
1949 <tr><td>-v</td>
1949 <tr><td>-v</td>
1950 <td>--verbose</td>
1950 <td>--verbose</td>
1951 <td>enable additional output</td></tr>
1951 <td>enable additional output</td></tr>
1952 <tr><td></td>
1952 <tr><td></td>
1953 <td>--config CONFIG [+]</td>
1953 <td>--config CONFIG [+]</td>
1954 <td>set/override config option (use 'section.name=value')</td></tr>
1954 <td>set/override config option (use 'section.name=value')</td></tr>
1955 <tr><td></td>
1955 <tr><td></td>
1956 <td>--debug</td>
1956 <td>--debug</td>
1957 <td>enable debugging output</td></tr>
1957 <td>enable debugging output</td></tr>
1958 <tr><td></td>
1958 <tr><td></td>
1959 <td>--debugger</td>
1959 <td>--debugger</td>
1960 <td>start debugger</td></tr>
1960 <td>start debugger</td></tr>
1961 <tr><td></td>
1961 <tr><td></td>
1962 <td>--encoding ENCODE</td>
1962 <td>--encoding ENCODE</td>
1963 <td>set the charset encoding (default: ascii)</td></tr>
1963 <td>set the charset encoding (default: ascii)</td></tr>
1964 <tr><td></td>
1964 <tr><td></td>
1965 <td>--encodingmode MODE</td>
1965 <td>--encodingmode MODE</td>
1966 <td>set the charset encoding mode (default: strict)</td></tr>
1966 <td>set the charset encoding mode (default: strict)</td></tr>
1967 <tr><td></td>
1967 <tr><td></td>
1968 <td>--traceback</td>
1968 <td>--traceback</td>
1969 <td>always print a traceback on exception</td></tr>
1969 <td>always print a traceback on exception</td></tr>
1970 <tr><td></td>
1970 <tr><td></td>
1971 <td>--time</td>
1971 <td>--time</td>
1972 <td>time how long the command takes</td></tr>
1972 <td>time how long the command takes</td></tr>
1973 <tr><td></td>
1973 <tr><td></td>
1974 <td>--profile</td>
1974 <td>--profile</td>
1975 <td>print command execution profile</td></tr>
1975 <td>print command execution profile</td></tr>
1976 <tr><td></td>
1976 <tr><td></td>
1977 <td>--version</td>
1977 <td>--version</td>
1978 <td>output version information and exit</td></tr>
1978 <td>output version information and exit</td></tr>
1979 <tr><td>-h</td>
1979 <tr><td>-h</td>
1980 <td>--help</td>
1980 <td>--help</td>
1981 <td>display help and exit</td></tr>
1981 <td>display help and exit</td></tr>
1982 <tr><td></td>
1982 <tr><td></td>
1983 <td>--hidden</td>
1983 <td>--hidden</td>
1984 <td>consider hidden changesets</td></tr>
1984 <td>consider hidden changesets</td></tr>
1985 </table>
1985 </table>
1986 <p>
1986 <p>
1987 [+] marked option can be specified multiple times
1987 [+] marked option can be specified multiple times
1988 </p>
1988 </p>
1989
1989
1990 </div>
1990 </div>
1991 </div>
1991 </div>
1992 </div>
1992 </div>
1993
1993
1994 <script type="text/javascript">process_dates()</script>
1994 <script type="text/javascript">process_dates()</script>
1995
1995
1996
1996
1997 </body>
1997 </body>
1998 </html>
1998 </html>
1999
1999
2000
2000
2001 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
2001 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions"
2002 200 Script output follows
2002 200 Script output follows
2003
2003
2004 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2004 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2005 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2005 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2006 <head>
2006 <head>
2007 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2007 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2008 <meta name="robots" content="index, nofollow" />
2008 <meta name="robots" content="index, nofollow" />
2009 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2009 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2010 <script type="text/javascript" src="/static/mercurial.js"></script>
2010 <script type="text/javascript" src="/static/mercurial.js"></script>
2011
2011
2012 <title>Help: revisions</title>
2012 <title>Help: revisions</title>
2013 </head>
2013 </head>
2014 <body>
2014 <body>
2015
2015
2016 <div class="container">
2016 <div class="container">
2017 <div class="menu">
2017 <div class="menu">
2018 <div class="logo">
2018 <div class="logo">
2019 <a href="http://mercurial.selenic.com/">
2019 <a href="http://mercurial.selenic.com/">
2020 <img src="/static/hglogo.png" alt="mercurial" /></a>
2020 <img src="/static/hglogo.png" alt="mercurial" /></a>
2021 </div>
2021 </div>
2022 <ul>
2022 <ul>
2023 <li><a href="/shortlog">log</a></li>
2023 <li><a href="/shortlog">log</a></li>
2024 <li><a href="/graph">graph</a></li>
2024 <li><a href="/graph">graph</a></li>
2025 <li><a href="/tags">tags</a></li>
2025 <li><a href="/tags">tags</a></li>
2026 <li><a href="/bookmarks">bookmarks</a></li>
2026 <li><a href="/bookmarks">bookmarks</a></li>
2027 <li><a href="/branches">branches</a></li>
2027 <li><a href="/branches">branches</a></li>
2028 </ul>
2028 </ul>
2029 <ul>
2029 <ul>
2030 <li class="active"><a href="/help">help</a></li>
2030 <li class="active"><a href="/help">help</a></li>
2031 </ul>
2031 </ul>
2032 </div>
2032 </div>
2033
2033
2034 <div class="main">
2034 <div class="main">
2035 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2035 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2036 <h3>Help: revisions</h3>
2036 <h3>Help: revisions</h3>
2037
2037
2038 <form class="search" action="/log">
2038 <form class="search" action="/log">
2039
2039
2040 <p><input name="rev" id="search1" type="text" size="30" /></p>
2040 <p><input name="rev" id="search1" type="text" size="30" /></p>
2041 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2041 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2042 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2042 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2043 </form>
2043 </form>
2044 <div id="doc">
2044 <div id="doc">
2045 <h1>Specifying Single Revisions</h1>
2045 <h1>Specifying Single Revisions</h1>
2046 <p>
2046 <p>
2047 Mercurial supports several ways to specify individual revisions.
2047 Mercurial supports several ways to specify individual revisions.
2048 </p>
2048 </p>
2049 <p>
2049 <p>
2050 A plain integer is treated as a revision number. Negative integers are
2050 A plain integer is treated as a revision number. Negative integers are
2051 treated as sequential offsets from the tip, with -1 denoting the tip,
2051 treated as sequential offsets from the tip, with -1 denoting the tip,
2052 -2 denoting the revision prior to the tip, and so forth.
2052 -2 denoting the revision prior to the tip, and so forth.
2053 </p>
2053 </p>
2054 <p>
2054 <p>
2055 A 40-digit hexadecimal string is treated as a unique revision
2055 A 40-digit hexadecimal string is treated as a unique revision
2056 identifier.
2056 identifier.
2057 </p>
2057 </p>
2058 <p>
2058 <p>
2059 A hexadecimal string less than 40 characters long is treated as a
2059 A hexadecimal string less than 40 characters long is treated as a
2060 unique revision identifier and is referred to as a short-form
2060 unique revision identifier and is referred to as a short-form
2061 identifier. A short-form identifier is only valid if it is the prefix
2061 identifier. A short-form identifier is only valid if it is the prefix
2062 of exactly one full-length identifier.
2062 of exactly one full-length identifier.
2063 </p>
2063 </p>
2064 <p>
2064 <p>
2065 Any other string is treated as a bookmark, tag, or branch name. A
2065 Any other string is treated as a bookmark, tag, or branch name. A
2066 bookmark is a movable pointer to a revision. A tag is a permanent name
2066 bookmark is a movable pointer to a revision. A tag is a permanent name
2067 associated with a revision. A branch name denotes the tipmost open branch head
2067 associated with a revision. A branch name denotes the tipmost open branch head
2068 of that branch - or if they are all closed, the tipmost closed head of the
2068 of that branch - or if they are all closed, the tipmost closed head of the
2069 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2069 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2070 </p>
2070 </p>
2071 <p>
2071 <p>
2072 The reserved name &quot;tip&quot; always identifies the most recent revision.
2072 The reserved name &quot;tip&quot; always identifies the most recent revision.
2073 </p>
2073 </p>
2074 <p>
2074 <p>
2075 The reserved name &quot;null&quot; indicates the null revision. This is the
2075 The reserved name &quot;null&quot; indicates the null revision. This is the
2076 revision of an empty repository, and the parent of revision 0.
2076 revision of an empty repository, and the parent of revision 0.
2077 </p>
2077 </p>
2078 <p>
2078 <p>
2079 The reserved name &quot;.&quot; indicates the working directory parent. If no
2079 The reserved name &quot;.&quot; indicates the working directory parent. If no
2080 working directory is checked out, it is equivalent to null. If an
2080 working directory is checked out, it is equivalent to null. If an
2081 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2081 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2082 parent.
2082 parent.
2083 </p>
2083 </p>
2084
2084
2085 </div>
2085 </div>
2086 </div>
2086 </div>
2087 </div>
2087 </div>
2088
2088
2089 <script type="text/javascript">process_dates()</script>
2089 <script type="text/javascript">process_dates()</script>
2090
2090
2091
2091
2092 </body>
2092 </body>
2093 </html>
2093 </html>
2094
2094
2095
2095
2096 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
2096 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
2097
2097
2098 #endif
2098 #endif
@@ -1,350 +1,350 b''
1 Create configuration
1 Create configuration
2
2
3 $ echo "[ui]" >> $HGRCPATH
3 $ echo "[ui]" >> $HGRCPATH
4 $ echo "interactive=true" >> $HGRCPATH
4 $ echo "interactive=true" >> $HGRCPATH
5
5
6 help qrefresh (no record)
6 help qrefresh (no record)
7
7
8 $ echo "[extensions]" >> $HGRCPATH
8 $ echo "[extensions]" >> $HGRCPATH
9 $ echo "mq=" >> $HGRCPATH
9 $ echo "mq=" >> $HGRCPATH
10 $ hg help qrefresh
10 $ hg help qrefresh
11 hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...
11 hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...
12
12
13 update the current patch
13 update the current patch
14
14
15 If any file patterns are provided, the refreshed patch will contain only
15 If any file patterns are provided, the refreshed patch will contain only
16 the modifications that match those patterns; the remaining modifications
16 the modifications that match those patterns; the remaining modifications
17 will remain in the working directory.
17 will remain in the working directory.
18
18
19 If -s/--short is specified, files currently included in the patch will be
19 If -s/--short is specified, files currently included in the patch will be
20 refreshed just like matched files and remain in the patch.
20 refreshed just like matched files and remain in the patch.
21
21
22 If -e/--edit is specified, Mercurial will start your configured editor for
22 If -e/--edit is specified, Mercurial will start your configured editor for
23 you to enter a message. In case qrefresh fails, you will find a backup of
23 you to enter a message. In case qrefresh fails, you will find a backup of
24 your message in ".hg/last-message.txt".
24 your message in ".hg/last-message.txt".
25
25
26 hg add/remove/copy/rename work as usual, though you might want to use git-
26 hg add/remove/copy/rename work as usual, though you might want to use git-
27 style patches (-g/--git or [diff] git=1) to track copies and renames. See
27 style patches (-g/--git or [diff] git=1) to track copies and renames. See
28 the diffs help topic for more information on the git diff format.
28 the diffs help topic for more information on the git diff format.
29
29
30 Returns 0 on success.
30 Returns 0 on success.
31
31
32 options:
32 options:
33
33
34 -e --edit invoke editor on commit messages
34 -e --edit invoke editor on commit messages
35 -g --git use git extended diff format
35 -g --git use git extended diff format
36 -s --short refresh only files already in the patch and
36 -s --short refresh only files already in the patch and
37 specified files
37 specified files
38 -U --currentuser add/update author field in patch with current user
38 -U --currentuser add/update author field in patch with current user
39 -u --user USER add/update author field in patch with given user
39 -u --user USER add/update author field in patch with given user
40 -D --currentdate add/update date field in patch with current date
40 -D --currentdate add/update date field in patch with current date
41 -d --date DATE add/update date field in patch with given date
41 -d --date DATE add/update date field in patch with given date
42 -I --include PATTERN [+] include names matching the given patterns
42 -I --include PATTERN [+] include names matching the given patterns
43 -X --exclude PATTERN [+] exclude names matching the given patterns
43 -X --exclude PATTERN [+] exclude names matching the given patterns
44 -m --message TEXT use text as commit message
44 -m --message TEXT use text as commit message
45 -l --logfile FILE read commit message from file
45 -l --logfile FILE read commit message from file
46
46
47 [+] marked option can be specified multiple times
47 [+] marked option can be specified multiple times
48
48
49 use "hg -v help qrefresh" to show the global options
49 (some details hidden, use --verbose to show complete help)
50
50
51 help qrefresh (record)
51 help qrefresh (record)
52
52
53 $ echo "record=" >> $HGRCPATH
53 $ echo "record=" >> $HGRCPATH
54 $ hg help qrefresh
54 $ hg help qrefresh
55 hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...
55 hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...
56
56
57 update the current patch
57 update the current patch
58
58
59 If any file patterns are provided, the refreshed patch will contain only
59 If any file patterns are provided, the refreshed patch will contain only
60 the modifications that match those patterns; the remaining modifications
60 the modifications that match those patterns; the remaining modifications
61 will remain in the working directory.
61 will remain in the working directory.
62
62
63 If -s/--short is specified, files currently included in the patch will be
63 If -s/--short is specified, files currently included in the patch will be
64 refreshed just like matched files and remain in the patch.
64 refreshed just like matched files and remain in the patch.
65
65
66 If -e/--edit is specified, Mercurial will start your configured editor for
66 If -e/--edit is specified, Mercurial will start your configured editor for
67 you to enter a message. In case qrefresh fails, you will find a backup of
67 you to enter a message. In case qrefresh fails, you will find a backup of
68 your message in ".hg/last-message.txt".
68 your message in ".hg/last-message.txt".
69
69
70 hg add/remove/copy/rename work as usual, though you might want to use git-
70 hg add/remove/copy/rename work as usual, though you might want to use git-
71 style patches (-g/--git or [diff] git=1) to track copies and renames. See
71 style patches (-g/--git or [diff] git=1) to track copies and renames. See
72 the diffs help topic for more information on the git diff format.
72 the diffs help topic for more information on the git diff format.
73
73
74 Returns 0 on success.
74 Returns 0 on success.
75
75
76 options:
76 options:
77
77
78 -e --edit invoke editor on commit messages
78 -e --edit invoke editor on commit messages
79 -g --git use git extended diff format
79 -g --git use git extended diff format
80 -s --short refresh only files already in the patch and
80 -s --short refresh only files already in the patch and
81 specified files
81 specified files
82 -U --currentuser add/update author field in patch with current user
82 -U --currentuser add/update author field in patch with current user
83 -u --user USER add/update author field in patch with given user
83 -u --user USER add/update author field in patch with given user
84 -D --currentdate add/update date field in patch with current date
84 -D --currentdate add/update date field in patch with current date
85 -d --date DATE add/update date field in patch with given date
85 -d --date DATE add/update date field in patch with given date
86 -I --include PATTERN [+] include names matching the given patterns
86 -I --include PATTERN [+] include names matching the given patterns
87 -X --exclude PATTERN [+] exclude names matching the given patterns
87 -X --exclude PATTERN [+] exclude names matching the given patterns
88 -m --message TEXT use text as commit message
88 -m --message TEXT use text as commit message
89 -l --logfile FILE read commit message from file
89 -l --logfile FILE read commit message from file
90 -i --interactive interactively select changes to refresh
90 -i --interactive interactively select changes to refresh
91
91
92 [+] marked option can be specified multiple times
92 [+] marked option can be specified multiple times
93
93
94 use "hg -v help qrefresh" to show the global options
94 (some details hidden, use --verbose to show complete help)
95
95
96 $ hg init a
96 $ hg init a
97 $ cd a
97 $ cd a
98
98
99 Base commit
99 Base commit
100
100
101 $ cat > 1.txt <<EOF
101 $ cat > 1.txt <<EOF
102 > 1
102 > 1
103 > 2
103 > 2
104 > 3
104 > 3
105 > 4
105 > 4
106 > 5
106 > 5
107 > EOF
107 > EOF
108 $ cat > 2.txt <<EOF
108 $ cat > 2.txt <<EOF
109 > a
109 > a
110 > b
110 > b
111 > c
111 > c
112 > d
112 > d
113 > e
113 > e
114 > f
114 > f
115 > EOF
115 > EOF
116
116
117 $ mkdir dir
117 $ mkdir dir
118 $ cat > dir/a.txt <<EOF
118 $ cat > dir/a.txt <<EOF
119 > hello world
119 > hello world
120 >
120 >
121 > someone
121 > someone
122 > up
122 > up
123 > there
123 > there
124 > loves
124 > loves
125 > me
125 > me
126 > EOF
126 > EOF
127
127
128 $ hg add 1.txt 2.txt dir/a.txt
128 $ hg add 1.txt 2.txt dir/a.txt
129 $ hg commit -m aaa
129 $ hg commit -m aaa
130 $ hg qnew -d '0 0' patch
130 $ hg qnew -d '0 0' patch
131
131
132 Changing files
132 Changing files
133
133
134 $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new
134 $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new
135 $ sed -e 's/b/b b/' 2.txt > 2.txt.new
135 $ sed -e 's/b/b b/' 2.txt > 2.txt.new
136 $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new
136 $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new
137
137
138 $ mv -f 1.txt.new 1.txt
138 $ mv -f 1.txt.new 1.txt
139 $ mv -f 2.txt.new 2.txt
139 $ mv -f 2.txt.new 2.txt
140 $ mv -f dir/a.txt.new dir/a.txt
140 $ mv -f dir/a.txt.new dir/a.txt
141
141
142 Whole diff
142 Whole diff
143
143
144 $ hg diff --nodates
144 $ hg diff --nodates
145 diff -r ed27675cb5df 1.txt
145 diff -r ed27675cb5df 1.txt
146 --- a/1.txt
146 --- a/1.txt
147 +++ b/1.txt
147 +++ b/1.txt
148 @@ -1,5 +1,5 @@
148 @@ -1,5 +1,5 @@
149 1
149 1
150 -2
150 -2
151 +2 2
151 +2 2
152 3
152 3
153 -4
153 -4
154 +4 4
154 +4 4
155 5
155 5
156 diff -r ed27675cb5df 2.txt
156 diff -r ed27675cb5df 2.txt
157 --- a/2.txt
157 --- a/2.txt
158 +++ b/2.txt
158 +++ b/2.txt
159 @@ -1,5 +1,5 @@
159 @@ -1,5 +1,5 @@
160 a
160 a
161 -b
161 -b
162 +b b
162 +b b
163 c
163 c
164 d
164 d
165 e
165 e
166 diff -r ed27675cb5df dir/a.txt
166 diff -r ed27675cb5df dir/a.txt
167 --- a/dir/a.txt
167 --- a/dir/a.txt
168 +++ b/dir/a.txt
168 +++ b/dir/a.txt
169 @@ -1,4 +1,4 @@
169 @@ -1,4 +1,4 @@
170 -hello world
170 -hello world
171 +hello world!
171 +hello world!
172
172
173 someone
173 someone
174 up
174 up
175
175
176 partial qrefresh
176 partial qrefresh
177
177
178 $ hg qrefresh -i -d '0 0' <<EOF
178 $ hg qrefresh -i -d '0 0' <<EOF
179 > y
179 > y
180 > y
180 > y
181 > n
181 > n
182 > y
182 > y
183 > y
183 > y
184 > n
184 > n
185 > EOF
185 > EOF
186 diff --git a/1.txt b/1.txt
186 diff --git a/1.txt b/1.txt
187 2 hunks, 2 lines changed
187 2 hunks, 2 lines changed
188 examine changes to '1.txt'? [Ynesfdaq?]
188 examine changes to '1.txt'? [Ynesfdaq?]
189 @@ -1,3 +1,3 @@
189 @@ -1,3 +1,3 @@
190 1
190 1
191 -2
191 -2
192 +2 2
192 +2 2
193 3
193 3
194 record change 1/4 to '1.txt'? [Ynesfdaq?]
194 record change 1/4 to '1.txt'? [Ynesfdaq?]
195 @@ -3,3 +3,3 @@
195 @@ -3,3 +3,3 @@
196 3
196 3
197 -4
197 -4
198 +4 4
198 +4 4
199 5
199 5
200 record change 2/4 to '1.txt'? [Ynesfdaq?]
200 record change 2/4 to '1.txt'? [Ynesfdaq?]
201 diff --git a/2.txt b/2.txt
201 diff --git a/2.txt b/2.txt
202 1 hunks, 1 lines changed
202 1 hunks, 1 lines changed
203 examine changes to '2.txt'? [Ynesfdaq?]
203 examine changes to '2.txt'? [Ynesfdaq?]
204 @@ -1,5 +1,5 @@
204 @@ -1,5 +1,5 @@
205 a
205 a
206 -b
206 -b
207 +b b
207 +b b
208 c
208 c
209 d
209 d
210 e
210 e
211 record change 3/4 to '2.txt'? [Ynesfdaq?]
211 record change 3/4 to '2.txt'? [Ynesfdaq?]
212 diff --git a/dir/a.txt b/dir/a.txt
212 diff --git a/dir/a.txt b/dir/a.txt
213 1 hunks, 1 lines changed
213 1 hunks, 1 lines changed
214 examine changes to 'dir/a.txt'? [Ynesfdaq?]
214 examine changes to 'dir/a.txt'? [Ynesfdaq?]
215
215
216 After partial qrefresh 'tip'
216 After partial qrefresh 'tip'
217
217
218 $ hg tip -p
218 $ hg tip -p
219 changeset: 1:0738af1a8211
219 changeset: 1:0738af1a8211
220 tag: patch
220 tag: patch
221 tag: qbase
221 tag: qbase
222 tag: qtip
222 tag: qtip
223 tag: tip
223 tag: tip
224 user: test
224 user: test
225 date: Thu Jan 01 00:00:00 1970 +0000
225 date: Thu Jan 01 00:00:00 1970 +0000
226 summary: [mq]: patch
226 summary: [mq]: patch
227
227
228 diff -r 1fd39ab63a33 -r 0738af1a8211 1.txt
228 diff -r 1fd39ab63a33 -r 0738af1a8211 1.txt
229 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
229 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
230 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
230 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
231 @@ -1,5 +1,5 @@
231 @@ -1,5 +1,5 @@
232 1
232 1
233 -2
233 -2
234 +2 2
234 +2 2
235 3
235 3
236 4
236 4
237 5
237 5
238 diff -r 1fd39ab63a33 -r 0738af1a8211 2.txt
238 diff -r 1fd39ab63a33 -r 0738af1a8211 2.txt
239 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
239 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
240 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
240 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
241 @@ -1,5 +1,5 @@
241 @@ -1,5 +1,5 @@
242 a
242 a
243 -b
243 -b
244 +b b
244 +b b
245 c
245 c
246 d
246 d
247 e
247 e
248
248
249 After partial qrefresh 'diff'
249 After partial qrefresh 'diff'
250
250
251 $ hg diff --nodates
251 $ hg diff --nodates
252 diff -r 0738af1a8211 1.txt
252 diff -r 0738af1a8211 1.txt
253 --- a/1.txt
253 --- a/1.txt
254 +++ b/1.txt
254 +++ b/1.txt
255 @@ -1,5 +1,5 @@
255 @@ -1,5 +1,5 @@
256 1
256 1
257 2 2
257 2 2
258 3
258 3
259 -4
259 -4
260 +4 4
260 +4 4
261 5
261 5
262 diff -r 0738af1a8211 dir/a.txt
262 diff -r 0738af1a8211 dir/a.txt
263 --- a/dir/a.txt
263 --- a/dir/a.txt
264 +++ b/dir/a.txt
264 +++ b/dir/a.txt
265 @@ -1,4 +1,4 @@
265 @@ -1,4 +1,4 @@
266 -hello world
266 -hello world
267 +hello world!
267 +hello world!
268
268
269 someone
269 someone
270 up
270 up
271
271
272 qrefresh interactively everything else
272 qrefresh interactively everything else
273
273
274 $ hg qrefresh -i -d '0 0' <<EOF
274 $ hg qrefresh -i -d '0 0' <<EOF
275 > y
275 > y
276 > y
276 > y
277 > y
277 > y
278 > y
278 > y
279 > EOF
279 > EOF
280 diff --git a/1.txt b/1.txt
280 diff --git a/1.txt b/1.txt
281 1 hunks, 1 lines changed
281 1 hunks, 1 lines changed
282 examine changes to '1.txt'? [Ynesfdaq?]
282 examine changes to '1.txt'? [Ynesfdaq?]
283 @@ -1,5 +1,5 @@
283 @@ -1,5 +1,5 @@
284 1
284 1
285 2 2
285 2 2
286 3
286 3
287 -4
287 -4
288 +4 4
288 +4 4
289 5
289 5
290 record change 1/2 to '1.txt'? [Ynesfdaq?]
290 record change 1/2 to '1.txt'? [Ynesfdaq?]
291 diff --git a/dir/a.txt b/dir/a.txt
291 diff --git a/dir/a.txt b/dir/a.txt
292 1 hunks, 1 lines changed
292 1 hunks, 1 lines changed
293 examine changes to 'dir/a.txt'? [Ynesfdaq?]
293 examine changes to 'dir/a.txt'? [Ynesfdaq?]
294 @@ -1,4 +1,4 @@
294 @@ -1,4 +1,4 @@
295 -hello world
295 -hello world
296 +hello world!
296 +hello world!
297
297
298 someone
298 someone
299 up
299 up
300 record change 2/2 to 'dir/a.txt'? [Ynesfdaq?]
300 record change 2/2 to 'dir/a.txt'? [Ynesfdaq?]
301
301
302 After final qrefresh 'tip'
302 After final qrefresh 'tip'
303
303
304 $ hg tip -p
304 $ hg tip -p
305 changeset: 1:2c3f66afeed9
305 changeset: 1:2c3f66afeed9
306 tag: patch
306 tag: patch
307 tag: qbase
307 tag: qbase
308 tag: qtip
308 tag: qtip
309 tag: tip
309 tag: tip
310 user: test
310 user: test
311 date: Thu Jan 01 00:00:00 1970 +0000
311 date: Thu Jan 01 00:00:00 1970 +0000
312 summary: [mq]: patch
312 summary: [mq]: patch
313
313
314 diff -r 1fd39ab63a33 -r 2c3f66afeed9 1.txt
314 diff -r 1fd39ab63a33 -r 2c3f66afeed9 1.txt
315 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
315 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
316 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
316 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
317 @@ -1,5 +1,5 @@
317 @@ -1,5 +1,5 @@
318 1
318 1
319 -2
319 -2
320 +2 2
320 +2 2
321 3
321 3
322 -4
322 -4
323 +4 4
323 +4 4
324 5
324 5
325 diff -r 1fd39ab63a33 -r 2c3f66afeed9 2.txt
325 diff -r 1fd39ab63a33 -r 2c3f66afeed9 2.txt
326 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
326 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
327 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
327 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
328 @@ -1,5 +1,5 @@
328 @@ -1,5 +1,5 @@
329 a
329 a
330 -b
330 -b
331 +b b
331 +b b
332 c
332 c
333 d
333 d
334 e
334 e
335 diff -r 1fd39ab63a33 -r 2c3f66afeed9 dir/a.txt
335 diff -r 1fd39ab63a33 -r 2c3f66afeed9 dir/a.txt
336 --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
336 --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
337 +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
337 +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
338 @@ -1,4 +1,4 @@
338 @@ -1,4 +1,4 @@
339 -hello world
339 -hello world
340 +hello world!
340 +hello world!
341
341
342 someone
342 someone
343 up
343 up
344
344
345
345
346 After qrefresh 'diff'
346 After qrefresh 'diff'
347
347
348 $ hg diff --nodates
348 $ hg diff --nodates
349
349
350 $ cd ..
350 $ cd ..
@@ -1,404 +1,404 b''
1 Create configuration
1 Create configuration
2
2
3 $ echo "[ui]" >> $HGRCPATH
3 $ echo "[ui]" >> $HGRCPATH
4 $ echo "interactive=true" >> $HGRCPATH
4 $ echo "interactive=true" >> $HGRCPATH
5
5
6 help record (no record)
6 help record (no record)
7
7
8 $ hg help record
8 $ hg help record
9 record extension - commands to interactively select changes for
9 record extension - commands to interactively select changes for
10 commit/qrefresh
10 commit/qrefresh
11
11
12 use "hg help extensions" for information on enabling extensions
12 use "hg help extensions" for information on enabling extensions
13
13
14 help qrecord (no record)
14 help qrecord (no record)
15
15
16 $ hg help qrecord
16 $ hg help qrecord
17 'qrecord' is provided by the following extension:
17 'qrecord' is provided by the following extension:
18
18
19 record commands to interactively select changes for commit/qrefresh
19 record commands to interactively select changes for commit/qrefresh
20
20
21 use "hg help extensions" for information on enabling extensions
21 use "hg help extensions" for information on enabling extensions
22
22
23 $ echo "[extensions]" >> $HGRCPATH
23 $ echo "[extensions]" >> $HGRCPATH
24 $ echo "record=" >> $HGRCPATH
24 $ echo "record=" >> $HGRCPATH
25
25
26 help record (record)
26 help record (record)
27
27
28 $ hg help record
28 $ hg help record
29 hg record [OPTION]... [FILE]...
29 hg record [OPTION]... [FILE]...
30
30
31 interactively select changes to commit
31 interactively select changes to commit
32
32
33 If a list of files is omitted, all changes reported by "hg status" will be
33 If a list of files is omitted, all changes reported by "hg status" will be
34 candidates for recording.
34 candidates for recording.
35
35
36 See "hg help dates" for a list of formats valid for -d/--date.
36 See "hg help dates" for a list of formats valid for -d/--date.
37
37
38 You will be prompted for whether to record changes to each modified file,
38 You will be prompted for whether to record changes to each modified file,
39 and for files with multiple changes, for each change to use. For each
39 and for files with multiple changes, for each change to use. For each
40 query, the following responses are possible:
40 query, the following responses are possible:
41
41
42 y - record this change
42 y - record this change
43 n - skip this change
43 n - skip this change
44 e - edit this change manually
44 e - edit this change manually
45
45
46 s - skip remaining changes to this file
46 s - skip remaining changes to this file
47 f - record remaining changes to this file
47 f - record remaining changes to this file
48
48
49 d - done, skip remaining changes and files
49 d - done, skip remaining changes and files
50 a - record all changes to all remaining files
50 a - record all changes to all remaining files
51 q - quit, recording no changes
51 q - quit, recording no changes
52
52
53 ? - display help
53 ? - display help
54
54
55 This command is not available when committing a merge.
55 This command is not available when committing a merge.
56
56
57 options:
57 options:
58
58
59 -A --addremove mark new/missing files as added/removed before
59 -A --addremove mark new/missing files as added/removed before
60 committing
60 committing
61 --close-branch mark a branch as closed, hiding it from the branch
61 --close-branch mark a branch as closed, hiding it from the branch
62 list
62 list
63 --amend amend the parent of the working dir
63 --amend amend the parent of the working dir
64 -s --secret use the secret phase for committing
64 -s --secret use the secret phase for committing
65 -e --edit invoke editor on commit messages
65 -e --edit invoke editor on commit messages
66 -I --include PATTERN [+] include names matching the given patterns
66 -I --include PATTERN [+] include names matching the given patterns
67 -X --exclude PATTERN [+] exclude names matching the given patterns
67 -X --exclude PATTERN [+] exclude names matching the given patterns
68 -m --message TEXT use text as commit message
68 -m --message TEXT use text as commit message
69 -l --logfile FILE read commit message from file
69 -l --logfile FILE read commit message from file
70 -d --date DATE record the specified date as commit date
70 -d --date DATE record the specified date as commit date
71 -u --user USER record the specified user as committer
71 -u --user USER record the specified user as committer
72 -S --subrepos recurse into subrepositories
72 -S --subrepos recurse into subrepositories
73 -w --ignore-all-space ignore white space when comparing lines
73 -w --ignore-all-space ignore white space when comparing lines
74 -b --ignore-space-change ignore changes in the amount of white space
74 -b --ignore-space-change ignore changes in the amount of white space
75 -B --ignore-blank-lines ignore changes whose lines are all blank
75 -B --ignore-blank-lines ignore changes whose lines are all blank
76
76
77 [+] marked option can be specified multiple times
77 [+] marked option can be specified multiple times
78
78
79 use "hg -v help record" to show the global options
79 (some details hidden, use --verbose to show complete help)
80
80
81 help (no mq, so no qrecord)
81 help (no mq, so no qrecord)
82
82
83 $ hg help qrecord
83 $ hg help qrecord
84 hg qrecord [OPTION]... PATCH [FILE]...
84 hg qrecord [OPTION]... PATCH [FILE]...
85
85
86 interactively record a new patch
86 interactively record a new patch
87
87
88 See "hg help qnew" & "hg help record" for more information and usage.
88 See "hg help qnew" & "hg help record" for more information and usage.
89
89
90 use "hg -v help qrecord" to show the global options
90 (some details hidden, use --verbose to show complete help)
91
91
92 $ hg init a
92 $ hg init a
93
93
94 qrecord (mq not present)
94 qrecord (mq not present)
95
95
96 $ hg -R a qrecord
96 $ hg -R a qrecord
97 hg qrecord: invalid arguments
97 hg qrecord: invalid arguments
98 hg qrecord [OPTION]... PATCH [FILE]...
98 hg qrecord [OPTION]... PATCH [FILE]...
99
99
100 interactively record a new patch
100 interactively record a new patch
101
101
102 use "hg help qrecord" to show the full help text
102 use "hg help qrecord" to show the full help text
103 [255]
103 [255]
104
104
105 qrecord patch (mq not present)
105 qrecord patch (mq not present)
106
106
107 $ hg -R a qrecord patch
107 $ hg -R a qrecord patch
108 abort: 'mq' extension not loaded
108 abort: 'mq' extension not loaded
109 [255]
109 [255]
110
110
111 help (bad mq)
111 help (bad mq)
112
112
113 $ echo "mq=nonexistent" >> $HGRCPATH
113 $ echo "mq=nonexistent" >> $HGRCPATH
114 $ hg help qrecord
114 $ hg help qrecord
115 *** failed to import extension mq from nonexistent: [Errno *] * (glob)
115 *** failed to import extension mq from nonexistent: [Errno *] * (glob)
116 hg qrecord [OPTION]... PATCH [FILE]...
116 hg qrecord [OPTION]... PATCH [FILE]...
117
117
118 interactively record a new patch
118 interactively record a new patch
119
119
120 See "hg help qnew" & "hg help record" for more information and usage.
120 See "hg help qnew" & "hg help record" for more information and usage.
121
121
122 use "hg -v help qrecord" to show the global options
122 (some details hidden, use --verbose to show complete help)
123
123
124 help (mq present)
124 help (mq present)
125
125
126 $ sed 's/mq=nonexistent/mq=/' $HGRCPATH > hgrc.tmp
126 $ sed 's/mq=nonexistent/mq=/' $HGRCPATH > hgrc.tmp
127 $ mv hgrc.tmp $HGRCPATH
127 $ mv hgrc.tmp $HGRCPATH
128
128
129 $ hg help qrecord
129 $ hg help qrecord
130 hg qrecord [OPTION]... PATCH [FILE]...
130 hg qrecord [OPTION]... PATCH [FILE]...
131
131
132 interactively record a new patch
132 interactively record a new patch
133
133
134 See "hg help qnew" & "hg help record" for more information and usage.
134 See "hg help qnew" & "hg help record" for more information and usage.
135
135
136 options:
136 options:
137
137
138 -e --edit invoke editor on commit messages
138 -e --edit invoke editor on commit messages
139 -g --git use git extended diff format
139 -g --git use git extended diff format
140 -U --currentuser add "From: <current user>" to patch
140 -U --currentuser add "From: <current user>" to patch
141 -u --user USER add "From: <USER>" to patch
141 -u --user USER add "From: <USER>" to patch
142 -D --currentdate add "Date: <current date>" to patch
142 -D --currentdate add "Date: <current date>" to patch
143 -d --date DATE add "Date: <DATE>" to patch
143 -d --date DATE add "Date: <DATE>" to patch
144 -I --include PATTERN [+] include names matching the given patterns
144 -I --include PATTERN [+] include names matching the given patterns
145 -X --exclude PATTERN [+] exclude names matching the given patterns
145 -X --exclude PATTERN [+] exclude names matching the given patterns
146 -m --message TEXT use text as commit message
146 -m --message TEXT use text as commit message
147 -l --logfile FILE read commit message from file
147 -l --logfile FILE read commit message from file
148 -w --ignore-all-space ignore white space when comparing lines
148 -w --ignore-all-space ignore white space when comparing lines
149 -b --ignore-space-change ignore changes in the amount of white space
149 -b --ignore-space-change ignore changes in the amount of white space
150 -B --ignore-blank-lines ignore changes whose lines are all blank
150 -B --ignore-blank-lines ignore changes whose lines are all blank
151 --mq operate on patch repository
151 --mq operate on patch repository
152
152
153 [+] marked option can be specified multiple times
153 [+] marked option can be specified multiple times
154
154
155 use "hg -v help qrecord" to show the global options
155 (some details hidden, use --verbose to show complete help)
156
156
157 $ cd a
157 $ cd a
158
158
159 Base commit
159 Base commit
160
160
161 $ cat > 1.txt <<EOF
161 $ cat > 1.txt <<EOF
162 > 1
162 > 1
163 > 2
163 > 2
164 > 3
164 > 3
165 > 4
165 > 4
166 > 5
166 > 5
167 > EOF
167 > EOF
168 $ cat > 2.txt <<EOF
168 $ cat > 2.txt <<EOF
169 > a
169 > a
170 > b
170 > b
171 > c
171 > c
172 > d
172 > d
173 > e
173 > e
174 > f
174 > f
175 > EOF
175 > EOF
176
176
177 $ mkdir dir
177 $ mkdir dir
178 $ cat > dir/a.txt <<EOF
178 $ cat > dir/a.txt <<EOF
179 > hello world
179 > hello world
180 >
180 >
181 > someone
181 > someone
182 > up
182 > up
183 > there
183 > there
184 > loves
184 > loves
185 > me
185 > me
186 > EOF
186 > EOF
187
187
188 $ hg add 1.txt 2.txt dir/a.txt
188 $ hg add 1.txt 2.txt dir/a.txt
189 $ hg commit -m 'initial checkin'
189 $ hg commit -m 'initial checkin'
190
190
191 Changing files
191 Changing files
192
192
193 $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new
193 $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new
194 $ sed -e 's/b/b b/' 2.txt > 2.txt.new
194 $ sed -e 's/b/b b/' 2.txt > 2.txt.new
195 $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new
195 $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new
196
196
197 $ mv -f 1.txt.new 1.txt
197 $ mv -f 1.txt.new 1.txt
198 $ mv -f 2.txt.new 2.txt
198 $ mv -f 2.txt.new 2.txt
199 $ mv -f dir/a.txt.new dir/a.txt
199 $ mv -f dir/a.txt.new dir/a.txt
200
200
201 Whole diff
201 Whole diff
202
202
203 $ hg diff --nodates
203 $ hg diff --nodates
204 diff -r 1057167b20ef 1.txt
204 diff -r 1057167b20ef 1.txt
205 --- a/1.txt
205 --- a/1.txt
206 +++ b/1.txt
206 +++ b/1.txt
207 @@ -1,5 +1,5 @@
207 @@ -1,5 +1,5 @@
208 1
208 1
209 -2
209 -2
210 +2 2
210 +2 2
211 3
211 3
212 -4
212 -4
213 +4 4
213 +4 4
214 5
214 5
215 diff -r 1057167b20ef 2.txt
215 diff -r 1057167b20ef 2.txt
216 --- a/2.txt
216 --- a/2.txt
217 +++ b/2.txt
217 +++ b/2.txt
218 @@ -1,5 +1,5 @@
218 @@ -1,5 +1,5 @@
219 a
219 a
220 -b
220 -b
221 +b b
221 +b b
222 c
222 c
223 d
223 d
224 e
224 e
225 diff -r 1057167b20ef dir/a.txt
225 diff -r 1057167b20ef dir/a.txt
226 --- a/dir/a.txt
226 --- a/dir/a.txt
227 +++ b/dir/a.txt
227 +++ b/dir/a.txt
228 @@ -1,4 +1,4 @@
228 @@ -1,4 +1,4 @@
229 -hello world
229 -hello world
230 +hello world!
230 +hello world!
231
231
232 someone
232 someone
233 up
233 up
234
234
235 qrecord with bad patch name, should abort before prompting
235 qrecord with bad patch name, should abort before prompting
236
236
237 $ hg qrecord .hg
237 $ hg qrecord .hg
238 abort: patch name cannot begin with ".hg"
238 abort: patch name cannot begin with ".hg"
239 [255]
239 [255]
240
240
241 qrecord a.patch
241 qrecord a.patch
242
242
243 $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
243 $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
244 > y
244 > y
245 > y
245 > y
246 > n
246 > n
247 > y
247 > y
248 > y
248 > y
249 > n
249 > n
250 > EOF
250 > EOF
251 diff --git a/1.txt b/1.txt
251 diff --git a/1.txt b/1.txt
252 2 hunks, 2 lines changed
252 2 hunks, 2 lines changed
253 examine changes to '1.txt'? [Ynesfdaq?]
253 examine changes to '1.txt'? [Ynesfdaq?]
254 @@ -1,3 +1,3 @@
254 @@ -1,3 +1,3 @@
255 1
255 1
256 -2
256 -2
257 +2 2
257 +2 2
258 3
258 3
259 record change 1/4 to '1.txt'? [Ynesfdaq?]
259 record change 1/4 to '1.txt'? [Ynesfdaq?]
260 @@ -3,3 +3,3 @@
260 @@ -3,3 +3,3 @@
261 3
261 3
262 -4
262 -4
263 +4 4
263 +4 4
264 5
264 5
265 record change 2/4 to '1.txt'? [Ynesfdaq?]
265 record change 2/4 to '1.txt'? [Ynesfdaq?]
266 diff --git a/2.txt b/2.txt
266 diff --git a/2.txt b/2.txt
267 1 hunks, 1 lines changed
267 1 hunks, 1 lines changed
268 examine changes to '2.txt'? [Ynesfdaq?]
268 examine changes to '2.txt'? [Ynesfdaq?]
269 @@ -1,5 +1,5 @@
269 @@ -1,5 +1,5 @@
270 a
270 a
271 -b
271 -b
272 +b b
272 +b b
273 c
273 c
274 d
274 d
275 e
275 e
276 record change 3/4 to '2.txt'? [Ynesfdaq?]
276 record change 3/4 to '2.txt'? [Ynesfdaq?]
277 diff --git a/dir/a.txt b/dir/a.txt
277 diff --git a/dir/a.txt b/dir/a.txt
278 1 hunks, 1 lines changed
278 1 hunks, 1 lines changed
279 examine changes to 'dir/a.txt'? [Ynesfdaq?]
279 examine changes to 'dir/a.txt'? [Ynesfdaq?]
280
280
281 After qrecord a.patch 'tip'"
281 After qrecord a.patch 'tip'"
282
282
283 $ hg tip -p
283 $ hg tip -p
284 changeset: 1:5d1ca63427ee
284 changeset: 1:5d1ca63427ee
285 tag: a.patch
285 tag: a.patch
286 tag: qbase
286 tag: qbase
287 tag: qtip
287 tag: qtip
288 tag: tip
288 tag: tip
289 user: test
289 user: test
290 date: Thu Jan 01 00:00:00 1970 +0000
290 date: Thu Jan 01 00:00:00 1970 +0000
291 summary: aaa
291 summary: aaa
292
292
293 diff -r 1057167b20ef -r 5d1ca63427ee 1.txt
293 diff -r 1057167b20ef -r 5d1ca63427ee 1.txt
294 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
294 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
295 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
295 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
296 @@ -1,5 +1,5 @@
296 @@ -1,5 +1,5 @@
297 1
297 1
298 -2
298 -2
299 +2 2
299 +2 2
300 3
300 3
301 4
301 4
302 5
302 5
303 diff -r 1057167b20ef -r 5d1ca63427ee 2.txt
303 diff -r 1057167b20ef -r 5d1ca63427ee 2.txt
304 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
304 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
305 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
305 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
306 @@ -1,5 +1,5 @@
306 @@ -1,5 +1,5 @@
307 a
307 a
308 -b
308 -b
309 +b b
309 +b b
310 c
310 c
311 d
311 d
312 e
312 e
313
313
314
314
315 After qrecord a.patch 'diff'"
315 After qrecord a.patch 'diff'"
316
316
317 $ hg diff --nodates
317 $ hg diff --nodates
318 diff -r 5d1ca63427ee 1.txt
318 diff -r 5d1ca63427ee 1.txt
319 --- a/1.txt
319 --- a/1.txt
320 +++ b/1.txt
320 +++ b/1.txt
321 @@ -1,5 +1,5 @@
321 @@ -1,5 +1,5 @@
322 1
322 1
323 2 2
323 2 2
324 3
324 3
325 -4
325 -4
326 +4 4
326 +4 4
327 5
327 5
328 diff -r 5d1ca63427ee dir/a.txt
328 diff -r 5d1ca63427ee dir/a.txt
329 --- a/dir/a.txt
329 --- a/dir/a.txt
330 +++ b/dir/a.txt
330 +++ b/dir/a.txt
331 @@ -1,4 +1,4 @@
331 @@ -1,4 +1,4 @@
332 -hello world
332 -hello world
333 +hello world!
333 +hello world!
334
334
335 someone
335 someone
336 up
336 up
337
337
338 qrecord b.patch
338 qrecord b.patch
339
339
340 $ hg qrecord -d '0 0' -m bbb b.patch <<EOF
340 $ hg qrecord -d '0 0' -m bbb b.patch <<EOF
341 > y
341 > y
342 > y
342 > y
343 > y
343 > y
344 > y
344 > y
345 > EOF
345 > EOF
346 diff --git a/1.txt b/1.txt
346 diff --git a/1.txt b/1.txt
347 1 hunks, 1 lines changed
347 1 hunks, 1 lines changed
348 examine changes to '1.txt'? [Ynesfdaq?]
348 examine changes to '1.txt'? [Ynesfdaq?]
349 @@ -1,5 +1,5 @@
349 @@ -1,5 +1,5 @@
350 1
350 1
351 2 2
351 2 2
352 3
352 3
353 -4
353 -4
354 +4 4
354 +4 4
355 5
355 5
356 record change 1/2 to '1.txt'? [Ynesfdaq?]
356 record change 1/2 to '1.txt'? [Ynesfdaq?]
357 diff --git a/dir/a.txt b/dir/a.txt
357 diff --git a/dir/a.txt b/dir/a.txt
358 1 hunks, 1 lines changed
358 1 hunks, 1 lines changed
359 examine changes to 'dir/a.txt'? [Ynesfdaq?]
359 examine changes to 'dir/a.txt'? [Ynesfdaq?]
360 @@ -1,4 +1,4 @@
360 @@ -1,4 +1,4 @@
361 -hello world
361 -hello world
362 +hello world!
362 +hello world!
363
363
364 someone
364 someone
365 up
365 up
366 record change 2/2 to 'dir/a.txt'? [Ynesfdaq?]
366 record change 2/2 to 'dir/a.txt'? [Ynesfdaq?]
367
367
368 After qrecord b.patch 'tip'
368 After qrecord b.patch 'tip'
369
369
370 $ hg tip -p
370 $ hg tip -p
371 changeset: 2:b056198bf878
371 changeset: 2:b056198bf878
372 tag: b.patch
372 tag: b.patch
373 tag: qtip
373 tag: qtip
374 tag: tip
374 tag: tip
375 user: test
375 user: test
376 date: Thu Jan 01 00:00:00 1970 +0000
376 date: Thu Jan 01 00:00:00 1970 +0000
377 summary: bbb
377 summary: bbb
378
378
379 diff -r 5d1ca63427ee -r b056198bf878 1.txt
379 diff -r 5d1ca63427ee -r b056198bf878 1.txt
380 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
380 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
381 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
381 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
382 @@ -1,5 +1,5 @@
382 @@ -1,5 +1,5 @@
383 1
383 1
384 2 2
384 2 2
385 3
385 3
386 -4
386 -4
387 +4 4
387 +4 4
388 5
388 5
389 diff -r 5d1ca63427ee -r b056198bf878 dir/a.txt
389 diff -r 5d1ca63427ee -r b056198bf878 dir/a.txt
390 --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
390 --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
391 +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
391 +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
392 @@ -1,4 +1,4 @@
392 @@ -1,4 +1,4 @@
393 -hello world
393 -hello world
394 +hello world!
394 +hello world!
395
395
396 someone
396 someone
397 up
397 up
398
398
399
399
400 After qrecord b.patch 'diff'
400 After qrecord b.patch 'diff'
401
401
402 $ hg diff --nodates
402 $ hg diff --nodates
403
403
404 $ cd ..
404 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now