Show More
@@ -1,133 +1,133 | |||||
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 sys, os |
|
9 | import sys, os | |
10 | import extensions |
|
10 | import extensions | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | def moduledoc(file): |
|
13 | def moduledoc(file): | |
14 | '''return the top-level python documentation for the given file |
|
14 | '''return the top-level python documentation for the given file | |
15 |
|
15 | |||
16 | Loosely inspired by pydoc.source_synopsis(), but rewritten to |
|
16 | Loosely inspired by pydoc.source_synopsis(), but rewritten to | |
17 | handle triple quotes and to return the whole text instead of just |
|
17 | handle triple quotes and to return the whole text instead of just | |
18 | the synopsis''' |
|
18 | the synopsis''' | |
19 | result = [] |
|
19 | result = [] | |
20 |
|
20 | |||
21 | line = file.readline() |
|
21 | line = file.readline() | |
22 | while line[:1] == '#' or not line.strip(): |
|
22 | while line[:1] == '#' or not line.strip(): | |
23 | line = file.readline() |
|
23 | line = file.readline() | |
24 | if not line: |
|
24 | if not line: | |
25 | break |
|
25 | break | |
26 |
|
26 | |||
27 | start = line[:3] |
|
27 | start = line[:3] | |
28 | if start == '"""' or start == "'''": |
|
28 | if start == '"""' or start == "'''": | |
29 | line = line[3:] |
|
29 | line = line[3:] | |
30 | while line: |
|
30 | while line: | |
31 | if line.rstrip().endswith(start): |
|
31 | if line.rstrip().endswith(start): | |
32 | line = line.split(start)[0] |
|
32 | line = line.split(start)[0] | |
33 | if line: |
|
33 | if line: | |
34 | result.append(line) |
|
34 | result.append(line) | |
35 | break |
|
35 | break | |
36 | elif not line: |
|
36 | elif not line: | |
37 | return None # unmatched delimiter |
|
37 | return None # unmatched delimiter | |
38 | result.append(line) |
|
38 | result.append(line) | |
39 | line = file.readline() |
|
39 | line = file.readline() | |
40 | else: |
|
40 | else: | |
41 | return None |
|
41 | return None | |
42 |
|
42 | |||
43 | return ''.join(result) |
|
43 | return ''.join(result) | |
44 |
|
44 | |||
45 | def listexts(header, exts, maxlength, indent=1): |
|
45 | def listexts(header, exts, maxlength, indent=1): | |
46 | '''return a text listing of the given extensions''' |
|
46 | '''return a text listing of the given extensions''' | |
47 | if not exts: |
|
47 | if not exts: | |
48 | return '' |
|
48 | return '' | |
49 | result = '\n%s\n\n' % header |
|
49 | result = '\n%s\n\n' % header | |
50 | for name, desc in sorted(exts.iteritems()): |
|
50 | for name, desc in sorted(exts.iteritems()): | |
51 | result += '%s%-*s %s\n' % (' ' * indent, maxlength + 2, |
|
51 | result += '%s%-*s %s\n' % (' ' * indent, maxlength + 2, | |
52 | ':%s:' % name, desc) |
|
52 | ':%s:' % name, desc) | |
53 | return result |
|
53 | return result | |
54 |
|
54 | |||
55 | def extshelp(): |
|
55 | def extshelp(): | |
56 | doc = loaddoc('extensions')() |
|
56 | doc = loaddoc('extensions')() | |
57 |
|
57 | |||
58 | exts, maxlength = extensions.enabled() |
|
58 | exts, maxlength = extensions.enabled() | |
59 | doc += listexts(_('enabled extensions:'), exts, maxlength) |
|
59 | doc += listexts(_('enabled extensions:'), exts, maxlength) | |
60 |
|
60 | |||
61 | exts, maxlength = extensions.disabled() |
|
61 | exts, maxlength = extensions.disabled() | |
62 | doc += listexts(_('disabled extensions:'), exts, maxlength) |
|
62 | doc += listexts(_('disabled extensions:'), exts, maxlength) | |
63 |
|
63 | |||
64 | return doc |
|
64 | return doc | |
65 |
|
65 | |||
66 | def loaddoc(topic): |
|
66 | def loaddoc(topic): | |
67 | """Return a delayed loader for help/topic.txt.""" |
|
67 | """Return a delayed loader for help/topic.txt.""" | |
68 |
|
68 | |||
69 | def loader(): |
|
69 | def loader(): | |
70 | if hasattr(sys, 'frozen'): |
|
70 | if hasattr(sys, 'frozen'): | |
71 | module = sys.executable |
|
71 | module = sys.executable | |
72 | else: |
|
72 | else: | |
73 | module = __file__ |
|
73 | module = __file__ | |
74 | base = os.path.dirname(module) |
|
74 | base = os.path.dirname(module) | |
75 |
|
75 | |||
76 | for dir in ('.', '..'): |
|
76 | for dir in ('.', '..'): | |
77 | docdir = os.path.join(base, dir, 'help') |
|
77 | docdir = os.path.join(base, dir, 'help') | |
78 | if os.path.isdir(docdir): |
|
78 | if os.path.isdir(docdir): | |
79 | break |
|
79 | break | |
80 |
|
80 | |||
81 | path = os.path.join(docdir, topic + ".txt") |
|
81 | path = os.path.join(docdir, topic + ".txt") | |
82 | doc = gettext(open(path).read()) |
|
82 | doc = gettext(open(path).read()) | |
83 | for rewriter in helphooks.get(topic, []): |
|
83 | for rewriter in helphooks.get(topic, []): | |
84 | doc = rewriter(topic, doc) |
|
84 | doc = rewriter(topic, doc) | |
85 | return doc |
|
85 | return doc | |
86 |
|
86 | |||
87 | return loader |
|
87 | return loader | |
88 |
|
88 | |||
89 | helptable = [ |
|
89 | helptable = sorted([ | |
90 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), |
|
90 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), | |
91 | (["dates"], _("Date Formats"), loaddoc('dates')), |
|
91 | (["dates"], _("Date Formats"), loaddoc('dates')), | |
92 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), |
|
92 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), | |
93 | (['environment', 'env'], _('Environment Variables'), |
|
93 | (['environment', 'env'], _('Environment Variables'), | |
94 | loaddoc('environment')), |
|
94 | loaddoc('environment')), | |
95 | (['revs', 'revisions'], _('Specifying Single Revisions'), |
|
95 | (['revs', 'revisions'], _('Specifying Single Revisions'), | |
96 | loaddoc('revisions')), |
|
96 | loaddoc('revisions')), | |
97 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
|
97 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), | |
98 | loaddoc('multirevs')), |
|
98 | loaddoc('multirevs')), | |
99 | (['revset', 'revsets'], _("Specifying Revision Sets"), loaddoc('revsets')), |
|
99 | (['revset', 'revsets'], _("Specifying Revision Sets"), loaddoc('revsets')), | |
100 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), |
|
100 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), | |
101 | (['merge-tools'], _('Merge Tools'), loaddoc('merge-tools')), |
|
101 | (['merge-tools'], _('Merge Tools'), loaddoc('merge-tools')), | |
102 | (['templating', 'templates'], _('Template Usage'), |
|
102 | (['templating', 'templates'], _('Template Usage'), | |
103 | loaddoc('templates')), |
|
103 | loaddoc('templates')), | |
104 | (['urls'], _('URL Paths'), loaddoc('urls')), |
|
104 | (['urls'], _('URL Paths'), loaddoc('urls')), | |
105 | (["extensions"], _("Using additional features"), extshelp), |
|
105 | (["extensions"], _("Using additional features"), extshelp), | |
106 | (["subrepo", "subrepos"], _("Subrepositories"), loaddoc('subrepos')), |
|
106 | (["subrepo", "subrepos"], _("Subrepositories"), loaddoc('subrepos')), | |
107 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), |
|
107 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), | |
108 | (["glossary"], _("Glossary"), loaddoc('glossary')), |
|
108 | (["glossary"], _("Glossary"), loaddoc('glossary')), | |
109 | ] |
|
109 | ]) | |
110 |
|
110 | |||
111 | # Map topics to lists of callable taking the current topic help and |
|
111 | # Map topics to lists of callable taking the current topic help and | |
112 | # returning the updated version |
|
112 | # returning the updated version | |
113 | helphooks = { |
|
113 | helphooks = { | |
114 | } |
|
114 | } | |
115 |
|
115 | |||
116 | def addtopichook(topic, rewriter): |
|
116 | def addtopichook(topic, rewriter): | |
117 | helphooks.setdefault(topic, []).append(rewriter) |
|
117 | helphooks.setdefault(topic, []).append(rewriter) | |
118 |
|
118 | |||
119 | def makeitemsdoc(topic, doc, marker, items): |
|
119 | def makeitemsdoc(topic, doc, marker, items): | |
120 | """Extract docstring from the items key to function mapping, build a |
|
120 | """Extract docstring from the items key to function mapping, build a | |
121 | .single documentation block and use it to overwrite the marker in doc |
|
121 | .single documentation block and use it to overwrite the marker in doc | |
122 | """ |
|
122 | """ | |
123 | entries = [] |
|
123 | entries = [] | |
124 | for name in sorted(items): |
|
124 | for name in sorted(items): | |
125 | text = (items[name].__doc__ or '').rstrip() |
|
125 | text = (items[name].__doc__ or '').rstrip() | |
126 | if not text: |
|
126 | if not text: | |
127 | continue |
|
127 | continue | |
128 | text = gettext(text) |
|
128 | text = gettext(text) | |
129 | lines = text.splitlines() |
|
129 | lines = text.splitlines() | |
130 | lines[1:] = [(' ' + l.strip()) for l in lines[1:]] |
|
130 | lines[1:] = [(' ' + l.strip()) for l in lines[1:]] | |
131 | entries.append('\n'.join(lines)) |
|
131 | entries.append('\n'.join(lines)) | |
132 | entries = '\n\n'.join(entries) |
|
132 | entries = '\n\n'.join(entries) | |
133 | return doc.replace(marker, entries) |
|
133 | return doc.replace(marker, entries) |
@@ -1,432 +1,434 | |||||
1 | $ "$TESTDIR/hghave" no-outer-repo || exit 80 |
|
1 | $ "$TESTDIR/hghave" no-outer-repo || exit 80 | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -A -d'1 0' -m a |
|
6 | $ hg ci -A -d'1 0' -m a | |
7 | adding a |
|
7 | adding a | |
8 |
|
8 | |||
9 | $ cd .. |
|
9 | $ cd .. | |
10 |
|
10 | |||
11 | $ hg init b |
|
11 | $ hg init b | |
12 | $ cd b |
|
12 | $ cd b | |
13 | $ echo b > b |
|
13 | $ echo b > b | |
14 | $ hg ci -A -d'1 0' -m b |
|
14 | $ hg ci -A -d'1 0' -m b | |
15 | adding b |
|
15 | adding b | |
16 |
|
16 | |||
17 | $ cd .. |
|
17 | $ cd .. | |
18 |
|
18 | |||
19 | $ hg clone a c |
|
19 | $ hg clone a c | |
20 | updating to branch default |
|
20 | updating to branch default | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | $ cd c |
|
22 | $ cd c | |
23 | $ cat >> .hg/hgrc <<EOF |
|
23 | $ cat >> .hg/hgrc <<EOF | |
24 | > [paths] |
|
24 | > [paths] | |
25 | > relative = ../a |
|
25 | > relative = ../a | |
26 | > EOF |
|
26 | > EOF | |
27 | $ hg pull -f ../b |
|
27 | $ hg pull -f ../b | |
28 | pulling from ../b |
|
28 | pulling from ../b | |
29 | searching for changes |
|
29 | searching for changes | |
30 | warning: repository is unrelated |
|
30 | warning: repository is unrelated | |
31 | requesting all changes |
|
31 | requesting all changes | |
32 | adding changesets |
|
32 | adding changesets | |
33 | adding manifests |
|
33 | adding manifests | |
34 | adding file changes |
|
34 | adding file changes | |
35 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
35 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
36 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
36 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
37 | $ hg merge |
|
37 | $ hg merge | |
38 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
38 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
39 | (branch merge, don't forget to commit) |
|
39 | (branch merge, don't forget to commit) | |
40 |
|
40 | |||
41 | $ cd .. |
|
41 | $ cd .. | |
42 |
|
42 | |||
43 | Testing -R/--repository: |
|
43 | Testing -R/--repository: | |
44 |
|
44 | |||
45 | $ hg -R a tip |
|
45 | $ hg -R a tip | |
46 | changeset: 0:8580ff50825a |
|
46 | changeset: 0:8580ff50825a | |
47 | tag: tip |
|
47 | tag: tip | |
48 | user: test |
|
48 | user: test | |
49 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
49 | date: Thu Jan 01 00:00:01 1970 +0000 | |
50 | summary: a |
|
50 | summary: a | |
51 |
|
51 | |||
52 | $ hg --repository b tip |
|
52 | $ hg --repository b tip | |
53 | changeset: 0:b6c483daf290 |
|
53 | changeset: 0:b6c483daf290 | |
54 | tag: tip |
|
54 | tag: tip | |
55 | user: test |
|
55 | user: test | |
56 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
56 | date: Thu Jan 01 00:00:01 1970 +0000 | |
57 | summary: b |
|
57 | summary: b | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | -R with a URL: |
|
60 | -R with a URL: | |
61 |
|
61 | |||
62 | $ hg -R file:a identify |
|
62 | $ hg -R file:a identify | |
63 | 8580ff50825a tip |
|
63 | 8580ff50825a tip | |
64 | $ hg -R file://localhost/`pwd`/a/ identify |
|
64 | $ hg -R file://localhost/`pwd`/a/ identify | |
65 | 8580ff50825a tip |
|
65 | 8580ff50825a tip | |
66 |
|
66 | |||
67 | -R with path aliases: |
|
67 | -R with path aliases: | |
68 |
|
68 | |||
69 | $ cd c |
|
69 | $ cd c | |
70 | $ hg -R default identify |
|
70 | $ hg -R default identify | |
71 | 8580ff50825a tip |
|
71 | 8580ff50825a tip | |
72 | $ hg -R relative identify |
|
72 | $ hg -R relative identify | |
73 | 8580ff50825a tip |
|
73 | 8580ff50825a tip | |
74 | $ echo '[paths]' >> $HGRCPATH |
|
74 | $ echo '[paths]' >> $HGRCPATH | |
75 | $ echo 'relativetohome = a' >> $HGRCPATH |
|
75 | $ echo 'relativetohome = a' >> $HGRCPATH | |
76 | $ HOME=`pwd`/../ hg -R relativetohome identify |
|
76 | $ HOME=`pwd`/../ hg -R relativetohome identify | |
77 | 8580ff50825a tip |
|
77 | 8580ff50825a tip | |
78 | $ cd .. |
|
78 | $ cd .. | |
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: There is no Mercurial repository here (.hg not found)! |
|
87 | abort: There is no Mercurial repository here (.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 |
|
90 | abort: a/a not under root | |
91 | [255] |
|
91 | [255] | |
92 | $ hg log |
|
92 | $ hg log | |
93 | abort: There is no Mercurial repository here (.hg not found)! |
|
93 | abort: There is no Mercurial repository here (.hg not found)! | |
94 | [255] |
|
94 | [255] | |
95 |
|
95 | |||
96 | Abbreviation of long option: |
|
96 | Abbreviation of long option: | |
97 |
|
97 | |||
98 | $ hg --repo c tip |
|
98 | $ hg --repo c tip | |
99 | changeset: 1:b6c483daf290 |
|
99 | changeset: 1:b6c483daf290 | |
100 | tag: tip |
|
100 | tag: tip | |
101 | parent: -1:000000000000 |
|
101 | parent: -1:000000000000 | |
102 | user: test |
|
102 | user: test | |
103 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
103 | date: Thu Jan 01 00:00:01 1970 +0000 | |
104 | summary: b |
|
104 | summary: b | |
105 |
|
105 | |||
106 |
|
106 | |||
107 | earlygetopt with duplicate options (36d23de02da1): |
|
107 | earlygetopt with duplicate options (36d23de02da1): | |
108 |
|
108 | |||
109 | $ hg --cwd a --cwd b --cwd c tip |
|
109 | $ hg --cwd a --cwd b --cwd c tip | |
110 | changeset: 1:b6c483daf290 |
|
110 | changeset: 1:b6c483daf290 | |
111 | tag: tip |
|
111 | tag: tip | |
112 | parent: -1:000000000000 |
|
112 | parent: -1:000000000000 | |
113 | user: test |
|
113 | user: test | |
114 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
114 | date: Thu Jan 01 00:00:01 1970 +0000 | |
115 | summary: b |
|
115 | summary: b | |
116 |
|
116 | |||
117 | $ hg --repo c --repository b -R a tip |
|
117 | $ hg --repo c --repository b -R a tip | |
118 | changeset: 0:8580ff50825a |
|
118 | changeset: 0:8580ff50825a | |
119 | tag: tip |
|
119 | tag: tip | |
120 | user: test |
|
120 | user: test | |
121 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
121 | date: Thu Jan 01 00:00:01 1970 +0000 | |
122 | summary: a |
|
122 | summary: a | |
123 |
|
123 | |||
124 |
|
124 | |||
125 | earlygetopt short option without following space: |
|
125 | earlygetopt short option without following space: | |
126 |
|
126 | |||
127 | $ hg -q -Rb tip |
|
127 | $ hg -q -Rb tip | |
128 | 0:b6c483daf290 |
|
128 | 0:b6c483daf290 | |
129 |
|
129 | |||
130 | earlygetopt with illegal abbreviations: |
|
130 | earlygetopt with illegal abbreviations: | |
131 |
|
131 | |||
132 | $ hg --confi "foo.bar=baz" |
|
132 | $ hg --confi "foo.bar=baz" | |
133 | abort: option --config may not be abbreviated! |
|
133 | abort: option --config may not be abbreviated! | |
134 | [255] |
|
134 | [255] | |
135 | $ hg --cw a tip |
|
135 | $ hg --cw a tip | |
136 | abort: option --cwd may not be abbreviated! |
|
136 | abort: option --cwd may not be abbreviated! | |
137 | [255] |
|
137 | [255] | |
138 | $ hg --rep a tip |
|
138 | $ hg --rep a tip | |
139 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
139 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
140 | [255] |
|
140 | [255] | |
141 | $ hg --repositor a tip |
|
141 | $ hg --repositor a tip | |
142 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
142 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
143 | [255] |
|
143 | [255] | |
144 | $ hg -qR a tip |
|
144 | $ hg -qR a tip | |
145 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
145 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
146 | [255] |
|
146 | [255] | |
147 | $ hg -qRa tip |
|
147 | $ hg -qRa tip | |
148 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
148 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
149 | [255] |
|
149 | [255] | |
150 |
|
150 | |||
151 | Testing --cwd: |
|
151 | Testing --cwd: | |
152 |
|
152 | |||
153 | $ hg --cwd a parents |
|
153 | $ hg --cwd a parents | |
154 | changeset: 0:8580ff50825a |
|
154 | changeset: 0:8580ff50825a | |
155 | tag: tip |
|
155 | tag: tip | |
156 | user: test |
|
156 | user: test | |
157 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
157 | date: Thu Jan 01 00:00:01 1970 +0000 | |
158 | summary: a |
|
158 | summary: a | |
159 |
|
159 | |||
160 |
|
160 | |||
161 | Testing -y/--noninteractive - just be sure it is parsed: |
|
161 | Testing -y/--noninteractive - just be sure it is parsed: | |
162 |
|
162 | |||
163 | $ hg --cwd a tip -q --noninteractive |
|
163 | $ hg --cwd a tip -q --noninteractive | |
164 | 0:8580ff50825a |
|
164 | 0:8580ff50825a | |
165 | $ hg --cwd a tip -q -y |
|
165 | $ hg --cwd a tip -q -y | |
166 | 0:8580ff50825a |
|
166 | 0:8580ff50825a | |
167 |
|
167 | |||
168 | Testing -q/--quiet: |
|
168 | Testing -q/--quiet: | |
169 |
|
169 | |||
170 | $ hg -R a -q tip |
|
170 | $ hg -R a -q tip | |
171 | 0:8580ff50825a |
|
171 | 0:8580ff50825a | |
172 | $ hg -R b -q tip |
|
172 | $ hg -R b -q tip | |
173 | 0:b6c483daf290 |
|
173 | 0:b6c483daf290 | |
174 | $ hg -R c --quiet parents |
|
174 | $ hg -R c --quiet parents | |
175 | 0:8580ff50825a |
|
175 | 0:8580ff50825a | |
176 | 1:b6c483daf290 |
|
176 | 1:b6c483daf290 | |
177 |
|
177 | |||
178 | Testing -v/--verbose: |
|
178 | Testing -v/--verbose: | |
179 |
|
179 | |||
180 | $ hg --cwd c head -v |
|
180 | $ hg --cwd c head -v | |
181 | changeset: 1:b6c483daf290 |
|
181 | changeset: 1:b6c483daf290 | |
182 | tag: tip |
|
182 | tag: tip | |
183 | parent: -1:000000000000 |
|
183 | parent: -1:000000000000 | |
184 | user: test |
|
184 | user: test | |
185 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
185 | date: Thu Jan 01 00:00:01 1970 +0000 | |
186 | files: b |
|
186 | files: b | |
187 | description: |
|
187 | description: | |
188 | b |
|
188 | b | |
189 |
|
189 | |||
190 |
|
190 | |||
191 | changeset: 0:8580ff50825a |
|
191 | changeset: 0:8580ff50825a | |
192 | user: test |
|
192 | user: test | |
193 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
193 | date: Thu Jan 01 00:00:01 1970 +0000 | |
194 | files: a |
|
194 | files: a | |
195 | description: |
|
195 | description: | |
196 | a |
|
196 | a | |
197 |
|
197 | |||
198 |
|
198 | |||
199 | $ hg --cwd b tip --verbose |
|
199 | $ hg --cwd b tip --verbose | |
200 | changeset: 0:b6c483daf290 |
|
200 | changeset: 0:b6c483daf290 | |
201 | tag: tip |
|
201 | tag: tip | |
202 | user: test |
|
202 | user: test | |
203 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
203 | date: Thu Jan 01 00:00:01 1970 +0000 | |
204 | files: b |
|
204 | files: b | |
205 | description: |
|
205 | description: | |
206 | b |
|
206 | b | |
207 |
|
207 | |||
208 |
|
208 | |||
209 |
|
209 | |||
210 | Testing --config: |
|
210 | Testing --config: | |
211 |
|
211 | |||
212 | $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo |
|
212 | $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo | |
213 | quuxfoo |
|
213 | quuxfoo | |
214 | $ hg --cwd c --config '' tip -q |
|
214 | $ hg --cwd c --config '' tip -q | |
215 | abort: malformed --config option: '' (use --config section.name=value) |
|
215 | abort: malformed --config option: '' (use --config section.name=value) | |
216 | [255] |
|
216 | [255] | |
217 | $ hg --cwd c --config a.b tip -q |
|
217 | $ hg --cwd c --config a.b tip -q | |
218 | abort: malformed --config option: 'a.b' (use --config section.name=value) |
|
218 | abort: malformed --config option: 'a.b' (use --config section.name=value) | |
219 | [255] |
|
219 | [255] | |
220 | $ hg --cwd c --config a tip -q |
|
220 | $ hg --cwd c --config a tip -q | |
221 | abort: malformed --config option: 'a' (use --config section.name=value) |
|
221 | abort: malformed --config option: 'a' (use --config section.name=value) | |
222 | [255] |
|
222 | [255] | |
223 | $ hg --cwd c --config a.= tip -q |
|
223 | $ hg --cwd c --config a.= tip -q | |
224 | abort: malformed --config option: 'a.=' (use --config section.name=value) |
|
224 | abort: malformed --config option: 'a.=' (use --config section.name=value) | |
225 | [255] |
|
225 | [255] | |
226 | $ hg --cwd c --config .b= tip -q |
|
226 | $ hg --cwd c --config .b= tip -q | |
227 | abort: malformed --config option: '.b=' (use --config section.name=value) |
|
227 | abort: malformed --config option: '.b=' (use --config section.name=value) | |
228 | [255] |
|
228 | [255] | |
229 |
|
229 | |||
230 | Testing --debug: |
|
230 | Testing --debug: | |
231 |
|
231 | |||
232 | $ hg --cwd c log --debug |
|
232 | $ hg --cwd c log --debug | |
233 | changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a |
|
233 | changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a | |
234 | tag: tip |
|
234 | tag: tip | |
235 | parent: -1:0000000000000000000000000000000000000000 |
|
235 | parent: -1:0000000000000000000000000000000000000000 | |
236 | parent: -1:0000000000000000000000000000000000000000 |
|
236 | parent: -1:0000000000000000000000000000000000000000 | |
237 | manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49 |
|
237 | manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49 | |
238 | user: test |
|
238 | user: test | |
239 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
239 | date: Thu Jan 01 00:00:01 1970 +0000 | |
240 | files+: b |
|
240 | files+: b | |
241 | extra: branch=default |
|
241 | extra: branch=default | |
242 | description: |
|
242 | description: | |
243 | b |
|
243 | b | |
244 |
|
244 | |||
245 |
|
245 | |||
246 | changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
246 | changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab | |
247 | parent: -1:0000000000000000000000000000000000000000 |
|
247 | parent: -1:0000000000000000000000000000000000000000 | |
248 | parent: -1:0000000000000000000000000000000000000000 |
|
248 | parent: -1:0000000000000000000000000000000000000000 | |
249 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
249 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
250 | user: test |
|
250 | user: test | |
251 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
251 | date: Thu Jan 01 00:00:01 1970 +0000 | |
252 | files+: a |
|
252 | files+: a | |
253 | extra: branch=default |
|
253 | extra: branch=default | |
254 | description: |
|
254 | description: | |
255 | a |
|
255 | a | |
256 |
|
256 | |||
257 |
|
257 | |||
258 |
|
258 | |||
259 | Testing --traceback: |
|
259 | Testing --traceback: | |
260 |
|
260 | |||
261 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' |
|
261 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' | |
262 | Traceback (most recent call last): |
|
262 | Traceback (most recent call last): | |
263 |
|
263 | |||
264 | Testing --time: |
|
264 | Testing --time: | |
265 |
|
265 | |||
266 | $ hg --cwd a --time id |
|
266 | $ hg --cwd a --time id | |
267 | 8580ff50825a tip |
|
267 | 8580ff50825a tip | |
268 | Time: real * (glob) |
|
268 | Time: real * (glob) | |
269 |
|
269 | |||
270 | Testing --version: |
|
270 | Testing --version: | |
271 |
|
271 | |||
272 | $ hg --version -q |
|
272 | $ hg --version -q | |
273 | Mercurial Distributed SCM * (glob) |
|
273 | Mercurial Distributed SCM * (glob) | |
274 |
|
274 | |||
275 | Testing -h/--help: |
|
275 | Testing -h/--help: | |
276 |
|
276 | |||
277 | $ hg -h |
|
277 | $ hg -h | |
278 | Mercurial Distributed SCM |
|
278 | Mercurial Distributed SCM | |
279 |
|
279 | |||
280 | list of commands: |
|
280 | list of commands: | |
281 |
|
281 | |||
282 | add add the specified files on the next commit |
|
282 | add add the specified files on the next commit | |
283 | addremove add all new files, delete all missing files |
|
283 | addremove add all new files, delete all missing files | |
284 | annotate show changeset information by line for each file |
|
284 | annotate show changeset information by line for each file | |
285 | archive create an unversioned archive of a repository revision |
|
285 | archive create an unversioned archive of a repository revision | |
286 | backout reverse effect of earlier changeset |
|
286 | backout reverse effect of earlier changeset | |
287 | bisect subdivision search of changesets |
|
287 | bisect subdivision search of changesets | |
288 | bookmarks track a line of development with movable markers |
|
288 | bookmarks track a line of development with movable markers | |
289 | branch set or show the current branch name |
|
289 | branch set or show the current branch name | |
290 | branches list repository named branches |
|
290 | branches list repository named branches | |
291 | bundle create a changegroup file |
|
291 | bundle create a changegroup file | |
292 | cat output the current or given revision of files |
|
292 | cat output the current or given revision of files | |
293 | clone make a copy of an existing repository |
|
293 | clone make a copy of an existing repository | |
294 | commit commit the specified files or all outstanding changes |
|
294 | commit commit the specified files or all outstanding changes | |
295 | copy mark files as copied for the next commit |
|
295 | copy mark files as copied for the next commit | |
296 | diff diff repository (or selected files) |
|
296 | diff diff repository (or selected files) | |
297 | export dump the header and diffs for one or more changesets |
|
297 | export dump the header and diffs for one or more changesets | |
298 | forget forget the specified files on the next commit |
|
298 | forget forget the specified files on the next commit | |
299 | grep search for a pattern in specified files and revisions |
|
299 | grep search for a pattern in specified files and revisions | |
300 | heads show current repository heads or show branch heads |
|
300 | heads show current repository heads or show branch heads | |
301 | help show help for a given topic or a help overview |
|
301 | help show help for a given topic or a help overview | |
302 | identify identify the working copy or specified revision |
|
302 | identify identify the working copy or specified revision | |
303 | import import an ordered set of patches |
|
303 | import import an ordered set of patches | |
304 | incoming show new changesets found in source |
|
304 | incoming show new changesets found in source | |
305 | init create a new repository in the given directory |
|
305 | init create a new repository in the given directory | |
306 | locate locate files matching specific patterns |
|
306 | locate locate files matching specific patterns | |
307 | log show revision history of entire repository or files |
|
307 | log show revision history of entire repository or files | |
308 | manifest output the current or given revision of the project manifest |
|
308 | manifest output the current or given revision of the project manifest | |
309 | merge merge working directory with another revision |
|
309 | merge merge working directory with another revision | |
310 | outgoing show changesets not found in the destination |
|
310 | outgoing show changesets not found in the destination | |
311 | parents show the parents of the working directory or revision |
|
311 | parents show the parents of the working directory or revision | |
312 | paths show aliases for remote repositories |
|
312 | paths show aliases for remote repositories | |
313 | pull pull changes from the specified source |
|
313 | pull pull changes from the specified source | |
314 | push push changes to the specified destination |
|
314 | push push changes to the specified destination | |
315 | recover roll back an interrupted transaction |
|
315 | recover roll back an interrupted transaction | |
316 | remove remove the specified files on the next commit |
|
316 | remove remove the specified files on the next commit | |
317 | rename rename files; equivalent of copy + remove |
|
317 | rename rename files; equivalent of copy + remove | |
318 | resolve redo merges or set/view the merge status of files |
|
318 | resolve redo merges or set/view the merge status of files | |
319 | revert restore individual files or directories to an earlier state |
|
319 | revert restore individual files or directories to an earlier state | |
320 | rollback roll back the last transaction (dangerous) |
|
320 | rollback roll back the last transaction (dangerous) | |
321 | root print the root (top) of the current working directory |
|
321 | root print the root (top) of the current working directory | |
322 | serve start stand-alone webserver |
|
322 | serve start stand-alone webserver | |
323 | showconfig show combined config settings from all hgrc files |
|
323 | showconfig show combined config settings from all hgrc files | |
324 | status show changed files in the working directory |
|
324 | status show changed files in the working directory | |
325 | summary summarize working directory state |
|
325 | summary summarize working directory state | |
326 | tag add one or more tags for the current or given revision |
|
326 | tag add one or more tags for the current or given revision | |
327 | tags list repository tags |
|
327 | tags list repository tags | |
328 | tip show the tip revision |
|
328 | tip show the tip revision | |
329 | unbundle apply one or more changegroup files |
|
329 | unbundle apply one or more changegroup files | |
330 | update update working directory (or switch revisions) |
|
330 | update update working directory (or switch revisions) | |
331 | verify verify the integrity of the repository |
|
331 | verify verify the integrity of the repository | |
332 | version output version and copyright information |
|
332 | version output version and copyright information | |
333 |
|
333 | |||
334 | additional help topics: |
|
334 | additional help topics: | |
335 |
|
335 | |||
336 | config Configuration Files |
|
336 | config Configuration Files | |
337 | dates Date Formats |
|
337 | dates Date Formats | |
338 | patterns File Name Patterns |
|
338 | diffs Diff Formats | |
339 | environment Environment Variables |
|
339 | environment Environment Variables | |
340 | revisions Specifying Single Revisions |
|
340 | extensions Using additional features | |
|
341 | glossary Glossary | |||
|
342 | hgweb Configuring hgweb | |||
|
343 | merge-tools Merge Tools | |||
341 | multirevs Specifying Multiple Revisions |
|
344 | multirevs Specifying Multiple Revisions | |
|
345 | patterns File Name Patterns | |||
|
346 | revisions Specifying Single Revisions | |||
342 | revsets Specifying Revision Sets |
|
347 | revsets Specifying Revision Sets | |
343 | diffs Diff Formats |
|
348 | subrepos Subrepositories | |
344 | merge-tools Merge Tools |
|
|||
345 | templating Template Usage |
|
349 | templating Template Usage | |
346 | urls URL Paths |
|
350 | urls URL Paths | |
347 | extensions Using additional features |
|
|||
348 | subrepos Subrepositories |
|
|||
349 | hgweb Configuring hgweb |
|
|||
350 | glossary Glossary |
|
|||
351 |
|
351 | |||
352 | use "hg -v help" to show builtin aliases and global options |
|
352 | use "hg -v help" to show builtin aliases and global options | |
353 |
|
353 | |||
|
354 | ||||
|
355 | ||||
354 | $ hg --help |
|
356 | $ hg --help | |
355 | Mercurial Distributed SCM |
|
357 | Mercurial Distributed SCM | |
356 |
|
358 | |||
357 | list of commands: |
|
359 | list of commands: | |
358 |
|
360 | |||
359 | add add the specified files on the next commit |
|
361 | add add the specified files on the next commit | |
360 | addremove add all new files, delete all missing files |
|
362 | addremove add all new files, delete all missing files | |
361 | annotate show changeset information by line for each file |
|
363 | annotate show changeset information by line for each file | |
362 | archive create an unversioned archive of a repository revision |
|
364 | archive create an unversioned archive of a repository revision | |
363 | backout reverse effect of earlier changeset |
|
365 | backout reverse effect of earlier changeset | |
364 | bisect subdivision search of changesets |
|
366 | bisect subdivision search of changesets | |
365 | bookmarks track a line of development with movable markers |
|
367 | bookmarks track a line of development with movable markers | |
366 | branch set or show the current branch name |
|
368 | branch set or show the current branch name | |
367 | branches list repository named branches |
|
369 | branches list repository named branches | |
368 | bundle create a changegroup file |
|
370 | bundle create a changegroup file | |
369 | cat output the current or given revision of files |
|
371 | cat output the current or given revision of files | |
370 | clone make a copy of an existing repository |
|
372 | clone make a copy of an existing repository | |
371 | commit commit the specified files or all outstanding changes |
|
373 | commit commit the specified files or all outstanding changes | |
372 | copy mark files as copied for the next commit |
|
374 | copy mark files as copied for the next commit | |
373 | diff diff repository (or selected files) |
|
375 | diff diff repository (or selected files) | |
374 | export dump the header and diffs for one or more changesets |
|
376 | export dump the header and diffs for one or more changesets | |
375 | forget forget the specified files on the next commit |
|
377 | forget forget the specified files on the next commit | |
376 | grep search for a pattern in specified files and revisions |
|
378 | grep search for a pattern in specified files and revisions | |
377 | heads show current repository heads or show branch heads |
|
379 | heads show current repository heads or show branch heads | |
378 | help show help for a given topic or a help overview |
|
380 | help show help for a given topic or a help overview | |
379 | identify identify the working copy or specified revision |
|
381 | identify identify the working copy or specified revision | |
380 | import import an ordered set of patches |
|
382 | import import an ordered set of patches | |
381 | incoming show new changesets found in source |
|
383 | incoming show new changesets found in source | |
382 | init create a new repository in the given directory |
|
384 | init create a new repository in the given directory | |
383 | locate locate files matching specific patterns |
|
385 | locate locate files matching specific patterns | |
384 | log show revision history of entire repository or files |
|
386 | log show revision history of entire repository or files | |
385 | manifest output the current or given revision of the project manifest |
|
387 | manifest output the current or given revision of the project manifest | |
386 | merge merge working directory with another revision |
|
388 | merge merge working directory with another revision | |
387 | outgoing show changesets not found in the destination |
|
389 | outgoing show changesets not found in the destination | |
388 | parents show the parents of the working directory or revision |
|
390 | parents show the parents of the working directory or revision | |
389 | paths show aliases for remote repositories |
|
391 | paths show aliases for remote repositories | |
390 | pull pull changes from the specified source |
|
392 | pull pull changes from the specified source | |
391 | push push changes to the specified destination |
|
393 | push push changes to the specified destination | |
392 | recover roll back an interrupted transaction |
|
394 | recover roll back an interrupted transaction | |
393 | remove remove the specified files on the next commit |
|
395 | remove remove the specified files on the next commit | |
394 | rename rename files; equivalent of copy + remove |
|
396 | rename rename files; equivalent of copy + remove | |
395 | resolve redo merges or set/view the merge status of files |
|
397 | resolve redo merges or set/view the merge status of files | |
396 | revert restore individual files or directories to an earlier state |
|
398 | revert restore individual files or directories to an earlier state | |
397 | rollback roll back the last transaction (dangerous) |
|
399 | rollback roll back the last transaction (dangerous) | |
398 | root print the root (top) of the current working directory |
|
400 | root print the root (top) of the current working directory | |
399 | serve start stand-alone webserver |
|
401 | serve start stand-alone webserver | |
400 | showconfig show combined config settings from all hgrc files |
|
402 | showconfig show combined config settings from all hgrc files | |
401 | status show changed files in the working directory |
|
403 | status show changed files in the working directory | |
402 | summary summarize working directory state |
|
404 | summary summarize working directory state | |
403 | tag add one or more tags for the current or given revision |
|
405 | tag add one or more tags for the current or given revision | |
404 | tags list repository tags |
|
406 | tags list repository tags | |
405 | tip show the tip revision |
|
407 | tip show the tip revision | |
406 | unbundle apply one or more changegroup files |
|
408 | unbundle apply one or more changegroup files | |
407 | update update working directory (or switch revisions) |
|
409 | update update working directory (or switch revisions) | |
408 | verify verify the integrity of the repository |
|
410 | verify verify the integrity of the repository | |
409 | version output version and copyright information |
|
411 | version output version and copyright information | |
410 |
|
412 | |||
411 | additional help topics: |
|
413 | additional help topics: | |
412 |
|
414 | |||
413 | config Configuration Files |
|
415 | config Configuration Files | |
414 | dates Date Formats |
|
416 | dates Date Formats | |
415 | patterns File Name Patterns |
|
417 | diffs Diff Formats | |
416 | environment Environment Variables |
|
418 | environment Environment Variables | |
417 | revisions Specifying Single Revisions |
|
419 | extensions Using additional features | |
|
420 | glossary Glossary | |||
|
421 | hgweb Configuring hgweb | |||
|
422 | merge-tools Merge Tools | |||
418 | multirevs Specifying Multiple Revisions |
|
423 | multirevs Specifying Multiple Revisions | |
|
424 | patterns File Name Patterns | |||
|
425 | revisions Specifying Single Revisions | |||
419 | revsets Specifying Revision Sets |
|
426 | revsets Specifying Revision Sets | |
420 | diffs Diff Formats |
|
427 | subrepos Subrepositories | |
421 | merge-tools Merge Tools |
|
|||
422 | templating Template Usage |
|
428 | templating Template Usage | |
423 | urls URL Paths |
|
429 | urls URL Paths | |
424 | extensions Using additional features |
|
|||
425 | subrepos Subrepositories |
|
|||
426 | hgweb Configuring hgweb |
|
|||
427 | glossary Glossary |
|
|||
428 |
|
430 | |||
429 | use "hg -v help" to show builtin aliases and global options |
|
431 | use "hg -v help" to show builtin aliases and global options | |
430 |
|
432 | |||
431 | Not tested: --debugger |
|
433 | Not tested: --debugger | |
432 |
|
434 |
@@ -1,801 +1,803 | |||||
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 track a line of development with movable markers |
|
58 | bookmarks track a line of development with movable markers | |
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 | copy mark files as copied for the next commit |
|
65 | copy mark files as copied for the next commit | |
66 | diff diff repository (or selected files) |
|
66 | diff diff repository (or selected files) | |
67 | export dump the header and diffs for one or more changesets |
|
67 | export dump the header and diffs for one or more changesets | |
68 | forget forget the specified files on the next commit |
|
68 | forget forget the specified files on the next commit | |
69 | grep search for a pattern in specified files and revisions |
|
69 | grep search for a pattern in specified files and revisions | |
70 | heads show current repository heads or show branch heads |
|
70 | heads show current repository heads or show branch heads | |
71 | help show help for a given topic or a help overview |
|
71 | help show help for a given topic or a help overview | |
72 | identify identify the working copy or specified revision |
|
72 | identify identify the working copy or specified revision | |
73 | import import an ordered set of patches |
|
73 | import import an ordered set of patches | |
74 | incoming show new changesets found in source |
|
74 | incoming show new changesets found in source | |
75 | init create a new repository in the given directory |
|
75 | init create a new repository in the given directory | |
76 | locate locate files matching specific patterns |
|
76 | locate locate files matching specific patterns | |
77 | log show revision history of entire repository or files |
|
77 | log show revision history of entire repository or files | |
78 | manifest output the current or given revision of the project manifest |
|
78 | manifest output the current or given revision of the project manifest | |
79 | merge merge working directory with another revision |
|
79 | merge merge working directory with another revision | |
80 | outgoing show changesets not found in the destination |
|
80 | outgoing show changesets not found in the destination | |
81 | parents show the parents of the working directory or revision |
|
81 | parents show the parents of the working directory or revision | |
82 | paths show aliases for remote repositories |
|
82 | paths show aliases for remote repositories | |
83 | pull pull changes from the specified source |
|
83 | pull pull changes from the specified source | |
84 | push push changes to the specified destination |
|
84 | push push changes to the specified destination | |
85 | recover roll back an interrupted transaction |
|
85 | recover roll back an interrupted transaction | |
86 | remove remove the specified files on the next commit |
|
86 | remove remove the specified files on the next commit | |
87 | rename rename files; equivalent of copy + remove |
|
87 | rename rename files; equivalent of copy + remove | |
88 | resolve redo merges or set/view the merge status of files |
|
88 | resolve redo merges or set/view the merge status of files | |
89 | revert restore individual files or directories to an earlier state |
|
89 | revert restore individual files or directories to an earlier state | |
90 | rollback roll back the last transaction (dangerous) |
|
90 | rollback roll back the last transaction (dangerous) | |
91 | root print the root (top) of the current working directory |
|
91 | root print the root (top) of the current working directory | |
92 | serve start stand-alone webserver |
|
92 | serve start stand-alone webserver | |
93 | showconfig show combined config settings from all hgrc files |
|
93 | showconfig show combined config settings from all hgrc files | |
94 | status show changed files in the working directory |
|
94 | status show changed files in the working directory | |
95 | summary summarize working directory state |
|
95 | summary summarize working directory state | |
96 | tag add one or more tags for the current or given revision |
|
96 | tag add one or more tags for the current or given revision | |
97 | tags list repository tags |
|
97 | tags list repository tags | |
98 | tip show the tip revision |
|
98 | tip show the tip revision | |
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 | patterns File Name Patterns |
|
108 | diffs Diff Formats | |
109 | environment Environment Variables |
|
109 | environment Environment Variables | |
110 | revisions Specifying Single Revisions |
|
110 | extensions Using additional features | |
|
111 | glossary Glossary | |||
|
112 | hgweb Configuring hgweb | |||
|
113 | merge-tools Merge Tools | |||
111 | multirevs Specifying Multiple Revisions |
|
114 | multirevs Specifying Multiple Revisions | |
|
115 | patterns File Name Patterns | |||
|
116 | revisions Specifying Single Revisions | |||
112 | revsets Specifying Revision Sets |
|
117 | revsets Specifying Revision Sets | |
113 | diffs Diff Formats |
|
118 | subrepos Subrepositories | |
114 | merge-tools Merge Tools |
|
|||
115 | templating Template Usage |
|
119 | templating Template Usage | |
116 | urls URL Paths |
|
120 | urls URL Paths | |
117 | extensions Using additional features |
|
|||
118 | subrepos Subrepositories |
|
|||
119 | hgweb Configuring hgweb |
|
|||
120 | glossary Glossary |
|
|||
121 |
|
121 | |||
122 | use "hg -v help" to show builtin aliases and global options |
|
122 | use "hg -v help" to show builtin aliases and global options | |
123 |
|
123 | |||
124 | $ hg -q help |
|
124 | $ hg -q help | |
125 | add add the specified files on the next commit |
|
125 | add add the specified files on the next commit | |
126 | addremove add all new files, delete all missing files |
|
126 | addremove add all new files, delete all missing files | |
127 | annotate show changeset information by line for each file |
|
127 | annotate show changeset information by line for each file | |
128 | archive create an unversioned archive of a repository revision |
|
128 | archive create an unversioned archive of a repository revision | |
129 | backout reverse effect of earlier changeset |
|
129 | backout reverse effect of earlier changeset | |
130 | bisect subdivision search of changesets |
|
130 | bisect subdivision search of changesets | |
131 | bookmarks track a line of development with movable markers |
|
131 | bookmarks track a line of development with movable markers | |
132 | branch set or show the current branch name |
|
132 | branch set or show the current branch name | |
133 | branches list repository named branches |
|
133 | branches list repository named branches | |
134 | bundle create a changegroup file |
|
134 | bundle create a changegroup file | |
135 | cat output the current or given revision of files |
|
135 | cat output the current or given revision of files | |
136 | clone make a copy of an existing repository |
|
136 | clone make a copy of an existing repository | |
137 | commit commit the specified files or all outstanding changes |
|
137 | commit commit the specified files or all outstanding changes | |
138 | copy mark files as copied for the next commit |
|
138 | copy mark files as copied for the next commit | |
139 | diff diff repository (or selected files) |
|
139 | diff diff repository (or selected files) | |
140 | export dump the header and diffs for one or more changesets |
|
140 | export dump the header and diffs for one or more changesets | |
141 | forget forget the specified files on the next commit |
|
141 | forget forget the specified files on the next commit | |
142 | grep search for a pattern in specified files and revisions |
|
142 | grep search for a pattern in specified files and revisions | |
143 | heads show current repository heads or show branch heads |
|
143 | heads show current repository heads or show branch heads | |
144 | help show help for a given topic or a help overview |
|
144 | help show help for a given topic or a help overview | |
145 | identify identify the working copy or specified revision |
|
145 | identify identify the working copy or specified revision | |
146 | import import an ordered set of patches |
|
146 | import import an ordered set of patches | |
147 | incoming show new changesets found in source |
|
147 | incoming show new changesets found in source | |
148 | init create a new repository in the given directory |
|
148 | init create a new repository in the given directory | |
149 | locate locate files matching specific patterns |
|
149 | locate locate files matching specific patterns | |
150 | log show revision history of entire repository or files |
|
150 | log show revision history of entire repository or files | |
151 | manifest output the current or given revision of the project manifest |
|
151 | manifest output the current or given revision of the project manifest | |
152 | merge merge working directory with another revision |
|
152 | merge merge working directory with another revision | |
153 | outgoing show changesets not found in the destination |
|
153 | outgoing show changesets not found in the destination | |
154 | parents show the parents of the working directory or revision |
|
154 | parents show the parents of the working directory or revision | |
155 | paths show aliases for remote repositories |
|
155 | paths show aliases for remote repositories | |
156 | pull pull changes from the specified source |
|
156 | pull pull changes from the specified source | |
157 | push push changes to the specified destination |
|
157 | push push changes to the specified destination | |
158 | recover roll back an interrupted transaction |
|
158 | recover roll back an interrupted transaction | |
159 | remove remove the specified files on the next commit |
|
159 | remove remove the specified files on the next commit | |
160 | rename rename files; equivalent of copy + remove |
|
160 | rename rename files; equivalent of copy + remove | |
161 | resolve redo merges or set/view the merge status of files |
|
161 | resolve redo merges or set/view the merge status of files | |
162 | revert restore individual files or directories to an earlier state |
|
162 | revert restore individual files or directories to an earlier state | |
163 | rollback roll back the last transaction (dangerous) |
|
163 | rollback roll back the last transaction (dangerous) | |
164 | root print the root (top) of the current working directory |
|
164 | root print the root (top) of the current working directory | |
165 | serve start stand-alone webserver |
|
165 | serve start stand-alone webserver | |
166 | showconfig show combined config settings from all hgrc files |
|
166 | showconfig show combined config settings from all hgrc files | |
167 | status show changed files in the working directory |
|
167 | status show changed files in the working directory | |
168 | summary summarize working directory state |
|
168 | summary summarize working directory state | |
169 | tag add one or more tags for the current or given revision |
|
169 | tag add one or more tags for the current or given revision | |
170 | tags list repository tags |
|
170 | tags list repository tags | |
171 | tip show the tip revision |
|
171 | tip show the tip revision | |
172 | unbundle apply one or more changegroup files |
|
172 | unbundle apply one or more changegroup files | |
173 | update update working directory (or switch revisions) |
|
173 | update update working directory (or switch revisions) | |
174 | verify verify the integrity of the repository |
|
174 | verify verify the integrity of the repository | |
175 | version output version and copyright information |
|
175 | version output version and copyright information | |
176 |
|
176 | |||
177 | additional help topics: |
|
177 | additional help topics: | |
178 |
|
178 | |||
179 | config Configuration Files |
|
179 | config Configuration Files | |
180 | dates Date Formats |
|
180 | dates Date Formats | |
181 | patterns File Name Patterns |
|
181 | diffs Diff Formats | |
182 | environment Environment Variables |
|
182 | environment Environment Variables | |
183 | revisions Specifying Single Revisions |
|
183 | extensions Using additional features | |
|
184 | glossary Glossary | |||
|
185 | hgweb Configuring hgweb | |||
|
186 | merge-tools Merge Tools | |||
184 | multirevs Specifying Multiple Revisions |
|
187 | multirevs Specifying Multiple Revisions | |
|
188 | patterns File Name Patterns | |||
|
189 | revisions Specifying Single Revisions | |||
185 | revsets Specifying Revision Sets |
|
190 | revsets Specifying Revision Sets | |
186 | diffs Diff Formats |
|
191 | subrepos Subrepositories | |
187 | merge-tools Merge Tools |
|
|||
188 | templating Template Usage |
|
192 | templating Template Usage | |
189 | urls URL Paths |
|
193 | urls URL Paths | |
190 | extensions Using additional features |
|
|||
191 | subrepos Subrepositories |
|
|||
192 | hgweb Configuring hgweb |
|
|||
193 | glossary Glossary |
|
|||
194 |
|
194 | |||
195 | Test short command list with verbose option |
|
195 | Test short command list with verbose option | |
196 |
|
196 | |||
197 | $ hg -v help shortlist |
|
197 | $ hg -v help shortlist | |
198 | Mercurial Distributed SCM (version *) (glob) |
|
198 | Mercurial Distributed SCM (version *) (glob) | |
199 | (see http://mercurial.selenic.com for more information) |
|
199 | (see http://mercurial.selenic.com for more information) | |
200 |
|
200 | |||
201 | Copyright (C) 2005-2011 Matt Mackall and others |
|
201 | Copyright (C) 2005-2011 Matt Mackall and others | |
202 | This is free software; see the source for copying conditions. There is NO |
|
202 | This is free software; see the source for copying conditions. There is NO | |
203 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
203 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
204 |
|
204 | |||
205 | basic commands: |
|
205 | basic commands: | |
206 |
|
206 | |||
207 | add: |
|
207 | add: | |
208 | add the specified files on the next commit |
|
208 | add the specified files on the next commit | |
209 | annotate, blame: |
|
209 | annotate, blame: | |
210 | show changeset information by line for each file |
|
210 | show changeset information by line for each file | |
211 | clone: |
|
211 | clone: | |
212 | make a copy of an existing repository |
|
212 | make a copy of an existing repository | |
213 | commit, ci: |
|
213 | commit, ci: | |
214 | commit the specified files or all outstanding changes |
|
214 | commit the specified files or all outstanding changes | |
215 | diff: |
|
215 | diff: | |
216 | diff repository (or selected files) |
|
216 | diff repository (or selected files) | |
217 | export: |
|
217 | export: | |
218 | dump the header and diffs for one or more changesets |
|
218 | dump the header and diffs for one or more changesets | |
219 | forget: |
|
219 | forget: | |
220 | forget the specified files on the next commit |
|
220 | forget the specified files on the next commit | |
221 | init: |
|
221 | init: | |
222 | create a new repository in the given directory |
|
222 | create a new repository in the given directory | |
223 | log, history: |
|
223 | log, history: | |
224 | show revision history of entire repository or files |
|
224 | show revision history of entire repository or files | |
225 | merge: |
|
225 | merge: | |
226 | merge working directory with another revision |
|
226 | merge working directory with another revision | |
227 | pull: |
|
227 | pull: | |
228 | pull changes from the specified source |
|
228 | pull changes from the specified source | |
229 | push: |
|
229 | push: | |
230 | push changes to the specified destination |
|
230 | push changes to the specified destination | |
231 | remove, rm: |
|
231 | remove, rm: | |
232 | remove the specified files on the next commit |
|
232 | remove the specified files on the next commit | |
233 | serve: |
|
233 | serve: | |
234 | start stand-alone webserver |
|
234 | start stand-alone webserver | |
235 | status, st: |
|
235 | status, st: | |
236 | show changed files in the working directory |
|
236 | show changed files in the working directory | |
237 | summary, sum: |
|
237 | summary, sum: | |
238 | summarize working directory state |
|
238 | summarize working directory state | |
239 | update, up, checkout, co: |
|
239 | update, up, checkout, co: | |
240 | update working directory (or switch revisions) |
|
240 | update working directory (or switch revisions) | |
241 |
|
241 | |||
242 | global options: |
|
242 | global options: | |
243 | -R --repository REPO repository root directory or name of overlay bundle |
|
243 | -R --repository REPO repository root directory or name of overlay bundle | |
244 | file |
|
244 | file | |
245 | --cwd DIR change working directory |
|
245 | --cwd DIR change working directory | |
246 | -y --noninteractive do not prompt, assume 'yes' for any required answers |
|
246 | -y --noninteractive do not prompt, assume 'yes' for any required answers | |
247 | -q --quiet suppress output |
|
247 | -q --quiet suppress output | |
248 | -v --verbose enable additional output |
|
248 | -v --verbose enable additional output | |
249 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
249 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
250 | --debug enable debugging output |
|
250 | --debug enable debugging output | |
251 | --debugger start debugger |
|
251 | --debugger start debugger | |
252 | --encoding ENCODE set the charset encoding (default: ascii) |
|
252 | --encoding ENCODE set the charset encoding (default: ascii) | |
253 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
253 | --encodingmode MODE set the charset encoding mode (default: strict) | |
254 | --traceback always print a traceback on exception |
|
254 | --traceback always print a traceback on exception | |
255 | --time time how long the command takes |
|
255 | --time time how long the command takes | |
256 | --profile print command execution profile |
|
256 | --profile print command execution profile | |
257 | --version output version information and exit |
|
257 | --version output version information and exit | |
258 | -h --help display help and exit |
|
258 | -h --help display help and exit | |
259 |
|
259 | |||
260 | [+] marked option can be specified multiple times |
|
260 | [+] marked option can be specified multiple times | |
261 |
|
261 | |||
262 | use "hg help" for the full list of commands |
|
262 | use "hg help" for the full list of commands | |
263 |
|
263 | |||
264 | $ hg add -h |
|
264 | $ hg add -h | |
265 | hg add [OPTION]... [FILE]... |
|
265 | hg add [OPTION]... [FILE]... | |
266 |
|
266 | |||
267 | add the specified files on the next commit |
|
267 | add the specified files on the next commit | |
268 |
|
268 | |||
269 | Schedule files to be version controlled and added to the repository. |
|
269 | Schedule files to be version controlled and added to the repository. | |
270 |
|
270 | |||
271 | The files will be added to the repository at the next commit. To undo an |
|
271 | The files will be added to the repository at the next commit. To undo an | |
272 | add before that, see "hg forget". |
|
272 | add before that, see "hg forget". | |
273 |
|
273 | |||
274 | If no names are given, add all files to the repository. |
|
274 | If no names are given, add all files to the repository. | |
275 |
|
275 | |||
276 | Returns 0 if all files are successfully added. |
|
276 | Returns 0 if all files are successfully added. | |
277 |
|
277 | |||
278 | use "hg -v help add" to show verbose help |
|
278 | use "hg -v help add" to show verbose help | |
279 |
|
279 | |||
280 | options: |
|
280 | options: | |
281 |
|
281 | |||
282 | -I --include PATTERN [+] include names matching the given patterns |
|
282 | -I --include PATTERN [+] include names matching the given patterns | |
283 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
283 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
284 | -S --subrepos recurse into subrepositories |
|
284 | -S --subrepos recurse into subrepositories | |
285 | -n --dry-run do not perform actions, just print output |
|
285 | -n --dry-run do not perform actions, just print output | |
286 |
|
286 | |||
287 | [+] marked option can be specified multiple times |
|
287 | [+] marked option can be specified multiple times | |
288 |
|
288 | |||
289 | use "hg -v help add" to show global options |
|
289 | use "hg -v help add" to show global options | |
290 |
|
290 | |||
291 | Verbose help for add |
|
291 | Verbose help for add | |
292 |
|
292 | |||
293 | $ hg add -hv |
|
293 | $ hg add -hv | |
294 | hg add [OPTION]... [FILE]... |
|
294 | hg add [OPTION]... [FILE]... | |
295 |
|
295 | |||
296 | add the specified files on the next commit |
|
296 | add the specified files on the next commit | |
297 |
|
297 | |||
298 | Schedule files to be version controlled and added to the repository. |
|
298 | Schedule files to be version controlled and added to the repository. | |
299 |
|
299 | |||
300 | The files will be added to the repository at the next commit. To undo an |
|
300 | The files will be added to the repository at the next commit. To undo an | |
301 | add before that, see "hg forget". |
|
301 | add before that, see "hg forget". | |
302 |
|
302 | |||
303 | If no names are given, add all files to the repository. |
|
303 | If no names are given, add all files to the repository. | |
304 |
|
304 | |||
305 | An example showing how new (unknown) files are added automatically by "hg |
|
305 | An example showing how new (unknown) files are added automatically by "hg | |
306 | add": |
|
306 | add": | |
307 |
|
307 | |||
308 | $ ls |
|
308 | $ ls | |
309 | foo.c |
|
309 | foo.c | |
310 | $ hg status |
|
310 | $ hg status | |
311 | ? foo.c |
|
311 | ? foo.c | |
312 | $ hg add |
|
312 | $ hg add | |
313 | adding foo.c |
|
313 | adding foo.c | |
314 | $ hg status |
|
314 | $ hg status | |
315 | A foo.c |
|
315 | A foo.c | |
316 |
|
316 | |||
317 | Returns 0 if all files are successfully added. |
|
317 | Returns 0 if all files are successfully added. | |
318 |
|
318 | |||
319 | options: |
|
319 | options: | |
320 |
|
320 | |||
321 | -I --include PATTERN [+] include names matching the given patterns |
|
321 | -I --include PATTERN [+] include names matching the given patterns | |
322 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
322 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
323 | -S --subrepos recurse into subrepositories |
|
323 | -S --subrepos recurse into subrepositories | |
324 | -n --dry-run do not perform actions, just print output |
|
324 | -n --dry-run do not perform actions, just print output | |
325 |
|
325 | |||
326 | global options: |
|
326 | global options: | |
327 | -R --repository REPO repository root directory or name of overlay bundle |
|
327 | -R --repository REPO repository root directory or name of overlay bundle | |
328 | file |
|
328 | file | |
329 | --cwd DIR change working directory |
|
329 | --cwd DIR change working directory | |
330 | -y --noninteractive do not prompt, assume 'yes' for any required |
|
330 | -y --noninteractive do not prompt, assume 'yes' for any required | |
331 | answers |
|
331 | answers | |
332 | -q --quiet suppress output |
|
332 | -q --quiet suppress output | |
333 | -v --verbose enable additional output |
|
333 | -v --verbose enable additional output | |
334 | --config CONFIG [+] set/override config option (use |
|
334 | --config CONFIG [+] set/override config option (use | |
335 | 'section.name=value') |
|
335 | 'section.name=value') | |
336 | --debug enable debugging output |
|
336 | --debug enable debugging output | |
337 | --debugger start debugger |
|
337 | --debugger start debugger | |
338 | --encoding ENCODE set the charset encoding (default: ascii) |
|
338 | --encoding ENCODE set the charset encoding (default: ascii) | |
339 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
339 | --encodingmode MODE set the charset encoding mode (default: strict) | |
340 | --traceback always print a traceback on exception |
|
340 | --traceback always print a traceback on exception | |
341 | --time time how long the command takes |
|
341 | --time time how long the command takes | |
342 | --profile print command execution profile |
|
342 | --profile print command execution profile | |
343 | --version output version information and exit |
|
343 | --version output version information and exit | |
344 | -h --help display help and exit |
|
344 | -h --help display help and exit | |
345 |
|
345 | |||
346 | [+] marked option can be specified multiple times |
|
346 | [+] marked option can be specified multiple times | |
347 |
|
347 | |||
348 | Test help option with version option |
|
348 | Test help option with version option | |
349 |
|
349 | |||
350 | $ hg add -h --version |
|
350 | $ hg add -h --version | |
351 | Mercurial Distributed SCM (version *) (glob) |
|
351 | Mercurial Distributed SCM (version *) (glob) | |
352 | (see http://mercurial.selenic.com for more information) |
|
352 | (see http://mercurial.selenic.com for more information) | |
353 |
|
353 | |||
354 | Copyright (C) 2005-2011 Matt Mackall and others |
|
354 | Copyright (C) 2005-2011 Matt Mackall and others | |
355 | This is free software; see the source for copying conditions. There is NO |
|
355 | This is free software; see the source for copying conditions. There is NO | |
356 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
356 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
357 |
|
357 | |||
358 | hg add [OPTION]... [FILE]... |
|
358 | hg add [OPTION]... [FILE]... | |
359 |
|
359 | |||
360 | add the specified files on the next commit |
|
360 | add the specified files on the next commit | |
361 |
|
361 | |||
362 | Schedule files to be version controlled and added to the repository. |
|
362 | Schedule files to be version controlled and added to the repository. | |
363 |
|
363 | |||
364 | The files will be added to the repository at the next commit. To undo an |
|
364 | The files will be added to the repository at the next commit. To undo an | |
365 | add before that, see "hg forget". |
|
365 | add before that, see "hg forget". | |
366 |
|
366 | |||
367 | If no names are given, add all files to the repository. |
|
367 | If no names are given, add all files to the repository. | |
368 |
|
368 | |||
369 | Returns 0 if all files are successfully added. |
|
369 | Returns 0 if all files are successfully added. | |
370 |
|
370 | |||
371 | use "hg -v help add" to show verbose help |
|
371 | use "hg -v help add" to show verbose help | |
372 |
|
372 | |||
373 | options: |
|
373 | options: | |
374 |
|
374 | |||
375 | -I --include PATTERN [+] include names matching the given patterns |
|
375 | -I --include PATTERN [+] include names matching the given patterns | |
376 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
376 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
377 | -S --subrepos recurse into subrepositories |
|
377 | -S --subrepos recurse into subrepositories | |
378 | -n --dry-run do not perform actions, just print output |
|
378 | -n --dry-run do not perform actions, just print output | |
379 |
|
379 | |||
380 | [+] marked option can be specified multiple times |
|
380 | [+] marked option can be specified multiple times | |
381 |
|
381 | |||
382 | use "hg -v help add" to show global options |
|
382 | use "hg -v help add" to show global options | |
383 |
|
383 | |||
384 | $ hg add --skjdfks |
|
384 | $ hg add --skjdfks | |
385 | hg add: option --skjdfks not recognized |
|
385 | hg add: option --skjdfks not recognized | |
386 | hg add [OPTION]... [FILE]... |
|
386 | hg add [OPTION]... [FILE]... | |
387 |
|
387 | |||
388 | add the specified files on the next commit |
|
388 | add the specified files on the next commit | |
389 |
|
389 | |||
390 | Schedule files to be version controlled and added to the repository. |
|
390 | Schedule files to be version controlled and added to the repository. | |
391 |
|
391 | |||
392 | The files will be added to the repository at the next commit. To undo an |
|
392 | The files will be added to the repository at the next commit. To undo an | |
393 | add before that, see "hg forget". |
|
393 | add before that, see "hg forget". | |
394 |
|
394 | |||
395 | If no names are given, add all files to the repository. |
|
395 | If no names are given, add all files to the repository. | |
396 |
|
396 | |||
397 | Returns 0 if all files are successfully added. |
|
397 | Returns 0 if all files are successfully added. | |
398 |
|
398 | |||
399 | use "hg -v help add" to show verbose help |
|
399 | use "hg -v help add" to show verbose help | |
400 |
|
400 | |||
401 | options: |
|
401 | options: | |
402 |
|
402 | |||
403 | -I --include PATTERN [+] include names matching the given patterns |
|
403 | -I --include PATTERN [+] include names matching the given patterns | |
404 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
404 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
405 | -S --subrepos recurse into subrepositories |
|
405 | -S --subrepos recurse into subrepositories | |
406 | -n --dry-run do not perform actions, just print output |
|
406 | -n --dry-run do not perform actions, just print output | |
407 |
|
407 | |||
408 | [+] marked option can be specified multiple times |
|
408 | [+] marked option can be specified multiple times | |
409 |
|
409 | |||
410 | use "hg -v help add" to show global options |
|
410 | use "hg -v help add" to show global options | |
411 | [255] |
|
411 | [255] | |
412 |
|
412 | |||
413 | Test ambiguous command help |
|
413 | Test ambiguous command help | |
414 |
|
414 | |||
415 | $ hg help ad |
|
415 | $ hg help ad | |
416 | list of commands: |
|
416 | list of commands: | |
417 |
|
417 | |||
418 | add add the specified files on the next commit |
|
418 | add add the specified files on the next commit | |
419 | addremove add all new files, delete all missing files |
|
419 | addremove add all new files, delete all missing files | |
420 |
|
420 | |||
421 | use "hg -v help ad" to show builtin aliases and global options |
|
421 | use "hg -v help ad" to show builtin aliases and global options | |
422 |
|
422 | |||
423 | Test command without options |
|
423 | Test command without options | |
424 |
|
424 | |||
425 | $ hg help verify |
|
425 | $ hg help verify | |
426 | hg verify |
|
426 | hg verify | |
427 |
|
427 | |||
428 | verify the integrity of the repository |
|
428 | verify the integrity of the repository | |
429 |
|
429 | |||
430 | Verify the integrity of the current repository. |
|
430 | Verify the integrity of the current repository. | |
431 |
|
431 | |||
432 | This will perform an extensive check of the repository's integrity, |
|
432 | This will perform an extensive check of the repository's integrity, | |
433 | validating the hashes and checksums of each entry in the changelog, |
|
433 | validating the hashes and checksums of each entry in the changelog, | |
434 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
434 | manifest, and tracked files, as well as the integrity of their crosslinks | |
435 | and indices. |
|
435 | and indices. | |
436 |
|
436 | |||
437 | Returns 0 on success, 1 if errors are encountered. |
|
437 | Returns 0 on success, 1 if errors are encountered. | |
438 |
|
438 | |||
439 | use "hg -v help verify" to show global options |
|
439 | use "hg -v help verify" to show global options | |
440 |
|
440 | |||
441 | $ hg help diff |
|
441 | $ hg help diff | |
442 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
442 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
443 |
|
443 | |||
444 | diff repository (or selected files) |
|
444 | diff repository (or selected files) | |
445 |
|
445 | |||
446 | Show differences between revisions for the specified files. |
|
446 | Show differences between revisions for the specified files. | |
447 |
|
447 | |||
448 | Differences between files are shown using the unified diff format. |
|
448 | Differences between files are shown using the unified diff format. | |
449 |
|
449 | |||
450 | Note: |
|
450 | Note: | |
451 | diff may generate unexpected results for merges, as it will default to |
|
451 | diff may generate unexpected results for merges, as it will default to | |
452 | comparing against the working directory's first parent changeset if no |
|
452 | comparing against the working directory's first parent changeset if no | |
453 | revisions are specified. |
|
453 | revisions are specified. | |
454 |
|
454 | |||
455 | When two revision arguments are given, then changes are shown between |
|
455 | When two revision arguments are given, then changes are shown between | |
456 | those revisions. If only one revision is specified then that revision is |
|
456 | those revisions. If only one revision is specified then that revision is | |
457 | compared to the working directory, and, when no revisions are specified, |
|
457 | compared to the working directory, and, when no revisions are specified, | |
458 | the working directory files are compared to its parent. |
|
458 | the working directory files are compared to its parent. | |
459 |
|
459 | |||
460 | Alternatively you can specify -c/--change with a revision to see the |
|
460 | Alternatively you can specify -c/--change with a revision to see the | |
461 | changes in that changeset relative to its first parent. |
|
461 | changes in that changeset relative to its first parent. | |
462 |
|
462 | |||
463 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
463 | Without the -a/--text option, diff will avoid generating diffs of files it | |
464 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
464 | detects as binary. With -a, diff will generate a diff anyway, probably | |
465 | with undesirable results. |
|
465 | with undesirable results. | |
466 |
|
466 | |||
467 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
467 | Use the -g/--git option to generate diffs in the git extended diff format. | |
468 | For more information, read "hg help diffs". |
|
468 | For more information, read "hg help diffs". | |
469 |
|
469 | |||
470 | Returns 0 on success. |
|
470 | Returns 0 on success. | |
471 |
|
471 | |||
472 | options: |
|
472 | options: | |
473 |
|
473 | |||
474 | -r --rev REV [+] revision |
|
474 | -r --rev REV [+] revision | |
475 | -c --change REV change made by revision |
|
475 | -c --change REV change made by revision | |
476 | -a --text treat all files as text |
|
476 | -a --text treat all files as text | |
477 | -g --git use git extended diff format |
|
477 | -g --git use git extended diff format | |
478 | --nodates omit dates from diff headers |
|
478 | --nodates omit dates from diff headers | |
479 | -p --show-function show which function each change is in |
|
479 | -p --show-function show which function each change is in | |
480 | --reverse produce a diff that undoes the changes |
|
480 | --reverse produce a diff that undoes the changes | |
481 | -w --ignore-all-space ignore white space when comparing lines |
|
481 | -w --ignore-all-space ignore white space when comparing lines | |
482 | -b --ignore-space-change ignore changes in the amount of white space |
|
482 | -b --ignore-space-change ignore changes in the amount of white space | |
483 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
483 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
484 | -U --unified NUM number of lines of context to show |
|
484 | -U --unified NUM number of lines of context to show | |
485 | --stat output diffstat-style summary of changes |
|
485 | --stat output diffstat-style summary of changes | |
486 | -I --include PATTERN [+] include names matching the given patterns |
|
486 | -I --include PATTERN [+] include names matching the given patterns | |
487 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
487 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
488 | -S --subrepos recurse into subrepositories |
|
488 | -S --subrepos recurse into subrepositories | |
489 |
|
489 | |||
490 | [+] marked option can be specified multiple times |
|
490 | [+] marked option can be specified multiple times | |
491 |
|
491 | |||
492 | use "hg -v help diff" to show global options |
|
492 | use "hg -v help diff" to show global options | |
493 |
|
493 | |||
494 | $ hg help status |
|
494 | $ hg help status | |
495 | hg status [OPTION]... [FILE]... |
|
495 | hg status [OPTION]... [FILE]... | |
496 |
|
496 | |||
497 | aliases: st |
|
497 | aliases: st | |
498 |
|
498 | |||
499 | show changed files in the working directory |
|
499 | show changed files in the working directory | |
500 |
|
500 | |||
501 | Show status of files in the repository. If names are given, only files |
|
501 | Show status of files in the repository. If names are given, only files | |
502 | that match are shown. Files that are clean or ignored or the source of a |
|
502 | that match are shown. Files that are clean or ignored or the source of a | |
503 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
503 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
504 | -C/--copies or -A/--all are given. Unless options described with "show |
|
504 | -C/--copies or -A/--all are given. Unless options described with "show | |
505 | only ..." are given, the options -mardu are used. |
|
505 | only ..." are given, the options -mardu are used. | |
506 |
|
506 | |||
507 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
507 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
508 | explicitly requested with -u/--unknown or -i/--ignored. |
|
508 | explicitly requested with -u/--unknown or -i/--ignored. | |
509 |
|
509 | |||
510 | Note: |
|
510 | Note: | |
511 | status may appear to disagree with diff if permissions have changed or |
|
511 | status may appear to disagree with diff if permissions have changed or | |
512 | a merge has occurred. The standard diff format does not report |
|
512 | a merge has occurred. The standard diff format does not report | |
513 | permission changes and diff only reports changes relative to one merge |
|
513 | permission changes and diff only reports changes relative to one merge | |
514 | parent. |
|
514 | parent. | |
515 |
|
515 | |||
516 | If one revision is given, it is used as the base revision. If two |
|
516 | If one revision is given, it is used as the base revision. If two | |
517 | revisions are given, the differences between them are shown. The --change |
|
517 | revisions are given, the differences between them are shown. The --change | |
518 | option can also be used as a shortcut to list the changed files of a |
|
518 | option can also be used as a shortcut to list the changed files of a | |
519 | revision from its first parent. |
|
519 | revision from its first parent. | |
520 |
|
520 | |||
521 | The codes used to show the status of files are: |
|
521 | The codes used to show the status of files are: | |
522 |
|
522 | |||
523 | M = modified |
|
523 | M = modified | |
524 | A = added |
|
524 | A = added | |
525 | R = removed |
|
525 | R = removed | |
526 | C = clean |
|
526 | C = clean | |
527 | ! = missing (deleted by non-hg command, but still tracked) |
|
527 | ! = missing (deleted by non-hg command, but still tracked) | |
528 | ? = not tracked |
|
528 | ? = not tracked | |
529 | I = ignored |
|
529 | I = ignored | |
530 | = origin of the previous file listed as A (added) |
|
530 | = origin of the previous file listed as A (added) | |
531 |
|
531 | |||
532 | Returns 0 on success. |
|
532 | Returns 0 on success. | |
533 |
|
533 | |||
534 | options: |
|
534 | options: | |
535 |
|
535 | |||
536 | -A --all show status of all files |
|
536 | -A --all show status of all files | |
537 | -m --modified show only modified files |
|
537 | -m --modified show only modified files | |
538 | -a --added show only added files |
|
538 | -a --added show only added files | |
539 | -r --removed show only removed files |
|
539 | -r --removed show only removed files | |
540 | -d --deleted show only deleted (but tracked) files |
|
540 | -d --deleted show only deleted (but tracked) files | |
541 | -c --clean show only files without changes |
|
541 | -c --clean show only files without changes | |
542 | -u --unknown show only unknown (not tracked) files |
|
542 | -u --unknown show only unknown (not tracked) files | |
543 | -i --ignored show only ignored files |
|
543 | -i --ignored show only ignored files | |
544 | -n --no-status hide status prefix |
|
544 | -n --no-status hide status prefix | |
545 | -C --copies show source of copied files |
|
545 | -C --copies show source of copied files | |
546 | -0 --print0 end filenames with NUL, for use with xargs |
|
546 | -0 --print0 end filenames with NUL, for use with xargs | |
547 | --rev REV [+] show difference from revision |
|
547 | --rev REV [+] show difference from revision | |
548 | --change REV list the changed files of a revision |
|
548 | --change REV list the changed files of a revision | |
549 | -I --include PATTERN [+] include names matching the given patterns |
|
549 | -I --include PATTERN [+] include names matching the given patterns | |
550 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
550 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
551 | -S --subrepos recurse into subrepositories |
|
551 | -S --subrepos recurse into subrepositories | |
552 |
|
552 | |||
553 | [+] marked option can be specified multiple times |
|
553 | [+] marked option can be specified multiple times | |
554 |
|
554 | |||
555 | use "hg -v help status" to show global options |
|
555 | use "hg -v help status" to show global options | |
556 |
|
556 | |||
557 | $ hg -q help status |
|
557 | $ hg -q help status | |
558 | hg status [OPTION]... [FILE]... |
|
558 | hg status [OPTION]... [FILE]... | |
559 |
|
559 | |||
560 | show changed files in the working directory |
|
560 | show changed files in the working directory | |
561 |
|
561 | |||
562 | $ hg help foo |
|
562 | $ hg help foo | |
563 | hg: unknown command 'foo' |
|
563 | hg: unknown command 'foo' | |
564 | Mercurial Distributed SCM |
|
564 | Mercurial Distributed SCM | |
565 |
|
565 | |||
566 | basic commands: |
|
566 | basic commands: | |
567 |
|
567 | |||
568 | add add the specified files on the next commit |
|
568 | add add the specified files on the next commit | |
569 | annotate show changeset information by line for each file |
|
569 | annotate show changeset information by line for each file | |
570 | clone make a copy of an existing repository |
|
570 | clone make a copy of an existing repository | |
571 | commit commit the specified files or all outstanding changes |
|
571 | commit commit the specified files or all outstanding changes | |
572 | diff diff repository (or selected files) |
|
572 | diff diff repository (or selected files) | |
573 | export dump the header and diffs for one or more changesets |
|
573 | export dump the header and diffs for one or more changesets | |
574 | forget forget the specified files on the next commit |
|
574 | forget forget the specified files on the next commit | |
575 | init create a new repository in the given directory |
|
575 | init create a new repository in the given directory | |
576 | log show revision history of entire repository or files |
|
576 | log show revision history of entire repository or files | |
577 | merge merge working directory with another revision |
|
577 | merge merge working directory with another revision | |
578 | pull pull changes from the specified source |
|
578 | pull pull changes from the specified source | |
579 | push push changes to the specified destination |
|
579 | push push changes to the specified destination | |
580 | remove remove the specified files on the next commit |
|
580 | remove remove the specified files on the next commit | |
581 | serve start stand-alone webserver |
|
581 | serve start stand-alone webserver | |
582 | status show changed files in the working directory |
|
582 | status show changed files in the working directory | |
583 | summary summarize working directory state |
|
583 | summary summarize working directory state | |
584 | update update working directory (or switch revisions) |
|
584 | update update working directory (or switch revisions) | |
585 |
|
585 | |||
586 | use "hg help" for the full list of commands or "hg -v" for details |
|
586 | use "hg help" for the full list of commands or "hg -v" for details | |
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 | $ cat > helpext.py <<EOF |
|
616 | $ cat > helpext.py <<EOF | |
617 | > import os |
|
617 | > import os | |
618 | > from mercurial import commands |
|
618 | > from mercurial import commands | |
619 | > |
|
619 | > | |
620 | > def nohelp(ui, *args, **kwargs): |
|
620 | > def nohelp(ui, *args, **kwargs): | |
621 | > pass |
|
621 | > pass | |
622 | > |
|
622 | > | |
623 | > cmdtable = { |
|
623 | > cmdtable = { | |
624 | > "nohelp": (nohelp, [], "hg nohelp"), |
|
624 | > "nohelp": (nohelp, [], "hg nohelp"), | |
625 | > } |
|
625 | > } | |
626 | > |
|
626 | > | |
627 | > commands.norepo += ' nohelp' |
|
627 | > commands.norepo += ' nohelp' | |
628 | > EOF |
|
628 | > EOF | |
629 | $ echo '[extensions]' >> $HGRCPATH |
|
629 | $ echo '[extensions]' >> $HGRCPATH | |
630 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
630 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
631 |
|
631 | |||
632 | Test command with no help text |
|
632 | Test command with no help text | |
633 |
|
633 | |||
634 | $ hg help nohelp |
|
634 | $ hg help nohelp | |
635 | hg nohelp |
|
635 | hg nohelp | |
636 |
|
636 | |||
637 | (no help text available) |
|
637 | (no help text available) | |
638 |
|
638 | |||
639 | use "hg -v help nohelp" to show global options |
|
639 | use "hg -v help nohelp" to show global options | |
640 |
|
640 | |||
641 | Test that default list of commands omits extension commands |
|
641 | Test that default list of commands omits extension commands | |
642 |
|
642 | |||
643 | $ hg help |
|
643 | $ hg help | |
644 | Mercurial Distributed SCM |
|
644 | Mercurial Distributed SCM | |
645 |
|
645 | |||
646 | list of commands: |
|
646 | list of commands: | |
647 |
|
647 | |||
648 | add add the specified files on the next commit |
|
648 | add add the specified files on the next commit | |
649 | addremove add all new files, delete all missing files |
|
649 | addremove add all new files, delete all missing files | |
650 | annotate show changeset information by line for each file |
|
650 | annotate show changeset information by line for each file | |
651 | archive create an unversioned archive of a repository revision |
|
651 | archive create an unversioned archive of a repository revision | |
652 | backout reverse effect of earlier changeset |
|
652 | backout reverse effect of earlier changeset | |
653 | bisect subdivision search of changesets |
|
653 | bisect subdivision search of changesets | |
654 | bookmarks track a line of development with movable markers |
|
654 | bookmarks track a line of development with movable markers | |
655 | branch set or show the current branch name |
|
655 | branch set or show the current branch name | |
656 | branches list repository named branches |
|
656 | branches list repository named branches | |
657 | bundle create a changegroup file |
|
657 | bundle create a changegroup file | |
658 | cat output the current or given revision of files |
|
658 | cat output the current or given revision of files | |
659 | clone make a copy of an existing repository |
|
659 | clone make a copy of an existing repository | |
660 | commit commit the specified files or all outstanding changes |
|
660 | commit commit the specified files or all outstanding changes | |
661 | copy mark files as copied for the next commit |
|
661 | copy mark files as copied for the next commit | |
662 | diff diff repository (or selected files) |
|
662 | diff diff repository (or selected files) | |
663 | export dump the header and diffs for one or more changesets |
|
663 | export dump the header and diffs for one or more changesets | |
664 | forget forget the specified files on the next commit |
|
664 | forget forget the specified files on the next commit | |
665 | grep search for a pattern in specified files and revisions |
|
665 | grep search for a pattern in specified files and revisions | |
666 | heads show current repository heads or show branch heads |
|
666 | heads show current repository heads or show branch heads | |
667 | help show help for a given topic or a help overview |
|
667 | help show help for a given topic or a help overview | |
668 | identify identify the working copy or specified revision |
|
668 | identify identify the working copy or specified revision | |
669 | import import an ordered set of patches |
|
669 | import import an ordered set of patches | |
670 | incoming show new changesets found in source |
|
670 | incoming show new changesets found in source | |
671 | init create a new repository in the given directory |
|
671 | init create a new repository in the given directory | |
672 | locate locate files matching specific patterns |
|
672 | locate locate files matching specific patterns | |
673 | log show revision history of entire repository or files |
|
673 | log show revision history of entire repository or files | |
674 | manifest output the current or given revision of the project manifest |
|
674 | manifest output the current or given revision of the project manifest | |
675 | merge merge working directory with another revision |
|
675 | merge merge working directory with another revision | |
676 | outgoing show changesets not found in the destination |
|
676 | outgoing show changesets not found in the destination | |
677 | parents show the parents of the working directory or revision |
|
677 | parents show the parents of the working directory or revision | |
678 | paths show aliases for remote repositories |
|
678 | paths show aliases for remote repositories | |
679 | pull pull changes from the specified source |
|
679 | pull pull changes from the specified source | |
680 | push push changes to the specified destination |
|
680 | push push changes to the specified destination | |
681 | recover roll back an interrupted transaction |
|
681 | recover roll back an interrupted transaction | |
682 | remove remove the specified files on the next commit |
|
682 | remove remove the specified files on the next commit | |
683 | rename rename files; equivalent of copy + remove |
|
683 | rename rename files; equivalent of copy + remove | |
684 | resolve redo merges or set/view the merge status of files |
|
684 | resolve redo merges or set/view the merge status of files | |
685 | revert restore individual files or directories to an earlier state |
|
685 | revert restore individual files or directories to an earlier state | |
686 | rollback roll back the last transaction (dangerous) |
|
686 | rollback roll back the last transaction (dangerous) | |
687 | root print the root (top) of the current working directory |
|
687 | root print the root (top) of the current working directory | |
688 | serve start stand-alone webserver |
|
688 | serve start stand-alone webserver | |
689 | showconfig show combined config settings from all hgrc files |
|
689 | showconfig show combined config settings from all hgrc files | |
690 | status show changed files in the working directory |
|
690 | status show changed files in the working directory | |
691 | summary summarize working directory state |
|
691 | summary summarize working directory state | |
692 | tag add one or more tags for the current or given revision |
|
692 | tag add one or more tags for the current or given revision | |
693 | tags list repository tags |
|
693 | tags list repository tags | |
694 | tip show the tip revision |
|
694 | tip show the tip revision | |
695 | unbundle apply one or more changegroup files |
|
695 | unbundle apply one or more changegroup files | |
696 | update update working directory (or switch revisions) |
|
696 | update update working directory (or switch revisions) | |
697 | verify verify the integrity of the repository |
|
697 | verify verify the integrity of the repository | |
698 | version output version and copyright information |
|
698 | version output version and copyright information | |
699 |
|
699 | |||
700 | enabled extensions: |
|
700 | enabled extensions: | |
701 |
|
701 | |||
702 | helpext (no help text available) |
|
702 | helpext (no help text available) | |
703 |
|
703 | |||
704 | additional help topics: |
|
704 | additional help topics: | |
705 |
|
705 | |||
706 | config Configuration Files |
|
706 | config Configuration Files | |
707 | dates Date Formats |
|
707 | dates Date Formats | |
708 | patterns File Name Patterns |
|
708 | diffs Diff Formats | |
709 | environment Environment Variables |
|
709 | environment Environment Variables | |
710 | revisions Specifying Single Revisions |
|
710 | extensions Using additional features | |
|
711 | glossary Glossary | |||
|
712 | hgweb Configuring hgweb | |||
|
713 | merge-tools Merge Tools | |||
711 | multirevs Specifying Multiple Revisions |
|
714 | multirevs Specifying Multiple Revisions | |
|
715 | patterns File Name Patterns | |||
|
716 | revisions Specifying Single Revisions | |||
712 | revsets Specifying Revision Sets |
|
717 | revsets Specifying Revision Sets | |
713 | diffs Diff Formats |
|
718 | subrepos Subrepositories | |
714 | merge-tools Merge Tools |
|
|||
715 | templating Template Usage |
|
719 | templating Template Usage | |
716 | urls URL Paths |
|
720 | urls URL Paths | |
717 | extensions Using additional features |
|
|||
718 | subrepos Subrepositories |
|
|||
719 | hgweb Configuring hgweb |
|
|||
720 | glossary Glossary |
|
|||
721 |
|
721 | |||
722 | use "hg -v help" to show builtin aliases and global options |
|
722 | use "hg -v help" to show builtin aliases and global options | |
723 |
|
723 | |||
|
724 | ||||
|
725 | ||||
724 | Test list of commands with command with no help text |
|
726 | Test list of commands with command with no help text | |
725 |
|
727 | |||
726 | $ hg help helpext |
|
728 | $ hg help helpext | |
727 | helpext extension - no help text available |
|
729 | helpext extension - no help text available | |
728 |
|
730 | |||
729 | list of commands: |
|
731 | list of commands: | |
730 |
|
732 | |||
731 | nohelp (no help text available) |
|
733 | nohelp (no help text available) | |
732 |
|
734 | |||
733 | use "hg -v help helpext" to show builtin aliases and global options |
|
735 | use "hg -v help helpext" to show builtin aliases and global options | |
734 |
|
736 | |||
735 | Test a help topic |
|
737 | Test a help topic | |
736 |
|
738 | |||
737 | $ hg help revs |
|
739 | $ hg help revs | |
738 | Specifying Single Revisions |
|
740 | Specifying Single Revisions | |
739 |
|
741 | |||
740 | Mercurial supports several ways to specify individual revisions. |
|
742 | Mercurial supports several ways to specify individual revisions. | |
741 |
|
743 | |||
742 | A plain integer is treated as a revision number. Negative integers are |
|
744 | A plain integer is treated as a revision number. Negative integers are | |
743 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 |
|
745 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 | |
744 | denoting the revision prior to the tip, and so forth. |
|
746 | denoting the revision prior to the tip, and so forth. | |
745 |
|
747 | |||
746 | A 40-digit hexadecimal string is treated as a unique revision identifier. |
|
748 | A 40-digit hexadecimal string is treated as a unique revision identifier. | |
747 |
|
749 | |||
748 | A hexadecimal string less than 40 characters long is treated as a unique |
|
750 | A hexadecimal string less than 40 characters long is treated as a unique | |
749 | revision identifier and is referred to as a short-form identifier. A |
|
751 | revision identifier and is referred to as a short-form identifier. A | |
750 | short-form identifier is only valid if it is the prefix of exactly one |
|
752 | short-form identifier is only valid if it is the prefix of exactly one | |
751 | full-length identifier. |
|
753 | full-length identifier. | |
752 |
|
754 | |||
753 | Any other string is treated as a tag or branch name. A tag name is a |
|
755 | Any other string is treated as a tag or branch name. A tag name is a | |
754 | symbolic name associated with a revision identifier. A branch name denotes |
|
756 | symbolic name associated with a revision identifier. A branch name denotes | |
755 | the tipmost revision of that branch. Tag and branch names must not contain |
|
757 | the tipmost revision of that branch. Tag and branch names must not contain | |
756 | the ":" character. |
|
758 | the ":" character. | |
757 |
|
759 | |||
758 | The reserved name "tip" is a special tag that always identifies the most |
|
760 | The reserved name "tip" is a special tag that always identifies the most | |
759 | recent revision. |
|
761 | recent revision. | |
760 |
|
762 | |||
761 | The reserved name "null" indicates the null revision. This is the revision |
|
763 | The reserved name "null" indicates the null revision. This is the revision | |
762 | of an empty repository, and the parent of revision 0. |
|
764 | of an empty repository, and the parent of revision 0. | |
763 |
|
765 | |||
764 | The reserved name "." indicates the working directory parent. If no |
|
766 | The reserved name "." indicates the working directory parent. If no | |
765 | working directory is checked out, it is equivalent to null. If an |
|
767 | working directory is checked out, it is equivalent to null. If an | |
766 | uncommitted merge is in progress, "." is the revision of the first parent. |
|
768 | uncommitted merge is in progress, "." is the revision of the first parent. | |
767 |
|
769 | |||
768 | Test templating help |
|
770 | Test templating help | |
769 |
|
771 | |||
770 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
772 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
771 | desc String. The text of the changeset description. |
|
773 | desc String. The text of the changeset description. | |
772 | diffstat String. Statistics of changes with the following format: |
|
774 | diffstat String. Statistics of changes with the following format: | |
773 | firstline Any text. Returns the first line of text. |
|
775 | firstline Any text. Returns the first line of text. | |
774 | nonempty Any text. Returns '(none)' if the string is empty. |
|
776 | nonempty Any text. Returns '(none)' if the string is empty. | |
775 |
|
777 | |||
776 | Test help hooks |
|
778 | Test help hooks | |
777 |
|
779 | |||
778 | $ cat > helphook1.py <<EOF |
|
780 | $ cat > helphook1.py <<EOF | |
779 | > from mercurial import help |
|
781 | > from mercurial import help | |
780 | > |
|
782 | > | |
781 | > def rewrite(topic, doc): |
|
783 | > def rewrite(topic, doc): | |
782 | > return doc + '\nhelphook1\n' |
|
784 | > return doc + '\nhelphook1\n' | |
783 | > |
|
785 | > | |
784 | > def extsetup(ui): |
|
786 | > def extsetup(ui): | |
785 | > help.addtopichook('revsets', rewrite) |
|
787 | > help.addtopichook('revsets', rewrite) | |
786 | > EOF |
|
788 | > EOF | |
787 | $ cat > helphook2.py <<EOF |
|
789 | $ cat > helphook2.py <<EOF | |
788 | > from mercurial import help |
|
790 | > from mercurial import help | |
789 | > |
|
791 | > | |
790 | > def rewrite(topic, doc): |
|
792 | > def rewrite(topic, doc): | |
791 | > return doc + '\nhelphook2\n' |
|
793 | > return doc + '\nhelphook2\n' | |
792 | > |
|
794 | > | |
793 | > def extsetup(ui): |
|
795 | > def extsetup(ui): | |
794 | > help.addtopichook('revsets', rewrite) |
|
796 | > help.addtopichook('revsets', rewrite) | |
795 | > EOF |
|
797 | > EOF | |
796 | $ echo '[extensions]' >> $HGRCPATH |
|
798 | $ echo '[extensions]' >> $HGRCPATH | |
797 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
799 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
798 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
800 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
799 | $ hg help revsets | grep helphook |
|
801 | $ hg help revsets | grep helphook | |
800 | helphook1 |
|
802 | helphook1 | |
801 | helphook2 |
|
803 | helphook2 |
General Comments 0
You need to be logged in to leave comments.
Login now