##// END OF EJS Templates
help: indicate help omitting if help document is not fully displayed...
FUJIWARA Katsunori -
r17837:b623e323 default
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,203 +1,208 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 extensions, revset, fileset, templatekw, templatefilters, filemerge
10 import extensions, revset, fileset, templatekw, templatefilters, filemerge
11 import encoding, util, minirst
11 import encoding, util, minirst
12
12
13 def listexts(header, exts, indent=1):
13 def listexts(header, exts, indent=1):
14 '''return a text listing of the given extensions'''
14 '''return a text listing of the given extensions'''
15 rst = []
15 rst = []
16 if exts:
16 if exts:
17 rst.append('\n%s\n\n' % header)
17 rst.append('\n%s\n\n' % header)
18 for name, desc in sorted(exts.iteritems()):
18 for name, desc in sorted(exts.iteritems()):
19 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
19 rst.append('%s:%s: %s\n' % (' ' * indent, name, desc))
20 return rst
20 return rst
21
21
22 def extshelp():
22 def extshelp():
23 rst = loaddoc('extensions')().splitlines(True)
23 rst = loaddoc('extensions')().splitlines(True)
24 rst.extend(listexts(_('enabled extensions:'), extensions.enabled()))
24 rst.extend(listexts(_('enabled extensions:'), extensions.enabled()))
25 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
25 rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
26 doc = ''.join(rst)
26 doc = ''.join(rst)
27 return doc
27 return doc
28
28
29 def optrst(options, verbose):
29 def optrst(options, verbose):
30 data = []
30 data = []
31 multioccur = False
31 multioccur = False
32 for option in options:
32 for option in options:
33 if len(option) == 5:
33 if len(option) == 5:
34 shortopt, longopt, default, desc, optlabel = option
34 shortopt, longopt, default, desc, optlabel = option
35 else:
35 else:
36 shortopt, longopt, default, desc = option
36 shortopt, longopt, default, desc = option
37 optlabel = _("VALUE") # default label
37 optlabel = _("VALUE") # default label
38
38
39 if _("DEPRECATED") in desc and not verbose:
39 if _("DEPRECATED") in desc and not verbose:
40 continue
40 continue
41
41
42 so = ''
42 so = ''
43 if shortopt:
43 if shortopt:
44 so = '-' + shortopt
44 so = '-' + shortopt
45 lo = '--' + longopt
45 lo = '--' + longopt
46 if default:
46 if default:
47 desc += _(" (default: %s)") % default
47 desc += _(" (default: %s)") % default
48
48
49 if isinstance(default, list):
49 if isinstance(default, list):
50 lo += " %s [+]" % optlabel
50 lo += " %s [+]" % optlabel
51 multioccur = True
51 multioccur = True
52 elif (default is not None) and not isinstance(default, bool):
52 elif (default is not None) and not isinstance(default, bool):
53 lo += " %s" % optlabel
53 lo += " %s" % optlabel
54
54
55 data.append((so, lo, desc))
55 data.append((so, lo, desc))
56
56
57 rst = minirst.maketable(data, 1)
57 rst = minirst.maketable(data, 1)
58
58
59 if multioccur:
59 if multioccur:
60 rst.append(_("\n[+] marked option can be specified multiple times\n"))
60 rst.append(_("\n[+] marked option can be specified multiple times\n"))
61
61
62 return ''.join(rst)
62 return ''.join(rst)
63
63
64 def indicateomitted(rst, omitted, notomitted=None):
65 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted)
66 if notomitted:
67 rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted)
68
64 def topicmatch(kw):
69 def topicmatch(kw):
65 """Return help topics matching kw.
70 """Return help topics matching kw.
66
71
67 Returns {'section': [(name, summary), ...], ...} where section is
72 Returns {'section': [(name, summary), ...], ...} where section is
68 one of topics, commands, extensions, or extensioncommands.
73 one of topics, commands, extensions, or extensioncommands.
69 """
74 """
70 kw = encoding.lower(kw)
75 kw = encoding.lower(kw)
71 def lowercontains(container):
76 def lowercontains(container):
72 return kw in encoding.lower(container) # translated in helptable
77 return kw in encoding.lower(container) # translated in helptable
73 results = {'topics': [],
78 results = {'topics': [],
74 'commands': [],
79 'commands': [],
75 'extensions': [],
80 'extensions': [],
76 'extensioncommands': [],
81 'extensioncommands': [],
77 }
82 }
78 for names, header, doc in helptable:
83 for names, header, doc in helptable:
79 if (sum(map(lowercontains, names))
84 if (sum(map(lowercontains, names))
80 or lowercontains(header)
85 or lowercontains(header)
81 or lowercontains(doc())):
86 or lowercontains(doc())):
82 results['topics'].append((names[0], header))
87 results['topics'].append((names[0], header))
83 import commands # avoid cycle
88 import commands # avoid cycle
84 for cmd, entry in commands.table.iteritems():
89 for cmd, entry in commands.table.iteritems():
85 if cmd.startswith('debug'):
90 if cmd.startswith('debug'):
86 continue
91 continue
87 if len(entry) == 3:
92 if len(entry) == 3:
88 summary = entry[2]
93 summary = entry[2]
89 else:
94 else:
90 summary = ''
95 summary = ''
91 # translate docs *before* searching there
96 # translate docs *before* searching there
92 docs = _(getattr(entry[0], '__doc__', None)) or ''
97 docs = _(getattr(entry[0], '__doc__', None)) or ''
93 if kw in cmd or lowercontains(summary) or lowercontains(docs):
98 if kw in cmd or lowercontains(summary) or lowercontains(docs):
94 doclines = docs.splitlines()
99 doclines = docs.splitlines()
95 if doclines:
100 if doclines:
96 summary = doclines[0]
101 summary = doclines[0]
97 cmdname = cmd.split('|')[0].lstrip('^')
102 cmdname = cmd.split('|')[0].lstrip('^')
98 results['commands'].append((cmdname, summary))
103 results['commands'].append((cmdname, summary))
99 for name, docs in itertools.chain(
104 for name, docs in itertools.chain(
100 extensions.enabled().iteritems(),
105 extensions.enabled().iteritems(),
101 extensions.disabled().iteritems()):
106 extensions.disabled().iteritems()):
102 # extensions.load ignores the UI argument
107 # extensions.load ignores the UI argument
103 mod = extensions.load(None, name, '')
108 mod = extensions.load(None, name, '')
104 if lowercontains(name) or lowercontains(docs):
109 if lowercontains(name) or lowercontains(docs):
105 # extension docs are already translated
110 # extension docs are already translated
106 results['extensions'].append((name, docs.splitlines()[0]))
111 results['extensions'].append((name, docs.splitlines()[0]))
107 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
112 for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
108 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
113 if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])):
109 cmdname = cmd.split('|')[0].lstrip('^')
114 cmdname = cmd.split('|')[0].lstrip('^')
110 if entry[0].__doc__:
115 if entry[0].__doc__:
111 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
116 cmddoc = gettext(entry[0].__doc__).splitlines()[0]
112 else:
117 else:
113 cmddoc = _('(no help text available)')
118 cmddoc = _('(no help text available)')
114 results['extensioncommands'].append((cmdname, cmddoc))
119 results['extensioncommands'].append((cmdname, cmddoc))
115 return results
120 return results
116
121
117 def loaddoc(topic):
122 def loaddoc(topic):
118 """Return a delayed loader for help/topic.txt."""
123 """Return a delayed loader for help/topic.txt."""
119
124
120 def loader():
125 def loader():
121 if util.mainfrozen():
126 if util.mainfrozen():
122 module = sys.executable
127 module = sys.executable
123 else:
128 else:
124 module = __file__
129 module = __file__
125 base = os.path.dirname(module)
130 base = os.path.dirname(module)
126
131
127 for dir in ('.', '..'):
132 for dir in ('.', '..'):
128 docdir = os.path.join(base, dir, 'help')
133 docdir = os.path.join(base, dir, 'help')
129 if os.path.isdir(docdir):
134 if os.path.isdir(docdir):
130 break
135 break
131
136
132 path = os.path.join(docdir, topic + ".txt")
137 path = os.path.join(docdir, topic + ".txt")
133 doc = gettext(util.readfile(path))
138 doc = gettext(util.readfile(path))
134 for rewriter in helphooks.get(topic, []):
139 for rewriter in helphooks.get(topic, []):
135 doc = rewriter(topic, doc)
140 doc = rewriter(topic, doc)
136 return doc
141 return doc
137
142
138 return loader
143 return loader
139
144
140 helptable = sorted([
145 helptable = sorted([
141 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
146 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
142 (["dates"], _("Date Formats"), loaddoc('dates')),
147 (["dates"], _("Date Formats"), loaddoc('dates')),
143 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
148 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
144 (['environment', 'env'], _('Environment Variables'),
149 (['environment', 'env'], _('Environment Variables'),
145 loaddoc('environment')),
150 loaddoc('environment')),
146 (['revisions', 'revs'], _('Specifying Single Revisions'),
151 (['revisions', 'revs'], _('Specifying Single Revisions'),
147 loaddoc('revisions')),
152 loaddoc('revisions')),
148 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
153 (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
149 loaddoc('multirevs')),
154 loaddoc('multirevs')),
150 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
155 (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
151 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
156 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
152 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
157 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
153 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
158 (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
154 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
159 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
155 loaddoc('templates')),
160 loaddoc('templates')),
156 (['urls'], _('URL Paths'), loaddoc('urls')),
161 (['urls'], _('URL Paths'), loaddoc('urls')),
157 (["extensions"], _("Using Additional Features"), extshelp),
162 (["extensions"], _("Using Additional Features"), extshelp),
158 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
163 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
159 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
164 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
160 (["glossary"], _("Glossary"), loaddoc('glossary')),
165 (["glossary"], _("Glossary"), loaddoc('glossary')),
161 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
166 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
162 loaddoc('hgignore')),
167 loaddoc('hgignore')),
163 (["phases"], _("Working with Phases"), loaddoc('phases')),
168 (["phases"], _("Working with Phases"), loaddoc('phases')),
164 ])
169 ])
165
170
166 # Map topics to lists of callable taking the current topic help and
171 # Map topics to lists of callable taking the current topic help and
167 # returning the updated version
172 # returning the updated version
168 helphooks = {}
173 helphooks = {}
169
174
170 def addtopichook(topic, rewriter):
175 def addtopichook(topic, rewriter):
171 helphooks.setdefault(topic, []).append(rewriter)
176 helphooks.setdefault(topic, []).append(rewriter)
172
177
173 def makeitemsdoc(topic, doc, marker, items):
178 def makeitemsdoc(topic, doc, marker, items):
174 """Extract docstring from the items key to function mapping, build a
179 """Extract docstring from the items key to function mapping, build a
175 .single documentation block and use it to overwrite the marker in doc
180 .single documentation block and use it to overwrite the marker in doc
176 """
181 """
177 entries = []
182 entries = []
178 for name in sorted(items):
183 for name in sorted(items):
179 text = (items[name].__doc__ or '').rstrip()
184 text = (items[name].__doc__ or '').rstrip()
180 if not text:
185 if not text:
181 continue
186 continue
182 text = gettext(text)
187 text = gettext(text)
183 lines = text.splitlines()
188 lines = text.splitlines()
184 doclines = [(lines[0])]
189 doclines = [(lines[0])]
185 for l in lines[1:]:
190 for l in lines[1:]:
186 # Stop once we find some Python doctest
191 # Stop once we find some Python doctest
187 if l.strip().startswith('>>>'):
192 if l.strip().startswith('>>>'):
188 break
193 break
189 doclines.append(' ' + l.strip())
194 doclines.append(' ' + l.strip())
190 entries.append('\n'.join(doclines))
195 entries.append('\n'.join(doclines))
191 entries = '\n\n'.join(entries)
196 entries = '\n\n'.join(entries)
192 return doc.replace(marker, entries)
197 return doc.replace(marker, entries)
193
198
194 def addtopicsymbols(topic, marker, symbols):
199 def addtopicsymbols(topic, marker, symbols):
195 def add(topic, doc):
200 def add(topic, doc):
196 return makeitemsdoc(topic, doc, marker, symbols)
201 return makeitemsdoc(topic, doc, marker, symbols)
197 addtopichook(topic, add)
202 addtopichook(topic, add)
198
203
199 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
204 addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols)
200 addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals)
205 addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals)
201 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
206 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols)
202 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
207 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords)
203 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
208 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters)
@@ -1,447 +1,447 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
49
50 If "REVMAP" isn't given, it will be put in a default location
50 If "REVMAP" isn't given, it will be put in a default location
51 ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that
51 ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that
52 maps each source commit ID to the destination ID for that revision, like
52 maps each source commit ID to the destination ID for that revision, like
53 so:
53 so:
54
54
55 <source ID> <destination ID>
55 <source ID> <destination ID>
56
56
57 If the file doesn't exist, it's automatically created. It's updated on
57 If the file doesn't exist, it's automatically created. It's updated on
58 each commit copied, so "hg convert" can be interrupted and can be run
58 each commit copied, so "hg convert" can be interrupted and can be run
59 repeatedly to copy new commits.
59 repeatedly to copy new commits.
60
60
61 The authormap is a simple text file that maps each source commit author to
61 The authormap is a simple text file that maps each source commit author to
62 a destination commit author. It is handy for source SCMs that use unix
62 a destination commit author. It is handy for source SCMs that use unix
63 logins to identify authors (e.g.: CVS). One line per author mapping and
63 logins to identify authors (e.g.: CVS). One line per author mapping and
64 the line format is:
64 the line format is:
65
65
66 source author = destination author
66 source author = destination author
67
67
68 Empty lines and lines starting with a "#" are ignored.
68 Empty lines and lines starting with a "#" are ignored.
69
69
70 The filemap is a file that allows filtering and remapping of files and
70 The filemap is a file that allows filtering and remapping of files and
71 directories. Each line can contain one of the following directives:
71 directories. Each line can contain one of the following directives:
72
72
73 include path/to/file-or-dir
73 include path/to/file-or-dir
74
74
75 exclude path/to/file-or-dir
75 exclude path/to/file-or-dir
76
76
77 rename path/to/source path/to/destination
77 rename path/to/source path/to/destination
78
78
79 Comment lines start with "#". A specified path matches if it equals the
79 Comment lines start with "#". A specified path matches if it equals the
80 full relative name of a file or one of its parent directories. The
80 full relative name of a file or one of its parent directories. The
81 "include" or "exclude" directive with the longest matching path applies,
81 "include" or "exclude" directive with the longest matching path applies,
82 so line order does not matter.
82 so line order does not matter.
83
83
84 The "include" directive causes a file, or all files under a directory, to
84 The "include" directive causes a file, or all files under a directory, to
85 be included in the destination repository, and the exclusion of all other
85 be included in the destination repository, and the exclusion of all other
86 files and directories not explicitly included. The "exclude" directive
86 files and directories not explicitly included. The "exclude" directive
87 causes files or directories to be omitted. The "rename" directive renames
87 causes files or directories to be omitted. The "rename" directive renames
88 a file or directory if it is converted. To rename from a subdirectory into
88 a file or directory if it is converted. To rename from a subdirectory into
89 the root of the repository, use "." as the path to rename to.
89 the root of the repository, use "." as the path to rename to.
90
90
91 The splicemap is a file that allows insertion of synthetic history,
91 The splicemap is a file that allows insertion of synthetic history,
92 letting you specify the parents of a revision. This is useful if you want
92 letting you specify the parents of a revision. This is useful if you want
93 to e.g. give a Subversion merge two parents, or graft two disconnected
93 to e.g. give a Subversion merge two parents, or graft two disconnected
94 series of history together. Each entry contains a key, followed by a
94 series of history together. Each entry contains a key, followed by a
95 space, followed by one or two comma-separated values:
95 space, followed by one or two comma-separated values:
96
96
97 key parent1, parent2
97 key parent1, parent2
98
98
99 The key is the revision ID in the source revision control system whose
99 The key is the revision ID in the source revision control system whose
100 parents should be modified (same format as a key in .hg/shamap). The
100 parents should be modified (same format as a key in .hg/shamap). The
101 values are the revision IDs (in either the source or destination revision
101 values are the revision IDs (in either the source or destination revision
102 control system) that should be used as the new parents for that node. For
102 control system) that should be used as the new parents for that node. For
103 example, if you have merged "release-1.0" into "trunk", then you should
103 example, if you have merged "release-1.0" into "trunk", then you should
104 specify the revision on "trunk" as the first parent and the one on the
104 specify the revision on "trunk" as the first parent and the one on the
105 "release-1.0" branch as the second.
105 "release-1.0" branch as the second.
106
106
107 The branchmap is a file that allows you to rename a branch when it is
107 The branchmap is a file that allows you to rename a branch when it is
108 being brought in from whatever external repository. When used in
108 being brought in from whatever external repository. When used in
109 conjunction with a splicemap, it allows for a powerful combination to help
109 conjunction with a splicemap, it allows for a powerful combination to help
110 fix even the most badly mismanaged repositories and turn them into nicely
110 fix even the most badly mismanaged repositories and turn them into nicely
111 structured Mercurial repositories. The branchmap contains lines of the
111 structured Mercurial repositories. The branchmap contains lines of the
112 form:
112 form:
113
113
114 original_branch_name new_branch_name
114 original_branch_name new_branch_name
115
115
116 where "original_branch_name" is the name of the branch in the source
116 where "original_branch_name" is the name of the branch in the source
117 repository, and "new_branch_name" is the name of the branch is the
117 repository, and "new_branch_name" is the name of the branch is the
118 destination repository. No whitespace is allowed in the branch names. This
118 destination repository. No whitespace is allowed in the branch names. This
119 can be used to (for instance) move code in one repository from "default"
119 can be used to (for instance) move code in one repository from "default"
120 to a named branch.
120 to a named branch.
121
121
122 Mercurial Source
122 Mercurial Source
123 ################
123 ################
124
124
125 The Mercurial source recognizes the following configuration options, which
125 The Mercurial source recognizes the following configuration options, which
126 you can set on the command line with "--config":
126 you can set on the command line with "--config":
127
127
128 convert.hg.ignoreerrors
128 convert.hg.ignoreerrors
129 ignore integrity errors when reading. Use it to fix
129 ignore integrity errors when reading. Use it to fix
130 Mercurial repositories with missing revlogs, by converting
130 Mercurial repositories with missing revlogs, by converting
131 from and to Mercurial. Default is False.
131 from and to Mercurial. Default is False.
132 convert.hg.saverev
132 convert.hg.saverev
133 store original revision ID in changeset (forces target IDs
133 store original revision ID in changeset (forces target IDs
134 to change). It takes a boolean argument and defaults to
134 to change). It takes a boolean argument and defaults to
135 False.
135 False.
136 convert.hg.startrev
136 convert.hg.startrev
137 convert start revision and its descendants. It takes a hg
137 convert start revision and its descendants. It takes a hg
138 revision identifier and defaults to 0.
138 revision identifier and defaults to 0.
139
139
140 CVS Source
140 CVS Source
141 ##########
141 ##########
142
142
143 CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
143 CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
144 indicate the starting point of what will be converted. Direct access to
144 indicate the starting point of what will be converted. Direct access to
145 the repository files is not needed, unless of course the repository is
145 the repository files is not needed, unless of course the repository is
146 ":local:". The conversion uses the top level directory in the sandbox to
146 ":local:". The conversion uses the top level directory in the sandbox to
147 find the CVS repository, and then uses CVS rlog commands to find files to
147 find the CVS repository, and then uses CVS rlog commands to find files to
148 convert. This means that unless a filemap is given, all files under the
148 convert. This means that unless a filemap is given, all files under the
149 starting directory will be converted, and that any directory
149 starting directory will be converted, and that any directory
150 reorganization in the CVS sandbox is ignored.
150 reorganization in the CVS sandbox is ignored.
151
151
152 The following options can be used with "--config":
152 The following options can be used with "--config":
153
153
154 convert.cvsps.cache
154 convert.cvsps.cache
155 Set to False to disable remote log caching, for testing and
155 Set to False to disable remote log caching, for testing and
156 debugging purposes. Default is True.
156 debugging purposes. Default is True.
157 convert.cvsps.fuzz
157 convert.cvsps.fuzz
158 Specify the maximum time (in seconds) that is allowed
158 Specify the maximum time (in seconds) that is allowed
159 between commits with identical user and log message in a
159 between commits with identical user and log message in a
160 single changeset. When very large files were checked in as
160 single changeset. When very large files were checked in as
161 part of a changeset then the default may not be long enough.
161 part of a changeset then the default may not be long enough.
162 The default is 60.
162 The default is 60.
163 convert.cvsps.mergeto
163 convert.cvsps.mergeto
164 Specify a regular expression to which commit log messages
164 Specify a regular expression to which commit log messages
165 are matched. If a match occurs, then the conversion process
165 are matched. If a match occurs, then the conversion process
166 will insert a dummy revision merging the branch on which
166 will insert a dummy revision merging the branch on which
167 this log message occurs to the branch indicated in the
167 this log message occurs to the branch indicated in the
168 regex. Default is "{{mergetobranch ([-\w]+)}}"
168 regex. Default is "{{mergetobranch ([-\w]+)}}"
169 convert.cvsps.mergefrom
169 convert.cvsps.mergefrom
170 Specify a regular expression to which commit log messages
170 Specify a regular expression to which commit log messages
171 are matched. If a match occurs, then the conversion process
171 are matched. If a match occurs, then the conversion process
172 will add the most recent revision on the branch indicated in
172 will add the most recent revision on the branch indicated in
173 the regex as the second parent of the changeset. Default is
173 the regex as the second parent of the changeset. Default is
174 "{{mergefrombranch ([-\w]+)}}"
174 "{{mergefrombranch ([-\w]+)}}"
175 hook.cvslog Specify a Python function to be called at the end of
175 hook.cvslog Specify a Python function to be called at the end of
176 gathering the CVS log. The function is passed a list with
176 gathering the CVS log. The function is passed a list with
177 the log entries, and can modify the entries in-place, or add
177 the log entries, and can modify the entries in-place, or add
178 or delete them.
178 or delete them.
179 hook.cvschangesets
179 hook.cvschangesets
180 Specify a Python function to be called after the changesets
180 Specify a Python function to be called after the changesets
181 are calculated from the CVS log. The function is passed a
181 are calculated from the CVS log. The function is passed a
182 list with the changeset entries, and can modify the
182 list with the changeset entries, and can modify the
183 changesets in-place, or add or delete them.
183 changesets in-place, or add or delete them.
184
184
185 An additional "debugcvsps" Mercurial command allows the builtin changeset
185 An additional "debugcvsps" Mercurial command allows the builtin changeset
186 merging code to be run without doing a conversion. Its parameters and
186 merging code to be run without doing a conversion. Its parameters and
187 output are similar to that of cvsps 2.1. Please see the command help for
187 output are similar to that of cvsps 2.1. Please see the command help for
188 more details.
188 more details.
189
189
190 Subversion Source
190 Subversion Source
191 #################
191 #################
192
192
193 Subversion source detects classical trunk/branches/tags layouts. By
193 Subversion source detects classical trunk/branches/tags layouts. By
194 default, the supplied "svn://repo/path/" source URL is converted as a
194 default, the supplied "svn://repo/path/" source URL is converted as a
195 single branch. If "svn://repo/path/trunk" exists it replaces the default
195 single branch. If "svn://repo/path/trunk" exists it replaces the default
196 branch. If "svn://repo/path/branches" exists, its subdirectories are
196 branch. If "svn://repo/path/branches" exists, its subdirectories are
197 listed as possible branches. If "svn://repo/path/tags" exists, it is
197 listed as possible branches. If "svn://repo/path/tags" exists, it is
198 looked for tags referencing converted branches. Default "trunk",
198 looked for tags referencing converted branches. Default "trunk",
199 "branches" and "tags" values can be overridden with following options. Set
199 "branches" and "tags" values can be overridden with following options. Set
200 them to paths relative to the source URL, or leave them blank to disable
200 them to paths relative to the source URL, or leave them blank to disable
201 auto detection.
201 auto detection.
202
202
203 The following options can be set with "--config":
203 The following options can be set with "--config":
204
204
205 convert.svn.branches
205 convert.svn.branches
206 specify the directory containing branches. The default is
206 specify the directory containing branches. The default is
207 "branches".
207 "branches".
208 convert.svn.tags
208 convert.svn.tags
209 specify the directory containing tags. The default is
209 specify the directory containing tags. The default is
210 "tags".
210 "tags".
211 convert.svn.trunk
211 convert.svn.trunk
212 specify the name of the trunk branch. The default is
212 specify the name of the trunk branch. The default is
213 "trunk".
213 "trunk".
214
214
215 Source history can be retrieved starting at a specific revision, instead
215 Source history can be retrieved starting at a specific revision, instead
216 of being integrally converted. Only single branch conversions are
216 of being integrally converted. Only single branch conversions are
217 supported.
217 supported.
218
218
219 convert.svn.startrev
219 convert.svn.startrev
220 specify start Subversion revision number. The default is 0.
220 specify start Subversion revision number. The default is 0.
221
221
222 Perforce Source
222 Perforce Source
223 ###############
223 ###############
224
224
225 The Perforce (P4) importer can be given a p4 depot path or a client
225 The Perforce (P4) importer can be given a p4 depot path or a client
226 specification as source. It will convert all files in the source to a flat
226 specification as source. It will convert all files in the source to a flat
227 Mercurial repository, ignoring labels, branches and integrations. Note
227 Mercurial repository, ignoring labels, branches and integrations. Note
228 that when a depot path is given you then usually should specify a target
228 that when a depot path is given you then usually should specify a target
229 directory, because otherwise the target may be named "...-hg".
229 directory, because otherwise the target may be named "...-hg".
230
230
231 It is possible to limit the amount of source history to be converted by
231 It is possible to limit the amount of source history to be converted by
232 specifying an initial Perforce revision:
232 specifying an initial Perforce revision:
233
233
234 convert.p4.startrev
234 convert.p4.startrev
235 specify initial Perforce revision (a Perforce changelist
235 specify initial Perforce revision (a Perforce changelist
236 number).
236 number).
237
237
238 Mercurial Destination
238 Mercurial Destination
239 #####################
239 #####################
240
240
241 The following options are supported:
241 The following options are supported:
242
242
243 convert.hg.clonebranches
243 convert.hg.clonebranches
244 dispatch source branches in separate clones. The default is
244 dispatch source branches in separate clones. The default is
245 False.
245 False.
246 convert.hg.tagsbranch
246 convert.hg.tagsbranch
247 branch name for tag revisions, defaults to "default".
247 branch name for tag revisions, defaults to "default".
248 convert.hg.usebranchnames
248 convert.hg.usebranchnames
249 preserve branch names. The default is True.
249 preserve branch names. The default is True.
250
250
251 options:
251 options:
252
252
253 -s --source-type TYPE source repository type
253 -s --source-type TYPE source repository type
254 -d --dest-type TYPE destination repository type
254 -d --dest-type TYPE destination repository type
255 -r --rev REV import up to target revision REV
255 -r --rev REV import up to target revision REV
256 -A --authormap FILE remap usernames using this file
256 -A --authormap FILE remap usernames using this file
257 --filemap FILE remap file names using contents of file
257 --filemap FILE remap file names using contents of file
258 --splicemap FILE splice synthesized history into place
258 --splicemap FILE splice synthesized history into place
259 --branchmap FILE change branch names while converting
259 --branchmap FILE change branch names while converting
260 --branchsort try to sort changesets by branches
260 --branchsort try to sort changesets by branches
261 --datesort try to sort changesets by date
261 --datesort try to sort changesets by date
262 --sourcesort preserve source changesets order
262 --sourcesort preserve source changesets order
263
263
264 use "hg -v help convert" to show more info
264 use "hg -v help convert" to show the global options
265 $ hg init a
265 $ hg init a
266 $ cd a
266 $ cd a
267 $ echo a > a
267 $ echo a > a
268 $ hg ci -d'0 0' -Ama
268 $ hg ci -d'0 0' -Ama
269 adding a
269 adding a
270 $ hg cp a b
270 $ hg cp a b
271 $ hg ci -d'1 0' -mb
271 $ hg ci -d'1 0' -mb
272 $ hg rm a
272 $ hg rm a
273 $ hg ci -d'2 0' -mc
273 $ hg ci -d'2 0' -mc
274 $ hg mv b a
274 $ hg mv b a
275 $ hg ci -d'3 0' -md
275 $ hg ci -d'3 0' -md
276 $ echo a >> a
276 $ echo a >> a
277 $ hg ci -d'4 0' -me
277 $ hg ci -d'4 0' -me
278 $ cd ..
278 $ cd ..
279 $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded'
279 $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded'
280 assuming destination a-hg
280 assuming destination a-hg
281 initializing destination a-hg repository
281 initializing destination a-hg repository
282 scanning source...
282 scanning source...
283 sorting...
283 sorting...
284 converting...
284 converting...
285 4 a
285 4 a
286 3 b
286 3 b
287 2 c
287 2 c
288 1 d
288 1 d
289 0 e
289 0 e
290 $ hg --cwd a-hg pull ../a
290 $ hg --cwd a-hg pull ../a
291 pulling from ../a
291 pulling from ../a
292 searching for changes
292 searching for changes
293 no changes found
293 no changes found
294
294
295 conversion to existing file should fail
295 conversion to existing file should fail
296
296
297 $ touch bogusfile
297 $ touch bogusfile
298 $ hg convert a bogusfile
298 $ hg convert a bogusfile
299 initializing destination bogusfile repository
299 initializing destination bogusfile repository
300 abort: cannot create new bundle repository
300 abort: cannot create new bundle repository
301 [255]
301 [255]
302
302
303 #if unix-permissions
303 #if unix-permissions
304
304
305 conversion to dir without permissions should fail
305 conversion to dir without permissions should fail
306
306
307 $ mkdir bogusdir
307 $ mkdir bogusdir
308 $ chmod 000 bogusdir
308 $ chmod 000 bogusdir
309
309
310 $ hg convert a bogusdir
310 $ hg convert a bogusdir
311 abort: Permission denied: bogusdir
311 abort: Permission denied: bogusdir
312 [255]
312 [255]
313
313
314 user permissions should succeed
314 user permissions should succeed
315
315
316 $ chmod 700 bogusdir
316 $ chmod 700 bogusdir
317 $ hg convert a bogusdir
317 $ hg convert a bogusdir
318 initializing destination bogusdir repository
318 initializing destination bogusdir repository
319 scanning source...
319 scanning source...
320 sorting...
320 sorting...
321 converting...
321 converting...
322 4 a
322 4 a
323 3 b
323 3 b
324 2 c
324 2 c
325 1 d
325 1 d
326 0 e
326 0 e
327
327
328 #endif
328 #endif
329
329
330 test pre and post conversion actions
330 test pre and post conversion actions
331
331
332 $ echo 'include b' > filemap
332 $ echo 'include b' > filemap
333 $ hg convert --debug --filemap filemap a partialb | \
333 $ hg convert --debug --filemap filemap a partialb | \
334 > grep 'run hg'
334 > grep 'run hg'
335 run hg source pre-conversion action
335 run hg source pre-conversion action
336 run hg sink pre-conversion action
336 run hg sink pre-conversion action
337 run hg sink post-conversion action
337 run hg sink post-conversion action
338 run hg source post-conversion action
338 run hg source post-conversion action
339
339
340 converting empty dir should fail "nicely
340 converting empty dir should fail "nicely
341
341
342 $ mkdir emptydir
342 $ mkdir emptydir
343
343
344 override $PATH to ensure p4 not visible; use $PYTHON in case we're
344 override $PATH to ensure p4 not visible; use $PYTHON in case we're
345 running from a devel copy, not a temp installation
345 running from a devel copy, not a temp installation
346
346
347 $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir
347 $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir
348 assuming destination emptydir-hg
348 assuming destination emptydir-hg
349 initializing destination emptydir-hg repository
349 initializing destination emptydir-hg repository
350 emptydir does not look like a CVS checkout
350 emptydir does not look like a CVS checkout
351 emptydir does not look like a Git repository
351 emptydir does not look like a Git repository
352 emptydir does not look like a Subversion repository
352 emptydir does not look like a Subversion repository
353 emptydir is not a local Mercurial repository
353 emptydir is not a local Mercurial repository
354 emptydir does not look like a darcs repository
354 emptydir does not look like a darcs repository
355 emptydir does not look like a monotone repository
355 emptydir does not look like a monotone repository
356 emptydir does not look like a GNU Arch repository
356 emptydir does not look like a GNU Arch repository
357 emptydir does not look like a Bazaar repository
357 emptydir does not look like a Bazaar repository
358 cannot find required "p4" tool
358 cannot find required "p4" tool
359 abort: emptydir: missing or unsupported repository
359 abort: emptydir: missing or unsupported repository
360 [255]
360 [255]
361
361
362 convert with imaginary source type
362 convert with imaginary source type
363
363
364 $ hg convert --source-type foo a a-foo
364 $ hg convert --source-type foo a a-foo
365 initializing destination a-foo repository
365 initializing destination a-foo repository
366 abort: foo: invalid source repository type
366 abort: foo: invalid source repository type
367 [255]
367 [255]
368
368
369 convert with imaginary sink type
369 convert with imaginary sink type
370
370
371 $ hg convert --dest-type foo a a-foo
371 $ hg convert --dest-type foo a a-foo
372 abort: foo: invalid destination repository type
372 abort: foo: invalid destination repository type
373 [255]
373 [255]
374
374
375 testing: convert must not produce duplicate entries in fncache
375 testing: convert must not produce duplicate entries in fncache
376
376
377 $ hg convert a b
377 $ hg convert a b
378 initializing destination b repository
378 initializing destination b repository
379 scanning source...
379 scanning source...
380 sorting...
380 sorting...
381 converting...
381 converting...
382 4 a
382 4 a
383 3 b
383 3 b
384 2 c
384 2 c
385 1 d
385 1 d
386 0 e
386 0 e
387
387
388 contents of fncache file:
388 contents of fncache file:
389
389
390 $ cat b/.hg/store/fncache | sort
390 $ cat b/.hg/store/fncache | sort
391 data/a.i
391 data/a.i
392 data/b.i
392 data/b.i
393
393
394 test bogus URL
394 test bogus URL
395
395
396 $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz
396 $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz
397 abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository
397 abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository
398 [255]
398 [255]
399
399
400 test revset converted() lookup
400 test revset converted() lookup
401
401
402 $ hg --config convert.hg.saverev=True convert a c
402 $ hg --config convert.hg.saverev=True convert a c
403 initializing destination c repository
403 initializing destination c repository
404 scanning source...
404 scanning source...
405 sorting...
405 sorting...
406 converting...
406 converting...
407 4 a
407 4 a
408 3 b
408 3 b
409 2 c
409 2 c
410 1 d
410 1 d
411 0 e
411 0 e
412 $ echo f > c/f
412 $ echo f > c/f
413 $ hg -R c ci -d'0 0' -Amf
413 $ hg -R c ci -d'0 0' -Amf
414 adding f
414 adding f
415 created new head
415 created new head
416 $ hg -R c log -r "converted(09d945a62ce6)"
416 $ hg -R c log -r "converted(09d945a62ce6)"
417 changeset: 1:98c3dd46a874
417 changeset: 1:98c3dd46a874
418 user: test
418 user: test
419 date: Thu Jan 01 00:00:01 1970 +0000
419 date: Thu Jan 01 00:00:01 1970 +0000
420 summary: b
420 summary: b
421
421
422 $ hg -R c log -r "converted()"
422 $ hg -R c log -r "converted()"
423 changeset: 0:31ed57b2037c
423 changeset: 0:31ed57b2037c
424 user: test
424 user: test
425 date: Thu Jan 01 00:00:00 1970 +0000
425 date: Thu Jan 01 00:00:00 1970 +0000
426 summary: a
426 summary: a
427
427
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 changeset: 2:3b9ca06ef716
433 changeset: 2:3b9ca06ef716
434 user: test
434 user: test
435 date: Thu Jan 01 00:00:02 1970 +0000
435 date: Thu Jan 01 00:00:02 1970 +0000
436 summary: c
436 summary: c
437
437
438 changeset: 3:4e0debd37cf2
438 changeset: 3:4e0debd37cf2
439 user: test
439 user: test
440 date: Thu Jan 01 00:00:03 1970 +0000
440 date: Thu Jan 01 00:00:03 1970 +0000
441 summary: d
441 summary: d
442
442
443 changeset: 4:9de3bc9349c5
443 changeset: 4:9de3bc9349c5
444 user: test
444 user: test
445 date: Thu Jan 01 00:00:04 1970 +0000
445 date: Thu Jan 01 00:00:04 1970 +0000
446 summary: e
446 summary: e
447
447
@@ -1,145 +1,145 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 > def showoptlist(ui, repo, *pats, **opts):
19 > def showoptlist(ui, repo, *pats, **opts):
20 > '''dummy command to show option descriptions'''
20 > '''dummy command to show option descriptions'''
21 > return 0
21 > return 0
22 > cmdtable = {
22 > cmdtable = {
23 > 'showoptlist':
23 > 'showoptlist':
24 > (showoptlist,
24 > (showoptlist,
25 > [('s', 'opt1', '', 'short width' + ' %(s)s' * 8, '%(s)s'),
25 > [('s', 'opt1', '', 'short width' + ' %(s)s' * 8, '%(s)s'),
26 > ('m', 'opt2', '', 'middle width' + ' %(m)s' * 8, '%(m)s'),
26 > ('m', 'opt2', '', 'middle width' + ' %(m)s' * 8, '%(m)s'),
27 > ('l', 'opt3', '', 'long width' + ' %(l)s' * 8, '%(l)s')
27 > ('l', 'opt3', '', 'long width' + ' %(l)s' * 8, '%(l)s')
28 > ],
28 > ],
29 > ""
29 > ""
30 > )
30 > )
31 > }
31 > }
32 > """ % globals())
32 > """ % globals())
33 > f.close()
33 > f.close()
34 > EOF
34 > EOF
35 $ S=`cat s`
35 $ S=`cat s`
36 $ M=`cat m`
36 $ M=`cat m`
37 $ L=`cat l`
37 $ L=`cat l`
38
38
39 alignment of option descriptions in help
39 alignment of option descriptions in help
40
40
41 $ cat <<EOF > .hg/hgrc
41 $ cat <<EOF > .hg/hgrc
42 > [extensions]
42 > [extensions]
43 > ja_ext = `pwd`/showoptlist.py
43 > ja_ext = `pwd`/showoptlist.py
44 > EOF
44 > EOF
45
45
46 check alignment of option descriptions in help
46 check alignment of option descriptions in help
47
47
48 $ hg help showoptlist
48 $ hg help showoptlist
49 hg showoptlist
49 hg showoptlist
50
50
51 dummy command to show option descriptions
51 dummy command to show option descriptions
52
52
53 options:
53 options:
54
54
55 -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 -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)
56 -m --opt2 MIDDLE_ middle width MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_
56 -m --opt2 MIDDLE_ middle width MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_
57 MIDDLE_ MIDDLE_ MIDDLE_
57 MIDDLE_ MIDDLE_ MIDDLE_
58 -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 -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)
59 \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 \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)
60 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
60 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
61
61
62 use "hg -v help showoptlist" to show more info
62 use "hg -v help showoptlist" to show the global options
63
63
64
64
65 $ rm -f s; touch s
65 $ rm -f s; touch s
66 $ rm -f m; touch m
66 $ rm -f m; touch m
67 $ rm -f l; touch l
67 $ rm -f l; touch l
68
68
69 add files
69 add files
70
70
71 $ cp s $S
71 $ cp s $S
72 $ hg add $S
72 $ hg add $S
73 $ cp m $M
73 $ cp m $M
74 $ hg add $M
74 $ hg add $M
75 $ cp l $L
75 $ cp l $L
76 $ hg add $L
76 $ hg add $L
77
77
78 commit(1)
78 commit(1)
79
79
80 $ echo 'first line(1)' >> s; cp s $S
80 $ echo 'first line(1)' >> s; cp s $S
81 $ echo 'first line(2)' >> m; cp m $M
81 $ echo 'first line(2)' >> m; cp m $M
82 $ echo 'first line(3)' >> l; cp l $L
82 $ echo 'first line(3)' >> l; cp l $L
83 $ hg commit -m 'first commit' -u $S
83 $ hg commit -m 'first commit' -u $S
84
84
85 commit(2)
85 commit(2)
86
86
87 $ echo 'second line(1)' >> s; cp s $S
87 $ echo 'second line(1)' >> s; cp s $S
88 $ echo 'second line(2)' >> m; cp m $M
88 $ echo 'second line(2)' >> m; cp m $M
89 $ echo 'second line(3)' >> l; cp l $L
89 $ echo 'second line(3)' >> l; cp l $L
90 $ hg commit -m 'second commit' -u $M
90 $ hg commit -m 'second commit' -u $M
91
91
92 commit(3)
92 commit(3)
93
93
94 $ echo 'third line(1)' >> s; cp s $S
94 $ echo 'third line(1)' >> s; cp s $S
95 $ echo 'third line(2)' >> m; cp m $M
95 $ echo 'third line(2)' >> m; cp m $M
96 $ echo 'third line(3)' >> l; cp l $L
96 $ echo 'third line(3)' >> l; cp l $L
97 $ hg commit -m 'third commit' -u $L
97 $ hg commit -m 'third commit' -u $L
98
98
99 check alignment of user names in annotate
99 check alignment of user names in annotate
100
100
101 $ hg annotate -u $M
101 $ hg annotate -u $M
102 \xe7\x9f\xad\xe5\x90\x8d: first line(2) (esc)
102 \xe7\x9f\xad\xe5\x90\x8d: first line(2) (esc)
103 MIDDLE_: second line(2)
103 MIDDLE_: second line(2)
104 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d: third line(2) (esc)
104 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d: third line(2) (esc)
105
105
106 check alignment of filenames in diffstat
106 check alignment of filenames in diffstat
107
107
108 $ hg diff -c tip --stat
108 $ hg diff -c tip --stat
109 MIDDLE_ | 1 +
109 MIDDLE_ | 1 +
110 \xe7\x9f\xad\xe5\x90\x8d | 1 + (esc)
110 \xe7\x9f\xad\xe5\x90\x8d | 1 + (esc)
111 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d | 1 + (esc)
111 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d | 1 + (esc)
112 3 files changed, 3 insertions(+), 0 deletions(-)
112 3 files changed, 3 insertions(+), 0 deletions(-)
113
113
114 add branches/tags
114 add branches/tags
115
115
116 $ hg branch $S
116 $ hg branch $S
117 marked working directory as branch \xe7\x9f\xad\xe5\x90\x8d (esc)
117 marked working directory as branch \xe7\x9f\xad\xe5\x90\x8d (esc)
118 (branches are permanent and global, did you want a bookmark?)
118 (branches are permanent and global, did you want a bookmark?)
119 $ hg tag $S
119 $ hg tag $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 branch $L
124 $ hg branch $L
125 marked working directory as branch \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
125 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 (branches are permanent and global, did you want a bookmark?)
126 (branches are permanent and global, did you want a bookmark?)
127 $ hg tag $L
127 $ hg tag $L
128
128
129 check alignment of branches
129 check alignment of branches
130
130
131 $ hg tags
131 $ hg tags
132 tip 5:d745ff46155b
132 tip 5:d745ff46155b
133 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 4:9259be597f19 (esc)
133 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 4:9259be597f19 (esc)
134 MIDDLE_ 3:b06c5b6def9e
134 MIDDLE_ 3:b06c5b6def9e
135 \xe7\x9f\xad\xe5\x90\x8d 2:64a70663cee8 (esc)
135 \xe7\x9f\xad\xe5\x90\x8d 2:64a70663cee8 (esc)
136
136
137 check alignment of tags
137 check alignment of tags
138
138
139 $ hg tags
139 $ hg tags
140 tip 5:d745ff46155b
140 tip 5:d745ff46155b
141 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 4:9259be597f19 (esc)
141 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 4:9259be597f19 (esc)
142 MIDDLE_ 3:b06c5b6def9e
142 MIDDLE_ 3:b06c5b6def9e
143 \xe7\x9f\xad\xe5\x90\x8d 2:64a70663cee8 (esc)
143 \xe7\x9f\xad\xe5\x90\x8d 2:64a70663cee8 (esc)
144
144
145 $ cd ..
145 $ cd ..
@@ -1,259 +1,259 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 > # Japanese full-width characters:
9 > # Japanese full-width characters:
10 > def show_full_ja(ui, **opts):
10 > def show_full_ja(ui, **opts):
11 > 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
11 > 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
12 >
12 >
13 > \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
13 > \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
14 >
14 >
15 > \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
15 > \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
16 > '''
16 > '''
17 >
17 >
18 > # Japanese half-width characters:
18 > # Japanese half-width characters:
19 > def show_half_ja(ui, *opts):
19 > def show_half_ja(ui, *opts):
20 > 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
20 > 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
21 >
21 >
22 > \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
22 > \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
23 >
23 >
24 > \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
24 > \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
25 > '''
25 > '''
26 >
26 >
27 > # Japanese ambiguous-width characters:
27 > # Japanese ambiguous-width characters:
28 > def show_ambig_ja(ui, **opts):
28 > def show_ambig_ja(ui, **opts):
29 > 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
29 > 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
30 >
30 >
31 > \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
31 > \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
32 >
32 >
33 > \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
33 > \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
34 > '''
34 > '''
35 >
35 >
36 > # Russian ambiguous-width characters:
36 > # Russian ambiguous-width characters:
37 > def show_ambig_ru(ui, **opts):
37 > def show_ambig_ru(ui, **opts):
38 > 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
38 > 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
39 >
39 >
40 > \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
40 > \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
41 >
41 >
42 > \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
42 > \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
43 > '''
43 > '''
44 >
44 >
45 > cmdtable = {
45 > cmdtable = {
46 > 'show_full_ja': (show_full_ja, [], ""),
46 > 'show_full_ja': (show_full_ja, [], ""),
47 > 'show_half_ja': (show_half_ja, [], ""),
47 > 'show_half_ja': (show_half_ja, [], ""),
48 > 'show_ambig_ja': (show_ambig_ja, [], ""),
48 > 'show_ambig_ja': (show_ambig_ja, [], ""),
49 > 'show_ambig_ru': (show_ambig_ru, [], ""),
49 > 'show_ambig_ru': (show_ambig_ru, [], ""),
50 > }
50 > }
51 > EOF
51 > EOF
52
52
53 "COLUMNS=60" means that there is no lines which has grater than 58 width
53 "COLUMNS=60" means that there is no lines which has grater than 58 width
54
54
55 (1) test text wrapping for non-ambiguous-width characters
55 (1) test text wrapping for non-ambiguous-width characters
56
56
57 (1-1) display Japanese full-width characters in cp932
57 (1-1) display Japanese full-width characters in cp932
58
58
59 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_full_ja
59 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_full_ja
60 hg show_full_ja
60 hg show_full_ja
61
61
62 \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)
62 \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)
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 (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 (esc)
65 \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 \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
66
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\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\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
68 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
68 \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
69
69
70 use "hg -v help show_full_ja" to show more info
70 use "hg -v help show_full_ja" to show the global options
71
71
72 (1-2) display Japanese full-width characters in utf-8
72 (1-2) display Japanese full-width characters in utf-8
73
73
74 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_full_ja
74 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_full_ja
75 hg show_full_ja
75 hg show_full_ja
76
76
77 \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)
77 \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)
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 (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 (esc)
80 \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 \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
81
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\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\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 \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 \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
84
85 use "hg -v help show_full_ja" to show more info
85 use "hg -v help show_full_ja" to show the global options
86
86
87
87
88 (1-3) display Japanese half-width characters in cp932
88 (1-3) display Japanese half-width characters in cp932
89
89
90 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_half_ja
90 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_half_ja
91 hg show_half_ja
91 hg show_half_ja
92
92
93 \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)
93 \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)
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 \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 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
96 \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 \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
97
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\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\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 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
99 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
100
100
101 use "hg -v help show_half_ja" to show more info
101 use "hg -v help show_half_ja" to show the global options
102
102
103 (1-4) display Japanese half-width characters in utf-8
103 (1-4) display Japanese half-width characters in utf-8
104
104
105 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_half_ja
105 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_half_ja
106 hg show_half_ja
106 hg show_half_ja
107
107
108 \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)
108 \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)
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 \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 \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 \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 \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
112
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\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\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 \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 \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
115
116 use "hg -v help show_half_ja" to show more info
116 use "hg -v help show_half_ja" to show the global options
117
117
118
118
119
119
120 (2) test text wrapping for ambiguous-width characters
120 (2) test text wrapping for ambiguous-width characters
121
121
122 (2-1) treat width of ambiguous characters as narrow (default)
122 (2-1) treat width of ambiguous characters as narrow (default)
123
123
124 (2-1-1) display Japanese ambiguous-width characters in cp932
124 (2-1-1) display Japanese ambiguous-width characters in cp932
125
125
126 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
126 $ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
127 hg show_ambig_ja
127 hg show_ambig_ja
128
128
129 \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)
129 \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)
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 \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 \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 \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 \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
133
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\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\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)
135 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
135 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
136
136
137 use "hg -v help show_ambig_ja" to show more info
137 use "hg -v help show_ambig_ja" to show the global options
138
138
139 (2-1-2) display Japanese ambiguous-width characters in utf-8
139 (2-1-2) display Japanese ambiguous-width characters in utf-8
140
140
141 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
141 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
142 hg show_ambig_ja
142 hg show_ambig_ja
143
143
144 \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)
144 \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)
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 \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 \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 \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 \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
148
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\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\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)
150 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
150 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
151
151
152 use "hg -v help show_ambig_ja" to show more info
152 use "hg -v help show_ambig_ja" to show the global options
153
153
154 (2-1-3) display Russian ambiguous-width characters in cp1251
154 (2-1-3) display Russian ambiguous-width characters in cp1251
155
155
156 $ COLUMNS=60 hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
156 $ COLUMNS=60 hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
157 hg show_ambig_ru
157 hg show_ambig_ru
158
158
159 \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)
159 \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)
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 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
162 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
163
163
164 \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)
164 \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)
165 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
165 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
166
166
167 use "hg -v help show_ambig_ru" to show more info
167 use "hg -v help show_ambig_ru" to show the global options
168
168
169 (2-1-4) display Russian ambiguous-width characters in utf-8
169 (2-1-4) display Russian ambiguous-width characters in utf-8
170
170
171 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
171 $ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
172 hg show_ambig_ru
172 hg show_ambig_ru
173
173
174 \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)
174 \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)
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 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
177 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
178
178
179 \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)
179 \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)
180 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
180 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
181
181
182 use "hg -v help show_ambig_ru" to show more info
182 use "hg -v help show_ambig_ru" to show the global options
183
183
184
184
185 (2-2) treat width of ambiguous characters as wide
185 (2-2) treat width of ambiguous characters as wide
186
186
187 (2-2-1) display Japanese ambiguous-width characters in cp932
187 (2-2-1) display Japanese ambiguous-width characters in cp932
188
188
189 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
189 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
190 hg show_ambig_ja
190 hg show_ambig_ja
191
191
192 \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)
192 \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)
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 (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 (esc)
195 \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 \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)
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 (esc)
197 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
198
198
199 \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)
199 \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)
200 \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)
200 \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 (esc)
201 \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
202
202
203 use "hg -v help show_ambig_ja" to show more info
203 use "hg -v help show_ambig_ja" to show the global options
204
204
205 (2-2-2) display Japanese ambiguous-width characters in utf-8
205 (2-2-2) display Japanese ambiguous-width characters in utf-8
206
206
207 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
207 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
208 hg show_ambig_ja
208 hg show_ambig_ja
209
209
210 \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)
210 \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)
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 (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 (esc)
213 \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 \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)
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 (esc)
215 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
216
216
217 \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)
217 \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)
218 \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)
218 \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 (esc)
219 \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
220
220
221 use "hg -v help show_ambig_ja" to show more info
221 use "hg -v help show_ambig_ja" to show the global options
222
222
223 (2-2-3) display Russian ambiguous-width characters in cp1251
223 (2-2-3) display Russian ambiguous-width characters in cp1251
224
224
225 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
225 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
226 hg show_ambig_ru
226 hg show_ambig_ru
227
227
228 \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)
228 \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)
229 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
229 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
230
230
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 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
232 \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)
233 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
234
234
235 \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)
235 \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)
236 \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)
236 \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 (esc)
237 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
238
238
239 use "hg -v help show_ambig_ru" to show more info
239 use "hg -v help show_ambig_ru" to show the global options
240
240
241 (2-2-4) display Russian ambiguous-width charactes in utf-8
241 (2-2-4) display Russian ambiguous-width charactes in utf-8
242
242
243 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
243 $ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
244 hg show_ambig_ru
244 hg show_ambig_ru
245
245
246 \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)
246 \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)
247 \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)
247 \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
248
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 \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 \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)
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
252
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\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\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
254 \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)
254 \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 (esc)
255 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
256
256
257 use "hg -v help show_ambig_ru" to show more info
257 use "hg -v help show_ambig_ru" to show the global options
258
258
259 $ cd ..
259 $ 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 more info
50 use "hg -v help falabala" to show the global options
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,561 +1,561 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 commands
5 > from mercurial import commands
6 >
6 >
7 > def uisetup(ui):
7 > def uisetup(ui):
8 > ui.write("uisetup called\\n")
8 > ui.write("uisetup called\\n")
9 >
9 >
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 >
13 >
14 > def foo(ui, *args, **kwargs):
14 > def foo(ui, *args, **kwargs):
15 > ui.write("Foo\\n")
15 > ui.write("Foo\\n")
16 >
16 >
17 > def bar(ui, *args, **kwargs):
17 > def bar(ui, *args, **kwargs):
18 > ui.write("Bar\\n")
18 > ui.write("Bar\\n")
19 >
19 >
20 > cmdtable = {
20 > cmdtable = {
21 > "foo": (foo, [], "hg foo"),
21 > "foo": (foo, [], "hg foo"),
22 > "bar": (bar, [], "hg bar"),
22 > "bar": (bar, [], "hg bar"),
23 > }
23 > }
24 >
24 >
25 > commands.norepo += ' bar'
25 > commands.norepo += ' bar'
26 > EOF
26 > EOF
27 $ abspath=`pwd`/foobar.py
27 $ abspath=`pwd`/foobar.py
28
28
29 $ mkdir barfoo
29 $ mkdir barfoo
30 $ cp foobar.py barfoo/__init__.py
30 $ cp foobar.py barfoo/__init__.py
31 $ barfoopath=`pwd`/barfoo
31 $ barfoopath=`pwd`/barfoo
32
32
33 $ hg init a
33 $ hg init a
34 $ cd a
34 $ cd a
35 $ echo foo > file
35 $ echo foo > file
36 $ hg add file
36 $ hg add file
37 $ hg commit -m 'add file'
37 $ hg commit -m 'add file'
38
38
39 $ echo '[extensions]' >> $HGRCPATH
39 $ echo '[extensions]' >> $HGRCPATH
40 $ echo "foobar = $abspath" >> $HGRCPATH
40 $ echo "foobar = $abspath" >> $HGRCPATH
41 $ hg foo
41 $ hg foo
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 Foo
45 Foo
46
46
47 $ cd ..
47 $ cd ..
48 $ hg clone a b
48 $ hg clone a b
49 uisetup called
49 uisetup called
50 reposetup called for a
50 reposetup called for a
51 ui == repo.ui
51 ui == repo.ui
52 reposetup called for b
52 reposetup called for b
53 ui == repo.ui
53 ui == repo.ui
54 updating to branch default
54 updating to branch default
55 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
55 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
56
56
57 $ hg bar
57 $ hg bar
58 uisetup called
58 uisetup called
59 Bar
59 Bar
60 $ echo 'foobar = !' >> $HGRCPATH
60 $ echo 'foobar = !' >> $HGRCPATH
61
61
62 module/__init__.py-style
62 module/__init__.py-style
63
63
64 $ echo "barfoo = $barfoopath" >> $HGRCPATH
64 $ echo "barfoo = $barfoopath" >> $HGRCPATH
65 $ cd a
65 $ cd a
66 $ hg foo
66 $ hg foo
67 uisetup called
67 uisetup called
68 reposetup called for a
68 reposetup called for a
69 ui == repo.ui
69 ui == repo.ui
70 Foo
70 Foo
71 $ echo 'barfoo = !' >> $HGRCPATH
71 $ echo 'barfoo = !' >> $HGRCPATH
72
72
73 Check that extensions are loaded in phases:
73 Check that extensions are loaded in phases:
74
74
75 $ cat > foo.py <<EOF
75 $ cat > foo.py <<EOF
76 > import os
76 > import os
77 > name = os.path.basename(__file__).rsplit('.', 1)[0]
77 > name = os.path.basename(__file__).rsplit('.', 1)[0]
78 > print "1) %s imported" % name
78 > print "1) %s imported" % name
79 > def uisetup(ui):
79 > def uisetup(ui):
80 > print "2) %s uisetup" % name
80 > print "2) %s uisetup" % name
81 > def extsetup():
81 > def extsetup():
82 > print "3) %s extsetup" % name
82 > print "3) %s extsetup" % name
83 > def reposetup(ui, repo):
83 > def reposetup(ui, repo):
84 > print "4) %s reposetup" % name
84 > print "4) %s reposetup" % name
85 > EOF
85 > EOF
86
86
87 $ cp foo.py bar.py
87 $ cp foo.py bar.py
88 $ echo 'foo = foo.py' >> $HGRCPATH
88 $ echo 'foo = foo.py' >> $HGRCPATH
89 $ echo 'bar = bar.py' >> $HGRCPATH
89 $ echo 'bar = bar.py' >> $HGRCPATH
90
90
91 Command with no output, we just want to see the extensions loaded:
91 Command with no output, we just want to see the extensions loaded:
92
92
93 $ hg paths
93 $ hg paths
94 1) foo imported
94 1) foo imported
95 1) bar imported
95 1) bar imported
96 2) foo uisetup
96 2) foo uisetup
97 2) bar uisetup
97 2) bar uisetup
98 3) foo extsetup
98 3) foo extsetup
99 3) bar extsetup
99 3) bar extsetup
100 4) foo reposetup
100 4) foo reposetup
101 4) bar reposetup
101 4) bar reposetup
102
102
103 Check hgweb's load order:
103 Check hgweb's load order:
104
104
105 $ cat > hgweb.cgi <<EOF
105 $ cat > hgweb.cgi <<EOF
106 > #!/usr/bin/env python
106 > #!/usr/bin/env python
107 > from mercurial import demandimport; demandimport.enable()
107 > from mercurial import demandimport; demandimport.enable()
108 > from mercurial.hgweb import hgweb
108 > from mercurial.hgweb import hgweb
109 > from mercurial.hgweb import wsgicgi
109 > from mercurial.hgweb import wsgicgi
110 >
110 >
111 > application = hgweb('.', 'test repo')
111 > application = hgweb('.', 'test repo')
112 > wsgicgi.launch(application)
112 > wsgicgi.launch(application)
113 > EOF
113 > EOF
114
114
115 $ SCRIPT_NAME='/' SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
115 $ SCRIPT_NAME='/' SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
116 > | grep '^[0-9]) ' # ignores HTML output
116 > | grep '^[0-9]) ' # ignores HTML output
117 1) foo imported
117 1) foo imported
118 1) bar imported
118 1) bar imported
119 2) foo uisetup
119 2) foo uisetup
120 2) bar uisetup
120 2) bar uisetup
121 3) foo extsetup
121 3) foo extsetup
122 3) bar extsetup
122 3) bar extsetup
123 4) foo reposetup
123 4) foo reposetup
124 4) bar reposetup
124 4) bar reposetup
125 4) foo reposetup
125 4) foo reposetup
126 4) bar reposetup
126 4) bar reposetup
127
127
128 $ echo 'foo = !' >> $HGRCPATH
128 $ echo 'foo = !' >> $HGRCPATH
129 $ echo 'bar = !' >> $HGRCPATH
129 $ echo 'bar = !' >> $HGRCPATH
130
130
131 $ cd ..
131 $ cd ..
132
132
133 hide outer repo
133 hide outer repo
134 $ hg init
134 $ hg init
135
135
136 $ cat > empty.py <<EOF
136 $ cat > empty.py <<EOF
137 > '''empty cmdtable
137 > '''empty cmdtable
138 > '''
138 > '''
139 > cmdtable = {}
139 > cmdtable = {}
140 > EOF
140 > EOF
141 $ emptypath=`pwd`/empty.py
141 $ emptypath=`pwd`/empty.py
142 $ echo "empty = $emptypath" >> $HGRCPATH
142 $ echo "empty = $emptypath" >> $HGRCPATH
143 $ hg help empty
143 $ hg help empty
144 empty extension - empty cmdtable
144 empty extension - empty cmdtable
145
145
146 no commands defined
146 no commands defined
147
147
148 $ echo 'empty = !' >> $HGRCPATH
148 $ echo 'empty = !' >> $HGRCPATH
149
149
150 $ cat > debugextension.py <<EOF
150 $ cat > debugextension.py <<EOF
151 > '''only debugcommands
151 > '''only debugcommands
152 > '''
152 > '''
153 > def debugfoobar(ui, repo, *args, **opts):
153 > def debugfoobar(ui, repo, *args, **opts):
154 > "yet another debug command"
154 > "yet another debug command"
155 > pass
155 > pass
156 >
156 >
157 > def foo(ui, repo, *args, **opts):
157 > def foo(ui, repo, *args, **opts):
158 > """yet another foo command
158 > """yet another foo command
159 >
159 >
160 > This command has been DEPRECATED since forever.
160 > This command has been DEPRECATED since forever.
161 > """
161 > """
162 > pass
162 > pass
163 >
163 >
164 > cmdtable = {
164 > cmdtable = {
165 > "debugfoobar": (debugfoobar, (), "hg debugfoobar"),
165 > "debugfoobar": (debugfoobar, (), "hg debugfoobar"),
166 > "foo": (foo, (), "hg foo")
166 > "foo": (foo, (), "hg foo")
167 > }
167 > }
168 > EOF
168 > EOF
169 $ debugpath=`pwd`/debugextension.py
169 $ debugpath=`pwd`/debugextension.py
170 $ echo "debugextension = $debugpath" >> $HGRCPATH
170 $ echo "debugextension = $debugpath" >> $HGRCPATH
171
171
172 $ hg help debugextension
172 $ hg help debugextension
173 debugextension extension - only debugcommands
173 debugextension extension - only debugcommands
174
174
175 no commands defined
175 no commands defined
176
176
177 $ hg --verbose help debugextension
177 $ hg --verbose help debugextension
178 debugextension extension - only debugcommands
178 debugextension extension - only debugcommands
179
179
180 list of commands:
180 list of commands:
181
181
182 foo yet another foo command
182 foo yet another foo command
183
183
184 global options:
184 global options:
185
185
186 -R --repository REPO repository root directory or name of overlay bundle
186 -R --repository REPO repository root directory or name of overlay bundle
187 file
187 file
188 --cwd DIR change working directory
188 --cwd DIR change working directory
189 -y --noninteractive do not prompt, automatically pick the first choice for
189 -y --noninteractive do not prompt, automatically pick the first choice for
190 all prompts
190 all prompts
191 -q --quiet suppress output
191 -q --quiet suppress output
192 -v --verbose enable additional output
192 -v --verbose enable additional output
193 --config CONFIG [+] set/override config option (use 'section.name=value')
193 --config CONFIG [+] set/override config option (use 'section.name=value')
194 --debug enable debugging output
194 --debug enable debugging output
195 --debugger start debugger
195 --debugger start debugger
196 --encoding ENCODE set the charset encoding (default: ascii)
196 --encoding ENCODE set the charset encoding (default: ascii)
197 --encodingmode MODE set the charset encoding mode (default: strict)
197 --encodingmode MODE set the charset encoding mode (default: strict)
198 --traceback always print a traceback on exception
198 --traceback always print a traceback on exception
199 --time time how long the command takes
199 --time time how long the command takes
200 --profile print command execution profile
200 --profile print command execution profile
201 --version output version information and exit
201 --version output version information and exit
202 -h --help display help and exit
202 -h --help display help and exit
203
203
204 [+] marked option can be specified multiple times
204 [+] marked option can be specified multiple times
205
205
206 $ hg --debug help debugextension
206 $ hg --debug help debugextension
207 debugextension extension - only debugcommands
207 debugextension extension - only debugcommands
208
208
209 list of commands:
209 list of commands:
210
210
211 debugfoobar yet another debug command
211 debugfoobar yet another debug command
212 foo yet another foo command
212 foo yet another foo command
213
213
214 global options:
214 global options:
215
215
216 -R --repository REPO repository root directory or name of overlay bundle
216 -R --repository REPO repository root directory or name of overlay bundle
217 file
217 file
218 --cwd DIR change working directory
218 --cwd DIR change working directory
219 -y --noninteractive do not prompt, automatically pick the first choice for
219 -y --noninteractive do not prompt, automatically pick the first choice for
220 all prompts
220 all prompts
221 -q --quiet suppress output
221 -q --quiet suppress output
222 -v --verbose enable additional output
222 -v --verbose enable additional output
223 --config CONFIG [+] set/override config option (use 'section.name=value')
223 --config CONFIG [+] set/override config option (use 'section.name=value')
224 --debug enable debugging output
224 --debug enable debugging output
225 --debugger start debugger
225 --debugger start debugger
226 --encoding ENCODE set the charset encoding (default: ascii)
226 --encoding ENCODE set the charset encoding (default: ascii)
227 --encodingmode MODE set the charset encoding mode (default: strict)
227 --encodingmode MODE set the charset encoding mode (default: strict)
228 --traceback always print a traceback on exception
228 --traceback always print a traceback on exception
229 --time time how long the command takes
229 --time time how long the command takes
230 --profile print command execution profile
230 --profile print command execution profile
231 --version output version information and exit
231 --version output version information and exit
232 -h --help display help and exit
232 -h --help display help and exit
233
233
234 [+] marked option can be specified multiple times
234 [+] marked option can be specified multiple times
235 $ echo 'debugextension = !' >> $HGRCPATH
235 $ echo 'debugextension = !' >> $HGRCPATH
236
236
237 Extension module help vs command help:
237 Extension module help vs command help:
238
238
239 $ echo 'extdiff =' >> $HGRCPATH
239 $ echo 'extdiff =' >> $HGRCPATH
240 $ hg help extdiff
240 $ hg help extdiff
241 hg extdiff [OPT]... [FILE]...
241 hg extdiff [OPT]... [FILE]...
242
242
243 use external program to diff repository (or selected files)
243 use external program to diff repository (or selected files)
244
244
245 Show differences between revisions for the specified files, using an
245 Show differences between revisions for the specified files, using an
246 external program. The default program used is diff, with default options
246 external program. The default program used is diff, with default options
247 "-Npru".
247 "-Npru".
248
248
249 To select a different program, use the -p/--program option. The program
249 To select a different program, use the -p/--program option. The program
250 will be passed the names of two directories to compare. To pass additional
250 will be passed the names of two directories to compare. To pass additional
251 options to the program, use -o/--option. These will be passed before the
251 options to the program, use -o/--option. These will be passed before the
252 names of the directories to compare.
252 names of the directories to compare.
253
253
254 When two revision arguments are given, then changes are shown between
254 When two revision arguments are given, then changes are shown between
255 those revisions. If only one revision is specified then that revision is
255 those revisions. If only one revision is specified then that revision is
256 compared to the working directory, and, when no revisions are specified,
256 compared to the working directory, and, when no revisions are specified,
257 the working directory files are compared to its parent.
257 the working directory files are compared to its parent.
258
258
259 use "hg help -e extdiff" to show help for the extdiff extension
259 use "hg help -e extdiff" to show help for the extdiff extension
260
260
261 options:
261 options:
262
262
263 -p --program CMD comparison program to run
263 -p --program CMD comparison program to run
264 -o --option OPT [+] pass option to comparison program
264 -o --option OPT [+] pass option to comparison program
265 -r --rev REV [+] revision
265 -r --rev REV [+] revision
266 -c --change REV change made by revision
266 -c --change REV change made by revision
267 -I --include PATTERN [+] include names matching the given patterns
267 -I --include PATTERN [+] include names matching the given patterns
268 -X --exclude PATTERN [+] exclude names matching the given patterns
268 -X --exclude PATTERN [+] exclude names matching the given patterns
269
269
270 [+] marked option can be specified multiple times
270 [+] marked option can be specified multiple times
271
271
272 use "hg -v help extdiff" to show more info
272 use "hg -v help extdiff" to show the global options
273
273
274 $ hg help --extension extdiff
274 $ hg help --extension extdiff
275 extdiff extension - command to allow external programs to compare revisions
275 extdiff extension - command to allow external programs to compare revisions
276
276
277 The extdiff Mercurial extension allows you to use external programs to compare
277 The extdiff Mercurial extension allows you to use external programs to compare
278 revisions, or revision with working directory. The external diff programs are
278 revisions, or revision with working directory. The external diff programs are
279 called with a configurable set of options and two non-option arguments: paths
279 called with a configurable set of options and two non-option arguments: paths
280 to directories containing snapshots of files to compare.
280 to directories containing snapshots of files to compare.
281
281
282 The extdiff extension also allows you to configure new diff commands, so you
282 The extdiff extension also allows you to configure new diff commands, so you
283 do not need to type "hg extdiff -p kdiff3" always.
283 do not need to type "hg extdiff -p kdiff3" always.
284
284
285 [extdiff]
285 [extdiff]
286 # add new command that runs GNU diff(1) in 'context diff' mode
286 # add new command that runs GNU diff(1) in 'context diff' mode
287 cdiff = gdiff -Nprc5
287 cdiff = gdiff -Nprc5
288 ## or the old way:
288 ## or the old way:
289 #cmd.cdiff = gdiff
289 #cmd.cdiff = gdiff
290 #opts.cdiff = -Nprc5
290 #opts.cdiff = -Nprc5
291
291
292 # add new command called vdiff, runs kdiff3
292 # add new command called vdiff, runs kdiff3
293 vdiff = kdiff3
293 vdiff = kdiff3
294
294
295 # add new command called meld, runs meld (no need to name twice)
295 # add new command called meld, runs meld (no need to name twice)
296 meld =
296 meld =
297
297
298 # add new command called vimdiff, runs gvimdiff with DirDiff plugin
298 # add new command called vimdiff, runs gvimdiff with DirDiff plugin
299 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
299 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
300 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
300 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
301 # your .vimrc
301 # your .vimrc
302 vimdiff = gvim -f "+next" \
302 vimdiff = gvim -f "+next" \
303 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
303 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
304
304
305 Tool arguments can include variables that are expanded at runtime:
305 Tool arguments can include variables that are expanded at runtime:
306
306
307 $parent1, $plabel1 - filename, descriptive label of first parent
307 $parent1, $plabel1 - filename, descriptive label of first parent
308 $child, $clabel - filename, descriptive label of child revision
308 $child, $clabel - filename, descriptive label of child revision
309 $parent2, $plabel2 - filename, descriptive label of second parent
309 $parent2, $plabel2 - filename, descriptive label of second parent
310 $root - repository root
310 $root - repository root
311 $parent is an alias for $parent1.
311 $parent is an alias for $parent1.
312
312
313 The extdiff extension will look in your [diff-tools] and [merge-tools]
313 The extdiff extension will look in your [diff-tools] and [merge-tools]
314 sections for diff tool arguments, when none are specified in [extdiff].
314 sections for diff tool arguments, when none are specified in [extdiff].
315
315
316 [extdiff]
316 [extdiff]
317 kdiff3 =
317 kdiff3 =
318
318
319 [diff-tools]
319 [diff-tools]
320 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
320 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
321
321
322 You can use -I/-X and list of file or directory names like normal "hg diff"
322 You can use -I/-X and list of file or directory names like normal "hg diff"
323 command. The extdiff extension makes snapshots of only needed files, so
323 command. The extdiff extension makes snapshots of only needed files, so
324 running the external diff program will actually be pretty fast (at least
324 running the external diff program will actually be pretty fast (at least
325 faster than having to compare the entire tree).
325 faster than having to compare the entire tree).
326
326
327 list of commands:
327 list of commands:
328
328
329 extdiff use external program to diff repository (or selected files)
329 extdiff use external program to diff repository (or selected files)
330
330
331 use "hg -v help extdiff" to show builtin aliases and global options
331 use "hg -v help extdiff" to show builtin aliases and global options
332
332
333 $ echo 'extdiff = !' >> $HGRCPATH
333 $ echo 'extdiff = !' >> $HGRCPATH
334
334
335 Test help topic with same name as extension
335 Test help topic with same name as extension
336
336
337 $ cat > multirevs.py <<EOF
337 $ cat > multirevs.py <<EOF
338 > from mercurial import commands
338 > from mercurial import commands
339 > """multirevs extension
339 > """multirevs extension
340 > Big multi-line module docstring."""
340 > Big multi-line module docstring."""
341 > def multirevs(ui, repo, arg, *args, **opts):
341 > def multirevs(ui, repo, arg, *args, **opts):
342 > """multirevs command"""
342 > """multirevs command"""
343 > pass
343 > pass
344 > cmdtable = {
344 > cmdtable = {
345 > "multirevs": (multirevs, [], 'ARG')
345 > "multirevs": (multirevs, [], 'ARG')
346 > }
346 > }
347 > commands.norepo += ' multirevs'
347 > commands.norepo += ' multirevs'
348 > EOF
348 > EOF
349 $ echo "multirevs = multirevs.py" >> $HGRCPATH
349 $ echo "multirevs = multirevs.py" >> $HGRCPATH
350
350
351 $ hg help multirevs
351 $ hg help multirevs
352 Specifying Multiple Revisions
352 Specifying Multiple Revisions
353
353
354 When Mercurial accepts more than one revision, they may be specified
354 When Mercurial accepts more than one revision, they may be specified
355 individually, or provided as a topologically continuous range, separated
355 individually, or provided as a topologically continuous range, separated
356 by the ":" character.
356 by the ":" character.
357
357
358 The syntax of range notation is [BEGIN]:[END], where BEGIN and END are
358 The syntax of range notation is [BEGIN]:[END], where BEGIN and END are
359 revision identifiers. Both BEGIN and END are optional. If BEGIN is not
359 revision identifiers. Both BEGIN and END are optional. If BEGIN is not
360 specified, it defaults to revision number 0. If END is not specified, it
360 specified, it defaults to revision number 0. If END is not specified, it
361 defaults to the tip. The range ":" thus means "all revisions".
361 defaults to the tip. The range ":" thus means "all revisions".
362
362
363 If BEGIN is greater than END, revisions are treated in reverse order.
363 If BEGIN is greater than END, revisions are treated in reverse order.
364
364
365 A range acts as a closed interval. This means that a range of 3:5 gives 3,
365 A range acts as a closed interval. This means that a range of 3:5 gives 3,
366 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.
366 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.
367
367
368 use "hg help -c multirevs" to see help for the multirevs command
368 use "hg help -c multirevs" to see help for the multirevs command
369
369
370 $ hg help -c multirevs
370 $ hg help -c multirevs
371 hg multirevs ARG
371 hg multirevs ARG
372
372
373 multirevs command
373 multirevs command
374
374
375 use "hg -v help multirevs" to show more info
375 use "hg -v help multirevs" to show the global options
376
376
377 $ hg multirevs
377 $ hg multirevs
378 hg multirevs: invalid arguments
378 hg multirevs: invalid arguments
379 hg multirevs ARG
379 hg multirevs ARG
380
380
381 multirevs command
381 multirevs command
382
382
383 use "hg help multirevs" to show the full help text
383 use "hg help multirevs" to show the full help text
384 [255]
384 [255]
385
385
386 $ echo "multirevs = !" >> $HGRCPATH
386 $ echo "multirevs = !" >> $HGRCPATH
387
387
388 Issue811: Problem loading extensions twice (by site and by user)
388 Issue811: Problem loading extensions twice (by site and by user)
389
389
390 $ debugpath=`pwd`/debugissue811.py
390 $ debugpath=`pwd`/debugissue811.py
391 $ cat > debugissue811.py <<EOF
391 $ cat > debugissue811.py <<EOF
392 > '''show all loaded extensions
392 > '''show all loaded extensions
393 > '''
393 > '''
394 > from mercurial import extensions, commands
394 > from mercurial import extensions, commands
395 >
395 >
396 > def debugextensions(ui):
396 > def debugextensions(ui):
397 > "yet another debug command"
397 > "yet another debug command"
398 > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()]))
398 > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()]))
399 >
399 >
400 > cmdtable = {"debugextensions": (debugextensions, (), "hg debugextensions")}
400 > cmdtable = {"debugextensions": (debugextensions, (), "hg debugextensions")}
401 > commands.norepo += " debugextensions"
401 > commands.norepo += " debugextensions"
402 > EOF
402 > EOF
403 $ echo "debugissue811 = $debugpath" >> $HGRCPATH
403 $ echo "debugissue811 = $debugpath" >> $HGRCPATH
404 $ echo "mq=" >> $HGRCPATH
404 $ echo "mq=" >> $HGRCPATH
405 $ echo "hgext.mq=" >> $HGRCPATH
405 $ echo "hgext.mq=" >> $HGRCPATH
406 $ echo "hgext/mq=" >> $HGRCPATH
406 $ echo "hgext/mq=" >> $HGRCPATH
407
407
408 Show extensions:
408 Show extensions:
409
409
410 $ hg debugextensions
410 $ hg debugextensions
411 debugissue811
411 debugissue811
412 mq
412 mq
413
413
414 Disabled extension commands:
414 Disabled extension commands:
415
415
416 $ HGRCPATH=
416 $ HGRCPATH=
417 $ export HGRCPATH
417 $ export HGRCPATH
418 $ hg help email
418 $ hg help email
419 'email' is provided by the following extension:
419 'email' is provided by the following extension:
420
420
421 patchbomb command to send changesets as (a series of) patch emails
421 patchbomb command to send changesets as (a series of) patch emails
422
422
423 use "hg help extensions" for information on enabling extensions
423 use "hg help extensions" for information on enabling extensions
424 $ hg qdel
424 $ hg qdel
425 hg: unknown command 'qdel'
425 hg: unknown command 'qdel'
426 'qdelete' is provided by the following extension:
426 'qdelete' is provided by the following extension:
427
427
428 mq manage a stack of patches
428 mq manage a stack of patches
429
429
430 use "hg help extensions" for information on enabling extensions
430 use "hg help extensions" for information on enabling extensions
431 [255]
431 [255]
432 $ hg churn
432 $ hg churn
433 hg: unknown command 'churn'
433 hg: unknown command 'churn'
434 'churn' is provided by the following extension:
434 'churn' is provided by the following extension:
435
435
436 churn command to display statistics about repository history
436 churn command to display statistics about repository history
437
437
438 use "hg help extensions" for information on enabling extensions
438 use "hg help extensions" for information on enabling extensions
439 [255]
439 [255]
440
440
441 Disabled extensions:
441 Disabled extensions:
442
442
443 $ hg help churn
443 $ hg help churn
444 churn extension - command to display statistics about repository history
444 churn extension - command to display statistics about repository history
445
445
446 use "hg help extensions" for information on enabling extensions
446 use "hg help extensions" for information on enabling extensions
447 $ hg help patchbomb
447 $ hg help patchbomb
448 patchbomb extension - command to send changesets as (a series of) patch emails
448 patchbomb extension - command to send changesets as (a series of) patch emails
449
449
450 use "hg help extensions" for information on enabling extensions
450 use "hg help extensions" for information on enabling extensions
451
451
452 Broken disabled extension and command:
452 Broken disabled extension and command:
453
453
454 $ mkdir hgext
454 $ mkdir hgext
455 $ echo > hgext/__init__.py
455 $ echo > hgext/__init__.py
456 $ cat > hgext/broken.py <<EOF
456 $ cat > hgext/broken.py <<EOF
457 > "broken extension'
457 > "broken extension'
458 > EOF
458 > EOF
459 $ cat > path.py <<EOF
459 $ cat > path.py <<EOF
460 > import os, sys
460 > import os, sys
461 > sys.path.insert(0, os.environ['HGEXTPATH'])
461 > sys.path.insert(0, os.environ['HGEXTPATH'])
462 > EOF
462 > EOF
463 $ HGEXTPATH=`pwd`
463 $ HGEXTPATH=`pwd`
464 $ export HGEXTPATH
464 $ export HGEXTPATH
465
465
466 $ hg --config extensions.path=./path.py help broken
466 $ hg --config extensions.path=./path.py help broken
467 broken extension - (no help text available)
467 broken extension - (no help text available)
468
468
469 use "hg help extensions" for information on enabling extensions
469 use "hg help extensions" for information on enabling extensions
470
470
471 $ cat > hgext/forest.py <<EOF
471 $ cat > hgext/forest.py <<EOF
472 > cmdtable = None
472 > cmdtable = None
473 > EOF
473 > EOF
474 $ hg --config extensions.path=./path.py help foo > /dev/null
474 $ hg --config extensions.path=./path.py help foo > /dev/null
475 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
475 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
476 hg: unknown command 'foo'
476 hg: unknown command 'foo'
477 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
477 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
478 [255]
478 [255]
479
479
480 $ cat > throw.py <<EOF
480 $ cat > throw.py <<EOF
481 > from mercurial import cmdutil, commands
481 > from mercurial import cmdutil, commands
482 > cmdtable = {}
482 > cmdtable = {}
483 > command = cmdutil.command(cmdtable)
483 > command = cmdutil.command(cmdtable)
484 > class Bogon(Exception): pass
484 > class Bogon(Exception): pass
485 >
485 >
486 > @command('throw', [], 'hg throw')
486 > @command('throw', [], 'hg throw')
487 > def throw(ui, **opts):
487 > def throw(ui, **opts):
488 > """throws an exception"""
488 > """throws an exception"""
489 > raise Bogon()
489 > raise Bogon()
490 > commands.norepo += " throw"
490 > commands.norepo += " throw"
491 > EOF
491 > EOF
492 No declared supported version, extension complains:
492 No declared supported version, extension complains:
493 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
493 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
494 ** Unknown exception encountered with possibly-broken third-party extension throw
494 ** Unknown exception encountered with possibly-broken third-party extension throw
495 ** which supports versions unknown of Mercurial.
495 ** which supports versions unknown of Mercurial.
496 ** Please disable throw and try your action again.
496 ** Please disable throw and try your action again.
497 ** If that fixes the bug please report it to the extension author.
497 ** If that fixes the bug please report it to the extension author.
498 ** Python * (glob)
498 ** Python * (glob)
499 ** Mercurial Distributed SCM * (glob)
499 ** Mercurial Distributed SCM * (glob)
500 ** Extensions loaded: throw
500 ** Extensions loaded: throw
501 If the extension specifies a buglink, show that:
501 If the extension specifies a buglink, show that:
502 $ echo 'buglink = "http://example.com/bts"' >> throw.py
502 $ echo 'buglink = "http://example.com/bts"' >> throw.py
503 $ rm -f throw.pyc throw.pyo
503 $ rm -f throw.pyc throw.pyo
504 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
504 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
505 ** Unknown exception encountered with possibly-broken third-party extension throw
505 ** Unknown exception encountered with possibly-broken third-party extension throw
506 ** which supports versions unknown of Mercurial.
506 ** which supports versions unknown of Mercurial.
507 ** Please disable throw and try your action again.
507 ** Please disable throw and try your action again.
508 ** If that fixes the bug please report it to http://example.com/bts
508 ** If that fixes the bug please report it to http://example.com/bts
509 ** Python * (glob)
509 ** Python * (glob)
510 ** Mercurial Distributed SCM (*) (glob)
510 ** Mercurial Distributed SCM (*) (glob)
511 ** Extensions loaded: throw
511 ** Extensions loaded: throw
512 If the extensions declare outdated versions, accuse the older extension first:
512 If the extensions declare outdated versions, accuse the older extension first:
513 $ echo "from mercurial import util" >> older.py
513 $ echo "from mercurial import util" >> older.py
514 $ echo "util.version = lambda:'2.2'" >> older.py
514 $ echo "util.version = lambda:'2.2'" >> older.py
515 $ echo "testedwith = '1.9.3'" >> older.py
515 $ echo "testedwith = '1.9.3'" >> older.py
516 $ echo "testedwith = '2.1.1'" >> throw.py
516 $ echo "testedwith = '2.1.1'" >> throw.py
517 $ rm -f throw.pyc throw.pyo
517 $ rm -f throw.pyc throw.pyo
518 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
518 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
519 > throw 2>&1 | egrep '^\*\*'
519 > throw 2>&1 | egrep '^\*\*'
520 ** Unknown exception encountered with possibly-broken third-party extension older
520 ** Unknown exception encountered with possibly-broken third-party extension older
521 ** which supports versions 1.9.3 of Mercurial.
521 ** which supports versions 1.9.3 of Mercurial.
522 ** Please disable older and try your action again.
522 ** Please disable older and try your action again.
523 ** If that fixes the bug please report it to the extension author.
523 ** If that fixes the bug please report it to the extension author.
524 ** Python * (glob)
524 ** Python * (glob)
525 ** Mercurial Distributed SCM (version 2.2)
525 ** Mercurial Distributed SCM (version 2.2)
526 ** Extensions loaded: throw, older
526 ** Extensions loaded: throw, older
527 One extension only tested with older, one only with newer versions:
527 One extension only tested with older, one only with newer versions:
528 $ echo "util.version = lambda:'2.1.0'" >> older.py
528 $ echo "util.version = lambda:'2.1.0'" >> older.py
529 $ rm -f older.pyc older.pyo
529 $ rm -f older.pyc older.pyo
530 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
530 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
531 > throw 2>&1 | egrep '^\*\*'
531 > throw 2>&1 | egrep '^\*\*'
532 ** Unknown exception encountered with possibly-broken third-party extension older
532 ** Unknown exception encountered with possibly-broken third-party extension older
533 ** which supports versions 1.9.3 of Mercurial.
533 ** which supports versions 1.9.3 of Mercurial.
534 ** Please disable older and try your action again.
534 ** Please disable older and try your action again.
535 ** If that fixes the bug please report it to the extension author.
535 ** If that fixes the bug please report it to the extension author.
536 ** Python * (glob)
536 ** Python * (glob)
537 ** Mercurial Distributed SCM (version 2.1.0)
537 ** Mercurial Distributed SCM (version 2.1.0)
538 ** Extensions loaded: throw, older
538 ** Extensions loaded: throw, older
539 Older extension is tested with current version, the other only with newer:
539 Older extension is tested with current version, the other only with newer:
540 $ echo "util.version = lambda:'1.9.3'" >> older.py
540 $ echo "util.version = lambda:'1.9.3'" >> older.py
541 $ rm -f older.pyc older.pyo
541 $ rm -f older.pyc older.pyo
542 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
542 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
543 > throw 2>&1 | egrep '^\*\*'
543 > throw 2>&1 | egrep '^\*\*'
544 ** Unknown exception encountered with possibly-broken third-party extension throw
544 ** Unknown exception encountered with possibly-broken third-party extension throw
545 ** which supports versions 2.1.1 of Mercurial.
545 ** which supports versions 2.1.1 of Mercurial.
546 ** Please disable throw and try your action again.
546 ** Please disable throw and try your action again.
547 ** If that fixes the bug please report it to http://example.com/bts
547 ** If that fixes the bug please report it to http://example.com/bts
548 ** Python * (glob)
548 ** Python * (glob)
549 ** Mercurial Distributed SCM (version 1.9.3)
549 ** Mercurial Distributed SCM (version 1.9.3)
550 ** Extensions loaded: throw, older
550 ** Extensions loaded: throw, older
551
551
552 Declare the version as supporting this hg version, show regular bts link:
552 Declare the version as supporting this hg version, show regular bts link:
553 $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'`
553 $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'`
554 $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
554 $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
555 $ rm -f throw.pyc throw.pyo
555 $ rm -f throw.pyc throw.pyo
556 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
556 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
557 ** unknown exception encountered, please report by visiting
557 ** unknown exception encountered, please report by visiting
558 ** http://mercurial.selenic.com/wiki/BugTracker
558 ** http://mercurial.selenic.com/wiki/BugTracker
559 ** Python * (glob)
559 ** Python * (glob)
560 ** Mercurial Distributed SCM (*) (glob)
560 ** Mercurial Distributed SCM (*) (glob)
561 ** Extensions loaded: throw
561 ** Extensions loaded: throw
@@ -1,811 +1,880 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 phase set or show the current phase name
18 phase set or show the current phase name
19 pull pull changes from the specified source
19 pull pull changes from the specified source
20 push push changes to the specified destination
20 push push changes to the specified destination
21 remove remove the specified files on the next commit
21 remove remove the specified files on the next commit
22 serve start stand-alone webserver
22 serve start stand-alone webserver
23 status show changed files in the working directory
23 status show changed files in the working directory
24 summary summarize working directory state
24 summary summarize working directory state
25 update update working directory (or switch revisions)
25 update update working directory (or switch revisions)
26
26
27 use "hg help" for the full list of commands or "hg -v" for details
27 use "hg help" for the full list of commands or "hg -v" for details
28
28
29 $ hg -q
29 $ hg -q
30 add add the specified files on the next commit
30 add add the specified files on the next commit
31 annotate show changeset information by line for each file
31 annotate show changeset information by line for each file
32 clone make a copy of an existing repository
32 clone make a copy of an existing repository
33 commit commit the specified files or all outstanding changes
33 commit commit the specified files or all outstanding changes
34 diff diff repository (or selected files)
34 diff diff repository (or selected files)
35 export dump the header and diffs for one or more changesets
35 export dump the header and diffs for one or more changesets
36 forget forget the specified files on the next commit
36 forget forget the specified files on the next commit
37 init create a new repository in the given directory
37 init create a new repository in the given directory
38 log show revision history of entire repository or files
38 log show revision history of entire repository or files
39 merge merge working directory with another revision
39 merge merge working directory with another revision
40 phase set or show the current phase name
40 phase set or show the current phase name
41 pull pull changes from the specified source
41 pull pull changes from the specified source
42 push push changes to the specified destination
42 push push changes to the specified destination
43 remove remove the specified files on the next commit
43 remove remove the specified files on the next commit
44 serve start stand-alone webserver
44 serve start stand-alone webserver
45 status show changed files in the working directory
45 status show changed files in the working directory
46 summary summarize working directory state
46 summary summarize working directory state
47 update update working directory (or switch revisions)
47 update update working directory (or switch revisions)
48
48
49 $ hg help
49 $ hg help
50 Mercurial Distributed SCM
50 Mercurial Distributed SCM
51
51
52 list of commands:
52 list of commands:
53
53
54 add add the specified files on the next commit
54 add add the specified files on the next commit
55 addremove add all new files, delete all missing files
55 addremove add all new files, delete all missing files
56 annotate show changeset information by line for each file
56 annotate show changeset information by line for each file
57 archive create an unversioned archive of a repository revision
57 archive create an unversioned archive of a repository revision
58 backout reverse effect of earlier changeset
58 backout reverse effect of earlier changeset
59 bisect subdivision search of changesets
59 bisect subdivision search of changesets
60 bookmarks track a line of development with movable markers
60 bookmarks track a line of development with movable markers
61 branch set or show the current branch name
61 branch set or show the current branch name
62 branches list repository named branches
62 branches list repository named branches
63 bundle create a changegroup file
63 bundle create a changegroup file
64 cat output the current or given revision of files
64 cat output the current or given revision of files
65 clone make a copy of an existing repository
65 clone make a copy of an existing repository
66 commit commit the specified files or all outstanding changes
66 commit commit the specified files or all outstanding changes
67 copy mark files as copied for the next commit
67 copy mark files as copied for the next commit
68 diff diff repository (or selected files)
68 diff diff repository (or selected files)
69 export dump the header and diffs for one or more changesets
69 export dump the header and diffs for one or more changesets
70 forget forget the specified files on the next commit
70 forget forget the specified files on the next commit
71 graft copy changes from other branches onto the current branch
71 graft copy changes from other branches onto the current branch
72 grep search for a pattern in specified files and revisions
72 grep search for a pattern in specified files and revisions
73 heads show current repository heads or show branch heads
73 heads show current repository heads or show branch heads
74 help show help for a given topic or a help overview
74 help show help for a given topic or a help overview
75 identify identify the working copy or specified revision
75 identify identify the working copy or specified revision
76 import import an ordered set of patches
76 import import an ordered set of patches
77 incoming show new changesets found in source
77 incoming show new changesets found in source
78 init create a new repository in the given directory
78 init create a new repository in the given directory
79 locate locate files matching specific patterns
79 locate locate files matching specific patterns
80 log show revision history of entire repository or files
80 log show revision history of entire repository or files
81 manifest output the current or given revision of the project manifest
81 manifest output the current or given revision of the project manifest
82 merge merge working directory with another revision
82 merge merge working directory with another revision
83 outgoing show changesets not found in the destination
83 outgoing show changesets not found in the destination
84 parents show the parents of the working directory or revision
84 parents show the parents of the working directory or revision
85 paths show aliases for remote repositories
85 paths show aliases for remote repositories
86 phase set or show the current phase name
86 phase set or show the current phase name
87 pull pull changes from the specified source
87 pull pull changes from the specified source
88 push push changes to the specified destination
88 push push changes to the specified destination
89 recover roll back an interrupted transaction
89 recover roll back an interrupted transaction
90 remove remove the specified files on the next commit
90 remove remove the specified files on the next commit
91 rename rename files; equivalent of copy + remove
91 rename rename files; equivalent of copy + remove
92 resolve redo merges or set/view the merge status of files
92 resolve redo merges or set/view the merge status of files
93 revert restore files to their checkout state
93 revert restore files to their checkout state
94 rollback roll back the last transaction (dangerous)
94 rollback roll back the last transaction (dangerous)
95 root print the root (top) of the current working directory
95 root print the root (top) of the current working directory
96 serve start stand-alone webserver
96 serve start stand-alone webserver
97 showconfig show combined config settings from all hgrc files
97 showconfig show combined config settings from all hgrc files
98 status show changed files in the working directory
98 status show changed files in the working directory
99 summary summarize working directory state
99 summary summarize working directory state
100 tag add one or more tags for the current or given revision
100 tag add one or more tags for the current or given revision
101 tags list repository tags
101 tags list repository tags
102 tip show the tip revision
102 tip show the tip revision
103 unbundle apply one or more changegroup files
103 unbundle apply one or more changegroup files
104 update update working directory (or switch revisions)
104 update update working directory (or switch revisions)
105 verify verify the integrity of the repository
105 verify verify the integrity of the repository
106 version output version and copyright information
106 version output version and copyright information
107
107
108 additional help topics:
108 additional help topics:
109
109
110 config Configuration Files
110 config Configuration Files
111 dates Date Formats
111 dates Date Formats
112 diffs Diff Formats
112 diffs Diff Formats
113 environment Environment Variables
113 environment Environment Variables
114 extensions Using Additional Features
114 extensions Using Additional Features
115 filesets Specifying File Sets
115 filesets Specifying File Sets
116 glossary Glossary
116 glossary Glossary
117 hgignore Syntax for Mercurial Ignore Files
117 hgignore Syntax for Mercurial Ignore Files
118 hgweb Configuring hgweb
118 hgweb Configuring hgweb
119 merge-tools Merge Tools
119 merge-tools Merge Tools
120 multirevs Specifying Multiple Revisions
120 multirevs Specifying Multiple Revisions
121 patterns File Name Patterns
121 patterns File Name Patterns
122 phases Working with Phases
122 phases Working with Phases
123 revisions Specifying Single Revisions
123 revisions Specifying Single Revisions
124 revsets Specifying Revision Sets
124 revsets Specifying Revision Sets
125 subrepos Subrepositories
125 subrepos Subrepositories
126 templating Template Usage
126 templating Template Usage
127 urls URL Paths
127 urls URL Paths
128
128
129 use "hg -v help" to show builtin aliases and global options
129 use "hg -v help" to show builtin aliases and global options
130
130
131 $ hg -q help
131 $ hg -q help
132 add add the specified files on the next commit
132 add add the specified files on the next commit
133 addremove add all new files, delete all missing files
133 addremove add all new files, delete all missing files
134 annotate show changeset information by line for each file
134 annotate show changeset information by line for each file
135 archive create an unversioned archive of a repository revision
135 archive create an unversioned archive of a repository revision
136 backout reverse effect of earlier changeset
136 backout reverse effect of earlier changeset
137 bisect subdivision search of changesets
137 bisect subdivision search of changesets
138 bookmarks track a line of development with movable markers
138 bookmarks track a line of development with movable markers
139 branch set or show the current branch name
139 branch set or show the current branch name
140 branches list repository named branches
140 branches list repository named branches
141 bundle create a changegroup file
141 bundle create a changegroup file
142 cat output the current or given revision of files
142 cat output the current or given revision of files
143 clone make a copy of an existing repository
143 clone make a copy of an existing repository
144 commit commit the specified files or all outstanding changes
144 commit commit the specified files or all outstanding changes
145 copy mark files as copied for the next commit
145 copy mark files as copied for the next commit
146 diff diff repository (or selected files)
146 diff diff repository (or selected files)
147 export dump the header and diffs for one or more changesets
147 export dump the header and diffs for one or more changesets
148 forget forget the specified files on the next commit
148 forget forget the specified files on the next commit
149 graft copy changes from other branches onto the current branch
149 graft copy changes from other branches onto the current branch
150 grep search for a pattern in specified files and revisions
150 grep search for a pattern in specified files and revisions
151 heads show current repository heads or show branch heads
151 heads show current repository heads or show branch heads
152 help show help for a given topic or a help overview
152 help show help for a given topic or a help overview
153 identify identify the working copy or specified revision
153 identify identify the working copy or specified revision
154 import import an ordered set of patches
154 import import an ordered set of patches
155 incoming show new changesets found in source
155 incoming show new changesets found in source
156 init create a new repository in the given directory
156 init create a new repository in the given directory
157 locate locate files matching specific patterns
157 locate locate files matching specific patterns
158 log show revision history of entire repository or files
158 log show revision history of entire repository or files
159 manifest output the current or given revision of the project manifest
159 manifest output the current or given revision of the project manifest
160 merge merge working directory with another revision
160 merge merge working directory with another revision
161 outgoing show changesets not found in the destination
161 outgoing show changesets not found in the destination
162 parents show the parents of the working directory or revision
162 parents show the parents of the working directory or revision
163 paths show aliases for remote repositories
163 paths show aliases for remote repositories
164 phase set or show the current phase name
164 phase set or show the current phase name
165 pull pull changes from the specified source
165 pull pull changes from the specified source
166 push push changes to the specified destination
166 push push changes to the specified destination
167 recover roll back an interrupted transaction
167 recover roll back an interrupted transaction
168 remove remove the specified files on the next commit
168 remove remove the specified files on the next commit
169 rename rename files; equivalent of copy + remove
169 rename rename files; equivalent of copy + remove
170 resolve redo merges or set/view the merge status of files
170 resolve redo merges or set/view the merge status of files
171 revert restore files to their checkout state
171 revert restore files to their checkout state
172 rollback roll back the last transaction (dangerous)
172 rollback roll back the last transaction (dangerous)
173 root print the root (top) of the current working directory
173 root print the root (top) of the current working directory
174 serve start stand-alone webserver
174 serve start stand-alone webserver
175 showconfig show combined config settings from all hgrc files
175 showconfig show combined config settings from all hgrc files
176 status show changed files in the working directory
176 status show changed files in the working directory
177 summary summarize working directory state
177 summary summarize working directory state
178 tag add one or more tags for the current or given revision
178 tag add one or more tags for the current or given revision
179 tags list repository tags
179 tags list repository tags
180 tip show the tip revision
180 tip show the tip revision
181 unbundle apply one or more changegroup files
181 unbundle apply one or more changegroup files
182 update update working directory (or switch revisions)
182 update update working directory (or switch revisions)
183 verify verify the integrity of the repository
183 verify verify the integrity of the repository
184 version output version and copyright information
184 version output version and copyright information
185
185
186 additional help topics:
186 additional help topics:
187
187
188 config Configuration Files
188 config Configuration Files
189 dates Date Formats
189 dates Date Formats
190 diffs Diff Formats
190 diffs Diff Formats
191 environment Environment Variables
191 environment Environment Variables
192 extensions Using Additional Features
192 extensions Using Additional Features
193 filesets Specifying File Sets
193 filesets Specifying File Sets
194 glossary Glossary
194 glossary Glossary
195 hgignore Syntax for Mercurial Ignore Files
195 hgignore Syntax for Mercurial Ignore Files
196 hgweb Configuring hgweb
196 hgweb Configuring hgweb
197 merge-tools Merge Tools
197 merge-tools Merge Tools
198 multirevs Specifying Multiple Revisions
198 multirevs Specifying Multiple Revisions
199 patterns File Name Patterns
199 patterns File Name Patterns
200 phases Working with Phases
200 phases Working with Phases
201 revisions Specifying Single Revisions
201 revisions Specifying Single Revisions
202 revsets Specifying Revision Sets
202 revsets Specifying Revision Sets
203 subrepos Subrepositories
203 subrepos Subrepositories
204 templating Template Usage
204 templating Template Usage
205 urls URL Paths
205 urls URL Paths
206
206
207 Test short command list with verbose option
207 Test short command list with verbose option
208
208
209 $ hg -v help shortlist
209 $ hg -v help shortlist
210 Mercurial Distributed SCM
210 Mercurial Distributed SCM
211
211
212 basic commands:
212 basic commands:
213
213
214 add add the specified files on the next commit
214 add add the specified files on the next commit
215 annotate, blame
215 annotate, blame
216 show changeset information by line for each file
216 show changeset information by line for each file
217 clone make a copy of an existing repository
217 clone make a copy of an existing repository
218 commit, ci commit the specified files or all outstanding changes
218 commit, ci commit the specified files or all outstanding changes
219 diff diff repository (or selected files)
219 diff diff repository (or selected files)
220 export dump the header and diffs for one or more changesets
220 export dump the header and diffs for one or more changesets
221 forget forget the specified files on the next commit
221 forget forget the specified files on the next commit
222 init create a new repository in the given directory
222 init create a new repository in the given directory
223 log, history show revision history of entire repository or files
223 log, history show revision history of entire repository or files
224 merge merge working directory with another revision
224 merge merge working directory with another revision
225 phase set or show the current phase name
225 phase set or show the current phase name
226 pull pull changes from the specified source
226 pull pull changes from the specified source
227 push push changes to the specified destination
227 push push changes to the specified destination
228 remove, rm remove the specified files on the next commit
228 remove, rm remove the specified files on the next commit
229 serve start stand-alone webserver
229 serve start stand-alone webserver
230 status, st show changed files in the working directory
230 status, st show changed files in the working directory
231 summary, sum summarize working directory state
231 summary, sum summarize working directory state
232 update, up, checkout, co
232 update, up, checkout, co
233 update working directory (or switch revisions)
233 update working directory (or switch revisions)
234
234
235 global options:
235 global options:
236
236
237 -R --repository REPO repository root directory or name of overlay bundle
237 -R --repository REPO repository root directory or name of overlay bundle
238 file
238 file
239 --cwd DIR change working directory
239 --cwd DIR change working directory
240 -y --noninteractive do not prompt, automatically pick the first choice for
240 -y --noninteractive do not prompt, automatically pick the first choice for
241 all prompts
241 all prompts
242 -q --quiet suppress output
242 -q --quiet suppress output
243 -v --verbose enable additional output
243 -v --verbose enable additional output
244 --config CONFIG [+] set/override config option (use 'section.name=value')
244 --config CONFIG [+] set/override config option (use 'section.name=value')
245 --debug enable debugging output
245 --debug enable debugging output
246 --debugger start debugger
246 --debugger start debugger
247 --encoding ENCODE set the charset encoding (default: ascii)
247 --encoding ENCODE set the charset encoding (default: ascii)
248 --encodingmode MODE set the charset encoding mode (default: strict)
248 --encodingmode MODE set the charset encoding mode (default: strict)
249 --traceback always print a traceback on exception
249 --traceback always print a traceback on exception
250 --time time how long the command takes
250 --time time how long the command takes
251 --profile print command execution profile
251 --profile print command execution profile
252 --version output version information and exit
252 --version output version information and exit
253 -h --help display help and exit
253 -h --help display help and exit
254
254
255 [+] marked option can be specified multiple times
255 [+] marked option can be specified multiple times
256
256
257 use "hg help" for the full list of commands
257 use "hg help" for the full list of commands
258
258
259 $ hg add -h
259 $ hg add -h
260 hg add [OPTION]... [FILE]...
260 hg add [OPTION]... [FILE]...
261
261
262 add the specified files on the next commit
262 add the specified files on the next commit
263
263
264 Schedule files to be version controlled and added to the repository.
264 Schedule files to be version controlled and added to the repository.
265
265
266 The files will be added to the repository at the next commit. To undo an
266 The files will be added to the repository at the next commit. To undo an
267 add before that, see "hg forget".
267 add before that, see "hg forget".
268
268
269 If no names are given, add all files to the repository.
269 If no names are given, add all files to the repository.
270
270
271 Returns 0 if all files are successfully added.
271 Returns 0 if all files are successfully added.
272
272
273 options:
273 options:
274
274
275 -I --include PATTERN [+] include names matching the given patterns
275 -I --include PATTERN [+] include names matching the given patterns
276 -X --exclude PATTERN [+] exclude names matching the given patterns
276 -X --exclude PATTERN [+] exclude names matching the given patterns
277 -S --subrepos recurse into subrepositories
277 -S --subrepos recurse into subrepositories
278 -n --dry-run do not perform actions, just print output
278 -n --dry-run do not perform actions, just print output
279
279
280 [+] marked option can be specified multiple times
280 [+] marked option can be specified multiple times
281
281
282 use "hg -v help add" to show more info
282 use "hg -v help add" to show more complete help and the global options
283
283
284 Verbose help for add
284 Verbose help for add
285
285
286 $ hg add -hv
286 $ hg add -hv
287 hg add [OPTION]... [FILE]...
287 hg add [OPTION]... [FILE]...
288
288
289 add the specified files on the next commit
289 add the specified files on the next commit
290
290
291 Schedule files to be version controlled and added to the repository.
291 Schedule files to be version controlled and added to the repository.
292
292
293 The files will be added to the repository at the next commit. To undo an
293 The files will be added to the repository at the next commit. To undo an
294 add before that, see "hg forget".
294 add before that, see "hg forget".
295
295
296 If no names are given, add all files to the repository.
296 If no names are given, add all files to the repository.
297
297
298 An example showing how new (unknown) files are added automatically by "hg
298 An example showing how new (unknown) files are added automatically by "hg
299 add":
299 add":
300
300
301 $ ls
301 $ ls
302 foo.c
302 foo.c
303 $ hg status
303 $ hg status
304 ? foo.c
304 ? foo.c
305 $ hg add
305 $ hg add
306 adding foo.c
306 adding foo.c
307 $ hg status
307 $ hg status
308 A foo.c
308 A foo.c
309
309
310 Returns 0 if all files are successfully added.
310 Returns 0 if all files are successfully added.
311
311
312 options:
312 options:
313
313
314 -I --include PATTERN [+] include names matching the given patterns
314 -I --include PATTERN [+] include names matching the given patterns
315 -X --exclude PATTERN [+] exclude names matching the given patterns
315 -X --exclude PATTERN [+] exclude names matching the given patterns
316 -S --subrepos recurse into subrepositories
316 -S --subrepos recurse into subrepositories
317 -n --dry-run do not perform actions, just print output
317 -n --dry-run do not perform actions, just print output
318
318
319 [+] marked option can be specified multiple times
319 [+] marked option can be specified multiple times
320
320
321 global options:
321 global options:
322
322
323 -R --repository REPO repository root directory or name of overlay bundle
323 -R --repository REPO repository root directory or name of overlay bundle
324 file
324 file
325 --cwd DIR change working directory
325 --cwd DIR change working directory
326 -y --noninteractive do not prompt, automatically pick the first choice for
326 -y --noninteractive do not prompt, automatically pick the first choice for
327 all prompts
327 all prompts
328 -q --quiet suppress output
328 -q --quiet suppress output
329 -v --verbose enable additional output
329 -v --verbose enable additional output
330 --config CONFIG [+] set/override config option (use 'section.name=value')
330 --config CONFIG [+] set/override config option (use 'section.name=value')
331 --debug enable debugging output
331 --debug enable debugging output
332 --debugger start debugger
332 --debugger start debugger
333 --encoding ENCODE set the charset encoding (default: ascii)
333 --encoding ENCODE set the charset encoding (default: ascii)
334 --encodingmode MODE set the charset encoding mode (default: strict)
334 --encodingmode MODE set the charset encoding mode (default: strict)
335 --traceback always print a traceback on exception
335 --traceback always print a traceback on exception
336 --time time how long the command takes
336 --time time how long the command takes
337 --profile print command execution profile
337 --profile print command execution profile
338 --version output version information and exit
338 --version output version information and exit
339 -h --help display help and exit
339 -h --help display help and exit
340
340
341 [+] marked option can be specified multiple times
341 [+] marked option can be specified multiple times
342
342
343 Test help option with version option
343 Test help option with version option
344
344
345 $ hg add -h --version
345 $ hg add -h --version
346 Mercurial Distributed SCM (version *) (glob)
346 Mercurial Distributed SCM (version *) (glob)
347 (see http://mercurial.selenic.com for more information)
347 (see http://mercurial.selenic.com for more information)
348
348
349 Copyright (C) 2005-2012 Matt Mackall and others
349 Copyright (C) 2005-2012 Matt Mackall and others
350 This is free software; see the source for copying conditions. There is NO
350 This is free software; see the source for copying conditions. There is NO
351 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
351 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
352
352
353 $ hg add --skjdfks
353 $ hg add --skjdfks
354 hg add: option --skjdfks not recognized
354 hg add: option --skjdfks not recognized
355 hg add [OPTION]... [FILE]...
355 hg add [OPTION]... [FILE]...
356
356
357 add the specified files on the next commit
357 add the specified files on the next commit
358
358
359 options:
359 options:
360
360
361 -I --include PATTERN [+] include names matching the given patterns
361 -I --include PATTERN [+] include names matching the given patterns
362 -X --exclude PATTERN [+] exclude names matching the given patterns
362 -X --exclude PATTERN [+] exclude names matching the given patterns
363 -S --subrepos recurse into subrepositories
363 -S --subrepos recurse into subrepositories
364 -n --dry-run do not perform actions, just print output
364 -n --dry-run do not perform actions, just print output
365
365
366 [+] marked option can be specified multiple times
366 [+] marked option can be specified multiple times
367
367
368 use "hg help add" to show the full help text
368 use "hg help add" to show the full help text
369 [255]
369 [255]
370
370
371 Test ambiguous command help
371 Test ambiguous command help
372
372
373 $ hg help ad
373 $ hg help ad
374 list of commands:
374 list of commands:
375
375
376 add add the specified files on the next commit
376 add add the specified files on the next commit
377 addremove add all new files, delete all missing files
377 addremove add all new files, delete all missing files
378
378
379 use "hg -v help ad" to show builtin aliases and global options
379 use "hg -v help ad" to show builtin aliases and global options
380
380
381 Test command without options
381 Test command without options
382
382
383 $ hg help verify
383 $ hg help verify
384 hg verify
384 hg verify
385
385
386 verify the integrity of the repository
386 verify the integrity of the repository
387
387
388 Verify the integrity of the current repository.
388 Verify the integrity of the current repository.
389
389
390 This will perform an extensive check of the repository's integrity,
390 This will perform an extensive check of the repository's integrity,
391 validating the hashes and checksums of each entry in the changelog,
391 validating the hashes and checksums of each entry in the changelog,
392 manifest, and tracked files, as well as the integrity of their crosslinks
392 manifest, and tracked files, as well as the integrity of their crosslinks
393 and indices.
393 and indices.
394
394
395 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
395 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
396 information about recovery from corruption of the repository.
396 information about recovery from corruption of the repository.
397
397
398 Returns 0 on success, 1 if errors are encountered.
398 Returns 0 on success, 1 if errors are encountered.
399
399
400 use "hg -v help verify" to show more info
400 use "hg -v help verify" to show the global options
401
401
402 $ hg help diff
402 $ hg help diff
403 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
403 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
404
404
405 diff repository (or selected files)
405 diff repository (or selected files)
406
406
407 Show differences between revisions for the specified files.
407 Show differences between revisions for the specified files.
408
408
409 Differences between files are shown using the unified diff format.
409 Differences between files are shown using the unified diff format.
410
410
411 Note:
411 Note:
412 diff may generate unexpected results for merges, as it will default to
412 diff may generate unexpected results for merges, as it will default to
413 comparing against the working directory's first parent changeset if no
413 comparing against the working directory's first parent changeset if no
414 revisions are specified.
414 revisions are specified.
415
415
416 When two revision arguments are given, then changes are shown between
416 When two revision arguments are given, then changes are shown between
417 those revisions. If only one revision is specified then that revision is
417 those revisions. If only one revision is specified then that revision is
418 compared to the working directory, and, when no revisions are specified,
418 compared to the working directory, and, when no revisions are specified,
419 the working directory files are compared to its parent.
419 the working directory files are compared to its parent.
420
420
421 Alternatively you can specify -c/--change with a revision to see the
421 Alternatively you can specify -c/--change with a revision to see the
422 changes in that changeset relative to its first parent.
422 changes in that changeset relative to its first parent.
423
423
424 Without the -a/--text option, diff will avoid generating diffs of files it
424 Without the -a/--text option, diff will avoid generating diffs of files it
425 detects as binary. With -a, diff will generate a diff anyway, probably
425 detects as binary. With -a, diff will generate a diff anyway, probably
426 with undesirable results.
426 with undesirable results.
427
427
428 Use the -g/--git option to generate diffs in the git extended diff format.
428 Use the -g/--git option to generate diffs in the git extended diff format.
429 For more information, read "hg help diffs".
429 For more information, read "hg help diffs".
430
430
431 Returns 0 on success.
431 Returns 0 on success.
432
432
433 options:
433 options:
434
434
435 -r --rev REV [+] revision
435 -r --rev REV [+] revision
436 -c --change REV change made by revision
436 -c --change REV change made by revision
437 -a --text treat all files as text
437 -a --text treat all files as text
438 -g --git use git extended diff format
438 -g --git use git extended diff format
439 --nodates omit dates from diff headers
439 --nodates omit dates from diff headers
440 -p --show-function show which function each change is in
440 -p --show-function show which function each change is in
441 --reverse produce a diff that undoes the changes
441 --reverse produce a diff that undoes the changes
442 -w --ignore-all-space ignore white space when comparing lines
442 -w --ignore-all-space ignore white space when comparing lines
443 -b --ignore-space-change ignore changes in the amount of white space
443 -b --ignore-space-change ignore changes in the amount of white space
444 -B --ignore-blank-lines ignore changes whose lines are all blank
444 -B --ignore-blank-lines ignore changes whose lines are all blank
445 -U --unified NUM number of lines of context to show
445 -U --unified NUM number of lines of context to show
446 --stat output diffstat-style summary of changes
446 --stat output diffstat-style summary of changes
447 -I --include PATTERN [+] include names matching the given patterns
447 -I --include PATTERN [+] include names matching the given patterns
448 -X --exclude PATTERN [+] exclude names matching the given patterns
448 -X --exclude PATTERN [+] exclude names matching the given patterns
449 -S --subrepos recurse into subrepositories
449 -S --subrepos recurse into subrepositories
450
450
451 [+] marked option can be specified multiple times
451 [+] marked option can be specified multiple times
452
452
453 use "hg -v help diff" to show more info
453 use "hg -v help diff" to show more complete help and the global options
454
454
455 $ hg help status
455 $ hg help status
456 hg status [OPTION]... [FILE]...
456 hg status [OPTION]... [FILE]...
457
457
458 aliases: st
458 aliases: st
459
459
460 show changed files in the working directory
460 show changed files in the working directory
461
461
462 Show status of files in the repository. If names are given, only files
462 Show status of files in the repository. If names are given, only files
463 that match are shown. Files that are clean or ignored or the source of a
463 that match are shown. Files that are clean or ignored or the source of a
464 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
464 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
465 -C/--copies or -A/--all are given. Unless options described with "show
465 -C/--copies or -A/--all are given. Unless options described with "show
466 only ..." are given, the options -mardu are used.
466 only ..." are given, the options -mardu are used.
467
467
468 Option -q/--quiet hides untracked (unknown and ignored) files unless
468 Option -q/--quiet hides untracked (unknown and ignored) files unless
469 explicitly requested with -u/--unknown or -i/--ignored.
469 explicitly requested with -u/--unknown or -i/--ignored.
470
470
471 Note:
471 Note:
472 status may appear to disagree with diff if permissions have changed or
472 status may appear to disagree with diff if permissions have changed or
473 a merge has occurred. The standard diff format does not report
473 a merge has occurred. The standard diff format does not report
474 permission changes and diff only reports changes relative to one merge
474 permission changes and diff only reports changes relative to one merge
475 parent.
475 parent.
476
476
477 If one revision is given, it is used as the base revision. If two
477 If one revision is given, it is used as the base revision. If two
478 revisions are given, the differences between them are shown. The --change
478 revisions are given, the differences between them are shown. The --change
479 option can also be used as a shortcut to list the changed files of a
479 option can also be used as a shortcut to list the changed files of a
480 revision from its first parent.
480 revision from its first parent.
481
481
482 The codes used to show the status of files are:
482 The codes used to show the status of files are:
483
483
484 M = modified
484 M = modified
485 A = added
485 A = added
486 R = removed
486 R = removed
487 C = clean
487 C = clean
488 ! = missing (deleted by non-hg command, but still tracked)
488 ! = missing (deleted by non-hg command, but still tracked)
489 ? = not tracked
489 ? = not tracked
490 I = ignored
490 I = ignored
491 = origin of the previous file listed as A (added)
491 = origin of the previous file listed as A (added)
492
492
493 Returns 0 on success.
493 Returns 0 on success.
494
494
495 options:
495 options:
496
496
497 -A --all show status of all files
497 -A --all show status of all files
498 -m --modified show only modified files
498 -m --modified show only modified files
499 -a --added show only added files
499 -a --added show only added files
500 -r --removed show only removed files
500 -r --removed show only removed files
501 -d --deleted show only deleted (but tracked) files
501 -d --deleted show only deleted (but tracked) files
502 -c --clean show only files without changes
502 -c --clean show only files without changes
503 -u --unknown show only unknown (not tracked) files
503 -u --unknown show only unknown (not tracked) files
504 -i --ignored show only ignored files
504 -i --ignored show only ignored files
505 -n --no-status hide status prefix
505 -n --no-status hide status prefix
506 -C --copies show source of copied files
506 -C --copies show source of copied files
507 -0 --print0 end filenames with NUL, for use with xargs
507 -0 --print0 end filenames with NUL, for use with xargs
508 --rev REV [+] show difference from revision
508 --rev REV [+] show difference from revision
509 --change REV list the changed files of a revision
509 --change REV list the changed files of a revision
510 -I --include PATTERN [+] include names matching the given patterns
510 -I --include PATTERN [+] include names matching the given patterns
511 -X --exclude PATTERN [+] exclude names matching the given patterns
511 -X --exclude PATTERN [+] exclude names matching the given patterns
512 -S --subrepos recurse into subrepositories
512 -S --subrepos recurse into subrepositories
513
513
514 [+] marked option can be specified multiple times
514 [+] marked option can be specified multiple times
515
515
516 use "hg -v help status" to show more info
516 use "hg -v help status" to show more complete help and the global options
517
517
518 $ hg -q help status
518 $ hg -q help status
519 hg status [OPTION]... [FILE]...
519 hg status [OPTION]... [FILE]...
520
520
521 show changed files in the working directory
521 show changed files in the working directory
522
522
523 $ hg help foo
523 $ hg help foo
524 hg: unknown command 'foo'
524 hg: unknown command 'foo'
525 Mercurial Distributed SCM
525 Mercurial Distributed SCM
526
526
527 basic commands:
527 basic commands:
528
528
529 add add the specified files on the next commit
529 add add the specified files on the next commit
530 annotate show changeset information by line for each file
530 annotate show changeset information by line for each file
531 clone make a copy of an existing repository
531 clone make a copy of an existing repository
532 commit commit the specified files or all outstanding changes
532 commit commit the specified files or all outstanding changes
533 diff diff repository (or selected files)
533 diff diff repository (or selected files)
534 export dump the header and diffs for one or more changesets
534 export dump the header and diffs for one or more changesets
535 forget forget the specified files on the next commit
535 forget forget the specified files on the next commit
536 init create a new repository in the given directory
536 init create a new repository in the given directory
537 log show revision history of entire repository or files
537 log show revision history of entire repository or files
538 merge merge working directory with another revision
538 merge merge working directory with another revision
539 phase set or show the current phase name
539 phase set or show the current phase name
540 pull pull changes from the specified source
540 pull pull changes from the specified source
541 push push changes to the specified destination
541 push push changes to the specified destination
542 remove remove the specified files on the next commit
542 remove remove the specified files on the next commit
543 serve start stand-alone webserver
543 serve start stand-alone webserver
544 status show changed files in the working directory
544 status show changed files in the working directory
545 summary summarize working directory state
545 summary summarize working directory state
546 update update working directory (or switch revisions)
546 update update working directory (or switch revisions)
547
547
548 use "hg help" for the full list of commands or "hg -v" for details
548 use "hg help" for the full list of commands or "hg -v" for details
549 [255]
549 [255]
550
550
551 $ hg skjdfks
551 $ hg skjdfks
552 hg: unknown command 'skjdfks'
552 hg: unknown command 'skjdfks'
553 Mercurial Distributed SCM
553 Mercurial Distributed SCM
554
554
555 basic commands:
555 basic commands:
556
556
557 add add the specified files on the next commit
557 add add the specified files on the next commit
558 annotate show changeset information by line for each file
558 annotate show changeset information by line for each file
559 clone make a copy of an existing repository
559 clone make a copy of an existing repository
560 commit commit the specified files or all outstanding changes
560 commit commit the specified files or all outstanding changes
561 diff diff repository (or selected files)
561 diff diff repository (or selected files)
562 export dump the header and diffs for one or more changesets
562 export dump the header and diffs for one or more changesets
563 forget forget the specified files on the next commit
563 forget forget the specified files on the next commit
564 init create a new repository in the given directory
564 init create a new repository in the given directory
565 log show revision history of entire repository or files
565 log show revision history of entire repository or files
566 merge merge working directory with another revision
566 merge merge working directory with another revision
567 phase set or show the current phase name
567 phase set or show the current phase name
568 pull pull changes from the specified source
568 pull pull changes from the specified source
569 push push changes to the specified destination
569 push push changes to the specified destination
570 remove remove the specified files on the next commit
570 remove remove the specified files on the next commit
571 serve start stand-alone webserver
571 serve start stand-alone webserver
572 status show changed files in the working directory
572 status show changed files in the working directory
573 summary summarize working directory state
573 summary summarize working directory state
574 update update working directory (or switch revisions)
574 update update working directory (or switch revisions)
575
575
576 use "hg help" for the full list of commands or "hg -v" for details
576 use "hg help" for the full list of commands or "hg -v" for details
577 [255]
577 [255]
578
578
579 $ cat > helpext.py <<EOF
579 $ cat > helpext.py <<EOF
580 > import os
580 > import os
581 > from mercurial import commands
581 > from mercurial import commands
582 >
582 >
583 > def nohelp(ui, *args, **kwargs):
583 > def nohelp(ui, *args, **kwargs):
584 > pass
584 > pass
585 >
585 >
586 > cmdtable = {
586 > cmdtable = {
587 > "nohelp": (nohelp, [], "hg nohelp"),
587 > "nohelp": (nohelp, [], "hg nohelp"),
588 > }
588 > }
589 >
589 >
590 > commands.norepo += ' nohelp'
590 > commands.norepo += ' nohelp'
591 > EOF
591 > EOF
592 $ echo '[extensions]' >> $HGRCPATH
592 $ echo '[extensions]' >> $HGRCPATH
593 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
593 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
594
594
595 Test command with no help text
595 Test command with no help text
596
596
597 $ hg help nohelp
597 $ hg help nohelp
598 hg nohelp
598 hg nohelp
599
599
600 (no help text available)
600 (no help text available)
601
601
602 use "hg -v help nohelp" to show more info
602 use "hg -v help nohelp" to show the global options
603
603
604 $ hg help -k nohelp
604 $ hg help -k nohelp
605 Commands:
605 Commands:
606
606
607 nohelp hg nohelp
607 nohelp hg nohelp
608
608
609 Extension Commands:
609 Extension Commands:
610
610
611 nohelp (no help text available)
611 nohelp (no help text available)
612
612
613 Test that default list of commands omits extension commands
613 Test that default list of commands omits extension commands
614
614
615 $ hg help
615 $ hg help
616 Mercurial Distributed SCM
616 Mercurial Distributed SCM
617
617
618 list of commands:
618 list of commands:
619
619
620 add add the specified files on the next commit
620 add add the specified files on the next commit
621 addremove add all new files, delete all missing files
621 addremove add all new files, delete all missing files
622 annotate show changeset information by line for each file
622 annotate show changeset information by line for each file
623 archive create an unversioned archive of a repository revision
623 archive create an unversioned archive of a repository revision
624 backout reverse effect of earlier changeset
624 backout reverse effect of earlier changeset
625 bisect subdivision search of changesets
625 bisect subdivision search of changesets
626 bookmarks track a line of development with movable markers
626 bookmarks track a line of development with movable markers
627 branch set or show the current branch name
627 branch set or show the current branch name
628 branches list repository named branches
628 branches list repository named branches
629 bundle create a changegroup file
629 bundle create a changegroup file
630 cat output the current or given revision of files
630 cat output the current or given revision of files
631 clone make a copy of an existing repository
631 clone make a copy of an existing repository
632 commit commit the specified files or all outstanding changes
632 commit commit the specified files or all outstanding changes
633 copy mark files as copied for the next commit
633 copy mark files as copied for the next commit
634 diff diff repository (or selected files)
634 diff diff repository (or selected files)
635 export dump the header and diffs for one or more changesets
635 export dump the header and diffs for one or more changesets
636 forget forget the specified files on the next commit
636 forget forget the specified files on the next commit
637 graft copy changes from other branches onto the current branch
637 graft copy changes from other branches onto the current branch
638 grep search for a pattern in specified files and revisions
638 grep search for a pattern in specified files and revisions
639 heads show current repository heads or show branch heads
639 heads show current repository heads or show branch heads
640 help show help for a given topic or a help overview
640 help show help for a given topic or a help overview
641 identify identify the working copy or specified revision
641 identify identify the working copy or specified revision
642 import import an ordered set of patches
642 import import an ordered set of patches
643 incoming show new changesets found in source
643 incoming show new changesets found in source
644 init create a new repository in the given directory
644 init create a new repository in the given directory
645 locate locate files matching specific patterns
645 locate locate files matching specific patterns
646 log show revision history of entire repository or files
646 log show revision history of entire repository or files
647 manifest output the current or given revision of the project manifest
647 manifest output the current or given revision of the project manifest
648 merge merge working directory with another revision
648 merge merge working directory with another revision
649 outgoing show changesets not found in the destination
649 outgoing show changesets not found in the destination
650 parents show the parents of the working directory or revision
650 parents show the parents of the working directory or revision
651 paths show aliases for remote repositories
651 paths show aliases for remote repositories
652 phase set or show the current phase name
652 phase set or show the current phase name
653 pull pull changes from the specified source
653 pull pull changes from the specified source
654 push push changes to the specified destination
654 push push changes to the specified destination
655 recover roll back an interrupted transaction
655 recover roll back an interrupted transaction
656 remove remove the specified files on the next commit
656 remove remove the specified files on the next commit
657 rename rename files; equivalent of copy + remove
657 rename rename files; equivalent of copy + remove
658 resolve redo merges or set/view the merge status of files
658 resolve redo merges or set/view the merge status of files
659 revert restore files to their checkout state
659 revert restore files to their checkout state
660 rollback roll back the last transaction (dangerous)
660 rollback roll back the last transaction (dangerous)
661 root print the root (top) of the current working directory
661 root print the root (top) of the current working directory
662 serve start stand-alone webserver
662 serve start stand-alone webserver
663 showconfig show combined config settings from all hgrc files
663 showconfig show combined config settings from all hgrc files
664 status show changed files in the working directory
664 status show changed files in the working directory
665 summary summarize working directory state
665 summary summarize working directory state
666 tag add one or more tags for the current or given revision
666 tag add one or more tags for the current or given revision
667 tags list repository tags
667 tags list repository tags
668 tip show the tip revision
668 tip show the tip revision
669 unbundle apply one or more changegroup files
669 unbundle apply one or more changegroup files
670 update update working directory (or switch revisions)
670 update update working directory (or switch revisions)
671 verify verify the integrity of the repository
671 verify verify the integrity of the repository
672 version output version and copyright information
672 version output version and copyright information
673
673
674 enabled extensions:
674 enabled extensions:
675
675
676 helpext (no help text available)
676 helpext (no help text available)
677
677
678 additional help topics:
678 additional help topics:
679
679
680 config Configuration Files
680 config Configuration Files
681 dates Date Formats
681 dates Date Formats
682 diffs Diff Formats
682 diffs Diff Formats
683 environment Environment Variables
683 environment Environment Variables
684 extensions Using Additional Features
684 extensions Using Additional Features
685 filesets Specifying File Sets
685 filesets Specifying File Sets
686 glossary Glossary
686 glossary Glossary
687 hgignore Syntax for Mercurial Ignore Files
687 hgignore Syntax for Mercurial Ignore Files
688 hgweb Configuring hgweb
688 hgweb Configuring hgweb
689 merge-tools Merge Tools
689 merge-tools Merge Tools
690 multirevs Specifying Multiple Revisions
690 multirevs Specifying Multiple Revisions
691 patterns File Name Patterns
691 patterns File Name Patterns
692 phases Working with Phases
692 phases Working with Phases
693 revisions Specifying Single Revisions
693 revisions Specifying Single Revisions
694 revsets Specifying Revision Sets
694 revsets Specifying Revision Sets
695 subrepos Subrepositories
695 subrepos Subrepositories
696 templating Template Usage
696 templating Template Usage
697 urls URL Paths
697 urls URL Paths
698
698
699 use "hg -v help" to show builtin aliases and global options
699 use "hg -v help" to show builtin aliases and global options
700
700
701
701
702
702
703 Test list of commands with command with no help text
703 Test list of commands with command with no help text
704
704
705 $ hg help helpext
705 $ hg help helpext
706 helpext extension - no help text available
706 helpext extension - no help text available
707
707
708 list of commands:
708 list of commands:
709
709
710 nohelp (no help text available)
710 nohelp (no help text available)
711
711
712 use "hg -v help helpext" to show builtin aliases and global options
712 use "hg -v help helpext" to show builtin aliases and global options
713
713
714 Test a help topic
714 Test a help topic
715
715
716 $ hg help revs
716 $ hg help revs
717 Specifying Single Revisions
717 Specifying Single Revisions
718
718
719 Mercurial supports several ways to specify individual revisions.
719 Mercurial supports several ways to specify individual revisions.
720
720
721 A plain integer is treated as a revision number. Negative integers are
721 A plain integer is treated as a revision number. Negative integers are
722 treated as sequential offsets from the tip, with -1 denoting the tip, -2
722 treated as sequential offsets from the tip, with -1 denoting the tip, -2
723 denoting the revision prior to the tip, and so forth.
723 denoting the revision prior to the tip, and so forth.
724
724
725 A 40-digit hexadecimal string is treated as a unique revision identifier.
725 A 40-digit hexadecimal string is treated as a unique revision identifier.
726
726
727 A hexadecimal string less than 40 characters long is treated as a unique
727 A hexadecimal string less than 40 characters long is treated as a unique
728 revision identifier and is referred to as a short-form identifier. A
728 revision identifier and is referred to as a short-form identifier. A
729 short-form identifier is only valid if it is the prefix of exactly one
729 short-form identifier is only valid if it is the prefix of exactly one
730 full-length identifier.
730 full-length identifier.
731
731
732 Any other string is treated as a bookmark, tag, or branch name. A bookmark
732 Any other string is treated as a bookmark, tag, or branch name. A bookmark
733 is a movable pointer to a revision. A tag is a permanent name associated
733 is a movable pointer to a revision. A tag is a permanent name associated
734 with a revision. A branch name denotes the tipmost revision of that
734 with a revision. A branch name denotes the tipmost revision of that
735 branch. Bookmark, tag, and branch names must not contain the ":"
735 branch. Bookmark, tag, and branch names must not contain the ":"
736 character.
736 character.
737
737
738 The reserved name "tip" always identifies the most recent revision.
738 The reserved name "tip" always identifies the most recent revision.
739
739
740 The reserved name "null" indicates the null revision. This is the revision
740 The reserved name "null" indicates the null revision. This is the revision
741 of an empty repository, and the parent of revision 0.
741 of an empty repository, and the parent of revision 0.
742
742
743 The reserved name "." indicates the working directory parent. If no
743 The reserved name "." indicates the working directory parent. If no
744 working directory is checked out, it is equivalent to null. If an
744 working directory is checked out, it is equivalent to null. If an
745 uncommitted merge is in progress, "." is the revision of the first parent.
745 uncommitted merge is in progress, "." is the revision of the first parent.
746
746
747 Test templating help
747 Test templating help
748
748
749 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
749 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
750 desc String. The text of the changeset description.
750 desc String. The text of the changeset description.
751 diffstat String. Statistics of changes with the following format:
751 diffstat String. Statistics of changes with the following format:
752 firstline Any text. Returns the first line of text.
752 firstline Any text. Returns the first line of text.
753 nonempty Any text. Returns '(none)' if the string is empty.
753 nonempty Any text. Returns '(none)' if the string is empty.
754
754
755 Test help hooks
755 Test help hooks
756
756
757 $ cat > helphook1.py <<EOF
757 $ cat > helphook1.py <<EOF
758 > from mercurial import help
758 > from mercurial import help
759 >
759 >
760 > def rewrite(topic, doc):
760 > def rewrite(topic, doc):
761 > return doc + '\nhelphook1\n'
761 > return doc + '\nhelphook1\n'
762 >
762 >
763 > def extsetup(ui):
763 > def extsetup(ui):
764 > help.addtopichook('revsets', rewrite)
764 > help.addtopichook('revsets', rewrite)
765 > EOF
765 > EOF
766 $ cat > helphook2.py <<EOF
766 $ cat > helphook2.py <<EOF
767 > from mercurial import help
767 > from mercurial import help
768 >
768 >
769 > def rewrite(topic, doc):
769 > def rewrite(topic, doc):
770 > return doc + '\nhelphook2\n'
770 > return doc + '\nhelphook2\n'
771 >
771 >
772 > def extsetup(ui):
772 > def extsetup(ui):
773 > help.addtopichook('revsets', rewrite)
773 > help.addtopichook('revsets', rewrite)
774 > EOF
774 > EOF
775 $ echo '[extensions]' >> $HGRCPATH
775 $ echo '[extensions]' >> $HGRCPATH
776 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
776 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
777 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
777 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
778 $ hg help revsets | grep helphook
778 $ hg help revsets | grep helphook
779 helphook1
779 helphook1
780 helphook2
780 helphook2
781
781
782 Test keyword search help
782 Test keyword search help
783
783
784 $ hg help -k clone
784 $ hg help -k clone
785 Topics:
785 Topics:
786
786
787 config Configuration Files
787 config Configuration Files
788 extensions Using Additional Features
788 extensions Using Additional Features
789 glossary Glossary
789 glossary Glossary
790 phases Working with Phases
790 phases Working with Phases
791 subrepos Subrepositories
791 subrepos Subrepositories
792 urls URL Paths
792 urls URL Paths
793
793
794 Commands:
794 Commands:
795
795
796 clone make a copy of an existing repository
796 clone make a copy of an existing repository
797 paths show aliases for remote repositories
797 paths show aliases for remote repositories
798 update update working directory (or switch revisions)
798 update update working directory (or switch revisions)
799
799
800 Extensions:
800 Extensions:
801
801
802 relink recreates hardlinks between repository clones
802 relink recreates hardlinks between repository clones
803
803
804 Extension Commands:
804 Extension Commands:
805
805
806 qclone clone main and patch repository at same time
806 qclone clone main and patch repository at same time
807
807
808 Test omit indicating for help
809
810 $ cat > addverboseitems.py <<EOF
811 > '''extension to test omit indicating.
812 >
813 > This paragraph is never omitted (for extension)
814 >
815 > .. container:: verbose
816 >
817 > This paragraph is omitted,
818 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension)
819 >
820 > This paragraph is never omitted, too (for extension)
821 > '''
822 >
823 > from mercurial import help, commands
824 > testtopic = """This paragraph is never omitted (for topic).
825 >
826 > .. container:: verbose
827 >
828 > This paragraph is omitted,
829 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic)
830 >
831 > This paragraph is never omitted, too (for topic)
832 > """
833 > def extsetup(ui):
834 > help.helptable.append((["topic-containing-verbose"],
835 > "This is the topic to test omit indicating.",
836 > lambda : testtopic))
837 > EOF
838 $ echo '[extensions]' >> $HGRCPATH
839 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
840 $ hg help addverboseitems
841 addverboseitems extension - extension to test omit indicating.
842
843 This paragraph is never omitted (for extension)
844
845 This paragraph is never omitted, too (for extension)
846
847 use "hg help -v addverboseitems" to show more complete help
848
849 no commands defined
850 $ hg help -v addverboseitems
851 addverboseitems extension - extension to test omit indicating.
852
853 This paragraph is never omitted (for extension)
854
855 This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension)
856
857 This paragraph is never omitted, too (for extension)
858
859 no commands defined
860 $ hg help topic-containing-verbose
861 This is the topic to test omit indicating.
862
863 This paragraph is never omitted (for topic).
864
865 This paragraph is never omitted, too (for topic)
866
867 use "hg help -v topic-containing-verbose" to show more complete help
868 $ hg help -v topic-containing-verbose
869 This is the topic to test omit indicating.
870
871 This paragraph is never omitted (for topic).
872
873 This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic)
874
875 This paragraph is never omitted, too (for topic)
876
808 Test usage of section marks in help documents
877 Test usage of section marks in help documents
809
878
810 $ cd "$TESTDIR"/../doc
879 $ cd "$TESTDIR"/../doc
811 $ python check-seclevel.py
880 $ python check-seclevel.py
@@ -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 edit commit message
34 -e --edit edit commit message
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 more info
49 use "hg -v help qrefresh" to show the global options
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 edit commit message
78 -e --edit edit commit message
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 more info
94 use "hg -v help qrefresh" to show the global options
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,402 +1,402 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 -I --include PATTERN [+] include names matching the given patterns
64 -I --include PATTERN [+] include names matching the given patterns
65 -X --exclude PATTERN [+] exclude names matching the given patterns
65 -X --exclude PATTERN [+] exclude names matching the given patterns
66 -m --message TEXT use text as commit message
66 -m --message TEXT use text as commit message
67 -l --logfile FILE read commit message from file
67 -l --logfile FILE read commit message from file
68 -d --date DATE record the specified date as commit date
68 -d --date DATE record the specified date as commit date
69 -u --user USER record the specified user as committer
69 -u --user USER record the specified user as committer
70 -S --subrepos recurse into subrepositories
70 -S --subrepos recurse into subrepositories
71 -w --ignore-all-space ignore white space when comparing lines
71 -w --ignore-all-space ignore white space when comparing lines
72 -b --ignore-space-change ignore changes in the amount of white space
72 -b --ignore-space-change ignore changes in the amount of white space
73 -B --ignore-blank-lines ignore changes whose lines are all blank
73 -B --ignore-blank-lines ignore changes whose lines are all blank
74
74
75 [+] marked option can be specified multiple times
75 [+] marked option can be specified multiple times
76
76
77 use "hg -v help record" to show more info
77 use "hg -v help record" to show the global options
78
78
79 help (no mq, so no qrecord)
79 help (no mq, so no qrecord)
80
80
81 $ hg help qrecord
81 $ hg help qrecord
82 hg qrecord [OPTION]... PATCH [FILE]...
82 hg qrecord [OPTION]... PATCH [FILE]...
83
83
84 interactively record a new patch
84 interactively record a new patch
85
85
86 See "hg help qnew" & "hg help record" for more information and usage.
86 See "hg help qnew" & "hg help record" for more information and usage.
87
87
88 use "hg -v help qrecord" to show more info
88 use "hg -v help qrecord" to show the global options
89
89
90 $ hg init a
90 $ hg init a
91
91
92 qrecord (mq not present)
92 qrecord (mq not present)
93
93
94 $ hg -R a qrecord
94 $ hg -R a qrecord
95 hg qrecord: invalid arguments
95 hg qrecord: invalid arguments
96 hg qrecord [OPTION]... PATCH [FILE]...
96 hg qrecord [OPTION]... PATCH [FILE]...
97
97
98 interactively record a new patch
98 interactively record a new patch
99
99
100 use "hg help qrecord" to show the full help text
100 use "hg help qrecord" to show the full help text
101 [255]
101 [255]
102
102
103 qrecord patch (mq not present)
103 qrecord patch (mq not present)
104
104
105 $ hg -R a qrecord patch
105 $ hg -R a qrecord patch
106 abort: 'mq' extension not loaded
106 abort: 'mq' extension not loaded
107 [255]
107 [255]
108
108
109 help (bad mq)
109 help (bad mq)
110
110
111 $ echo "mq=nonexistent" >> $HGRCPATH
111 $ echo "mq=nonexistent" >> $HGRCPATH
112 $ hg help qrecord
112 $ hg help qrecord
113 *** failed to import extension mq from nonexistent: [Errno 2] * (glob)
113 *** failed to import extension mq from nonexistent: [Errno 2] * (glob)
114 hg qrecord [OPTION]... PATCH [FILE]...
114 hg qrecord [OPTION]... PATCH [FILE]...
115
115
116 interactively record a new patch
116 interactively record a new patch
117
117
118 See "hg help qnew" & "hg help record" for more information and usage.
118 See "hg help qnew" & "hg help record" for more information and usage.
119
119
120 use "hg -v help qrecord" to show more info
120 use "hg -v help qrecord" to show the global options
121
121
122 help (mq present)
122 help (mq present)
123
123
124 $ sed 's/mq=nonexistent/mq=/' $HGRCPATH > hgrc.tmp
124 $ sed 's/mq=nonexistent/mq=/' $HGRCPATH > hgrc.tmp
125 $ mv hgrc.tmp $HGRCPATH
125 $ mv hgrc.tmp $HGRCPATH
126
126
127 $ hg help qrecord
127 $ hg help qrecord
128 hg qrecord [OPTION]... PATCH [FILE]...
128 hg qrecord [OPTION]... PATCH [FILE]...
129
129
130 interactively record a new patch
130 interactively record a new patch
131
131
132 See "hg help qnew" & "hg help record" for more information and usage.
132 See "hg help qnew" & "hg help record" for more information and usage.
133
133
134 options:
134 options:
135
135
136 -e --edit edit commit message
136 -e --edit edit commit message
137 -g --git use git extended diff format
137 -g --git use git extended diff format
138 -U --currentuser add "From: <current user>" to patch
138 -U --currentuser add "From: <current user>" to patch
139 -u --user USER add "From: <USER>" to patch
139 -u --user USER add "From: <USER>" to patch
140 -D --currentdate add "Date: <current date>" to patch
140 -D --currentdate add "Date: <current date>" to patch
141 -d --date DATE add "Date: <DATE>" to patch
141 -d --date DATE add "Date: <DATE>" to patch
142 -I --include PATTERN [+] include names matching the given patterns
142 -I --include PATTERN [+] include names matching the given patterns
143 -X --exclude PATTERN [+] exclude names matching the given patterns
143 -X --exclude PATTERN [+] exclude names matching the given patterns
144 -m --message TEXT use text as commit message
144 -m --message TEXT use text as commit message
145 -l --logfile FILE read commit message from file
145 -l --logfile FILE read commit message from file
146 -w --ignore-all-space ignore white space when comparing lines
146 -w --ignore-all-space ignore white space when comparing lines
147 -b --ignore-space-change ignore changes in the amount of white space
147 -b --ignore-space-change ignore changes in the amount of white space
148 -B --ignore-blank-lines ignore changes whose lines are all blank
148 -B --ignore-blank-lines ignore changes whose lines are all blank
149 --mq operate on patch repository
149 --mq operate on patch repository
150
150
151 [+] marked option can be specified multiple times
151 [+] marked option can be specified multiple times
152
152
153 use "hg -v help qrecord" to show more info
153 use "hg -v help qrecord" to show the global options
154
154
155 $ cd a
155 $ cd a
156
156
157 Base commit
157 Base commit
158
158
159 $ cat > 1.txt <<EOF
159 $ cat > 1.txt <<EOF
160 > 1
160 > 1
161 > 2
161 > 2
162 > 3
162 > 3
163 > 4
163 > 4
164 > 5
164 > 5
165 > EOF
165 > EOF
166 $ cat > 2.txt <<EOF
166 $ cat > 2.txt <<EOF
167 > a
167 > a
168 > b
168 > b
169 > c
169 > c
170 > d
170 > d
171 > e
171 > e
172 > f
172 > f
173 > EOF
173 > EOF
174
174
175 $ mkdir dir
175 $ mkdir dir
176 $ cat > dir/a.txt <<EOF
176 $ cat > dir/a.txt <<EOF
177 > hello world
177 > hello world
178 >
178 >
179 > someone
179 > someone
180 > up
180 > up
181 > there
181 > there
182 > loves
182 > loves
183 > me
183 > me
184 > EOF
184 > EOF
185
185
186 $ hg add 1.txt 2.txt dir/a.txt
186 $ hg add 1.txt 2.txt dir/a.txt
187 $ hg commit -m 'initial checkin'
187 $ hg commit -m 'initial checkin'
188
188
189 Changing files
189 Changing files
190
190
191 $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new
191 $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new
192 $ sed -e 's/b/b b/' 2.txt > 2.txt.new
192 $ sed -e 's/b/b b/' 2.txt > 2.txt.new
193 $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new
193 $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new
194
194
195 $ mv -f 1.txt.new 1.txt
195 $ mv -f 1.txt.new 1.txt
196 $ mv -f 2.txt.new 2.txt
196 $ mv -f 2.txt.new 2.txt
197 $ mv -f dir/a.txt.new dir/a.txt
197 $ mv -f dir/a.txt.new dir/a.txt
198
198
199 Whole diff
199 Whole diff
200
200
201 $ hg diff --nodates
201 $ hg diff --nodates
202 diff -r 1057167b20ef 1.txt
202 diff -r 1057167b20ef 1.txt
203 --- a/1.txt
203 --- a/1.txt
204 +++ b/1.txt
204 +++ b/1.txt
205 @@ -1,5 +1,5 @@
205 @@ -1,5 +1,5 @@
206 1
206 1
207 -2
207 -2
208 +2 2
208 +2 2
209 3
209 3
210 -4
210 -4
211 +4 4
211 +4 4
212 5
212 5
213 diff -r 1057167b20ef 2.txt
213 diff -r 1057167b20ef 2.txt
214 --- a/2.txt
214 --- a/2.txt
215 +++ b/2.txt
215 +++ b/2.txt
216 @@ -1,5 +1,5 @@
216 @@ -1,5 +1,5 @@
217 a
217 a
218 -b
218 -b
219 +b b
219 +b b
220 c
220 c
221 d
221 d
222 e
222 e
223 diff -r 1057167b20ef dir/a.txt
223 diff -r 1057167b20ef dir/a.txt
224 --- a/dir/a.txt
224 --- a/dir/a.txt
225 +++ b/dir/a.txt
225 +++ b/dir/a.txt
226 @@ -1,4 +1,4 @@
226 @@ -1,4 +1,4 @@
227 -hello world
227 -hello world
228 +hello world!
228 +hello world!
229
229
230 someone
230 someone
231 up
231 up
232
232
233 qrecord with bad patch name, should abort before prompting
233 qrecord with bad patch name, should abort before prompting
234
234
235 $ hg qrecord .hg
235 $ hg qrecord .hg
236 abort: patch name cannot begin with ".hg"
236 abort: patch name cannot begin with ".hg"
237 [255]
237 [255]
238
238
239 qrecord a.patch
239 qrecord a.patch
240
240
241 $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
241 $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
242 > y
242 > y
243 > y
243 > y
244 > n
244 > n
245 > y
245 > y
246 > y
246 > y
247 > n
247 > n
248 > EOF
248 > EOF
249 diff --git a/1.txt b/1.txt
249 diff --git a/1.txt b/1.txt
250 2 hunks, 2 lines changed
250 2 hunks, 2 lines changed
251 examine changes to '1.txt'? [Ynesfdaq?]
251 examine changes to '1.txt'? [Ynesfdaq?]
252 @@ -1,3 +1,3 @@
252 @@ -1,3 +1,3 @@
253 1
253 1
254 -2
254 -2
255 +2 2
255 +2 2
256 3
256 3
257 record change 1/4 to '1.txt'? [Ynesfdaq?]
257 record change 1/4 to '1.txt'? [Ynesfdaq?]
258 @@ -3,3 +3,3 @@
258 @@ -3,3 +3,3 @@
259 3
259 3
260 -4
260 -4
261 +4 4
261 +4 4
262 5
262 5
263 record change 2/4 to '1.txt'? [Ynesfdaq?]
263 record change 2/4 to '1.txt'? [Ynesfdaq?]
264 diff --git a/2.txt b/2.txt
264 diff --git a/2.txt b/2.txt
265 1 hunks, 1 lines changed
265 1 hunks, 1 lines changed
266 examine changes to '2.txt'? [Ynesfdaq?]
266 examine changes to '2.txt'? [Ynesfdaq?]
267 @@ -1,5 +1,5 @@
267 @@ -1,5 +1,5 @@
268 a
268 a
269 -b
269 -b
270 +b b
270 +b b
271 c
271 c
272 d
272 d
273 e
273 e
274 record change 3/4 to '2.txt'? [Ynesfdaq?]
274 record change 3/4 to '2.txt'? [Ynesfdaq?]
275 diff --git a/dir/a.txt b/dir/a.txt
275 diff --git a/dir/a.txt b/dir/a.txt
276 1 hunks, 1 lines changed
276 1 hunks, 1 lines changed
277 examine changes to 'dir/a.txt'? [Ynesfdaq?]
277 examine changes to 'dir/a.txt'? [Ynesfdaq?]
278
278
279 After qrecord a.patch 'tip'"
279 After qrecord a.patch 'tip'"
280
280
281 $ hg tip -p
281 $ hg tip -p
282 changeset: 1:5d1ca63427ee
282 changeset: 1:5d1ca63427ee
283 tag: a.patch
283 tag: a.patch
284 tag: qbase
284 tag: qbase
285 tag: qtip
285 tag: qtip
286 tag: tip
286 tag: tip
287 user: test
287 user: test
288 date: Thu Jan 01 00:00:00 1970 +0000
288 date: Thu Jan 01 00:00:00 1970 +0000
289 summary: aaa
289 summary: aaa
290
290
291 diff -r 1057167b20ef -r 5d1ca63427ee 1.txt
291 diff -r 1057167b20ef -r 5d1ca63427ee 1.txt
292 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
292 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
293 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
293 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
294 @@ -1,5 +1,5 @@
294 @@ -1,5 +1,5 @@
295 1
295 1
296 -2
296 -2
297 +2 2
297 +2 2
298 3
298 3
299 4
299 4
300 5
300 5
301 diff -r 1057167b20ef -r 5d1ca63427ee 2.txt
301 diff -r 1057167b20ef -r 5d1ca63427ee 2.txt
302 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
302 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
303 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
303 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
304 @@ -1,5 +1,5 @@
304 @@ -1,5 +1,5 @@
305 a
305 a
306 -b
306 -b
307 +b b
307 +b b
308 c
308 c
309 d
309 d
310 e
310 e
311
311
312
312
313 After qrecord a.patch 'diff'"
313 After qrecord a.patch 'diff'"
314
314
315 $ hg diff --nodates
315 $ hg diff --nodates
316 diff -r 5d1ca63427ee 1.txt
316 diff -r 5d1ca63427ee 1.txt
317 --- a/1.txt
317 --- a/1.txt
318 +++ b/1.txt
318 +++ b/1.txt
319 @@ -1,5 +1,5 @@
319 @@ -1,5 +1,5 @@
320 1
320 1
321 2 2
321 2 2
322 3
322 3
323 -4
323 -4
324 +4 4
324 +4 4
325 5
325 5
326 diff -r 5d1ca63427ee dir/a.txt
326 diff -r 5d1ca63427ee dir/a.txt
327 --- a/dir/a.txt
327 --- a/dir/a.txt
328 +++ b/dir/a.txt
328 +++ b/dir/a.txt
329 @@ -1,4 +1,4 @@
329 @@ -1,4 +1,4 @@
330 -hello world
330 -hello world
331 +hello world!
331 +hello world!
332
332
333 someone
333 someone
334 up
334 up
335
335
336 qrecord b.patch
336 qrecord b.patch
337
337
338 $ hg qrecord -d '0 0' -m bbb b.patch <<EOF
338 $ hg qrecord -d '0 0' -m bbb b.patch <<EOF
339 > y
339 > y
340 > y
340 > y
341 > y
341 > y
342 > y
342 > y
343 > EOF
343 > EOF
344 diff --git a/1.txt b/1.txt
344 diff --git a/1.txt b/1.txt
345 1 hunks, 1 lines changed
345 1 hunks, 1 lines changed
346 examine changes to '1.txt'? [Ynesfdaq?]
346 examine changes to '1.txt'? [Ynesfdaq?]
347 @@ -1,5 +1,5 @@
347 @@ -1,5 +1,5 @@
348 1
348 1
349 2 2
349 2 2
350 3
350 3
351 -4
351 -4
352 +4 4
352 +4 4
353 5
353 5
354 record change 1/2 to '1.txt'? [Ynesfdaq?]
354 record change 1/2 to '1.txt'? [Ynesfdaq?]
355 diff --git a/dir/a.txt b/dir/a.txt
355 diff --git a/dir/a.txt b/dir/a.txt
356 1 hunks, 1 lines changed
356 1 hunks, 1 lines changed
357 examine changes to 'dir/a.txt'? [Ynesfdaq?]
357 examine changes to 'dir/a.txt'? [Ynesfdaq?]
358 @@ -1,4 +1,4 @@
358 @@ -1,4 +1,4 @@
359 -hello world
359 -hello world
360 +hello world!
360 +hello world!
361
361
362 someone
362 someone
363 up
363 up
364 record change 2/2 to 'dir/a.txt'? [Ynesfdaq?]
364 record change 2/2 to 'dir/a.txt'? [Ynesfdaq?]
365
365
366 After qrecord b.patch 'tip'
366 After qrecord b.patch 'tip'
367
367
368 $ hg tip -p
368 $ hg tip -p
369 changeset: 2:b056198bf878
369 changeset: 2:b056198bf878
370 tag: b.patch
370 tag: b.patch
371 tag: qtip
371 tag: qtip
372 tag: tip
372 tag: tip
373 user: test
373 user: test
374 date: Thu Jan 01 00:00:00 1970 +0000
374 date: Thu Jan 01 00:00:00 1970 +0000
375 summary: bbb
375 summary: bbb
376
376
377 diff -r 5d1ca63427ee -r b056198bf878 1.txt
377 diff -r 5d1ca63427ee -r b056198bf878 1.txt
378 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
378 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
379 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
379 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
380 @@ -1,5 +1,5 @@
380 @@ -1,5 +1,5 @@
381 1
381 1
382 2 2
382 2 2
383 3
383 3
384 -4
384 -4
385 +4 4
385 +4 4
386 5
386 5
387 diff -r 5d1ca63427ee -r b056198bf878 dir/a.txt
387 diff -r 5d1ca63427ee -r b056198bf878 dir/a.txt
388 --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
388 --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
389 +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
389 +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
390 @@ -1,4 +1,4 @@
390 @@ -1,4 +1,4 @@
391 -hello world
391 -hello world
392 +hello world!
392 +hello world!
393
393
394 someone
394 someone
395 up
395 up
396
396
397
397
398 After qrecord b.patch 'diff'
398 After qrecord b.patch 'diff'
399
399
400 $ hg diff --nodates
400 $ hg diff --nodates
401
401
402 $ cd ..
402 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now