Show More
@@ -1,507 +1,508 b'' | |||||
1 | # help.py - help data for mercurial |
|
1 | # help.py - help data for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from i18n import gettext, _ |
|
8 | from i18n import gettext, _ | |
9 | import itertools, sys, os |
|
9 | import itertools, sys, os | |
10 | import error |
|
10 | import error | |
11 | import extensions, revset, fileset, templatekw, templatefilters, filemerge |
|
11 | import extensions, revset, fileset, templatekw, templatefilters, filemerge | |
12 | import encoding, util, minirst |
|
12 | import encoding, util, minirst | |
13 | import cmdutil |
|
13 | import cmdutil | |
14 |
|
14 | |||
15 | def listexts(header, exts, indent=1, showdeprecated=False): |
|
15 | def listexts(header, exts, indent=1, showdeprecated=False): | |
16 | '''return a text listing of the given extensions''' |
|
16 | '''return a text listing of the given extensions''' | |
17 | rst = [] |
|
17 | rst = [] | |
18 | if exts: |
|
18 | if exts: | |
19 | rst.append('\n%s\n\n' % header) |
|
19 | rst.append('\n%s\n\n' % header) | |
20 | for name, desc in sorted(exts.iteritems()): |
|
20 | for name, desc in sorted(exts.iteritems()): | |
21 | if '(DEPRECATED)' in desc and not showdeprecated: |
|
21 | if '(DEPRECATED)' in desc and not showdeprecated: | |
22 | continue |
|
22 | continue | |
23 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) |
|
23 | rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) | |
24 | return rst |
|
24 | return rst | |
25 |
|
25 | |||
26 | def extshelp(): |
|
26 | def extshelp(): | |
27 | rst = loaddoc('extensions')().splitlines(True) |
|
27 | rst = loaddoc('extensions')().splitlines(True) | |
28 | rst.extend(listexts( |
|
28 | rst.extend(listexts( | |
29 | _('enabled extensions:'), extensions.enabled(), showdeprecated=True)) |
|
29 | _('enabled extensions:'), extensions.enabled(), showdeprecated=True)) | |
30 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled())) |
|
30 | rst.extend(listexts(_('disabled extensions:'), extensions.disabled())) | |
31 | doc = ''.join(rst) |
|
31 | doc = ''.join(rst) | |
32 | return doc |
|
32 | return doc | |
33 |
|
33 | |||
34 | def optrst(header, options, verbose): |
|
34 | def optrst(header, options, verbose): | |
35 | data = [] |
|
35 | data = [] | |
36 | multioccur = False |
|
36 | multioccur = False | |
37 | for option in options: |
|
37 | for option in options: | |
38 | if len(option) == 5: |
|
38 | if len(option) == 5: | |
39 | shortopt, longopt, default, desc, optlabel = option |
|
39 | shortopt, longopt, default, desc, optlabel = option | |
40 | else: |
|
40 | else: | |
41 | shortopt, longopt, default, desc = option |
|
41 | shortopt, longopt, default, desc = option | |
42 | optlabel = _("VALUE") # default label |
|
42 | optlabel = _("VALUE") # default label | |
43 |
|
43 | |||
44 | if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc): |
|
44 | if not verbose and ("DEPRECATED" in desc or _("DEPRECATED") in desc): | |
45 | continue |
|
45 | continue | |
46 |
|
46 | |||
47 | so = '' |
|
47 | so = '' | |
48 | if shortopt: |
|
48 | if shortopt: | |
49 | so = '-' + shortopt |
|
49 | so = '-' + shortopt | |
50 | lo = '--' + longopt |
|
50 | lo = '--' + longopt | |
51 | if default: |
|
51 | if default: | |
52 | desc += _(" (default: %s)") % default |
|
52 | desc += _(" (default: %s)") % default | |
53 |
|
53 | |||
54 | if isinstance(default, list): |
|
54 | if isinstance(default, list): | |
55 | lo += " %s [+]" % optlabel |
|
55 | lo += " %s [+]" % optlabel | |
56 | multioccur = True |
|
56 | multioccur = True | |
57 | elif (default is not None) and not isinstance(default, bool): |
|
57 | elif (default is not None) and not isinstance(default, bool): | |
58 | lo += " %s" % optlabel |
|
58 | lo += " %s" % optlabel | |
59 |
|
59 | |||
60 | data.append((so, lo, desc)) |
|
60 | data.append((so, lo, desc)) | |
61 |
|
61 | |||
62 | if multioccur: |
|
62 | if multioccur: | |
63 | header += (_(" ([+] can be repeated)")) |
|
63 | header += (_(" ([+] can be repeated)")) | |
64 |
|
64 | |||
65 | rst = ['\n%s:\n\n' % header] |
|
65 | rst = ['\n%s:\n\n' % header] | |
66 | rst.extend(minirst.maketable(data, 1)) |
|
66 | rst.extend(minirst.maketable(data, 1)) | |
67 |
|
67 | |||
68 | return ''.join(rst) |
|
68 | return ''.join(rst) | |
69 |
|
69 | |||
70 | def indicateomitted(rst, omitted, notomitted=None): |
|
70 | def indicateomitted(rst, omitted, notomitted=None): | |
71 | rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted) |
|
71 | rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted) | |
72 | if notomitted: |
|
72 | if notomitted: | |
73 | rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) |
|
73 | rst.append('\n\n.. container:: notomitted\n\n %s\n\n' % notomitted) | |
74 |
|
74 | |||
75 | def topicmatch(kw): |
|
75 | def topicmatch(kw): | |
76 | """Return help topics matching kw. |
|
76 | """Return help topics matching kw. | |
77 |
|
77 | |||
78 | Returns {'section': [(name, summary), ...], ...} where section is |
|
78 | Returns {'section': [(name, summary), ...], ...} where section is | |
79 | one of topics, commands, extensions, or extensioncommands. |
|
79 | one of topics, commands, extensions, or extensioncommands. | |
80 | """ |
|
80 | """ | |
81 | kw = encoding.lower(kw) |
|
81 | kw = encoding.lower(kw) | |
82 | def lowercontains(container): |
|
82 | def lowercontains(container): | |
83 | return kw in encoding.lower(container) # translated in helptable |
|
83 | return kw in encoding.lower(container) # translated in helptable | |
84 | results = {'topics': [], |
|
84 | results = {'topics': [], | |
85 | 'commands': [], |
|
85 | 'commands': [], | |
86 | 'extensions': [], |
|
86 | 'extensions': [], | |
87 | 'extensioncommands': [], |
|
87 | 'extensioncommands': [], | |
88 | } |
|
88 | } | |
89 | for names, header, doc in helptable: |
|
89 | for names, header, doc in helptable: | |
90 | if (sum(map(lowercontains, names)) |
|
90 | if (sum(map(lowercontains, names)) | |
91 | or lowercontains(header) |
|
91 | or lowercontains(header) | |
92 | or lowercontains(doc())): |
|
92 | or lowercontains(doc())): | |
93 | results['topics'].append((names[0], header)) |
|
93 | results['topics'].append((names[0], header)) | |
94 | import commands # avoid cycle |
|
94 | import commands # avoid cycle | |
95 | for cmd, entry in commands.table.iteritems(): |
|
95 | for cmd, entry in commands.table.iteritems(): | |
96 | if len(entry) == 3: |
|
96 | if len(entry) == 3: | |
97 | summary = entry[2] |
|
97 | summary = entry[2] | |
98 | else: |
|
98 | else: | |
99 | summary = '' |
|
99 | summary = '' | |
100 | # translate docs *before* searching there |
|
100 | # translate docs *before* searching there | |
101 | docs = _(getattr(entry[0], '__doc__', None)) or '' |
|
101 | docs = _(getattr(entry[0], '__doc__', None)) or '' | |
102 | if kw in cmd or lowercontains(summary) or lowercontains(docs): |
|
102 | if kw in cmd or lowercontains(summary) or lowercontains(docs): | |
103 | doclines = docs.splitlines() |
|
103 | doclines = docs.splitlines() | |
104 | if doclines: |
|
104 | if doclines: | |
105 | summary = doclines[0] |
|
105 | summary = doclines[0] | |
106 | cmdname = cmd.split('|')[0].lstrip('^') |
|
106 | cmdname = cmd.split('|')[0].lstrip('^') | |
107 | results['commands'].append((cmdname, summary)) |
|
107 | results['commands'].append((cmdname, summary)) | |
108 | for name, docs in itertools.chain( |
|
108 | for name, docs in itertools.chain( | |
109 | extensions.enabled(False).iteritems(), |
|
109 | extensions.enabled(False).iteritems(), | |
110 | extensions.disabled().iteritems()): |
|
110 | extensions.disabled().iteritems()): | |
111 | # extensions.load ignores the UI argument |
|
111 | # extensions.load ignores the UI argument | |
112 | mod = extensions.load(None, name, '') |
|
112 | mod = extensions.load(None, name, '') | |
113 | name = name.split('.')[-1] |
|
113 | name = name.split('.')[-1] | |
114 | if lowercontains(name) or lowercontains(docs): |
|
114 | if lowercontains(name) or lowercontains(docs): | |
115 | # extension docs are already translated |
|
115 | # extension docs are already translated | |
116 | results['extensions'].append((name, docs.splitlines()[0])) |
|
116 | results['extensions'].append((name, docs.splitlines()[0])) | |
117 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): |
|
117 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): | |
118 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): |
|
118 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): | |
119 | cmdname = cmd.split('|')[0].lstrip('^') |
|
119 | cmdname = cmd.split('|')[0].lstrip('^') | |
120 | if entry[0].__doc__: |
|
120 | if entry[0].__doc__: | |
121 | cmddoc = gettext(entry[0].__doc__).splitlines()[0] |
|
121 | cmddoc = gettext(entry[0].__doc__).splitlines()[0] | |
122 | else: |
|
122 | else: | |
123 | cmddoc = _('(no help text available)') |
|
123 | cmddoc = _('(no help text available)') | |
124 | results['extensioncommands'].append((cmdname, cmddoc)) |
|
124 | results['extensioncommands'].append((cmdname, cmddoc)) | |
125 | return results |
|
125 | return results | |
126 |
|
126 | |||
127 | def loaddoc(topic): |
|
127 | def loaddoc(topic): | |
128 | """Return a delayed loader for help/topic.txt.""" |
|
128 | """Return a delayed loader for help/topic.txt.""" | |
129 |
|
129 | |||
130 | def loader(): |
|
130 | def loader(): | |
131 | if util.mainfrozen(): |
|
131 | if util.mainfrozen(): | |
132 | module = sys.executable |
|
132 | module = sys.executable | |
133 | else: |
|
133 | else: | |
134 | module = __file__ |
|
134 | module = __file__ | |
135 | base = os.path.dirname(module) |
|
135 | base = os.path.dirname(module) | |
136 |
|
136 | |||
137 | for dir in ('.', '..'): |
|
137 | for dir in ('.', '..'): | |
138 | docdir = os.path.join(base, dir, 'help') |
|
138 | docdir = os.path.join(base, dir, 'help') | |
139 | if os.path.isdir(docdir): |
|
139 | if os.path.isdir(docdir): | |
140 | break |
|
140 | break | |
141 |
|
141 | |||
142 | path = os.path.join(docdir, topic + ".txt") |
|
142 | path = os.path.join(docdir, topic + ".txt") | |
143 | doc = gettext(util.readfile(path)) |
|
143 | doc = gettext(util.readfile(path)) | |
144 | for rewriter in helphooks.get(topic, []): |
|
144 | for rewriter in helphooks.get(topic, []): | |
145 | doc = rewriter(topic, doc) |
|
145 | doc = rewriter(topic, doc) | |
146 | return doc |
|
146 | return doc | |
147 |
|
147 | |||
148 | return loader |
|
148 | return loader | |
149 |
|
149 | |||
150 | helptable = sorted([ |
|
150 | helptable = sorted([ | |
151 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), |
|
151 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), | |
152 | (["dates"], _("Date Formats"), loaddoc('dates')), |
|
152 | (["dates"], _("Date Formats"), loaddoc('dates')), | |
153 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), |
|
153 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), | |
154 | (['environment', 'env'], _('Environment Variables'), |
|
154 | (['environment', 'env'], _('Environment Variables'), | |
155 | loaddoc('environment')), |
|
155 | loaddoc('environment')), | |
156 | (['revisions', 'revs'], _('Specifying Single Revisions'), |
|
156 | (['revisions', 'revs'], _('Specifying Single Revisions'), | |
157 | loaddoc('revisions')), |
|
157 | loaddoc('revisions')), | |
158 | (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'), |
|
158 | (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'), | |
159 | loaddoc('multirevs')), |
|
159 | loaddoc('multirevs')), | |
160 | (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')), |
|
160 | (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')), | |
161 | (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')), |
|
161 | (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')), | |
162 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), |
|
162 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), | |
163 | (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')), |
|
163 | (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')), | |
164 | (['templating', 'templates', 'template', 'style'], _('Template Usage'), |
|
164 | (['templating', 'templates', 'template', 'style'], _('Template Usage'), | |
165 | loaddoc('templates')), |
|
165 | loaddoc('templates')), | |
166 | (['urls'], _('URL Paths'), loaddoc('urls')), |
|
166 | (['urls'], _('URL Paths'), loaddoc('urls')), | |
167 | (["extensions"], _("Using Additional Features"), extshelp), |
|
167 | (["extensions"], _("Using Additional Features"), extshelp), | |
168 | (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')), |
|
168 | (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')), | |
169 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), |
|
169 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), | |
170 | (["glossary"], _("Glossary"), loaddoc('glossary')), |
|
170 | (["glossary"], _("Glossary"), loaddoc('glossary')), | |
171 | (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), |
|
171 | (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), | |
172 | loaddoc('hgignore')), |
|
172 | loaddoc('hgignore')), | |
173 | (["phases"], _("Working with Phases"), loaddoc('phases')), |
|
173 | (["phases"], _("Working with Phases"), loaddoc('phases')), | |
174 | ]) |
|
174 | ]) | |
175 |
|
175 | |||
176 | # Map topics to lists of callable taking the current topic help and |
|
176 | # Map topics to lists of callable taking the current topic help and | |
177 | # returning the updated version |
|
177 | # returning the updated version | |
178 | helphooks = {} |
|
178 | helphooks = {} | |
179 |
|
179 | |||
180 | def addtopichook(topic, rewriter): |
|
180 | def addtopichook(topic, rewriter): | |
181 | helphooks.setdefault(topic, []).append(rewriter) |
|
181 | helphooks.setdefault(topic, []).append(rewriter) | |
182 |
|
182 | |||
183 | def makeitemsdoc(topic, doc, marker, items): |
|
183 | def makeitemsdoc(topic, doc, marker, items): | |
184 | """Extract docstring from the items key to function mapping, build a |
|
184 | """Extract docstring from the items key to function mapping, build a | |
185 | .single documentation block and use it to overwrite the marker in doc |
|
185 | .single documentation block and use it to overwrite the marker in doc | |
186 | """ |
|
186 | """ | |
187 | entries = [] |
|
187 | entries = [] | |
188 | for name in sorted(items): |
|
188 | for name in sorted(items): | |
189 | text = (items[name].__doc__ or '').rstrip() |
|
189 | text = (items[name].__doc__ or '').rstrip() | |
190 | if not text: |
|
190 | if not text: | |
191 | continue |
|
191 | continue | |
192 | text = gettext(text) |
|
192 | text = gettext(text) | |
193 | lines = text.splitlines() |
|
193 | lines = text.splitlines() | |
194 | doclines = [(lines[0])] |
|
194 | doclines = [(lines[0])] | |
195 | for l in lines[1:]: |
|
195 | for l in lines[1:]: | |
196 | # Stop once we find some Python doctest |
|
196 | # Stop once we find some Python doctest | |
197 | if l.strip().startswith('>>>'): |
|
197 | if l.strip().startswith('>>>'): | |
198 | break |
|
198 | break | |
199 | doclines.append(' ' + l.strip()) |
|
199 | doclines.append(' ' + l.strip()) | |
200 | entries.append('\n'.join(doclines)) |
|
200 | entries.append('\n'.join(doclines)) | |
201 | entries = '\n\n'.join(entries) |
|
201 | entries = '\n\n'.join(entries) | |
202 | return doc.replace(marker, entries) |
|
202 | return doc.replace(marker, entries) | |
203 |
|
203 | |||
204 | def addtopicsymbols(topic, marker, symbols): |
|
204 | def addtopicsymbols(topic, marker, symbols): | |
205 | def add(topic, doc): |
|
205 | def add(topic, doc): | |
206 | return makeitemsdoc(topic, doc, marker, symbols) |
|
206 | return makeitemsdoc(topic, doc, marker, symbols) | |
207 | addtopichook(topic, add) |
|
207 | addtopichook(topic, add) | |
208 |
|
208 | |||
209 | addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols) |
|
209 | addtopicsymbols('filesets', '.. predicatesmarker', fileset.symbols) | |
210 | addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals) |
|
210 | addtopicsymbols('merge-tools', '.. internaltoolsmarker', filemerge.internals) | |
211 | addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols) |
|
211 | addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols) | |
212 | addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords) |
|
212 | addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords) | |
213 | addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) |
|
213 | addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) | |
214 |
|
214 | |||
215 | def help_(ui, name, unknowncmd=False, full=True, **opts): |
|
215 | def help_(ui, name, unknowncmd=False, full=True, **opts): | |
216 | ''' |
|
216 | ''' | |
217 | Generate the help for 'name' as unformatted restructured text. If |
|
217 | Generate the help for 'name' as unformatted restructured text. If | |
218 | 'name' is None, describe the commands available. |
|
218 | 'name' is None, describe the commands available. | |
219 | ''' |
|
219 | ''' | |
220 |
|
220 | |||
221 | import commands # avoid cycle |
|
221 | import commands # avoid cycle | |
222 |
|
222 | |||
223 | def helpcmd(name): |
|
223 | def helpcmd(name): | |
224 | try: |
|
224 | try: | |
225 | aliases, entry = cmdutil.findcmd(name, commands.table, |
|
225 | aliases, entry = cmdutil.findcmd(name, commands.table, | |
226 | strict=unknowncmd) |
|
226 | strict=unknowncmd) | |
227 | except error.AmbiguousCommand, inst: |
|
227 | except error.AmbiguousCommand, inst: | |
228 | # py3k fix: except vars can't be used outside the scope of the |
|
228 | # py3k fix: except vars can't be used outside the scope of the | |
229 | # except block, nor can be used inside a lambda. python issue4617 |
|
229 | # except block, nor can be used inside a lambda. python issue4617 | |
230 | prefix = inst.args[0] |
|
230 | prefix = inst.args[0] | |
231 | select = lambda c: c.lstrip('^').startswith(prefix) |
|
231 | select = lambda c: c.lstrip('^').startswith(prefix) | |
232 | rst = helplist(select) |
|
232 | rst = helplist(select) | |
233 | return rst |
|
233 | return rst | |
234 |
|
234 | |||
235 | rst = [] |
|
235 | rst = [] | |
236 |
|
236 | |||
237 | # check if it's an invalid alias and display its error if it is |
|
237 | # check if it's an invalid alias and display its error if it is | |
238 | if getattr(entry[0], 'badalias', False): |
|
238 | if getattr(entry[0], 'badalias', False): | |
239 | if not unknowncmd: |
|
239 | if not unknowncmd: | |
240 | ui.pushbuffer() |
|
240 | ui.pushbuffer() | |
241 | entry[0](ui) |
|
241 | entry[0](ui) | |
242 | rst.append(ui.popbuffer()) |
|
242 | rst.append(ui.popbuffer()) | |
243 | return rst |
|
243 | return rst | |
244 |
|
244 | |||
245 | # synopsis |
|
245 | # synopsis | |
246 | if len(entry) > 2: |
|
246 | if len(entry) > 2: | |
247 | if entry[2].startswith('hg'): |
|
247 | if entry[2].startswith('hg'): | |
248 | rst.append("%s\n" % entry[2]) |
|
248 | rst.append("%s\n" % entry[2]) | |
249 | else: |
|
249 | else: | |
250 | rst.append('hg %s %s\n' % (aliases[0], entry[2])) |
|
250 | rst.append('hg %s %s\n' % (aliases[0], entry[2])) | |
251 | else: |
|
251 | else: | |
252 | rst.append('hg %s\n' % aliases[0]) |
|
252 | rst.append('hg %s\n' % aliases[0]) | |
253 | # aliases |
|
253 | # aliases | |
254 | if full and not ui.quiet and len(aliases) > 1: |
|
254 | if full and not ui.quiet and len(aliases) > 1: | |
255 | rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:])) |
|
255 | rst.append(_("\naliases: %s\n") % ', '.join(aliases[1:])) | |
256 | rst.append('\n') |
|
256 | rst.append('\n') | |
257 |
|
257 | |||
258 | # description |
|
258 | # description | |
259 | doc = gettext(entry[0].__doc__) |
|
259 | doc = gettext(entry[0].__doc__) | |
260 | if not doc: |
|
260 | if not doc: | |
261 | doc = _("(no help text available)") |
|
261 | doc = _("(no help text available)") | |
262 | if util.safehasattr(entry[0], 'definition'): # aliased command |
|
262 | if util.safehasattr(entry[0], 'definition'): # aliased command | |
263 | if entry[0].definition.startswith('!'): # shell alias |
|
263 | if entry[0].definition.startswith('!'): # shell alias | |
264 | doc = _('shell alias for::\n\n %s') % entry[0].definition[1:] |
|
264 | doc = _('shell alias for::\n\n %s') % entry[0].definition[1:] | |
265 | else: |
|
265 | else: | |
266 | doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) |
|
266 | doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) | |
267 | doc = doc.splitlines(True) |
|
267 | doc = doc.splitlines(True) | |
268 | if ui.quiet or not full: |
|
268 | if ui.quiet or not full: | |
269 | rst.append(doc[0]) |
|
269 | rst.append(doc[0]) | |
270 | else: |
|
270 | else: | |
271 | rst.extend(doc) |
|
271 | rst.extend(doc) | |
272 | rst.append('\n') |
|
272 | rst.append('\n') | |
273 |
|
273 | |||
274 | # check if this command shadows a non-trivial (multi-line) |
|
274 | # check if this command shadows a non-trivial (multi-line) | |
275 | # extension help text |
|
275 | # extension help text | |
276 | try: |
|
276 | try: | |
277 | mod = extensions.find(name) |
|
277 | mod = extensions.find(name) | |
278 | doc = gettext(mod.__doc__) or '' |
|
278 | doc = gettext(mod.__doc__) or '' | |
279 | if '\n' in doc.strip(): |
|
279 | if '\n' in doc.strip(): | |
280 | msg = _('(use "hg help -e %s" to show help for ' |
|
280 | msg = _('(use "hg help -e %s" to show help for ' | |
281 | 'the %s extension)') % (name, name) |
|
281 | 'the %s extension)') % (name, name) | |
282 | rst.append('\n%s\n' % msg) |
|
282 | rst.append('\n%s\n' % msg) | |
283 | except KeyError: |
|
283 | except KeyError: | |
284 | pass |
|
284 | pass | |
285 |
|
285 | |||
286 | # options |
|
286 | # options | |
287 | if not ui.quiet and entry[1]: |
|
287 | if not ui.quiet and entry[1]: | |
288 | rst.append(optrst(_("options"), entry[1], ui.verbose)) |
|
288 | rst.append(optrst(_("options"), entry[1], ui.verbose)) | |
289 |
|
289 | |||
290 | if ui.verbose: |
|
290 | if ui.verbose: | |
291 | rst.append(optrst(_("global options"), |
|
291 | rst.append(optrst(_("global options"), | |
292 | commands.globalopts, ui.verbose)) |
|
292 | commands.globalopts, ui.verbose)) | |
293 |
|
293 | |||
294 | if not ui.verbose: |
|
294 | if not ui.verbose: | |
295 | if not full: |
|
295 | if not full: | |
296 | rst.append(_('\n(use "hg %s -h" to show more help)\n') |
|
296 | rst.append(_('\n(use "hg %s -h" to show more help)\n') | |
297 | % name) |
|
297 | % name) | |
298 | elif not ui.quiet: |
|
298 | elif not ui.quiet: | |
299 | rst.append(_('\n(some details hidden, use --verbose ' |
|
299 | rst.append(_('\n(some details hidden, use --verbose ' | |
300 | 'to show complete help)')) |
|
300 | 'to show complete help)')) | |
301 |
|
301 | |||
302 | return rst |
|
302 | return rst | |
303 |
|
303 | |||
304 |
|
304 | |||
305 | def helplist(select=None): |
|
305 | def helplist(select=None): | |
306 | # list of commands |
|
306 | # list of commands | |
307 | if name == "shortlist": |
|
307 | if name == "shortlist": | |
308 | header = _('basic commands:\n\n') |
|
308 | header = _('basic commands:\n\n') | |
309 | elif name == "debug": |
|
309 | elif name == "debug": | |
310 | header = _('debug commands (internal and unsupported):\n\n') |
|
310 | header = _('debug commands (internal and unsupported):\n\n') | |
311 | else: |
|
311 | else: | |
312 | header = _('list of commands:\n\n') |
|
312 | header = _('list of commands:\n\n') | |
313 |
|
313 | |||
314 | h = {} |
|
314 | h = {} | |
315 | cmds = {} |
|
315 | cmds = {} | |
316 | for c, e in commands.table.iteritems(): |
|
316 | for c, e in commands.table.iteritems(): | |
317 | f = c.split("|", 1)[0] |
|
317 | f = c.split("|", 1)[0] | |
318 | if select and not select(f): |
|
318 | if select and not select(f): | |
319 | continue |
|
319 | continue | |
320 | if (not select and name != 'shortlist' and |
|
320 | if (not select and name != 'shortlist' and | |
321 | e[0].__module__ != commands.__name__): |
|
321 | e[0].__module__ != commands.__name__): | |
322 | continue |
|
322 | continue | |
323 | if name == "shortlist" and not f.startswith("^"): |
|
323 | if name == "shortlist" and not f.startswith("^"): | |
324 | continue |
|
324 | continue | |
325 | f = f.lstrip("^") |
|
325 | f = f.lstrip("^") | |
326 | if not ui.debugflag and f.startswith("debug") and name != "debug": |
|
326 | if not ui.debugflag and f.startswith("debug") and name != "debug": | |
327 | continue |
|
327 | continue | |
328 | doc = e[0].__doc__ |
|
328 | doc = e[0].__doc__ | |
329 | if doc and 'DEPRECATED' in doc and not ui.verbose: |
|
329 | if doc and 'DEPRECATED' in doc and not ui.verbose: | |
330 | continue |
|
330 | continue | |
331 | doc = gettext(doc) |
|
331 | doc = gettext(doc) | |
332 | if not doc: |
|
332 | if not doc: | |
333 | doc = _("(no help text available)") |
|
333 | doc = _("(no help text available)") | |
334 | h[f] = doc.splitlines()[0].rstrip() |
|
334 | h[f] = doc.splitlines()[0].rstrip() | |
335 | cmds[f] = c.lstrip("^") |
|
335 | cmds[f] = c.lstrip("^") | |
336 |
|
336 | |||
337 | rst = [] |
|
337 | rst = [] | |
338 | if not h: |
|
338 | if not h: | |
339 | if not ui.quiet: |
|
339 | if not ui.quiet: | |
340 | rst.append(_('no commands defined\n')) |
|
340 | rst.append(_('no commands defined\n')) | |
341 | return rst |
|
341 | return rst | |
342 |
|
342 | |||
343 | if not ui.quiet: |
|
343 | if not ui.quiet: | |
344 | rst.append(header) |
|
344 | rst.append(header) | |
345 | fns = sorted(h) |
|
345 | fns = sorted(h) | |
346 | for f in fns: |
|
346 | for f in fns: | |
347 | if ui.verbose: |
|
347 | if ui.verbose: | |
348 | commacmds = cmds[f].replace("|",", ") |
|
348 | commacmds = cmds[f].replace("|",", ") | |
349 | rst.append(" :%s: %s\n" % (commacmds, h[f])) |
|
349 | rst.append(" :%s: %s\n" % (commacmds, h[f])) | |
350 | else: |
|
350 | else: | |
351 | rst.append(' :%s: %s\n' % (f, h[f])) |
|
351 | rst.append(' :%s: %s\n' % (f, h[f])) | |
352 |
|
352 | |||
353 | if not name: |
|
353 | if not name: | |
354 | exts = listexts(_('enabled extensions:'), extensions.enabled()) |
|
354 | exts = listexts(_('enabled extensions:'), extensions.enabled()) | |
355 | if exts: |
|
355 | if exts: | |
356 | rst.append('\n') |
|
356 | rst.append('\n') | |
357 | rst.extend(exts) |
|
357 | rst.extend(exts) | |
358 |
|
358 | |||
359 | rst.append(_("\nadditional help topics:\n\n")) |
|
359 | rst.append(_("\nadditional help topics:\n\n")) | |
360 | topics = [] |
|
360 | topics = [] | |
361 | for names, header, doc in helptable: |
|
361 | for names, header, doc in helptable: | |
362 | topics.append((names[0], header)) |
|
362 | topics.append((names[0], header)) | |
363 | for t, desc in topics: |
|
363 | for t, desc in topics: | |
364 | rst.append(" :%s: %s\n" % (t, desc)) |
|
364 | rst.append(" :%s: %s\n" % (t, desc)) | |
365 |
|
365 | |||
366 | if ui.quiet: |
|
366 | if ui.quiet: | |
367 | pass |
|
367 | pass | |
368 | elif ui.verbose: |
|
368 | elif ui.verbose: | |
369 | rst.append('\n%s\n' % optrst(_("global options"), |
|
369 | rst.append('\n%s\n' % optrst(_("global options"), | |
370 | commands.globalopts, ui.verbose)) |
|
370 | commands.globalopts, ui.verbose)) | |
371 | if name == 'shortlist': |
|
371 | if name == 'shortlist': | |
372 | rst.append(_('\nuse "hg help" for the full list ' |
|
372 | rst.append(_('\n(use "hg help" for the full list ' | |
373 | 'of commands\n')) |
|
373 | 'of commands)\n')) | |
374 | else: |
|
374 | else: | |
375 | if name == 'shortlist': |
|
375 | if name == 'shortlist': | |
376 | rst.append(_('\nuse "hg help" for the full list of commands ' |
|
376 | rst.append(_('\n(use "hg help" for the full list of commands ' | |
377 | 'or "hg -v" for details\n')) |
|
377 | 'or "hg -v" for details)\n')) | |
378 | elif name and not full: |
|
378 | elif name and not full: | |
379 | rst.append(_('\nuse "hg help %s" to show the full help ' |
|
379 | rst.append(_('\n(use "hg help %s" to show the full help ' | |
380 | 'text\n') % name) |
|
380 | 'text)\n') % name) | |
381 | else: |
|
381 | else: | |
382 |
rst.append(_('\nuse "hg |
|
382 | rst.append(_('\n(use "hg help -v%s" to show built-in aliases ' | |
383 |
'global options\n') |
|
383 | 'and global options)\n') | |
|
384 | % (name and " " + name or "")) | |||
384 | return rst |
|
385 | return rst | |
385 |
|
386 | |||
386 | def helptopic(name): |
|
387 | def helptopic(name): | |
387 | for names, header, doc in helptable: |
|
388 | for names, header, doc in helptable: | |
388 | if name in names: |
|
389 | if name in names: | |
389 | break |
|
390 | break | |
390 | else: |
|
391 | else: | |
391 | raise error.UnknownCommand(name) |
|
392 | raise error.UnknownCommand(name) | |
392 |
|
393 | |||
393 | rst = [minirst.section(header)] |
|
394 | rst = [minirst.section(header)] | |
394 |
|
395 | |||
395 | # description |
|
396 | # description | |
396 | if not doc: |
|
397 | if not doc: | |
397 | rst.append(" %s\n" % _("(no help text available)")) |
|
398 | rst.append(" %s\n" % _("(no help text available)")) | |
398 | if callable(doc): |
|
399 | if callable(doc): | |
399 | rst += [" %s\n" % l for l in doc().splitlines()] |
|
400 | rst += [" %s\n" % l for l in doc().splitlines()] | |
400 |
|
401 | |||
401 | if not ui.verbose: |
|
402 | if not ui.verbose: | |
402 | omitted = _('(some details hidden, use --verbose' |
|
403 | omitted = _('(some details hidden, use --verbose' | |
403 | ' to show complete help)') |
|
404 | ' to show complete help)') | |
404 | indicateomitted(rst, omitted) |
|
405 | indicateomitted(rst, omitted) | |
405 |
|
406 | |||
406 | try: |
|
407 | try: | |
407 | cmdutil.findcmd(name, commands.table) |
|
408 | cmdutil.findcmd(name, commands.table) | |
408 | rst.append(_('\nuse "hg help -c %s" to see help for ' |
|
409 | rst.append(_('\nuse "hg help -c %s" to see help for ' | |
409 | 'the %s command\n') % (name, name)) |
|
410 | 'the %s command\n') % (name, name)) | |
410 | except error.UnknownCommand: |
|
411 | except error.UnknownCommand: | |
411 | pass |
|
412 | pass | |
412 | return rst |
|
413 | return rst | |
413 |
|
414 | |||
414 | def helpext(name): |
|
415 | def helpext(name): | |
415 | try: |
|
416 | try: | |
416 | mod = extensions.find(name) |
|
417 | mod = extensions.find(name) | |
417 | doc = gettext(mod.__doc__) or _('no help text available') |
|
418 | doc = gettext(mod.__doc__) or _('no help text available') | |
418 | except KeyError: |
|
419 | except KeyError: | |
419 | mod = None |
|
420 | mod = None | |
420 | doc = extensions.disabledext(name) |
|
421 | doc = extensions.disabledext(name) | |
421 | if not doc: |
|
422 | if not doc: | |
422 | raise error.UnknownCommand(name) |
|
423 | raise error.UnknownCommand(name) | |
423 |
|
424 | |||
424 | if '\n' not in doc: |
|
425 | if '\n' not in doc: | |
425 | head, tail = doc, "" |
|
426 | head, tail = doc, "" | |
426 | else: |
|
427 | else: | |
427 | head, tail = doc.split('\n', 1) |
|
428 | head, tail = doc.split('\n', 1) | |
428 | rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)] |
|
429 | rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)] | |
429 | if tail: |
|
430 | if tail: | |
430 | rst.extend(tail.splitlines(True)) |
|
431 | rst.extend(tail.splitlines(True)) | |
431 | rst.append('\n') |
|
432 | rst.append('\n') | |
432 |
|
433 | |||
433 | if not ui.verbose: |
|
434 | if not ui.verbose: | |
434 | omitted = _('(some details hidden, use --verbose' |
|
435 | omitted = _('(some details hidden, use --verbose' | |
435 | ' to show complete help)') |
|
436 | ' to show complete help)') | |
436 | indicateomitted(rst, omitted) |
|
437 | indicateomitted(rst, omitted) | |
437 |
|
438 | |||
438 | if mod: |
|
439 | if mod: | |
439 | try: |
|
440 | try: | |
440 | ct = mod.cmdtable |
|
441 | ct = mod.cmdtable | |
441 | except AttributeError: |
|
442 | except AttributeError: | |
442 | ct = {} |
|
443 | ct = {} | |
443 | modcmds = set([c.split('|', 1)[0] for c in ct]) |
|
444 | modcmds = set([c.split('|', 1)[0] for c in ct]) | |
444 | rst.extend(helplist(modcmds.__contains__)) |
|
445 | rst.extend(helplist(modcmds.__contains__)) | |
445 | else: |
|
446 | else: | |
446 | rst.append(_('(use "hg help extensions" for information on enabling' |
|
447 | rst.append(_('(use "hg help extensions" for information on enabling' | |
447 | ' extensions)\n')) |
|
448 | ' extensions)\n')) | |
448 | return rst |
|
449 | return rst | |
449 |
|
450 | |||
450 | def helpextcmd(name): |
|
451 | def helpextcmd(name): | |
451 | cmd, ext, mod = extensions.disabledcmd(ui, name, |
|
452 | cmd, ext, mod = extensions.disabledcmd(ui, name, | |
452 | ui.configbool('ui', 'strict')) |
|
453 | ui.configbool('ui', 'strict')) | |
453 | doc = gettext(mod.__doc__).splitlines()[0] |
|
454 | doc = gettext(mod.__doc__).splitlines()[0] | |
454 |
|
455 | |||
455 | rst = listexts(_("'%s' is provided by the following " |
|
456 | rst = listexts(_("'%s' is provided by the following " | |
456 | "extension:") % cmd, {ext: doc}, indent=4) |
|
457 | "extension:") % cmd, {ext: doc}, indent=4) | |
457 | rst.append('\n') |
|
458 | rst.append('\n') | |
458 | rst.append(_('(use "hg help extensions" for information on enabling ' |
|
459 | rst.append(_('(use "hg help extensions" for information on enabling ' | |
459 | 'extensions)\n')) |
|
460 | 'extensions)\n')) | |
460 | return rst |
|
461 | return rst | |
461 |
|
462 | |||
462 |
|
463 | |||
463 | rst = [] |
|
464 | rst = [] | |
464 | kw = opts.get('keyword') |
|
465 | kw = opts.get('keyword') | |
465 | if kw: |
|
466 | if kw: | |
466 | matches = topicmatch(kw) |
|
467 | matches = topicmatch(kw) | |
467 | for t, title in (('topics', _('Topics')), |
|
468 | for t, title in (('topics', _('Topics')), | |
468 | ('commands', _('Commands')), |
|
469 | ('commands', _('Commands')), | |
469 | ('extensions', _('Extensions')), |
|
470 | ('extensions', _('Extensions')), | |
470 | ('extensioncommands', _('Extension Commands'))): |
|
471 | ('extensioncommands', _('Extension Commands'))): | |
471 | if matches[t]: |
|
472 | if matches[t]: | |
472 | rst.append('%s:\n\n' % title) |
|
473 | rst.append('%s:\n\n' % title) | |
473 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) |
|
474 | rst.extend(minirst.maketable(sorted(matches[t]), 1)) | |
474 | rst.append('\n') |
|
475 | rst.append('\n') | |
475 | if not rst: |
|
476 | if not rst: | |
476 | msg = _('no matches') |
|
477 | msg = _('no matches') | |
477 | hint = _('try "hg help" for a list of topics') |
|
478 | hint = _('try "hg help" for a list of topics') | |
478 | raise util.Abort(msg, hint=hint) |
|
479 | raise util.Abort(msg, hint=hint) | |
479 | elif name and name != 'shortlist': |
|
480 | elif name and name != 'shortlist': | |
480 | if unknowncmd: |
|
481 | if unknowncmd: | |
481 | queries = (helpextcmd,) |
|
482 | queries = (helpextcmd,) | |
482 | elif opts.get('extension'): |
|
483 | elif opts.get('extension'): | |
483 | queries = (helpext,) |
|
484 | queries = (helpext,) | |
484 | elif opts.get('command'): |
|
485 | elif opts.get('command'): | |
485 | queries = (helpcmd,) |
|
486 | queries = (helpcmd,) | |
486 | else: |
|
487 | else: | |
487 | queries = (helptopic, helpcmd, helpext, helpextcmd) |
|
488 | queries = (helptopic, helpcmd, helpext, helpextcmd) | |
488 | for f in queries: |
|
489 | for f in queries: | |
489 | try: |
|
490 | try: | |
490 | rst = f(name) |
|
491 | rst = f(name) | |
491 | break |
|
492 | break | |
492 | except error.UnknownCommand: |
|
493 | except error.UnknownCommand: | |
493 | pass |
|
494 | pass | |
494 | else: |
|
495 | else: | |
495 | if unknowncmd: |
|
496 | if unknowncmd: | |
496 | raise error.UnknownCommand(name) |
|
497 | raise error.UnknownCommand(name) | |
497 | else: |
|
498 | else: | |
498 | msg = _('no such help topic: %s') % name |
|
499 | msg = _('no such help topic: %s') % name | |
499 | hint = _('try "hg help --keyword %s"') % name |
|
500 | hint = _('try "hg help --keyword %s"') % name | |
500 | raise util.Abort(msg, hint=hint) |
|
501 | raise util.Abort(msg, hint=hint) | |
501 | else: |
|
502 | else: | |
502 | # program name |
|
503 | # program name | |
503 | if not ui.quiet: |
|
504 | if not ui.quiet: | |
504 | rst = [_("Mercurial Distributed SCM\n"), '\n'] |
|
505 | rst = [_("Mercurial Distributed SCM\n"), '\n'] | |
505 | rst.extend(helplist()) |
|
506 | rst.extend(helplist()) | |
506 |
|
507 | |||
507 | return ''.join(rst) |
|
508 | return ''.join(rst) |
@@ -1,474 +1,474 b'' | |||||
1 | $ HGFOO=BAR; export HGFOO |
|
1 | $ HGFOO=BAR; export HGFOO | |
2 | $ cat >> $HGRCPATH <<EOF |
|
2 | $ cat >> $HGRCPATH <<EOF | |
3 | > [alias] |
|
3 | > [alias] | |
4 | > # should clobber ci but not commit (issue2993) |
|
4 | > # should clobber ci but not commit (issue2993) | |
5 | > ci = version |
|
5 | > ci = version | |
6 | > myinit = init |
|
6 | > myinit = init | |
7 | > mycommit = commit |
|
7 | > mycommit = commit | |
8 | > optionalrepo = showconfig alias.myinit |
|
8 | > optionalrepo = showconfig alias.myinit | |
9 | > cleanstatus = status -c |
|
9 | > cleanstatus = status -c | |
10 | > unknown = bargle |
|
10 | > unknown = bargle | |
11 | > ambiguous = s |
|
11 | > ambiguous = s | |
12 | > recursive = recursive |
|
12 | > recursive = recursive | |
13 | > nodefinition = |
|
13 | > nodefinition = | |
14 | > noclosingquotation = ' |
|
14 | > noclosingquotation = ' | |
15 | > no--cwd = status --cwd elsewhere |
|
15 | > no--cwd = status --cwd elsewhere | |
16 | > no-R = status -R elsewhere |
|
16 | > no-R = status -R elsewhere | |
17 | > no--repo = status --repo elsewhere |
|
17 | > no--repo = status --repo elsewhere | |
18 | > no--repository = status --repository elsewhere |
|
18 | > no--repository = status --repository elsewhere | |
19 | > no--config = status --config a.config=1 |
|
19 | > no--config = status --config a.config=1 | |
20 | > mylog = log |
|
20 | > mylog = log | |
21 | > lognull = log -r null |
|
21 | > lognull = log -r null | |
22 | > shortlog = log --template '{rev} {node|short} | {date|isodate}\n' |
|
22 | > shortlog = log --template '{rev} {node|short} | {date|isodate}\n' | |
23 | > positional = log --template '{\$2} {\$1} | {date|isodate}\n' |
|
23 | > positional = log --template '{\$2} {\$1} | {date|isodate}\n' | |
24 | > dln = lognull --debug |
|
24 | > dln = lognull --debug | |
25 | > nousage = rollback |
|
25 | > nousage = rollback | |
26 | > put = export -r 0 -o "\$FOO/%R.diff" |
|
26 | > put = export -r 0 -o "\$FOO/%R.diff" | |
27 | > blank = !printf '\n' |
|
27 | > blank = !printf '\n' | |
28 | > self = !printf '\$0\n' |
|
28 | > self = !printf '\$0\n' | |
29 | > echoall = !printf '\$@\n' |
|
29 | > echoall = !printf '\$@\n' | |
30 | > echo1 = !printf '\$1\n' |
|
30 | > echo1 = !printf '\$1\n' | |
31 | > echo2 = !printf '\$2\n' |
|
31 | > echo2 = !printf '\$2\n' | |
32 | > echo13 = !printf '\$1 \$3\n' |
|
32 | > echo13 = !printf '\$1 \$3\n' | |
33 | > count = !hg log -r "\$@" --template=. | wc -c | sed -e 's/ //g' |
|
33 | > count = !hg log -r "\$@" --template=. | wc -c | sed -e 's/ //g' | |
34 | > mcount = !hg log \$@ --template=. | wc -c | sed -e 's/ //g' |
|
34 | > mcount = !hg log \$@ --template=. | wc -c | sed -e 's/ //g' | |
35 | > rt = root |
|
35 | > rt = root | |
36 | > tglog = log -G --template "{rev}:{node|short}: '{desc}' {branches}\n" |
|
36 | > tglog = log -G --template "{rev}:{node|short}: '{desc}' {branches}\n" | |
37 | > idalias = id |
|
37 | > idalias = id | |
38 | > idaliaslong = id |
|
38 | > idaliaslong = id | |
39 | > idaliasshell = !echo test |
|
39 | > idaliasshell = !echo test | |
40 | > parentsshell1 = !echo one |
|
40 | > parentsshell1 = !echo one | |
41 | > parentsshell2 = !echo two |
|
41 | > parentsshell2 = !echo two | |
42 | > escaped1 = !printf 'test\$\$test\n' |
|
42 | > escaped1 = !printf 'test\$\$test\n' | |
43 | > escaped2 = !sh -c 'echo "HGFOO is \$\$HGFOO"' |
|
43 | > escaped2 = !sh -c 'echo "HGFOO is \$\$HGFOO"' | |
44 | > escaped3 = !sh -c 'echo "\$1 is \$\$\$1"' |
|
44 | > escaped3 = !sh -c 'echo "\$1 is \$\$\$1"' | |
45 | > escaped4 = !printf '\$\$0 \$\$@\n' |
|
45 | > escaped4 = !printf '\$\$0 \$\$@\n' | |
46 | > exit1 = !sh -c 'exit 1' |
|
46 | > exit1 = !sh -c 'exit 1' | |
47 | > |
|
47 | > | |
48 | > [defaults] |
|
48 | > [defaults] | |
49 | > mylog = -q |
|
49 | > mylog = -q | |
50 | > lognull = -q |
|
50 | > lognull = -q | |
51 | > log = -v |
|
51 | > log = -v | |
52 | > EOF |
|
52 | > EOF | |
53 |
|
53 | |||
54 |
|
54 | |||
55 | basic |
|
55 | basic | |
56 |
|
56 | |||
57 | $ hg myinit alias |
|
57 | $ hg myinit alias | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | unknown |
|
60 | unknown | |
61 |
|
61 | |||
62 | $ hg unknown |
|
62 | $ hg unknown | |
63 | alias 'unknown' resolves to unknown command 'bargle' |
|
63 | alias 'unknown' resolves to unknown command 'bargle' | |
64 | [255] |
|
64 | [255] | |
65 | $ hg help unknown |
|
65 | $ hg help unknown | |
66 | alias 'unknown' resolves to unknown command 'bargle' |
|
66 | alias 'unknown' resolves to unknown command 'bargle' | |
67 |
|
67 | |||
68 |
|
68 | |||
69 | ambiguous |
|
69 | ambiguous | |
70 |
|
70 | |||
71 | $ hg ambiguous |
|
71 | $ hg ambiguous | |
72 | alias 'ambiguous' resolves to ambiguous command 's' |
|
72 | alias 'ambiguous' resolves to ambiguous command 's' | |
73 | [255] |
|
73 | [255] | |
74 | $ hg help ambiguous |
|
74 | $ hg help ambiguous | |
75 | alias 'ambiguous' resolves to ambiguous command 's' |
|
75 | alias 'ambiguous' resolves to ambiguous command 's' | |
76 |
|
76 | |||
77 |
|
77 | |||
78 | recursive |
|
78 | recursive | |
79 |
|
79 | |||
80 | $ hg recursive |
|
80 | $ hg recursive | |
81 | alias 'recursive' resolves to unknown command 'recursive' |
|
81 | alias 'recursive' resolves to unknown command 'recursive' | |
82 | [255] |
|
82 | [255] | |
83 | $ hg help recursive |
|
83 | $ hg help recursive | |
84 | alias 'recursive' resolves to unknown command 'recursive' |
|
84 | alias 'recursive' resolves to unknown command 'recursive' | |
85 |
|
85 | |||
86 |
|
86 | |||
87 | no definition |
|
87 | no definition | |
88 |
|
88 | |||
89 | $ hg nodef |
|
89 | $ hg nodef | |
90 | no definition for alias 'nodefinition' |
|
90 | no definition for alias 'nodefinition' | |
91 | [255] |
|
91 | [255] | |
92 | $ hg help nodef |
|
92 | $ hg help nodef | |
93 | no definition for alias 'nodefinition' |
|
93 | no definition for alias 'nodefinition' | |
94 |
|
94 | |||
95 |
|
95 | |||
96 | no closing quotation |
|
96 | no closing quotation | |
97 |
|
97 | |||
98 | $ hg noclosing |
|
98 | $ hg noclosing | |
99 | error in definition for alias 'noclosingquotation': No closing quotation |
|
99 | error in definition for alias 'noclosingquotation': No closing quotation | |
100 | [255] |
|
100 | [255] | |
101 | $ hg help noclosing |
|
101 | $ hg help noclosing | |
102 | error in definition for alias 'noclosingquotation': No closing quotation |
|
102 | error in definition for alias 'noclosingquotation': No closing quotation | |
103 |
|
103 | |||
104 |
|
104 | |||
105 | invalid options |
|
105 | invalid options | |
106 |
|
106 | |||
107 | $ hg no--cwd |
|
107 | $ hg no--cwd | |
108 | error in definition for alias 'no--cwd': --cwd may only be given on the command line |
|
108 | error in definition for alias 'no--cwd': --cwd may only be given on the command line | |
109 | [255] |
|
109 | [255] | |
110 | $ hg help no--cwd |
|
110 | $ hg help no--cwd | |
111 | error in definition for alias 'no--cwd': --cwd may only be given on the command line |
|
111 | error in definition for alias 'no--cwd': --cwd may only be given on the command line | |
112 | $ hg no-R |
|
112 | $ hg no-R | |
113 | error in definition for alias 'no-R': -R may only be given on the command line |
|
113 | error in definition for alias 'no-R': -R may only be given on the command line | |
114 | [255] |
|
114 | [255] | |
115 | $ hg help no-R |
|
115 | $ hg help no-R | |
116 | error in definition for alias 'no-R': -R may only be given on the command line |
|
116 | error in definition for alias 'no-R': -R may only be given on the command line | |
117 | $ hg no--repo |
|
117 | $ hg no--repo | |
118 | error in definition for alias 'no--repo': --repo may only be given on the command line |
|
118 | error in definition for alias 'no--repo': --repo may only be given on the command line | |
119 | [255] |
|
119 | [255] | |
120 | $ hg help no--repo |
|
120 | $ hg help no--repo | |
121 | error in definition for alias 'no--repo': --repo may only be given on the command line |
|
121 | error in definition for alias 'no--repo': --repo may only be given on the command line | |
122 | $ hg no--repository |
|
122 | $ hg no--repository | |
123 | error in definition for alias 'no--repository': --repository may only be given on the command line |
|
123 | error in definition for alias 'no--repository': --repository may only be given on the command line | |
124 | [255] |
|
124 | [255] | |
125 | $ hg help no--repository |
|
125 | $ hg help no--repository | |
126 | error in definition for alias 'no--repository': --repository may only be given on the command line |
|
126 | error in definition for alias 'no--repository': --repository may only be given on the command line | |
127 | $ hg no--config |
|
127 | $ hg no--config | |
128 | error in definition for alias 'no--config': --config may only be given on the command line |
|
128 | error in definition for alias 'no--config': --config may only be given on the command line | |
129 | [255] |
|
129 | [255] | |
130 |
|
130 | |||
131 | optional repository |
|
131 | optional repository | |
132 |
|
132 | |||
133 | #if no-outer-repo |
|
133 | #if no-outer-repo | |
134 | $ hg optionalrepo |
|
134 | $ hg optionalrepo | |
135 | init |
|
135 | init | |
136 | #endif |
|
136 | #endif | |
137 | $ cd alias |
|
137 | $ cd alias | |
138 | $ cat > .hg/hgrc <<EOF |
|
138 | $ cat > .hg/hgrc <<EOF | |
139 | > [alias] |
|
139 | > [alias] | |
140 | > myinit = init -q |
|
140 | > myinit = init -q | |
141 | > EOF |
|
141 | > EOF | |
142 | $ hg optionalrepo |
|
142 | $ hg optionalrepo | |
143 | init -q |
|
143 | init -q | |
144 |
|
144 | |||
145 | no usage |
|
145 | no usage | |
146 |
|
146 | |||
147 | $ hg nousage |
|
147 | $ hg nousage | |
148 | no rollback information available |
|
148 | no rollback information available | |
149 | [1] |
|
149 | [1] | |
150 |
|
150 | |||
151 | $ echo foo > foo |
|
151 | $ echo foo > foo | |
152 | $ hg commit -Amfoo |
|
152 | $ hg commit -Amfoo | |
153 | adding foo |
|
153 | adding foo | |
154 |
|
154 | |||
155 |
|
155 | |||
156 | with opts |
|
156 | with opts | |
157 |
|
157 | |||
158 | $ hg cleanst |
|
158 | $ hg cleanst | |
159 | C foo |
|
159 | C foo | |
160 |
|
160 | |||
161 |
|
161 | |||
162 | with opts and whitespace |
|
162 | with opts and whitespace | |
163 |
|
163 | |||
164 | $ hg shortlog |
|
164 | $ hg shortlog | |
165 | 0 e63c23eaa88a | 1970-01-01 00:00 +0000 |
|
165 | 0 e63c23eaa88a | 1970-01-01 00:00 +0000 | |
166 |
|
166 | |||
167 | positional arguments |
|
167 | positional arguments | |
168 |
|
168 | |||
169 | $ hg positional |
|
169 | $ hg positional | |
170 | abort: too few arguments for command alias |
|
170 | abort: too few arguments for command alias | |
171 | [255] |
|
171 | [255] | |
172 | $ hg positional a |
|
172 | $ hg positional a | |
173 | abort: too few arguments for command alias |
|
173 | abort: too few arguments for command alias | |
174 | [255] |
|
174 | [255] | |
175 | $ hg positional 'node|short' rev |
|
175 | $ hg positional 'node|short' rev | |
176 | 0 e63c23eaa88a | 1970-01-01 00:00 +0000 |
|
176 | 0 e63c23eaa88a | 1970-01-01 00:00 +0000 | |
177 |
|
177 | |||
178 | interaction with defaults |
|
178 | interaction with defaults | |
179 |
|
179 | |||
180 | $ hg mylog |
|
180 | $ hg mylog | |
181 | 0:e63c23eaa88a |
|
181 | 0:e63c23eaa88a | |
182 | $ hg lognull |
|
182 | $ hg lognull | |
183 | -1:000000000000 |
|
183 | -1:000000000000 | |
184 |
|
184 | |||
185 |
|
185 | |||
186 | properly recursive |
|
186 | properly recursive | |
187 |
|
187 | |||
188 | $ hg dln |
|
188 | $ hg dln | |
189 | changeset: -1:0000000000000000000000000000000000000000 |
|
189 | changeset: -1:0000000000000000000000000000000000000000 | |
190 | parent: -1:0000000000000000000000000000000000000000 |
|
190 | parent: -1:0000000000000000000000000000000000000000 | |
191 | parent: -1:0000000000000000000000000000000000000000 |
|
191 | parent: -1:0000000000000000000000000000000000000000 | |
192 | manifest: -1:0000000000000000000000000000000000000000 |
|
192 | manifest: -1:0000000000000000000000000000000000000000 | |
193 | user: |
|
193 | user: | |
194 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
194 | date: Thu Jan 01 00:00:00 1970 +0000 | |
195 | extra: branch=default |
|
195 | extra: branch=default | |
196 |
|
196 | |||
197 |
|
197 | |||
198 |
|
198 | |||
199 | path expanding |
|
199 | path expanding | |
200 |
|
200 | |||
201 | $ FOO=`pwd` hg put |
|
201 | $ FOO=`pwd` hg put | |
202 | $ cat 0.diff |
|
202 | $ cat 0.diff | |
203 | # HG changeset patch |
|
203 | # HG changeset patch | |
204 | # User test |
|
204 | # User test | |
205 | # Date 0 0 |
|
205 | # Date 0 0 | |
206 | # Thu Jan 01 00:00:00 1970 +0000 |
|
206 | # Thu Jan 01 00:00:00 1970 +0000 | |
207 | # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0 |
|
207 | # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0 | |
208 | # Parent 0000000000000000000000000000000000000000 |
|
208 | # Parent 0000000000000000000000000000000000000000 | |
209 | foo |
|
209 | foo | |
210 |
|
210 | |||
211 | diff -r 000000000000 -r e63c23eaa88a foo |
|
211 | diff -r 000000000000 -r e63c23eaa88a foo | |
212 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
212 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
213 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
213 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
214 | @@ -0,0 +1,1 @@ |
|
214 | @@ -0,0 +1,1 @@ | |
215 | +foo |
|
215 | +foo | |
216 |
|
216 | |||
217 |
|
217 | |||
218 | simple shell aliases |
|
218 | simple shell aliases | |
219 |
|
219 | |||
220 | $ hg blank |
|
220 | $ hg blank | |
221 |
|
221 | |||
222 | $ hg blank foo |
|
222 | $ hg blank foo | |
223 |
|
223 | |||
224 | $ hg self |
|
224 | $ hg self | |
225 | self |
|
225 | self | |
226 | $ hg echoall |
|
226 | $ hg echoall | |
227 |
|
227 | |||
228 | $ hg echoall foo |
|
228 | $ hg echoall foo | |
229 | foo |
|
229 | foo | |
230 | $ hg echoall 'test $2' foo |
|
230 | $ hg echoall 'test $2' foo | |
231 | test $2 foo |
|
231 | test $2 foo | |
232 | $ hg echo1 foo bar baz |
|
232 | $ hg echo1 foo bar baz | |
233 | foo |
|
233 | foo | |
234 | $ hg echo2 foo bar baz |
|
234 | $ hg echo2 foo bar baz | |
235 | bar |
|
235 | bar | |
236 | $ hg echo13 foo bar baz test |
|
236 | $ hg echo13 foo bar baz test | |
237 | foo baz |
|
237 | foo baz | |
238 | $ hg echo2 foo |
|
238 | $ hg echo2 foo | |
239 |
|
239 | |||
240 | $ echo bar > bar |
|
240 | $ echo bar > bar | |
241 | $ hg commit -qA -m bar |
|
241 | $ hg commit -qA -m bar | |
242 | $ hg count . |
|
242 | $ hg count . | |
243 | 1 |
|
243 | 1 | |
244 | $ hg count 'branch(default)' |
|
244 | $ hg count 'branch(default)' | |
245 | 2 |
|
245 | 2 | |
246 | $ hg mcount -r '"branch(default)"' |
|
246 | $ hg mcount -r '"branch(default)"' | |
247 | 2 |
|
247 | 2 | |
248 |
|
248 | |||
249 | $ hg tglog |
|
249 | $ hg tglog | |
250 | @ 1:042423737847: 'bar' |
|
250 | @ 1:042423737847: 'bar' | |
251 | | |
|
251 | | | |
252 | o 0:e63c23eaa88a: 'foo' |
|
252 | o 0:e63c23eaa88a: 'foo' | |
253 |
|
253 | |||
254 |
|
254 | |||
255 |
|
255 | |||
256 | shadowing |
|
256 | shadowing | |
257 |
|
257 | |||
258 | $ hg i |
|
258 | $ hg i | |
259 | hg: command 'i' is ambiguous: |
|
259 | hg: command 'i' is ambiguous: | |
260 | idalias idaliaslong idaliasshell identify import incoming init |
|
260 | idalias idaliaslong idaliasshell identify import incoming init | |
261 | [255] |
|
261 | [255] | |
262 | $ hg id |
|
262 | $ hg id | |
263 | 042423737847 tip |
|
263 | 042423737847 tip | |
264 | $ hg ida |
|
264 | $ hg ida | |
265 | hg: command 'ida' is ambiguous: |
|
265 | hg: command 'ida' is ambiguous: | |
266 | idalias idaliaslong idaliasshell |
|
266 | idalias idaliaslong idaliasshell | |
267 | [255] |
|
267 | [255] | |
268 | $ hg idalias |
|
268 | $ hg idalias | |
269 | 042423737847 tip |
|
269 | 042423737847 tip | |
270 | $ hg idaliasl |
|
270 | $ hg idaliasl | |
271 | 042423737847 tip |
|
271 | 042423737847 tip | |
272 | $ hg idaliass |
|
272 | $ hg idaliass | |
273 | test |
|
273 | test | |
274 | $ hg parentsshell |
|
274 | $ hg parentsshell | |
275 | hg: command 'parentsshell' is ambiguous: |
|
275 | hg: command 'parentsshell' is ambiguous: | |
276 | parentsshell1 parentsshell2 |
|
276 | parentsshell1 parentsshell2 | |
277 | [255] |
|
277 | [255] | |
278 | $ hg parentsshell1 |
|
278 | $ hg parentsshell1 | |
279 | one |
|
279 | one | |
280 | $ hg parentsshell2 |
|
280 | $ hg parentsshell2 | |
281 | two |
|
281 | two | |
282 |
|
282 | |||
283 |
|
283 | |||
284 | shell aliases with global options |
|
284 | shell aliases with global options | |
285 |
|
285 | |||
286 | $ hg init sub |
|
286 | $ hg init sub | |
287 | $ cd sub |
|
287 | $ cd sub | |
288 | $ hg count 'branch(default)' |
|
288 | $ hg count 'branch(default)' | |
289 | abort: unknown revision 'default'! |
|
289 | abort: unknown revision 'default'! | |
290 | 0 |
|
290 | 0 | |
291 | $ hg -v count 'branch(default)' |
|
291 | $ hg -v count 'branch(default)' | |
292 | abort: unknown revision 'default'! |
|
292 | abort: unknown revision 'default'! | |
293 | 0 |
|
293 | 0 | |
294 | $ hg -R .. count 'branch(default)' |
|
294 | $ hg -R .. count 'branch(default)' | |
295 | abort: unknown revision 'default'! |
|
295 | abort: unknown revision 'default'! | |
296 | 0 |
|
296 | 0 | |
297 | $ hg --cwd .. count 'branch(default)' |
|
297 | $ hg --cwd .. count 'branch(default)' | |
298 | 2 |
|
298 | 2 | |
299 | $ hg echoall --cwd .. |
|
299 | $ hg echoall --cwd .. | |
300 |
|
300 | |||
301 |
|
301 | |||
302 |
|
302 | |||
303 | repo specific shell aliases |
|
303 | repo specific shell aliases | |
304 |
|
304 | |||
305 | $ cat >> .hg/hgrc <<EOF |
|
305 | $ cat >> .hg/hgrc <<EOF | |
306 | > [alias] |
|
306 | > [alias] | |
307 | > subalias = !echo sub |
|
307 | > subalias = !echo sub | |
308 | > EOF |
|
308 | > EOF | |
309 | $ cat >> ../.hg/hgrc <<EOF |
|
309 | $ cat >> ../.hg/hgrc <<EOF | |
310 | > [alias] |
|
310 | > [alias] | |
311 | > mainalias = !echo main |
|
311 | > mainalias = !echo main | |
312 | > EOF |
|
312 | > EOF | |
313 |
|
313 | |||
314 |
|
314 | |||
315 | shell alias defined in current repo |
|
315 | shell alias defined in current repo | |
316 |
|
316 | |||
317 | $ hg subalias |
|
317 | $ hg subalias | |
318 | sub |
|
318 | sub | |
319 | $ hg --cwd .. subalias > /dev/null |
|
319 | $ hg --cwd .. subalias > /dev/null | |
320 | hg: unknown command 'subalias' |
|
320 | hg: unknown command 'subalias' | |
321 | [255] |
|
321 | [255] | |
322 | $ hg -R .. subalias > /dev/null |
|
322 | $ hg -R .. subalias > /dev/null | |
323 | hg: unknown command 'subalias' |
|
323 | hg: unknown command 'subalias' | |
324 | [255] |
|
324 | [255] | |
325 |
|
325 | |||
326 |
|
326 | |||
327 | shell alias defined in other repo |
|
327 | shell alias defined in other repo | |
328 |
|
328 | |||
329 | $ hg mainalias > /dev/null |
|
329 | $ hg mainalias > /dev/null | |
330 | hg: unknown command 'mainalias' |
|
330 | hg: unknown command 'mainalias' | |
331 | [255] |
|
331 | [255] | |
332 | $ hg -R .. mainalias |
|
332 | $ hg -R .. mainalias | |
333 | main |
|
333 | main | |
334 | $ hg --cwd .. mainalias |
|
334 | $ hg --cwd .. mainalias | |
335 | main |
|
335 | main | |
336 |
|
336 | |||
337 |
|
337 | |||
338 | shell aliases with escaped $ chars |
|
338 | shell aliases with escaped $ chars | |
339 |
|
339 | |||
340 | $ hg escaped1 |
|
340 | $ hg escaped1 | |
341 | test$test |
|
341 | test$test | |
342 | $ hg escaped2 |
|
342 | $ hg escaped2 | |
343 | HGFOO is BAR |
|
343 | HGFOO is BAR | |
344 | $ hg escaped3 HGFOO |
|
344 | $ hg escaped3 HGFOO | |
345 | HGFOO is BAR |
|
345 | HGFOO is BAR | |
346 | $ hg escaped4 test |
|
346 | $ hg escaped4 test | |
347 | $0 $@ |
|
347 | $0 $@ | |
348 |
|
348 | |||
349 | abbreviated name, which matches against both shell alias and the |
|
349 | abbreviated name, which matches against both shell alias and the | |
350 | command provided extension, should be aborted. |
|
350 | command provided extension, should be aborted. | |
351 |
|
351 | |||
352 | $ cat >> .hg/hgrc <<EOF |
|
352 | $ cat >> .hg/hgrc <<EOF | |
353 | > [extensions] |
|
353 | > [extensions] | |
354 | > hgext.rebase = |
|
354 | > hgext.rebase = | |
355 | > [alias] |
|
355 | > [alias] | |
356 | > rebate = !echo this is rebate |
|
356 | > rebate = !echo this is rebate | |
357 | > EOF |
|
357 | > EOF | |
358 | $ hg reba |
|
358 | $ hg reba | |
359 | hg: command 'reba' is ambiguous: |
|
359 | hg: command 'reba' is ambiguous: | |
360 | rebase rebate |
|
360 | rebase rebate | |
361 | [255] |
|
361 | [255] | |
362 | $ hg rebat |
|
362 | $ hg rebat | |
363 | this is rebate |
|
363 | this is rebate | |
364 |
|
364 | |||
365 | invalid arguments |
|
365 | invalid arguments | |
366 |
|
366 | |||
367 | $ hg rt foo |
|
367 | $ hg rt foo | |
368 | hg rt: invalid arguments |
|
368 | hg rt: invalid arguments | |
369 | hg rt |
|
369 | hg rt | |
370 |
|
370 | |||
371 | alias for: hg root |
|
371 | alias for: hg root | |
372 |
|
372 | |||
373 | (use "hg rt -h" to show more help) |
|
373 | (use "hg rt -h" to show more help) | |
374 | [255] |
|
374 | [255] | |
375 |
|
375 | |||
376 | invalid global arguments for normal commands, aliases, and shell aliases |
|
376 | invalid global arguments for normal commands, aliases, and shell aliases | |
377 |
|
377 | |||
378 | $ hg --invalid root |
|
378 | $ hg --invalid root | |
379 | hg: option --invalid not recognized |
|
379 | hg: option --invalid not recognized | |
380 | Mercurial Distributed SCM |
|
380 | Mercurial Distributed SCM | |
381 |
|
381 | |||
382 | basic commands: |
|
382 | basic commands: | |
383 |
|
383 | |||
384 | add add the specified files on the next commit |
|
384 | add add the specified files on the next commit | |
385 | annotate show changeset information by line for each file |
|
385 | annotate show changeset information by line for each file | |
386 | clone make a copy of an existing repository |
|
386 | clone make a copy of an existing repository | |
387 | commit commit the specified files or all outstanding changes |
|
387 | commit commit the specified files or all outstanding changes | |
388 | diff diff repository (or selected files) |
|
388 | diff diff repository (or selected files) | |
389 | export dump the header and diffs for one or more changesets |
|
389 | export dump the header and diffs for one or more changesets | |
390 | forget forget the specified files on the next commit |
|
390 | forget forget the specified files on the next commit | |
391 | init create a new repository in the given directory |
|
391 | init create a new repository in the given directory | |
392 | log show revision history of entire repository or files |
|
392 | log show revision history of entire repository or files | |
393 | merge merge working directory with another revision |
|
393 | merge merge working directory with another revision | |
394 | pull pull changes from the specified source |
|
394 | pull pull changes from the specified source | |
395 | push push changes to the specified destination |
|
395 | push push changes to the specified destination | |
396 | remove remove the specified files on the next commit |
|
396 | remove remove the specified files on the next commit | |
397 | serve start stand-alone webserver |
|
397 | serve start stand-alone webserver | |
398 | status show changed files in the working directory |
|
398 | status show changed files in the working directory | |
399 | summary summarize working directory state |
|
399 | summary summarize working directory state | |
400 | update update working directory (or switch revisions) |
|
400 | update update working directory (or switch revisions) | |
401 |
|
401 | |||
402 | use "hg help" for the full list of commands or "hg -v" for details |
|
402 | (use "hg help" for the full list of commands or "hg -v" for details) | |
403 | [255] |
|
403 | [255] | |
404 | $ hg --invalid mylog |
|
404 | $ hg --invalid mylog | |
405 | hg: option --invalid not recognized |
|
405 | hg: option --invalid not recognized | |
406 | Mercurial Distributed SCM |
|
406 | Mercurial Distributed SCM | |
407 |
|
407 | |||
408 | basic commands: |
|
408 | basic commands: | |
409 |
|
409 | |||
410 | add add the specified files on the next commit |
|
410 | add add the specified files on the next commit | |
411 | annotate show changeset information by line for each file |
|
411 | annotate show changeset information by line for each file | |
412 | clone make a copy of an existing repository |
|
412 | clone make a copy of an existing repository | |
413 | commit commit the specified files or all outstanding changes |
|
413 | commit commit the specified files or all outstanding changes | |
414 | diff diff repository (or selected files) |
|
414 | diff diff repository (or selected files) | |
415 | export dump the header and diffs for one or more changesets |
|
415 | export dump the header and diffs for one or more changesets | |
416 | forget forget the specified files on the next commit |
|
416 | forget forget the specified files on the next commit | |
417 | init create a new repository in the given directory |
|
417 | init create a new repository in the given directory | |
418 | log show revision history of entire repository or files |
|
418 | log show revision history of entire repository or files | |
419 | merge merge working directory with another revision |
|
419 | merge merge working directory with another revision | |
420 | pull pull changes from the specified source |
|
420 | pull pull changes from the specified source | |
421 | push push changes to the specified destination |
|
421 | push push changes to the specified destination | |
422 | remove remove the specified files on the next commit |
|
422 | remove remove the specified files on the next commit | |
423 | serve start stand-alone webserver |
|
423 | serve start stand-alone webserver | |
424 | status show changed files in the working directory |
|
424 | status show changed files in the working directory | |
425 | summary summarize working directory state |
|
425 | summary summarize working directory state | |
426 | update update working directory (or switch revisions) |
|
426 | update update working directory (or switch revisions) | |
427 |
|
427 | |||
428 | use "hg help" for the full list of commands or "hg -v" for details |
|
428 | (use "hg help" for the full list of commands or "hg -v" for details) | |
429 | [255] |
|
429 | [255] | |
430 | $ hg --invalid blank |
|
430 | $ hg --invalid blank | |
431 | hg: option --invalid not recognized |
|
431 | hg: option --invalid not recognized | |
432 | Mercurial Distributed SCM |
|
432 | Mercurial Distributed SCM | |
433 |
|
433 | |||
434 | basic commands: |
|
434 | basic commands: | |
435 |
|
435 | |||
436 | add add the specified files on the next commit |
|
436 | add add the specified files on the next commit | |
437 | annotate show changeset information by line for each file |
|
437 | annotate show changeset information by line for each file | |
438 | clone make a copy of an existing repository |
|
438 | clone make a copy of an existing repository | |
439 | commit commit the specified files or all outstanding changes |
|
439 | commit commit the specified files or all outstanding changes | |
440 | diff diff repository (or selected files) |
|
440 | diff diff repository (or selected files) | |
441 | export dump the header and diffs for one or more changesets |
|
441 | export dump the header and diffs for one or more changesets | |
442 | forget forget the specified files on the next commit |
|
442 | forget forget the specified files on the next commit | |
443 | init create a new repository in the given directory |
|
443 | init create a new repository in the given directory | |
444 | log show revision history of entire repository or files |
|
444 | log show revision history of entire repository or files | |
445 | merge merge working directory with another revision |
|
445 | merge merge working directory with another revision | |
446 | pull pull changes from the specified source |
|
446 | pull pull changes from the specified source | |
447 | push push changes to the specified destination |
|
447 | push push changes to the specified destination | |
448 | remove remove the specified files on the next commit |
|
448 | remove remove the specified files on the next commit | |
449 | serve start stand-alone webserver |
|
449 | serve start stand-alone webserver | |
450 | status show changed files in the working directory |
|
450 | status show changed files in the working directory | |
451 | summary summarize working directory state |
|
451 | summary summarize working directory state | |
452 | update update working directory (or switch revisions) |
|
452 | update update working directory (or switch revisions) | |
453 |
|
453 | |||
454 | use "hg help" for the full list of commands or "hg -v" for details |
|
454 | (use "hg help" for the full list of commands or "hg -v" for details) | |
455 | [255] |
|
455 | [255] | |
456 |
|
456 | |||
457 | This should show id: |
|
457 | This should show id: | |
458 |
|
458 | |||
459 | $ hg --config alias.log='id' log |
|
459 | $ hg --config alias.log='id' log | |
460 | 000000000000 tip |
|
460 | 000000000000 tip | |
461 |
|
461 | |||
462 | This shouldn't: |
|
462 | This shouldn't: | |
463 |
|
463 | |||
464 | $ hg --config alias.log='id' history |
|
464 | $ hg --config alias.log='id' history | |
465 |
|
465 | |||
466 | $ cd ../.. |
|
466 | $ cd ../.. | |
467 |
|
467 | |||
468 | return code of command and shell aliases: |
|
468 | return code of command and shell aliases: | |
469 |
|
469 | |||
470 | $ hg mycommit -R alias |
|
470 | $ hg mycommit -R alias | |
471 | nothing changed |
|
471 | nothing changed | |
472 | [1] |
|
472 | [1] | |
473 | $ hg exit1 |
|
473 | $ hg exit1 | |
474 | [1] |
|
474 | [1] |
@@ -1,262 +1,262 b'' | |||||
1 |
|
1 | |||
2 | testing hellomessage: |
|
2 | testing hellomessage: | |
3 |
|
3 | |||
4 | o, 'capabilities: getencoding runcommand\nencoding: ***' |
|
4 | o, 'capabilities: getencoding runcommand\nencoding: ***' | |
5 | runcommand id |
|
5 | runcommand id | |
6 | 000000000000 tip |
|
6 | 000000000000 tip | |
7 |
|
7 | |||
8 | testing unknowncommand: |
|
8 | testing unknowncommand: | |
9 |
|
9 | |||
10 | abort: unknown command unknowncommand |
|
10 | abort: unknown command unknowncommand | |
11 |
|
11 | |||
12 | testing checkruncommand: |
|
12 | testing checkruncommand: | |
13 |
|
13 | |||
14 | runcommand |
|
14 | runcommand | |
15 | Mercurial Distributed SCM |
|
15 | Mercurial Distributed SCM | |
16 |
|
16 | |||
17 | basic commands: |
|
17 | basic commands: | |
18 |
|
18 | |||
19 | add add the specified files on the next commit |
|
19 | add add the specified files on the next commit | |
20 | annotate show changeset information by line for each file |
|
20 | annotate show changeset information by line for each file | |
21 | clone make a copy of an existing repository |
|
21 | clone make a copy of an existing repository | |
22 | commit commit the specified files or all outstanding changes |
|
22 | commit commit the specified files or all outstanding changes | |
23 | diff diff repository (or selected files) |
|
23 | diff diff repository (or selected files) | |
24 | export dump the header and diffs for one or more changesets |
|
24 | export dump the header and diffs for one or more changesets | |
25 | forget forget the specified files on the next commit |
|
25 | forget forget the specified files on the next commit | |
26 | init create a new repository in the given directory |
|
26 | init create a new repository in the given directory | |
27 | log show revision history of entire repository or files |
|
27 | log show revision history of entire repository or files | |
28 | merge merge working directory with another revision |
|
28 | merge merge working directory with another revision | |
29 | pull pull changes from the specified source |
|
29 | pull pull changes from the specified source | |
30 | push push changes to the specified destination |
|
30 | push push changes to the specified destination | |
31 | remove remove the specified files on the next commit |
|
31 | remove remove the specified files on the next commit | |
32 | serve start stand-alone webserver |
|
32 | serve start stand-alone webserver | |
33 | status show changed files in the working directory |
|
33 | status show changed files in the working directory | |
34 | summary summarize working directory state |
|
34 | summary summarize working directory state | |
35 | update update working directory (or switch revisions) |
|
35 | update update working directory (or switch revisions) | |
36 |
|
36 | |||
37 | use "hg help" for the full list of commands or "hg -v" for details |
|
37 | (use "hg help" for the full list of commands or "hg -v" for details) | |
38 | runcommand id --quiet |
|
38 | runcommand id --quiet | |
39 | 000000000000 |
|
39 | 000000000000 | |
40 | runcommand id |
|
40 | runcommand id | |
41 | 000000000000 tip |
|
41 | 000000000000 tip | |
42 | runcommand id --config ui.quiet=True |
|
42 | runcommand id --config ui.quiet=True | |
43 | 000000000000 |
|
43 | 000000000000 | |
44 | runcommand id |
|
44 | runcommand id | |
45 | 000000000000 tip |
|
45 | 000000000000 tip | |
46 | runcommand id -runknown |
|
46 | runcommand id -runknown | |
47 | abort: unknown revision 'unknown'! |
|
47 | abort: unknown revision 'unknown'! | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | testing inputeof: |
|
50 | testing inputeof: | |
51 |
|
51 | |||
52 | server exit code = 1 |
|
52 | server exit code = 1 | |
53 |
|
53 | |||
54 | testing serverinput: |
|
54 | testing serverinput: | |
55 |
|
55 | |||
56 | runcommand import - |
|
56 | runcommand import - | |
57 | applying patch from stdin |
|
57 | applying patch from stdin | |
58 | runcommand log |
|
58 | runcommand log | |
59 | changeset: 0:eff892de26ec |
|
59 | changeset: 0:eff892de26ec | |
60 | tag: tip |
|
60 | tag: tip | |
61 | user: test |
|
61 | user: test | |
62 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
62 | date: Thu Jan 01 00:00:00 1970 +0000 | |
63 | summary: 1 |
|
63 | summary: 1 | |
64 |
|
64 | |||
65 |
|
65 | |||
66 | testing cwd: |
|
66 | testing cwd: | |
67 |
|
67 | |||
68 | runcommand --cwd foo st bar |
|
68 | runcommand --cwd foo st bar | |
69 | ? bar |
|
69 | ? bar | |
70 | runcommand st foo/bar |
|
70 | runcommand st foo/bar | |
71 | ? foo/bar |
|
71 | ? foo/bar | |
72 |
|
72 | |||
73 | testing localhgrc: |
|
73 | testing localhgrc: | |
74 |
|
74 | |||
75 | runcommand showconfig |
|
75 | runcommand showconfig | |
76 | bundle.mainreporoot=$TESTTMP/repo |
|
76 | bundle.mainreporoot=$TESTTMP/repo | |
77 | defaults.backout=-d "0 0" |
|
77 | defaults.backout=-d "0 0" | |
78 | defaults.commit=-d "0 0" |
|
78 | defaults.commit=-d "0 0" | |
79 | defaults.shelve=--date "0 0" |
|
79 | defaults.shelve=--date "0 0" | |
80 | defaults.tag=-d "0 0" |
|
80 | defaults.tag=-d "0 0" | |
81 | ui.slash=True |
|
81 | ui.slash=True | |
82 | ui.interactive=False |
|
82 | ui.interactive=False | |
83 | ui.mergemarkers=detailed |
|
83 | ui.mergemarkers=detailed | |
84 | ui.foo=bar |
|
84 | ui.foo=bar | |
85 | ui.nontty=true |
|
85 | ui.nontty=true | |
86 | runcommand init foo |
|
86 | runcommand init foo | |
87 | runcommand -R foo showconfig ui defaults |
|
87 | runcommand -R foo showconfig ui defaults | |
88 | defaults.backout=-d "0 0" |
|
88 | defaults.backout=-d "0 0" | |
89 | defaults.commit=-d "0 0" |
|
89 | defaults.commit=-d "0 0" | |
90 | defaults.shelve=--date "0 0" |
|
90 | defaults.shelve=--date "0 0" | |
91 | defaults.tag=-d "0 0" |
|
91 | defaults.tag=-d "0 0" | |
92 | ui.slash=True |
|
92 | ui.slash=True | |
93 | ui.interactive=False |
|
93 | ui.interactive=False | |
94 | ui.mergemarkers=detailed |
|
94 | ui.mergemarkers=detailed | |
95 | ui.nontty=true |
|
95 | ui.nontty=true | |
96 |
|
96 | |||
97 | testing hookoutput: |
|
97 | testing hookoutput: | |
98 |
|
98 | |||
99 | runcommand --config hooks.pre-identify=python:test-commandserver.hook id |
|
99 | runcommand --config hooks.pre-identify=python:test-commandserver.hook id | |
100 | hook talking |
|
100 | hook talking | |
101 | now try to read something: 'some input' |
|
101 | now try to read something: 'some input' | |
102 | eff892de26ec tip |
|
102 | eff892de26ec tip | |
103 |
|
103 | |||
104 | testing outsidechanges: |
|
104 | testing outsidechanges: | |
105 |
|
105 | |||
106 | runcommand status |
|
106 | runcommand status | |
107 | M a |
|
107 | M a | |
108 | runcommand tip |
|
108 | runcommand tip | |
109 | changeset: 1:d3a0a68be6de |
|
109 | changeset: 1:d3a0a68be6de | |
110 | tag: tip |
|
110 | tag: tip | |
111 | user: test |
|
111 | user: test | |
112 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
112 | date: Thu Jan 01 00:00:00 1970 +0000 | |
113 | summary: 2 |
|
113 | summary: 2 | |
114 |
|
114 | |||
115 | runcommand status |
|
115 | runcommand status | |
116 |
|
116 | |||
117 | testing bookmarks: |
|
117 | testing bookmarks: | |
118 |
|
118 | |||
119 | runcommand bookmarks |
|
119 | runcommand bookmarks | |
120 | no bookmarks set |
|
120 | no bookmarks set | |
121 | runcommand bookmarks |
|
121 | runcommand bookmarks | |
122 | bm1 1:d3a0a68be6de |
|
122 | bm1 1:d3a0a68be6de | |
123 | bm2 1:d3a0a68be6de |
|
123 | bm2 1:d3a0a68be6de | |
124 | runcommand bookmarks |
|
124 | runcommand bookmarks | |
125 | * bm1 1:d3a0a68be6de |
|
125 | * bm1 1:d3a0a68be6de | |
126 | bm2 1:d3a0a68be6de |
|
126 | bm2 1:d3a0a68be6de | |
127 | runcommand bookmarks bm3 |
|
127 | runcommand bookmarks bm3 | |
128 | runcommand commit -Amm |
|
128 | runcommand commit -Amm | |
129 | runcommand bookmarks |
|
129 | runcommand bookmarks | |
130 | bm1 1:d3a0a68be6de |
|
130 | bm1 1:d3a0a68be6de | |
131 | bm2 1:d3a0a68be6de |
|
131 | bm2 1:d3a0a68be6de | |
132 | * bm3 2:aef17e88f5f0 |
|
132 | * bm3 2:aef17e88f5f0 | |
133 |
|
133 | |||
134 | testing tagscache: |
|
134 | testing tagscache: | |
135 |
|
135 | |||
136 | runcommand id -t -r 0 |
|
136 | runcommand id -t -r 0 | |
137 |
|
137 | |||
138 | runcommand id -t -r 0 |
|
138 | runcommand id -t -r 0 | |
139 | foo |
|
139 | foo | |
140 |
|
140 | |||
141 | testing setphase: |
|
141 | testing setphase: | |
142 |
|
142 | |||
143 | runcommand phase -r . |
|
143 | runcommand phase -r . | |
144 | 3: draft |
|
144 | 3: draft | |
145 | runcommand phase -r . |
|
145 | runcommand phase -r . | |
146 | 3: public |
|
146 | 3: public | |
147 |
|
147 | |||
148 | testing rollback: |
|
148 | testing rollback: | |
149 |
|
149 | |||
150 | runcommand phase -r . -p |
|
150 | runcommand phase -r . -p | |
151 | no phases changed |
|
151 | no phases changed | |
152 | [1] |
|
152 | [1] | |
153 | runcommand commit -Am. |
|
153 | runcommand commit -Am. | |
154 | runcommand rollback |
|
154 | runcommand rollback | |
155 | repository tip rolled back to revision 3 (undo commit) |
|
155 | repository tip rolled back to revision 3 (undo commit) | |
156 | working directory now based on revision 3 |
|
156 | working directory now based on revision 3 | |
157 | runcommand phase -r . |
|
157 | runcommand phase -r . | |
158 | 3: public |
|
158 | 3: public | |
159 |
|
159 | |||
160 | testing branch: |
|
160 | testing branch: | |
161 |
|
161 | |||
162 | runcommand branch |
|
162 | runcommand branch | |
163 | default |
|
163 | default | |
164 | marked working directory as branch foo |
|
164 | marked working directory as branch foo | |
165 | (branches are permanent and global, did you want a bookmark?) |
|
165 | (branches are permanent and global, did you want a bookmark?) | |
166 | runcommand branch |
|
166 | runcommand branch | |
167 | foo |
|
167 | foo | |
168 | marked working directory as branch default |
|
168 | marked working directory as branch default | |
169 | (branches are permanent and global, did you want a bookmark?) |
|
169 | (branches are permanent and global, did you want a bookmark?) | |
170 |
|
170 | |||
171 | testing hgignore: |
|
171 | testing hgignore: | |
172 |
|
172 | |||
173 | runcommand commit -Am. |
|
173 | runcommand commit -Am. | |
174 | adding .hgignore |
|
174 | adding .hgignore | |
175 | runcommand status -i -u |
|
175 | runcommand status -i -u | |
176 | I ignored-file |
|
176 | I ignored-file | |
177 |
|
177 | |||
178 | testing phasecacheafterstrip: |
|
178 | testing phasecacheafterstrip: | |
179 |
|
179 | |||
180 | runcommand update -C 0 |
|
180 | runcommand update -C 0 | |
181 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
181 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
182 | (leaving bookmark bm3) |
|
182 | (leaving bookmark bm3) | |
183 | runcommand commit -Am. a |
|
183 | runcommand commit -Am. a | |
184 | created new head |
|
184 | created new head | |
185 | runcommand log -Gq |
|
185 | runcommand log -Gq | |
186 | @ 5:731265503d86 |
|
186 | @ 5:731265503d86 | |
187 | | |
|
187 | | | |
188 | | o 4:7966c8e3734d |
|
188 | | o 4:7966c8e3734d | |
189 | | | |
|
189 | | | | |
190 | | o 3:b9b85890c400 |
|
190 | | o 3:b9b85890c400 | |
191 | | | |
|
191 | | | | |
192 | | o 2:aef17e88f5f0 |
|
192 | | o 2:aef17e88f5f0 | |
193 | | | |
|
193 | | | | |
194 | | o 1:d3a0a68be6de |
|
194 | | o 1:d3a0a68be6de | |
195 | |/ |
|
195 | |/ | |
196 | o 0:eff892de26ec |
|
196 | o 0:eff892de26ec | |
197 |
|
197 | |||
198 | runcommand phase -p . |
|
198 | runcommand phase -p . | |
199 | runcommand phase . |
|
199 | runcommand phase . | |
200 | 5: public |
|
200 | 5: public | |
201 | runcommand branches |
|
201 | runcommand branches | |
202 | default 1:731265503d86 |
|
202 | default 1:731265503d86 | |
203 |
|
203 | |||
204 | testing obsolete: |
|
204 | testing obsolete: | |
205 |
|
205 | |||
206 | runcommand up null |
|
206 | runcommand up null | |
207 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
207 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
208 | runcommand phase -df tip |
|
208 | runcommand phase -df tip | |
209 | runcommand log --hidden |
|
209 | runcommand log --hidden | |
210 | changeset: 1:731265503d86 |
|
210 | changeset: 1:731265503d86 | |
211 | tag: tip |
|
211 | tag: tip | |
212 | user: test |
|
212 | user: test | |
213 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
213 | date: Thu Jan 01 00:00:00 1970 +0000 | |
214 | summary: . |
|
214 | summary: . | |
215 |
|
215 | |||
216 | changeset: 0:eff892de26ec |
|
216 | changeset: 0:eff892de26ec | |
217 | bookmark: bm1 |
|
217 | bookmark: bm1 | |
218 | bookmark: bm2 |
|
218 | bookmark: bm2 | |
219 | bookmark: bm3 |
|
219 | bookmark: bm3 | |
220 | user: test |
|
220 | user: test | |
221 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
221 | date: Thu Jan 01 00:00:00 1970 +0000 | |
222 | summary: 1 |
|
222 | summary: 1 | |
223 |
|
223 | |||
224 | runcommand log |
|
224 | runcommand log | |
225 | changeset: 0:eff892de26ec |
|
225 | changeset: 0:eff892de26ec | |
226 | bookmark: bm1 |
|
226 | bookmark: bm1 | |
227 | bookmark: bm2 |
|
227 | bookmark: bm2 | |
228 | bookmark: bm3 |
|
228 | bookmark: bm3 | |
229 | tag: tip |
|
229 | tag: tip | |
230 | user: test |
|
230 | user: test | |
231 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
231 | date: Thu Jan 01 00:00:00 1970 +0000 | |
232 | summary: 1 |
|
232 | summary: 1 | |
233 |
|
233 | |||
234 |
|
234 | |||
235 | testing mqoutsidechanges: |
|
235 | testing mqoutsidechanges: | |
236 |
|
236 | |||
237 | runcommand qapplied |
|
237 | runcommand qapplied | |
238 | runcommand qapplied |
|
238 | runcommand qapplied | |
239 | 0.diff |
|
239 | 0.diff | |
240 | runcommand qpop --all |
|
240 | runcommand qpop --all | |
241 | popping 0.diff |
|
241 | popping 0.diff | |
242 | patch queue now empty |
|
242 | patch queue now empty | |
243 | runcommand qqueue --active |
|
243 | runcommand qqueue --active | |
244 | foo |
|
244 | foo | |
245 |
|
245 | |||
246 | testing getpass: |
|
246 | testing getpass: | |
247 |
|
247 | |||
248 | runcommand debuggetpass --config ui.interactive=True |
|
248 | runcommand debuggetpass --config ui.interactive=True | |
249 | password: 1234 |
|
249 | password: 1234 | |
250 |
|
250 | |||
251 | testing hellomessage: |
|
251 | testing hellomessage: | |
252 |
|
252 | |||
253 | o, 'capabilities: getencoding runcommand\nencoding: ***' |
|
253 | o, 'capabilities: getencoding runcommand\nencoding: ***' | |
254 | runcommand id |
|
254 | runcommand id | |
255 | abort: there is no Mercurial repository here (.hg not found) |
|
255 | abort: there is no Mercurial repository here (.hg not found) | |
256 | [255] |
|
256 | [255] | |
257 |
|
257 | |||
258 | testing startwithoutrepo: |
|
258 | testing startwithoutrepo: | |
259 |
|
259 | |||
260 | runcommand init repo2 |
|
260 | runcommand init repo2 | |
261 | runcommand id -R repo2 |
|
261 | runcommand id -R repo2 | |
262 | 000000000000 tip |
|
262 | 000000000000 tip |
@@ -1,910 +1,910 b'' | |||||
1 | Test basic extension support |
|
1 | Test basic extension support | |
2 |
|
2 | |||
3 | $ cat > foobar.py <<EOF |
|
3 | $ cat > foobar.py <<EOF | |
4 | > import os |
|
4 | > import os | |
5 | > from mercurial import cmdutil, commands |
|
5 | > from mercurial import cmdutil, commands | |
6 | > cmdtable = {} |
|
6 | > cmdtable = {} | |
7 | > command = cmdutil.command(cmdtable) |
|
7 | > command = cmdutil.command(cmdtable) | |
8 | > def uisetup(ui): |
|
8 | > def uisetup(ui): | |
9 | > ui.write("uisetup called\\n") |
|
9 | > ui.write("uisetup called\\n") | |
10 | > def reposetup(ui, repo): |
|
10 | > def reposetup(ui, repo): | |
11 | > ui.write("reposetup called for %s\\n" % os.path.basename(repo.root)) |
|
11 | > ui.write("reposetup called for %s\\n" % os.path.basename(repo.root)) | |
12 | > ui.write("ui %s= repo.ui\\n" % (ui == repo.ui and "=" or "!")) |
|
12 | > ui.write("ui %s= repo.ui\\n" % (ui == repo.ui and "=" or "!")) | |
13 | > @command('foo', [], 'hg foo') |
|
13 | > @command('foo', [], 'hg foo') | |
14 | > def foo(ui, *args, **kwargs): |
|
14 | > def foo(ui, *args, **kwargs): | |
15 | > ui.write("Foo\\n") |
|
15 | > ui.write("Foo\\n") | |
16 | > @command('bar', [], 'hg bar', norepo=True) |
|
16 | > @command('bar', [], 'hg bar', norepo=True) | |
17 | > def bar(ui, *args, **kwargs): |
|
17 | > def bar(ui, *args, **kwargs): | |
18 | > ui.write("Bar\\n") |
|
18 | > ui.write("Bar\\n") | |
19 | > EOF |
|
19 | > EOF | |
20 | $ abspath=`pwd`/foobar.py |
|
20 | $ abspath=`pwd`/foobar.py | |
21 |
|
21 | |||
22 | $ mkdir barfoo |
|
22 | $ mkdir barfoo | |
23 | $ cp foobar.py barfoo/__init__.py |
|
23 | $ cp foobar.py barfoo/__init__.py | |
24 | $ barfoopath=`pwd`/barfoo |
|
24 | $ barfoopath=`pwd`/barfoo | |
25 |
|
25 | |||
26 | $ hg init a |
|
26 | $ hg init a | |
27 | $ cd a |
|
27 | $ cd a | |
28 | $ echo foo > file |
|
28 | $ echo foo > file | |
29 | $ hg add file |
|
29 | $ hg add file | |
30 | $ hg commit -m 'add file' |
|
30 | $ hg commit -m 'add file' | |
31 |
|
31 | |||
32 | $ echo '[extensions]' >> $HGRCPATH |
|
32 | $ echo '[extensions]' >> $HGRCPATH | |
33 | $ echo "foobar = $abspath" >> $HGRCPATH |
|
33 | $ echo "foobar = $abspath" >> $HGRCPATH | |
34 | $ hg foo |
|
34 | $ hg foo | |
35 | uisetup called |
|
35 | uisetup called | |
36 | reposetup called for a |
|
36 | reposetup called for a | |
37 | ui == repo.ui |
|
37 | ui == repo.ui | |
38 | Foo |
|
38 | Foo | |
39 |
|
39 | |||
40 | $ cd .. |
|
40 | $ cd .. | |
41 | $ hg clone a b |
|
41 | $ hg clone a b | |
42 | uisetup called |
|
42 | uisetup called | |
43 | reposetup called for a |
|
43 | reposetup called for a | |
44 | ui == repo.ui |
|
44 | ui == repo.ui | |
45 | reposetup called for b |
|
45 | reposetup called for b | |
46 | ui == repo.ui |
|
46 | ui == repo.ui | |
47 | updating to branch default |
|
47 | updating to branch default | |
48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
49 |
|
49 | |||
50 | $ hg bar |
|
50 | $ hg bar | |
51 | uisetup called |
|
51 | uisetup called | |
52 | Bar |
|
52 | Bar | |
53 | $ echo 'foobar = !' >> $HGRCPATH |
|
53 | $ echo 'foobar = !' >> $HGRCPATH | |
54 |
|
54 | |||
55 | module/__init__.py-style |
|
55 | module/__init__.py-style | |
56 |
|
56 | |||
57 | $ echo "barfoo = $barfoopath" >> $HGRCPATH |
|
57 | $ echo "barfoo = $barfoopath" >> $HGRCPATH | |
58 | $ cd a |
|
58 | $ cd a | |
59 | $ hg foo |
|
59 | $ hg foo | |
60 | uisetup called |
|
60 | uisetup called | |
61 | reposetup called for a |
|
61 | reposetup called for a | |
62 | ui == repo.ui |
|
62 | ui == repo.ui | |
63 | Foo |
|
63 | Foo | |
64 | $ echo 'barfoo = !' >> $HGRCPATH |
|
64 | $ echo 'barfoo = !' >> $HGRCPATH | |
65 |
|
65 | |||
66 | Check that extensions are loaded in phases: |
|
66 | Check that extensions are loaded in phases: | |
67 |
|
67 | |||
68 | $ cat > foo.py <<EOF |
|
68 | $ cat > foo.py <<EOF | |
69 | > import os |
|
69 | > import os | |
70 | > name = os.path.basename(__file__).rsplit('.', 1)[0] |
|
70 | > name = os.path.basename(__file__).rsplit('.', 1)[0] | |
71 | > print "1) %s imported" % name |
|
71 | > print "1) %s imported" % name | |
72 | > def uisetup(ui): |
|
72 | > def uisetup(ui): | |
73 | > print "2) %s uisetup" % name |
|
73 | > print "2) %s uisetup" % name | |
74 | > def extsetup(): |
|
74 | > def extsetup(): | |
75 | > print "3) %s extsetup" % name |
|
75 | > print "3) %s extsetup" % name | |
76 | > def reposetup(ui, repo): |
|
76 | > def reposetup(ui, repo): | |
77 | > print "4) %s reposetup" % name |
|
77 | > print "4) %s reposetup" % name | |
78 | > EOF |
|
78 | > EOF | |
79 |
|
79 | |||
80 | $ cp foo.py bar.py |
|
80 | $ cp foo.py bar.py | |
81 | $ echo 'foo = foo.py' >> $HGRCPATH |
|
81 | $ echo 'foo = foo.py' >> $HGRCPATH | |
82 | $ echo 'bar = bar.py' >> $HGRCPATH |
|
82 | $ echo 'bar = bar.py' >> $HGRCPATH | |
83 |
|
83 | |||
84 | Command with no output, we just want to see the extensions loaded: |
|
84 | Command with no output, we just want to see the extensions loaded: | |
85 |
|
85 | |||
86 | $ hg paths |
|
86 | $ hg paths | |
87 | 1) foo imported |
|
87 | 1) foo imported | |
88 | 1) bar imported |
|
88 | 1) bar imported | |
89 | 2) foo uisetup |
|
89 | 2) foo uisetup | |
90 | 2) bar uisetup |
|
90 | 2) bar uisetup | |
91 | 3) foo extsetup |
|
91 | 3) foo extsetup | |
92 | 3) bar extsetup |
|
92 | 3) bar extsetup | |
93 | 4) foo reposetup |
|
93 | 4) foo reposetup | |
94 | 4) bar reposetup |
|
94 | 4) bar reposetup | |
95 |
|
95 | |||
96 | Check hgweb's load order: |
|
96 | Check hgweb's load order: | |
97 |
|
97 | |||
98 | $ cat > hgweb.cgi <<EOF |
|
98 | $ cat > hgweb.cgi <<EOF | |
99 | > #!/usr/bin/env python |
|
99 | > #!/usr/bin/env python | |
100 | > from mercurial import demandimport; demandimport.enable() |
|
100 | > from mercurial import demandimport; demandimport.enable() | |
101 | > from mercurial.hgweb import hgweb |
|
101 | > from mercurial.hgweb import hgweb | |
102 | > from mercurial.hgweb import wsgicgi |
|
102 | > from mercurial.hgweb import wsgicgi | |
103 | > application = hgweb('.', 'test repo') |
|
103 | > application = hgweb('.', 'test repo') | |
104 | > wsgicgi.launch(application) |
|
104 | > wsgicgi.launch(application) | |
105 | > EOF |
|
105 | > EOF | |
106 |
|
106 | |||
107 | $ REQUEST_METHOD='GET' PATH_INFO='/' SCRIPT_NAME='' QUERY_STRING='' \ |
|
107 | $ REQUEST_METHOD='GET' PATH_INFO='/' SCRIPT_NAME='' QUERY_STRING='' \ | |
108 | > SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \ |
|
108 | > SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \ | |
109 | > | grep '^[0-9]) ' # ignores HTML output |
|
109 | > | grep '^[0-9]) ' # ignores HTML output | |
110 | 1) foo imported |
|
110 | 1) foo imported | |
111 | 1) bar imported |
|
111 | 1) bar imported | |
112 | 2) foo uisetup |
|
112 | 2) foo uisetup | |
113 | 2) bar uisetup |
|
113 | 2) bar uisetup | |
114 | 3) foo extsetup |
|
114 | 3) foo extsetup | |
115 | 3) bar extsetup |
|
115 | 3) bar extsetup | |
116 | 4) foo reposetup |
|
116 | 4) foo reposetup | |
117 | 4) bar reposetup |
|
117 | 4) bar reposetup | |
118 | 4) foo reposetup |
|
118 | 4) foo reposetup | |
119 | 4) bar reposetup |
|
119 | 4) bar reposetup | |
120 |
|
120 | |||
121 | $ echo 'foo = !' >> $HGRCPATH |
|
121 | $ echo 'foo = !' >> $HGRCPATH | |
122 | $ echo 'bar = !' >> $HGRCPATH |
|
122 | $ echo 'bar = !' >> $HGRCPATH | |
123 |
|
123 | |||
124 | Check "from __future__ import absolute_import" support for external libraries |
|
124 | Check "from __future__ import absolute_import" support for external libraries | |
125 |
|
125 | |||
126 | #if windows |
|
126 | #if windows | |
127 | $ PATHSEP=";" |
|
127 | $ PATHSEP=";" | |
128 | #else |
|
128 | #else | |
129 | $ PATHSEP=":" |
|
129 | $ PATHSEP=":" | |
130 | #endif |
|
130 | #endif | |
131 | $ export PATHSEP |
|
131 | $ export PATHSEP | |
132 |
|
132 | |||
133 | $ mkdir $TESTTMP/libroot |
|
133 | $ mkdir $TESTTMP/libroot | |
134 | $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py |
|
134 | $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py | |
135 | $ mkdir $TESTTMP/libroot/mod |
|
135 | $ mkdir $TESTTMP/libroot/mod | |
136 | $ touch $TESTTMP/libroot/mod/__init__.py |
|
136 | $ touch $TESTTMP/libroot/mod/__init__.py | |
137 | $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py |
|
137 | $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py | |
138 |
|
138 | |||
139 | #if absimport |
|
139 | #if absimport | |
140 | $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF |
|
140 | $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF | |
141 | > from __future__ import absolute_import |
|
141 | > from __future__ import absolute_import | |
142 | > import ambig # should load "libroot/ambig.py" |
|
142 | > import ambig # should load "libroot/ambig.py" | |
143 | > s = ambig.s |
|
143 | > s = ambig.s | |
144 | > EOF |
|
144 | > EOF | |
145 | $ cat > loadabs.py <<EOF |
|
145 | $ cat > loadabs.py <<EOF | |
146 | > import mod.ambigabs as ambigabs |
|
146 | > import mod.ambigabs as ambigabs | |
147 | > def extsetup(): |
|
147 | > def extsetup(): | |
148 | > print 'ambigabs.s=%s' % ambigabs.s |
|
148 | > print 'ambigabs.s=%s' % ambigabs.s | |
149 | > EOF |
|
149 | > EOF | |
150 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) |
|
150 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) | |
151 | ambigabs.s=libroot/ambig.py |
|
151 | ambigabs.s=libroot/ambig.py | |
152 | $TESTTMP/a (glob) |
|
152 | $TESTTMP/a (glob) | |
153 | #endif |
|
153 | #endif | |
154 |
|
154 | |||
155 | #if no-py3k |
|
155 | #if no-py3k | |
156 | $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF |
|
156 | $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF | |
157 | > import ambig # should load "libroot/mod/ambig.py" |
|
157 | > import ambig # should load "libroot/mod/ambig.py" | |
158 | > s = ambig.s |
|
158 | > s = ambig.s | |
159 | > EOF |
|
159 | > EOF | |
160 | $ cat > loadrel.py <<EOF |
|
160 | $ cat > loadrel.py <<EOF | |
161 | > import mod.ambigrel as ambigrel |
|
161 | > import mod.ambigrel as ambigrel | |
162 | > def extsetup(): |
|
162 | > def extsetup(): | |
163 | > print 'ambigrel.s=%s' % ambigrel.s |
|
163 | > print 'ambigrel.s=%s' % ambigrel.s | |
164 | > EOF |
|
164 | > EOF | |
165 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) |
|
165 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) | |
166 | ambigrel.s=libroot/mod/ambig.py |
|
166 | ambigrel.s=libroot/mod/ambig.py | |
167 | $TESTTMP/a (glob) |
|
167 | $TESTTMP/a (glob) | |
168 | #endif |
|
168 | #endif | |
169 |
|
169 | |||
170 | Check absolute/relative import of extension specific modules |
|
170 | Check absolute/relative import of extension specific modules | |
171 |
|
171 | |||
172 | $ mkdir $TESTTMP/extroot |
|
172 | $ mkdir $TESTTMP/extroot | |
173 | $ cat > $TESTTMP/extroot/bar.py <<EOF |
|
173 | $ cat > $TESTTMP/extroot/bar.py <<EOF | |
174 | > s = 'this is extroot.bar' |
|
174 | > s = 'this is extroot.bar' | |
175 | > EOF |
|
175 | > EOF | |
176 | $ mkdir $TESTTMP/extroot/sub1 |
|
176 | $ mkdir $TESTTMP/extroot/sub1 | |
177 | $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF |
|
177 | $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF | |
178 | > s = 'this is extroot.sub1.__init__' |
|
178 | > s = 'this is extroot.sub1.__init__' | |
179 | > EOF |
|
179 | > EOF | |
180 | $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF |
|
180 | $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF | |
181 | > s = 'this is extroot.sub1.baz' |
|
181 | > s = 'this is extroot.sub1.baz' | |
182 | > EOF |
|
182 | > EOF | |
183 | $ cat > $TESTTMP/extroot/__init__.py <<EOF |
|
183 | $ cat > $TESTTMP/extroot/__init__.py <<EOF | |
184 | > s = 'this is extroot.__init__' |
|
184 | > s = 'this is extroot.__init__' | |
185 | > import foo |
|
185 | > import foo | |
186 | > def extsetup(ui): |
|
186 | > def extsetup(ui): | |
187 | > ui.write('(extroot) ', foo.func(), '\n') |
|
187 | > ui.write('(extroot) ', foo.func(), '\n') | |
188 | > EOF |
|
188 | > EOF | |
189 |
|
189 | |||
190 | $ cat > $TESTTMP/extroot/foo.py <<EOF |
|
190 | $ cat > $TESTTMP/extroot/foo.py <<EOF | |
191 | > # test absolute import |
|
191 | > # test absolute import | |
192 | > buf = [] |
|
192 | > buf = [] | |
193 | > def func(): |
|
193 | > def func(): | |
194 | > # "not locals" case |
|
194 | > # "not locals" case | |
195 | > import extroot.bar |
|
195 | > import extroot.bar | |
196 | > buf.append('import extroot.bar in func(): %s' % extroot.bar.s) |
|
196 | > buf.append('import extroot.bar in func(): %s' % extroot.bar.s) | |
197 | > return '\n(extroot) '.join(buf) |
|
197 | > return '\n(extroot) '.join(buf) | |
198 | > # "fromlist == ('*',)" case |
|
198 | > # "fromlist == ('*',)" case | |
199 | > from extroot.bar import * |
|
199 | > from extroot.bar import * | |
200 | > buf.append('from extroot.bar import *: %s' % s) |
|
200 | > buf.append('from extroot.bar import *: %s' % s) | |
201 | > # "not fromlist" and "if '.' in name" case |
|
201 | > # "not fromlist" and "if '.' in name" case | |
202 | > import extroot.sub1.baz |
|
202 | > import extroot.sub1.baz | |
203 | > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s) |
|
203 | > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s) | |
204 | > # "not fromlist" and NOT "if '.' in name" case |
|
204 | > # "not fromlist" and NOT "if '.' in name" case | |
205 | > import extroot |
|
205 | > import extroot | |
206 | > buf.append('import extroot: %s' % extroot.s) |
|
206 | > buf.append('import extroot: %s' % extroot.s) | |
207 | > # NOT "not fromlist" and NOT "level != -1" case |
|
207 | > # NOT "not fromlist" and NOT "level != -1" case | |
208 | > from extroot.bar import s |
|
208 | > from extroot.bar import s | |
209 | > buf.append('from extroot.bar import s: %s' % s) |
|
209 | > buf.append('from extroot.bar import s: %s' % s) | |
210 | > EOF |
|
210 | > EOF | |
211 | $ hg --config extensions.extroot=$TESTTMP/extroot root |
|
211 | $ hg --config extensions.extroot=$TESTTMP/extroot root | |
212 | (extroot) from extroot.bar import *: this is extroot.bar |
|
212 | (extroot) from extroot.bar import *: this is extroot.bar | |
213 | (extroot) import extroot.sub1.baz: this is extroot.sub1.baz |
|
213 | (extroot) import extroot.sub1.baz: this is extroot.sub1.baz | |
214 | (extroot) import extroot: this is extroot.__init__ |
|
214 | (extroot) import extroot: this is extroot.__init__ | |
215 | (extroot) from extroot.bar import s: this is extroot.bar |
|
215 | (extroot) from extroot.bar import s: this is extroot.bar | |
216 | (extroot) import extroot.bar in func(): this is extroot.bar |
|
216 | (extroot) import extroot.bar in func(): this is extroot.bar | |
217 | $TESTTMP/a (glob) |
|
217 | $TESTTMP/a (glob) | |
218 |
|
218 | |||
219 | #if no-py3k |
|
219 | #if no-py3k | |
220 | $ rm "$TESTTMP"/extroot/foo.* |
|
220 | $ rm "$TESTTMP"/extroot/foo.* | |
221 | $ cat > $TESTTMP/extroot/foo.py <<EOF |
|
221 | $ cat > $TESTTMP/extroot/foo.py <<EOF | |
222 | > # test relative import |
|
222 | > # test relative import | |
223 | > buf = [] |
|
223 | > buf = [] | |
224 | > def func(): |
|
224 | > def func(): | |
225 | > # "not locals" case |
|
225 | > # "not locals" case | |
226 | > import bar |
|
226 | > import bar | |
227 | > buf.append('import bar in func(): %s' % bar.s) |
|
227 | > buf.append('import bar in func(): %s' % bar.s) | |
228 | > return '\n(extroot) '.join(buf) |
|
228 | > return '\n(extroot) '.join(buf) | |
229 | > # "fromlist == ('*',)" case |
|
229 | > # "fromlist == ('*',)" case | |
230 | > from bar import * |
|
230 | > from bar import * | |
231 | > buf.append('from bar import *: %s' % s) |
|
231 | > buf.append('from bar import *: %s' % s) | |
232 | > # "not fromlist" and "if '.' in name" case |
|
232 | > # "not fromlist" and "if '.' in name" case | |
233 | > import sub1.baz |
|
233 | > import sub1.baz | |
234 | > buf.append('import sub1.baz: %s' % sub1.baz.s) |
|
234 | > buf.append('import sub1.baz: %s' % sub1.baz.s) | |
235 | > # "not fromlist" and NOT "if '.' in name" case |
|
235 | > # "not fromlist" and NOT "if '.' in name" case | |
236 | > import sub1 |
|
236 | > import sub1 | |
237 | > buf.append('import sub1: %s' % sub1.s) |
|
237 | > buf.append('import sub1: %s' % sub1.s) | |
238 | > # NOT "not fromlist" and NOT "level != -1" case |
|
238 | > # NOT "not fromlist" and NOT "level != -1" case | |
239 | > from bar import s |
|
239 | > from bar import s | |
240 | > buf.append('from bar import s: %s' % s) |
|
240 | > buf.append('from bar import s: %s' % s) | |
241 | > EOF |
|
241 | > EOF | |
242 | $ hg --config extensions.extroot=$TESTTMP/extroot root |
|
242 | $ hg --config extensions.extroot=$TESTTMP/extroot root | |
243 | (extroot) from bar import *: this is extroot.bar |
|
243 | (extroot) from bar import *: this is extroot.bar | |
244 | (extroot) import sub1.baz: this is extroot.sub1.baz |
|
244 | (extroot) import sub1.baz: this is extroot.sub1.baz | |
245 | (extroot) import sub1: this is extroot.sub1.__init__ |
|
245 | (extroot) import sub1: this is extroot.sub1.__init__ | |
246 | (extroot) from bar import s: this is extroot.bar |
|
246 | (extroot) from bar import s: this is extroot.bar | |
247 | (extroot) import bar in func(): this is extroot.bar |
|
247 | (extroot) import bar in func(): this is extroot.bar | |
248 | $TESTTMP/a (glob) |
|
248 | $TESTTMP/a (glob) | |
249 | #endif |
|
249 | #endif | |
250 |
|
250 | |||
251 | $ cd .. |
|
251 | $ cd .. | |
252 |
|
252 | |||
253 | hide outer repo |
|
253 | hide outer repo | |
254 | $ hg init |
|
254 | $ hg init | |
255 |
|
255 | |||
256 | $ cat > empty.py <<EOF |
|
256 | $ cat > empty.py <<EOF | |
257 | > '''empty cmdtable |
|
257 | > '''empty cmdtable | |
258 | > ''' |
|
258 | > ''' | |
259 | > cmdtable = {} |
|
259 | > cmdtable = {} | |
260 | > EOF |
|
260 | > EOF | |
261 | $ emptypath=`pwd`/empty.py |
|
261 | $ emptypath=`pwd`/empty.py | |
262 | $ echo "empty = $emptypath" >> $HGRCPATH |
|
262 | $ echo "empty = $emptypath" >> $HGRCPATH | |
263 | $ hg help empty |
|
263 | $ hg help empty | |
264 | empty extension - empty cmdtable |
|
264 | empty extension - empty cmdtable | |
265 |
|
265 | |||
266 | no commands defined |
|
266 | no commands defined | |
267 |
|
267 | |||
268 |
|
268 | |||
269 | $ echo 'empty = !' >> $HGRCPATH |
|
269 | $ echo 'empty = !' >> $HGRCPATH | |
270 |
|
270 | |||
271 | $ cat > debugextension.py <<EOF |
|
271 | $ cat > debugextension.py <<EOF | |
272 | > '''only debugcommands |
|
272 | > '''only debugcommands | |
273 | > ''' |
|
273 | > ''' | |
274 | > from mercurial import cmdutil |
|
274 | > from mercurial import cmdutil | |
275 | > cmdtable = {} |
|
275 | > cmdtable = {} | |
276 | > command = cmdutil.command(cmdtable) |
|
276 | > command = cmdutil.command(cmdtable) | |
277 | > @command('debugfoobar', [], 'hg debugfoobar') |
|
277 | > @command('debugfoobar', [], 'hg debugfoobar') | |
278 | > def debugfoobar(ui, repo, *args, **opts): |
|
278 | > def debugfoobar(ui, repo, *args, **opts): | |
279 | > "yet another debug command" |
|
279 | > "yet another debug command" | |
280 | > pass |
|
280 | > pass | |
281 | > @command('foo', [], 'hg foo') |
|
281 | > @command('foo', [], 'hg foo') | |
282 | > def foo(ui, repo, *args, **opts): |
|
282 | > def foo(ui, repo, *args, **opts): | |
283 | > """yet another foo command |
|
283 | > """yet another foo command | |
284 | > This command has been DEPRECATED since forever. |
|
284 | > This command has been DEPRECATED since forever. | |
285 | > """ |
|
285 | > """ | |
286 | > pass |
|
286 | > pass | |
287 | > EOF |
|
287 | > EOF | |
288 | $ debugpath=`pwd`/debugextension.py |
|
288 | $ debugpath=`pwd`/debugextension.py | |
289 | $ echo "debugextension = $debugpath" >> $HGRCPATH |
|
289 | $ echo "debugextension = $debugpath" >> $HGRCPATH | |
290 |
|
290 | |||
291 | $ hg help debugextension |
|
291 | $ hg help debugextension | |
292 | debugextension extension - only debugcommands |
|
292 | debugextension extension - only debugcommands | |
293 |
|
293 | |||
294 | no commands defined |
|
294 | no commands defined | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | $ hg --verbose help debugextension |
|
297 | $ hg --verbose help debugextension | |
298 | debugextension extension - only debugcommands |
|
298 | debugextension extension - only debugcommands | |
299 |
|
299 | |||
300 | list of commands: |
|
300 | list of commands: | |
301 |
|
301 | |||
302 | foo yet another foo command |
|
302 | foo yet another foo command | |
303 |
|
303 | |||
304 | global options ([+] can be repeated): |
|
304 | global options ([+] can be repeated): | |
305 |
|
305 | |||
306 | -R --repository REPO repository root directory or name of overlay bundle |
|
306 | -R --repository REPO repository root directory or name of overlay bundle | |
307 | file |
|
307 | file | |
308 | --cwd DIR change working directory |
|
308 | --cwd DIR change working directory | |
309 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
309 | -y --noninteractive do not prompt, automatically pick the first choice for | |
310 | all prompts |
|
310 | all prompts | |
311 | -q --quiet suppress output |
|
311 | -q --quiet suppress output | |
312 | -v --verbose enable additional output |
|
312 | -v --verbose enable additional output | |
313 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
313 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
314 | --debug enable debugging output |
|
314 | --debug enable debugging output | |
315 | --debugger start debugger |
|
315 | --debugger start debugger | |
316 | --encoding ENCODE set the charset encoding (default: ascii) |
|
316 | --encoding ENCODE set the charset encoding (default: ascii) | |
317 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
317 | --encodingmode MODE set the charset encoding mode (default: strict) | |
318 | --traceback always print a traceback on exception |
|
318 | --traceback always print a traceback on exception | |
319 | --time time how long the command takes |
|
319 | --time time how long the command takes | |
320 | --profile print command execution profile |
|
320 | --profile print command execution profile | |
321 | --version output version information and exit |
|
321 | --version output version information and exit | |
322 | -h --help display help and exit |
|
322 | -h --help display help and exit | |
323 | --hidden consider hidden changesets |
|
323 | --hidden consider hidden changesets | |
324 |
|
324 | |||
325 |
|
325 | |||
326 |
|
326 | |||
327 |
|
327 | |||
328 |
|
328 | |||
329 |
|
329 | |||
330 | $ hg --debug help debugextension |
|
330 | $ hg --debug help debugextension | |
331 | debugextension extension - only debugcommands |
|
331 | debugextension extension - only debugcommands | |
332 |
|
332 | |||
333 | list of commands: |
|
333 | list of commands: | |
334 |
|
334 | |||
335 | debugfoobar yet another debug command |
|
335 | debugfoobar yet another debug command | |
336 | foo yet another foo command |
|
336 | foo yet another foo command | |
337 |
|
337 | |||
338 | global options ([+] can be repeated): |
|
338 | global options ([+] can be repeated): | |
339 |
|
339 | |||
340 | -R --repository REPO repository root directory or name of overlay bundle |
|
340 | -R --repository REPO repository root directory or name of overlay bundle | |
341 | file |
|
341 | file | |
342 | --cwd DIR change working directory |
|
342 | --cwd DIR change working directory | |
343 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
343 | -y --noninteractive do not prompt, automatically pick the first choice for | |
344 | all prompts |
|
344 | all prompts | |
345 | -q --quiet suppress output |
|
345 | -q --quiet suppress output | |
346 | -v --verbose enable additional output |
|
346 | -v --verbose enable additional output | |
347 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
347 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
348 | --debug enable debugging output |
|
348 | --debug enable debugging output | |
349 | --debugger start debugger |
|
349 | --debugger start debugger | |
350 | --encoding ENCODE set the charset encoding (default: ascii) |
|
350 | --encoding ENCODE set the charset encoding (default: ascii) | |
351 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
351 | --encodingmode MODE set the charset encoding mode (default: strict) | |
352 | --traceback always print a traceback on exception |
|
352 | --traceback always print a traceback on exception | |
353 | --time time how long the command takes |
|
353 | --time time how long the command takes | |
354 | --profile print command execution profile |
|
354 | --profile print command execution profile | |
355 | --version output version information and exit |
|
355 | --version output version information and exit | |
356 | -h --help display help and exit |
|
356 | -h --help display help and exit | |
357 | --hidden consider hidden changesets |
|
357 | --hidden consider hidden changesets | |
358 |
|
358 | |||
359 |
|
359 | |||
360 |
|
360 | |||
361 |
|
361 | |||
362 |
|
362 | |||
363 | $ echo 'debugextension = !' >> $HGRCPATH |
|
363 | $ echo 'debugextension = !' >> $HGRCPATH | |
364 |
|
364 | |||
365 | Extension module help vs command help: |
|
365 | Extension module help vs command help: | |
366 |
|
366 | |||
367 | $ echo 'extdiff =' >> $HGRCPATH |
|
367 | $ echo 'extdiff =' >> $HGRCPATH | |
368 | $ hg help extdiff |
|
368 | $ hg help extdiff | |
369 | hg extdiff [OPT]... [FILE]... |
|
369 | hg extdiff [OPT]... [FILE]... | |
370 |
|
370 | |||
371 | use external program to diff repository (or selected files) |
|
371 | use external program to diff repository (or selected files) | |
372 |
|
372 | |||
373 | Show differences between revisions for the specified files, using an |
|
373 | Show differences between revisions for the specified files, using an | |
374 | external program. The default program used is diff, with default options |
|
374 | external program. The default program used is diff, with default options | |
375 | "-Npru". |
|
375 | "-Npru". | |
376 |
|
376 | |||
377 | To select a different program, use the -p/--program option. The program |
|
377 | To select a different program, use the -p/--program option. The program | |
378 | will be passed the names of two directories to compare. To pass additional |
|
378 | will be passed the names of two directories to compare. To pass additional | |
379 | options to the program, use -o/--option. These will be passed before the |
|
379 | options to the program, use -o/--option. These will be passed before the | |
380 | names of the directories to compare. |
|
380 | names of the directories to compare. | |
381 |
|
381 | |||
382 | When two revision arguments are given, then changes are shown between |
|
382 | When two revision arguments are given, then changes are shown between | |
383 | those revisions. If only one revision is specified then that revision is |
|
383 | those revisions. If only one revision is specified then that revision is | |
384 | compared to the working directory, and, when no revisions are specified, |
|
384 | compared to the working directory, and, when no revisions are specified, | |
385 | the working directory files are compared to its parent. |
|
385 | the working directory files are compared to its parent. | |
386 |
|
386 | |||
387 | (use "hg help -e extdiff" to show help for the extdiff extension) |
|
387 | (use "hg help -e extdiff" to show help for the extdiff extension) | |
388 |
|
388 | |||
389 | options ([+] can be repeated): |
|
389 | options ([+] can be repeated): | |
390 |
|
390 | |||
391 | -p --program CMD comparison program to run |
|
391 | -p --program CMD comparison program to run | |
392 | -o --option OPT [+] pass option to comparison program |
|
392 | -o --option OPT [+] pass option to comparison program | |
393 | -r --rev REV [+] revision |
|
393 | -r --rev REV [+] revision | |
394 | -c --change REV change made by revision |
|
394 | -c --change REV change made by revision | |
395 | -I --include PATTERN [+] include names matching the given patterns |
|
395 | -I --include PATTERN [+] include names matching the given patterns | |
396 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
396 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
397 |
|
397 | |||
398 | (some details hidden, use --verbose to show complete help) |
|
398 | (some details hidden, use --verbose to show complete help) | |
399 |
|
399 | |||
400 |
|
400 | |||
401 |
|
401 | |||
402 |
|
402 | |||
403 |
|
403 | |||
404 |
|
404 | |||
405 |
|
405 | |||
406 |
|
406 | |||
407 |
|
407 | |||
408 |
|
408 | |||
409 | $ hg help --extension extdiff |
|
409 | $ hg help --extension extdiff | |
410 | extdiff extension - command to allow external programs to compare revisions |
|
410 | extdiff extension - command to allow external programs to compare revisions | |
411 |
|
411 | |||
412 | The extdiff Mercurial extension allows you to use external programs to compare |
|
412 | The extdiff Mercurial extension allows you to use external programs to compare | |
413 | revisions, or revision with working directory. The external diff programs are |
|
413 | revisions, or revision with working directory. The external diff programs are | |
414 | called with a configurable set of options and two non-option arguments: paths |
|
414 | called with a configurable set of options and two non-option arguments: paths | |
415 | to directories containing snapshots of files to compare. |
|
415 | to directories containing snapshots of files to compare. | |
416 |
|
416 | |||
417 | The extdiff extension also allows you to configure new diff commands, so you |
|
417 | The extdiff extension also allows you to configure new diff commands, so you | |
418 | do not need to type "hg extdiff -p kdiff3" always. |
|
418 | do not need to type "hg extdiff -p kdiff3" always. | |
419 |
|
419 | |||
420 | [extdiff] |
|
420 | [extdiff] | |
421 | # add new command that runs GNU diff(1) in 'context diff' mode |
|
421 | # add new command that runs GNU diff(1) in 'context diff' mode | |
422 | cdiff = gdiff -Nprc5 |
|
422 | cdiff = gdiff -Nprc5 | |
423 | ## or the old way: |
|
423 | ## or the old way: | |
424 | #cmd.cdiff = gdiff |
|
424 | #cmd.cdiff = gdiff | |
425 | #opts.cdiff = -Nprc5 |
|
425 | #opts.cdiff = -Nprc5 | |
426 |
|
426 | |||
427 | # add new command called vdiff, runs kdiff3 |
|
427 | # add new command called vdiff, runs kdiff3 | |
428 | vdiff = kdiff3 |
|
428 | vdiff = kdiff3 | |
429 |
|
429 | |||
430 | # add new command called meld, runs meld (no need to name twice) |
|
430 | # add new command called meld, runs meld (no need to name twice) | |
431 | meld = |
|
431 | meld = | |
432 |
|
432 | |||
433 | # add new command called vimdiff, runs gvimdiff with DirDiff plugin |
|
433 | # add new command called vimdiff, runs gvimdiff with DirDiff plugin | |
434 | # (see http://www.vim.org/scripts/script.php?script_id=102) Non |
|
434 | # (see http://www.vim.org/scripts/script.php?script_id=102) Non | |
435 | # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
|
435 | # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in | |
436 | # your .vimrc |
|
436 | # your .vimrc | |
437 | vimdiff = gvim -f "+next" \ |
|
437 | vimdiff = gvim -f "+next" \ | |
438 | "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" |
|
438 | "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" | |
439 |
|
439 | |||
440 | Tool arguments can include variables that are expanded at runtime: |
|
440 | Tool arguments can include variables that are expanded at runtime: | |
441 |
|
441 | |||
442 | $parent1, $plabel1 - filename, descriptive label of first parent |
|
442 | $parent1, $plabel1 - filename, descriptive label of first parent | |
443 | $child, $clabel - filename, descriptive label of child revision |
|
443 | $child, $clabel - filename, descriptive label of child revision | |
444 | $parent2, $plabel2 - filename, descriptive label of second parent |
|
444 | $parent2, $plabel2 - filename, descriptive label of second parent | |
445 | $root - repository root |
|
445 | $root - repository root | |
446 | $parent is an alias for $parent1. |
|
446 | $parent is an alias for $parent1. | |
447 |
|
447 | |||
448 | The extdiff extension will look in your [diff-tools] and [merge-tools] |
|
448 | The extdiff extension will look in your [diff-tools] and [merge-tools] | |
449 | sections for diff tool arguments, when none are specified in [extdiff]. |
|
449 | sections for diff tool arguments, when none are specified in [extdiff]. | |
450 |
|
450 | |||
451 | [extdiff] |
|
451 | [extdiff] | |
452 | kdiff3 = |
|
452 | kdiff3 = | |
453 |
|
453 | |||
454 | [diff-tools] |
|
454 | [diff-tools] | |
455 | kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child |
|
455 | kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child | |
456 |
|
456 | |||
457 | You can use -I/-X and list of file or directory names like normal "hg diff" |
|
457 | You can use -I/-X and list of file or directory names like normal "hg diff" | |
458 | command. The extdiff extension makes snapshots of only needed files, so |
|
458 | command. The extdiff extension makes snapshots of only needed files, so | |
459 | running the external diff program will actually be pretty fast (at least |
|
459 | running the external diff program will actually be pretty fast (at least | |
460 | faster than having to compare the entire tree). |
|
460 | faster than having to compare the entire tree). | |
461 |
|
461 | |||
462 | list of commands: |
|
462 | list of commands: | |
463 |
|
463 | |||
464 | extdiff use external program to diff repository (or selected files) |
|
464 | extdiff use external program to diff repository (or selected files) | |
465 |
|
465 | |||
466 |
use "hg |
|
466 | (use "hg help -v extdiff" to show built-in aliases and global options) | |
467 |
|
467 | |||
468 |
|
468 | |||
469 |
|
469 | |||
470 |
|
470 | |||
471 |
|
471 | |||
472 |
|
472 | |||
473 |
|
473 | |||
474 |
|
474 | |||
475 |
|
475 | |||
476 |
|
476 | |||
477 |
|
477 | |||
478 |
|
478 | |||
479 |
|
479 | |||
480 |
|
480 | |||
481 |
|
481 | |||
482 |
|
482 | |||
483 | $ echo 'extdiff = !' >> $HGRCPATH |
|
483 | $ echo 'extdiff = !' >> $HGRCPATH | |
484 |
|
484 | |||
485 | Test help topic with same name as extension |
|
485 | Test help topic with same name as extension | |
486 |
|
486 | |||
487 | $ cat > multirevs.py <<EOF |
|
487 | $ cat > multirevs.py <<EOF | |
488 | > from mercurial import cmdutil, commands |
|
488 | > from mercurial import cmdutil, commands | |
489 | > cmdtable = {} |
|
489 | > cmdtable = {} | |
490 | > command = cmdutil.command(cmdtable) |
|
490 | > command = cmdutil.command(cmdtable) | |
491 | > """multirevs extension |
|
491 | > """multirevs extension | |
492 | > Big multi-line module docstring.""" |
|
492 | > Big multi-line module docstring.""" | |
493 | > @command('multirevs', [], 'ARG', norepo=True) |
|
493 | > @command('multirevs', [], 'ARG', norepo=True) | |
494 | > def multirevs(ui, repo, arg, *args, **opts): |
|
494 | > def multirevs(ui, repo, arg, *args, **opts): | |
495 | > """multirevs command""" |
|
495 | > """multirevs command""" | |
496 | > pass |
|
496 | > pass | |
497 | > EOF |
|
497 | > EOF | |
498 | $ echo "multirevs = multirevs.py" >> $HGRCPATH |
|
498 | $ echo "multirevs = multirevs.py" >> $HGRCPATH | |
499 |
|
499 | |||
500 | $ hg help multirevs |
|
500 | $ hg help multirevs | |
501 | Specifying Multiple Revisions |
|
501 | Specifying Multiple Revisions | |
502 | """"""""""""""""""""""""""""" |
|
502 | """"""""""""""""""""""""""""" | |
503 |
|
503 | |||
504 | When Mercurial accepts more than one revision, they may be specified |
|
504 | When Mercurial accepts more than one revision, they may be specified | |
505 | individually, or provided as a topologically continuous range, separated |
|
505 | individually, or provided as a topologically continuous range, separated | |
506 | by the ":" character. |
|
506 | by the ":" character. | |
507 |
|
507 | |||
508 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END are |
|
508 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END are | |
509 | revision identifiers. Both BEGIN and END are optional. If BEGIN is not |
|
509 | revision identifiers. Both BEGIN and END are optional. If BEGIN is not | |
510 | specified, it defaults to revision number 0. If END is not specified, it |
|
510 | specified, it defaults to revision number 0. If END is not specified, it | |
511 | defaults to the tip. The range ":" thus means "all revisions". |
|
511 | defaults to the tip. The range ":" thus means "all revisions". | |
512 |
|
512 | |||
513 | If BEGIN is greater than END, revisions are treated in reverse order. |
|
513 | If BEGIN is greater than END, revisions are treated in reverse order. | |
514 |
|
514 | |||
515 | A range acts as a closed interval. This means that a range of 3:5 gives 3, |
|
515 | A range acts as a closed interval. This means that a range of 3:5 gives 3, | |
516 | 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. |
|
516 | 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. | |
517 |
|
517 | |||
518 | use "hg help -c multirevs" to see help for the multirevs command |
|
518 | use "hg help -c multirevs" to see help for the multirevs command | |
519 |
|
519 | |||
520 |
|
520 | |||
521 |
|
521 | |||
522 |
|
522 | |||
523 |
|
523 | |||
524 |
|
524 | |||
525 | $ hg help -c multirevs |
|
525 | $ hg help -c multirevs | |
526 | hg multirevs ARG |
|
526 | hg multirevs ARG | |
527 |
|
527 | |||
528 | multirevs command |
|
528 | multirevs command | |
529 |
|
529 | |||
530 | (some details hidden, use --verbose to show complete help) |
|
530 | (some details hidden, use --verbose to show complete help) | |
531 |
|
531 | |||
532 |
|
532 | |||
533 |
|
533 | |||
534 | $ hg multirevs |
|
534 | $ hg multirevs | |
535 | hg multirevs: invalid arguments |
|
535 | hg multirevs: invalid arguments | |
536 | hg multirevs ARG |
|
536 | hg multirevs ARG | |
537 |
|
537 | |||
538 | multirevs command |
|
538 | multirevs command | |
539 |
|
539 | |||
540 | (use "hg multirevs -h" to show more help) |
|
540 | (use "hg multirevs -h" to show more help) | |
541 | [255] |
|
541 | [255] | |
542 |
|
542 | |||
543 |
|
543 | |||
544 |
|
544 | |||
545 | $ echo "multirevs = !" >> $HGRCPATH |
|
545 | $ echo "multirevs = !" >> $HGRCPATH | |
546 |
|
546 | |||
547 | Issue811: Problem loading extensions twice (by site and by user) |
|
547 | Issue811: Problem loading extensions twice (by site and by user) | |
548 |
|
548 | |||
549 | $ debugpath=`pwd`/debugissue811.py |
|
549 | $ debugpath=`pwd`/debugissue811.py | |
550 | $ cat > debugissue811.py <<EOF |
|
550 | $ cat > debugissue811.py <<EOF | |
551 | > '''show all loaded extensions |
|
551 | > '''show all loaded extensions | |
552 | > ''' |
|
552 | > ''' | |
553 | > from mercurial import cmdutil, commands, extensions |
|
553 | > from mercurial import cmdutil, commands, extensions | |
554 | > cmdtable = {} |
|
554 | > cmdtable = {} | |
555 | > command = cmdutil.command(cmdtable) |
|
555 | > command = cmdutil.command(cmdtable) | |
556 | > @command('debugextensions', [], 'hg debugextensions', norepo=True) |
|
556 | > @command('debugextensions', [], 'hg debugextensions', norepo=True) | |
557 | > def debugextensions(ui): |
|
557 | > def debugextensions(ui): | |
558 | > "yet another debug command" |
|
558 | > "yet another debug command" | |
559 | > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()])) |
|
559 | > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()])) | |
560 | > EOF |
|
560 | > EOF | |
561 | $ echo "debugissue811 = $debugpath" >> $HGRCPATH |
|
561 | $ echo "debugissue811 = $debugpath" >> $HGRCPATH | |
562 | $ echo "mq=" >> $HGRCPATH |
|
562 | $ echo "mq=" >> $HGRCPATH | |
563 | $ echo "strip=" >> $HGRCPATH |
|
563 | $ echo "strip=" >> $HGRCPATH | |
564 | $ echo "hgext.mq=" >> $HGRCPATH |
|
564 | $ echo "hgext.mq=" >> $HGRCPATH | |
565 | $ echo "hgext/mq=" >> $HGRCPATH |
|
565 | $ echo "hgext/mq=" >> $HGRCPATH | |
566 |
|
566 | |||
567 | Show extensions: |
|
567 | Show extensions: | |
568 | (note that mq force load strip, also checking it's not loaded twice) |
|
568 | (note that mq force load strip, also checking it's not loaded twice) | |
569 |
|
569 | |||
570 | $ hg debugextensions |
|
570 | $ hg debugextensions | |
571 | debugissue811 |
|
571 | debugissue811 | |
572 | strip |
|
572 | strip | |
573 | mq |
|
573 | mq | |
574 |
|
574 | |||
575 | Disabled extension commands: |
|
575 | Disabled extension commands: | |
576 |
|
576 | |||
577 | $ ORGHGRCPATH=$HGRCPATH |
|
577 | $ ORGHGRCPATH=$HGRCPATH | |
578 | $ HGRCPATH= |
|
578 | $ HGRCPATH= | |
579 | $ export HGRCPATH |
|
579 | $ export HGRCPATH | |
580 | $ hg help email |
|
580 | $ hg help email | |
581 | 'email' is provided by the following extension: |
|
581 | 'email' is provided by the following extension: | |
582 |
|
582 | |||
583 | patchbomb command to send changesets as (a series of) patch emails |
|
583 | patchbomb command to send changesets as (a series of) patch emails | |
584 |
|
584 | |||
585 | (use "hg help extensions" for information on enabling extensions) |
|
585 | (use "hg help extensions" for information on enabling extensions) | |
586 |
|
586 | |||
587 |
|
587 | |||
588 | $ hg qdel |
|
588 | $ hg qdel | |
589 | hg: unknown command 'qdel' |
|
589 | hg: unknown command 'qdel' | |
590 | 'qdelete' is provided by the following extension: |
|
590 | 'qdelete' is provided by the following extension: | |
591 |
|
591 | |||
592 | mq manage a stack of patches |
|
592 | mq manage a stack of patches | |
593 |
|
593 | |||
594 | (use "hg help extensions" for information on enabling extensions) |
|
594 | (use "hg help extensions" for information on enabling extensions) | |
595 | [255] |
|
595 | [255] | |
596 |
|
596 | |||
597 |
|
597 | |||
598 | $ hg churn |
|
598 | $ hg churn | |
599 | hg: unknown command 'churn' |
|
599 | hg: unknown command 'churn' | |
600 | 'churn' is provided by the following extension: |
|
600 | 'churn' is provided by the following extension: | |
601 |
|
601 | |||
602 | churn command to display statistics about repository history |
|
602 | churn command to display statistics about repository history | |
603 |
|
603 | |||
604 | (use "hg help extensions" for information on enabling extensions) |
|
604 | (use "hg help extensions" for information on enabling extensions) | |
605 | [255] |
|
605 | [255] | |
606 |
|
606 | |||
607 |
|
607 | |||
608 |
|
608 | |||
609 | Disabled extensions: |
|
609 | Disabled extensions: | |
610 |
|
610 | |||
611 | $ hg help churn |
|
611 | $ hg help churn | |
612 | churn extension - command to display statistics about repository history |
|
612 | churn extension - command to display statistics about repository history | |
613 |
|
613 | |||
614 | (use "hg help extensions" for information on enabling extensions) |
|
614 | (use "hg help extensions" for information on enabling extensions) | |
615 |
|
615 | |||
616 | $ hg help patchbomb |
|
616 | $ hg help patchbomb | |
617 | patchbomb extension - command to send changesets as (a series of) patch emails |
|
617 | patchbomb extension - command to send changesets as (a series of) patch emails | |
618 |
|
618 | |||
619 | (use "hg help extensions" for information on enabling extensions) |
|
619 | (use "hg help extensions" for information on enabling extensions) | |
620 |
|
620 | |||
621 |
|
621 | |||
622 | Broken disabled extension and command: |
|
622 | Broken disabled extension and command: | |
623 |
|
623 | |||
624 | $ mkdir hgext |
|
624 | $ mkdir hgext | |
625 | $ echo > hgext/__init__.py |
|
625 | $ echo > hgext/__init__.py | |
626 | $ cat > hgext/broken.py <<EOF |
|
626 | $ cat > hgext/broken.py <<EOF | |
627 | > "broken extension' |
|
627 | > "broken extension' | |
628 | > EOF |
|
628 | > EOF | |
629 | $ cat > path.py <<EOF |
|
629 | $ cat > path.py <<EOF | |
630 | > import os, sys |
|
630 | > import os, sys | |
631 | > sys.path.insert(0, os.environ['HGEXTPATH']) |
|
631 | > sys.path.insert(0, os.environ['HGEXTPATH']) | |
632 | > EOF |
|
632 | > EOF | |
633 | $ HGEXTPATH=`pwd` |
|
633 | $ HGEXTPATH=`pwd` | |
634 | $ export HGEXTPATH |
|
634 | $ export HGEXTPATH | |
635 |
|
635 | |||
636 | $ hg --config extensions.path=./path.py help broken |
|
636 | $ hg --config extensions.path=./path.py help broken | |
637 | broken extension - (no help text available) |
|
637 | broken extension - (no help text available) | |
638 |
|
638 | |||
639 | (use "hg help extensions" for information on enabling extensions) |
|
639 | (use "hg help extensions" for information on enabling extensions) | |
640 |
|
640 | |||
641 |
|
641 | |||
642 | $ cat > hgext/forest.py <<EOF |
|
642 | $ cat > hgext/forest.py <<EOF | |
643 | > cmdtable = None |
|
643 | > cmdtable = None | |
644 | > EOF |
|
644 | > EOF | |
645 | $ hg --config extensions.path=./path.py help foo > /dev/null |
|
645 | $ hg --config extensions.path=./path.py help foo > /dev/null | |
646 | warning: error finding commands in $TESTTMP/hgext/forest.py (glob) |
|
646 | warning: error finding commands in $TESTTMP/hgext/forest.py (glob) | |
647 | abort: no such help topic: foo |
|
647 | abort: no such help topic: foo | |
648 | (try "hg help --keyword foo") |
|
648 | (try "hg help --keyword foo") | |
649 | [255] |
|
649 | [255] | |
650 |
|
650 | |||
651 | $ cat > throw.py <<EOF |
|
651 | $ cat > throw.py <<EOF | |
652 | > from mercurial import cmdutil, commands |
|
652 | > from mercurial import cmdutil, commands | |
653 | > cmdtable = {} |
|
653 | > cmdtable = {} | |
654 | > command = cmdutil.command(cmdtable) |
|
654 | > command = cmdutil.command(cmdtable) | |
655 | > class Bogon(Exception): pass |
|
655 | > class Bogon(Exception): pass | |
656 | > @command('throw', [], 'hg throw', norepo=True) |
|
656 | > @command('throw', [], 'hg throw', norepo=True) | |
657 | > def throw(ui, **opts): |
|
657 | > def throw(ui, **opts): | |
658 | > """throws an exception""" |
|
658 | > """throws an exception""" | |
659 | > raise Bogon() |
|
659 | > raise Bogon() | |
660 | > EOF |
|
660 | > EOF | |
661 | No declared supported version, extension complains: |
|
661 | No declared supported version, extension complains: | |
662 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
662 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
663 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
663 | ** Unknown exception encountered with possibly-broken third-party extension throw | |
664 | ** which supports versions unknown of Mercurial. |
|
664 | ** which supports versions unknown of Mercurial. | |
665 | ** Please disable throw and try your action again. |
|
665 | ** Please disable throw and try your action again. | |
666 | ** If that fixes the bug please report it to the extension author. |
|
666 | ** If that fixes the bug please report it to the extension author. | |
667 | ** Python * (glob) |
|
667 | ** Python * (glob) | |
668 | ** Mercurial Distributed SCM * (glob) |
|
668 | ** Mercurial Distributed SCM * (glob) | |
669 | ** Extensions loaded: throw |
|
669 | ** Extensions loaded: throw | |
670 | empty declaration of supported version, extension complains: |
|
670 | empty declaration of supported version, extension complains: | |
671 | $ echo "testedwith = ''" >> throw.py |
|
671 | $ echo "testedwith = ''" >> throw.py | |
672 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
672 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
673 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
673 | ** Unknown exception encountered with possibly-broken third-party extension throw | |
674 | ** which supports versions unknown of Mercurial. |
|
674 | ** which supports versions unknown of Mercurial. | |
675 | ** Please disable throw and try your action again. |
|
675 | ** Please disable throw and try your action again. | |
676 | ** If that fixes the bug please report it to the extension author. |
|
676 | ** If that fixes the bug please report it to the extension author. | |
677 | ** Python * (glob) |
|
677 | ** Python * (glob) | |
678 | ** Mercurial Distributed SCM (*) (glob) |
|
678 | ** Mercurial Distributed SCM (*) (glob) | |
679 | ** Extensions loaded: throw |
|
679 | ** Extensions loaded: throw | |
680 | If the extension specifies a buglink, show that: |
|
680 | If the extension specifies a buglink, show that: | |
681 | $ echo 'buglink = "http://example.com/bts"' >> throw.py |
|
681 | $ echo 'buglink = "http://example.com/bts"' >> throw.py | |
682 | $ rm -f throw.pyc throw.pyo |
|
682 | $ rm -f throw.pyc throw.pyo | |
683 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
683 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
684 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
684 | ** Unknown exception encountered with possibly-broken third-party extension throw | |
685 | ** which supports versions unknown of Mercurial. |
|
685 | ** which supports versions unknown of Mercurial. | |
686 | ** Please disable throw and try your action again. |
|
686 | ** Please disable throw and try your action again. | |
687 | ** If that fixes the bug please report it to http://example.com/bts |
|
687 | ** If that fixes the bug please report it to http://example.com/bts | |
688 | ** Python * (glob) |
|
688 | ** Python * (glob) | |
689 | ** Mercurial Distributed SCM (*) (glob) |
|
689 | ** Mercurial Distributed SCM (*) (glob) | |
690 | ** Extensions loaded: throw |
|
690 | ** Extensions loaded: throw | |
691 | If the extensions declare outdated versions, accuse the older extension first: |
|
691 | If the extensions declare outdated versions, accuse the older extension first: | |
692 | $ echo "from mercurial import util" >> older.py |
|
692 | $ echo "from mercurial import util" >> older.py | |
693 | $ echo "util.version = lambda:'2.2'" >> older.py |
|
693 | $ echo "util.version = lambda:'2.2'" >> older.py | |
694 | $ echo "testedwith = '1.9.3'" >> older.py |
|
694 | $ echo "testedwith = '1.9.3'" >> older.py | |
695 | $ echo "testedwith = '2.1.1'" >> throw.py |
|
695 | $ echo "testedwith = '2.1.1'" >> throw.py | |
696 | $ rm -f throw.pyc throw.pyo |
|
696 | $ rm -f throw.pyc throw.pyo | |
697 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
697 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ | |
698 | > throw 2>&1 | egrep '^\*\*' |
|
698 | > throw 2>&1 | egrep '^\*\*' | |
699 | ** Unknown exception encountered with possibly-broken third-party extension older |
|
699 | ** Unknown exception encountered with possibly-broken third-party extension older | |
700 | ** which supports versions 1.9.3 of Mercurial. |
|
700 | ** which supports versions 1.9.3 of Mercurial. | |
701 | ** Please disable older and try your action again. |
|
701 | ** Please disable older and try your action again. | |
702 | ** If that fixes the bug please report it to the extension author. |
|
702 | ** If that fixes the bug please report it to the extension author. | |
703 | ** Python * (glob) |
|
703 | ** Python * (glob) | |
704 | ** Mercurial Distributed SCM (version 2.2) |
|
704 | ** Mercurial Distributed SCM (version 2.2) | |
705 | ** Extensions loaded: throw, older |
|
705 | ** Extensions loaded: throw, older | |
706 | One extension only tested with older, one only with newer versions: |
|
706 | One extension only tested with older, one only with newer versions: | |
707 | $ echo "util.version = lambda:'2.1.0'" >> older.py |
|
707 | $ echo "util.version = lambda:'2.1.0'" >> older.py | |
708 | $ rm -f older.pyc older.pyo |
|
708 | $ rm -f older.pyc older.pyo | |
709 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
709 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ | |
710 | > throw 2>&1 | egrep '^\*\*' |
|
710 | > throw 2>&1 | egrep '^\*\*' | |
711 | ** Unknown exception encountered with possibly-broken third-party extension older |
|
711 | ** Unknown exception encountered with possibly-broken third-party extension older | |
712 | ** which supports versions 1.9.3 of Mercurial. |
|
712 | ** which supports versions 1.9.3 of Mercurial. | |
713 | ** Please disable older and try your action again. |
|
713 | ** Please disable older and try your action again. | |
714 | ** If that fixes the bug please report it to the extension author. |
|
714 | ** If that fixes the bug please report it to the extension author. | |
715 | ** Python * (glob) |
|
715 | ** Python * (glob) | |
716 | ** Mercurial Distributed SCM (version 2.1.0) |
|
716 | ** Mercurial Distributed SCM (version 2.1.0) | |
717 | ** Extensions loaded: throw, older |
|
717 | ** Extensions loaded: throw, older | |
718 | Older extension is tested with current version, the other only with newer: |
|
718 | Older extension is tested with current version, the other only with newer: | |
719 | $ echo "util.version = lambda:'1.9.3'" >> older.py |
|
719 | $ echo "util.version = lambda:'1.9.3'" >> older.py | |
720 | $ rm -f older.pyc older.pyo |
|
720 | $ rm -f older.pyc older.pyo | |
721 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
721 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ | |
722 | > throw 2>&1 | egrep '^\*\*' |
|
722 | > throw 2>&1 | egrep '^\*\*' | |
723 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
723 | ** Unknown exception encountered with possibly-broken third-party extension throw | |
724 | ** which supports versions 2.1.1 of Mercurial. |
|
724 | ** which supports versions 2.1.1 of Mercurial. | |
725 | ** Please disable throw and try your action again. |
|
725 | ** Please disable throw and try your action again. | |
726 | ** If that fixes the bug please report it to http://example.com/bts |
|
726 | ** If that fixes the bug please report it to http://example.com/bts | |
727 | ** Python * (glob) |
|
727 | ** Python * (glob) | |
728 | ** Mercurial Distributed SCM (version 1.9.3) |
|
728 | ** Mercurial Distributed SCM (version 1.9.3) | |
729 | ** Extensions loaded: throw, older |
|
729 | ** Extensions loaded: throw, older | |
730 |
|
730 | |||
731 | Declare the version as supporting this hg version, show regular bts link: |
|
731 | Declare the version as supporting this hg version, show regular bts link: | |
732 | $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'` |
|
732 | $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'` | |
733 | $ echo 'testedwith = """'"$hgver"'"""' >> throw.py |
|
733 | $ echo 'testedwith = """'"$hgver"'"""' >> throw.py | |
734 | $ rm -f throw.pyc throw.pyo |
|
734 | $ rm -f throw.pyc throw.pyo | |
735 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
735 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
736 | ** unknown exception encountered, please report by visiting |
|
736 | ** unknown exception encountered, please report by visiting | |
737 | ** http://mercurial.selenic.com/wiki/BugTracker |
|
737 | ** http://mercurial.selenic.com/wiki/BugTracker | |
738 | ** Python * (glob) |
|
738 | ** Python * (glob) | |
739 | ** Mercurial Distributed SCM (*) (glob) |
|
739 | ** Mercurial Distributed SCM (*) (glob) | |
740 | ** Extensions loaded: throw |
|
740 | ** Extensions loaded: throw | |
741 |
|
741 | |||
742 | Test version number support in 'hg version': |
|
742 | Test version number support in 'hg version': | |
743 | $ echo '__version__ = (1, 2, 3)' >> throw.py |
|
743 | $ echo '__version__ = (1, 2, 3)' >> throw.py | |
744 | $ rm -f throw.pyc throw.pyo |
|
744 | $ rm -f throw.pyc throw.pyo | |
745 | $ hg version -v |
|
745 | $ hg version -v | |
746 | Mercurial Distributed SCM (version *) (glob) |
|
746 | Mercurial Distributed SCM (version *) (glob) | |
747 | (see http://mercurial.selenic.com for more information) |
|
747 | (see http://mercurial.selenic.com for more information) | |
748 |
|
748 | |||
749 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
749 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
750 | This is free software; see the source for copying conditions. There is NO |
|
750 | This is free software; see the source for copying conditions. There is NO | |
751 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
751 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
752 |
|
752 | |||
753 | Enabled extensions: |
|
753 | Enabled extensions: | |
754 |
|
754 | |||
755 |
|
755 | |||
756 | $ hg version -v --config extensions.throw=throw.py |
|
756 | $ hg version -v --config extensions.throw=throw.py | |
757 | Mercurial Distributed SCM (version *) (glob) |
|
757 | Mercurial Distributed SCM (version *) (glob) | |
758 | (see http://mercurial.selenic.com for more information) |
|
758 | (see http://mercurial.selenic.com for more information) | |
759 |
|
759 | |||
760 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
760 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
761 | This is free software; see the source for copying conditions. There is NO |
|
761 | This is free software; see the source for copying conditions. There is NO | |
762 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
762 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
763 |
|
763 | |||
764 | Enabled extensions: |
|
764 | Enabled extensions: | |
765 |
|
765 | |||
766 | throw 1.2.3 |
|
766 | throw 1.2.3 | |
767 | $ echo 'getversion = lambda: "1.twentythree"' >> throw.py |
|
767 | $ echo 'getversion = lambda: "1.twentythree"' >> throw.py | |
768 | $ rm -f throw.pyc throw.pyo |
|
768 | $ rm -f throw.pyc throw.pyo | |
769 | $ hg version -v --config extensions.throw=throw.py |
|
769 | $ hg version -v --config extensions.throw=throw.py | |
770 | Mercurial Distributed SCM (version *) (glob) |
|
770 | Mercurial Distributed SCM (version *) (glob) | |
771 | (see http://mercurial.selenic.com for more information) |
|
771 | (see http://mercurial.selenic.com for more information) | |
772 |
|
772 | |||
773 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
773 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
774 | This is free software; see the source for copying conditions. There is NO |
|
774 | This is free software; see the source for copying conditions. There is NO | |
775 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
775 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
776 |
|
776 | |||
777 | Enabled extensions: |
|
777 | Enabled extensions: | |
778 |
|
778 | |||
779 | throw 1.twentythree |
|
779 | throw 1.twentythree | |
780 |
|
780 | |||
781 | Restore HGRCPATH |
|
781 | Restore HGRCPATH | |
782 |
|
782 | |||
783 | $ HGRCPATH=$ORGHGRCPATH |
|
783 | $ HGRCPATH=$ORGHGRCPATH | |
784 | $ export HGRCPATH |
|
784 | $ export HGRCPATH | |
785 |
|
785 | |||
786 | Commands handling multiple repositories at a time should invoke only |
|
786 | Commands handling multiple repositories at a time should invoke only | |
787 | "reposetup()" of extensions enabling in the target repository. |
|
787 | "reposetup()" of extensions enabling in the target repository. | |
788 |
|
788 | |||
789 | $ mkdir reposetup-test |
|
789 | $ mkdir reposetup-test | |
790 | $ cd reposetup-test |
|
790 | $ cd reposetup-test | |
791 |
|
791 | |||
792 | $ cat > $TESTTMP/reposetuptest.py <<EOF |
|
792 | $ cat > $TESTTMP/reposetuptest.py <<EOF | |
793 | > from mercurial import extensions |
|
793 | > from mercurial import extensions | |
794 | > def reposetup(ui, repo): |
|
794 | > def reposetup(ui, repo): | |
795 | > ui.write('reposetup() for %s\n' % (repo.root)) |
|
795 | > ui.write('reposetup() for %s\n' % (repo.root)) | |
796 | > EOF |
|
796 | > EOF | |
797 | $ hg init src |
|
797 | $ hg init src | |
798 | $ echo a > src/a |
|
798 | $ echo a > src/a | |
799 | $ hg -R src commit -Am '#0 at src/a' |
|
799 | $ hg -R src commit -Am '#0 at src/a' | |
800 | adding a |
|
800 | adding a | |
801 | $ echo '[extensions]' >> src/.hg/hgrc |
|
801 | $ echo '[extensions]' >> src/.hg/hgrc | |
802 | $ echo '# enable extension locally' >> src/.hg/hgrc |
|
802 | $ echo '# enable extension locally' >> src/.hg/hgrc | |
803 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc |
|
803 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc | |
804 | $ hg -R src status |
|
804 | $ hg -R src status | |
805 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
805 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
806 |
|
806 | |||
807 | $ hg clone -U src clone-dst1 |
|
807 | $ hg clone -U src clone-dst1 | |
808 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
808 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
809 | $ hg init push-dst1 |
|
809 | $ hg init push-dst1 | |
810 | $ hg -q -R src push push-dst1 |
|
810 | $ hg -q -R src push push-dst1 | |
811 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
811 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
812 | $ hg init pull-src1 |
|
812 | $ hg init pull-src1 | |
813 | $ hg -q -R pull-src1 pull src |
|
813 | $ hg -q -R pull-src1 pull src | |
814 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
814 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
815 |
|
815 | |||
816 | $ echo '[extensions]' >> $HGRCPATH |
|
816 | $ echo '[extensions]' >> $HGRCPATH | |
817 | $ echo '# disable extension globally and explicitly' >> $HGRCPATH |
|
817 | $ echo '# disable extension globally and explicitly' >> $HGRCPATH | |
818 | $ echo 'reposetuptest = !' >> $HGRCPATH |
|
818 | $ echo 'reposetuptest = !' >> $HGRCPATH | |
819 | $ hg clone -U src clone-dst2 |
|
819 | $ hg clone -U src clone-dst2 | |
820 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
820 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
821 | $ hg init push-dst2 |
|
821 | $ hg init push-dst2 | |
822 | $ hg -q -R src push push-dst2 |
|
822 | $ hg -q -R src push push-dst2 | |
823 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
823 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
824 | $ hg init pull-src2 |
|
824 | $ hg init pull-src2 | |
825 | $ hg -q -R pull-src2 pull src |
|
825 | $ hg -q -R pull-src2 pull src | |
826 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
826 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
827 |
|
827 | |||
828 | $ echo '[extensions]' >> $HGRCPATH |
|
828 | $ echo '[extensions]' >> $HGRCPATH | |
829 | $ echo '# enable extension globally' >> $HGRCPATH |
|
829 | $ echo '# enable extension globally' >> $HGRCPATH | |
830 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> $HGRCPATH |
|
830 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> $HGRCPATH | |
831 | $ hg clone -U src clone-dst3 |
|
831 | $ hg clone -U src clone-dst3 | |
832 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
832 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
833 | reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob) |
|
833 | reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob) | |
834 | $ hg init push-dst3 |
|
834 | $ hg init push-dst3 | |
835 | reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob) |
|
835 | reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob) | |
836 | $ hg -q -R src push push-dst3 |
|
836 | $ hg -q -R src push push-dst3 | |
837 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
837 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
838 | reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob) |
|
838 | reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob) | |
839 | $ hg init pull-src3 |
|
839 | $ hg init pull-src3 | |
840 | reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob) |
|
840 | reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob) | |
841 | $ hg -q -R pull-src3 pull src |
|
841 | $ hg -q -R pull-src3 pull src | |
842 | reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob) |
|
842 | reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob) | |
843 | reposetup() for $TESTTMP/reposetup-test/src (glob) |
|
843 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
844 |
|
844 | |||
845 | $ echo '[extensions]' >> src/.hg/hgrc |
|
845 | $ echo '[extensions]' >> src/.hg/hgrc | |
846 | $ echo '# disable extension locally' >> src/.hg/hgrc |
|
846 | $ echo '# disable extension locally' >> src/.hg/hgrc | |
847 | $ echo 'reposetuptest = !' >> src/.hg/hgrc |
|
847 | $ echo 'reposetuptest = !' >> src/.hg/hgrc | |
848 | $ hg clone -U src clone-dst4 |
|
848 | $ hg clone -U src clone-dst4 | |
849 | reposetup() for $TESTTMP/reposetup-test/clone-dst4 (glob) |
|
849 | reposetup() for $TESTTMP/reposetup-test/clone-dst4 (glob) | |
850 | $ hg init push-dst4 |
|
850 | $ hg init push-dst4 | |
851 | reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob) |
|
851 | reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob) | |
852 | $ hg -q -R src push push-dst4 |
|
852 | $ hg -q -R src push push-dst4 | |
853 | reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob) |
|
853 | reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob) | |
854 | $ hg init pull-src4 |
|
854 | $ hg init pull-src4 | |
855 | reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob) |
|
855 | reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob) | |
856 | $ hg -q -R pull-src4 pull src |
|
856 | $ hg -q -R pull-src4 pull src | |
857 | reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob) |
|
857 | reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob) | |
858 |
|
858 | |||
859 | disabling in command line overlays with all configuration |
|
859 | disabling in command line overlays with all configuration | |
860 | $ hg --config extensions.reposetuptest=! clone -U src clone-dst5 |
|
860 | $ hg --config extensions.reposetuptest=! clone -U src clone-dst5 | |
861 | $ hg --config extensions.reposetuptest=! init push-dst5 |
|
861 | $ hg --config extensions.reposetuptest=! init push-dst5 | |
862 | $ hg --config extensions.reposetuptest=! -q -R src push push-dst5 |
|
862 | $ hg --config extensions.reposetuptest=! -q -R src push push-dst5 | |
863 | $ hg --config extensions.reposetuptest=! init pull-src5 |
|
863 | $ hg --config extensions.reposetuptest=! init pull-src5 | |
864 | $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src |
|
864 | $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src | |
865 |
|
865 | |||
866 | $ echo '[extensions]' >> $HGRCPATH |
|
866 | $ echo '[extensions]' >> $HGRCPATH | |
867 | $ echo '# disable extension globally and explicitly' >> $HGRCPATH |
|
867 | $ echo '# disable extension globally and explicitly' >> $HGRCPATH | |
868 | $ echo 'reposetuptest = !' >> $HGRCPATH |
|
868 | $ echo 'reposetuptest = !' >> $HGRCPATH | |
869 | $ hg init parent |
|
869 | $ hg init parent | |
870 | $ hg init parent/sub1 |
|
870 | $ hg init parent/sub1 | |
871 | $ echo 1 > parent/sub1/1 |
|
871 | $ echo 1 > parent/sub1/1 | |
872 | $ hg -R parent/sub1 commit -Am '#0 at parent/sub1' |
|
872 | $ hg -R parent/sub1 commit -Am '#0 at parent/sub1' | |
873 | adding 1 |
|
873 | adding 1 | |
874 | $ hg init parent/sub2 |
|
874 | $ hg init parent/sub2 | |
875 | $ hg init parent/sub2/sub21 |
|
875 | $ hg init parent/sub2/sub21 | |
876 | $ echo 21 > parent/sub2/sub21/21 |
|
876 | $ echo 21 > parent/sub2/sub21/21 | |
877 | $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21' |
|
877 | $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21' | |
878 | adding 21 |
|
878 | adding 21 | |
879 | $ cat > parent/sub2/.hgsub <<EOF |
|
879 | $ cat > parent/sub2/.hgsub <<EOF | |
880 | > sub21 = sub21 |
|
880 | > sub21 = sub21 | |
881 | > EOF |
|
881 | > EOF | |
882 | $ hg -R parent/sub2 commit -Am '#0 at parent/sub2' |
|
882 | $ hg -R parent/sub2 commit -Am '#0 at parent/sub2' | |
883 | adding .hgsub |
|
883 | adding .hgsub | |
884 | $ hg init parent/sub3 |
|
884 | $ hg init parent/sub3 | |
885 | $ echo 3 > parent/sub3/3 |
|
885 | $ echo 3 > parent/sub3/3 | |
886 | $ hg -R parent/sub3 commit -Am '#0 at parent/sub3' |
|
886 | $ hg -R parent/sub3 commit -Am '#0 at parent/sub3' | |
887 | adding 3 |
|
887 | adding 3 | |
888 | $ cat > parent/.hgsub <<EOF |
|
888 | $ cat > parent/.hgsub <<EOF | |
889 | > sub1 = sub1 |
|
889 | > sub1 = sub1 | |
890 | > sub2 = sub2 |
|
890 | > sub2 = sub2 | |
891 | > sub3 = sub3 |
|
891 | > sub3 = sub3 | |
892 | > EOF |
|
892 | > EOF | |
893 | $ hg -R parent commit -Am '#0 at parent' |
|
893 | $ hg -R parent commit -Am '#0 at parent' | |
894 | adding .hgsub |
|
894 | adding .hgsub | |
895 | $ echo '[extensions]' >> parent/.hg/hgrc |
|
895 | $ echo '[extensions]' >> parent/.hg/hgrc | |
896 | $ echo '# enable extension locally' >> parent/.hg/hgrc |
|
896 | $ echo '# enable extension locally' >> parent/.hg/hgrc | |
897 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc |
|
897 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc | |
898 | $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc |
|
898 | $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc | |
899 | $ hg -R parent status -S -A |
|
899 | $ hg -R parent status -S -A | |
900 | reposetup() for $TESTTMP/reposetup-test/parent (glob) |
|
900 | reposetup() for $TESTTMP/reposetup-test/parent (glob) | |
901 | reposetup() for $TESTTMP/reposetup-test/parent/sub2 (glob) |
|
901 | reposetup() for $TESTTMP/reposetup-test/parent/sub2 (glob) | |
902 | C .hgsub |
|
902 | C .hgsub | |
903 | C .hgsubstate |
|
903 | C .hgsubstate | |
904 | C sub1/1 |
|
904 | C sub1/1 | |
905 | C sub2/.hgsub |
|
905 | C sub2/.hgsub | |
906 | C sub2/.hgsubstate |
|
906 | C sub2/.hgsubstate | |
907 | C sub2/sub21/21 |
|
907 | C sub2/sub21/21 | |
908 | C sub3/3 |
|
908 | C sub3/3 | |
909 |
|
909 | |||
910 | $ cd .. |
|
910 | $ cd .. |
@@ -1,445 +1,445 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo a > a |
|
3 | $ echo a > a | |
4 | $ hg ci -A -d'1 0' -m a |
|
4 | $ hg ci -A -d'1 0' -m a | |
5 | adding a |
|
5 | adding a | |
6 |
|
6 | |||
7 | $ cd .. |
|
7 | $ cd .. | |
8 |
|
8 | |||
9 | $ hg init b |
|
9 | $ hg init b | |
10 | $ cd b |
|
10 | $ cd b | |
11 | $ echo b > b |
|
11 | $ echo b > b | |
12 | $ hg ci -A -d'1 0' -m b |
|
12 | $ hg ci -A -d'1 0' -m b | |
13 | adding b |
|
13 | adding b | |
14 |
|
14 | |||
15 | $ cd .. |
|
15 | $ cd .. | |
16 |
|
16 | |||
17 | $ hg clone a c |
|
17 | $ hg clone a c | |
18 | updating to branch default |
|
18 | updating to branch default | |
19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
20 | $ cd c |
|
20 | $ cd c | |
21 | $ cat >> .hg/hgrc <<EOF |
|
21 | $ cat >> .hg/hgrc <<EOF | |
22 | > [paths] |
|
22 | > [paths] | |
23 | > relative = ../a |
|
23 | > relative = ../a | |
24 | > EOF |
|
24 | > EOF | |
25 | $ hg pull -f ../b |
|
25 | $ hg pull -f ../b | |
26 | pulling from ../b |
|
26 | pulling from ../b | |
27 | searching for changes |
|
27 | searching for changes | |
28 | warning: repository is unrelated |
|
28 | warning: repository is unrelated | |
29 | requesting all changes |
|
29 | requesting all changes | |
30 | adding changesets |
|
30 | adding changesets | |
31 | adding manifests |
|
31 | adding manifests | |
32 | adding file changes |
|
32 | adding file changes | |
33 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
33 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
34 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
34 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
35 | $ hg merge |
|
35 | $ hg merge | |
36 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
36 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
37 | (branch merge, don't forget to commit) |
|
37 | (branch merge, don't forget to commit) | |
38 |
|
38 | |||
39 | $ cd .. |
|
39 | $ cd .. | |
40 |
|
40 | |||
41 | Testing -R/--repository: |
|
41 | Testing -R/--repository: | |
42 |
|
42 | |||
43 | $ hg -R a tip |
|
43 | $ hg -R a tip | |
44 | changeset: 0:8580ff50825a |
|
44 | changeset: 0:8580ff50825a | |
45 | tag: tip |
|
45 | tag: tip | |
46 | user: test |
|
46 | user: test | |
47 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
47 | date: Thu Jan 01 00:00:01 1970 +0000 | |
48 | summary: a |
|
48 | summary: a | |
49 |
|
49 | |||
50 | $ hg --repository b tip |
|
50 | $ hg --repository b tip | |
51 | changeset: 0:b6c483daf290 |
|
51 | changeset: 0:b6c483daf290 | |
52 | tag: tip |
|
52 | tag: tip | |
53 | user: test |
|
53 | user: test | |
54 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
54 | date: Thu Jan 01 00:00:01 1970 +0000 | |
55 | summary: b |
|
55 | summary: b | |
56 |
|
56 | |||
57 |
|
57 | |||
58 | -R with a URL: |
|
58 | -R with a URL: | |
59 |
|
59 | |||
60 | $ hg -R file:a identify |
|
60 | $ hg -R file:a identify | |
61 | 8580ff50825a tip |
|
61 | 8580ff50825a tip | |
62 | $ hg -R file://localhost/`pwd`/a/ identify |
|
62 | $ hg -R file://localhost/`pwd`/a/ identify | |
63 | 8580ff50825a tip |
|
63 | 8580ff50825a tip | |
64 |
|
64 | |||
65 | -R with path aliases: |
|
65 | -R with path aliases: | |
66 |
|
66 | |||
67 | $ cd c |
|
67 | $ cd c | |
68 | $ hg -R default identify |
|
68 | $ hg -R default identify | |
69 | 8580ff50825a tip |
|
69 | 8580ff50825a tip | |
70 | $ hg -R relative identify |
|
70 | $ hg -R relative identify | |
71 | 8580ff50825a tip |
|
71 | 8580ff50825a tip | |
72 | $ echo '[paths]' >> $HGRCPATH |
|
72 | $ echo '[paths]' >> $HGRCPATH | |
73 | $ echo 'relativetohome = a' >> $HGRCPATH |
|
73 | $ echo 'relativetohome = a' >> $HGRCPATH | |
74 | $ HOME=`pwd`/../ hg -R relativetohome identify |
|
74 | $ HOME=`pwd`/../ hg -R relativetohome identify | |
75 | 8580ff50825a tip |
|
75 | 8580ff50825a tip | |
76 | $ cd .. |
|
76 | $ cd .. | |
77 |
|
77 | |||
78 | #if no-outer-repo |
|
78 | #if no-outer-repo | |
79 |
|
79 | |||
80 | Implicit -R: |
|
80 | Implicit -R: | |
81 |
|
81 | |||
82 | $ hg ann a/a |
|
82 | $ hg ann a/a | |
83 | 0: a |
|
83 | 0: a | |
84 | $ hg ann a/a a/a |
|
84 | $ hg ann a/a a/a | |
85 | 0: a |
|
85 | 0: a | |
86 | $ hg ann a/a b/b |
|
86 | $ hg ann a/a b/b | |
87 | abort: no repository found in '$TESTTMP' (.hg not found)! |
|
87 | abort: no repository found in '$TESTTMP' (.hg not found)! | |
88 | [255] |
|
88 | [255] | |
89 | $ hg -R b ann a/a |
|
89 | $ hg -R b ann a/a | |
90 | abort: a/a not under root '$TESTTMP/b' (glob) |
|
90 | abort: a/a not under root '$TESTTMP/b' (glob) | |
91 | [255] |
|
91 | [255] | |
92 | $ hg log |
|
92 | $ hg log | |
93 | abort: no repository found in '$TESTTMP' (.hg not found)! |
|
93 | abort: no repository found in '$TESTTMP' (.hg not found)! | |
94 | [255] |
|
94 | [255] | |
95 |
|
95 | |||
96 | #endif |
|
96 | #endif | |
97 |
|
97 | |||
98 | Abbreviation of long option: |
|
98 | Abbreviation of long option: | |
99 |
|
99 | |||
100 | $ hg --repo c tip |
|
100 | $ hg --repo c tip | |
101 | changeset: 1:b6c483daf290 |
|
101 | changeset: 1:b6c483daf290 | |
102 | tag: tip |
|
102 | tag: tip | |
103 | parent: -1:000000000000 |
|
103 | parent: -1:000000000000 | |
104 | user: test |
|
104 | user: test | |
105 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
105 | date: Thu Jan 01 00:00:01 1970 +0000 | |
106 | summary: b |
|
106 | summary: b | |
107 |
|
107 | |||
108 |
|
108 | |||
109 | earlygetopt with duplicate options (36d23de02da1): |
|
109 | earlygetopt with duplicate options (36d23de02da1): | |
110 |
|
110 | |||
111 | $ hg --cwd a --cwd b --cwd c tip |
|
111 | $ hg --cwd a --cwd b --cwd c tip | |
112 | changeset: 1:b6c483daf290 |
|
112 | changeset: 1:b6c483daf290 | |
113 | tag: tip |
|
113 | tag: tip | |
114 | parent: -1:000000000000 |
|
114 | parent: -1:000000000000 | |
115 | user: test |
|
115 | user: test | |
116 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
116 | date: Thu Jan 01 00:00:01 1970 +0000 | |
117 | summary: b |
|
117 | summary: b | |
118 |
|
118 | |||
119 | $ hg --repo c --repository b -R a tip |
|
119 | $ hg --repo c --repository b -R a tip | |
120 | changeset: 0:8580ff50825a |
|
120 | changeset: 0:8580ff50825a | |
121 | tag: tip |
|
121 | tag: tip | |
122 | user: test |
|
122 | user: test | |
123 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
123 | date: Thu Jan 01 00:00:01 1970 +0000 | |
124 | summary: a |
|
124 | summary: a | |
125 |
|
125 | |||
126 |
|
126 | |||
127 | earlygetopt short option without following space: |
|
127 | earlygetopt short option without following space: | |
128 |
|
128 | |||
129 | $ hg -q -Rb tip |
|
129 | $ hg -q -Rb tip | |
130 | 0:b6c483daf290 |
|
130 | 0:b6c483daf290 | |
131 |
|
131 | |||
132 | earlygetopt with illegal abbreviations: |
|
132 | earlygetopt with illegal abbreviations: | |
133 |
|
133 | |||
134 | $ hg --confi "foo.bar=baz" |
|
134 | $ hg --confi "foo.bar=baz" | |
135 | abort: option --config may not be abbreviated! |
|
135 | abort: option --config may not be abbreviated! | |
136 | [255] |
|
136 | [255] | |
137 | $ hg --cw a tip |
|
137 | $ hg --cw a tip | |
138 | abort: option --cwd may not be abbreviated! |
|
138 | abort: option --cwd may not be abbreviated! | |
139 | [255] |
|
139 | [255] | |
140 | $ hg --rep a tip |
|
140 | $ hg --rep a tip | |
141 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
141 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
142 | [255] |
|
142 | [255] | |
143 | $ hg --repositor a tip |
|
143 | $ hg --repositor a tip | |
144 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
144 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
145 | [255] |
|
145 | [255] | |
146 | $ hg -qR a tip |
|
146 | $ hg -qR a tip | |
147 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
147 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
148 | [255] |
|
148 | [255] | |
149 | $ hg -qRa tip |
|
149 | $ hg -qRa tip | |
150 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
150 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
151 | [255] |
|
151 | [255] | |
152 |
|
152 | |||
153 | Testing --cwd: |
|
153 | Testing --cwd: | |
154 |
|
154 | |||
155 | $ hg --cwd a parents |
|
155 | $ hg --cwd a parents | |
156 | changeset: 0:8580ff50825a |
|
156 | changeset: 0:8580ff50825a | |
157 | tag: tip |
|
157 | tag: tip | |
158 | user: test |
|
158 | user: test | |
159 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
159 | date: Thu Jan 01 00:00:01 1970 +0000 | |
160 | summary: a |
|
160 | summary: a | |
161 |
|
161 | |||
162 |
|
162 | |||
163 | Testing -y/--noninteractive - just be sure it is parsed: |
|
163 | Testing -y/--noninteractive - just be sure it is parsed: | |
164 |
|
164 | |||
165 | $ hg --cwd a tip -q --noninteractive |
|
165 | $ hg --cwd a tip -q --noninteractive | |
166 | 0:8580ff50825a |
|
166 | 0:8580ff50825a | |
167 | $ hg --cwd a tip -q -y |
|
167 | $ hg --cwd a tip -q -y | |
168 | 0:8580ff50825a |
|
168 | 0:8580ff50825a | |
169 |
|
169 | |||
170 | Testing -q/--quiet: |
|
170 | Testing -q/--quiet: | |
171 |
|
171 | |||
172 | $ hg -R a -q tip |
|
172 | $ hg -R a -q tip | |
173 | 0:8580ff50825a |
|
173 | 0:8580ff50825a | |
174 | $ hg -R b -q tip |
|
174 | $ hg -R b -q tip | |
175 | 0:b6c483daf290 |
|
175 | 0:b6c483daf290 | |
176 | $ hg -R c --quiet parents |
|
176 | $ hg -R c --quiet parents | |
177 | 0:8580ff50825a |
|
177 | 0:8580ff50825a | |
178 | 1:b6c483daf290 |
|
178 | 1:b6c483daf290 | |
179 |
|
179 | |||
180 | Testing -v/--verbose: |
|
180 | Testing -v/--verbose: | |
181 |
|
181 | |||
182 | $ hg --cwd c head -v |
|
182 | $ hg --cwd c head -v | |
183 | changeset: 1:b6c483daf290 |
|
183 | changeset: 1:b6c483daf290 | |
184 | tag: tip |
|
184 | tag: tip | |
185 | parent: -1:000000000000 |
|
185 | parent: -1:000000000000 | |
186 | user: test |
|
186 | user: test | |
187 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
187 | date: Thu Jan 01 00:00:01 1970 +0000 | |
188 | files: b |
|
188 | files: b | |
189 | description: |
|
189 | description: | |
190 | b |
|
190 | b | |
191 |
|
191 | |||
192 |
|
192 | |||
193 | changeset: 0:8580ff50825a |
|
193 | changeset: 0:8580ff50825a | |
194 | user: test |
|
194 | user: test | |
195 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
195 | date: Thu Jan 01 00:00:01 1970 +0000 | |
196 | files: a |
|
196 | files: a | |
197 | description: |
|
197 | description: | |
198 | a |
|
198 | a | |
199 |
|
199 | |||
200 |
|
200 | |||
201 | $ hg --cwd b tip --verbose |
|
201 | $ hg --cwd b tip --verbose | |
202 | changeset: 0:b6c483daf290 |
|
202 | changeset: 0:b6c483daf290 | |
203 | tag: tip |
|
203 | tag: tip | |
204 | user: test |
|
204 | user: test | |
205 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
205 | date: Thu Jan 01 00:00:01 1970 +0000 | |
206 | files: b |
|
206 | files: b | |
207 | description: |
|
207 | description: | |
208 | b |
|
208 | b | |
209 |
|
209 | |||
210 |
|
210 | |||
211 |
|
211 | |||
212 | Testing --config: |
|
212 | Testing --config: | |
213 |
|
213 | |||
214 | $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo |
|
214 | $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo | |
215 | quuxfoo |
|
215 | quuxfoo | |
216 | $ hg --cwd c --config '' tip -q |
|
216 | $ hg --cwd c --config '' tip -q | |
217 | abort: malformed --config option: '' (use --config section.name=value) |
|
217 | abort: malformed --config option: '' (use --config section.name=value) | |
218 | [255] |
|
218 | [255] | |
219 | $ hg --cwd c --config a.b tip -q |
|
219 | $ hg --cwd c --config a.b tip -q | |
220 | abort: malformed --config option: 'a.b' (use --config section.name=value) |
|
220 | abort: malformed --config option: 'a.b' (use --config section.name=value) | |
221 | [255] |
|
221 | [255] | |
222 | $ hg --cwd c --config a tip -q |
|
222 | $ hg --cwd c --config a tip -q | |
223 | abort: malformed --config option: 'a' (use --config section.name=value) |
|
223 | abort: malformed --config option: 'a' (use --config section.name=value) | |
224 | [255] |
|
224 | [255] | |
225 | $ hg --cwd c --config a.= tip -q |
|
225 | $ hg --cwd c --config a.= tip -q | |
226 | abort: malformed --config option: 'a.=' (use --config section.name=value) |
|
226 | abort: malformed --config option: 'a.=' (use --config section.name=value) | |
227 | [255] |
|
227 | [255] | |
228 | $ hg --cwd c --config .b= tip -q |
|
228 | $ hg --cwd c --config .b= tip -q | |
229 | abort: malformed --config option: '.b=' (use --config section.name=value) |
|
229 | abort: malformed --config option: '.b=' (use --config section.name=value) | |
230 | [255] |
|
230 | [255] | |
231 |
|
231 | |||
232 | Testing --debug: |
|
232 | Testing --debug: | |
233 |
|
233 | |||
234 | $ hg --cwd c log --debug |
|
234 | $ hg --cwd c log --debug | |
235 | changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a |
|
235 | changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a | |
236 | tag: tip |
|
236 | tag: tip | |
237 | parent: -1:0000000000000000000000000000000000000000 |
|
237 | parent: -1:0000000000000000000000000000000000000000 | |
238 | parent: -1:0000000000000000000000000000000000000000 |
|
238 | parent: -1:0000000000000000000000000000000000000000 | |
239 | manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49 |
|
239 | manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49 | |
240 | user: test |
|
240 | user: test | |
241 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
241 | date: Thu Jan 01 00:00:01 1970 +0000 | |
242 | files+: b |
|
242 | files+: b | |
243 | extra: branch=default |
|
243 | extra: branch=default | |
244 | description: |
|
244 | description: | |
245 | b |
|
245 | b | |
246 |
|
246 | |||
247 |
|
247 | |||
248 | changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
248 | changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab | |
249 | parent: -1:0000000000000000000000000000000000000000 |
|
249 | parent: -1:0000000000000000000000000000000000000000 | |
250 | parent: -1:0000000000000000000000000000000000000000 |
|
250 | parent: -1:0000000000000000000000000000000000000000 | |
251 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
251 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
252 | user: test |
|
252 | user: test | |
253 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
253 | date: Thu Jan 01 00:00:01 1970 +0000 | |
254 | files+: a |
|
254 | files+: a | |
255 | extra: branch=default |
|
255 | extra: branch=default | |
256 | description: |
|
256 | description: | |
257 | a |
|
257 | a | |
258 |
|
258 | |||
259 |
|
259 | |||
260 |
|
260 | |||
261 | Testing --traceback: |
|
261 | Testing --traceback: | |
262 |
|
262 | |||
263 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' |
|
263 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' | |
264 | Traceback (most recent call last): |
|
264 | Traceback (most recent call last): | |
265 |
|
265 | |||
266 | Testing --time: |
|
266 | Testing --time: | |
267 |
|
267 | |||
268 | $ hg --cwd a --time id |
|
268 | $ hg --cwd a --time id | |
269 | 8580ff50825a tip |
|
269 | 8580ff50825a tip | |
270 | time: real * (glob) |
|
270 | time: real * (glob) | |
271 |
|
271 | |||
272 | Testing --version: |
|
272 | Testing --version: | |
273 |
|
273 | |||
274 | $ hg --version -q |
|
274 | $ hg --version -q | |
275 | Mercurial Distributed SCM * (glob) |
|
275 | Mercurial Distributed SCM * (glob) | |
276 |
|
276 | |||
277 | hide outer repo |
|
277 | hide outer repo | |
278 | $ hg init |
|
278 | $ hg init | |
279 |
|
279 | |||
280 | Testing -h/--help: |
|
280 | Testing -h/--help: | |
281 |
|
281 | |||
282 | $ hg -h |
|
282 | $ hg -h | |
283 | Mercurial Distributed SCM |
|
283 | Mercurial Distributed SCM | |
284 |
|
284 | |||
285 | list of commands: |
|
285 | list of commands: | |
286 |
|
286 | |||
287 | add add the specified files on the next commit |
|
287 | add add the specified files on the next commit | |
288 | addremove add all new files, delete all missing files |
|
288 | addremove add all new files, delete all missing files | |
289 | annotate show changeset information by line for each file |
|
289 | annotate show changeset information by line for each file | |
290 | archive create an unversioned archive of a repository revision |
|
290 | archive create an unversioned archive of a repository revision | |
291 | backout reverse effect of earlier changeset |
|
291 | backout reverse effect of earlier changeset | |
292 | bisect subdivision search of changesets |
|
292 | bisect subdivision search of changesets | |
293 | bookmarks create a new bookmark or list existing bookmarks |
|
293 | bookmarks create a new bookmark or list existing bookmarks | |
294 | branch set or show the current branch name |
|
294 | branch set or show the current branch name | |
295 | branches list repository named branches |
|
295 | branches list repository named branches | |
296 | bundle create a changegroup file |
|
296 | bundle create a changegroup file | |
297 | cat output the current or given revision of files |
|
297 | cat output the current or given revision of files | |
298 | clone make a copy of an existing repository |
|
298 | clone make a copy of an existing repository | |
299 | commit commit the specified files or all outstanding changes |
|
299 | commit commit the specified files or all outstanding changes | |
300 | config show combined config settings from all hgrc files |
|
300 | config show combined config settings from all hgrc files | |
301 | copy mark files as copied for the next commit |
|
301 | copy mark files as copied for the next commit | |
302 | diff diff repository (or selected files) |
|
302 | diff diff repository (or selected files) | |
303 | export dump the header and diffs for one or more changesets |
|
303 | export dump the header and diffs for one or more changesets | |
304 | forget forget the specified files on the next commit |
|
304 | forget forget the specified files on the next commit | |
305 | graft copy changes from other branches onto the current branch |
|
305 | graft copy changes from other branches onto the current branch | |
306 | grep search for a pattern in specified files and revisions |
|
306 | grep search for a pattern in specified files and revisions | |
307 | heads show branch heads |
|
307 | heads show branch heads | |
308 | help show help for a given topic or a help overview |
|
308 | help show help for a given topic or a help overview | |
309 | identify identify the working copy or specified revision |
|
309 | identify identify the working copy or specified revision | |
310 | import import an ordered set of patches |
|
310 | import import an ordered set of patches | |
311 | incoming show new changesets found in source |
|
311 | incoming show new changesets found in source | |
312 | init create a new repository in the given directory |
|
312 | init create a new repository in the given directory | |
313 | locate locate files matching specific patterns |
|
313 | locate locate files matching specific patterns | |
314 | log show revision history of entire repository or files |
|
314 | log show revision history of entire repository or files | |
315 | manifest output the current or given revision of the project manifest |
|
315 | manifest output the current or given revision of the project manifest | |
316 | merge merge working directory with another revision |
|
316 | merge merge working directory with another revision | |
317 | outgoing show changesets not found in the destination |
|
317 | outgoing show changesets not found in the destination | |
318 | parents show the parents of the working directory or revision |
|
318 | parents show the parents of the working directory or revision | |
319 | paths show aliases for remote repositories |
|
319 | paths show aliases for remote repositories | |
320 | phase set or show the current phase name |
|
320 | phase set or show the current phase name | |
321 | pull pull changes from the specified source |
|
321 | pull pull changes from the specified source | |
322 | push push changes to the specified destination |
|
322 | push push changes to the specified destination | |
323 | recover roll back an interrupted transaction |
|
323 | recover roll back an interrupted transaction | |
324 | remove remove the specified files on the next commit |
|
324 | remove remove the specified files on the next commit | |
325 | rename rename files; equivalent of copy + remove |
|
325 | rename rename files; equivalent of copy + remove | |
326 | resolve redo merges or set/view the merge status of files |
|
326 | resolve redo merges or set/view the merge status of files | |
327 | revert restore files to their checkout state |
|
327 | revert restore files to their checkout state | |
328 | root print the root (top) of the current working directory |
|
328 | root print the root (top) of the current working directory | |
329 | serve start stand-alone webserver |
|
329 | serve start stand-alone webserver | |
330 | status show changed files in the working directory |
|
330 | status show changed files in the working directory | |
331 | summary summarize working directory state |
|
331 | summary summarize working directory state | |
332 | tag add one or more tags for the current or given revision |
|
332 | tag add one or more tags for the current or given revision | |
333 | tags list repository tags |
|
333 | tags list repository tags | |
334 | unbundle apply one or more changegroup files |
|
334 | unbundle apply one or more changegroup files | |
335 | update update working directory (or switch revisions) |
|
335 | update update working directory (or switch revisions) | |
336 | verify verify the integrity of the repository |
|
336 | verify verify the integrity of the repository | |
337 | version output version and copyright information |
|
337 | version output version and copyright information | |
338 |
|
338 | |||
339 | additional help topics: |
|
339 | additional help topics: | |
340 |
|
340 | |||
341 | config Configuration Files |
|
341 | config Configuration Files | |
342 | dates Date Formats |
|
342 | dates Date Formats | |
343 | diffs Diff Formats |
|
343 | diffs Diff Formats | |
344 | environment Environment Variables |
|
344 | environment Environment Variables | |
345 | extensions Using Additional Features |
|
345 | extensions Using Additional Features | |
346 | filesets Specifying File Sets |
|
346 | filesets Specifying File Sets | |
347 | glossary Glossary |
|
347 | glossary Glossary | |
348 | hgignore Syntax for Mercurial Ignore Files |
|
348 | hgignore Syntax for Mercurial Ignore Files | |
349 | hgweb Configuring hgweb |
|
349 | hgweb Configuring hgweb | |
350 | merge-tools Merge Tools |
|
350 | merge-tools Merge Tools | |
351 | multirevs Specifying Multiple Revisions |
|
351 | multirevs Specifying Multiple Revisions | |
352 | patterns File Name Patterns |
|
352 | patterns File Name Patterns | |
353 | phases Working with Phases |
|
353 | phases Working with Phases | |
354 | revisions Specifying Single Revisions |
|
354 | revisions Specifying Single Revisions | |
355 | revsets Specifying Revision Sets |
|
355 | revsets Specifying Revision Sets | |
356 | subrepos Subrepositories |
|
356 | subrepos Subrepositories | |
357 | templating Template Usage |
|
357 | templating Template Usage | |
358 | urls URL Paths |
|
358 | urls URL Paths | |
359 |
|
359 | |||
360 |
use "hg |
|
360 | (use "hg help -v" to show built-in aliases and global options) | |
361 |
|
361 | |||
362 |
|
362 | |||
363 |
|
363 | |||
364 | $ hg --help |
|
364 | $ hg --help | |
365 | Mercurial Distributed SCM |
|
365 | Mercurial Distributed SCM | |
366 |
|
366 | |||
367 | list of commands: |
|
367 | list of commands: | |
368 |
|
368 | |||
369 | add add the specified files on the next commit |
|
369 | add add the specified files on the next commit | |
370 | addremove add all new files, delete all missing files |
|
370 | addremove add all new files, delete all missing files | |
371 | annotate show changeset information by line for each file |
|
371 | annotate show changeset information by line for each file | |
372 | archive create an unversioned archive of a repository revision |
|
372 | archive create an unversioned archive of a repository revision | |
373 | backout reverse effect of earlier changeset |
|
373 | backout reverse effect of earlier changeset | |
374 | bisect subdivision search of changesets |
|
374 | bisect subdivision search of changesets | |
375 | bookmarks create a new bookmark or list existing bookmarks |
|
375 | bookmarks create a new bookmark or list existing bookmarks | |
376 | branch set or show the current branch name |
|
376 | branch set or show the current branch name | |
377 | branches list repository named branches |
|
377 | branches list repository named branches | |
378 | bundle create a changegroup file |
|
378 | bundle create a changegroup file | |
379 | cat output the current or given revision of files |
|
379 | cat output the current or given revision of files | |
380 | clone make a copy of an existing repository |
|
380 | clone make a copy of an existing repository | |
381 | commit commit the specified files or all outstanding changes |
|
381 | commit commit the specified files or all outstanding changes | |
382 | config show combined config settings from all hgrc files |
|
382 | config show combined config settings from all hgrc files | |
383 | copy mark files as copied for the next commit |
|
383 | copy mark files as copied for the next commit | |
384 | diff diff repository (or selected files) |
|
384 | diff diff repository (or selected files) | |
385 | export dump the header and diffs for one or more changesets |
|
385 | export dump the header and diffs for one or more changesets | |
386 | forget forget the specified files on the next commit |
|
386 | forget forget the specified files on the next commit | |
387 | graft copy changes from other branches onto the current branch |
|
387 | graft copy changes from other branches onto the current branch | |
388 | grep search for a pattern in specified files and revisions |
|
388 | grep search for a pattern in specified files and revisions | |
389 | heads show branch heads |
|
389 | heads show branch heads | |
390 | help show help for a given topic or a help overview |
|
390 | help show help for a given topic or a help overview | |
391 | identify identify the working copy or specified revision |
|
391 | identify identify the working copy or specified revision | |
392 | import import an ordered set of patches |
|
392 | import import an ordered set of patches | |
393 | incoming show new changesets found in source |
|
393 | incoming show new changesets found in source | |
394 | init create a new repository in the given directory |
|
394 | init create a new repository in the given directory | |
395 | locate locate files matching specific patterns |
|
395 | locate locate files matching specific patterns | |
396 | log show revision history of entire repository or files |
|
396 | log show revision history of entire repository or files | |
397 | manifest output the current or given revision of the project manifest |
|
397 | manifest output the current or given revision of the project manifest | |
398 | merge merge working directory with another revision |
|
398 | merge merge working directory with another revision | |
399 | outgoing show changesets not found in the destination |
|
399 | outgoing show changesets not found in the destination | |
400 | parents show the parents of the working directory or revision |
|
400 | parents show the parents of the working directory or revision | |
401 | paths show aliases for remote repositories |
|
401 | paths show aliases for remote repositories | |
402 | phase set or show the current phase name |
|
402 | phase set or show the current phase name | |
403 | pull pull changes from the specified source |
|
403 | pull pull changes from the specified source | |
404 | push push changes to the specified destination |
|
404 | push push changes to the specified destination | |
405 | recover roll back an interrupted transaction |
|
405 | recover roll back an interrupted transaction | |
406 | remove remove the specified files on the next commit |
|
406 | remove remove the specified files on the next commit | |
407 | rename rename files; equivalent of copy + remove |
|
407 | rename rename files; equivalent of copy + remove | |
408 | resolve redo merges or set/view the merge status of files |
|
408 | resolve redo merges or set/view the merge status of files | |
409 | revert restore files to their checkout state |
|
409 | revert restore files to their checkout state | |
410 | root print the root (top) of the current working directory |
|
410 | root print the root (top) of the current working directory | |
411 | serve start stand-alone webserver |
|
411 | serve start stand-alone webserver | |
412 | status show changed files in the working directory |
|
412 | status show changed files in the working directory | |
413 | summary summarize working directory state |
|
413 | summary summarize working directory state | |
414 | tag add one or more tags for the current or given revision |
|
414 | tag add one or more tags for the current or given revision | |
415 | tags list repository tags |
|
415 | tags list repository tags | |
416 | unbundle apply one or more changegroup files |
|
416 | unbundle apply one or more changegroup files | |
417 | update update working directory (or switch revisions) |
|
417 | update update working directory (or switch revisions) | |
418 | verify verify the integrity of the repository |
|
418 | verify verify the integrity of the repository | |
419 | version output version and copyright information |
|
419 | version output version and copyright information | |
420 |
|
420 | |||
421 | additional help topics: |
|
421 | additional help topics: | |
422 |
|
422 | |||
423 | config Configuration Files |
|
423 | config Configuration Files | |
424 | dates Date Formats |
|
424 | dates Date Formats | |
425 | diffs Diff Formats |
|
425 | diffs Diff Formats | |
426 | environment Environment Variables |
|
426 | environment Environment Variables | |
427 | extensions Using Additional Features |
|
427 | extensions Using Additional Features | |
428 | filesets Specifying File Sets |
|
428 | filesets Specifying File Sets | |
429 | glossary Glossary |
|
429 | glossary Glossary | |
430 | hgignore Syntax for Mercurial Ignore Files |
|
430 | hgignore Syntax for Mercurial Ignore Files | |
431 | hgweb Configuring hgweb |
|
431 | hgweb Configuring hgweb | |
432 | merge-tools Merge Tools |
|
432 | merge-tools Merge Tools | |
433 | multirevs Specifying Multiple Revisions |
|
433 | multirevs Specifying Multiple Revisions | |
434 | patterns File Name Patterns |
|
434 | patterns File Name Patterns | |
435 | phases Working with Phases |
|
435 | phases Working with Phases | |
436 | revisions Specifying Single Revisions |
|
436 | revisions Specifying Single Revisions | |
437 | revsets Specifying Revision Sets |
|
437 | revsets Specifying Revision Sets | |
438 | subrepos Subrepositories |
|
438 | subrepos Subrepositories | |
439 | templating Template Usage |
|
439 | templating Template Usage | |
440 | urls URL Paths |
|
440 | urls URL Paths | |
441 |
|
441 | |||
442 |
use "hg |
|
442 | (use "hg help -v" to show built-in aliases and global options) | |
443 |
|
443 | |||
444 | Not tested: --debugger |
|
444 | Not tested: --debugger | |
445 |
|
445 |
@@ -1,2072 +1,2072 b'' | |||||
1 | Short help: |
|
1 | Short help: | |
2 |
|
2 | |||
3 | $ hg |
|
3 | $ hg | |
4 | Mercurial Distributed SCM |
|
4 | Mercurial Distributed SCM | |
5 |
|
5 | |||
6 | basic commands: |
|
6 | basic commands: | |
7 |
|
7 | |||
8 | add add the specified files on the next commit |
|
8 | add add the specified files on the next commit | |
9 | annotate show changeset information by line for each file |
|
9 | annotate show changeset information by line for each file | |
10 | clone make a copy of an existing repository |
|
10 | clone make a copy of an existing repository | |
11 | commit commit the specified files or all outstanding changes |
|
11 | commit commit the specified files or all outstanding changes | |
12 | diff diff repository (or selected files) |
|
12 | diff diff repository (or selected files) | |
13 | export dump the header and diffs for one or more changesets |
|
13 | export dump the header and diffs for one or more changesets | |
14 | forget forget the specified files on the next commit |
|
14 | forget forget the specified files on the next commit | |
15 | init create a new repository in the given directory |
|
15 | init create a new repository in the given directory | |
16 | log show revision history of entire repository or files |
|
16 | log show revision history of entire repository or files | |
17 | merge merge working directory with another revision |
|
17 | merge merge working directory with another revision | |
18 | pull pull changes from the specified source |
|
18 | pull pull changes from the specified source | |
19 | push push changes to the specified destination |
|
19 | push push changes to the specified destination | |
20 | remove remove the specified files on the next commit |
|
20 | remove remove the specified files on the next commit | |
21 | serve start stand-alone webserver |
|
21 | serve start stand-alone webserver | |
22 | status show changed files in the working directory |
|
22 | status show changed files in the working directory | |
23 | summary summarize working directory state |
|
23 | summary summarize working directory state | |
24 | update update working directory (or switch revisions) |
|
24 | update update working directory (or switch revisions) | |
25 |
|
25 | |||
26 | use "hg help" for the full list of commands or "hg -v" for details |
|
26 | (use "hg help" for the full list of commands or "hg -v" for details) | |
27 |
|
27 | |||
28 | $ hg -q |
|
28 | $ hg -q | |
29 | add add the specified files on the next commit |
|
29 | add add the specified files on the next commit | |
30 | annotate show changeset information by line for each file |
|
30 | annotate show changeset information by line for each file | |
31 | clone make a copy of an existing repository |
|
31 | clone make a copy of an existing repository | |
32 | commit commit the specified files or all outstanding changes |
|
32 | commit commit the specified files or all outstanding changes | |
33 | diff diff repository (or selected files) |
|
33 | diff diff repository (or selected files) | |
34 | export dump the header and diffs for one or more changesets |
|
34 | export dump the header and diffs for one or more changesets | |
35 | forget forget the specified files on the next commit |
|
35 | forget forget the specified files on the next commit | |
36 | init create a new repository in the given directory |
|
36 | init create a new repository in the given directory | |
37 | log show revision history of entire repository or files |
|
37 | log show revision history of entire repository or files | |
38 | merge merge working directory with another revision |
|
38 | merge merge working directory with another revision | |
39 | pull pull changes from the specified source |
|
39 | pull pull changes from the specified source | |
40 | push push changes to the specified destination |
|
40 | push push changes to the specified destination | |
41 | remove remove the specified files on the next commit |
|
41 | remove remove the specified files on the next commit | |
42 | serve start stand-alone webserver |
|
42 | serve start stand-alone webserver | |
43 | status show changed files in the working directory |
|
43 | status show changed files in the working directory | |
44 | summary summarize working directory state |
|
44 | summary summarize working directory state | |
45 | update update working directory (or switch revisions) |
|
45 | update update working directory (or switch revisions) | |
46 |
|
46 | |||
47 | $ hg help |
|
47 | $ hg help | |
48 | Mercurial Distributed SCM |
|
48 | Mercurial Distributed SCM | |
49 |
|
49 | |||
50 | list of commands: |
|
50 | list of commands: | |
51 |
|
51 | |||
52 | add add the specified files on the next commit |
|
52 | add add the specified files on the next commit | |
53 | addremove add all new files, delete all missing files |
|
53 | addremove add all new files, delete all missing files | |
54 | annotate show changeset information by line for each file |
|
54 | annotate show changeset information by line for each file | |
55 | archive create an unversioned archive of a repository revision |
|
55 | archive create an unversioned archive of a repository revision | |
56 | backout reverse effect of earlier changeset |
|
56 | backout reverse effect of earlier changeset | |
57 | bisect subdivision search of changesets |
|
57 | bisect subdivision search of changesets | |
58 | bookmarks create a new bookmark or list existing bookmarks |
|
58 | bookmarks create a new bookmark or list existing bookmarks | |
59 | branch set or show the current branch name |
|
59 | branch set or show the current branch name | |
60 | branches list repository named branches |
|
60 | branches list repository named branches | |
61 | bundle create a changegroup file |
|
61 | bundle create a changegroup file | |
62 | cat output the current or given revision of files |
|
62 | cat output the current or given revision of files | |
63 | clone make a copy of an existing repository |
|
63 | clone make a copy of an existing repository | |
64 | commit commit the specified files or all outstanding changes |
|
64 | commit commit the specified files or all outstanding changes | |
65 | config show combined config settings from all hgrc files |
|
65 | config show combined config settings from all hgrc files | |
66 | copy mark files as copied for the next commit |
|
66 | copy mark files as copied for the next commit | |
67 | diff diff repository (or selected files) |
|
67 | diff diff repository (or selected files) | |
68 | export dump the header and diffs for one or more changesets |
|
68 | export dump the header and diffs for one or more changesets | |
69 | forget forget the specified files on the next commit |
|
69 | forget forget the specified files on the next commit | |
70 | graft copy changes from other branches onto the current branch |
|
70 | graft copy changes from other branches onto the current branch | |
71 | grep search for a pattern in specified files and revisions |
|
71 | grep search for a pattern in specified files and revisions | |
72 | heads show branch heads |
|
72 | heads show branch heads | |
73 | help show help for a given topic or a help overview |
|
73 | help show help for a given topic or a help overview | |
74 | identify identify the working copy or specified revision |
|
74 | identify identify the working copy or specified revision | |
75 | import import an ordered set of patches |
|
75 | import import an ordered set of patches | |
76 | incoming show new changesets found in source |
|
76 | incoming show new changesets found in source | |
77 | init create a new repository in the given directory |
|
77 | init create a new repository in the given directory | |
78 | locate locate files matching specific patterns |
|
78 | locate locate files matching specific patterns | |
79 | log show revision history of entire repository or files |
|
79 | log show revision history of entire repository or files | |
80 | manifest output the current or given revision of the project manifest |
|
80 | manifest output the current or given revision of the project manifest | |
81 | merge merge working directory with another revision |
|
81 | merge merge working directory with another revision | |
82 | outgoing show changesets not found in the destination |
|
82 | outgoing show changesets not found in the destination | |
83 | parents show the parents of the working directory or revision |
|
83 | parents show the parents of the working directory or revision | |
84 | paths show aliases for remote repositories |
|
84 | paths show aliases for remote repositories | |
85 | phase set or show the current phase name |
|
85 | phase set or show the current phase name | |
86 | pull pull changes from the specified source |
|
86 | pull pull changes from the specified source | |
87 | push push changes to the specified destination |
|
87 | push push changes to the specified destination | |
88 | recover roll back an interrupted transaction |
|
88 | recover roll back an interrupted transaction | |
89 | remove remove the specified files on the next commit |
|
89 | remove remove the specified files on the next commit | |
90 | rename rename files; equivalent of copy + remove |
|
90 | rename rename files; equivalent of copy + remove | |
91 | resolve redo merges or set/view the merge status of files |
|
91 | resolve redo merges or set/view the merge status of files | |
92 | revert restore files to their checkout state |
|
92 | revert restore files to their checkout state | |
93 | root print the root (top) of the current working directory |
|
93 | root print the root (top) of the current working directory | |
94 | serve start stand-alone webserver |
|
94 | serve start stand-alone webserver | |
95 | status show changed files in the working directory |
|
95 | status show changed files in the working directory | |
96 | summary summarize working directory state |
|
96 | summary summarize working directory state | |
97 | tag add one or more tags for the current or given revision |
|
97 | tag add one or more tags for the current or given revision | |
98 | tags list repository tags |
|
98 | tags list repository tags | |
99 | unbundle apply one or more changegroup files |
|
99 | unbundle apply one or more changegroup files | |
100 | update update working directory (or switch revisions) |
|
100 | update update working directory (or switch revisions) | |
101 | verify verify the integrity of the repository |
|
101 | verify verify the integrity of the repository | |
102 | version output version and copyright information |
|
102 | version output version and copyright information | |
103 |
|
103 | |||
104 | additional help topics: |
|
104 | additional help topics: | |
105 |
|
105 | |||
106 | config Configuration Files |
|
106 | config Configuration Files | |
107 | dates Date Formats |
|
107 | dates Date Formats | |
108 | diffs Diff Formats |
|
108 | diffs Diff Formats | |
109 | environment Environment Variables |
|
109 | environment Environment Variables | |
110 | extensions Using Additional Features |
|
110 | extensions Using Additional Features | |
111 | filesets Specifying File Sets |
|
111 | filesets Specifying File Sets | |
112 | glossary Glossary |
|
112 | glossary Glossary | |
113 | hgignore Syntax for Mercurial Ignore Files |
|
113 | hgignore Syntax for Mercurial Ignore Files | |
114 | hgweb Configuring hgweb |
|
114 | hgweb Configuring hgweb | |
115 | merge-tools Merge Tools |
|
115 | merge-tools Merge Tools | |
116 | multirevs Specifying Multiple Revisions |
|
116 | multirevs Specifying Multiple Revisions | |
117 | patterns File Name Patterns |
|
117 | patterns File Name Patterns | |
118 | phases Working with Phases |
|
118 | phases Working with Phases | |
119 | revisions Specifying Single Revisions |
|
119 | revisions Specifying Single Revisions | |
120 | revsets Specifying Revision Sets |
|
120 | revsets Specifying Revision Sets | |
121 | subrepos Subrepositories |
|
121 | subrepos Subrepositories | |
122 | templating Template Usage |
|
122 | templating Template Usage | |
123 | urls URL Paths |
|
123 | urls URL Paths | |
124 |
|
124 | |||
125 |
use "hg |
|
125 | (use "hg help -v" to show built-in aliases and global options) | |
126 |
|
126 | |||
127 | $ hg -q help |
|
127 | $ hg -q help | |
128 | add add the specified files on the next commit |
|
128 | add add the specified files on the next commit | |
129 | addremove add all new files, delete all missing files |
|
129 | addremove add all new files, delete all missing files | |
130 | annotate show changeset information by line for each file |
|
130 | annotate show changeset information by line for each file | |
131 | archive create an unversioned archive of a repository revision |
|
131 | archive create an unversioned archive of a repository revision | |
132 | backout reverse effect of earlier changeset |
|
132 | backout reverse effect of earlier changeset | |
133 | bisect subdivision search of changesets |
|
133 | bisect subdivision search of changesets | |
134 | bookmarks create a new bookmark or list existing bookmarks |
|
134 | bookmarks create a new bookmark or list existing bookmarks | |
135 | branch set or show the current branch name |
|
135 | branch set or show the current branch name | |
136 | branches list repository named branches |
|
136 | branches list repository named branches | |
137 | bundle create a changegroup file |
|
137 | bundle create a changegroup file | |
138 | cat output the current or given revision of files |
|
138 | cat output the current or given revision of files | |
139 | clone make a copy of an existing repository |
|
139 | clone make a copy of an existing repository | |
140 | commit commit the specified files or all outstanding changes |
|
140 | commit commit the specified files or all outstanding changes | |
141 | config show combined config settings from all hgrc files |
|
141 | config show combined config settings from all hgrc files | |
142 | copy mark files as copied for the next commit |
|
142 | copy mark files as copied for the next commit | |
143 | diff diff repository (or selected files) |
|
143 | diff diff repository (or selected files) | |
144 | export dump the header and diffs for one or more changesets |
|
144 | export dump the header and diffs for one or more changesets | |
145 | forget forget the specified files on the next commit |
|
145 | forget forget the specified files on the next commit | |
146 | graft copy changes from other branches onto the current branch |
|
146 | graft copy changes from other branches onto the current branch | |
147 | grep search for a pattern in specified files and revisions |
|
147 | grep search for a pattern in specified files and revisions | |
148 | heads show branch heads |
|
148 | heads show branch heads | |
149 | help show help for a given topic or a help overview |
|
149 | help show help for a given topic or a help overview | |
150 | identify identify the working copy or specified revision |
|
150 | identify identify the working copy or specified revision | |
151 | import import an ordered set of patches |
|
151 | import import an ordered set of patches | |
152 | incoming show new changesets found in source |
|
152 | incoming show new changesets found in source | |
153 | init create a new repository in the given directory |
|
153 | init create a new repository in the given directory | |
154 | locate locate files matching specific patterns |
|
154 | locate locate files matching specific patterns | |
155 | log show revision history of entire repository or files |
|
155 | log show revision history of entire repository or files | |
156 | manifest output the current or given revision of the project manifest |
|
156 | manifest output the current or given revision of the project manifest | |
157 | merge merge working directory with another revision |
|
157 | merge merge working directory with another revision | |
158 | outgoing show changesets not found in the destination |
|
158 | outgoing show changesets not found in the destination | |
159 | parents show the parents of the working directory or revision |
|
159 | parents show the parents of the working directory or revision | |
160 | paths show aliases for remote repositories |
|
160 | paths show aliases for remote repositories | |
161 | phase set or show the current phase name |
|
161 | phase set or show the current phase name | |
162 | pull pull changes from the specified source |
|
162 | pull pull changes from the specified source | |
163 | push push changes to the specified destination |
|
163 | push push changes to the specified destination | |
164 | recover roll back an interrupted transaction |
|
164 | recover roll back an interrupted transaction | |
165 | remove remove the specified files on the next commit |
|
165 | remove remove the specified files on the next commit | |
166 | rename rename files; equivalent of copy + remove |
|
166 | rename rename files; equivalent of copy + remove | |
167 | resolve redo merges or set/view the merge status of files |
|
167 | resolve redo merges or set/view the merge status of files | |
168 | revert restore files to their checkout state |
|
168 | revert restore files to their checkout state | |
169 | root print the root (top) of the current working directory |
|
169 | root print the root (top) of the current working directory | |
170 | serve start stand-alone webserver |
|
170 | serve start stand-alone webserver | |
171 | status show changed files in the working directory |
|
171 | status show changed files in the working directory | |
172 | summary summarize working directory state |
|
172 | summary summarize working directory state | |
173 | tag add one or more tags for the current or given revision |
|
173 | tag add one or more tags for the current or given revision | |
174 | tags list repository tags |
|
174 | tags list repository tags | |
175 | unbundle apply one or more changegroup files |
|
175 | unbundle apply one or more changegroup files | |
176 | update update working directory (or switch revisions) |
|
176 | update update working directory (or switch revisions) | |
177 | verify verify the integrity of the repository |
|
177 | verify verify the integrity of the repository | |
178 | version output version and copyright information |
|
178 | version output version and copyright information | |
179 |
|
179 | |||
180 | additional help topics: |
|
180 | additional help topics: | |
181 |
|
181 | |||
182 | config Configuration Files |
|
182 | config Configuration Files | |
183 | dates Date Formats |
|
183 | dates Date Formats | |
184 | diffs Diff Formats |
|
184 | diffs Diff Formats | |
185 | environment Environment Variables |
|
185 | environment Environment Variables | |
186 | extensions Using Additional Features |
|
186 | extensions Using Additional Features | |
187 | filesets Specifying File Sets |
|
187 | filesets Specifying File Sets | |
188 | glossary Glossary |
|
188 | glossary Glossary | |
189 | hgignore Syntax for Mercurial Ignore Files |
|
189 | hgignore Syntax for Mercurial Ignore Files | |
190 | hgweb Configuring hgweb |
|
190 | hgweb Configuring hgweb | |
191 | merge-tools Merge Tools |
|
191 | merge-tools Merge Tools | |
192 | multirevs Specifying Multiple Revisions |
|
192 | multirevs Specifying Multiple Revisions | |
193 | patterns File Name Patterns |
|
193 | patterns File Name Patterns | |
194 | phases Working with Phases |
|
194 | phases Working with Phases | |
195 | revisions Specifying Single Revisions |
|
195 | revisions Specifying Single Revisions | |
196 | revsets Specifying Revision Sets |
|
196 | revsets Specifying Revision Sets | |
197 | subrepos Subrepositories |
|
197 | subrepos Subrepositories | |
198 | templating Template Usage |
|
198 | templating Template Usage | |
199 | urls URL Paths |
|
199 | urls URL Paths | |
200 |
|
200 | |||
201 | Test extension help: |
|
201 | Test extension help: | |
202 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
202 | $ hg help extensions --config extensions.rebase= --config extensions.children= | |
203 | Using Additional Features |
|
203 | Using Additional Features | |
204 | """"""""""""""""""""""""" |
|
204 | """"""""""""""""""""""""" | |
205 |
|
205 | |||
206 | Mercurial has the ability to add new features through the use of |
|
206 | Mercurial has the ability to add new features through the use of | |
207 | extensions. Extensions may add new commands, add options to existing |
|
207 | extensions. Extensions may add new commands, add options to existing | |
208 | commands, change the default behavior of commands, or implement hooks. |
|
208 | commands, change the default behavior of commands, or implement hooks. | |
209 |
|
209 | |||
210 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
210 | To enable the "foo" extension, either shipped with Mercurial or in the | |
211 | Python search path, create an entry for it in your configuration file, |
|
211 | Python search path, create an entry for it in your configuration file, | |
212 | like this: |
|
212 | like this: | |
213 |
|
213 | |||
214 | [extensions] |
|
214 | [extensions] | |
215 | foo = |
|
215 | foo = | |
216 |
|
216 | |||
217 | You may also specify the full path to an extension: |
|
217 | You may also specify the full path to an extension: | |
218 |
|
218 | |||
219 | [extensions] |
|
219 | [extensions] | |
220 | myfeature = ~/.hgext/myfeature.py |
|
220 | myfeature = ~/.hgext/myfeature.py | |
221 |
|
221 | |||
222 | See "hg help config" for more information on configuration files. |
|
222 | See "hg help config" for more information on configuration files. | |
223 |
|
223 | |||
224 | Extensions are not loaded by default for a variety of reasons: they can |
|
224 | Extensions are not loaded by default for a variety of reasons: they can | |
225 | increase startup overhead; they may be meant for advanced usage only; they |
|
225 | increase startup overhead; they may be meant for advanced usage only; they | |
226 | may provide potentially dangerous abilities (such as letting you destroy |
|
226 | may provide potentially dangerous abilities (such as letting you destroy | |
227 | or modify history); they might not be ready for prime time; or they may |
|
227 | or modify history); they might not be ready for prime time; or they may | |
228 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
228 | alter some usual behaviors of stock Mercurial. It is thus up to the user | |
229 | to activate extensions as needed. |
|
229 | to activate extensions as needed. | |
230 |
|
230 | |||
231 | To explicitly disable an extension enabled in a configuration file of |
|
231 | To explicitly disable an extension enabled in a configuration file of | |
232 | broader scope, prepend its path with !: |
|
232 | broader scope, prepend its path with !: | |
233 |
|
233 | |||
234 | [extensions] |
|
234 | [extensions] | |
235 | # disabling extension bar residing in /path/to/extension/bar.py |
|
235 | # disabling extension bar residing in /path/to/extension/bar.py | |
236 | bar = !/path/to/extension/bar.py |
|
236 | bar = !/path/to/extension/bar.py | |
237 | # ditto, but no path was supplied for extension baz |
|
237 | # ditto, but no path was supplied for extension baz | |
238 | baz = ! |
|
238 | baz = ! | |
239 |
|
239 | |||
240 | enabled extensions: |
|
240 | enabled extensions: | |
241 |
|
241 | |||
242 | children command to display child changesets (DEPRECATED) |
|
242 | children command to display child changesets (DEPRECATED) | |
243 | rebase command to move sets of revisions to a different ancestor |
|
243 | rebase command to move sets of revisions to a different ancestor | |
244 |
|
244 | |||
245 | disabled extensions: |
|
245 | disabled extensions: | |
246 |
|
246 | |||
247 | acl hooks for controlling repository access |
|
247 | acl hooks for controlling repository access | |
248 | blackbox log repository events to a blackbox for debugging |
|
248 | blackbox log repository events to a blackbox for debugging | |
249 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
249 | bugzilla hooks for integrating with the Bugzilla bug tracker | |
250 | churn command to display statistics about repository history |
|
250 | churn command to display statistics about repository history | |
251 | color colorize output from some commands |
|
251 | color colorize output from some commands | |
252 | convert import revisions from foreign VCS repositories into |
|
252 | convert import revisions from foreign VCS repositories into | |
253 | Mercurial |
|
253 | Mercurial | |
254 | eol automatically manage newlines in repository files |
|
254 | eol automatically manage newlines in repository files | |
255 | extdiff command to allow external programs to compare revisions |
|
255 | extdiff command to allow external programs to compare revisions | |
256 | factotum http authentication with factotum |
|
256 | factotum http authentication with factotum | |
257 | gpg commands to sign and verify changesets |
|
257 | gpg commands to sign and verify changesets | |
258 | hgcia hooks for integrating with the CIA.vc notification service |
|
258 | hgcia hooks for integrating with the CIA.vc notification service | |
259 | hgk browse the repository in a graphical way |
|
259 | hgk browse the repository in a graphical way | |
260 | highlight syntax highlighting for hgweb (requires Pygments) |
|
260 | highlight syntax highlighting for hgweb (requires Pygments) | |
261 | histedit interactive history editing |
|
261 | histedit interactive history editing | |
262 | keyword expand keywords in tracked files |
|
262 | keyword expand keywords in tracked files | |
263 | largefiles track large binary files |
|
263 | largefiles track large binary files | |
264 | mq manage a stack of patches |
|
264 | mq manage a stack of patches | |
265 | notify hooks for sending email push notifications |
|
265 | notify hooks for sending email push notifications | |
266 | pager browse command output with an external pager |
|
266 | pager browse command output with an external pager | |
267 | patchbomb command to send changesets as (a series of) patch emails |
|
267 | patchbomb command to send changesets as (a series of) patch emails | |
268 | progress show progress bars for some actions |
|
268 | progress show progress bars for some actions | |
269 | purge command to delete untracked files from the working |
|
269 | purge command to delete untracked files from the working | |
270 | directory |
|
270 | directory | |
271 | record commands to interactively select changes for |
|
271 | record commands to interactively select changes for | |
272 | commit/qrefresh |
|
272 | commit/qrefresh | |
273 | relink recreates hardlinks between repository clones |
|
273 | relink recreates hardlinks between repository clones | |
274 | schemes extend schemes with shortcuts to repository swarms |
|
274 | schemes extend schemes with shortcuts to repository swarms | |
275 | share share a common history between several working directories |
|
275 | share share a common history between several working directories | |
276 | shelve save and restore changes to the working directory |
|
276 | shelve save and restore changes to the working directory | |
277 | strip strip changesets and their descendents from history |
|
277 | strip strip changesets and their descendents from history | |
278 | transplant command to transplant changesets from another branch |
|
278 | transplant command to transplant changesets from another branch | |
279 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
279 | win32mbcs allow the use of MBCS paths with problematic encodings | |
280 | zeroconf discover and advertise repositories on the local network |
|
280 | zeroconf discover and advertise repositories on the local network | |
281 | Test short command list with verbose option |
|
281 | Test short command list with verbose option | |
282 |
|
282 | |||
283 | $ hg -v help shortlist |
|
283 | $ hg -v help shortlist | |
284 | Mercurial Distributed SCM |
|
284 | Mercurial Distributed SCM | |
285 |
|
285 | |||
286 | basic commands: |
|
286 | basic commands: | |
287 |
|
287 | |||
288 | add add the specified files on the next commit |
|
288 | add add the specified files on the next commit | |
289 | annotate, blame |
|
289 | annotate, blame | |
290 | show changeset information by line for each file |
|
290 | show changeset information by line for each file | |
291 | clone make a copy of an existing repository |
|
291 | clone make a copy of an existing repository | |
292 | commit, ci commit the specified files or all outstanding changes |
|
292 | commit, ci commit the specified files or all outstanding changes | |
293 | diff diff repository (or selected files) |
|
293 | diff diff repository (or selected files) | |
294 | export dump the header and diffs for one or more changesets |
|
294 | export dump the header and diffs for one or more changesets | |
295 | forget forget the specified files on the next commit |
|
295 | forget forget the specified files on the next commit | |
296 | init create a new repository in the given directory |
|
296 | init create a new repository in the given directory | |
297 | log, history show revision history of entire repository or files |
|
297 | log, history show revision history of entire repository or files | |
298 | merge merge working directory with another revision |
|
298 | merge merge working directory with another revision | |
299 | pull pull changes from the specified source |
|
299 | pull pull changes from the specified source | |
300 | push push changes to the specified destination |
|
300 | push push changes to the specified destination | |
301 | remove, rm remove the specified files on the next commit |
|
301 | remove, rm remove the specified files on the next commit | |
302 | serve start stand-alone webserver |
|
302 | serve start stand-alone webserver | |
303 | status, st show changed files in the working directory |
|
303 | status, st show changed files in the working directory | |
304 | summary, sum summarize working directory state |
|
304 | summary, sum summarize working directory state | |
305 | update, up, checkout, co |
|
305 | update, up, checkout, co | |
306 | update working directory (or switch revisions) |
|
306 | update working directory (or switch revisions) | |
307 |
|
307 | |||
308 | global options ([+] can be repeated): |
|
308 | global options ([+] can be repeated): | |
309 |
|
309 | |||
310 | -R --repository REPO repository root directory or name of overlay bundle |
|
310 | -R --repository REPO repository root directory or name of overlay bundle | |
311 | file |
|
311 | file | |
312 | --cwd DIR change working directory |
|
312 | --cwd DIR change working directory | |
313 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
313 | -y --noninteractive do not prompt, automatically pick the first choice for | |
314 | all prompts |
|
314 | all prompts | |
315 | -q --quiet suppress output |
|
315 | -q --quiet suppress output | |
316 | -v --verbose enable additional output |
|
316 | -v --verbose enable additional output | |
317 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
317 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
318 | --debug enable debugging output |
|
318 | --debug enable debugging output | |
319 | --debugger start debugger |
|
319 | --debugger start debugger | |
320 | --encoding ENCODE set the charset encoding (default: ascii) |
|
320 | --encoding ENCODE set the charset encoding (default: ascii) | |
321 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
321 | --encodingmode MODE set the charset encoding mode (default: strict) | |
322 | --traceback always print a traceback on exception |
|
322 | --traceback always print a traceback on exception | |
323 | --time time how long the command takes |
|
323 | --time time how long the command takes | |
324 | --profile print command execution profile |
|
324 | --profile print command execution profile | |
325 | --version output version information and exit |
|
325 | --version output version information and exit | |
326 | -h --help display help and exit |
|
326 | -h --help display help and exit | |
327 | --hidden consider hidden changesets |
|
327 | --hidden consider hidden changesets | |
328 |
|
328 | |||
329 | use "hg help" for the full list of commands |
|
329 | (use "hg help" for the full list of commands) | |
330 |
|
330 | |||
331 | $ hg add -h |
|
331 | $ hg add -h | |
332 | hg add [OPTION]... [FILE]... |
|
332 | hg add [OPTION]... [FILE]... | |
333 |
|
333 | |||
334 | add the specified files on the next commit |
|
334 | add the specified files on the next commit | |
335 |
|
335 | |||
336 | Schedule files to be version controlled and added to the repository. |
|
336 | Schedule files to be version controlled and added to the repository. | |
337 |
|
337 | |||
338 | The files will be added to the repository at the next commit. To undo an |
|
338 | The files will be added to the repository at the next commit. To undo an | |
339 | add before that, see "hg forget". |
|
339 | add before that, see "hg forget". | |
340 |
|
340 | |||
341 | If no names are given, add all files to the repository. |
|
341 | If no names are given, add all files to the repository. | |
342 |
|
342 | |||
343 | Returns 0 if all files are successfully added. |
|
343 | Returns 0 if all files are successfully added. | |
344 |
|
344 | |||
345 | options ([+] can be repeated): |
|
345 | options ([+] can be repeated): | |
346 |
|
346 | |||
347 | -I --include PATTERN [+] include names matching the given patterns |
|
347 | -I --include PATTERN [+] include names matching the given patterns | |
348 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
348 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
349 | -S --subrepos recurse into subrepositories |
|
349 | -S --subrepos recurse into subrepositories | |
350 | -n --dry-run do not perform actions, just print output |
|
350 | -n --dry-run do not perform actions, just print output | |
351 |
|
351 | |||
352 | (some details hidden, use --verbose to show complete help) |
|
352 | (some details hidden, use --verbose to show complete help) | |
353 |
|
353 | |||
354 | Verbose help for add |
|
354 | Verbose help for add | |
355 |
|
355 | |||
356 | $ hg add -hv |
|
356 | $ hg add -hv | |
357 | hg add [OPTION]... [FILE]... |
|
357 | hg add [OPTION]... [FILE]... | |
358 |
|
358 | |||
359 | add the specified files on the next commit |
|
359 | add the specified files on the next commit | |
360 |
|
360 | |||
361 | Schedule files to be version controlled and added to the repository. |
|
361 | Schedule files to be version controlled and added to the repository. | |
362 |
|
362 | |||
363 | The files will be added to the repository at the next commit. To undo an |
|
363 | The files will be added to the repository at the next commit. To undo an | |
364 | add before that, see "hg forget". |
|
364 | add before that, see "hg forget". | |
365 |
|
365 | |||
366 | If no names are given, add all files to the repository. |
|
366 | If no names are given, add all files to the repository. | |
367 |
|
367 | |||
368 | An example showing how new (unknown) files are added automatically by "hg |
|
368 | An example showing how new (unknown) files are added automatically by "hg | |
369 | add": |
|
369 | add": | |
370 |
|
370 | |||
371 | $ ls |
|
371 | $ ls | |
372 | foo.c |
|
372 | foo.c | |
373 | $ hg status |
|
373 | $ hg status | |
374 | ? foo.c |
|
374 | ? foo.c | |
375 | $ hg add |
|
375 | $ hg add | |
376 | adding foo.c |
|
376 | adding foo.c | |
377 | $ hg status |
|
377 | $ hg status | |
378 | A foo.c |
|
378 | A foo.c | |
379 |
|
379 | |||
380 | Returns 0 if all files are successfully added. |
|
380 | Returns 0 if all files are successfully added. | |
381 |
|
381 | |||
382 | options ([+] can be repeated): |
|
382 | options ([+] can be repeated): | |
383 |
|
383 | |||
384 | -I --include PATTERN [+] include names matching the given patterns |
|
384 | -I --include PATTERN [+] include names matching the given patterns | |
385 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
385 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
386 | -S --subrepos recurse into subrepositories |
|
386 | -S --subrepos recurse into subrepositories | |
387 | -n --dry-run do not perform actions, just print output |
|
387 | -n --dry-run do not perform actions, just print output | |
388 |
|
388 | |||
389 | global options ([+] can be repeated): |
|
389 | global options ([+] can be repeated): | |
390 |
|
390 | |||
391 | -R --repository REPO repository root directory or name of overlay bundle |
|
391 | -R --repository REPO repository root directory or name of overlay bundle | |
392 | file |
|
392 | file | |
393 | --cwd DIR change working directory |
|
393 | --cwd DIR change working directory | |
394 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
394 | -y --noninteractive do not prompt, automatically pick the first choice for | |
395 | all prompts |
|
395 | all prompts | |
396 | -q --quiet suppress output |
|
396 | -q --quiet suppress output | |
397 | -v --verbose enable additional output |
|
397 | -v --verbose enable additional output | |
398 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
398 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
399 | --debug enable debugging output |
|
399 | --debug enable debugging output | |
400 | --debugger start debugger |
|
400 | --debugger start debugger | |
401 | --encoding ENCODE set the charset encoding (default: ascii) |
|
401 | --encoding ENCODE set the charset encoding (default: ascii) | |
402 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
402 | --encodingmode MODE set the charset encoding mode (default: strict) | |
403 | --traceback always print a traceback on exception |
|
403 | --traceback always print a traceback on exception | |
404 | --time time how long the command takes |
|
404 | --time time how long the command takes | |
405 | --profile print command execution profile |
|
405 | --profile print command execution profile | |
406 | --version output version information and exit |
|
406 | --version output version information and exit | |
407 | -h --help display help and exit |
|
407 | -h --help display help and exit | |
408 | --hidden consider hidden changesets |
|
408 | --hidden consider hidden changesets | |
409 |
|
409 | |||
410 | Test help option with version option |
|
410 | Test help option with version option | |
411 |
|
411 | |||
412 | $ hg add -h --version |
|
412 | $ hg add -h --version | |
413 | Mercurial Distributed SCM (version *) (glob) |
|
413 | Mercurial Distributed SCM (version *) (glob) | |
414 | (see http://mercurial.selenic.com for more information) |
|
414 | (see http://mercurial.selenic.com for more information) | |
415 |
|
415 | |||
416 | Copyright (C) 2005-2014 Matt Mackall and others |
|
416 | Copyright (C) 2005-2014 Matt Mackall and others | |
417 | This is free software; see the source for copying conditions. There is NO |
|
417 | This is free software; see the source for copying conditions. There is NO | |
418 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
418 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
419 |
|
419 | |||
420 | $ hg add --skjdfks |
|
420 | $ hg add --skjdfks | |
421 | hg add: option --skjdfks not recognized |
|
421 | hg add: option --skjdfks not recognized | |
422 | hg add [OPTION]... [FILE]... |
|
422 | hg add [OPTION]... [FILE]... | |
423 |
|
423 | |||
424 | add the specified files on the next commit |
|
424 | add the specified files on the next commit | |
425 |
|
425 | |||
426 | options ([+] can be repeated): |
|
426 | options ([+] can be repeated): | |
427 |
|
427 | |||
428 | -I --include PATTERN [+] include names matching the given patterns |
|
428 | -I --include PATTERN [+] include names matching the given patterns | |
429 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
429 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
430 | -S --subrepos recurse into subrepositories |
|
430 | -S --subrepos recurse into subrepositories | |
431 | -n --dry-run do not perform actions, just print output |
|
431 | -n --dry-run do not perform actions, just print output | |
432 |
|
432 | |||
433 | (use "hg add -h" to show more help) |
|
433 | (use "hg add -h" to show more help) | |
434 | [255] |
|
434 | [255] | |
435 |
|
435 | |||
436 | Test ambiguous command help |
|
436 | Test ambiguous command help | |
437 |
|
437 | |||
438 | $ hg help ad |
|
438 | $ hg help ad | |
439 | list of commands: |
|
439 | list of commands: | |
440 |
|
440 | |||
441 | add add the specified files on the next commit |
|
441 | add add the specified files on the next commit | |
442 | addremove add all new files, delete all missing files |
|
442 | addremove add all new files, delete all missing files | |
443 |
|
443 | |||
444 |
use "hg |
|
444 | (use "hg help -v ad" to show built-in aliases and global options) | |
445 |
|
445 | |||
446 | Test command without options |
|
446 | Test command without options | |
447 |
|
447 | |||
448 | $ hg help verify |
|
448 | $ hg help verify | |
449 | hg verify |
|
449 | hg verify | |
450 |
|
450 | |||
451 | verify the integrity of the repository |
|
451 | verify the integrity of the repository | |
452 |
|
452 | |||
453 | Verify the integrity of the current repository. |
|
453 | Verify the integrity of the current repository. | |
454 |
|
454 | |||
455 | This will perform an extensive check of the repository's integrity, |
|
455 | This will perform an extensive check of the repository's integrity, | |
456 | validating the hashes and checksums of each entry in the changelog, |
|
456 | validating the hashes and checksums of each entry in the changelog, | |
457 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
457 | manifest, and tracked files, as well as the integrity of their crosslinks | |
458 | and indices. |
|
458 | and indices. | |
459 |
|
459 | |||
460 | Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more |
|
460 | Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more | |
461 | information about recovery from corruption of the repository. |
|
461 | information about recovery from corruption of the repository. | |
462 |
|
462 | |||
463 | Returns 0 on success, 1 if errors are encountered. |
|
463 | Returns 0 on success, 1 if errors are encountered. | |
464 |
|
464 | |||
465 | (some details hidden, use --verbose to show complete help) |
|
465 | (some details hidden, use --verbose to show complete help) | |
466 |
|
466 | |||
467 | $ hg help diff |
|
467 | $ hg help diff | |
468 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
468 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
469 |
|
469 | |||
470 | diff repository (or selected files) |
|
470 | diff repository (or selected files) | |
471 |
|
471 | |||
472 | Show differences between revisions for the specified files. |
|
472 | Show differences between revisions for the specified files. | |
473 |
|
473 | |||
474 | Differences between files are shown using the unified diff format. |
|
474 | Differences between files are shown using the unified diff format. | |
475 |
|
475 | |||
476 | Note: |
|
476 | Note: | |
477 | diff may generate unexpected results for merges, as it will default to |
|
477 | diff may generate unexpected results for merges, as it will default to | |
478 | comparing against the working directory's first parent changeset if no |
|
478 | comparing against the working directory's first parent changeset if no | |
479 | revisions are specified. |
|
479 | revisions are specified. | |
480 |
|
480 | |||
481 | When two revision arguments are given, then changes are shown between |
|
481 | When two revision arguments are given, then changes are shown between | |
482 | those revisions. If only one revision is specified then that revision is |
|
482 | those revisions. If only one revision is specified then that revision is | |
483 | compared to the working directory, and, when no revisions are specified, |
|
483 | compared to the working directory, and, when no revisions are specified, | |
484 | the working directory files are compared to its parent. |
|
484 | the working directory files are compared to its parent. | |
485 |
|
485 | |||
486 | Alternatively you can specify -c/--change with a revision to see the |
|
486 | Alternatively you can specify -c/--change with a revision to see the | |
487 | changes in that changeset relative to its first parent. |
|
487 | changes in that changeset relative to its first parent. | |
488 |
|
488 | |||
489 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
489 | Without the -a/--text option, diff will avoid generating diffs of files it | |
490 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
490 | detects as binary. With -a, diff will generate a diff anyway, probably | |
491 | with undesirable results. |
|
491 | with undesirable results. | |
492 |
|
492 | |||
493 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
493 | Use the -g/--git option to generate diffs in the git extended diff format. | |
494 | For more information, read "hg help diffs". |
|
494 | For more information, read "hg help diffs". | |
495 |
|
495 | |||
496 | Returns 0 on success. |
|
496 | Returns 0 on success. | |
497 |
|
497 | |||
498 | options ([+] can be repeated): |
|
498 | options ([+] can be repeated): | |
499 |
|
499 | |||
500 | -r --rev REV [+] revision |
|
500 | -r --rev REV [+] revision | |
501 | -c --change REV change made by revision |
|
501 | -c --change REV change made by revision | |
502 | -a --text treat all files as text |
|
502 | -a --text treat all files as text | |
503 | -g --git use git extended diff format |
|
503 | -g --git use git extended diff format | |
504 | --nodates omit dates from diff headers |
|
504 | --nodates omit dates from diff headers | |
505 | -p --show-function show which function each change is in |
|
505 | -p --show-function show which function each change is in | |
506 | --reverse produce a diff that undoes the changes |
|
506 | --reverse produce a diff that undoes the changes | |
507 | -w --ignore-all-space ignore white space when comparing lines |
|
507 | -w --ignore-all-space ignore white space when comparing lines | |
508 | -b --ignore-space-change ignore changes in the amount of white space |
|
508 | -b --ignore-space-change ignore changes in the amount of white space | |
509 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
509 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
510 | -U --unified NUM number of lines of context to show |
|
510 | -U --unified NUM number of lines of context to show | |
511 | --stat output diffstat-style summary of changes |
|
511 | --stat output diffstat-style summary of changes | |
512 | -I --include PATTERN [+] include names matching the given patterns |
|
512 | -I --include PATTERN [+] include names matching the given patterns | |
513 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
513 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
514 | -S --subrepos recurse into subrepositories |
|
514 | -S --subrepos recurse into subrepositories | |
515 |
|
515 | |||
516 | (some details hidden, use --verbose to show complete help) |
|
516 | (some details hidden, use --verbose to show complete help) | |
517 |
|
517 | |||
518 | $ hg help status |
|
518 | $ hg help status | |
519 | hg status [OPTION]... [FILE]... |
|
519 | hg status [OPTION]... [FILE]... | |
520 |
|
520 | |||
521 | aliases: st |
|
521 | aliases: st | |
522 |
|
522 | |||
523 | show changed files in the working directory |
|
523 | show changed files in the working directory | |
524 |
|
524 | |||
525 | Show status of files in the repository. If names are given, only files |
|
525 | Show status of files in the repository. If names are given, only files | |
526 | that match are shown. Files that are clean or ignored or the source of a |
|
526 | that match are shown. Files that are clean or ignored or the source of a | |
527 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
527 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
528 | -C/--copies or -A/--all are given. Unless options described with "show |
|
528 | -C/--copies or -A/--all are given. Unless options described with "show | |
529 | only ..." are given, the options -mardu are used. |
|
529 | only ..." are given, the options -mardu are used. | |
530 |
|
530 | |||
531 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
531 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
532 | explicitly requested with -u/--unknown or -i/--ignored. |
|
532 | explicitly requested with -u/--unknown or -i/--ignored. | |
533 |
|
533 | |||
534 | Note: |
|
534 | Note: | |
535 | status may appear to disagree with diff if permissions have changed or |
|
535 | status may appear to disagree with diff if permissions have changed or | |
536 | a merge has occurred. The standard diff format does not report |
|
536 | a merge has occurred. The standard diff format does not report | |
537 | permission changes and diff only reports changes relative to one merge |
|
537 | permission changes and diff only reports changes relative to one merge | |
538 | parent. |
|
538 | parent. | |
539 |
|
539 | |||
540 | If one revision is given, it is used as the base revision. If two |
|
540 | If one revision is given, it is used as the base revision. If two | |
541 | revisions are given, the differences between them are shown. The --change |
|
541 | revisions are given, the differences between them are shown. The --change | |
542 | option can also be used as a shortcut to list the changed files of a |
|
542 | option can also be used as a shortcut to list the changed files of a | |
543 | revision from its first parent. |
|
543 | revision from its first parent. | |
544 |
|
544 | |||
545 | The codes used to show the status of files are: |
|
545 | The codes used to show the status of files are: | |
546 |
|
546 | |||
547 | M = modified |
|
547 | M = modified | |
548 | A = added |
|
548 | A = added | |
549 | R = removed |
|
549 | R = removed | |
550 | C = clean |
|
550 | C = clean | |
551 | ! = missing (deleted by non-hg command, but still tracked) |
|
551 | ! = missing (deleted by non-hg command, but still tracked) | |
552 | ? = not tracked |
|
552 | ? = not tracked | |
553 | I = ignored |
|
553 | I = ignored | |
554 | = origin of the previous file (with --copies) |
|
554 | = origin of the previous file (with --copies) | |
555 |
|
555 | |||
556 | Returns 0 on success. |
|
556 | Returns 0 on success. | |
557 |
|
557 | |||
558 | options ([+] can be repeated): |
|
558 | options ([+] can be repeated): | |
559 |
|
559 | |||
560 | -A --all show status of all files |
|
560 | -A --all show status of all files | |
561 | -m --modified show only modified files |
|
561 | -m --modified show only modified files | |
562 | -a --added show only added files |
|
562 | -a --added show only added files | |
563 | -r --removed show only removed files |
|
563 | -r --removed show only removed files | |
564 | -d --deleted show only deleted (but tracked) files |
|
564 | -d --deleted show only deleted (but tracked) files | |
565 | -c --clean show only files without changes |
|
565 | -c --clean show only files without changes | |
566 | -u --unknown show only unknown (not tracked) files |
|
566 | -u --unknown show only unknown (not tracked) files | |
567 | -i --ignored show only ignored files |
|
567 | -i --ignored show only ignored files | |
568 | -n --no-status hide status prefix |
|
568 | -n --no-status hide status prefix | |
569 | -C --copies show source of copied files |
|
569 | -C --copies show source of copied files | |
570 | -0 --print0 end filenames with NUL, for use with xargs |
|
570 | -0 --print0 end filenames with NUL, for use with xargs | |
571 | --rev REV [+] show difference from revision |
|
571 | --rev REV [+] show difference from revision | |
572 | --change REV list the changed files of a revision |
|
572 | --change REV list the changed files of a revision | |
573 | -I --include PATTERN [+] include names matching the given patterns |
|
573 | -I --include PATTERN [+] include names matching the given patterns | |
574 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
574 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
575 | -S --subrepos recurse into subrepositories |
|
575 | -S --subrepos recurse into subrepositories | |
576 |
|
576 | |||
577 | (some details hidden, use --verbose to show complete help) |
|
577 | (some details hidden, use --verbose to show complete help) | |
578 |
|
578 | |||
579 | $ hg -q help status |
|
579 | $ hg -q help status | |
580 | hg status [OPTION]... [FILE]... |
|
580 | hg status [OPTION]... [FILE]... | |
581 |
|
581 | |||
582 | show changed files in the working directory |
|
582 | show changed files in the working directory | |
583 |
|
583 | |||
584 | $ hg help foo |
|
584 | $ hg help foo | |
585 | abort: no such help topic: foo |
|
585 | abort: no such help topic: foo | |
586 | (try "hg help --keyword foo") |
|
586 | (try "hg help --keyword foo") | |
587 | [255] |
|
587 | [255] | |
588 |
|
588 | |||
589 | $ hg skjdfks |
|
589 | $ hg skjdfks | |
590 | hg: unknown command 'skjdfks' |
|
590 | hg: unknown command 'skjdfks' | |
591 | Mercurial Distributed SCM |
|
591 | Mercurial Distributed SCM | |
592 |
|
592 | |||
593 | basic commands: |
|
593 | basic commands: | |
594 |
|
594 | |||
595 | add add the specified files on the next commit |
|
595 | add add the specified files on the next commit | |
596 | annotate show changeset information by line for each file |
|
596 | annotate show changeset information by line for each file | |
597 | clone make a copy of an existing repository |
|
597 | clone make a copy of an existing repository | |
598 | commit commit the specified files or all outstanding changes |
|
598 | commit commit the specified files or all outstanding changes | |
599 | diff diff repository (or selected files) |
|
599 | diff diff repository (or selected files) | |
600 | export dump the header and diffs for one or more changesets |
|
600 | export dump the header and diffs for one or more changesets | |
601 | forget forget the specified files on the next commit |
|
601 | forget forget the specified files on the next commit | |
602 | init create a new repository in the given directory |
|
602 | init create a new repository in the given directory | |
603 | log show revision history of entire repository or files |
|
603 | log show revision history of entire repository or files | |
604 | merge merge working directory with another revision |
|
604 | merge merge working directory with another revision | |
605 | pull pull changes from the specified source |
|
605 | pull pull changes from the specified source | |
606 | push push changes to the specified destination |
|
606 | push push changes to the specified destination | |
607 | remove remove the specified files on the next commit |
|
607 | remove remove the specified files on the next commit | |
608 | serve start stand-alone webserver |
|
608 | serve start stand-alone webserver | |
609 | status show changed files in the working directory |
|
609 | status show changed files in the working directory | |
610 | summary summarize working directory state |
|
610 | summary summarize working directory state | |
611 | update update working directory (or switch revisions) |
|
611 | update update working directory (or switch revisions) | |
612 |
|
612 | |||
613 | use "hg help" for the full list of commands or "hg -v" for details |
|
613 | (use "hg help" for the full list of commands or "hg -v" for details) | |
614 | [255] |
|
614 | [255] | |
615 |
|
615 | |||
616 |
|
616 | |||
617 | $ cat > helpext.py <<EOF |
|
617 | $ cat > helpext.py <<EOF | |
618 | > import os |
|
618 | > import os | |
619 | > from mercurial import cmdutil, commands |
|
619 | > from mercurial import cmdutil, commands | |
620 | > |
|
620 | > | |
621 | > cmdtable = {} |
|
621 | > cmdtable = {} | |
622 | > command = cmdutil.command(cmdtable) |
|
622 | > command = cmdutil.command(cmdtable) | |
623 | > |
|
623 | > | |
624 | > @command('nohelp', |
|
624 | > @command('nohelp', | |
625 | > [('', 'longdesc', 3, 'x'*90), |
|
625 | > [('', 'longdesc', 3, 'x'*90), | |
626 | > ('n', '', None, 'normal desc'), |
|
626 | > ('n', '', None, 'normal desc'), | |
627 | > ('', 'newline', '', 'line1\nline2')], |
|
627 | > ('', 'newline', '', 'line1\nline2')], | |
628 | > 'hg nohelp', |
|
628 | > 'hg nohelp', | |
629 | > norepo=True) |
|
629 | > norepo=True) | |
630 | > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')]) |
|
630 | > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')]) | |
631 | > def nohelp(ui, *args, **kwargs): |
|
631 | > def nohelp(ui, *args, **kwargs): | |
632 | > pass |
|
632 | > pass | |
633 | > |
|
633 | > | |
634 | > EOF |
|
634 | > EOF | |
635 | $ echo '[extensions]' >> $HGRCPATH |
|
635 | $ echo '[extensions]' >> $HGRCPATH | |
636 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
636 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
637 |
|
637 | |||
638 | Test command with no help text |
|
638 | Test command with no help text | |
639 |
|
639 | |||
640 | $ hg help nohelp |
|
640 | $ hg help nohelp | |
641 | hg nohelp |
|
641 | hg nohelp | |
642 |
|
642 | |||
643 | (no help text available) |
|
643 | (no help text available) | |
644 |
|
644 | |||
645 | options: |
|
645 | options: | |
646 |
|
646 | |||
647 | --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
647 | --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
648 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
648 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3) | |
649 | -n -- normal desc |
|
649 | -n -- normal desc | |
650 | --newline VALUE line1 line2 |
|
650 | --newline VALUE line1 line2 | |
651 |
|
651 | |||
652 | (some details hidden, use --verbose to show complete help) |
|
652 | (some details hidden, use --verbose to show complete help) | |
653 |
|
653 | |||
654 | $ hg help -k nohelp |
|
654 | $ hg help -k nohelp | |
655 | Commands: |
|
655 | Commands: | |
656 |
|
656 | |||
657 | nohelp hg nohelp |
|
657 | nohelp hg nohelp | |
658 |
|
658 | |||
659 | Extension Commands: |
|
659 | Extension Commands: | |
660 |
|
660 | |||
661 | nohelp (no help text available) |
|
661 | nohelp (no help text available) | |
662 |
|
662 | |||
663 | Test that default list of commands omits extension commands |
|
663 | Test that default list of commands omits extension commands | |
664 |
|
664 | |||
665 | $ hg help |
|
665 | $ hg help | |
666 | Mercurial Distributed SCM |
|
666 | Mercurial Distributed SCM | |
667 |
|
667 | |||
668 | list of commands: |
|
668 | list of commands: | |
669 |
|
669 | |||
670 | add add the specified files on the next commit |
|
670 | add add the specified files on the next commit | |
671 | addremove add all new files, delete all missing files |
|
671 | addremove add all new files, delete all missing files | |
672 | annotate show changeset information by line for each file |
|
672 | annotate show changeset information by line for each file | |
673 | archive create an unversioned archive of a repository revision |
|
673 | archive create an unversioned archive of a repository revision | |
674 | backout reverse effect of earlier changeset |
|
674 | backout reverse effect of earlier changeset | |
675 | bisect subdivision search of changesets |
|
675 | bisect subdivision search of changesets | |
676 | bookmarks create a new bookmark or list existing bookmarks |
|
676 | bookmarks create a new bookmark or list existing bookmarks | |
677 | branch set or show the current branch name |
|
677 | branch set or show the current branch name | |
678 | branches list repository named branches |
|
678 | branches list repository named branches | |
679 | bundle create a changegroup file |
|
679 | bundle create a changegroup file | |
680 | cat output the current or given revision of files |
|
680 | cat output the current or given revision of files | |
681 | clone make a copy of an existing repository |
|
681 | clone make a copy of an existing repository | |
682 | commit commit the specified files or all outstanding changes |
|
682 | commit commit the specified files or all outstanding changes | |
683 | config show combined config settings from all hgrc files |
|
683 | config show combined config settings from all hgrc files | |
684 | copy mark files as copied for the next commit |
|
684 | copy mark files as copied for the next commit | |
685 | diff diff repository (or selected files) |
|
685 | diff diff repository (or selected files) | |
686 | export dump the header and diffs for one or more changesets |
|
686 | export dump the header and diffs for one or more changesets | |
687 | forget forget the specified files on the next commit |
|
687 | forget forget the specified files on the next commit | |
688 | graft copy changes from other branches onto the current branch |
|
688 | graft copy changes from other branches onto the current branch | |
689 | grep search for a pattern in specified files and revisions |
|
689 | grep search for a pattern in specified files and revisions | |
690 | heads show branch heads |
|
690 | heads show branch heads | |
691 | help show help for a given topic or a help overview |
|
691 | help show help for a given topic or a help overview | |
692 | identify identify the working copy or specified revision |
|
692 | identify identify the working copy or specified revision | |
693 | import import an ordered set of patches |
|
693 | import import an ordered set of patches | |
694 | incoming show new changesets found in source |
|
694 | incoming show new changesets found in source | |
695 | init create a new repository in the given directory |
|
695 | init create a new repository in the given directory | |
696 | locate locate files matching specific patterns |
|
696 | locate locate files matching specific patterns | |
697 | log show revision history of entire repository or files |
|
697 | log show revision history of entire repository or files | |
698 | manifest output the current or given revision of the project manifest |
|
698 | manifest output the current or given revision of the project manifest | |
699 | merge merge working directory with another revision |
|
699 | merge merge working directory with another revision | |
700 | outgoing show changesets not found in the destination |
|
700 | outgoing show changesets not found in the destination | |
701 | parents show the parents of the working directory or revision |
|
701 | parents show the parents of the working directory or revision | |
702 | paths show aliases for remote repositories |
|
702 | paths show aliases for remote repositories | |
703 | phase set or show the current phase name |
|
703 | phase set or show the current phase name | |
704 | pull pull changes from the specified source |
|
704 | pull pull changes from the specified source | |
705 | push push changes to the specified destination |
|
705 | push push changes to the specified destination | |
706 | recover roll back an interrupted transaction |
|
706 | recover roll back an interrupted transaction | |
707 | remove remove the specified files on the next commit |
|
707 | remove remove the specified files on the next commit | |
708 | rename rename files; equivalent of copy + remove |
|
708 | rename rename files; equivalent of copy + remove | |
709 | resolve redo merges or set/view the merge status of files |
|
709 | resolve redo merges or set/view the merge status of files | |
710 | revert restore files to their checkout state |
|
710 | revert restore files to their checkout state | |
711 | root print the root (top) of the current working directory |
|
711 | root print the root (top) of the current working directory | |
712 | serve start stand-alone webserver |
|
712 | serve start stand-alone webserver | |
713 | status show changed files in the working directory |
|
713 | status show changed files in the working directory | |
714 | summary summarize working directory state |
|
714 | summary summarize working directory state | |
715 | tag add one or more tags for the current or given revision |
|
715 | tag add one or more tags for the current or given revision | |
716 | tags list repository tags |
|
716 | tags list repository tags | |
717 | unbundle apply one or more changegroup files |
|
717 | unbundle apply one or more changegroup files | |
718 | update update working directory (or switch revisions) |
|
718 | update update working directory (or switch revisions) | |
719 | verify verify the integrity of the repository |
|
719 | verify verify the integrity of the repository | |
720 | version output version and copyright information |
|
720 | version output version and copyright information | |
721 |
|
721 | |||
722 | enabled extensions: |
|
722 | enabled extensions: | |
723 |
|
723 | |||
724 | helpext (no help text available) |
|
724 | helpext (no help text available) | |
725 |
|
725 | |||
726 | additional help topics: |
|
726 | additional help topics: | |
727 |
|
727 | |||
728 | config Configuration Files |
|
728 | config Configuration Files | |
729 | dates Date Formats |
|
729 | dates Date Formats | |
730 | diffs Diff Formats |
|
730 | diffs Diff Formats | |
731 | environment Environment Variables |
|
731 | environment Environment Variables | |
732 | extensions Using Additional Features |
|
732 | extensions Using Additional Features | |
733 | filesets Specifying File Sets |
|
733 | filesets Specifying File Sets | |
734 | glossary Glossary |
|
734 | glossary Glossary | |
735 | hgignore Syntax for Mercurial Ignore Files |
|
735 | hgignore Syntax for Mercurial Ignore Files | |
736 | hgweb Configuring hgweb |
|
736 | hgweb Configuring hgweb | |
737 | merge-tools Merge Tools |
|
737 | merge-tools Merge Tools | |
738 | multirevs Specifying Multiple Revisions |
|
738 | multirevs Specifying Multiple Revisions | |
739 | patterns File Name Patterns |
|
739 | patterns File Name Patterns | |
740 | phases Working with Phases |
|
740 | phases Working with Phases | |
741 | revisions Specifying Single Revisions |
|
741 | revisions Specifying Single Revisions | |
742 | revsets Specifying Revision Sets |
|
742 | revsets Specifying Revision Sets | |
743 | subrepos Subrepositories |
|
743 | subrepos Subrepositories | |
744 | templating Template Usage |
|
744 | templating Template Usage | |
745 | urls URL Paths |
|
745 | urls URL Paths | |
746 |
|
746 | |||
747 |
use "hg |
|
747 | (use "hg help -v" to show built-in aliases and global options) | |
748 |
|
748 | |||
749 |
|
749 | |||
750 | Test list of internal help commands |
|
750 | Test list of internal help commands | |
751 |
|
751 | |||
752 | $ hg help debug |
|
752 | $ hg help debug | |
753 | debug commands (internal and unsupported): |
|
753 | debug commands (internal and unsupported): | |
754 |
|
754 | |||
755 | debugancestor |
|
755 | debugancestor | |
756 | find the ancestor revision of two revisions in a given index |
|
756 | find the ancestor revision of two revisions in a given index | |
757 | debugbuilddag |
|
757 | debugbuilddag | |
758 | builds a repo with a given DAG from scratch in the current |
|
758 | builds a repo with a given DAG from scratch in the current | |
759 | empty repo |
|
759 | empty repo | |
760 | debugbundle lists the contents of a bundle |
|
760 | debugbundle lists the contents of a bundle | |
761 | debugcheckstate |
|
761 | debugcheckstate | |
762 | validate the correctness of the current dirstate |
|
762 | validate the correctness of the current dirstate | |
763 | debugcommands |
|
763 | debugcommands | |
764 | list all available commands and options |
|
764 | list all available commands and options | |
765 | debugcomplete |
|
765 | debugcomplete | |
766 | returns the completion list associated with the given command |
|
766 | returns the completion list associated with the given command | |
767 | debugdag format the changelog or an index DAG as a concise textual |
|
767 | debugdag format the changelog or an index DAG as a concise textual | |
768 | description |
|
768 | description | |
769 | debugdata dump the contents of a data file revision |
|
769 | debugdata dump the contents of a data file revision | |
770 | debugdate parse and display a date |
|
770 | debugdate parse and display a date | |
771 | debugdirstate |
|
771 | debugdirstate | |
772 | show the contents of the current dirstate |
|
772 | show the contents of the current dirstate | |
773 | debugdiscovery |
|
773 | debugdiscovery | |
774 | runs the changeset discovery protocol in isolation |
|
774 | runs the changeset discovery protocol in isolation | |
775 | debugfileset parse and apply a fileset specification |
|
775 | debugfileset parse and apply a fileset specification | |
776 | debugfsinfo show information detected about current filesystem |
|
776 | debugfsinfo show information detected about current filesystem | |
777 | debuggetbundle |
|
777 | debuggetbundle | |
778 | retrieves a bundle from a repo |
|
778 | retrieves a bundle from a repo | |
779 | debugignore display the combined ignore pattern |
|
779 | debugignore display the combined ignore pattern | |
780 | debugindex dump the contents of an index file |
|
780 | debugindex dump the contents of an index file | |
781 | debugindexdot |
|
781 | debugindexdot | |
782 | dump an index DAG as a graphviz dot file |
|
782 | dump an index DAG as a graphviz dot file | |
783 | debuginstall test Mercurial installation |
|
783 | debuginstall test Mercurial installation | |
784 | debugknown test whether node ids are known to a repo |
|
784 | debugknown test whether node ids are known to a repo | |
785 | debuglabelcomplete |
|
785 | debuglabelcomplete | |
786 | complete "labels" - tags, open branch names, bookmark names |
|
786 | complete "labels" - tags, open branch names, bookmark names | |
787 | debugobsolete |
|
787 | debugobsolete | |
788 | create arbitrary obsolete marker |
|
788 | create arbitrary obsolete marker | |
789 | debugoptDEP (no help text available) |
|
789 | debugoptDEP (no help text available) | |
790 | debugpathcomplete |
|
790 | debugpathcomplete | |
791 | complete part or all of a tracked path |
|
791 | complete part or all of a tracked path | |
792 | debugpushkey access the pushkey key/value protocol |
|
792 | debugpushkey access the pushkey key/value protocol | |
793 | debugpvec (no help text available) |
|
793 | debugpvec (no help text available) | |
794 | debugrebuilddirstate |
|
794 | debugrebuilddirstate | |
795 | rebuild the dirstate as it would look like for the given |
|
795 | rebuild the dirstate as it would look like for the given | |
796 | revision |
|
796 | revision | |
797 | debugrename dump rename information |
|
797 | debugrename dump rename information | |
798 | debugrevlog show data and statistics about a revlog |
|
798 | debugrevlog show data and statistics about a revlog | |
799 | debugrevspec parse and apply a revision specification |
|
799 | debugrevspec parse and apply a revision specification | |
800 | debugsetparents |
|
800 | debugsetparents | |
801 | manually set the parents of the current working directory |
|
801 | manually set the parents of the current working directory | |
802 | debugsub (no help text available) |
|
802 | debugsub (no help text available) | |
803 | debugsuccessorssets |
|
803 | debugsuccessorssets | |
804 | show set of successors for revision |
|
804 | show set of successors for revision | |
805 | debugwalk show how files match on given patterns |
|
805 | debugwalk show how files match on given patterns | |
806 | debugwireargs |
|
806 | debugwireargs | |
807 | (no help text available) |
|
807 | (no help text available) | |
808 |
|
808 | |||
809 |
use "hg |
|
809 | (use "hg help -v debug" to show built-in aliases and global options) | |
810 |
|
810 | |||
811 |
|
811 | |||
812 | Test list of commands with command with no help text |
|
812 | Test list of commands with command with no help text | |
813 |
|
813 | |||
814 | $ hg help helpext |
|
814 | $ hg help helpext | |
815 | helpext extension - no help text available |
|
815 | helpext extension - no help text available | |
816 |
|
816 | |||
817 | list of commands: |
|
817 | list of commands: | |
818 |
|
818 | |||
819 | nohelp (no help text available) |
|
819 | nohelp (no help text available) | |
820 |
|
820 | |||
821 |
use "hg |
|
821 | (use "hg help -v helpext" to show built-in aliases and global options) | |
822 |
|
822 | |||
823 |
|
823 | |||
824 | test deprecated option is hidden in command help |
|
824 | test deprecated option is hidden in command help | |
825 | $ hg help debugoptDEP |
|
825 | $ hg help debugoptDEP | |
826 | hg debugoptDEP |
|
826 | hg debugoptDEP | |
827 |
|
827 | |||
828 | (no help text available) |
|
828 | (no help text available) | |
829 |
|
829 | |||
830 | options: |
|
830 | options: | |
831 |
|
831 | |||
832 | (some details hidden, use --verbose to show complete help) |
|
832 | (some details hidden, use --verbose to show complete help) | |
833 |
|
833 | |||
834 | test deprecated option is shown with -v |
|
834 | test deprecated option is shown with -v | |
835 | $ hg help -v debugoptDEP | grep dopt |
|
835 | $ hg help -v debugoptDEP | grep dopt | |
836 | --dopt option is DEPRECATED |
|
836 | --dopt option is DEPRECATED | |
837 |
|
837 | |||
838 | #if gettext |
|
838 | #if gettext | |
839 | test deprecated option is hidden with translation with untranslated description |
|
839 | test deprecated option is hidden with translation with untranslated description | |
840 | (use many globy for not failing on changed transaction) |
|
840 | (use many globy for not failing on changed transaction) | |
841 | $ LANGUAGE=sv hg help debugoptDEP |
|
841 | $ LANGUAGE=sv hg help debugoptDEP | |
842 | hg debugoptDEP |
|
842 | hg debugoptDEP | |
843 |
|
843 | |||
844 | (*) (glob) |
|
844 | (*) (glob) | |
845 |
|
845 | |||
846 | options: |
|
846 | options: | |
847 |
|
847 | |||
848 | (some details hidden, use --verbose to show complete help) |
|
848 | (some details hidden, use --verbose to show complete help) | |
849 | #endif |
|
849 | #endif | |
850 |
|
850 | |||
851 | Test commands that collide with topics (issue4240) |
|
851 | Test commands that collide with topics (issue4240) | |
852 |
|
852 | |||
853 | $ hg config -hq |
|
853 | $ hg config -hq | |
854 | hg config [-u] [NAME]... |
|
854 | hg config [-u] [NAME]... | |
855 |
|
855 | |||
856 | show combined config settings from all hgrc files |
|
856 | show combined config settings from all hgrc files | |
857 | $ hg showconfig -hq |
|
857 | $ hg showconfig -hq | |
858 | hg config [-u] [NAME]... |
|
858 | hg config [-u] [NAME]... | |
859 |
|
859 | |||
860 | show combined config settings from all hgrc files |
|
860 | show combined config settings from all hgrc files | |
861 |
|
861 | |||
862 | Test a help topic |
|
862 | Test a help topic | |
863 |
|
863 | |||
864 | $ hg help revs |
|
864 | $ hg help revs | |
865 | Specifying Single Revisions |
|
865 | Specifying Single Revisions | |
866 | """"""""""""""""""""""""""" |
|
866 | """"""""""""""""""""""""""" | |
867 |
|
867 | |||
868 | Mercurial supports several ways to specify individual revisions. |
|
868 | Mercurial supports several ways to specify individual revisions. | |
869 |
|
869 | |||
870 | A plain integer is treated as a revision number. Negative integers are |
|
870 | A plain integer is treated as a revision number. Negative integers are | |
871 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 |
|
871 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 | |
872 | denoting the revision prior to the tip, and so forth. |
|
872 | denoting the revision prior to the tip, and so forth. | |
873 |
|
873 | |||
874 | A 40-digit hexadecimal string is treated as a unique revision identifier. |
|
874 | A 40-digit hexadecimal string is treated as a unique revision identifier. | |
875 |
|
875 | |||
876 | A hexadecimal string less than 40 characters long is treated as a unique |
|
876 | A hexadecimal string less than 40 characters long is treated as a unique | |
877 | revision identifier and is referred to as a short-form identifier. A |
|
877 | revision identifier and is referred to as a short-form identifier. A | |
878 | short-form identifier is only valid if it is the prefix of exactly one |
|
878 | short-form identifier is only valid if it is the prefix of exactly one | |
879 | full-length identifier. |
|
879 | full-length identifier. | |
880 |
|
880 | |||
881 | Any other string is treated as a bookmark, tag, or branch name. A bookmark |
|
881 | Any other string is treated as a bookmark, tag, or branch name. A bookmark | |
882 | is a movable pointer to a revision. A tag is a permanent name associated |
|
882 | is a movable pointer to a revision. A tag is a permanent name associated | |
883 | with a revision. A branch name denotes the tipmost open branch head of |
|
883 | with a revision. A branch name denotes the tipmost open branch head of | |
884 | that branch - or if they are all closed, the tipmost closed head of the |
|
884 | that branch - or if they are all closed, the tipmost closed head of the | |
885 | branch. Bookmark, tag, and branch names must not contain the ":" |
|
885 | branch. Bookmark, tag, and branch names must not contain the ":" | |
886 | character. |
|
886 | character. | |
887 |
|
887 | |||
888 | The reserved name "tip" always identifies the most recent revision. |
|
888 | The reserved name "tip" always identifies the most recent revision. | |
889 |
|
889 | |||
890 | The reserved name "null" indicates the null revision. This is the revision |
|
890 | The reserved name "null" indicates the null revision. This is the revision | |
891 | of an empty repository, and the parent of revision 0. |
|
891 | of an empty repository, and the parent of revision 0. | |
892 |
|
892 | |||
893 | The reserved name "." indicates the working directory parent. If no |
|
893 | The reserved name "." indicates the working directory parent. If no | |
894 | working directory is checked out, it is equivalent to null. If an |
|
894 | working directory is checked out, it is equivalent to null. If an | |
895 | uncommitted merge is in progress, "." is the revision of the first parent. |
|
895 | uncommitted merge is in progress, "." is the revision of the first parent. | |
896 |
|
896 | |||
897 | Test templating help |
|
897 | Test templating help | |
898 |
|
898 | |||
899 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
899 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
900 | desc String. The text of the changeset description. |
|
900 | desc String. The text of the changeset description. | |
901 | diffstat String. Statistics of changes with the following format: |
|
901 | diffstat String. Statistics of changes with the following format: | |
902 | firstline Any text. Returns the first line of text. |
|
902 | firstline Any text. Returns the first line of text. | |
903 | nonempty Any text. Returns '(none)' if the string is empty. |
|
903 | nonempty Any text. Returns '(none)' if the string is empty. | |
904 |
|
904 | |||
905 | Test help hooks |
|
905 | Test help hooks | |
906 |
|
906 | |||
907 | $ cat > helphook1.py <<EOF |
|
907 | $ cat > helphook1.py <<EOF | |
908 | > from mercurial import help |
|
908 | > from mercurial import help | |
909 | > |
|
909 | > | |
910 | > def rewrite(topic, doc): |
|
910 | > def rewrite(topic, doc): | |
911 | > return doc + '\nhelphook1\n' |
|
911 | > return doc + '\nhelphook1\n' | |
912 | > |
|
912 | > | |
913 | > def extsetup(ui): |
|
913 | > def extsetup(ui): | |
914 | > help.addtopichook('revsets', rewrite) |
|
914 | > help.addtopichook('revsets', rewrite) | |
915 | > EOF |
|
915 | > EOF | |
916 | $ cat > helphook2.py <<EOF |
|
916 | $ cat > helphook2.py <<EOF | |
917 | > from mercurial import help |
|
917 | > from mercurial import help | |
918 | > |
|
918 | > | |
919 | > def rewrite(topic, doc): |
|
919 | > def rewrite(topic, doc): | |
920 | > return doc + '\nhelphook2\n' |
|
920 | > return doc + '\nhelphook2\n' | |
921 | > |
|
921 | > | |
922 | > def extsetup(ui): |
|
922 | > def extsetup(ui): | |
923 | > help.addtopichook('revsets', rewrite) |
|
923 | > help.addtopichook('revsets', rewrite) | |
924 | > EOF |
|
924 | > EOF | |
925 | $ echo '[extensions]' >> $HGRCPATH |
|
925 | $ echo '[extensions]' >> $HGRCPATH | |
926 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
926 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
927 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
927 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
928 | $ hg help revsets | grep helphook |
|
928 | $ hg help revsets | grep helphook | |
929 | helphook1 |
|
929 | helphook1 | |
930 | helphook2 |
|
930 | helphook2 | |
931 |
|
931 | |||
932 | Test keyword search help |
|
932 | Test keyword search help | |
933 |
|
933 | |||
934 | $ cat > prefixedname.py <<EOF |
|
934 | $ cat > prefixedname.py <<EOF | |
935 | > '''matched against word "clone" |
|
935 | > '''matched against word "clone" | |
936 | > ''' |
|
936 | > ''' | |
937 | > EOF |
|
937 | > EOF | |
938 | $ echo '[extensions]' >> $HGRCPATH |
|
938 | $ echo '[extensions]' >> $HGRCPATH | |
939 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
939 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH | |
940 | $ hg help -k clone |
|
940 | $ hg help -k clone | |
941 | Topics: |
|
941 | Topics: | |
942 |
|
942 | |||
943 | config Configuration Files |
|
943 | config Configuration Files | |
944 | extensions Using Additional Features |
|
944 | extensions Using Additional Features | |
945 | glossary Glossary |
|
945 | glossary Glossary | |
946 | phases Working with Phases |
|
946 | phases Working with Phases | |
947 | subrepos Subrepositories |
|
947 | subrepos Subrepositories | |
948 | urls URL Paths |
|
948 | urls URL Paths | |
949 |
|
949 | |||
950 | Commands: |
|
950 | Commands: | |
951 |
|
951 | |||
952 | bookmarks create a new bookmark or list existing bookmarks |
|
952 | bookmarks create a new bookmark or list existing bookmarks | |
953 | clone make a copy of an existing repository |
|
953 | clone make a copy of an existing repository | |
954 | paths show aliases for remote repositories |
|
954 | paths show aliases for remote repositories | |
955 | update update working directory (or switch revisions) |
|
955 | update update working directory (or switch revisions) | |
956 |
|
956 | |||
957 | Extensions: |
|
957 | Extensions: | |
958 |
|
958 | |||
959 | prefixedname matched against word "clone" |
|
959 | prefixedname matched against word "clone" | |
960 | relink recreates hardlinks between repository clones |
|
960 | relink recreates hardlinks between repository clones | |
961 |
|
961 | |||
962 | Extension Commands: |
|
962 | Extension Commands: | |
963 |
|
963 | |||
964 | qclone clone main and patch repository at same time |
|
964 | qclone clone main and patch repository at same time | |
965 |
|
965 | |||
966 | Test unfound topic |
|
966 | Test unfound topic | |
967 |
|
967 | |||
968 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
968 | $ hg help nonexistingtopicthatwillneverexisteverever | |
969 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
969 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever | |
970 | (try "hg help --keyword nonexistingtopicthatwillneverexisteverever") |
|
970 | (try "hg help --keyword nonexistingtopicthatwillneverexisteverever") | |
971 | [255] |
|
971 | [255] | |
972 |
|
972 | |||
973 | Test unfound keyword |
|
973 | Test unfound keyword | |
974 |
|
974 | |||
975 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
975 | $ hg help --keyword nonexistingwordthatwillneverexisteverever | |
976 | abort: no matches |
|
976 | abort: no matches | |
977 | (try "hg help" for a list of topics) |
|
977 | (try "hg help" for a list of topics) | |
978 | [255] |
|
978 | [255] | |
979 |
|
979 | |||
980 | Test omit indicating for help |
|
980 | Test omit indicating for help | |
981 |
|
981 | |||
982 | $ cat > addverboseitems.py <<EOF |
|
982 | $ cat > addverboseitems.py <<EOF | |
983 | > '''extension to test omit indicating. |
|
983 | > '''extension to test omit indicating. | |
984 | > |
|
984 | > | |
985 | > This paragraph is never omitted (for extension) |
|
985 | > This paragraph is never omitted (for extension) | |
986 | > |
|
986 | > | |
987 | > .. container:: verbose |
|
987 | > .. container:: verbose | |
988 | > |
|
988 | > | |
989 | > This paragraph is omitted, |
|
989 | > This paragraph is omitted, | |
990 | > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension) |
|
990 | > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension) | |
991 | > |
|
991 | > | |
992 | > This paragraph is never omitted, too (for extension) |
|
992 | > This paragraph is never omitted, too (for extension) | |
993 | > ''' |
|
993 | > ''' | |
994 | > |
|
994 | > | |
995 | > from mercurial import help, commands |
|
995 | > from mercurial import help, commands | |
996 | > testtopic = """This paragraph is never omitted (for topic). |
|
996 | > testtopic = """This paragraph is never omitted (for topic). | |
997 | > |
|
997 | > | |
998 | > .. container:: verbose |
|
998 | > .. container:: verbose | |
999 | > |
|
999 | > | |
1000 | > This paragraph is omitted, |
|
1000 | > This paragraph is omitted, | |
1001 | > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic) |
|
1001 | > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic) | |
1002 | > |
|
1002 | > | |
1003 | > This paragraph is never omitted, too (for topic) |
|
1003 | > This paragraph is never omitted, too (for topic) | |
1004 | > """ |
|
1004 | > """ | |
1005 | > def extsetup(ui): |
|
1005 | > def extsetup(ui): | |
1006 | > help.helptable.append((["topic-containing-verbose"], |
|
1006 | > help.helptable.append((["topic-containing-verbose"], | |
1007 | > "This is the topic to test omit indicating.", |
|
1007 | > "This is the topic to test omit indicating.", | |
1008 | > lambda : testtopic)) |
|
1008 | > lambda : testtopic)) | |
1009 | > EOF |
|
1009 | > EOF | |
1010 | $ echo '[extensions]' >> $HGRCPATH |
|
1010 | $ echo '[extensions]' >> $HGRCPATH | |
1011 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1011 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | |
1012 | $ hg help addverboseitems |
|
1012 | $ hg help addverboseitems | |
1013 | addverboseitems extension - extension to test omit indicating. |
|
1013 | addverboseitems extension - extension to test omit indicating. | |
1014 |
|
1014 | |||
1015 | This paragraph is never omitted (for extension) |
|
1015 | This paragraph is never omitted (for extension) | |
1016 |
|
1016 | |||
1017 | This paragraph is never omitted, too (for extension) |
|
1017 | This paragraph is never omitted, too (for extension) | |
1018 |
|
1018 | |||
1019 | (some details hidden, use --verbose to show complete help) |
|
1019 | (some details hidden, use --verbose to show complete help) | |
1020 |
|
1020 | |||
1021 | no commands defined |
|
1021 | no commands defined | |
1022 | $ hg help -v addverboseitems |
|
1022 | $ hg help -v addverboseitems | |
1023 | addverboseitems extension - extension to test omit indicating. |
|
1023 | addverboseitems extension - extension to test omit indicating. | |
1024 |
|
1024 | |||
1025 | This paragraph is never omitted (for extension) |
|
1025 | This paragraph is never omitted (for extension) | |
1026 |
|
1026 | |||
1027 | This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension) |
|
1027 | This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension) | |
1028 |
|
1028 | |||
1029 | This paragraph is never omitted, too (for extension) |
|
1029 | This paragraph is never omitted, too (for extension) | |
1030 |
|
1030 | |||
1031 | no commands defined |
|
1031 | no commands defined | |
1032 | $ hg help topic-containing-verbose |
|
1032 | $ hg help topic-containing-verbose | |
1033 | This is the topic to test omit indicating. |
|
1033 | This is the topic to test omit indicating. | |
1034 | """""""""""""""""""""""""""""""""""""""""" |
|
1034 | """""""""""""""""""""""""""""""""""""""""" | |
1035 |
|
1035 | |||
1036 | This paragraph is never omitted (for topic). |
|
1036 | This paragraph is never omitted (for topic). | |
1037 |
|
1037 | |||
1038 | This paragraph is never omitted, too (for topic) |
|
1038 | This paragraph is never omitted, too (for topic) | |
1039 |
|
1039 | |||
1040 | (some details hidden, use --verbose to show complete help) |
|
1040 | (some details hidden, use --verbose to show complete help) | |
1041 | $ hg help -v topic-containing-verbose |
|
1041 | $ hg help -v topic-containing-verbose | |
1042 | This is the topic to test omit indicating. |
|
1042 | This is the topic to test omit indicating. | |
1043 | """""""""""""""""""""""""""""""""""""""""" |
|
1043 | """""""""""""""""""""""""""""""""""""""""" | |
1044 |
|
1044 | |||
1045 | This paragraph is never omitted (for topic). |
|
1045 | This paragraph is never omitted (for topic). | |
1046 |
|
1046 | |||
1047 | This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic) |
|
1047 | This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic) | |
1048 |
|
1048 | |||
1049 | This paragraph is never omitted, too (for topic) |
|
1049 | This paragraph is never omitted, too (for topic) | |
1050 |
|
1050 | |||
1051 | Test usage of section marks in help documents |
|
1051 | Test usage of section marks in help documents | |
1052 |
|
1052 | |||
1053 | $ cd "$TESTDIR"/../doc |
|
1053 | $ cd "$TESTDIR"/../doc | |
1054 | $ python check-seclevel.py |
|
1054 | $ python check-seclevel.py | |
1055 | $ cd $TESTTMP |
|
1055 | $ cd $TESTTMP | |
1056 |
|
1056 | |||
1057 | #if serve |
|
1057 | #if serve | |
1058 |
|
1058 | |||
1059 | Test the help pages in hgweb. |
|
1059 | Test the help pages in hgweb. | |
1060 |
|
1060 | |||
1061 | Dish up an empty repo; serve it cold. |
|
1061 | Dish up an empty repo; serve it cold. | |
1062 |
|
1062 | |||
1063 | $ hg init "$TESTTMP/test" |
|
1063 | $ hg init "$TESTTMP/test" | |
1064 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
1064 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid | |
1065 | $ cat hg.pid >> $DAEMON_PIDS |
|
1065 | $ cat hg.pid >> $DAEMON_PIDS | |
1066 |
|
1066 | |||
1067 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help" |
|
1067 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help" | |
1068 | 200 Script output follows |
|
1068 | 200 Script output follows | |
1069 |
|
1069 | |||
1070 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1070 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
1071 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1071 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
1072 | <head> |
|
1072 | <head> | |
1073 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1073 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
1074 | <meta name="robots" content="index, nofollow" /> |
|
1074 | <meta name="robots" content="index, nofollow" /> | |
1075 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1075 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
1076 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1076 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
1077 |
|
1077 | |||
1078 | <title>Help: Index</title> |
|
1078 | <title>Help: Index</title> | |
1079 | </head> |
|
1079 | </head> | |
1080 | <body> |
|
1080 | <body> | |
1081 |
|
1081 | |||
1082 | <div class="container"> |
|
1082 | <div class="container"> | |
1083 | <div class="menu"> |
|
1083 | <div class="menu"> | |
1084 | <div class="logo"> |
|
1084 | <div class="logo"> | |
1085 | <a href="http://mercurial.selenic.com/"> |
|
1085 | <a href="http://mercurial.selenic.com/"> | |
1086 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1086 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
1087 | </div> |
|
1087 | </div> | |
1088 | <ul> |
|
1088 | <ul> | |
1089 | <li><a href="/shortlog">log</a></li> |
|
1089 | <li><a href="/shortlog">log</a></li> | |
1090 | <li><a href="/graph">graph</a></li> |
|
1090 | <li><a href="/graph">graph</a></li> | |
1091 | <li><a href="/tags">tags</a></li> |
|
1091 | <li><a href="/tags">tags</a></li> | |
1092 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1092 | <li><a href="/bookmarks">bookmarks</a></li> | |
1093 | <li><a href="/branches">branches</a></li> |
|
1093 | <li><a href="/branches">branches</a></li> | |
1094 | </ul> |
|
1094 | </ul> | |
1095 | <ul> |
|
1095 | <ul> | |
1096 | <li class="active">help</li> |
|
1096 | <li class="active">help</li> | |
1097 | </ul> |
|
1097 | </ul> | |
1098 | </div> |
|
1098 | </div> | |
1099 |
|
1099 | |||
1100 | <div class="main"> |
|
1100 | <div class="main"> | |
1101 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1101 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
1102 | <form class="search" action="/log"> |
|
1102 | <form class="search" action="/log"> | |
1103 |
|
1103 | |||
1104 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
1104 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
1105 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
1105 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
1106 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
1106 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
1107 | </form> |
|
1107 | </form> | |
1108 | <table class="bigtable"> |
|
1108 | <table class="bigtable"> | |
1109 | <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr> |
|
1109 | <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr> | |
1110 |
|
1110 | |||
1111 | <tr><td> |
|
1111 | <tr><td> | |
1112 | <a href="/help/config"> |
|
1112 | <a href="/help/config"> | |
1113 | config |
|
1113 | config | |
1114 | </a> |
|
1114 | </a> | |
1115 | </td><td> |
|
1115 | </td><td> | |
1116 | Configuration Files |
|
1116 | Configuration Files | |
1117 | </td></tr> |
|
1117 | </td></tr> | |
1118 | <tr><td> |
|
1118 | <tr><td> | |
1119 | <a href="/help/dates"> |
|
1119 | <a href="/help/dates"> | |
1120 | dates |
|
1120 | dates | |
1121 | </a> |
|
1121 | </a> | |
1122 | </td><td> |
|
1122 | </td><td> | |
1123 | Date Formats |
|
1123 | Date Formats | |
1124 | </td></tr> |
|
1124 | </td></tr> | |
1125 | <tr><td> |
|
1125 | <tr><td> | |
1126 | <a href="/help/diffs"> |
|
1126 | <a href="/help/diffs"> | |
1127 | diffs |
|
1127 | diffs | |
1128 | </a> |
|
1128 | </a> | |
1129 | </td><td> |
|
1129 | </td><td> | |
1130 | Diff Formats |
|
1130 | Diff Formats | |
1131 | </td></tr> |
|
1131 | </td></tr> | |
1132 | <tr><td> |
|
1132 | <tr><td> | |
1133 | <a href="/help/environment"> |
|
1133 | <a href="/help/environment"> | |
1134 | environment |
|
1134 | environment | |
1135 | </a> |
|
1135 | </a> | |
1136 | </td><td> |
|
1136 | </td><td> | |
1137 | Environment Variables |
|
1137 | Environment Variables | |
1138 | </td></tr> |
|
1138 | </td></tr> | |
1139 | <tr><td> |
|
1139 | <tr><td> | |
1140 | <a href="/help/extensions"> |
|
1140 | <a href="/help/extensions"> | |
1141 | extensions |
|
1141 | extensions | |
1142 | </a> |
|
1142 | </a> | |
1143 | </td><td> |
|
1143 | </td><td> | |
1144 | Using Additional Features |
|
1144 | Using Additional Features | |
1145 | </td></tr> |
|
1145 | </td></tr> | |
1146 | <tr><td> |
|
1146 | <tr><td> | |
1147 | <a href="/help/filesets"> |
|
1147 | <a href="/help/filesets"> | |
1148 | filesets |
|
1148 | filesets | |
1149 | </a> |
|
1149 | </a> | |
1150 | </td><td> |
|
1150 | </td><td> | |
1151 | Specifying File Sets |
|
1151 | Specifying File Sets | |
1152 | </td></tr> |
|
1152 | </td></tr> | |
1153 | <tr><td> |
|
1153 | <tr><td> | |
1154 | <a href="/help/glossary"> |
|
1154 | <a href="/help/glossary"> | |
1155 | glossary |
|
1155 | glossary | |
1156 | </a> |
|
1156 | </a> | |
1157 | </td><td> |
|
1157 | </td><td> | |
1158 | Glossary |
|
1158 | Glossary | |
1159 | </td></tr> |
|
1159 | </td></tr> | |
1160 | <tr><td> |
|
1160 | <tr><td> | |
1161 | <a href="/help/hgignore"> |
|
1161 | <a href="/help/hgignore"> | |
1162 | hgignore |
|
1162 | hgignore | |
1163 | </a> |
|
1163 | </a> | |
1164 | </td><td> |
|
1164 | </td><td> | |
1165 | Syntax for Mercurial Ignore Files |
|
1165 | Syntax for Mercurial Ignore Files | |
1166 | </td></tr> |
|
1166 | </td></tr> | |
1167 | <tr><td> |
|
1167 | <tr><td> | |
1168 | <a href="/help/hgweb"> |
|
1168 | <a href="/help/hgweb"> | |
1169 | hgweb |
|
1169 | hgweb | |
1170 | </a> |
|
1170 | </a> | |
1171 | </td><td> |
|
1171 | </td><td> | |
1172 | Configuring hgweb |
|
1172 | Configuring hgweb | |
1173 | </td></tr> |
|
1173 | </td></tr> | |
1174 | <tr><td> |
|
1174 | <tr><td> | |
1175 | <a href="/help/merge-tools"> |
|
1175 | <a href="/help/merge-tools"> | |
1176 | merge-tools |
|
1176 | merge-tools | |
1177 | </a> |
|
1177 | </a> | |
1178 | </td><td> |
|
1178 | </td><td> | |
1179 | Merge Tools |
|
1179 | Merge Tools | |
1180 | </td></tr> |
|
1180 | </td></tr> | |
1181 | <tr><td> |
|
1181 | <tr><td> | |
1182 | <a href="/help/multirevs"> |
|
1182 | <a href="/help/multirevs"> | |
1183 | multirevs |
|
1183 | multirevs | |
1184 | </a> |
|
1184 | </a> | |
1185 | </td><td> |
|
1185 | </td><td> | |
1186 | Specifying Multiple Revisions |
|
1186 | Specifying Multiple Revisions | |
1187 | </td></tr> |
|
1187 | </td></tr> | |
1188 | <tr><td> |
|
1188 | <tr><td> | |
1189 | <a href="/help/patterns"> |
|
1189 | <a href="/help/patterns"> | |
1190 | patterns |
|
1190 | patterns | |
1191 | </a> |
|
1191 | </a> | |
1192 | </td><td> |
|
1192 | </td><td> | |
1193 | File Name Patterns |
|
1193 | File Name Patterns | |
1194 | </td></tr> |
|
1194 | </td></tr> | |
1195 | <tr><td> |
|
1195 | <tr><td> | |
1196 | <a href="/help/phases"> |
|
1196 | <a href="/help/phases"> | |
1197 | phases |
|
1197 | phases | |
1198 | </a> |
|
1198 | </a> | |
1199 | </td><td> |
|
1199 | </td><td> | |
1200 | Working with Phases |
|
1200 | Working with Phases | |
1201 | </td></tr> |
|
1201 | </td></tr> | |
1202 | <tr><td> |
|
1202 | <tr><td> | |
1203 | <a href="/help/revisions"> |
|
1203 | <a href="/help/revisions"> | |
1204 | revisions |
|
1204 | revisions | |
1205 | </a> |
|
1205 | </a> | |
1206 | </td><td> |
|
1206 | </td><td> | |
1207 | Specifying Single Revisions |
|
1207 | Specifying Single Revisions | |
1208 | </td></tr> |
|
1208 | </td></tr> | |
1209 | <tr><td> |
|
1209 | <tr><td> | |
1210 | <a href="/help/revsets"> |
|
1210 | <a href="/help/revsets"> | |
1211 | revsets |
|
1211 | revsets | |
1212 | </a> |
|
1212 | </a> | |
1213 | </td><td> |
|
1213 | </td><td> | |
1214 | Specifying Revision Sets |
|
1214 | Specifying Revision Sets | |
1215 | </td></tr> |
|
1215 | </td></tr> | |
1216 | <tr><td> |
|
1216 | <tr><td> | |
1217 | <a href="/help/subrepos"> |
|
1217 | <a href="/help/subrepos"> | |
1218 | subrepos |
|
1218 | subrepos | |
1219 | </a> |
|
1219 | </a> | |
1220 | </td><td> |
|
1220 | </td><td> | |
1221 | Subrepositories |
|
1221 | Subrepositories | |
1222 | </td></tr> |
|
1222 | </td></tr> | |
1223 | <tr><td> |
|
1223 | <tr><td> | |
1224 | <a href="/help/templating"> |
|
1224 | <a href="/help/templating"> | |
1225 | templating |
|
1225 | templating | |
1226 | </a> |
|
1226 | </a> | |
1227 | </td><td> |
|
1227 | </td><td> | |
1228 | Template Usage |
|
1228 | Template Usage | |
1229 | </td></tr> |
|
1229 | </td></tr> | |
1230 | <tr><td> |
|
1230 | <tr><td> | |
1231 | <a href="/help/urls"> |
|
1231 | <a href="/help/urls"> | |
1232 | urls |
|
1232 | urls | |
1233 | </a> |
|
1233 | </a> | |
1234 | </td><td> |
|
1234 | </td><td> | |
1235 | URL Paths |
|
1235 | URL Paths | |
1236 | </td></tr> |
|
1236 | </td></tr> | |
1237 | <tr><td> |
|
1237 | <tr><td> | |
1238 | <a href="/help/topic-containing-verbose"> |
|
1238 | <a href="/help/topic-containing-verbose"> | |
1239 | topic-containing-verbose |
|
1239 | topic-containing-verbose | |
1240 | </a> |
|
1240 | </a> | |
1241 | </td><td> |
|
1241 | </td><td> | |
1242 | This is the topic to test omit indicating. |
|
1242 | This is the topic to test omit indicating. | |
1243 | </td></tr> |
|
1243 | </td></tr> | |
1244 |
|
1244 | |||
1245 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
1245 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> | |
1246 |
|
1246 | |||
1247 | <tr><td> |
|
1247 | <tr><td> | |
1248 | <a href="/help/add"> |
|
1248 | <a href="/help/add"> | |
1249 | add |
|
1249 | add | |
1250 | </a> |
|
1250 | </a> | |
1251 | </td><td> |
|
1251 | </td><td> | |
1252 | add the specified files on the next commit |
|
1252 | add the specified files on the next commit | |
1253 | </td></tr> |
|
1253 | </td></tr> | |
1254 | <tr><td> |
|
1254 | <tr><td> | |
1255 | <a href="/help/annotate"> |
|
1255 | <a href="/help/annotate"> | |
1256 | annotate |
|
1256 | annotate | |
1257 | </a> |
|
1257 | </a> | |
1258 | </td><td> |
|
1258 | </td><td> | |
1259 | show changeset information by line for each file |
|
1259 | show changeset information by line for each file | |
1260 | </td></tr> |
|
1260 | </td></tr> | |
1261 | <tr><td> |
|
1261 | <tr><td> | |
1262 | <a href="/help/clone"> |
|
1262 | <a href="/help/clone"> | |
1263 | clone |
|
1263 | clone | |
1264 | </a> |
|
1264 | </a> | |
1265 | </td><td> |
|
1265 | </td><td> | |
1266 | make a copy of an existing repository |
|
1266 | make a copy of an existing repository | |
1267 | </td></tr> |
|
1267 | </td></tr> | |
1268 | <tr><td> |
|
1268 | <tr><td> | |
1269 | <a href="/help/commit"> |
|
1269 | <a href="/help/commit"> | |
1270 | commit |
|
1270 | commit | |
1271 | </a> |
|
1271 | </a> | |
1272 | </td><td> |
|
1272 | </td><td> | |
1273 | commit the specified files or all outstanding changes |
|
1273 | commit the specified files or all outstanding changes | |
1274 | </td></tr> |
|
1274 | </td></tr> | |
1275 | <tr><td> |
|
1275 | <tr><td> | |
1276 | <a href="/help/diff"> |
|
1276 | <a href="/help/diff"> | |
1277 | diff |
|
1277 | diff | |
1278 | </a> |
|
1278 | </a> | |
1279 | </td><td> |
|
1279 | </td><td> | |
1280 | diff repository (or selected files) |
|
1280 | diff repository (or selected files) | |
1281 | </td></tr> |
|
1281 | </td></tr> | |
1282 | <tr><td> |
|
1282 | <tr><td> | |
1283 | <a href="/help/export"> |
|
1283 | <a href="/help/export"> | |
1284 | export |
|
1284 | export | |
1285 | </a> |
|
1285 | </a> | |
1286 | </td><td> |
|
1286 | </td><td> | |
1287 | dump the header and diffs for one or more changesets |
|
1287 | dump the header and diffs for one or more changesets | |
1288 | </td></tr> |
|
1288 | </td></tr> | |
1289 | <tr><td> |
|
1289 | <tr><td> | |
1290 | <a href="/help/forget"> |
|
1290 | <a href="/help/forget"> | |
1291 | forget |
|
1291 | forget | |
1292 | </a> |
|
1292 | </a> | |
1293 | </td><td> |
|
1293 | </td><td> | |
1294 | forget the specified files on the next commit |
|
1294 | forget the specified files on the next commit | |
1295 | </td></tr> |
|
1295 | </td></tr> | |
1296 | <tr><td> |
|
1296 | <tr><td> | |
1297 | <a href="/help/init"> |
|
1297 | <a href="/help/init"> | |
1298 | init |
|
1298 | init | |
1299 | </a> |
|
1299 | </a> | |
1300 | </td><td> |
|
1300 | </td><td> | |
1301 | create a new repository in the given directory |
|
1301 | create a new repository in the given directory | |
1302 | </td></tr> |
|
1302 | </td></tr> | |
1303 | <tr><td> |
|
1303 | <tr><td> | |
1304 | <a href="/help/log"> |
|
1304 | <a href="/help/log"> | |
1305 | log |
|
1305 | log | |
1306 | </a> |
|
1306 | </a> | |
1307 | </td><td> |
|
1307 | </td><td> | |
1308 | show revision history of entire repository or files |
|
1308 | show revision history of entire repository or files | |
1309 | </td></tr> |
|
1309 | </td></tr> | |
1310 | <tr><td> |
|
1310 | <tr><td> | |
1311 | <a href="/help/merge"> |
|
1311 | <a href="/help/merge"> | |
1312 | merge |
|
1312 | merge | |
1313 | </a> |
|
1313 | </a> | |
1314 | </td><td> |
|
1314 | </td><td> | |
1315 | merge working directory with another revision |
|
1315 | merge working directory with another revision | |
1316 | </td></tr> |
|
1316 | </td></tr> | |
1317 | <tr><td> |
|
1317 | <tr><td> | |
1318 | <a href="/help/pull"> |
|
1318 | <a href="/help/pull"> | |
1319 | pull |
|
1319 | pull | |
1320 | </a> |
|
1320 | </a> | |
1321 | </td><td> |
|
1321 | </td><td> | |
1322 | pull changes from the specified source |
|
1322 | pull changes from the specified source | |
1323 | </td></tr> |
|
1323 | </td></tr> | |
1324 | <tr><td> |
|
1324 | <tr><td> | |
1325 | <a href="/help/push"> |
|
1325 | <a href="/help/push"> | |
1326 | push |
|
1326 | push | |
1327 | </a> |
|
1327 | </a> | |
1328 | </td><td> |
|
1328 | </td><td> | |
1329 | push changes to the specified destination |
|
1329 | push changes to the specified destination | |
1330 | </td></tr> |
|
1330 | </td></tr> | |
1331 | <tr><td> |
|
1331 | <tr><td> | |
1332 | <a href="/help/remove"> |
|
1332 | <a href="/help/remove"> | |
1333 | remove |
|
1333 | remove | |
1334 | </a> |
|
1334 | </a> | |
1335 | </td><td> |
|
1335 | </td><td> | |
1336 | remove the specified files on the next commit |
|
1336 | remove the specified files on the next commit | |
1337 | </td></tr> |
|
1337 | </td></tr> | |
1338 | <tr><td> |
|
1338 | <tr><td> | |
1339 | <a href="/help/serve"> |
|
1339 | <a href="/help/serve"> | |
1340 | serve |
|
1340 | serve | |
1341 | </a> |
|
1341 | </a> | |
1342 | </td><td> |
|
1342 | </td><td> | |
1343 | start stand-alone webserver |
|
1343 | start stand-alone webserver | |
1344 | </td></tr> |
|
1344 | </td></tr> | |
1345 | <tr><td> |
|
1345 | <tr><td> | |
1346 | <a href="/help/status"> |
|
1346 | <a href="/help/status"> | |
1347 | status |
|
1347 | status | |
1348 | </a> |
|
1348 | </a> | |
1349 | </td><td> |
|
1349 | </td><td> | |
1350 | show changed files in the working directory |
|
1350 | show changed files in the working directory | |
1351 | </td></tr> |
|
1351 | </td></tr> | |
1352 | <tr><td> |
|
1352 | <tr><td> | |
1353 | <a href="/help/summary"> |
|
1353 | <a href="/help/summary"> | |
1354 | summary |
|
1354 | summary | |
1355 | </a> |
|
1355 | </a> | |
1356 | </td><td> |
|
1356 | </td><td> | |
1357 | summarize working directory state |
|
1357 | summarize working directory state | |
1358 | </td></tr> |
|
1358 | </td></tr> | |
1359 | <tr><td> |
|
1359 | <tr><td> | |
1360 | <a href="/help/update"> |
|
1360 | <a href="/help/update"> | |
1361 | update |
|
1361 | update | |
1362 | </a> |
|
1362 | </a> | |
1363 | </td><td> |
|
1363 | </td><td> | |
1364 | update working directory (or switch revisions) |
|
1364 | update working directory (or switch revisions) | |
1365 | </td></tr> |
|
1365 | </td></tr> | |
1366 |
|
1366 | |||
1367 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
1367 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> | |
1368 |
|
1368 | |||
1369 | <tr><td> |
|
1369 | <tr><td> | |
1370 | <a href="/help/addremove"> |
|
1370 | <a href="/help/addremove"> | |
1371 | addremove |
|
1371 | addremove | |
1372 | </a> |
|
1372 | </a> | |
1373 | </td><td> |
|
1373 | </td><td> | |
1374 | add all new files, delete all missing files |
|
1374 | add all new files, delete all missing files | |
1375 | </td></tr> |
|
1375 | </td></tr> | |
1376 | <tr><td> |
|
1376 | <tr><td> | |
1377 | <a href="/help/archive"> |
|
1377 | <a href="/help/archive"> | |
1378 | archive |
|
1378 | archive | |
1379 | </a> |
|
1379 | </a> | |
1380 | </td><td> |
|
1380 | </td><td> | |
1381 | create an unversioned archive of a repository revision |
|
1381 | create an unversioned archive of a repository revision | |
1382 | </td></tr> |
|
1382 | </td></tr> | |
1383 | <tr><td> |
|
1383 | <tr><td> | |
1384 | <a href="/help/backout"> |
|
1384 | <a href="/help/backout"> | |
1385 | backout |
|
1385 | backout | |
1386 | </a> |
|
1386 | </a> | |
1387 | </td><td> |
|
1387 | </td><td> | |
1388 | reverse effect of earlier changeset |
|
1388 | reverse effect of earlier changeset | |
1389 | </td></tr> |
|
1389 | </td></tr> | |
1390 | <tr><td> |
|
1390 | <tr><td> | |
1391 | <a href="/help/bisect"> |
|
1391 | <a href="/help/bisect"> | |
1392 | bisect |
|
1392 | bisect | |
1393 | </a> |
|
1393 | </a> | |
1394 | </td><td> |
|
1394 | </td><td> | |
1395 | subdivision search of changesets |
|
1395 | subdivision search of changesets | |
1396 | </td></tr> |
|
1396 | </td></tr> | |
1397 | <tr><td> |
|
1397 | <tr><td> | |
1398 | <a href="/help/bookmarks"> |
|
1398 | <a href="/help/bookmarks"> | |
1399 | bookmarks |
|
1399 | bookmarks | |
1400 | </a> |
|
1400 | </a> | |
1401 | </td><td> |
|
1401 | </td><td> | |
1402 | create a new bookmark or list existing bookmarks |
|
1402 | create a new bookmark or list existing bookmarks | |
1403 | </td></tr> |
|
1403 | </td></tr> | |
1404 | <tr><td> |
|
1404 | <tr><td> | |
1405 | <a href="/help/branch"> |
|
1405 | <a href="/help/branch"> | |
1406 | branch |
|
1406 | branch | |
1407 | </a> |
|
1407 | </a> | |
1408 | </td><td> |
|
1408 | </td><td> | |
1409 | set or show the current branch name |
|
1409 | set or show the current branch name | |
1410 | </td></tr> |
|
1410 | </td></tr> | |
1411 | <tr><td> |
|
1411 | <tr><td> | |
1412 | <a href="/help/branches"> |
|
1412 | <a href="/help/branches"> | |
1413 | branches |
|
1413 | branches | |
1414 | </a> |
|
1414 | </a> | |
1415 | </td><td> |
|
1415 | </td><td> | |
1416 | list repository named branches |
|
1416 | list repository named branches | |
1417 | </td></tr> |
|
1417 | </td></tr> | |
1418 | <tr><td> |
|
1418 | <tr><td> | |
1419 | <a href="/help/bundle"> |
|
1419 | <a href="/help/bundle"> | |
1420 | bundle |
|
1420 | bundle | |
1421 | </a> |
|
1421 | </a> | |
1422 | </td><td> |
|
1422 | </td><td> | |
1423 | create a changegroup file |
|
1423 | create a changegroup file | |
1424 | </td></tr> |
|
1424 | </td></tr> | |
1425 | <tr><td> |
|
1425 | <tr><td> | |
1426 | <a href="/help/cat"> |
|
1426 | <a href="/help/cat"> | |
1427 | cat |
|
1427 | cat | |
1428 | </a> |
|
1428 | </a> | |
1429 | </td><td> |
|
1429 | </td><td> | |
1430 | output the current or given revision of files |
|
1430 | output the current or given revision of files | |
1431 | </td></tr> |
|
1431 | </td></tr> | |
1432 | <tr><td> |
|
1432 | <tr><td> | |
1433 | <a href="/help/config"> |
|
1433 | <a href="/help/config"> | |
1434 | config |
|
1434 | config | |
1435 | </a> |
|
1435 | </a> | |
1436 | </td><td> |
|
1436 | </td><td> | |
1437 | show combined config settings from all hgrc files |
|
1437 | show combined config settings from all hgrc files | |
1438 | </td></tr> |
|
1438 | </td></tr> | |
1439 | <tr><td> |
|
1439 | <tr><td> | |
1440 | <a href="/help/copy"> |
|
1440 | <a href="/help/copy"> | |
1441 | copy |
|
1441 | copy | |
1442 | </a> |
|
1442 | </a> | |
1443 | </td><td> |
|
1443 | </td><td> | |
1444 | mark files as copied for the next commit |
|
1444 | mark files as copied for the next commit | |
1445 | </td></tr> |
|
1445 | </td></tr> | |
1446 | <tr><td> |
|
1446 | <tr><td> | |
1447 | <a href="/help/graft"> |
|
1447 | <a href="/help/graft"> | |
1448 | graft |
|
1448 | graft | |
1449 | </a> |
|
1449 | </a> | |
1450 | </td><td> |
|
1450 | </td><td> | |
1451 | copy changes from other branches onto the current branch |
|
1451 | copy changes from other branches onto the current branch | |
1452 | </td></tr> |
|
1452 | </td></tr> | |
1453 | <tr><td> |
|
1453 | <tr><td> | |
1454 | <a href="/help/grep"> |
|
1454 | <a href="/help/grep"> | |
1455 | grep |
|
1455 | grep | |
1456 | </a> |
|
1456 | </a> | |
1457 | </td><td> |
|
1457 | </td><td> | |
1458 | search for a pattern in specified files and revisions |
|
1458 | search for a pattern in specified files and revisions | |
1459 | </td></tr> |
|
1459 | </td></tr> | |
1460 | <tr><td> |
|
1460 | <tr><td> | |
1461 | <a href="/help/heads"> |
|
1461 | <a href="/help/heads"> | |
1462 | heads |
|
1462 | heads | |
1463 | </a> |
|
1463 | </a> | |
1464 | </td><td> |
|
1464 | </td><td> | |
1465 | show branch heads |
|
1465 | show branch heads | |
1466 | </td></tr> |
|
1466 | </td></tr> | |
1467 | <tr><td> |
|
1467 | <tr><td> | |
1468 | <a href="/help/help"> |
|
1468 | <a href="/help/help"> | |
1469 | help |
|
1469 | help | |
1470 | </a> |
|
1470 | </a> | |
1471 | </td><td> |
|
1471 | </td><td> | |
1472 | show help for a given topic or a help overview |
|
1472 | show help for a given topic or a help overview | |
1473 | </td></tr> |
|
1473 | </td></tr> | |
1474 | <tr><td> |
|
1474 | <tr><td> | |
1475 | <a href="/help/identify"> |
|
1475 | <a href="/help/identify"> | |
1476 | identify |
|
1476 | identify | |
1477 | </a> |
|
1477 | </a> | |
1478 | </td><td> |
|
1478 | </td><td> | |
1479 | identify the working copy or specified revision |
|
1479 | identify the working copy or specified revision | |
1480 | </td></tr> |
|
1480 | </td></tr> | |
1481 | <tr><td> |
|
1481 | <tr><td> | |
1482 | <a href="/help/import"> |
|
1482 | <a href="/help/import"> | |
1483 | import |
|
1483 | import | |
1484 | </a> |
|
1484 | </a> | |
1485 | </td><td> |
|
1485 | </td><td> | |
1486 | import an ordered set of patches |
|
1486 | import an ordered set of patches | |
1487 | </td></tr> |
|
1487 | </td></tr> | |
1488 | <tr><td> |
|
1488 | <tr><td> | |
1489 | <a href="/help/incoming"> |
|
1489 | <a href="/help/incoming"> | |
1490 | incoming |
|
1490 | incoming | |
1491 | </a> |
|
1491 | </a> | |
1492 | </td><td> |
|
1492 | </td><td> | |
1493 | show new changesets found in source |
|
1493 | show new changesets found in source | |
1494 | </td></tr> |
|
1494 | </td></tr> | |
1495 | <tr><td> |
|
1495 | <tr><td> | |
1496 | <a href="/help/locate"> |
|
1496 | <a href="/help/locate"> | |
1497 | locate |
|
1497 | locate | |
1498 | </a> |
|
1498 | </a> | |
1499 | </td><td> |
|
1499 | </td><td> | |
1500 | locate files matching specific patterns |
|
1500 | locate files matching specific patterns | |
1501 | </td></tr> |
|
1501 | </td></tr> | |
1502 | <tr><td> |
|
1502 | <tr><td> | |
1503 | <a href="/help/manifest"> |
|
1503 | <a href="/help/manifest"> | |
1504 | manifest |
|
1504 | manifest | |
1505 | </a> |
|
1505 | </a> | |
1506 | </td><td> |
|
1506 | </td><td> | |
1507 | output the current or given revision of the project manifest |
|
1507 | output the current or given revision of the project manifest | |
1508 | </td></tr> |
|
1508 | </td></tr> | |
1509 | <tr><td> |
|
1509 | <tr><td> | |
1510 | <a href="/help/nohelp"> |
|
1510 | <a href="/help/nohelp"> | |
1511 | nohelp |
|
1511 | nohelp | |
1512 | </a> |
|
1512 | </a> | |
1513 | </td><td> |
|
1513 | </td><td> | |
1514 | (no help text available) |
|
1514 | (no help text available) | |
1515 | </td></tr> |
|
1515 | </td></tr> | |
1516 | <tr><td> |
|
1516 | <tr><td> | |
1517 | <a href="/help/outgoing"> |
|
1517 | <a href="/help/outgoing"> | |
1518 | outgoing |
|
1518 | outgoing | |
1519 | </a> |
|
1519 | </a> | |
1520 | </td><td> |
|
1520 | </td><td> | |
1521 | show changesets not found in the destination |
|
1521 | show changesets not found in the destination | |
1522 | </td></tr> |
|
1522 | </td></tr> | |
1523 | <tr><td> |
|
1523 | <tr><td> | |
1524 | <a href="/help/parents"> |
|
1524 | <a href="/help/parents"> | |
1525 | parents |
|
1525 | parents | |
1526 | </a> |
|
1526 | </a> | |
1527 | </td><td> |
|
1527 | </td><td> | |
1528 | show the parents of the working directory or revision |
|
1528 | show the parents of the working directory or revision | |
1529 | </td></tr> |
|
1529 | </td></tr> | |
1530 | <tr><td> |
|
1530 | <tr><td> | |
1531 | <a href="/help/paths"> |
|
1531 | <a href="/help/paths"> | |
1532 | paths |
|
1532 | paths | |
1533 | </a> |
|
1533 | </a> | |
1534 | </td><td> |
|
1534 | </td><td> | |
1535 | show aliases for remote repositories |
|
1535 | show aliases for remote repositories | |
1536 | </td></tr> |
|
1536 | </td></tr> | |
1537 | <tr><td> |
|
1537 | <tr><td> | |
1538 | <a href="/help/phase"> |
|
1538 | <a href="/help/phase"> | |
1539 | phase |
|
1539 | phase | |
1540 | </a> |
|
1540 | </a> | |
1541 | </td><td> |
|
1541 | </td><td> | |
1542 | set or show the current phase name |
|
1542 | set or show the current phase name | |
1543 | </td></tr> |
|
1543 | </td></tr> | |
1544 | <tr><td> |
|
1544 | <tr><td> | |
1545 | <a href="/help/recover"> |
|
1545 | <a href="/help/recover"> | |
1546 | recover |
|
1546 | recover | |
1547 | </a> |
|
1547 | </a> | |
1548 | </td><td> |
|
1548 | </td><td> | |
1549 | roll back an interrupted transaction |
|
1549 | roll back an interrupted transaction | |
1550 | </td></tr> |
|
1550 | </td></tr> | |
1551 | <tr><td> |
|
1551 | <tr><td> | |
1552 | <a href="/help/rename"> |
|
1552 | <a href="/help/rename"> | |
1553 | rename |
|
1553 | rename | |
1554 | </a> |
|
1554 | </a> | |
1555 | </td><td> |
|
1555 | </td><td> | |
1556 | rename files; equivalent of copy + remove |
|
1556 | rename files; equivalent of copy + remove | |
1557 | </td></tr> |
|
1557 | </td></tr> | |
1558 | <tr><td> |
|
1558 | <tr><td> | |
1559 | <a href="/help/resolve"> |
|
1559 | <a href="/help/resolve"> | |
1560 | resolve |
|
1560 | resolve | |
1561 | </a> |
|
1561 | </a> | |
1562 | </td><td> |
|
1562 | </td><td> | |
1563 | redo merges or set/view the merge status of files |
|
1563 | redo merges or set/view the merge status of files | |
1564 | </td></tr> |
|
1564 | </td></tr> | |
1565 | <tr><td> |
|
1565 | <tr><td> | |
1566 | <a href="/help/revert"> |
|
1566 | <a href="/help/revert"> | |
1567 | revert |
|
1567 | revert | |
1568 | </a> |
|
1568 | </a> | |
1569 | </td><td> |
|
1569 | </td><td> | |
1570 | restore files to their checkout state |
|
1570 | restore files to their checkout state | |
1571 | </td></tr> |
|
1571 | </td></tr> | |
1572 | <tr><td> |
|
1572 | <tr><td> | |
1573 | <a href="/help/root"> |
|
1573 | <a href="/help/root"> | |
1574 | root |
|
1574 | root | |
1575 | </a> |
|
1575 | </a> | |
1576 | </td><td> |
|
1576 | </td><td> | |
1577 | print the root (top) of the current working directory |
|
1577 | print the root (top) of the current working directory | |
1578 | </td></tr> |
|
1578 | </td></tr> | |
1579 | <tr><td> |
|
1579 | <tr><td> | |
1580 | <a href="/help/tag"> |
|
1580 | <a href="/help/tag"> | |
1581 | tag |
|
1581 | tag | |
1582 | </a> |
|
1582 | </a> | |
1583 | </td><td> |
|
1583 | </td><td> | |
1584 | add one or more tags for the current or given revision |
|
1584 | add one or more tags for the current or given revision | |
1585 | </td></tr> |
|
1585 | </td></tr> | |
1586 | <tr><td> |
|
1586 | <tr><td> | |
1587 | <a href="/help/tags"> |
|
1587 | <a href="/help/tags"> | |
1588 | tags |
|
1588 | tags | |
1589 | </a> |
|
1589 | </a> | |
1590 | </td><td> |
|
1590 | </td><td> | |
1591 | list repository tags |
|
1591 | list repository tags | |
1592 | </td></tr> |
|
1592 | </td></tr> | |
1593 | <tr><td> |
|
1593 | <tr><td> | |
1594 | <a href="/help/unbundle"> |
|
1594 | <a href="/help/unbundle"> | |
1595 | unbundle |
|
1595 | unbundle | |
1596 | </a> |
|
1596 | </a> | |
1597 | </td><td> |
|
1597 | </td><td> | |
1598 | apply one or more changegroup files |
|
1598 | apply one or more changegroup files | |
1599 | </td></tr> |
|
1599 | </td></tr> | |
1600 | <tr><td> |
|
1600 | <tr><td> | |
1601 | <a href="/help/verify"> |
|
1601 | <a href="/help/verify"> | |
1602 | verify |
|
1602 | verify | |
1603 | </a> |
|
1603 | </a> | |
1604 | </td><td> |
|
1604 | </td><td> | |
1605 | verify the integrity of the repository |
|
1605 | verify the integrity of the repository | |
1606 | </td></tr> |
|
1606 | </td></tr> | |
1607 | <tr><td> |
|
1607 | <tr><td> | |
1608 | <a href="/help/version"> |
|
1608 | <a href="/help/version"> | |
1609 | version |
|
1609 | version | |
1610 | </a> |
|
1610 | </a> | |
1611 | </td><td> |
|
1611 | </td><td> | |
1612 | output version and copyright information |
|
1612 | output version and copyright information | |
1613 | </td></tr> |
|
1613 | </td></tr> | |
1614 | </table> |
|
1614 | </table> | |
1615 | </div> |
|
1615 | </div> | |
1616 | </div> |
|
1616 | </div> | |
1617 |
|
1617 | |||
1618 | <script type="text/javascript">process_dates()</script> |
|
1618 | <script type="text/javascript">process_dates()</script> | |
1619 |
|
1619 | |||
1620 |
|
1620 | |||
1621 | </body> |
|
1621 | </body> | |
1622 | </html> |
|
1622 | </html> | |
1623 |
|
1623 | |||
1624 |
|
1624 | |||
1625 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add" |
|
1625 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/add" | |
1626 | 200 Script output follows |
|
1626 | 200 Script output follows | |
1627 |
|
1627 | |||
1628 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1628 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
1629 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1629 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
1630 | <head> |
|
1630 | <head> | |
1631 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1631 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
1632 | <meta name="robots" content="index, nofollow" /> |
|
1632 | <meta name="robots" content="index, nofollow" /> | |
1633 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1633 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
1634 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1634 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
1635 |
|
1635 | |||
1636 | <title>Help: add</title> |
|
1636 | <title>Help: add</title> | |
1637 | </head> |
|
1637 | </head> | |
1638 | <body> |
|
1638 | <body> | |
1639 |
|
1639 | |||
1640 | <div class="container"> |
|
1640 | <div class="container"> | |
1641 | <div class="menu"> |
|
1641 | <div class="menu"> | |
1642 | <div class="logo"> |
|
1642 | <div class="logo"> | |
1643 | <a href="http://mercurial.selenic.com/"> |
|
1643 | <a href="http://mercurial.selenic.com/"> | |
1644 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1644 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
1645 | </div> |
|
1645 | </div> | |
1646 | <ul> |
|
1646 | <ul> | |
1647 | <li><a href="/shortlog">log</a></li> |
|
1647 | <li><a href="/shortlog">log</a></li> | |
1648 | <li><a href="/graph">graph</a></li> |
|
1648 | <li><a href="/graph">graph</a></li> | |
1649 | <li><a href="/tags">tags</a></li> |
|
1649 | <li><a href="/tags">tags</a></li> | |
1650 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1650 | <li><a href="/bookmarks">bookmarks</a></li> | |
1651 | <li><a href="/branches">branches</a></li> |
|
1651 | <li><a href="/branches">branches</a></li> | |
1652 | </ul> |
|
1652 | </ul> | |
1653 | <ul> |
|
1653 | <ul> | |
1654 | <li class="active"><a href="/help">help</a></li> |
|
1654 | <li class="active"><a href="/help">help</a></li> | |
1655 | </ul> |
|
1655 | </ul> | |
1656 | </div> |
|
1656 | </div> | |
1657 |
|
1657 | |||
1658 | <div class="main"> |
|
1658 | <div class="main"> | |
1659 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1659 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
1660 | <h3>Help: add</h3> |
|
1660 | <h3>Help: add</h3> | |
1661 |
|
1661 | |||
1662 | <form class="search" action="/log"> |
|
1662 | <form class="search" action="/log"> | |
1663 |
|
1663 | |||
1664 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
1664 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
1665 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
1665 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
1666 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
1666 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
1667 | </form> |
|
1667 | </form> | |
1668 | <div id="doc"> |
|
1668 | <div id="doc"> | |
1669 | <p> |
|
1669 | <p> | |
1670 | hg add [OPTION]... [FILE]... |
|
1670 | hg add [OPTION]... [FILE]... | |
1671 | </p> |
|
1671 | </p> | |
1672 | <p> |
|
1672 | <p> | |
1673 | add the specified files on the next commit |
|
1673 | add the specified files on the next commit | |
1674 | </p> |
|
1674 | </p> | |
1675 | <p> |
|
1675 | <p> | |
1676 | Schedule files to be version controlled and added to the |
|
1676 | Schedule files to be version controlled and added to the | |
1677 | repository. |
|
1677 | repository. | |
1678 | </p> |
|
1678 | </p> | |
1679 | <p> |
|
1679 | <p> | |
1680 | The files will be added to the repository at the next commit. To |
|
1680 | The files will be added to the repository at the next commit. To | |
1681 | undo an add before that, see "hg forget". |
|
1681 | undo an add before that, see "hg forget". | |
1682 | </p> |
|
1682 | </p> | |
1683 | <p> |
|
1683 | <p> | |
1684 | If no names are given, add all files to the repository. |
|
1684 | If no names are given, add all files to the repository. | |
1685 | </p> |
|
1685 | </p> | |
1686 | <p> |
|
1686 | <p> | |
1687 | An example showing how new (unknown) files are added |
|
1687 | An example showing how new (unknown) files are added | |
1688 | automatically by "hg add": |
|
1688 | automatically by "hg add": | |
1689 | </p> |
|
1689 | </p> | |
1690 | <pre> |
|
1690 | <pre> | |
1691 | \$ ls (re) |
|
1691 | \$ ls (re) | |
1692 | foo.c |
|
1692 | foo.c | |
1693 | \$ hg status (re) |
|
1693 | \$ hg status (re) | |
1694 | ? foo.c |
|
1694 | ? foo.c | |
1695 | \$ hg add (re) |
|
1695 | \$ hg add (re) | |
1696 | adding foo.c |
|
1696 | adding foo.c | |
1697 | \$ hg status (re) |
|
1697 | \$ hg status (re) | |
1698 | A foo.c |
|
1698 | A foo.c | |
1699 | </pre> |
|
1699 | </pre> | |
1700 | <p> |
|
1700 | <p> | |
1701 | Returns 0 if all files are successfully added. |
|
1701 | Returns 0 if all files are successfully added. | |
1702 | </p> |
|
1702 | </p> | |
1703 | <p> |
|
1703 | <p> | |
1704 | options ([+] can be repeated): |
|
1704 | options ([+] can be repeated): | |
1705 | </p> |
|
1705 | </p> | |
1706 | <table> |
|
1706 | <table> | |
1707 | <tr><td>-I</td> |
|
1707 | <tr><td>-I</td> | |
1708 | <td>--include PATTERN [+]</td> |
|
1708 | <td>--include PATTERN [+]</td> | |
1709 | <td>include names matching the given patterns</td></tr> |
|
1709 | <td>include names matching the given patterns</td></tr> | |
1710 | <tr><td>-X</td> |
|
1710 | <tr><td>-X</td> | |
1711 | <td>--exclude PATTERN [+]</td> |
|
1711 | <td>--exclude PATTERN [+]</td> | |
1712 | <td>exclude names matching the given patterns</td></tr> |
|
1712 | <td>exclude names matching the given patterns</td></tr> | |
1713 | <tr><td>-S</td> |
|
1713 | <tr><td>-S</td> | |
1714 | <td>--subrepos</td> |
|
1714 | <td>--subrepos</td> | |
1715 | <td>recurse into subrepositories</td></tr> |
|
1715 | <td>recurse into subrepositories</td></tr> | |
1716 | <tr><td>-n</td> |
|
1716 | <tr><td>-n</td> | |
1717 | <td>--dry-run</td> |
|
1717 | <td>--dry-run</td> | |
1718 | <td>do not perform actions, just print output</td></tr> |
|
1718 | <td>do not perform actions, just print output</td></tr> | |
1719 | </table> |
|
1719 | </table> | |
1720 | <p> |
|
1720 | <p> | |
1721 | global options ([+] can be repeated): |
|
1721 | global options ([+] can be repeated): | |
1722 | </p> |
|
1722 | </p> | |
1723 | <table> |
|
1723 | <table> | |
1724 | <tr><td>-R</td> |
|
1724 | <tr><td>-R</td> | |
1725 | <td>--repository REPO</td> |
|
1725 | <td>--repository REPO</td> | |
1726 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
1726 | <td>repository root directory or name of overlay bundle file</td></tr> | |
1727 | <tr><td></td> |
|
1727 | <tr><td></td> | |
1728 | <td>--cwd DIR</td> |
|
1728 | <td>--cwd DIR</td> | |
1729 | <td>change working directory</td></tr> |
|
1729 | <td>change working directory</td></tr> | |
1730 | <tr><td>-y</td> |
|
1730 | <tr><td>-y</td> | |
1731 | <td>--noninteractive</td> |
|
1731 | <td>--noninteractive</td> | |
1732 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
1732 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
1733 | <tr><td>-q</td> |
|
1733 | <tr><td>-q</td> | |
1734 | <td>--quiet</td> |
|
1734 | <td>--quiet</td> | |
1735 | <td>suppress output</td></tr> |
|
1735 | <td>suppress output</td></tr> | |
1736 | <tr><td>-v</td> |
|
1736 | <tr><td>-v</td> | |
1737 | <td>--verbose</td> |
|
1737 | <td>--verbose</td> | |
1738 | <td>enable additional output</td></tr> |
|
1738 | <td>enable additional output</td></tr> | |
1739 | <tr><td></td> |
|
1739 | <tr><td></td> | |
1740 | <td>--config CONFIG [+]</td> |
|
1740 | <td>--config CONFIG [+]</td> | |
1741 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
1741 | <td>set/override config option (use 'section.name=value')</td></tr> | |
1742 | <tr><td></td> |
|
1742 | <tr><td></td> | |
1743 | <td>--debug</td> |
|
1743 | <td>--debug</td> | |
1744 | <td>enable debugging output</td></tr> |
|
1744 | <td>enable debugging output</td></tr> | |
1745 | <tr><td></td> |
|
1745 | <tr><td></td> | |
1746 | <td>--debugger</td> |
|
1746 | <td>--debugger</td> | |
1747 | <td>start debugger</td></tr> |
|
1747 | <td>start debugger</td></tr> | |
1748 | <tr><td></td> |
|
1748 | <tr><td></td> | |
1749 | <td>--encoding ENCODE</td> |
|
1749 | <td>--encoding ENCODE</td> | |
1750 | <td>set the charset encoding (default: ascii)</td></tr> |
|
1750 | <td>set the charset encoding (default: ascii)</td></tr> | |
1751 | <tr><td></td> |
|
1751 | <tr><td></td> | |
1752 | <td>--encodingmode MODE</td> |
|
1752 | <td>--encodingmode MODE</td> | |
1753 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
1753 | <td>set the charset encoding mode (default: strict)</td></tr> | |
1754 | <tr><td></td> |
|
1754 | <tr><td></td> | |
1755 | <td>--traceback</td> |
|
1755 | <td>--traceback</td> | |
1756 | <td>always print a traceback on exception</td></tr> |
|
1756 | <td>always print a traceback on exception</td></tr> | |
1757 | <tr><td></td> |
|
1757 | <tr><td></td> | |
1758 | <td>--time</td> |
|
1758 | <td>--time</td> | |
1759 | <td>time how long the command takes</td></tr> |
|
1759 | <td>time how long the command takes</td></tr> | |
1760 | <tr><td></td> |
|
1760 | <tr><td></td> | |
1761 | <td>--profile</td> |
|
1761 | <td>--profile</td> | |
1762 | <td>print command execution profile</td></tr> |
|
1762 | <td>print command execution profile</td></tr> | |
1763 | <tr><td></td> |
|
1763 | <tr><td></td> | |
1764 | <td>--version</td> |
|
1764 | <td>--version</td> | |
1765 | <td>output version information and exit</td></tr> |
|
1765 | <td>output version information and exit</td></tr> | |
1766 | <tr><td>-h</td> |
|
1766 | <tr><td>-h</td> | |
1767 | <td>--help</td> |
|
1767 | <td>--help</td> | |
1768 | <td>display help and exit</td></tr> |
|
1768 | <td>display help and exit</td></tr> | |
1769 | <tr><td></td> |
|
1769 | <tr><td></td> | |
1770 | <td>--hidden</td> |
|
1770 | <td>--hidden</td> | |
1771 | <td>consider hidden changesets</td></tr> |
|
1771 | <td>consider hidden changesets</td></tr> | |
1772 | </table> |
|
1772 | </table> | |
1773 |
|
1773 | |||
1774 | </div> |
|
1774 | </div> | |
1775 | </div> |
|
1775 | </div> | |
1776 | </div> |
|
1776 | </div> | |
1777 |
|
1777 | |||
1778 | <script type="text/javascript">process_dates()</script> |
|
1778 | <script type="text/javascript">process_dates()</script> | |
1779 |
|
1779 | |||
1780 |
|
1780 | |||
1781 | </body> |
|
1781 | </body> | |
1782 | </html> |
|
1782 | </html> | |
1783 |
|
1783 | |||
1784 |
|
1784 | |||
1785 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove" |
|
1785 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/remove" | |
1786 | 200 Script output follows |
|
1786 | 200 Script output follows | |
1787 |
|
1787 | |||
1788 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1788 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
1789 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1789 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
1790 | <head> |
|
1790 | <head> | |
1791 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1791 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
1792 | <meta name="robots" content="index, nofollow" /> |
|
1792 | <meta name="robots" content="index, nofollow" /> | |
1793 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1793 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
1794 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1794 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
1795 |
|
1795 | |||
1796 | <title>Help: remove</title> |
|
1796 | <title>Help: remove</title> | |
1797 | </head> |
|
1797 | </head> | |
1798 | <body> |
|
1798 | <body> | |
1799 |
|
1799 | |||
1800 | <div class="container"> |
|
1800 | <div class="container"> | |
1801 | <div class="menu"> |
|
1801 | <div class="menu"> | |
1802 | <div class="logo"> |
|
1802 | <div class="logo"> | |
1803 | <a href="http://mercurial.selenic.com/"> |
|
1803 | <a href="http://mercurial.selenic.com/"> | |
1804 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1804 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
1805 | </div> |
|
1805 | </div> | |
1806 | <ul> |
|
1806 | <ul> | |
1807 | <li><a href="/shortlog">log</a></li> |
|
1807 | <li><a href="/shortlog">log</a></li> | |
1808 | <li><a href="/graph">graph</a></li> |
|
1808 | <li><a href="/graph">graph</a></li> | |
1809 | <li><a href="/tags">tags</a></li> |
|
1809 | <li><a href="/tags">tags</a></li> | |
1810 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1810 | <li><a href="/bookmarks">bookmarks</a></li> | |
1811 | <li><a href="/branches">branches</a></li> |
|
1811 | <li><a href="/branches">branches</a></li> | |
1812 | </ul> |
|
1812 | </ul> | |
1813 | <ul> |
|
1813 | <ul> | |
1814 | <li class="active"><a href="/help">help</a></li> |
|
1814 | <li class="active"><a href="/help">help</a></li> | |
1815 | </ul> |
|
1815 | </ul> | |
1816 | </div> |
|
1816 | </div> | |
1817 |
|
1817 | |||
1818 | <div class="main"> |
|
1818 | <div class="main"> | |
1819 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1819 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
1820 | <h3>Help: remove</h3> |
|
1820 | <h3>Help: remove</h3> | |
1821 |
|
1821 | |||
1822 | <form class="search" action="/log"> |
|
1822 | <form class="search" action="/log"> | |
1823 |
|
1823 | |||
1824 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
1824 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
1825 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
1825 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
1826 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
1826 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
1827 | </form> |
|
1827 | </form> | |
1828 | <div id="doc"> |
|
1828 | <div id="doc"> | |
1829 | <p> |
|
1829 | <p> | |
1830 | hg remove [OPTION]... FILE... |
|
1830 | hg remove [OPTION]... FILE... | |
1831 | </p> |
|
1831 | </p> | |
1832 | <p> |
|
1832 | <p> | |
1833 | aliases: rm |
|
1833 | aliases: rm | |
1834 | </p> |
|
1834 | </p> | |
1835 | <p> |
|
1835 | <p> | |
1836 | remove the specified files on the next commit |
|
1836 | remove the specified files on the next commit | |
1837 | </p> |
|
1837 | </p> | |
1838 | <p> |
|
1838 | <p> | |
1839 | Schedule the indicated files for removal from the current branch. |
|
1839 | Schedule the indicated files for removal from the current branch. | |
1840 | </p> |
|
1840 | </p> | |
1841 | <p> |
|
1841 | <p> | |
1842 | This command schedules the files to be removed at the next commit. |
|
1842 | This command schedules the files to be removed at the next commit. | |
1843 | To undo a remove before that, see "hg revert". To undo added |
|
1843 | To undo a remove before that, see "hg revert". To undo added | |
1844 | files, see "hg forget". |
|
1844 | files, see "hg forget". | |
1845 | </p> |
|
1845 | </p> | |
1846 | <p> |
|
1846 | <p> | |
1847 | -A/--after can be used to remove only files that have already |
|
1847 | -A/--after can be used to remove only files that have already | |
1848 | been deleted, -f/--force can be used to force deletion, and -Af |
|
1848 | been deleted, -f/--force can be used to force deletion, and -Af | |
1849 | can be used to remove files from the next revision without |
|
1849 | can be used to remove files from the next revision without | |
1850 | deleting them from the working directory. |
|
1850 | deleting them from the working directory. | |
1851 | </p> |
|
1851 | </p> | |
1852 | <p> |
|
1852 | <p> | |
1853 | The following table details the behavior of remove for different |
|
1853 | The following table details the behavior of remove for different | |
1854 | file states (columns) and option combinations (rows). The file |
|
1854 | file states (columns) and option combinations (rows). The file | |
1855 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
1855 | states are Added [A], Clean [C], Modified [M] and Missing [!] | |
1856 | (as reported by "hg status"). The actions are Warn, Remove |
|
1856 | (as reported by "hg status"). The actions are Warn, Remove | |
1857 | (from branch) and Delete (from disk): |
|
1857 | (from branch) and Delete (from disk): | |
1858 | </p> |
|
1858 | </p> | |
1859 | <table> |
|
1859 | <table> | |
1860 | <tr><td>opt/state</td> |
|
1860 | <tr><td>opt/state</td> | |
1861 | <td>A</td> |
|
1861 | <td>A</td> | |
1862 | <td>C</td> |
|
1862 | <td>C</td> | |
1863 | <td>M</td> |
|
1863 | <td>M</td> | |
1864 | <td>!</td></tr> |
|
1864 | <td>!</td></tr> | |
1865 | <tr><td>none</td> |
|
1865 | <tr><td>none</td> | |
1866 | <td>W</td> |
|
1866 | <td>W</td> | |
1867 | <td>RD</td> |
|
1867 | <td>RD</td> | |
1868 | <td>W</td> |
|
1868 | <td>W</td> | |
1869 | <td>R</td></tr> |
|
1869 | <td>R</td></tr> | |
1870 | <tr><td>-f</td> |
|
1870 | <tr><td>-f</td> | |
1871 | <td>R</td> |
|
1871 | <td>R</td> | |
1872 | <td>RD</td> |
|
1872 | <td>RD</td> | |
1873 | <td>RD</td> |
|
1873 | <td>RD</td> | |
1874 | <td>R</td></tr> |
|
1874 | <td>R</td></tr> | |
1875 | <tr><td>-A</td> |
|
1875 | <tr><td>-A</td> | |
1876 | <td>W</td> |
|
1876 | <td>W</td> | |
1877 | <td>W</td> |
|
1877 | <td>W</td> | |
1878 | <td>W</td> |
|
1878 | <td>W</td> | |
1879 | <td>R</td></tr> |
|
1879 | <td>R</td></tr> | |
1880 | <tr><td>-Af</td> |
|
1880 | <tr><td>-Af</td> | |
1881 | <td>R</td> |
|
1881 | <td>R</td> | |
1882 | <td>R</td> |
|
1882 | <td>R</td> | |
1883 | <td>R</td> |
|
1883 | <td>R</td> | |
1884 | <td>R</td></tr> |
|
1884 | <td>R</td></tr> | |
1885 | </table> |
|
1885 | </table> | |
1886 | <p> |
|
1886 | <p> | |
1887 | Note that remove never deletes files in Added [A] state from the |
|
1887 | Note that remove never deletes files in Added [A] state from the | |
1888 | working directory, not even if option --force is specified. |
|
1888 | working directory, not even if option --force is specified. | |
1889 | </p> |
|
1889 | </p> | |
1890 | <p> |
|
1890 | <p> | |
1891 | Returns 0 on success, 1 if any warnings encountered. |
|
1891 | Returns 0 on success, 1 if any warnings encountered. | |
1892 | </p> |
|
1892 | </p> | |
1893 | <p> |
|
1893 | <p> | |
1894 | options ([+] can be repeated): |
|
1894 | options ([+] can be repeated): | |
1895 | </p> |
|
1895 | </p> | |
1896 | <table> |
|
1896 | <table> | |
1897 | <tr><td>-A</td> |
|
1897 | <tr><td>-A</td> | |
1898 | <td>--after</td> |
|
1898 | <td>--after</td> | |
1899 | <td>record delete for missing files</td></tr> |
|
1899 | <td>record delete for missing files</td></tr> | |
1900 | <tr><td>-f</td> |
|
1900 | <tr><td>-f</td> | |
1901 | <td>--force</td> |
|
1901 | <td>--force</td> | |
1902 | <td>remove (and delete) file even if added or modified</td></tr> |
|
1902 | <td>remove (and delete) file even if added or modified</td></tr> | |
1903 | <tr><td>-I</td> |
|
1903 | <tr><td>-I</td> | |
1904 | <td>--include PATTERN [+]</td> |
|
1904 | <td>--include PATTERN [+]</td> | |
1905 | <td>include names matching the given patterns</td></tr> |
|
1905 | <td>include names matching the given patterns</td></tr> | |
1906 | <tr><td>-X</td> |
|
1906 | <tr><td>-X</td> | |
1907 | <td>--exclude PATTERN [+]</td> |
|
1907 | <td>--exclude PATTERN [+]</td> | |
1908 | <td>exclude names matching the given patterns</td></tr> |
|
1908 | <td>exclude names matching the given patterns</td></tr> | |
1909 | </table> |
|
1909 | </table> | |
1910 | <p> |
|
1910 | <p> | |
1911 | global options ([+] can be repeated): |
|
1911 | global options ([+] can be repeated): | |
1912 | </p> |
|
1912 | </p> | |
1913 | <table> |
|
1913 | <table> | |
1914 | <tr><td>-R</td> |
|
1914 | <tr><td>-R</td> | |
1915 | <td>--repository REPO</td> |
|
1915 | <td>--repository REPO</td> | |
1916 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
1916 | <td>repository root directory or name of overlay bundle file</td></tr> | |
1917 | <tr><td></td> |
|
1917 | <tr><td></td> | |
1918 | <td>--cwd DIR</td> |
|
1918 | <td>--cwd DIR</td> | |
1919 | <td>change working directory</td></tr> |
|
1919 | <td>change working directory</td></tr> | |
1920 | <tr><td>-y</td> |
|
1920 | <tr><td>-y</td> | |
1921 | <td>--noninteractive</td> |
|
1921 | <td>--noninteractive</td> | |
1922 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
1922 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
1923 | <tr><td>-q</td> |
|
1923 | <tr><td>-q</td> | |
1924 | <td>--quiet</td> |
|
1924 | <td>--quiet</td> | |
1925 | <td>suppress output</td></tr> |
|
1925 | <td>suppress output</td></tr> | |
1926 | <tr><td>-v</td> |
|
1926 | <tr><td>-v</td> | |
1927 | <td>--verbose</td> |
|
1927 | <td>--verbose</td> | |
1928 | <td>enable additional output</td></tr> |
|
1928 | <td>enable additional output</td></tr> | |
1929 | <tr><td></td> |
|
1929 | <tr><td></td> | |
1930 | <td>--config CONFIG [+]</td> |
|
1930 | <td>--config CONFIG [+]</td> | |
1931 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
1931 | <td>set/override config option (use 'section.name=value')</td></tr> | |
1932 | <tr><td></td> |
|
1932 | <tr><td></td> | |
1933 | <td>--debug</td> |
|
1933 | <td>--debug</td> | |
1934 | <td>enable debugging output</td></tr> |
|
1934 | <td>enable debugging output</td></tr> | |
1935 | <tr><td></td> |
|
1935 | <tr><td></td> | |
1936 | <td>--debugger</td> |
|
1936 | <td>--debugger</td> | |
1937 | <td>start debugger</td></tr> |
|
1937 | <td>start debugger</td></tr> | |
1938 | <tr><td></td> |
|
1938 | <tr><td></td> | |
1939 | <td>--encoding ENCODE</td> |
|
1939 | <td>--encoding ENCODE</td> | |
1940 | <td>set the charset encoding (default: ascii)</td></tr> |
|
1940 | <td>set the charset encoding (default: ascii)</td></tr> | |
1941 | <tr><td></td> |
|
1941 | <tr><td></td> | |
1942 | <td>--encodingmode MODE</td> |
|
1942 | <td>--encodingmode MODE</td> | |
1943 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
1943 | <td>set the charset encoding mode (default: strict)</td></tr> | |
1944 | <tr><td></td> |
|
1944 | <tr><td></td> | |
1945 | <td>--traceback</td> |
|
1945 | <td>--traceback</td> | |
1946 | <td>always print a traceback on exception</td></tr> |
|
1946 | <td>always print a traceback on exception</td></tr> | |
1947 | <tr><td></td> |
|
1947 | <tr><td></td> | |
1948 | <td>--time</td> |
|
1948 | <td>--time</td> | |
1949 | <td>time how long the command takes</td></tr> |
|
1949 | <td>time how long the command takes</td></tr> | |
1950 | <tr><td></td> |
|
1950 | <tr><td></td> | |
1951 | <td>--profile</td> |
|
1951 | <td>--profile</td> | |
1952 | <td>print command execution profile</td></tr> |
|
1952 | <td>print command execution profile</td></tr> | |
1953 | <tr><td></td> |
|
1953 | <tr><td></td> | |
1954 | <td>--version</td> |
|
1954 | <td>--version</td> | |
1955 | <td>output version information and exit</td></tr> |
|
1955 | <td>output version information and exit</td></tr> | |
1956 | <tr><td>-h</td> |
|
1956 | <tr><td>-h</td> | |
1957 | <td>--help</td> |
|
1957 | <td>--help</td> | |
1958 | <td>display help and exit</td></tr> |
|
1958 | <td>display help and exit</td></tr> | |
1959 | <tr><td></td> |
|
1959 | <tr><td></td> | |
1960 | <td>--hidden</td> |
|
1960 | <td>--hidden</td> | |
1961 | <td>consider hidden changesets</td></tr> |
|
1961 | <td>consider hidden changesets</td></tr> | |
1962 | </table> |
|
1962 | </table> | |
1963 |
|
1963 | |||
1964 | </div> |
|
1964 | </div> | |
1965 | </div> |
|
1965 | </div> | |
1966 | </div> |
|
1966 | </div> | |
1967 |
|
1967 | |||
1968 | <script type="text/javascript">process_dates()</script> |
|
1968 | <script type="text/javascript">process_dates()</script> | |
1969 |
|
1969 | |||
1970 |
|
1970 | |||
1971 | </body> |
|
1971 | </body> | |
1972 | </html> |
|
1972 | </html> | |
1973 |
|
1973 | |||
1974 |
|
1974 | |||
1975 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions" |
|
1975 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT "help/revisions" | |
1976 | 200 Script output follows |
|
1976 | 200 Script output follows | |
1977 |
|
1977 | |||
1978 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1978 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
1979 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1979 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
1980 | <head> |
|
1980 | <head> | |
1981 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1981 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
1982 | <meta name="robots" content="index, nofollow" /> |
|
1982 | <meta name="robots" content="index, nofollow" /> | |
1983 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1983 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
1984 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1984 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
1985 |
|
1985 | |||
1986 | <title>Help: revisions</title> |
|
1986 | <title>Help: revisions</title> | |
1987 | </head> |
|
1987 | </head> | |
1988 | <body> |
|
1988 | <body> | |
1989 |
|
1989 | |||
1990 | <div class="container"> |
|
1990 | <div class="container"> | |
1991 | <div class="menu"> |
|
1991 | <div class="menu"> | |
1992 | <div class="logo"> |
|
1992 | <div class="logo"> | |
1993 | <a href="http://mercurial.selenic.com/"> |
|
1993 | <a href="http://mercurial.selenic.com/"> | |
1994 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1994 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
1995 | </div> |
|
1995 | </div> | |
1996 | <ul> |
|
1996 | <ul> | |
1997 | <li><a href="/shortlog">log</a></li> |
|
1997 | <li><a href="/shortlog">log</a></li> | |
1998 | <li><a href="/graph">graph</a></li> |
|
1998 | <li><a href="/graph">graph</a></li> | |
1999 | <li><a href="/tags">tags</a></li> |
|
1999 | <li><a href="/tags">tags</a></li> | |
2000 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2000 | <li><a href="/bookmarks">bookmarks</a></li> | |
2001 | <li><a href="/branches">branches</a></li> |
|
2001 | <li><a href="/branches">branches</a></li> | |
2002 | </ul> |
|
2002 | </ul> | |
2003 | <ul> |
|
2003 | <ul> | |
2004 | <li class="active"><a href="/help">help</a></li> |
|
2004 | <li class="active"><a href="/help">help</a></li> | |
2005 | </ul> |
|
2005 | </ul> | |
2006 | </div> |
|
2006 | </div> | |
2007 |
|
2007 | |||
2008 | <div class="main"> |
|
2008 | <div class="main"> | |
2009 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2009 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2010 | <h3>Help: revisions</h3> |
|
2010 | <h3>Help: revisions</h3> | |
2011 |
|
2011 | |||
2012 | <form class="search" action="/log"> |
|
2012 | <form class="search" action="/log"> | |
2013 |
|
2013 | |||
2014 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2014 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
2015 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2015 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2016 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2016 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2017 | </form> |
|
2017 | </form> | |
2018 | <div id="doc"> |
|
2018 | <div id="doc"> | |
2019 | <h1>Specifying Single Revisions</h1> |
|
2019 | <h1>Specifying Single Revisions</h1> | |
2020 | <p> |
|
2020 | <p> | |
2021 | Mercurial supports several ways to specify individual revisions. |
|
2021 | Mercurial supports several ways to specify individual revisions. | |
2022 | </p> |
|
2022 | </p> | |
2023 | <p> |
|
2023 | <p> | |
2024 | A plain integer is treated as a revision number. Negative integers are |
|
2024 | A plain integer is treated as a revision number. Negative integers are | |
2025 | treated as sequential offsets from the tip, with -1 denoting the tip, |
|
2025 | treated as sequential offsets from the tip, with -1 denoting the tip, | |
2026 | -2 denoting the revision prior to the tip, and so forth. |
|
2026 | -2 denoting the revision prior to the tip, and so forth. | |
2027 | </p> |
|
2027 | </p> | |
2028 | <p> |
|
2028 | <p> | |
2029 | A 40-digit hexadecimal string is treated as a unique revision |
|
2029 | A 40-digit hexadecimal string is treated as a unique revision | |
2030 | identifier. |
|
2030 | identifier. | |
2031 | </p> |
|
2031 | </p> | |
2032 | <p> |
|
2032 | <p> | |
2033 | A hexadecimal string less than 40 characters long is treated as a |
|
2033 | A hexadecimal string less than 40 characters long is treated as a | |
2034 | unique revision identifier and is referred to as a short-form |
|
2034 | unique revision identifier and is referred to as a short-form | |
2035 | identifier. A short-form identifier is only valid if it is the prefix |
|
2035 | identifier. A short-form identifier is only valid if it is the prefix | |
2036 | of exactly one full-length identifier. |
|
2036 | of exactly one full-length identifier. | |
2037 | </p> |
|
2037 | </p> | |
2038 | <p> |
|
2038 | <p> | |
2039 | Any other string is treated as a bookmark, tag, or branch name. A |
|
2039 | Any other string is treated as a bookmark, tag, or branch name. A | |
2040 | bookmark is a movable pointer to a revision. A tag is a permanent name |
|
2040 | bookmark is a movable pointer to a revision. A tag is a permanent name | |
2041 | associated with a revision. A branch name denotes the tipmost open branch head |
|
2041 | associated with a revision. A branch name denotes the tipmost open branch head | |
2042 | of that branch - or if they are all closed, the tipmost closed head of the |
|
2042 | of that branch - or if they are all closed, the tipmost closed head of the | |
2043 | branch. Bookmark, tag, and branch names must not contain the ":" character. |
|
2043 | branch. Bookmark, tag, and branch names must not contain the ":" character. | |
2044 | </p> |
|
2044 | </p> | |
2045 | <p> |
|
2045 | <p> | |
2046 | The reserved name "tip" always identifies the most recent revision. |
|
2046 | The reserved name "tip" always identifies the most recent revision. | |
2047 | </p> |
|
2047 | </p> | |
2048 | <p> |
|
2048 | <p> | |
2049 | The reserved name "null" indicates the null revision. This is the |
|
2049 | The reserved name "null" indicates the null revision. This is the | |
2050 | revision of an empty repository, and the parent of revision 0. |
|
2050 | revision of an empty repository, and the parent of revision 0. | |
2051 | </p> |
|
2051 | </p> | |
2052 | <p> |
|
2052 | <p> | |
2053 | The reserved name "." indicates the working directory parent. If no |
|
2053 | The reserved name "." indicates the working directory parent. If no | |
2054 | working directory is checked out, it is equivalent to null. If an |
|
2054 | working directory is checked out, it is equivalent to null. If an | |
2055 | uncommitted merge is in progress, "." is the revision of the first |
|
2055 | uncommitted merge is in progress, "." is the revision of the first | |
2056 | parent. |
|
2056 | parent. | |
2057 | </p> |
|
2057 | </p> | |
2058 |
|
2058 | |||
2059 | </div> |
|
2059 | </div> | |
2060 | </div> |
|
2060 | </div> | |
2061 | </div> |
|
2061 | </div> | |
2062 |
|
2062 | |||
2063 | <script type="text/javascript">process_dates()</script> |
|
2063 | <script type="text/javascript">process_dates()</script> | |
2064 |
|
2064 | |||
2065 |
|
2065 | |||
2066 | </body> |
|
2066 | </body> | |
2067 | </html> |
|
2067 | </html> | |
2068 |
|
2068 | |||
2069 |
|
2069 | |||
2070 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
2070 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
2071 |
|
2071 | |||
2072 | #endif |
|
2072 | #endif |
@@ -1,1581 +1,1581 b'' | |||||
1 | $ checkundo() |
|
1 | $ checkundo() | |
2 | > { |
|
2 | > { | |
3 | > if [ -f .hg/store/undo ]; then |
|
3 | > if [ -f .hg/store/undo ]; then | |
4 | > echo ".hg/store/undo still exists after $1" |
|
4 | > echo ".hg/store/undo still exists after $1" | |
5 | > fi |
|
5 | > fi | |
6 | > } |
|
6 | > } | |
7 |
|
7 | |||
8 | $ echo "[extensions]" >> $HGRCPATH |
|
8 | $ echo "[extensions]" >> $HGRCPATH | |
9 | $ echo "mq=" >> $HGRCPATH |
|
9 | $ echo "mq=" >> $HGRCPATH | |
10 |
|
10 | |||
11 | $ echo "[mq]" >> $HGRCPATH |
|
11 | $ echo "[mq]" >> $HGRCPATH | |
12 | $ echo "plain=true" >> $HGRCPATH |
|
12 | $ echo "plain=true" >> $HGRCPATH | |
13 |
|
13 | |||
14 |
|
14 | |||
15 | help |
|
15 | help | |
16 |
|
16 | |||
17 | $ hg help mq |
|
17 | $ hg help mq | |
18 | mq extension - manage a stack of patches |
|
18 | mq extension - manage a stack of patches | |
19 |
|
19 | |||
20 | This extension lets you work with a stack of patches in a Mercurial |
|
20 | This extension lets you work with a stack of patches in a Mercurial | |
21 | repository. It manages two stacks of patches - all known patches, and applied |
|
21 | repository. It manages two stacks of patches - all known patches, and applied | |
22 | patches (subset of known patches). |
|
22 | patches (subset of known patches). | |
23 |
|
23 | |||
24 | Known patches are represented as patch files in the .hg/patches directory. |
|
24 | Known patches are represented as patch files in the .hg/patches directory. | |
25 | Applied patches are both patch files and changesets. |
|
25 | Applied patches are both patch files and changesets. | |
26 |
|
26 | |||
27 | Common tasks (use "hg help command" for more details): |
|
27 | Common tasks (use "hg help command" for more details): | |
28 |
|
28 | |||
29 | create new patch qnew |
|
29 | create new patch qnew | |
30 | import existing patch qimport |
|
30 | import existing patch qimport | |
31 |
|
31 | |||
32 | print patch series qseries |
|
32 | print patch series qseries | |
33 | print applied patches qapplied |
|
33 | print applied patches qapplied | |
34 |
|
34 | |||
35 | add known patch to applied stack qpush |
|
35 | add known patch to applied stack qpush | |
36 | remove patch from applied stack qpop |
|
36 | remove patch from applied stack qpop | |
37 | refresh contents of top applied patch qrefresh |
|
37 | refresh contents of top applied patch qrefresh | |
38 |
|
38 | |||
39 | By default, mq will automatically use git patches when required to avoid |
|
39 | By default, mq will automatically use git patches when required to avoid | |
40 | losing file mode changes, copy records, binary files or empty files creations |
|
40 | losing file mode changes, copy records, binary files or empty files creations | |
41 | or deletions. This behaviour can be configured with: |
|
41 | or deletions. This behaviour can be configured with: | |
42 |
|
42 | |||
43 | [mq] |
|
43 | [mq] | |
44 | git = auto/keep/yes/no |
|
44 | git = auto/keep/yes/no | |
45 |
|
45 | |||
46 | If set to 'keep', mq will obey the [diff] section configuration while |
|
46 | If set to 'keep', mq will obey the [diff] section configuration while | |
47 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq |
|
47 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq | |
48 | will override the [diff] section and always generate git or regular patches, |
|
48 | will override the [diff] section and always generate git or regular patches, | |
49 | possibly losing data in the second case. |
|
49 | possibly losing data in the second case. | |
50 |
|
50 | |||
51 | It may be desirable for mq changesets to be kept in the secret phase (see "hg |
|
51 | It may be desirable for mq changesets to be kept in the secret phase (see "hg | |
52 | help phases"), which can be enabled with the following setting: |
|
52 | help phases"), which can be enabled with the following setting: | |
53 |
|
53 | |||
54 | [mq] |
|
54 | [mq] | |
55 | secret = True |
|
55 | secret = True | |
56 |
|
56 | |||
57 | You will by default be managing a patch queue named "patches". You can create |
|
57 | You will by default be managing a patch queue named "patches". You can create | |
58 | other, independent patch queues with the "hg qqueue" command. |
|
58 | other, independent patch queues with the "hg qqueue" command. | |
59 |
|
59 | |||
60 | If the working directory contains uncommitted files, qpush, qpop and qgoto |
|
60 | If the working directory contains uncommitted files, qpush, qpop and qgoto | |
61 | abort immediately. If -f/--force is used, the changes are discarded. Setting: |
|
61 | abort immediately. If -f/--force is used, the changes are discarded. Setting: | |
62 |
|
62 | |||
63 | [mq] |
|
63 | [mq] | |
64 | keepchanges = True |
|
64 | keepchanges = True | |
65 |
|
65 | |||
66 | make them behave as if --keep-changes were passed, and non-conflicting local |
|
66 | make them behave as if --keep-changes were passed, and non-conflicting local | |
67 | changes will be tolerated and preserved. If incompatible options such as |
|
67 | changes will be tolerated and preserved. If incompatible options such as | |
68 | -f/--force or --exact are passed, this setting is ignored. |
|
68 | -f/--force or --exact are passed, this setting is ignored. | |
69 |
|
69 | |||
70 | This extension used to provide a strip command. This command now lives in the |
|
70 | This extension used to provide a strip command. This command now lives in the | |
71 | strip extension. |
|
71 | strip extension. | |
72 |
|
72 | |||
73 | list of commands: |
|
73 | list of commands: | |
74 |
|
74 | |||
75 | qapplied print the patches already applied |
|
75 | qapplied print the patches already applied | |
76 | qclone clone main and patch repository at same time |
|
76 | qclone clone main and patch repository at same time | |
77 | qdelete remove patches from queue |
|
77 | qdelete remove patches from queue | |
78 | qdiff diff of the current patch and subsequent modifications |
|
78 | qdiff diff of the current patch and subsequent modifications | |
79 | qfinish move applied patches into repository history |
|
79 | qfinish move applied patches into repository history | |
80 | qfold fold the named patches into the current patch |
|
80 | qfold fold the named patches into the current patch | |
81 | qgoto push or pop patches until named patch is at top of stack |
|
81 | qgoto push or pop patches until named patch is at top of stack | |
82 | qguard set or print guards for a patch |
|
82 | qguard set or print guards for a patch | |
83 | qheader print the header of the topmost or specified patch |
|
83 | qheader print the header of the topmost or specified patch | |
84 | qimport import a patch or existing changeset |
|
84 | qimport import a patch or existing changeset | |
85 | qnew create a new patch |
|
85 | qnew create a new patch | |
86 | qnext print the name of the next pushable patch |
|
86 | qnext print the name of the next pushable patch | |
87 | qpop pop the current patch off the stack |
|
87 | qpop pop the current patch off the stack | |
88 | qprev print the name of the preceding applied patch |
|
88 | qprev print the name of the preceding applied patch | |
89 | qpush push the next patch onto the stack |
|
89 | qpush push the next patch onto the stack | |
90 | qqueue manage multiple patch queues |
|
90 | qqueue manage multiple patch queues | |
91 | qrefresh update the current patch |
|
91 | qrefresh update the current patch | |
92 | qrename rename a patch |
|
92 | qrename rename a patch | |
93 | qselect set or print guarded patches to push |
|
93 | qselect set or print guarded patches to push | |
94 | qseries print the entire series file |
|
94 | qseries print the entire series file | |
95 | qtop print the name of the current patch |
|
95 | qtop print the name of the current patch | |
96 | qunapplied print the patches not yet applied |
|
96 | qunapplied print the patches not yet applied | |
97 |
|
97 | |||
98 |
use "hg |
|
98 | (use "hg help -v mq" to show built-in aliases and global options) | |
99 |
|
99 | |||
100 | $ hg init a |
|
100 | $ hg init a | |
101 | $ cd a |
|
101 | $ cd a | |
102 | $ echo a > a |
|
102 | $ echo a > a | |
103 | $ hg ci -Ama |
|
103 | $ hg ci -Ama | |
104 | adding a |
|
104 | adding a | |
105 |
|
105 | |||
106 | $ hg clone . ../k |
|
106 | $ hg clone . ../k | |
107 | updating to branch default |
|
107 | updating to branch default | |
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 |
|
109 | |||
110 | $ mkdir b |
|
110 | $ mkdir b | |
111 | $ echo z > b/z |
|
111 | $ echo z > b/z | |
112 | $ hg ci -Ama |
|
112 | $ hg ci -Ama | |
113 | adding b/z |
|
113 | adding b/z | |
114 |
|
114 | |||
115 |
|
115 | |||
116 | qinit |
|
116 | qinit | |
117 |
|
117 | |||
118 | $ hg qinit |
|
118 | $ hg qinit | |
119 |
|
119 | |||
120 | $ cd .. |
|
120 | $ cd .. | |
121 | $ hg init b |
|
121 | $ hg init b | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | -R qinit |
|
124 | -R qinit | |
125 |
|
125 | |||
126 | $ hg -R b qinit |
|
126 | $ hg -R b qinit | |
127 |
|
127 | |||
128 | $ hg init c |
|
128 | $ hg init c | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | qinit -c |
|
131 | qinit -c | |
132 |
|
132 | |||
133 | $ hg --cwd c qinit -c |
|
133 | $ hg --cwd c qinit -c | |
134 | $ hg -R c/.hg/patches st |
|
134 | $ hg -R c/.hg/patches st | |
135 | A .hgignore |
|
135 | A .hgignore | |
136 | A series |
|
136 | A series | |
137 |
|
137 | |||
138 |
|
138 | |||
139 | qinit; qinit -c |
|
139 | qinit; qinit -c | |
140 |
|
140 | |||
141 | $ hg init d |
|
141 | $ hg init d | |
142 | $ cd d |
|
142 | $ cd d | |
143 | $ hg qinit |
|
143 | $ hg qinit | |
144 | $ hg qinit -c |
|
144 | $ hg qinit -c | |
145 |
|
145 | |||
146 | qinit -c should create both files if they don't exist |
|
146 | qinit -c should create both files if they don't exist | |
147 |
|
147 | |||
148 | $ cat .hg/patches/.hgignore |
|
148 | $ cat .hg/patches/.hgignore | |
149 | ^\.hg |
|
149 | ^\.hg | |
150 | ^\.mq |
|
150 | ^\.mq | |
151 | syntax: glob |
|
151 | syntax: glob | |
152 | status |
|
152 | status | |
153 | guards |
|
153 | guards | |
154 | $ cat .hg/patches/series |
|
154 | $ cat .hg/patches/series | |
155 | $ hg qinit -c |
|
155 | $ hg qinit -c | |
156 | abort: repository $TESTTMP/d/.hg/patches already exists! (glob) |
|
156 | abort: repository $TESTTMP/d/.hg/patches already exists! (glob) | |
157 | [255] |
|
157 | [255] | |
158 | $ cd .. |
|
158 | $ cd .. | |
159 |
|
159 | |||
160 | $ echo '% qinit; <stuff>; qinit -c' |
|
160 | $ echo '% qinit; <stuff>; qinit -c' | |
161 | % qinit; <stuff>; qinit -c |
|
161 | % qinit; <stuff>; qinit -c | |
162 | $ hg init e |
|
162 | $ hg init e | |
163 | $ cd e |
|
163 | $ cd e | |
164 | $ hg qnew A |
|
164 | $ hg qnew A | |
165 | $ checkundo qnew |
|
165 | $ checkundo qnew | |
166 | $ echo foo > foo |
|
166 | $ echo foo > foo | |
167 | $ hg phase -r qbase |
|
167 | $ hg phase -r qbase | |
168 | 0: draft |
|
168 | 0: draft | |
169 | $ hg add foo |
|
169 | $ hg add foo | |
170 | $ hg qrefresh |
|
170 | $ hg qrefresh | |
171 | $ hg phase -r qbase |
|
171 | $ hg phase -r qbase | |
172 | 0: draft |
|
172 | 0: draft | |
173 | $ hg qnew B |
|
173 | $ hg qnew B | |
174 | $ echo >> foo |
|
174 | $ echo >> foo | |
175 | $ hg qrefresh |
|
175 | $ hg qrefresh | |
176 | $ echo status >> .hg/patches/.hgignore |
|
176 | $ echo status >> .hg/patches/.hgignore | |
177 | $ echo bleh >> .hg/patches/.hgignore |
|
177 | $ echo bleh >> .hg/patches/.hgignore | |
178 | $ hg qinit -c |
|
178 | $ hg qinit -c | |
179 | adding .hg/patches/A (glob) |
|
179 | adding .hg/patches/A (glob) | |
180 | adding .hg/patches/B (glob) |
|
180 | adding .hg/patches/B (glob) | |
181 | $ hg -R .hg/patches status |
|
181 | $ hg -R .hg/patches status | |
182 | A .hgignore |
|
182 | A .hgignore | |
183 | A A |
|
183 | A A | |
184 | A B |
|
184 | A B | |
185 | A series |
|
185 | A series | |
186 |
|
186 | |||
187 | qinit -c shouldn't touch these files if they already exist |
|
187 | qinit -c shouldn't touch these files if they already exist | |
188 |
|
188 | |||
189 | $ cat .hg/patches/.hgignore |
|
189 | $ cat .hg/patches/.hgignore | |
190 | status |
|
190 | status | |
191 | bleh |
|
191 | bleh | |
192 | $ cat .hg/patches/series |
|
192 | $ cat .hg/patches/series | |
193 | A |
|
193 | A | |
194 | B |
|
194 | B | |
195 |
|
195 | |||
196 | add an untracked file |
|
196 | add an untracked file | |
197 |
|
197 | |||
198 | $ echo >> .hg/patches/flaf |
|
198 | $ echo >> .hg/patches/flaf | |
199 |
|
199 | |||
200 | status --mq with color (issue2096) |
|
200 | status --mq with color (issue2096) | |
201 |
|
201 | |||
202 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always |
|
202 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always | |
203 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1m.hgignore\x1b[0m (esc) |
|
203 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1m.hgignore\x1b[0m (esc) | |
204 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mA\x1b[0m (esc) |
|
204 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mA\x1b[0m (esc) | |
205 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mB\x1b[0m (esc) |
|
205 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mB\x1b[0m (esc) | |
206 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mseries\x1b[0m (esc) |
|
206 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mseries\x1b[0m (esc) | |
207 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mflaf\x1b[0m (esc) |
|
207 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mflaf\x1b[0m (esc) | |
208 |
|
208 | |||
209 | try the --mq option on a command provided by an extension |
|
209 | try the --mq option on a command provided by an extension | |
210 |
|
210 | |||
211 | $ hg purge --mq --verbose --config extensions.purge= |
|
211 | $ hg purge --mq --verbose --config extensions.purge= | |
212 | removing file flaf |
|
212 | removing file flaf | |
213 |
|
213 | |||
214 | $ cd .. |
|
214 | $ cd .. | |
215 |
|
215 | |||
216 | #if no-outer-repo |
|
216 | #if no-outer-repo | |
217 |
|
217 | |||
218 | init --mq without repo |
|
218 | init --mq without repo | |
219 |
|
219 | |||
220 | $ mkdir f |
|
220 | $ mkdir f | |
221 | $ cd f |
|
221 | $ cd f | |
222 | $ hg init --mq |
|
222 | $ hg init --mq | |
223 | abort: there is no Mercurial repository here (.hg not found) |
|
223 | abort: there is no Mercurial repository here (.hg not found) | |
224 | [255] |
|
224 | [255] | |
225 | $ cd .. |
|
225 | $ cd .. | |
226 |
|
226 | |||
227 | #endif |
|
227 | #endif | |
228 |
|
228 | |||
229 | init --mq with repo path |
|
229 | init --mq with repo path | |
230 |
|
230 | |||
231 | $ hg init g |
|
231 | $ hg init g | |
232 | $ hg init --mq g |
|
232 | $ hg init --mq g | |
233 | $ test -d g/.hg/patches/.hg |
|
233 | $ test -d g/.hg/patches/.hg | |
234 |
|
234 | |||
235 | init --mq with nonexistent directory |
|
235 | init --mq with nonexistent directory | |
236 |
|
236 | |||
237 | $ hg init --mq nonexistentdir |
|
237 | $ hg init --mq nonexistentdir | |
238 | abort: repository nonexistentdir not found! |
|
238 | abort: repository nonexistentdir not found! | |
239 | [255] |
|
239 | [255] | |
240 |
|
240 | |||
241 |
|
241 | |||
242 | init --mq with bundle (non "local") |
|
242 | init --mq with bundle (non "local") | |
243 |
|
243 | |||
244 | $ hg -R a bundle --all a.bundle >/dev/null |
|
244 | $ hg -R a bundle --all a.bundle >/dev/null | |
245 | $ hg init --mq a.bundle |
|
245 | $ hg init --mq a.bundle | |
246 | abort: only a local queue repository may be initialized |
|
246 | abort: only a local queue repository may be initialized | |
247 | [255] |
|
247 | [255] | |
248 |
|
248 | |||
249 | $ cd a |
|
249 | $ cd a | |
250 |
|
250 | |||
251 | $ hg qnew -m 'foo bar' test.patch |
|
251 | $ hg qnew -m 'foo bar' test.patch | |
252 |
|
252 | |||
253 | $ echo '# comment' > .hg/patches/series.tmp |
|
253 | $ echo '# comment' > .hg/patches/series.tmp | |
254 | $ echo >> .hg/patches/series.tmp # empty line |
|
254 | $ echo >> .hg/patches/series.tmp # empty line | |
255 | $ cat .hg/patches/series >> .hg/patches/series.tmp |
|
255 | $ cat .hg/patches/series >> .hg/patches/series.tmp | |
256 | $ mv .hg/patches/series.tmp .hg/patches/series |
|
256 | $ mv .hg/patches/series.tmp .hg/patches/series | |
257 |
|
257 | |||
258 |
|
258 | |||
259 | qrefresh |
|
259 | qrefresh | |
260 |
|
260 | |||
261 | $ echo a >> a |
|
261 | $ echo a >> a | |
262 | $ hg qrefresh |
|
262 | $ hg qrefresh | |
263 | $ cat .hg/patches/test.patch |
|
263 | $ cat .hg/patches/test.patch | |
264 | foo bar |
|
264 | foo bar | |
265 |
|
265 | |||
266 | diff -r [a-f0-9]* a (re) |
|
266 | diff -r [a-f0-9]* a (re) | |
267 | --- a/a\t(?P<date>.*) (re) |
|
267 | --- a/a\t(?P<date>.*) (re) | |
268 | \+\+\+ b/a\t(?P<date2>.*) (re) |
|
268 | \+\+\+ b/a\t(?P<date2>.*) (re) | |
269 | @@ -1,1 +1,2 @@ |
|
269 | @@ -1,1 +1,2 @@ | |
270 | a |
|
270 | a | |
271 | +a |
|
271 | +a | |
272 |
|
272 | |||
273 | empty qrefresh |
|
273 | empty qrefresh | |
274 |
|
274 | |||
275 | $ hg qrefresh -X a |
|
275 | $ hg qrefresh -X a | |
276 |
|
276 | |||
277 | revision: |
|
277 | revision: | |
278 |
|
278 | |||
279 | $ hg diff -r -2 -r -1 |
|
279 | $ hg diff -r -2 -r -1 | |
280 |
|
280 | |||
281 | patch: |
|
281 | patch: | |
282 |
|
282 | |||
283 | $ cat .hg/patches/test.patch |
|
283 | $ cat .hg/patches/test.patch | |
284 | foo bar |
|
284 | foo bar | |
285 |
|
285 | |||
286 |
|
286 | |||
287 | working dir diff: |
|
287 | working dir diff: | |
288 |
|
288 | |||
289 | $ hg diff --nodates -q |
|
289 | $ hg diff --nodates -q | |
290 | --- a/a |
|
290 | --- a/a | |
291 | +++ b/a |
|
291 | +++ b/a | |
292 | @@ -1,1 +1,2 @@ |
|
292 | @@ -1,1 +1,2 @@ | |
293 | a |
|
293 | a | |
294 | +a |
|
294 | +a | |
295 |
|
295 | |||
296 | restore things |
|
296 | restore things | |
297 |
|
297 | |||
298 | $ hg qrefresh |
|
298 | $ hg qrefresh | |
299 | $ checkundo qrefresh |
|
299 | $ checkundo qrefresh | |
300 |
|
300 | |||
301 |
|
301 | |||
302 | qpop |
|
302 | qpop | |
303 |
|
303 | |||
304 | $ hg qpop |
|
304 | $ hg qpop | |
305 | popping test.patch |
|
305 | popping test.patch | |
306 | patch queue now empty |
|
306 | patch queue now empty | |
307 | $ checkundo qpop |
|
307 | $ checkundo qpop | |
308 |
|
308 | |||
309 |
|
309 | |||
310 | qpush with dump of tag cache |
|
310 | qpush with dump of tag cache | |
311 | Dump the tag cache to ensure that it has exactly one head after qpush. |
|
311 | Dump the tag cache to ensure that it has exactly one head after qpush. | |
312 |
|
312 | |||
313 | $ rm -f .hg/cache/tags |
|
313 | $ rm -f .hg/cache/tags | |
314 | $ hg tags > /dev/null |
|
314 | $ hg tags > /dev/null | |
315 |
|
315 | |||
316 | .hg/cache/tags (pre qpush): |
|
316 | .hg/cache/tags (pre qpush): | |
317 |
|
317 | |||
318 | $ cat .hg/cache/tags |
|
318 | $ cat .hg/cache/tags | |
319 | 1 [\da-f]{40} (re) |
|
319 | 1 [\da-f]{40} (re) | |
320 |
|
320 | |||
321 | $ hg qpush |
|
321 | $ hg qpush | |
322 | applying test.patch |
|
322 | applying test.patch | |
323 | now at: test.patch |
|
323 | now at: test.patch | |
324 | $ hg phase -r qbase |
|
324 | $ hg phase -r qbase | |
325 | 2: draft |
|
325 | 2: draft | |
326 | $ hg tags > /dev/null |
|
326 | $ hg tags > /dev/null | |
327 |
|
327 | |||
328 | .hg/cache/tags (post qpush): |
|
328 | .hg/cache/tags (post qpush): | |
329 |
|
329 | |||
330 | $ cat .hg/cache/tags |
|
330 | $ cat .hg/cache/tags | |
331 | 2 [\da-f]{40} (re) |
|
331 | 2 [\da-f]{40} (re) | |
332 |
|
332 | |||
333 | $ checkundo qpush |
|
333 | $ checkundo qpush | |
334 | $ cd .. |
|
334 | $ cd .. | |
335 |
|
335 | |||
336 |
|
336 | |||
337 | pop/push outside repo |
|
337 | pop/push outside repo | |
338 | $ hg -R a qpop |
|
338 | $ hg -R a qpop | |
339 | popping test.patch |
|
339 | popping test.patch | |
340 | patch queue now empty |
|
340 | patch queue now empty | |
341 | $ hg -R a qpush |
|
341 | $ hg -R a qpush | |
342 | applying test.patch |
|
342 | applying test.patch | |
343 | now at: test.patch |
|
343 | now at: test.patch | |
344 |
|
344 | |||
345 | $ cd a |
|
345 | $ cd a | |
346 | $ hg qnew test2.patch |
|
346 | $ hg qnew test2.patch | |
347 |
|
347 | |||
348 | qrefresh in subdir |
|
348 | qrefresh in subdir | |
349 |
|
349 | |||
350 | $ cd b |
|
350 | $ cd b | |
351 | $ echo a > a |
|
351 | $ echo a > a | |
352 | $ hg add a |
|
352 | $ hg add a | |
353 | $ hg qrefresh |
|
353 | $ hg qrefresh | |
354 |
|
354 | |||
355 | pop/push -a in subdir |
|
355 | pop/push -a in subdir | |
356 |
|
356 | |||
357 | $ hg qpop -a |
|
357 | $ hg qpop -a | |
358 | popping test2.patch |
|
358 | popping test2.patch | |
359 | popping test.patch |
|
359 | popping test.patch | |
360 | patch queue now empty |
|
360 | patch queue now empty | |
361 | $ hg --traceback qpush -a |
|
361 | $ hg --traceback qpush -a | |
362 | applying test.patch |
|
362 | applying test.patch | |
363 | applying test2.patch |
|
363 | applying test2.patch | |
364 | now at: test2.patch |
|
364 | now at: test2.patch | |
365 |
|
365 | |||
366 |
|
366 | |||
367 | setting columns & formatted tests truncating (issue1912) |
|
367 | setting columns & formatted tests truncating (issue1912) | |
368 |
|
368 | |||
369 | $ COLUMNS=4 hg qseries --config ui.formatted=true |
|
369 | $ COLUMNS=4 hg qseries --config ui.formatted=true | |
370 | test.patch |
|
370 | test.patch | |
371 | test2.patch |
|
371 | test2.patch | |
372 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs |
|
372 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs | |
373 | 0 A test.patch: f... |
|
373 | 0 A test.patch: f... | |
374 | 1 A test2.patch: |
|
374 | 1 A test2.patch: | |
375 | $ hg qpop |
|
375 | $ hg qpop | |
376 | popping test2.patch |
|
376 | popping test2.patch | |
377 | now at: test.patch |
|
377 | now at: test.patch | |
378 | $ hg qseries -vs |
|
378 | $ hg qseries -vs | |
379 | 0 A test.patch: foo bar |
|
379 | 0 A test.patch: foo bar | |
380 | 1 U test2.patch: |
|
380 | 1 U test2.patch: | |
381 | $ hg sum | grep mq |
|
381 | $ hg sum | grep mq | |
382 | mq: 1 applied, 1 unapplied |
|
382 | mq: 1 applied, 1 unapplied | |
383 | $ hg qpush |
|
383 | $ hg qpush | |
384 | applying test2.patch |
|
384 | applying test2.patch | |
385 | now at: test2.patch |
|
385 | now at: test2.patch | |
386 | $ hg sum | grep mq |
|
386 | $ hg sum | grep mq | |
387 | mq: 2 applied |
|
387 | mq: 2 applied | |
388 | $ hg qapplied |
|
388 | $ hg qapplied | |
389 | test.patch |
|
389 | test.patch | |
390 | test2.patch |
|
390 | test2.patch | |
391 | $ hg qtop |
|
391 | $ hg qtop | |
392 | test2.patch |
|
392 | test2.patch | |
393 |
|
393 | |||
394 |
|
394 | |||
395 | prev |
|
395 | prev | |
396 |
|
396 | |||
397 | $ hg qapp -1 |
|
397 | $ hg qapp -1 | |
398 | test.patch |
|
398 | test.patch | |
399 |
|
399 | |||
400 | next |
|
400 | next | |
401 |
|
401 | |||
402 | $ hg qunapp -1 |
|
402 | $ hg qunapp -1 | |
403 | all patches applied |
|
403 | all patches applied | |
404 | [1] |
|
404 | [1] | |
405 |
|
405 | |||
406 | $ hg qpop |
|
406 | $ hg qpop | |
407 | popping test2.patch |
|
407 | popping test2.patch | |
408 | now at: test.patch |
|
408 | now at: test.patch | |
409 |
|
409 | |||
410 | commit should fail |
|
410 | commit should fail | |
411 |
|
411 | |||
412 | $ hg commit |
|
412 | $ hg commit | |
413 | abort: cannot commit over an applied mq patch |
|
413 | abort: cannot commit over an applied mq patch | |
414 | [255] |
|
414 | [255] | |
415 |
|
415 | |||
416 | push should fail if draft |
|
416 | push should fail if draft | |
417 |
|
417 | |||
418 | $ hg push ../../k |
|
418 | $ hg push ../../k | |
419 | pushing to ../../k |
|
419 | pushing to ../../k | |
420 | abort: source has mq patches applied |
|
420 | abort: source has mq patches applied | |
421 | [255] |
|
421 | [255] | |
422 |
|
422 | |||
423 |
|
423 | |||
424 | import should fail |
|
424 | import should fail | |
425 |
|
425 | |||
426 | $ hg st . |
|
426 | $ hg st . | |
427 | $ echo foo >> ../a |
|
427 | $ echo foo >> ../a | |
428 | $ hg diff > ../../import.diff |
|
428 | $ hg diff > ../../import.diff | |
429 | $ hg revert --no-backup ../a |
|
429 | $ hg revert --no-backup ../a | |
430 | $ hg import ../../import.diff |
|
430 | $ hg import ../../import.diff | |
431 | abort: cannot import over an applied patch |
|
431 | abort: cannot import over an applied patch | |
432 | [255] |
|
432 | [255] | |
433 | $ hg st |
|
433 | $ hg st | |
434 |
|
434 | |||
435 | import --no-commit should succeed |
|
435 | import --no-commit should succeed | |
436 |
|
436 | |||
437 | $ hg import --no-commit ../../import.diff |
|
437 | $ hg import --no-commit ../../import.diff | |
438 | applying ../../import.diff |
|
438 | applying ../../import.diff | |
439 | $ hg st |
|
439 | $ hg st | |
440 | M a |
|
440 | M a | |
441 | $ hg revert --no-backup ../a |
|
441 | $ hg revert --no-backup ../a | |
442 |
|
442 | |||
443 |
|
443 | |||
444 | qunapplied |
|
444 | qunapplied | |
445 |
|
445 | |||
446 | $ hg qunapplied |
|
446 | $ hg qunapplied | |
447 | test2.patch |
|
447 | test2.patch | |
448 |
|
448 | |||
449 |
|
449 | |||
450 | qpush/qpop with index |
|
450 | qpush/qpop with index | |
451 |
|
451 | |||
452 | $ hg qnew test1b.patch |
|
452 | $ hg qnew test1b.patch | |
453 | $ echo 1b > 1b |
|
453 | $ echo 1b > 1b | |
454 | $ hg add 1b |
|
454 | $ hg add 1b | |
455 | $ hg qrefresh |
|
455 | $ hg qrefresh | |
456 | $ hg qpush 2 |
|
456 | $ hg qpush 2 | |
457 | applying test2.patch |
|
457 | applying test2.patch | |
458 | now at: test2.patch |
|
458 | now at: test2.patch | |
459 | $ hg qpop 0 |
|
459 | $ hg qpop 0 | |
460 | popping test2.patch |
|
460 | popping test2.patch | |
461 | popping test1b.patch |
|
461 | popping test1b.patch | |
462 | now at: test.patch |
|
462 | now at: test.patch | |
463 | $ hg qpush test.patch+1 |
|
463 | $ hg qpush test.patch+1 | |
464 | applying test1b.patch |
|
464 | applying test1b.patch | |
465 | now at: test1b.patch |
|
465 | now at: test1b.patch | |
466 | $ hg qpush test.patch+2 |
|
466 | $ hg qpush test.patch+2 | |
467 | applying test2.patch |
|
467 | applying test2.patch | |
468 | now at: test2.patch |
|
468 | now at: test2.patch | |
469 | $ hg qpop test2.patch-1 |
|
469 | $ hg qpop test2.patch-1 | |
470 | popping test2.patch |
|
470 | popping test2.patch | |
471 | now at: test1b.patch |
|
471 | now at: test1b.patch | |
472 | $ hg qpop test2.patch-2 |
|
472 | $ hg qpop test2.patch-2 | |
473 | popping test1b.patch |
|
473 | popping test1b.patch | |
474 | now at: test.patch |
|
474 | now at: test.patch | |
475 | $ hg qpush test1b.patch+1 |
|
475 | $ hg qpush test1b.patch+1 | |
476 | applying test1b.patch |
|
476 | applying test1b.patch | |
477 | applying test2.patch |
|
477 | applying test2.patch | |
478 | now at: test2.patch |
|
478 | now at: test2.patch | |
479 |
|
479 | |||
480 |
|
480 | |||
481 | qpush --move |
|
481 | qpush --move | |
482 |
|
482 | |||
483 | $ hg qpop -a |
|
483 | $ hg qpop -a | |
484 | popping test2.patch |
|
484 | popping test2.patch | |
485 | popping test1b.patch |
|
485 | popping test1b.patch | |
486 | popping test.patch |
|
486 | popping test.patch | |
487 | patch queue now empty |
|
487 | patch queue now empty | |
488 | $ hg qguard test1b.patch -- -negguard |
|
488 | $ hg qguard test1b.patch -- -negguard | |
489 | $ hg qguard test2.patch -- +posguard |
|
489 | $ hg qguard test2.patch -- +posguard | |
490 | $ hg qpush --move test2.patch # can't move guarded patch |
|
490 | $ hg qpush --move test2.patch # can't move guarded patch | |
491 | cannot push 'test2.patch' - guarded by '+posguard' |
|
491 | cannot push 'test2.patch' - guarded by '+posguard' | |
492 | [1] |
|
492 | [1] | |
493 | $ hg qselect posguard |
|
493 | $ hg qselect posguard | |
494 | number of unguarded, unapplied patches has changed from 2 to 3 |
|
494 | number of unguarded, unapplied patches has changed from 2 to 3 | |
495 | $ hg qpush --move test2.patch # move to front |
|
495 | $ hg qpush --move test2.patch # move to front | |
496 | applying test2.patch |
|
496 | applying test2.patch | |
497 | now at: test2.patch |
|
497 | now at: test2.patch | |
498 | $ hg qpush --move test1b.patch # negative guard unselected |
|
498 | $ hg qpush --move test1b.patch # negative guard unselected | |
499 | applying test1b.patch |
|
499 | applying test1b.patch | |
500 | now at: test1b.patch |
|
500 | now at: test1b.patch | |
501 | $ hg qpush --move test.patch # noop move |
|
501 | $ hg qpush --move test.patch # noop move | |
502 | applying test.patch |
|
502 | applying test.patch | |
503 | now at: test.patch |
|
503 | now at: test.patch | |
504 | $ hg qseries -v |
|
504 | $ hg qseries -v | |
505 | 0 A test2.patch |
|
505 | 0 A test2.patch | |
506 | 1 A test1b.patch |
|
506 | 1 A test1b.patch | |
507 | 2 A test.patch |
|
507 | 2 A test.patch | |
508 | $ hg qpop -a |
|
508 | $ hg qpop -a | |
509 | popping test.patch |
|
509 | popping test.patch | |
510 | popping test1b.patch |
|
510 | popping test1b.patch | |
511 | popping test2.patch |
|
511 | popping test2.patch | |
512 | patch queue now empty |
|
512 | patch queue now empty | |
513 |
|
513 | |||
514 | cleaning up |
|
514 | cleaning up | |
515 |
|
515 | |||
516 | $ hg qselect --none |
|
516 | $ hg qselect --none | |
517 | guards deactivated |
|
517 | guards deactivated | |
518 | number of unguarded, unapplied patches has changed from 3 to 2 |
|
518 | number of unguarded, unapplied patches has changed from 3 to 2 | |
519 | $ hg qguard --none test1b.patch |
|
519 | $ hg qguard --none test1b.patch | |
520 | $ hg qguard --none test2.patch |
|
520 | $ hg qguard --none test2.patch | |
521 | $ hg qpush --move test.patch |
|
521 | $ hg qpush --move test.patch | |
522 | applying test.patch |
|
522 | applying test.patch | |
523 | now at: test.patch |
|
523 | now at: test.patch | |
524 | $ hg qpush --move test1b.patch |
|
524 | $ hg qpush --move test1b.patch | |
525 | applying test1b.patch |
|
525 | applying test1b.patch | |
526 | now at: test1b.patch |
|
526 | now at: test1b.patch | |
527 | $ hg qpush --move bogus # nonexistent patch |
|
527 | $ hg qpush --move bogus # nonexistent patch | |
528 | abort: patch bogus not in series |
|
528 | abort: patch bogus not in series | |
529 | [255] |
|
529 | [255] | |
530 | $ hg qpush --move # no patch |
|
530 | $ hg qpush --move # no patch | |
531 | abort: please specify the patch to move |
|
531 | abort: please specify the patch to move | |
532 | [255] |
|
532 | [255] | |
533 | $ hg qpush --move test.patch # already applied |
|
533 | $ hg qpush --move test.patch # already applied | |
534 | abort: cannot push to a previous patch: test.patch |
|
534 | abort: cannot push to a previous patch: test.patch | |
535 | [255] |
|
535 | [255] | |
536 | $ sed '2i\ |
|
536 | $ sed '2i\ | |
537 | > # make qtip index different in series and fullseries |
|
537 | > # make qtip index different in series and fullseries | |
538 | > ' `hg root`/.hg/patches/series > $TESTTMP/sedtmp |
|
538 | > ' `hg root`/.hg/patches/series > $TESTTMP/sedtmp | |
539 | $ cp $TESTTMP/sedtmp `hg root`/.hg/patches/series |
|
539 | $ cp $TESTTMP/sedtmp `hg root`/.hg/patches/series | |
540 | $ cat `hg root`/.hg/patches/series |
|
540 | $ cat `hg root`/.hg/patches/series | |
541 | # comment |
|
541 | # comment | |
542 | # make qtip index different in series and fullseries |
|
542 | # make qtip index different in series and fullseries | |
543 |
|
543 | |||
544 | test.patch |
|
544 | test.patch | |
545 | test1b.patch |
|
545 | test1b.patch | |
546 | test2.patch |
|
546 | test2.patch | |
547 | $ hg qpush --move test2.patch |
|
547 | $ hg qpush --move test2.patch | |
548 | applying test2.patch |
|
548 | applying test2.patch | |
549 | now at: test2.patch |
|
549 | now at: test2.patch | |
550 |
|
550 | |||
551 |
|
551 | |||
552 | series after move |
|
552 | series after move | |
553 |
|
553 | |||
554 | $ cat `hg root`/.hg/patches/series |
|
554 | $ cat `hg root`/.hg/patches/series | |
555 | # comment |
|
555 | # comment | |
556 | # make qtip index different in series and fullseries |
|
556 | # make qtip index different in series and fullseries | |
557 |
|
557 | |||
558 | test.patch |
|
558 | test.patch | |
559 | test1b.patch |
|
559 | test1b.patch | |
560 | test2.patch |
|
560 | test2.patch | |
561 |
|
561 | |||
562 |
|
562 | |||
563 | pop, qapplied, qunapplied |
|
563 | pop, qapplied, qunapplied | |
564 |
|
564 | |||
565 | $ hg qseries -v |
|
565 | $ hg qseries -v | |
566 | 0 A test.patch |
|
566 | 0 A test.patch | |
567 | 1 A test1b.patch |
|
567 | 1 A test1b.patch | |
568 | 2 A test2.patch |
|
568 | 2 A test2.patch | |
569 |
|
569 | |||
570 | qapplied -1 test.patch |
|
570 | qapplied -1 test.patch | |
571 |
|
571 | |||
572 | $ hg qapplied -1 test.patch |
|
572 | $ hg qapplied -1 test.patch | |
573 | only one patch applied |
|
573 | only one patch applied | |
574 | [1] |
|
574 | [1] | |
575 |
|
575 | |||
576 | qapplied -1 test1b.patch |
|
576 | qapplied -1 test1b.patch | |
577 |
|
577 | |||
578 | $ hg qapplied -1 test1b.patch |
|
578 | $ hg qapplied -1 test1b.patch | |
579 | test.patch |
|
579 | test.patch | |
580 |
|
580 | |||
581 | qapplied -1 test2.patch |
|
581 | qapplied -1 test2.patch | |
582 |
|
582 | |||
583 | $ hg qapplied -1 test2.patch |
|
583 | $ hg qapplied -1 test2.patch | |
584 | test1b.patch |
|
584 | test1b.patch | |
585 |
|
585 | |||
586 | qapplied -1 |
|
586 | qapplied -1 | |
587 |
|
587 | |||
588 | $ hg qapplied -1 |
|
588 | $ hg qapplied -1 | |
589 | test1b.patch |
|
589 | test1b.patch | |
590 |
|
590 | |||
591 | qapplied |
|
591 | qapplied | |
592 |
|
592 | |||
593 | $ hg qapplied |
|
593 | $ hg qapplied | |
594 | test.patch |
|
594 | test.patch | |
595 | test1b.patch |
|
595 | test1b.patch | |
596 | test2.patch |
|
596 | test2.patch | |
597 |
|
597 | |||
598 | qapplied test1b.patch |
|
598 | qapplied test1b.patch | |
599 |
|
599 | |||
600 | $ hg qapplied test1b.patch |
|
600 | $ hg qapplied test1b.patch | |
601 | test.patch |
|
601 | test.patch | |
602 | test1b.patch |
|
602 | test1b.patch | |
603 |
|
603 | |||
604 | qunapplied -1 |
|
604 | qunapplied -1 | |
605 |
|
605 | |||
606 | $ hg qunapplied -1 |
|
606 | $ hg qunapplied -1 | |
607 | all patches applied |
|
607 | all patches applied | |
608 | [1] |
|
608 | [1] | |
609 |
|
609 | |||
610 | qunapplied |
|
610 | qunapplied | |
611 |
|
611 | |||
612 | $ hg qunapplied |
|
612 | $ hg qunapplied | |
613 |
|
613 | |||
614 | popping |
|
614 | popping | |
615 |
|
615 | |||
616 | $ hg qpop |
|
616 | $ hg qpop | |
617 | popping test2.patch |
|
617 | popping test2.patch | |
618 | now at: test1b.patch |
|
618 | now at: test1b.patch | |
619 |
|
619 | |||
620 | qunapplied -1 |
|
620 | qunapplied -1 | |
621 |
|
621 | |||
622 | $ hg qunapplied -1 |
|
622 | $ hg qunapplied -1 | |
623 | test2.patch |
|
623 | test2.patch | |
624 |
|
624 | |||
625 | qunapplied |
|
625 | qunapplied | |
626 |
|
626 | |||
627 | $ hg qunapplied |
|
627 | $ hg qunapplied | |
628 | test2.patch |
|
628 | test2.patch | |
629 |
|
629 | |||
630 | qunapplied test2.patch |
|
630 | qunapplied test2.patch | |
631 |
|
631 | |||
632 | $ hg qunapplied test2.patch |
|
632 | $ hg qunapplied test2.patch | |
633 |
|
633 | |||
634 | qunapplied -1 test2.patch |
|
634 | qunapplied -1 test2.patch | |
635 |
|
635 | |||
636 | $ hg qunapplied -1 test2.patch |
|
636 | $ hg qunapplied -1 test2.patch | |
637 | all patches applied |
|
637 | all patches applied | |
638 | [1] |
|
638 | [1] | |
639 |
|
639 | |||
640 | popping -a |
|
640 | popping -a | |
641 |
|
641 | |||
642 | $ hg qpop -a |
|
642 | $ hg qpop -a | |
643 | popping test1b.patch |
|
643 | popping test1b.patch | |
644 | popping test.patch |
|
644 | popping test.patch | |
645 | patch queue now empty |
|
645 | patch queue now empty | |
646 |
|
646 | |||
647 | qapplied |
|
647 | qapplied | |
648 |
|
648 | |||
649 | $ hg qapplied |
|
649 | $ hg qapplied | |
650 |
|
650 | |||
651 | qapplied -1 |
|
651 | qapplied -1 | |
652 |
|
652 | |||
653 | $ hg qapplied -1 |
|
653 | $ hg qapplied -1 | |
654 | no patches applied |
|
654 | no patches applied | |
655 | [1] |
|
655 | [1] | |
656 | $ hg qpush |
|
656 | $ hg qpush | |
657 | applying test.patch |
|
657 | applying test.patch | |
658 | now at: test.patch |
|
658 | now at: test.patch | |
659 |
|
659 | |||
660 |
|
660 | |||
661 | push should succeed |
|
661 | push should succeed | |
662 |
|
662 | |||
663 | $ hg qpop -a |
|
663 | $ hg qpop -a | |
664 | popping test.patch |
|
664 | popping test.patch | |
665 | patch queue now empty |
|
665 | patch queue now empty | |
666 | $ hg push ../../k |
|
666 | $ hg push ../../k | |
667 | pushing to ../../k |
|
667 | pushing to ../../k | |
668 | searching for changes |
|
668 | searching for changes | |
669 | adding changesets |
|
669 | adding changesets | |
670 | adding manifests |
|
670 | adding manifests | |
671 | adding file changes |
|
671 | adding file changes | |
672 | added 1 changesets with 1 changes to 1 files |
|
672 | added 1 changesets with 1 changes to 1 files | |
673 |
|
673 | |||
674 |
|
674 | |||
675 | we want to start with some patches applied |
|
675 | we want to start with some patches applied | |
676 |
|
676 | |||
677 | $ hg qpush -a |
|
677 | $ hg qpush -a | |
678 | applying test.patch |
|
678 | applying test.patch | |
679 | applying test1b.patch |
|
679 | applying test1b.patch | |
680 | applying test2.patch |
|
680 | applying test2.patch | |
681 | now at: test2.patch |
|
681 | now at: test2.patch | |
682 |
|
682 | |||
683 | % pops all patches and succeeds |
|
683 | % pops all patches and succeeds | |
684 |
|
684 | |||
685 | $ hg qpop -a |
|
685 | $ hg qpop -a | |
686 | popping test2.patch |
|
686 | popping test2.patch | |
687 | popping test1b.patch |
|
687 | popping test1b.patch | |
688 | popping test.patch |
|
688 | popping test.patch | |
689 | patch queue now empty |
|
689 | patch queue now empty | |
690 |
|
690 | |||
691 | % does nothing and succeeds |
|
691 | % does nothing and succeeds | |
692 |
|
692 | |||
693 | $ hg qpop -a |
|
693 | $ hg qpop -a | |
694 | no patches applied |
|
694 | no patches applied | |
695 |
|
695 | |||
696 | % fails - nothing else to pop |
|
696 | % fails - nothing else to pop | |
697 |
|
697 | |||
698 | $ hg qpop |
|
698 | $ hg qpop | |
699 | no patches applied |
|
699 | no patches applied | |
700 | [1] |
|
700 | [1] | |
701 |
|
701 | |||
702 | % pushes a patch and succeeds |
|
702 | % pushes a patch and succeeds | |
703 |
|
703 | |||
704 | $ hg qpush |
|
704 | $ hg qpush | |
705 | applying test.patch |
|
705 | applying test.patch | |
706 | now at: test.patch |
|
706 | now at: test.patch | |
707 |
|
707 | |||
708 | % pops a patch and succeeds |
|
708 | % pops a patch and succeeds | |
709 |
|
709 | |||
710 | $ hg qpop |
|
710 | $ hg qpop | |
711 | popping test.patch |
|
711 | popping test.patch | |
712 | patch queue now empty |
|
712 | patch queue now empty | |
713 |
|
713 | |||
714 | % pushes up to test1b.patch and succeeds |
|
714 | % pushes up to test1b.patch and succeeds | |
715 |
|
715 | |||
716 | $ hg qpush test1b.patch |
|
716 | $ hg qpush test1b.patch | |
717 | applying test.patch |
|
717 | applying test.patch | |
718 | applying test1b.patch |
|
718 | applying test1b.patch | |
719 | now at: test1b.patch |
|
719 | now at: test1b.patch | |
720 |
|
720 | |||
721 | % does nothing and succeeds |
|
721 | % does nothing and succeeds | |
722 |
|
722 | |||
723 | $ hg qpush test1b.patch |
|
723 | $ hg qpush test1b.patch | |
724 | qpush: test1b.patch is already at the top |
|
724 | qpush: test1b.patch is already at the top | |
725 |
|
725 | |||
726 | % does nothing and succeeds |
|
726 | % does nothing and succeeds | |
727 |
|
727 | |||
728 | $ hg qpop test1b.patch |
|
728 | $ hg qpop test1b.patch | |
729 | qpop: test1b.patch is already at the top |
|
729 | qpop: test1b.patch is already at the top | |
730 |
|
730 | |||
731 | % fails - can't push to this patch |
|
731 | % fails - can't push to this patch | |
732 |
|
732 | |||
733 | $ hg qpush test.patch |
|
733 | $ hg qpush test.patch | |
734 | abort: cannot push to a previous patch: test.patch |
|
734 | abort: cannot push to a previous patch: test.patch | |
735 | [255] |
|
735 | [255] | |
736 |
|
736 | |||
737 | % fails - can't pop to this patch |
|
737 | % fails - can't pop to this patch | |
738 |
|
738 | |||
739 | $ hg qpop test2.patch |
|
739 | $ hg qpop test2.patch | |
740 | abort: patch test2.patch is not applied |
|
740 | abort: patch test2.patch is not applied | |
741 | [255] |
|
741 | [255] | |
742 |
|
742 | |||
743 | % pops up to test.patch and succeeds |
|
743 | % pops up to test.patch and succeeds | |
744 |
|
744 | |||
745 | $ hg qpop test.patch |
|
745 | $ hg qpop test.patch | |
746 | popping test1b.patch |
|
746 | popping test1b.patch | |
747 | now at: test.patch |
|
747 | now at: test.patch | |
748 |
|
748 | |||
749 | % pushes all patches and succeeds |
|
749 | % pushes all patches and succeeds | |
750 |
|
750 | |||
751 | $ hg qpush -a |
|
751 | $ hg qpush -a | |
752 | applying test1b.patch |
|
752 | applying test1b.patch | |
753 | applying test2.patch |
|
753 | applying test2.patch | |
754 | now at: test2.patch |
|
754 | now at: test2.patch | |
755 |
|
755 | |||
756 | % does nothing and succeeds |
|
756 | % does nothing and succeeds | |
757 |
|
757 | |||
758 | $ hg qpush -a |
|
758 | $ hg qpush -a | |
759 | all patches are currently applied |
|
759 | all patches are currently applied | |
760 |
|
760 | |||
761 | % fails - nothing else to push |
|
761 | % fails - nothing else to push | |
762 |
|
762 | |||
763 | $ hg qpush |
|
763 | $ hg qpush | |
764 | patch series already fully applied |
|
764 | patch series already fully applied | |
765 | [1] |
|
765 | [1] | |
766 |
|
766 | |||
767 | % does nothing and succeeds |
|
767 | % does nothing and succeeds | |
768 |
|
768 | |||
769 | $ hg qpush test2.patch |
|
769 | $ hg qpush test2.patch | |
770 | qpush: test2.patch is already at the top |
|
770 | qpush: test2.patch is already at the top | |
771 |
|
771 | |||
772 | strip |
|
772 | strip | |
773 |
|
773 | |||
774 | $ cd ../../b |
|
774 | $ cd ../../b | |
775 | $ echo x>x |
|
775 | $ echo x>x | |
776 | $ hg ci -Ama |
|
776 | $ hg ci -Ama | |
777 | adding x |
|
777 | adding x | |
778 | $ hg strip tip |
|
778 | $ hg strip tip | |
779 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
779 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
780 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
780 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) | |
781 | $ hg unbundle .hg/strip-backup/* |
|
781 | $ hg unbundle .hg/strip-backup/* | |
782 | adding changesets |
|
782 | adding changesets | |
783 | adding manifests |
|
783 | adding manifests | |
784 | adding file changes |
|
784 | adding file changes | |
785 | added 1 changesets with 1 changes to 1 files |
|
785 | added 1 changesets with 1 changes to 1 files | |
786 | (run 'hg update' to get a working copy) |
|
786 | (run 'hg update' to get a working copy) | |
787 |
|
787 | |||
788 |
|
788 | |||
789 | strip with local changes, should complain |
|
789 | strip with local changes, should complain | |
790 |
|
790 | |||
791 | $ hg up |
|
791 | $ hg up | |
792 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
792 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
793 | $ echo y>y |
|
793 | $ echo y>y | |
794 | $ hg add y |
|
794 | $ hg add y | |
795 | $ hg strip tip |
|
795 | $ hg strip tip | |
796 | abort: local changes found |
|
796 | abort: local changes found | |
797 | [255] |
|
797 | [255] | |
798 |
|
798 | |||
799 | --force strip with local changes |
|
799 | --force strip with local changes | |
800 |
|
800 | |||
801 | $ hg strip -f tip |
|
801 | $ hg strip -f tip | |
802 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
802 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
803 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
803 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) | |
804 | $ cd .. |
|
804 | $ cd .. | |
805 |
|
805 | |||
806 |
|
806 | |||
807 | cd b; hg qrefresh |
|
807 | cd b; hg qrefresh | |
808 |
|
808 | |||
809 | $ hg init refresh |
|
809 | $ hg init refresh | |
810 | $ cd refresh |
|
810 | $ cd refresh | |
811 | $ echo a > a |
|
811 | $ echo a > a | |
812 | $ hg ci -Ama |
|
812 | $ hg ci -Ama | |
813 | adding a |
|
813 | adding a | |
814 | $ hg qnew -mfoo foo |
|
814 | $ hg qnew -mfoo foo | |
815 | $ echo a >> a |
|
815 | $ echo a >> a | |
816 | $ hg qrefresh |
|
816 | $ hg qrefresh | |
817 | $ mkdir b |
|
817 | $ mkdir b | |
818 | $ cd b |
|
818 | $ cd b | |
819 | $ echo f > f |
|
819 | $ echo f > f | |
820 | $ hg add f |
|
820 | $ hg add f | |
821 | $ hg qrefresh |
|
821 | $ hg qrefresh | |
822 | $ cat ../.hg/patches/foo |
|
822 | $ cat ../.hg/patches/foo | |
823 | foo |
|
823 | foo | |
824 |
|
824 | |||
825 | diff -r cb9a9f314b8b a |
|
825 | diff -r cb9a9f314b8b a | |
826 | --- a/a\t(?P<date>.*) (re) |
|
826 | --- a/a\t(?P<date>.*) (re) | |
827 | \+\+\+ b/a\t(?P<date>.*) (re) |
|
827 | \+\+\+ b/a\t(?P<date>.*) (re) | |
828 | @@ -1,1 +1,2 @@ |
|
828 | @@ -1,1 +1,2 @@ | |
829 | a |
|
829 | a | |
830 | +a |
|
830 | +a | |
831 | diff -r cb9a9f314b8b b/f |
|
831 | diff -r cb9a9f314b8b b/f | |
832 | --- /dev/null\t(?P<date>.*) (re) |
|
832 | --- /dev/null\t(?P<date>.*) (re) | |
833 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
833 | \+\+\+ b/b/f\t(?P<date>.*) (re) | |
834 | @@ -0,0 +1,1 @@ |
|
834 | @@ -0,0 +1,1 @@ | |
835 | +f |
|
835 | +f | |
836 |
|
836 | |||
837 | hg qrefresh . |
|
837 | hg qrefresh . | |
838 |
|
838 | |||
839 | $ hg qrefresh . |
|
839 | $ hg qrefresh . | |
840 | $ cat ../.hg/patches/foo |
|
840 | $ cat ../.hg/patches/foo | |
841 | foo |
|
841 | foo | |
842 |
|
842 | |||
843 | diff -r cb9a9f314b8b b/f |
|
843 | diff -r cb9a9f314b8b b/f | |
844 | --- /dev/null\t(?P<date>.*) (re) |
|
844 | --- /dev/null\t(?P<date>.*) (re) | |
845 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
845 | \+\+\+ b/b/f\t(?P<date>.*) (re) | |
846 | @@ -0,0 +1,1 @@ |
|
846 | @@ -0,0 +1,1 @@ | |
847 | +f |
|
847 | +f | |
848 | $ hg status |
|
848 | $ hg status | |
849 | M a |
|
849 | M a | |
850 |
|
850 | |||
851 |
|
851 | |||
852 | qpush failure |
|
852 | qpush failure | |
853 |
|
853 | |||
854 | $ cd .. |
|
854 | $ cd .. | |
855 | $ hg qrefresh |
|
855 | $ hg qrefresh | |
856 | $ hg qnew -mbar bar |
|
856 | $ hg qnew -mbar bar | |
857 | $ echo foo > foo |
|
857 | $ echo foo > foo | |
858 | $ echo bar > bar |
|
858 | $ echo bar > bar | |
859 | $ hg add foo bar |
|
859 | $ hg add foo bar | |
860 | $ hg qrefresh |
|
860 | $ hg qrefresh | |
861 | $ hg qpop -a |
|
861 | $ hg qpop -a | |
862 | popping bar |
|
862 | popping bar | |
863 | popping foo |
|
863 | popping foo | |
864 | patch queue now empty |
|
864 | patch queue now empty | |
865 | $ echo bar > foo |
|
865 | $ echo bar > foo | |
866 | $ hg qpush -a |
|
866 | $ hg qpush -a | |
867 | applying foo |
|
867 | applying foo | |
868 | applying bar |
|
868 | applying bar | |
869 | file foo already exists |
|
869 | file foo already exists | |
870 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
870 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
871 | patch failed, unable to continue (try -v) |
|
871 | patch failed, unable to continue (try -v) | |
872 | patch failed, rejects left in working dir |
|
872 | patch failed, rejects left in working dir | |
873 | errors during apply, please fix and refresh bar |
|
873 | errors during apply, please fix and refresh bar | |
874 | [2] |
|
874 | [2] | |
875 | $ hg st |
|
875 | $ hg st | |
876 | ? foo |
|
876 | ? foo | |
877 | ? foo.rej |
|
877 | ? foo.rej | |
878 |
|
878 | |||
879 |
|
879 | |||
880 | mq tags |
|
880 | mq tags | |
881 |
|
881 | |||
882 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip |
|
882 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip | |
883 | 0 qparent |
|
883 | 0 qparent | |
884 | 1 foo qbase |
|
884 | 1 foo qbase | |
885 | 2 bar qtip tip |
|
885 | 2 bar qtip tip | |
886 |
|
886 | |||
887 | mq revset |
|
887 | mq revset | |
888 |
|
888 | |||
889 | $ hg log -r 'mq()' --template '{rev}\n' |
|
889 | $ hg log -r 'mq()' --template '{rev}\n' | |
890 | 1 |
|
890 | 1 | |
891 | 2 |
|
891 | 2 | |
892 | $ hg help revsets | grep -i mq |
|
892 | $ hg help revsets | grep -i mq | |
893 | "mq()" |
|
893 | "mq()" | |
894 | Changesets managed by MQ. |
|
894 | Changesets managed by MQ. | |
895 |
|
895 | |||
896 | bad node in status |
|
896 | bad node in status | |
897 |
|
897 | |||
898 | $ hg qpop |
|
898 | $ hg qpop | |
899 | popping bar |
|
899 | popping bar | |
900 | now at: foo |
|
900 | now at: foo | |
901 | $ hg strip -qn tip |
|
901 | $ hg strip -qn tip | |
902 | $ hg tip |
|
902 | $ hg tip | |
903 | changeset: 0:cb9a9f314b8b |
|
903 | changeset: 0:cb9a9f314b8b | |
904 | tag: tip |
|
904 | tag: tip | |
905 | user: test |
|
905 | user: test | |
906 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
906 | date: Thu Jan 01 00:00:00 1970 +0000 | |
907 | summary: a |
|
907 | summary: a | |
908 |
|
908 | |||
909 | $ hg branches |
|
909 | $ hg branches | |
910 | default 0:cb9a9f314b8b |
|
910 | default 0:cb9a9f314b8b | |
911 | $ hg qpop |
|
911 | $ hg qpop | |
912 | no patches applied |
|
912 | no patches applied | |
913 | [1] |
|
913 | [1] | |
914 |
|
914 | |||
915 | $ cd .. |
|
915 | $ cd .. | |
916 |
|
916 | |||
917 |
|
917 | |||
918 | git patches |
|
918 | git patches | |
919 |
|
919 | |||
920 | $ cat >>$HGRCPATH <<EOF |
|
920 | $ cat >>$HGRCPATH <<EOF | |
921 | > [diff] |
|
921 | > [diff] | |
922 | > git = True |
|
922 | > git = True | |
923 | > EOF |
|
923 | > EOF | |
924 | $ hg init git |
|
924 | $ hg init git | |
925 | $ cd git |
|
925 | $ cd git | |
926 | $ hg qinit |
|
926 | $ hg qinit | |
927 |
|
927 | |||
928 | $ hg qnew -m'new file' new |
|
928 | $ hg qnew -m'new file' new | |
929 | $ echo foo > new |
|
929 | $ echo foo > new | |
930 | #if execbit |
|
930 | #if execbit | |
931 | $ chmod +x new |
|
931 | $ chmod +x new | |
932 | #endif |
|
932 | #endif | |
933 | $ hg add new |
|
933 | $ hg add new | |
934 | $ hg qrefresh |
|
934 | $ hg qrefresh | |
935 | #if execbit |
|
935 | #if execbit | |
936 | $ cat .hg/patches/new |
|
936 | $ cat .hg/patches/new | |
937 | new file |
|
937 | new file | |
938 |
|
938 | |||
939 | diff --git a/new b/new |
|
939 | diff --git a/new b/new | |
940 | new file mode 100755 |
|
940 | new file mode 100755 | |
941 | --- /dev/null |
|
941 | --- /dev/null | |
942 | +++ b/new |
|
942 | +++ b/new | |
943 | @@ -0,0 +1,1 @@ |
|
943 | @@ -0,0 +1,1 @@ | |
944 | +foo |
|
944 | +foo | |
945 | #else |
|
945 | #else | |
946 | $ cat .hg/patches/new |
|
946 | $ cat .hg/patches/new | |
947 | new file |
|
947 | new file | |
948 |
|
948 | |||
949 | diff --git a/new b/new |
|
949 | diff --git a/new b/new | |
950 | new file mode 100644 |
|
950 | new file mode 100644 | |
951 | --- /dev/null |
|
951 | --- /dev/null | |
952 | +++ b/new |
|
952 | +++ b/new | |
953 | @@ -0,0 +1,1 @@ |
|
953 | @@ -0,0 +1,1 @@ | |
954 | +foo |
|
954 | +foo | |
955 | #endif |
|
955 | #endif | |
956 |
|
956 | |||
957 | $ hg qnew -m'copy file' copy |
|
957 | $ hg qnew -m'copy file' copy | |
958 | $ hg cp new copy |
|
958 | $ hg cp new copy | |
959 | $ hg qrefresh |
|
959 | $ hg qrefresh | |
960 | $ cat .hg/patches/copy |
|
960 | $ cat .hg/patches/copy | |
961 | copy file |
|
961 | copy file | |
962 |
|
962 | |||
963 | diff --git a/new b/copy |
|
963 | diff --git a/new b/copy | |
964 | copy from new |
|
964 | copy from new | |
965 | copy to copy |
|
965 | copy to copy | |
966 |
|
966 | |||
967 | $ hg qpop |
|
967 | $ hg qpop | |
968 | popping copy |
|
968 | popping copy | |
969 | now at: new |
|
969 | now at: new | |
970 | $ hg qpush |
|
970 | $ hg qpush | |
971 | applying copy |
|
971 | applying copy | |
972 | now at: copy |
|
972 | now at: copy | |
973 | $ hg qdiff |
|
973 | $ hg qdiff | |
974 | diff --git a/new b/copy |
|
974 | diff --git a/new b/copy | |
975 | copy from new |
|
975 | copy from new | |
976 | copy to copy |
|
976 | copy to copy | |
977 | $ cat >>$HGRCPATH <<EOF |
|
977 | $ cat >>$HGRCPATH <<EOF | |
978 | > [diff] |
|
978 | > [diff] | |
979 | > git = False |
|
979 | > git = False | |
980 | > EOF |
|
980 | > EOF | |
981 | $ hg qdiff --git |
|
981 | $ hg qdiff --git | |
982 | diff --git a/new b/copy |
|
982 | diff --git a/new b/copy | |
983 | copy from new |
|
983 | copy from new | |
984 | copy to copy |
|
984 | copy to copy | |
985 | $ cd .. |
|
985 | $ cd .. | |
986 |
|
986 | |||
987 | empty lines in status |
|
987 | empty lines in status | |
988 |
|
988 | |||
989 | $ hg init emptystatus |
|
989 | $ hg init emptystatus | |
990 | $ cd emptystatus |
|
990 | $ cd emptystatus | |
991 | $ hg qinit |
|
991 | $ hg qinit | |
992 | $ printf '\n\n' > .hg/patches/status |
|
992 | $ printf '\n\n' > .hg/patches/status | |
993 | $ hg qser |
|
993 | $ hg qser | |
994 | $ cd .. |
|
994 | $ cd .. | |
995 |
|
995 | |||
996 | bad line in status (without ":") |
|
996 | bad line in status (without ":") | |
997 |
|
997 | |||
998 | $ hg init badstatus |
|
998 | $ hg init badstatus | |
999 | $ cd badstatus |
|
999 | $ cd badstatus | |
1000 | $ hg qinit |
|
1000 | $ hg qinit | |
1001 | $ printf 'babar has no colon in this line\n' > .hg/patches/status |
|
1001 | $ printf 'babar has no colon in this line\n' > .hg/patches/status | |
1002 | $ hg qser |
|
1002 | $ hg qser | |
1003 | malformated mq status line: ['babar has no colon in this line'] |
|
1003 | malformated mq status line: ['babar has no colon in this line'] | |
1004 | $ cd .. |
|
1004 | $ cd .. | |
1005 |
|
1005 | |||
1006 |
|
1006 | |||
1007 | test file addition in slow path |
|
1007 | test file addition in slow path | |
1008 |
|
1008 | |||
1009 | $ hg init slow |
|
1009 | $ hg init slow | |
1010 | $ cd slow |
|
1010 | $ cd slow | |
1011 | $ hg qinit |
|
1011 | $ hg qinit | |
1012 | $ echo foo > foo |
|
1012 | $ echo foo > foo | |
1013 | $ hg add foo |
|
1013 | $ hg add foo | |
1014 | $ hg ci -m 'add foo' |
|
1014 | $ hg ci -m 'add foo' | |
1015 | $ hg qnew bar |
|
1015 | $ hg qnew bar | |
1016 | $ echo bar > bar |
|
1016 | $ echo bar > bar | |
1017 | $ hg add bar |
|
1017 | $ hg add bar | |
1018 | $ hg mv foo baz |
|
1018 | $ hg mv foo baz | |
1019 | $ hg qrefresh --git |
|
1019 | $ hg qrefresh --git | |
1020 | $ hg up -C 0 |
|
1020 | $ hg up -C 0 | |
1021 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1021 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1022 | $ echo >> foo |
|
1022 | $ echo >> foo | |
1023 | $ hg ci -m 'change foo' |
|
1023 | $ hg ci -m 'change foo' | |
1024 | created new head |
|
1024 | created new head | |
1025 | $ hg up -C 1 |
|
1025 | $ hg up -C 1 | |
1026 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1026 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1027 | $ hg qrefresh --git |
|
1027 | $ hg qrefresh --git | |
1028 | $ cat .hg/patches/bar |
|
1028 | $ cat .hg/patches/bar | |
1029 | diff --git a/bar b/bar |
|
1029 | diff --git a/bar b/bar | |
1030 | new file mode 100644 |
|
1030 | new file mode 100644 | |
1031 | --- /dev/null |
|
1031 | --- /dev/null | |
1032 | +++ b/bar |
|
1032 | +++ b/bar | |
1033 | @@ -0,0 +1,1 @@ |
|
1033 | @@ -0,0 +1,1 @@ | |
1034 | +bar |
|
1034 | +bar | |
1035 | diff --git a/foo b/baz |
|
1035 | diff --git a/foo b/baz | |
1036 | rename from foo |
|
1036 | rename from foo | |
1037 | rename to baz |
|
1037 | rename to baz | |
1038 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1038 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1039 | 2 baz (foo) |
|
1039 | 2 baz (foo) | |
1040 | $ hg qrefresh --git |
|
1040 | $ hg qrefresh --git | |
1041 | $ cat .hg/patches/bar |
|
1041 | $ cat .hg/patches/bar | |
1042 | diff --git a/bar b/bar |
|
1042 | diff --git a/bar b/bar | |
1043 | new file mode 100644 |
|
1043 | new file mode 100644 | |
1044 | --- /dev/null |
|
1044 | --- /dev/null | |
1045 | +++ b/bar |
|
1045 | +++ b/bar | |
1046 | @@ -0,0 +1,1 @@ |
|
1046 | @@ -0,0 +1,1 @@ | |
1047 | +bar |
|
1047 | +bar | |
1048 | diff --git a/foo b/baz |
|
1048 | diff --git a/foo b/baz | |
1049 | rename from foo |
|
1049 | rename from foo | |
1050 | rename to baz |
|
1050 | rename to baz | |
1051 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1051 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1052 | 2 baz (foo) |
|
1052 | 2 baz (foo) | |
1053 | $ hg qrefresh |
|
1053 | $ hg qrefresh | |
1054 | $ grep 'diff --git' .hg/patches/bar |
|
1054 | $ grep 'diff --git' .hg/patches/bar | |
1055 | diff --git a/bar b/bar |
|
1055 | diff --git a/bar b/bar | |
1056 | diff --git a/foo b/baz |
|
1056 | diff --git a/foo b/baz | |
1057 |
|
1057 | |||
1058 |
|
1058 | |||
1059 | test file move chains in the slow path |
|
1059 | test file move chains in the slow path | |
1060 |
|
1060 | |||
1061 | $ hg up -C 1 |
|
1061 | $ hg up -C 1 | |
1062 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1062 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1063 | $ echo >> foo |
|
1063 | $ echo >> foo | |
1064 | $ hg ci -m 'change foo again' |
|
1064 | $ hg ci -m 'change foo again' | |
1065 | $ hg up -C 2 |
|
1065 | $ hg up -C 2 | |
1066 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1066 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1067 | $ hg mv bar quux |
|
1067 | $ hg mv bar quux | |
1068 | $ hg mv baz bleh |
|
1068 | $ hg mv baz bleh | |
1069 | $ hg qrefresh --git |
|
1069 | $ hg qrefresh --git | |
1070 | $ cat .hg/patches/bar |
|
1070 | $ cat .hg/patches/bar | |
1071 | diff --git a/foo b/bleh |
|
1071 | diff --git a/foo b/bleh | |
1072 | rename from foo |
|
1072 | rename from foo | |
1073 | rename to bleh |
|
1073 | rename to bleh | |
1074 | diff --git a/quux b/quux |
|
1074 | diff --git a/quux b/quux | |
1075 | new file mode 100644 |
|
1075 | new file mode 100644 | |
1076 | --- /dev/null |
|
1076 | --- /dev/null | |
1077 | +++ b/quux |
|
1077 | +++ b/quux | |
1078 | @@ -0,0 +1,1 @@ |
|
1078 | @@ -0,0 +1,1 @@ | |
1079 | +bar |
|
1079 | +bar | |
1080 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1080 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1081 | 3 bleh (foo) |
|
1081 | 3 bleh (foo) | |
1082 | $ hg mv quux fred |
|
1082 | $ hg mv quux fred | |
1083 | $ hg mv bleh barney |
|
1083 | $ hg mv bleh barney | |
1084 | $ hg qrefresh --git |
|
1084 | $ hg qrefresh --git | |
1085 | $ cat .hg/patches/bar |
|
1085 | $ cat .hg/patches/bar | |
1086 | diff --git a/foo b/barney |
|
1086 | diff --git a/foo b/barney | |
1087 | rename from foo |
|
1087 | rename from foo | |
1088 | rename to barney |
|
1088 | rename to barney | |
1089 | diff --git a/fred b/fred |
|
1089 | diff --git a/fred b/fred | |
1090 | new file mode 100644 |
|
1090 | new file mode 100644 | |
1091 | --- /dev/null |
|
1091 | --- /dev/null | |
1092 | +++ b/fred |
|
1092 | +++ b/fred | |
1093 | @@ -0,0 +1,1 @@ |
|
1093 | @@ -0,0 +1,1 @@ | |
1094 | +bar |
|
1094 | +bar | |
1095 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1095 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1096 | 3 barney (foo) |
|
1096 | 3 barney (foo) | |
1097 |
|
1097 | |||
1098 |
|
1098 | |||
1099 | refresh omitting an added file |
|
1099 | refresh omitting an added file | |
1100 |
|
1100 | |||
1101 | $ hg qnew baz |
|
1101 | $ hg qnew baz | |
1102 | $ echo newfile > newfile |
|
1102 | $ echo newfile > newfile | |
1103 | $ hg add newfile |
|
1103 | $ hg add newfile | |
1104 | $ hg qrefresh |
|
1104 | $ hg qrefresh | |
1105 | $ hg st -A newfile |
|
1105 | $ hg st -A newfile | |
1106 | C newfile |
|
1106 | C newfile | |
1107 | $ hg qrefresh -X newfile |
|
1107 | $ hg qrefresh -X newfile | |
1108 | $ hg st -A newfile |
|
1108 | $ hg st -A newfile | |
1109 | A newfile |
|
1109 | A newfile | |
1110 | $ hg revert newfile |
|
1110 | $ hg revert newfile | |
1111 | $ rm newfile |
|
1111 | $ rm newfile | |
1112 | $ hg qpop |
|
1112 | $ hg qpop | |
1113 | popping baz |
|
1113 | popping baz | |
1114 | now at: bar |
|
1114 | now at: bar | |
1115 |
|
1115 | |||
1116 | test qdel/qrm |
|
1116 | test qdel/qrm | |
1117 |
|
1117 | |||
1118 | $ hg qdel baz |
|
1118 | $ hg qdel baz | |
1119 | $ echo p >> .hg/patches/series |
|
1119 | $ echo p >> .hg/patches/series | |
1120 | $ hg qrm p |
|
1120 | $ hg qrm p | |
1121 | $ hg qser |
|
1121 | $ hg qser | |
1122 | bar |
|
1122 | bar | |
1123 |
|
1123 | |||
1124 | create a git patch |
|
1124 | create a git patch | |
1125 |
|
1125 | |||
1126 | $ echo a > alexander |
|
1126 | $ echo a > alexander | |
1127 | $ hg add alexander |
|
1127 | $ hg add alexander | |
1128 | $ hg qnew -f --git addalexander |
|
1128 | $ hg qnew -f --git addalexander | |
1129 | $ grep diff .hg/patches/addalexander |
|
1129 | $ grep diff .hg/patches/addalexander | |
1130 | diff --git a/alexander b/alexander |
|
1130 | diff --git a/alexander b/alexander | |
1131 |
|
1131 | |||
1132 |
|
1132 | |||
1133 | create a git binary patch |
|
1133 | create a git binary patch | |
1134 |
|
1134 | |||
1135 | $ cat > writebin.py <<EOF |
|
1135 | $ cat > writebin.py <<EOF | |
1136 | > import sys |
|
1136 | > import sys | |
1137 | > path = sys.argv[1] |
|
1137 | > path = sys.argv[1] | |
1138 | > open(path, 'wb').write('BIN\x00ARY') |
|
1138 | > open(path, 'wb').write('BIN\x00ARY') | |
1139 | > EOF |
|
1139 | > EOF | |
1140 | $ python writebin.py bucephalus |
|
1140 | $ python writebin.py bucephalus | |
1141 |
|
1141 | |||
1142 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1142 | $ python "$TESTDIR/md5sum.py" bucephalus | |
1143 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1143 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
1144 | $ hg add bucephalus |
|
1144 | $ hg add bucephalus | |
1145 | $ hg qnew -f --git addbucephalus |
|
1145 | $ hg qnew -f --git addbucephalus | |
1146 | $ grep diff .hg/patches/addbucephalus |
|
1146 | $ grep diff .hg/patches/addbucephalus | |
1147 | diff --git a/bucephalus b/bucephalus |
|
1147 | diff --git a/bucephalus b/bucephalus | |
1148 |
|
1148 | |||
1149 |
|
1149 | |||
1150 | check binary patches can be popped and pushed |
|
1150 | check binary patches can be popped and pushed | |
1151 |
|
1151 | |||
1152 | $ hg qpop |
|
1152 | $ hg qpop | |
1153 | popping addbucephalus |
|
1153 | popping addbucephalus | |
1154 | now at: addalexander |
|
1154 | now at: addalexander | |
1155 | $ test -f bucephalus && echo % bucephalus should not be there |
|
1155 | $ test -f bucephalus && echo % bucephalus should not be there | |
1156 | [1] |
|
1156 | [1] | |
1157 | $ hg qpush |
|
1157 | $ hg qpush | |
1158 | applying addbucephalus |
|
1158 | applying addbucephalus | |
1159 | now at: addbucephalus |
|
1159 | now at: addbucephalus | |
1160 | $ test -f bucephalus |
|
1160 | $ test -f bucephalus | |
1161 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1161 | $ python "$TESTDIR/md5sum.py" bucephalus | |
1162 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1162 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
1163 |
|
1163 | |||
1164 |
|
1164 | |||
1165 |
|
1165 | |||
1166 | strip again |
|
1166 | strip again | |
1167 |
|
1167 | |||
1168 | $ cd .. |
|
1168 | $ cd .. | |
1169 | $ hg init strip |
|
1169 | $ hg init strip | |
1170 | $ cd strip |
|
1170 | $ cd strip | |
1171 | $ touch foo |
|
1171 | $ touch foo | |
1172 | $ hg add foo |
|
1172 | $ hg add foo | |
1173 | $ hg ci -m 'add foo' |
|
1173 | $ hg ci -m 'add foo' | |
1174 | $ echo >> foo |
|
1174 | $ echo >> foo | |
1175 | $ hg ci -m 'change foo 1' |
|
1175 | $ hg ci -m 'change foo 1' | |
1176 | $ hg up -C 0 |
|
1176 | $ hg up -C 0 | |
1177 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1177 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1178 | $ echo 1 >> foo |
|
1178 | $ echo 1 >> foo | |
1179 | $ hg ci -m 'change foo 2' |
|
1179 | $ hg ci -m 'change foo 2' | |
1180 | created new head |
|
1180 | created new head | |
1181 | $ HGMERGE=true hg merge |
|
1181 | $ HGMERGE=true hg merge | |
1182 | merging foo |
|
1182 | merging foo | |
1183 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1183 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1184 | (branch merge, don't forget to commit) |
|
1184 | (branch merge, don't forget to commit) | |
1185 | $ hg ci -m merge |
|
1185 | $ hg ci -m merge | |
1186 | $ hg log |
|
1186 | $ hg log | |
1187 | changeset: 3:99615015637b |
|
1187 | changeset: 3:99615015637b | |
1188 | tag: tip |
|
1188 | tag: tip | |
1189 | parent: 2:20cbbe65cff7 |
|
1189 | parent: 2:20cbbe65cff7 | |
1190 | parent: 1:d2871fc282d4 |
|
1190 | parent: 1:d2871fc282d4 | |
1191 | user: test |
|
1191 | user: test | |
1192 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1192 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1193 | summary: merge |
|
1193 | summary: merge | |
1194 |
|
1194 | |||
1195 | changeset: 2:20cbbe65cff7 |
|
1195 | changeset: 2:20cbbe65cff7 | |
1196 | parent: 0:53245c60e682 |
|
1196 | parent: 0:53245c60e682 | |
1197 | user: test |
|
1197 | user: test | |
1198 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1198 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1199 | summary: change foo 2 |
|
1199 | summary: change foo 2 | |
1200 |
|
1200 | |||
1201 | changeset: 1:d2871fc282d4 |
|
1201 | changeset: 1:d2871fc282d4 | |
1202 | user: test |
|
1202 | user: test | |
1203 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1203 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1204 | summary: change foo 1 |
|
1204 | summary: change foo 1 | |
1205 |
|
1205 | |||
1206 | changeset: 0:53245c60e682 |
|
1206 | changeset: 0:53245c60e682 | |
1207 | user: test |
|
1207 | user: test | |
1208 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1208 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1209 | summary: add foo |
|
1209 | summary: add foo | |
1210 |
|
1210 | |||
1211 | $ hg strip 1 |
|
1211 | $ hg strip 1 | |
1212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1213 | saved backup bundle to $TESTTMP/strip/.hg/strip-backup/*-backup.hg (glob) |
|
1213 | saved backup bundle to $TESTTMP/strip/.hg/strip-backup/*-backup.hg (glob) | |
1214 | $ checkundo strip |
|
1214 | $ checkundo strip | |
1215 | $ hg log |
|
1215 | $ hg log | |
1216 | changeset: 1:20cbbe65cff7 |
|
1216 | changeset: 1:20cbbe65cff7 | |
1217 | tag: tip |
|
1217 | tag: tip | |
1218 | user: test |
|
1218 | user: test | |
1219 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1219 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1220 | summary: change foo 2 |
|
1220 | summary: change foo 2 | |
1221 |
|
1221 | |||
1222 | changeset: 0:53245c60e682 |
|
1222 | changeset: 0:53245c60e682 | |
1223 | user: test |
|
1223 | user: test | |
1224 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1224 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1225 | summary: add foo |
|
1225 | summary: add foo | |
1226 |
|
1226 | |||
1227 | $ cd .. |
|
1227 | $ cd .. | |
1228 |
|
1228 | |||
1229 |
|
1229 | |||
1230 | qclone |
|
1230 | qclone | |
1231 |
|
1231 | |||
1232 | $ qlog() |
|
1232 | $ qlog() | |
1233 | > { |
|
1233 | > { | |
1234 | > echo 'main repo:' |
|
1234 | > echo 'main repo:' | |
1235 | > hg log --template ' rev {rev}: {desc}\n' |
|
1235 | > hg log --template ' rev {rev}: {desc}\n' | |
1236 | > echo 'patch repo:' |
|
1236 | > echo 'patch repo:' | |
1237 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
|
1237 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' | |
1238 | > } |
|
1238 | > } | |
1239 | $ hg init qclonesource |
|
1239 | $ hg init qclonesource | |
1240 | $ cd qclonesource |
|
1240 | $ cd qclonesource | |
1241 | $ echo foo > foo |
|
1241 | $ echo foo > foo | |
1242 | $ hg add foo |
|
1242 | $ hg add foo | |
1243 | $ hg ci -m 'add foo' |
|
1243 | $ hg ci -m 'add foo' | |
1244 | $ hg qinit |
|
1244 | $ hg qinit | |
1245 | $ hg qnew patch1 |
|
1245 | $ hg qnew patch1 | |
1246 | $ echo bar >> foo |
|
1246 | $ echo bar >> foo | |
1247 | $ hg qrefresh -m 'change foo' |
|
1247 | $ hg qrefresh -m 'change foo' | |
1248 | $ cd .. |
|
1248 | $ cd .. | |
1249 |
|
1249 | |||
1250 |
|
1250 | |||
1251 | repo with unversioned patch dir |
|
1251 | repo with unversioned patch dir | |
1252 |
|
1252 | |||
1253 | $ hg qclone qclonesource failure |
|
1253 | $ hg qclone qclonesource failure | |
1254 | abort: versioned patch repository not found (see init --mq) |
|
1254 | abort: versioned patch repository not found (see init --mq) | |
1255 | [255] |
|
1255 | [255] | |
1256 |
|
1256 | |||
1257 | $ cd qclonesource |
|
1257 | $ cd qclonesource | |
1258 | $ hg qinit -c |
|
1258 | $ hg qinit -c | |
1259 | adding .hg/patches/patch1 (glob) |
|
1259 | adding .hg/patches/patch1 (glob) | |
1260 | $ hg qci -m checkpoint |
|
1260 | $ hg qci -m checkpoint | |
1261 | $ qlog |
|
1261 | $ qlog | |
1262 | main repo: |
|
1262 | main repo: | |
1263 | rev 1: change foo |
|
1263 | rev 1: change foo | |
1264 | rev 0: add foo |
|
1264 | rev 0: add foo | |
1265 | patch repo: |
|
1265 | patch repo: | |
1266 | rev 0: checkpoint |
|
1266 | rev 0: checkpoint | |
1267 | $ cd .. |
|
1267 | $ cd .. | |
1268 |
|
1268 | |||
1269 |
|
1269 | |||
1270 | repo with patches applied |
|
1270 | repo with patches applied | |
1271 |
|
1271 | |||
1272 | $ hg qclone qclonesource qclonedest |
|
1272 | $ hg qclone qclonesource qclonedest | |
1273 | updating to branch default |
|
1273 | updating to branch default | |
1274 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1274 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1275 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1275 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1276 | $ cd qclonedest |
|
1276 | $ cd qclonedest | |
1277 | $ qlog |
|
1277 | $ qlog | |
1278 | main repo: |
|
1278 | main repo: | |
1279 | rev 0: add foo |
|
1279 | rev 0: add foo | |
1280 | patch repo: |
|
1280 | patch repo: | |
1281 | rev 0: checkpoint |
|
1281 | rev 0: checkpoint | |
1282 | $ cd .. |
|
1282 | $ cd .. | |
1283 |
|
1283 | |||
1284 |
|
1284 | |||
1285 | repo with patches unapplied |
|
1285 | repo with patches unapplied | |
1286 |
|
1286 | |||
1287 | $ cd qclonesource |
|
1287 | $ cd qclonesource | |
1288 | $ hg qpop -a |
|
1288 | $ hg qpop -a | |
1289 | popping patch1 |
|
1289 | popping patch1 | |
1290 | patch queue now empty |
|
1290 | patch queue now empty | |
1291 | $ qlog |
|
1291 | $ qlog | |
1292 | main repo: |
|
1292 | main repo: | |
1293 | rev 0: add foo |
|
1293 | rev 0: add foo | |
1294 | patch repo: |
|
1294 | patch repo: | |
1295 | rev 0: checkpoint |
|
1295 | rev 0: checkpoint | |
1296 | $ cd .. |
|
1296 | $ cd .. | |
1297 | $ hg qclone qclonesource qclonedest2 |
|
1297 | $ hg qclone qclonesource qclonedest2 | |
1298 | updating to branch default |
|
1298 | updating to branch default | |
1299 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1299 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1300 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1300 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1301 | $ cd qclonedest2 |
|
1301 | $ cd qclonedest2 | |
1302 | $ qlog |
|
1302 | $ qlog | |
1303 | main repo: |
|
1303 | main repo: | |
1304 | rev 0: add foo |
|
1304 | rev 0: add foo | |
1305 | patch repo: |
|
1305 | patch repo: | |
1306 | rev 0: checkpoint |
|
1306 | rev 0: checkpoint | |
1307 | $ cd .. |
|
1307 | $ cd .. | |
1308 |
|
1308 | |||
1309 |
|
1309 | |||
1310 | Issue1033: test applying on an empty file |
|
1310 | Issue1033: test applying on an empty file | |
1311 |
|
1311 | |||
1312 | $ hg init empty |
|
1312 | $ hg init empty | |
1313 | $ cd empty |
|
1313 | $ cd empty | |
1314 | $ touch a |
|
1314 | $ touch a | |
1315 | $ hg ci -Am addempty |
|
1315 | $ hg ci -Am addempty | |
1316 | adding a |
|
1316 | adding a | |
1317 | $ echo a > a |
|
1317 | $ echo a > a | |
1318 | $ hg qnew -f -e changea |
|
1318 | $ hg qnew -f -e changea | |
1319 | $ hg qpop |
|
1319 | $ hg qpop | |
1320 | popping changea |
|
1320 | popping changea | |
1321 | patch queue now empty |
|
1321 | patch queue now empty | |
1322 | $ hg qpush |
|
1322 | $ hg qpush | |
1323 | applying changea |
|
1323 | applying changea | |
1324 | now at: changea |
|
1324 | now at: changea | |
1325 | $ cd .. |
|
1325 | $ cd .. | |
1326 |
|
1326 | |||
1327 | test qpush with --force, issue1087 |
|
1327 | test qpush with --force, issue1087 | |
1328 |
|
1328 | |||
1329 | $ hg init forcepush |
|
1329 | $ hg init forcepush | |
1330 | $ cd forcepush |
|
1330 | $ cd forcepush | |
1331 | $ echo hello > hello.txt |
|
1331 | $ echo hello > hello.txt | |
1332 | $ echo bye > bye.txt |
|
1332 | $ echo bye > bye.txt | |
1333 | $ hg ci -Ama |
|
1333 | $ hg ci -Ama | |
1334 | adding bye.txt |
|
1334 | adding bye.txt | |
1335 | adding hello.txt |
|
1335 | adding hello.txt | |
1336 | $ hg qnew -d '0 0' empty |
|
1336 | $ hg qnew -d '0 0' empty | |
1337 | $ hg qpop |
|
1337 | $ hg qpop | |
1338 | popping empty |
|
1338 | popping empty | |
1339 | patch queue now empty |
|
1339 | patch queue now empty | |
1340 | $ echo world >> hello.txt |
|
1340 | $ echo world >> hello.txt | |
1341 |
|
1341 | |||
1342 |
|
1342 | |||
1343 | qpush should fail, local changes |
|
1343 | qpush should fail, local changes | |
1344 |
|
1344 | |||
1345 | $ hg qpush |
|
1345 | $ hg qpush | |
1346 | abort: local changes found |
|
1346 | abort: local changes found | |
1347 | [255] |
|
1347 | [255] | |
1348 |
|
1348 | |||
1349 |
|
1349 | |||
1350 | apply force, should not discard changes with empty patch |
|
1350 | apply force, should not discard changes with empty patch | |
1351 |
|
1351 | |||
1352 | $ hg qpush -f |
|
1352 | $ hg qpush -f | |
1353 | applying empty |
|
1353 | applying empty | |
1354 | patch empty is empty |
|
1354 | patch empty is empty | |
1355 | now at: empty |
|
1355 | now at: empty | |
1356 | $ hg diff --config diff.nodates=True |
|
1356 | $ hg diff --config diff.nodates=True | |
1357 | diff -r d58265112590 hello.txt |
|
1357 | diff -r d58265112590 hello.txt | |
1358 | --- a/hello.txt |
|
1358 | --- a/hello.txt | |
1359 | +++ b/hello.txt |
|
1359 | +++ b/hello.txt | |
1360 | @@ -1,1 +1,2 @@ |
|
1360 | @@ -1,1 +1,2 @@ | |
1361 | hello |
|
1361 | hello | |
1362 | +world |
|
1362 | +world | |
1363 | $ hg qdiff --config diff.nodates=True |
|
1363 | $ hg qdiff --config diff.nodates=True | |
1364 | diff -r 9ecee4f634e3 hello.txt |
|
1364 | diff -r 9ecee4f634e3 hello.txt | |
1365 | --- a/hello.txt |
|
1365 | --- a/hello.txt | |
1366 | +++ b/hello.txt |
|
1366 | +++ b/hello.txt | |
1367 | @@ -1,1 +1,2 @@ |
|
1367 | @@ -1,1 +1,2 @@ | |
1368 | hello |
|
1368 | hello | |
1369 | +world |
|
1369 | +world | |
1370 | $ hg log -l1 -p |
|
1370 | $ hg log -l1 -p | |
1371 | changeset: 1:d58265112590 |
|
1371 | changeset: 1:d58265112590 | |
1372 | tag: empty |
|
1372 | tag: empty | |
1373 | tag: qbase |
|
1373 | tag: qbase | |
1374 | tag: qtip |
|
1374 | tag: qtip | |
1375 | tag: tip |
|
1375 | tag: tip | |
1376 | user: test |
|
1376 | user: test | |
1377 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1377 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1378 | summary: imported patch empty |
|
1378 | summary: imported patch empty | |
1379 |
|
1379 | |||
1380 |
|
1380 | |||
1381 | $ hg qref -d '0 0' |
|
1381 | $ hg qref -d '0 0' | |
1382 | $ hg qpop |
|
1382 | $ hg qpop | |
1383 | popping empty |
|
1383 | popping empty | |
1384 | patch queue now empty |
|
1384 | patch queue now empty | |
1385 | $ echo universe >> hello.txt |
|
1385 | $ echo universe >> hello.txt | |
1386 | $ echo universe >> bye.txt |
|
1386 | $ echo universe >> bye.txt | |
1387 |
|
1387 | |||
1388 |
|
1388 | |||
1389 | qpush should fail, local changes |
|
1389 | qpush should fail, local changes | |
1390 |
|
1390 | |||
1391 | $ hg qpush |
|
1391 | $ hg qpush | |
1392 | abort: local changes found |
|
1392 | abort: local changes found | |
1393 | [255] |
|
1393 | [255] | |
1394 |
|
1394 | |||
1395 |
|
1395 | |||
1396 | apply force, should discard changes in hello, but not bye |
|
1396 | apply force, should discard changes in hello, but not bye | |
1397 |
|
1397 | |||
1398 | $ hg qpush -f --verbose |
|
1398 | $ hg qpush -f --verbose | |
1399 | applying empty |
|
1399 | applying empty | |
1400 | saving current version of hello.txt as hello.txt.orig |
|
1400 | saving current version of hello.txt as hello.txt.orig | |
1401 | patching file hello.txt |
|
1401 | patching file hello.txt | |
1402 | hello.txt |
|
1402 | hello.txt | |
1403 | now at: empty |
|
1403 | now at: empty | |
1404 | $ hg st |
|
1404 | $ hg st | |
1405 | M bye.txt |
|
1405 | M bye.txt | |
1406 | ? hello.txt.orig |
|
1406 | ? hello.txt.orig | |
1407 | $ hg diff --config diff.nodates=True |
|
1407 | $ hg diff --config diff.nodates=True | |
1408 | diff -r ba252371dbc1 bye.txt |
|
1408 | diff -r ba252371dbc1 bye.txt | |
1409 | --- a/bye.txt |
|
1409 | --- a/bye.txt | |
1410 | +++ b/bye.txt |
|
1410 | +++ b/bye.txt | |
1411 | @@ -1,1 +1,2 @@ |
|
1411 | @@ -1,1 +1,2 @@ | |
1412 | bye |
|
1412 | bye | |
1413 | +universe |
|
1413 | +universe | |
1414 | $ hg qdiff --config diff.nodates=True |
|
1414 | $ hg qdiff --config diff.nodates=True | |
1415 | diff -r 9ecee4f634e3 bye.txt |
|
1415 | diff -r 9ecee4f634e3 bye.txt | |
1416 | --- a/bye.txt |
|
1416 | --- a/bye.txt | |
1417 | +++ b/bye.txt |
|
1417 | +++ b/bye.txt | |
1418 | @@ -1,1 +1,2 @@ |
|
1418 | @@ -1,1 +1,2 @@ | |
1419 | bye |
|
1419 | bye | |
1420 | +universe |
|
1420 | +universe | |
1421 | diff -r 9ecee4f634e3 hello.txt |
|
1421 | diff -r 9ecee4f634e3 hello.txt | |
1422 | --- a/hello.txt |
|
1422 | --- a/hello.txt | |
1423 | +++ b/hello.txt |
|
1423 | +++ b/hello.txt | |
1424 | @@ -1,1 +1,3 @@ |
|
1424 | @@ -1,1 +1,3 @@ | |
1425 | hello |
|
1425 | hello | |
1426 | +world |
|
1426 | +world | |
1427 | +universe |
|
1427 | +universe | |
1428 |
|
1428 | |||
1429 |
|
1429 | |||
1430 | test popping revisions not in working dir ancestry |
|
1430 | test popping revisions not in working dir ancestry | |
1431 |
|
1431 | |||
1432 | $ hg qseries -v |
|
1432 | $ hg qseries -v | |
1433 | 0 A empty |
|
1433 | 0 A empty | |
1434 | $ hg up qparent |
|
1434 | $ hg up qparent | |
1435 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1435 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1436 | $ hg qpop |
|
1436 | $ hg qpop | |
1437 | popping empty |
|
1437 | popping empty | |
1438 | patch queue now empty |
|
1438 | patch queue now empty | |
1439 |
|
1439 | |||
1440 | $ cd .. |
|
1440 | $ cd .. | |
1441 | $ hg init deletion-order |
|
1441 | $ hg init deletion-order | |
1442 | $ cd deletion-order |
|
1442 | $ cd deletion-order | |
1443 |
|
1443 | |||
1444 | $ touch a |
|
1444 | $ touch a | |
1445 | $ hg ci -Aqm0 |
|
1445 | $ hg ci -Aqm0 | |
1446 |
|
1446 | |||
1447 | $ hg qnew rename-dir |
|
1447 | $ hg qnew rename-dir | |
1448 | $ hg rm a |
|
1448 | $ hg rm a | |
1449 | $ hg qrefresh |
|
1449 | $ hg qrefresh | |
1450 |
|
1450 | |||
1451 | $ mkdir a b |
|
1451 | $ mkdir a b | |
1452 | $ touch a/a b/b |
|
1452 | $ touch a/a b/b | |
1453 | $ hg add -q a b |
|
1453 | $ hg add -q a b | |
1454 | $ hg qrefresh |
|
1454 | $ hg qrefresh | |
1455 |
|
1455 | |||
1456 |
|
1456 | |||
1457 | test popping must remove files added in subdirectories first |
|
1457 | test popping must remove files added in subdirectories first | |
1458 |
|
1458 | |||
1459 | $ hg qpop |
|
1459 | $ hg qpop | |
1460 | popping rename-dir |
|
1460 | popping rename-dir | |
1461 | patch queue now empty |
|
1461 | patch queue now empty | |
1462 | $ cd .. |
|
1462 | $ cd .. | |
1463 |
|
1463 | |||
1464 |
|
1464 | |||
1465 | test case preservation through patch pushing especially on case |
|
1465 | test case preservation through patch pushing especially on case | |
1466 | insensitive filesystem |
|
1466 | insensitive filesystem | |
1467 |
|
1467 | |||
1468 | $ hg init casepreserve |
|
1468 | $ hg init casepreserve | |
1469 | $ cd casepreserve |
|
1469 | $ cd casepreserve | |
1470 |
|
1470 | |||
1471 | $ hg qnew add-file1 |
|
1471 | $ hg qnew add-file1 | |
1472 | $ echo a > TeXtFiLe.TxT |
|
1472 | $ echo a > TeXtFiLe.TxT | |
1473 | $ hg add TeXtFiLe.TxT |
|
1473 | $ hg add TeXtFiLe.TxT | |
1474 | $ hg qrefresh |
|
1474 | $ hg qrefresh | |
1475 |
|
1475 | |||
1476 | $ hg qnew add-file2 |
|
1476 | $ hg qnew add-file2 | |
1477 | $ echo b > AnOtHeRFiLe.TxT |
|
1477 | $ echo b > AnOtHeRFiLe.TxT | |
1478 | $ hg add AnOtHeRFiLe.TxT |
|
1478 | $ hg add AnOtHeRFiLe.TxT | |
1479 | $ hg qrefresh |
|
1479 | $ hg qrefresh | |
1480 |
|
1480 | |||
1481 | $ hg qnew modify-file |
|
1481 | $ hg qnew modify-file | |
1482 | $ echo c >> AnOtHeRFiLe.TxT |
|
1482 | $ echo c >> AnOtHeRFiLe.TxT | |
1483 | $ hg qrefresh |
|
1483 | $ hg qrefresh | |
1484 |
|
1484 | |||
1485 | $ hg qapplied |
|
1485 | $ hg qapplied | |
1486 | add-file1 |
|
1486 | add-file1 | |
1487 | add-file2 |
|
1487 | add-file2 | |
1488 | modify-file |
|
1488 | modify-file | |
1489 | $ hg qpop -a |
|
1489 | $ hg qpop -a | |
1490 | popping modify-file |
|
1490 | popping modify-file | |
1491 | popping add-file2 |
|
1491 | popping add-file2 | |
1492 | popping add-file1 |
|
1492 | popping add-file1 | |
1493 | patch queue now empty |
|
1493 | patch queue now empty | |
1494 |
|
1494 | |||
1495 | this qpush causes problems below, if case preservation on case |
|
1495 | this qpush causes problems below, if case preservation on case | |
1496 | insensitive filesystem is not enough: |
|
1496 | insensitive filesystem is not enough: | |
1497 | (1) unexpected "adding ..." messages are shown |
|
1497 | (1) unexpected "adding ..." messages are shown | |
1498 | (2) patching fails in modification of (1) files |
|
1498 | (2) patching fails in modification of (1) files | |
1499 |
|
1499 | |||
1500 | $ hg qpush -a |
|
1500 | $ hg qpush -a | |
1501 | applying add-file1 |
|
1501 | applying add-file1 | |
1502 | applying add-file2 |
|
1502 | applying add-file2 | |
1503 | applying modify-file |
|
1503 | applying modify-file | |
1504 | now at: modify-file |
|
1504 | now at: modify-file | |
1505 |
|
1505 | |||
1506 | Proper phase default with mq: |
|
1506 | Proper phase default with mq: | |
1507 |
|
1507 | |||
1508 | 1. mq.secret=false |
|
1508 | 1. mq.secret=false | |
1509 |
|
1509 | |||
1510 | $ rm .hg/store/phaseroots |
|
1510 | $ rm .hg/store/phaseroots | |
1511 | $ hg phase 'qparent::' |
|
1511 | $ hg phase 'qparent::' | |
1512 | 0: draft |
|
1512 | 0: draft | |
1513 | 1: draft |
|
1513 | 1: draft | |
1514 | 2: draft |
|
1514 | 2: draft | |
1515 | $ echo '[mq]' >> $HGRCPATH |
|
1515 | $ echo '[mq]' >> $HGRCPATH | |
1516 | $ echo 'secret=true' >> $HGRCPATH |
|
1516 | $ echo 'secret=true' >> $HGRCPATH | |
1517 | $ rm -f .hg/store/phaseroots |
|
1517 | $ rm -f .hg/store/phaseroots | |
1518 | $ hg phase 'qparent::' |
|
1518 | $ hg phase 'qparent::' | |
1519 | 0: secret |
|
1519 | 0: secret | |
1520 | 1: secret |
|
1520 | 1: secret | |
1521 | 2: secret |
|
1521 | 2: secret | |
1522 |
|
1522 | |||
1523 | Test that qfinish change phase when mq.secret=true |
|
1523 | Test that qfinish change phase when mq.secret=true | |
1524 |
|
1524 | |||
1525 | $ hg qfinish qbase |
|
1525 | $ hg qfinish qbase | |
1526 | patch add-file1 finalized without changeset message |
|
1526 | patch add-file1 finalized without changeset message | |
1527 | $ hg phase 'all()' |
|
1527 | $ hg phase 'all()' | |
1528 | 0: draft |
|
1528 | 0: draft | |
1529 | 1: secret |
|
1529 | 1: secret | |
1530 | 2: secret |
|
1530 | 2: secret | |
1531 |
|
1531 | |||
1532 | Test that qfinish respect phases.new-commit setting |
|
1532 | Test that qfinish respect phases.new-commit setting | |
1533 |
|
1533 | |||
1534 | $ echo '[phases]' >> $HGRCPATH |
|
1534 | $ echo '[phases]' >> $HGRCPATH | |
1535 | $ echo 'new-commit=secret' >> $HGRCPATH |
|
1535 | $ echo 'new-commit=secret' >> $HGRCPATH | |
1536 | $ hg qfinish qbase |
|
1536 | $ hg qfinish qbase | |
1537 | patch add-file2 finalized without changeset message |
|
1537 | patch add-file2 finalized without changeset message | |
1538 | $ hg phase 'all()' |
|
1538 | $ hg phase 'all()' | |
1539 | 0: draft |
|
1539 | 0: draft | |
1540 | 1: secret |
|
1540 | 1: secret | |
1541 | 2: secret |
|
1541 | 2: secret | |
1542 |
|
1542 | |||
1543 | (restore env for next test) |
|
1543 | (restore env for next test) | |
1544 |
|
1544 | |||
1545 | $ sed -e 's/new-commit=secret//' $HGRCPATH > $TESTTMP/sedtmp |
|
1545 | $ sed -e 's/new-commit=secret//' $HGRCPATH > $TESTTMP/sedtmp | |
1546 | $ cp $TESTTMP/sedtmp $HGRCPATH |
|
1546 | $ cp $TESTTMP/sedtmp $HGRCPATH | |
1547 | $ hg qimport -r 1 --name add-file2 |
|
1547 | $ hg qimport -r 1 --name add-file2 | |
1548 |
|
1548 | |||
1549 | Test that qfinish preserve phase when mq.secret=false |
|
1549 | Test that qfinish preserve phase when mq.secret=false | |
1550 |
|
1550 | |||
1551 | $ sed -e 's/secret=true/secret=false/' $HGRCPATH > $TESTTMP/sedtmp |
|
1551 | $ sed -e 's/secret=true/secret=false/' $HGRCPATH > $TESTTMP/sedtmp | |
1552 | $ cp $TESTTMP/sedtmp $HGRCPATH |
|
1552 | $ cp $TESTTMP/sedtmp $HGRCPATH | |
1553 | $ hg qfinish qbase |
|
1553 | $ hg qfinish qbase | |
1554 | patch add-file2 finalized without changeset message |
|
1554 | patch add-file2 finalized without changeset message | |
1555 | $ hg phase 'all()' |
|
1555 | $ hg phase 'all()' | |
1556 | 0: draft |
|
1556 | 0: draft | |
1557 | 1: secret |
|
1557 | 1: secret | |
1558 | 2: secret |
|
1558 | 2: secret | |
1559 |
|
1559 | |||
1560 | Test that secret mq patch does not break hgweb |
|
1560 | Test that secret mq patch does not break hgweb | |
1561 |
|
1561 | |||
1562 | $ cat > hgweb.cgi <<HGWEB |
|
1562 | $ cat > hgweb.cgi <<HGWEB | |
1563 | > from mercurial import demandimport; demandimport.enable() |
|
1563 | > from mercurial import demandimport; demandimport.enable() | |
1564 | > from mercurial.hgweb import hgweb |
|
1564 | > from mercurial.hgweb import hgweb | |
1565 | > from mercurial.hgweb import wsgicgi |
|
1565 | > from mercurial.hgweb import wsgicgi | |
1566 | > import cgitb |
|
1566 | > import cgitb | |
1567 | > cgitb.enable() |
|
1567 | > cgitb.enable() | |
1568 | > app = hgweb('.', 'test') |
|
1568 | > app = hgweb('.', 'test') | |
1569 | > wsgicgi.launch(app) |
|
1569 | > wsgicgi.launch(app) | |
1570 | > HGWEB |
|
1570 | > HGWEB | |
1571 | $ . "$TESTDIR/cgienv" |
|
1571 | $ . "$TESTDIR/cgienv" | |
1572 | #if msys |
|
1572 | #if msys | |
1573 | $ PATH_INFO=//tags; export PATH_INFO |
|
1573 | $ PATH_INFO=//tags; export PATH_INFO | |
1574 | #else |
|
1574 | #else | |
1575 | $ PATH_INFO=/tags; export PATH_INFO |
|
1575 | $ PATH_INFO=/tags; export PATH_INFO | |
1576 | #endif |
|
1576 | #endif | |
1577 | $ QUERY_STRING='style=raw' |
|
1577 | $ QUERY_STRING='style=raw' | |
1578 | $ python hgweb.cgi | grep '^tip' |
|
1578 | $ python hgweb.cgi | grep '^tip' | |
1579 | tip [0-9a-f]{40} (re) |
|
1579 | tip [0-9a-f]{40} (re) | |
1580 |
|
1580 | |||
1581 | $ cd .. |
|
1581 | $ cd .. |
@@ -1,48 +1,48 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ echo a > a |
|
3 | $ echo a > a | |
4 | $ hg ci -Ama |
|
4 | $ hg ci -Ama | |
5 | adding a |
|
5 | adding a | |
6 |
|
6 | |||
7 | $ hg an a |
|
7 | $ hg an a | |
8 | 0: a |
|
8 | 0: a | |
9 |
|
9 | |||
10 | $ hg --config ui.strict=False an a |
|
10 | $ hg --config ui.strict=False an a | |
11 | 0: a |
|
11 | 0: a | |
12 |
|
12 | |||
13 | $ echo "[ui]" >> $HGRCPATH |
|
13 | $ echo "[ui]" >> $HGRCPATH | |
14 | $ echo "strict=True" >> $HGRCPATH |
|
14 | $ echo "strict=True" >> $HGRCPATH | |
15 |
|
15 | |||
16 | $ hg an a |
|
16 | $ hg an a | |
17 | hg: unknown command 'an' |
|
17 | hg: unknown command 'an' | |
18 | Mercurial Distributed SCM |
|
18 | Mercurial Distributed SCM | |
19 |
|
19 | |||
20 | basic commands: |
|
20 | basic commands: | |
21 |
|
21 | |||
22 | add add the specified files on the next commit |
|
22 | add add the specified files on the next commit | |
23 | annotate show changeset information by line for each file |
|
23 | annotate show changeset information by line for each file | |
24 | clone make a copy of an existing repository |
|
24 | clone make a copy of an existing repository | |
25 | commit commit the specified files or all outstanding changes |
|
25 | commit commit the specified files or all outstanding changes | |
26 | diff diff repository (or selected files) |
|
26 | diff diff repository (or selected files) | |
27 | export dump the header and diffs for one or more changesets |
|
27 | export dump the header and diffs for one or more changesets | |
28 | forget forget the specified files on the next commit |
|
28 | forget forget the specified files on the next commit | |
29 | init create a new repository in the given directory |
|
29 | init create a new repository in the given directory | |
30 | log show revision history of entire repository or files |
|
30 | log show revision history of entire repository or files | |
31 | merge merge working directory with another revision |
|
31 | merge merge working directory with another revision | |
32 | pull pull changes from the specified source |
|
32 | pull pull changes from the specified source | |
33 | push push changes to the specified destination |
|
33 | push push changes to the specified destination | |
34 | remove remove the specified files on the next commit |
|
34 | remove remove the specified files on the next commit | |
35 | serve start stand-alone webserver |
|
35 | serve start stand-alone webserver | |
36 | status show changed files in the working directory |
|
36 | status show changed files in the working directory | |
37 | summary summarize working directory state |
|
37 | summary summarize working directory state | |
38 | update update working directory (or switch revisions) |
|
38 | update update working directory (or switch revisions) | |
39 |
|
39 | |||
40 | use "hg help" for the full list of commands or "hg -v" for details |
|
40 | (use "hg help" for the full list of commands or "hg -v" for details) | |
41 | [255] |
|
41 | [255] | |
42 | $ hg annotate a |
|
42 | $ hg annotate a | |
43 | 0: a |
|
43 | 0: a | |
44 |
|
44 | |||
45 | should succeed - up is an alias, not an abbreviation |
|
45 | should succeed - up is an alias, not an abbreviation | |
46 |
|
46 | |||
47 | $ hg up |
|
47 | $ hg up | |
48 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
48 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now