Show More
@@ -1,1755 +1,1757 | |||||
1 | Test basic extension support |
|
1 | Test basic extension support | |
2 |
|
2 | |||
3 | $ cat > foobar.py <<EOF |
|
3 | $ cat > foobar.py <<EOF | |
4 | > import os |
|
4 | > import os | |
5 | > from mercurial import commands, registrar |
|
5 | > from mercurial import commands, registrar | |
6 | > cmdtable = {} |
|
6 | > cmdtable = {} | |
7 | > command = registrar.command(cmdtable) |
|
7 | > command = registrar.command(cmdtable) | |
8 | > configtable = {} |
|
8 | > configtable = {} | |
9 | > configitem = registrar.configitem(configtable) |
|
9 | > configitem = registrar.configitem(configtable) | |
10 | > configitem(b'tests', b'foo', default=b"Foo") |
|
10 | > configitem(b'tests', b'foo', default=b"Foo") | |
11 | > def uisetup(ui): |
|
11 | > def uisetup(ui): | |
12 | > ui.debug(b"uisetup called [debug]\\n") |
|
12 | > ui.debug(b"uisetup called [debug]\\n") | |
13 | > ui.write(b"uisetup called\\n") |
|
13 | > ui.write(b"uisetup called\\n") | |
14 | > ui.status(b"uisetup called [status]\\n") |
|
14 | > ui.status(b"uisetup called [status]\\n") | |
15 | > ui.flush() |
|
15 | > ui.flush() | |
16 | > def reposetup(ui, repo): |
|
16 | > def reposetup(ui, repo): | |
17 | > ui.write(b"reposetup called for %s\\n" % os.path.basename(repo.root)) |
|
17 | > ui.write(b"reposetup called for %s\\n" % os.path.basename(repo.root)) | |
18 | > ui.write(b"ui %s= repo.ui\\n" % (ui == repo.ui and b"=" or b"!")) |
|
18 | > ui.write(b"ui %s= repo.ui\\n" % (ui == repo.ui and b"=" or b"!")) | |
19 | > ui.flush() |
|
19 | > ui.flush() | |
20 | > @command(b'foo', [], b'hg foo') |
|
20 | > @command(b'foo', [], b'hg foo') | |
21 | > def foo(ui, *args, **kwargs): |
|
21 | > def foo(ui, *args, **kwargs): | |
22 | > foo = ui.config(b'tests', b'foo') |
|
22 | > foo = ui.config(b'tests', b'foo') | |
23 | > ui.write(foo) |
|
23 | > ui.write(foo) | |
24 | > ui.write(b"\\n") |
|
24 | > ui.write(b"\\n") | |
25 | > @command(b'bar', [], b'hg bar', norepo=True) |
|
25 | > @command(b'bar', [], b'hg bar', norepo=True) | |
26 | > def bar(ui, *args, **kwargs): |
|
26 | > def bar(ui, *args, **kwargs): | |
27 | > ui.write(b"Bar\\n") |
|
27 | > ui.write(b"Bar\\n") | |
28 | > EOF |
|
28 | > EOF | |
29 | $ abspath=`pwd`/foobar.py |
|
29 | $ abspath=`pwd`/foobar.py | |
30 |
|
30 | |||
31 | $ mkdir barfoo |
|
31 | $ mkdir barfoo | |
32 | $ cp foobar.py barfoo/__init__.py |
|
32 | $ cp foobar.py barfoo/__init__.py | |
33 | $ barfoopath=`pwd`/barfoo |
|
33 | $ barfoopath=`pwd`/barfoo | |
34 |
|
34 | |||
35 | $ hg init a |
|
35 | $ hg init a | |
36 | $ cd a |
|
36 | $ cd a | |
37 | $ echo foo > file |
|
37 | $ echo foo > file | |
38 | $ hg add file |
|
38 | $ hg add file | |
39 | $ hg commit -m 'add file' |
|
39 | $ hg commit -m 'add file' | |
40 |
|
40 | |||
41 | $ echo '[extensions]' >> $HGRCPATH |
|
41 | $ echo '[extensions]' >> $HGRCPATH | |
42 | $ echo "foobar = $abspath" >> $HGRCPATH |
|
42 | $ echo "foobar = $abspath" >> $HGRCPATH | |
43 | $ hg foo |
|
43 | $ hg foo | |
44 | uisetup called |
|
44 | uisetup called | |
45 | uisetup called [status] |
|
45 | uisetup called [status] | |
46 | reposetup called for a |
|
46 | reposetup called for a | |
47 | ui == repo.ui |
|
47 | ui == repo.ui | |
48 | reposetup called for a (chg !) |
|
48 | reposetup called for a (chg !) | |
49 | ui == repo.ui (chg !) |
|
49 | ui == repo.ui (chg !) | |
50 | Foo |
|
50 | Foo | |
51 | $ hg foo --quiet |
|
51 | $ hg foo --quiet | |
52 | uisetup called (no-chg !) |
|
52 | uisetup called (no-chg !) | |
53 | reposetup called for a (chg !) |
|
53 | reposetup called for a (chg !) | |
54 | ui == repo.ui |
|
54 | ui == repo.ui | |
55 | Foo |
|
55 | Foo | |
56 | $ hg foo --debug |
|
56 | $ hg foo --debug | |
57 | uisetup called [debug] (no-chg !) |
|
57 | uisetup called [debug] (no-chg !) | |
58 | uisetup called (no-chg !) |
|
58 | uisetup called (no-chg !) | |
59 | uisetup called [status] (no-chg !) |
|
59 | uisetup called [status] (no-chg !) | |
60 | reposetup called for a (chg !) |
|
60 | reposetup called for a (chg !) | |
61 | ui == repo.ui |
|
61 | ui == repo.ui | |
62 | Foo |
|
62 | Foo | |
63 |
|
63 | |||
64 | $ cd .. |
|
64 | $ cd .. | |
65 | $ hg clone a b |
|
65 | $ hg clone a b | |
66 | uisetup called (no-chg !) |
|
66 | uisetup called (no-chg !) | |
67 | uisetup called [status] (no-chg !) |
|
67 | uisetup called [status] (no-chg !) | |
68 | reposetup called for a |
|
68 | reposetup called for a | |
69 | ui == repo.ui |
|
69 | ui == repo.ui | |
70 | reposetup called for b |
|
70 | reposetup called for b | |
71 | ui == repo.ui |
|
71 | ui == repo.ui | |
72 | updating to branch default |
|
72 | updating to branch default | |
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
74 |
|
74 | |||
75 | $ hg bar |
|
75 | $ hg bar | |
76 | uisetup called (no-chg !) |
|
76 | uisetup called (no-chg !) | |
77 | uisetup called [status] (no-chg !) |
|
77 | uisetup called [status] (no-chg !) | |
78 | Bar |
|
78 | Bar | |
79 | $ echo 'foobar = !' >> $HGRCPATH |
|
79 | $ echo 'foobar = !' >> $HGRCPATH | |
80 |
|
80 | |||
81 | module/__init__.py-style |
|
81 | module/__init__.py-style | |
82 |
|
82 | |||
83 | $ echo "barfoo = $barfoopath" >> $HGRCPATH |
|
83 | $ echo "barfoo = $barfoopath" >> $HGRCPATH | |
84 | $ cd a |
|
84 | $ cd a | |
85 | $ hg foo |
|
85 | $ hg foo | |
86 | uisetup called |
|
86 | uisetup called | |
87 | uisetup called [status] |
|
87 | uisetup called [status] | |
88 | reposetup called for a |
|
88 | reposetup called for a | |
89 | ui == repo.ui |
|
89 | ui == repo.ui | |
90 | reposetup called for a (chg !) |
|
90 | reposetup called for a (chg !) | |
91 | ui == repo.ui (chg !) |
|
91 | ui == repo.ui (chg !) | |
92 | Foo |
|
92 | Foo | |
93 | $ echo 'barfoo = !' >> $HGRCPATH |
|
93 | $ echo 'barfoo = !' >> $HGRCPATH | |
94 |
|
94 | |||
95 | Check that extensions are loaded in phases: |
|
95 | Check that extensions are loaded in phases: | |
96 |
|
96 | |||
97 | $ cat > foo.py <<EOF |
|
97 | $ cat > foo.py <<EOF | |
98 | > import os |
|
98 | > import os | |
99 | > name = os.path.basename(__file__).rsplit('.', 1)[0] |
|
99 | > name = os.path.basename(__file__).rsplit('.', 1)[0] | |
100 | > print("1) %s imported" % name) |
|
100 | > print("1) %s imported" % name) | |
101 | > def uisetup(ui): |
|
101 | > def uisetup(ui): | |
102 | > print("2) %s uisetup" % name) |
|
102 | > print("2) %s uisetup" % name) | |
103 | > def extsetup(): |
|
103 | > def extsetup(): | |
104 | > print("3) %s extsetup" % name) |
|
104 | > print("3) %s extsetup" % name) | |
105 | > def reposetup(ui, repo): |
|
105 | > def reposetup(ui, repo): | |
106 | > print("4) %s reposetup" % name) |
|
106 | > print("4) %s reposetup" % name) | |
107 | > |
|
107 | > | |
108 | > # custom predicate to check registration of functions at loading |
|
108 | > # custom predicate to check registration of functions at loading | |
109 | > from mercurial import ( |
|
109 | > from mercurial import ( | |
110 | > registrar, |
|
110 | > registrar, | |
111 | > smartset, |
|
111 | > smartset, | |
112 | > ) |
|
112 | > ) | |
113 | > revsetpredicate = registrar.revsetpredicate() |
|
113 | > revsetpredicate = registrar.revsetpredicate() | |
114 | > @revsetpredicate(name, safe=True) # safe=True for query via hgweb |
|
114 | > @revsetpredicate(name, safe=True) # safe=True for query via hgweb | |
115 | > def custompredicate(repo, subset, x): |
|
115 | > def custompredicate(repo, subset, x): | |
116 | > return smartset.baseset([r for r in subset if r in {0}]) |
|
116 | > return smartset.baseset([r for r in subset if r in {0}]) | |
117 | > EOF |
|
117 | > EOF | |
118 |
|
118 | |||
119 | $ cp foo.py bar.py |
|
119 | $ cp foo.py bar.py | |
120 | $ echo 'foo = foo.py' >> $HGRCPATH |
|
120 | $ echo 'foo = foo.py' >> $HGRCPATH | |
121 | $ echo 'bar = bar.py' >> $HGRCPATH |
|
121 | $ echo 'bar = bar.py' >> $HGRCPATH | |
122 |
|
122 | |||
123 | Check normal command's load order of extensions and registration of functions |
|
123 | Check normal command's load order of extensions and registration of functions | |
124 |
|
124 | |||
125 | $ hg log -r "foo() and bar()" -q |
|
125 | $ hg log -r "foo() and bar()" -q | |
126 | 1) foo imported |
|
126 | 1) foo imported | |
127 | 1) bar imported |
|
127 | 1) bar imported | |
128 | 2) foo uisetup |
|
128 | 2) foo uisetup | |
129 | 2) bar uisetup |
|
129 | 2) bar uisetup | |
130 | 3) foo extsetup |
|
130 | 3) foo extsetup | |
131 | 3) bar extsetup |
|
131 | 3) bar extsetup | |
132 | 4) foo reposetup |
|
132 | 4) foo reposetup | |
133 | 4) bar reposetup |
|
133 | 4) bar reposetup | |
134 | 0:c24b9ac61126 |
|
134 | 0:c24b9ac61126 | |
135 |
|
135 | |||
136 | Check hgweb's load order of extensions and registration of functions |
|
136 | Check hgweb's load order of extensions and registration of functions | |
137 |
|
137 | |||
138 | $ cat > hgweb.cgi <<EOF |
|
138 | $ cat > hgweb.cgi <<EOF | |
139 | > #!$PYTHON |
|
139 | > #!$PYTHON | |
140 | > from mercurial import demandimport; demandimport.enable() |
|
140 | > from mercurial import demandimport; demandimport.enable() | |
141 | > from mercurial.hgweb import hgweb |
|
141 | > from mercurial.hgweb import hgweb | |
142 | > from mercurial.hgweb import wsgicgi |
|
142 | > from mercurial.hgweb import wsgicgi | |
143 | > application = hgweb('.', 'test repo') |
|
143 | > application = hgweb('.', 'test repo') | |
144 | > wsgicgi.launch(application) |
|
144 | > wsgicgi.launch(application) | |
145 | > EOF |
|
145 | > EOF | |
146 | $ . "$TESTDIR/cgienv" |
|
146 | $ . "$TESTDIR/cgienv" | |
147 |
|
147 | |||
148 | $ PATH_INFO='/' SCRIPT_NAME='' $PYTHON hgweb.cgi \ |
|
148 | $ PATH_INFO='/' SCRIPT_NAME='' $PYTHON hgweb.cgi \ | |
149 | > | grep '^[0-9]) ' # ignores HTML output |
|
149 | > | grep '^[0-9]) ' # ignores HTML output | |
150 | 1) foo imported |
|
150 | 1) foo imported | |
151 | 1) bar imported |
|
151 | 1) bar imported | |
152 | 2) foo uisetup |
|
152 | 2) foo uisetup | |
153 | 2) bar uisetup |
|
153 | 2) bar uisetup | |
154 | 3) foo extsetup |
|
154 | 3) foo extsetup | |
155 | 3) bar extsetup |
|
155 | 3) bar extsetup | |
156 | 4) foo reposetup |
|
156 | 4) foo reposetup | |
157 | 4) bar reposetup |
|
157 | 4) bar reposetup | |
158 |
|
158 | |||
159 | (check that revset predicate foo() and bar() are available) |
|
159 | (check that revset predicate foo() and bar() are available) | |
160 |
|
160 | |||
161 | #if msys |
|
161 | #if msys | |
162 | $ PATH_INFO='//shortlog' |
|
162 | $ PATH_INFO='//shortlog' | |
163 | #else |
|
163 | #else | |
164 | $ PATH_INFO='/shortlog' |
|
164 | $ PATH_INFO='/shortlog' | |
165 | #endif |
|
165 | #endif | |
166 | $ export PATH_INFO |
|
166 | $ export PATH_INFO | |
167 | $ SCRIPT_NAME='' QUERY_STRING='rev=foo() and bar()' $PYTHON hgweb.cgi \ |
|
167 | $ SCRIPT_NAME='' QUERY_STRING='rev=foo() and bar()' $PYTHON hgweb.cgi \ | |
168 | > | grep '<a href="/rev/[0-9a-z]*">' |
|
168 | > | grep '<a href="/rev/[0-9a-z]*">' | |
169 | <a href="/rev/c24b9ac61126">add file</a> |
|
169 | <a href="/rev/c24b9ac61126">add file</a> | |
170 |
|
170 | |||
171 | $ echo 'foo = !' >> $HGRCPATH |
|
171 | $ echo 'foo = !' >> $HGRCPATH | |
172 | $ echo 'bar = !' >> $HGRCPATH |
|
172 | $ echo 'bar = !' >> $HGRCPATH | |
173 |
|
173 | |||
174 | Check "from __future__ import absolute_import" support for external libraries |
|
174 | Check "from __future__ import absolute_import" support for external libraries | |
175 |
|
175 | |||
176 | #if windows |
|
176 | #if windows | |
177 | $ PATHSEP=";" |
|
177 | $ PATHSEP=";" | |
178 | #else |
|
178 | #else | |
179 | $ PATHSEP=":" |
|
179 | $ PATHSEP=":" | |
180 | #endif |
|
180 | #endif | |
181 | $ export PATHSEP |
|
181 | $ export PATHSEP | |
182 |
|
182 | |||
183 | $ mkdir $TESTTMP/libroot |
|
183 | $ mkdir $TESTTMP/libroot | |
184 | $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py |
|
184 | $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py | |
185 | $ mkdir $TESTTMP/libroot/mod |
|
185 | $ mkdir $TESTTMP/libroot/mod | |
186 | $ touch $TESTTMP/libroot/mod/__init__.py |
|
186 | $ touch $TESTTMP/libroot/mod/__init__.py | |
187 | $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py |
|
187 | $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py | |
188 |
|
188 | |||
189 | $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF |
|
189 | $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF | |
190 | > from __future__ import absolute_import |
|
190 | > from __future__ import absolute_import | |
191 | > import ambig # should load "libroot/ambig.py" |
|
191 | > import ambig # should load "libroot/ambig.py" | |
192 | > s = ambig.s |
|
192 | > s = ambig.s | |
193 | > EOF |
|
193 | > EOF | |
194 | $ cat > loadabs.py <<EOF |
|
194 | $ cat > loadabs.py <<EOF | |
195 | > import mod.ambigabs as ambigabs |
|
195 | > import mod.ambigabs as ambigabs | |
196 | > def extsetup(): |
|
196 | > def extsetup(): | |
197 | > print('ambigabs.s=%s' % ambigabs.s) |
|
197 | > print('ambigabs.s=%s' % ambigabs.s) | |
198 | > EOF |
|
198 | > EOF | |
199 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) |
|
199 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) | |
200 | ambigabs.s=libroot/ambig.py |
|
200 | ambigabs.s=libroot/ambig.py | |
201 | $TESTTMP/a |
|
201 | $TESTTMP/a | |
202 |
|
202 | |||
203 | #if no-py3k |
|
203 | #if no-py3k | |
204 | $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF |
|
204 | $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF | |
205 | > import ambig # should load "libroot/mod/ambig.py" |
|
205 | > import ambig # should load "libroot/mod/ambig.py" | |
206 | > s = ambig.s |
|
206 | > s = ambig.s | |
207 | > EOF |
|
207 | > EOF | |
208 | $ cat > loadrel.py <<EOF |
|
208 | $ cat > loadrel.py <<EOF | |
209 | > import mod.ambigrel as ambigrel |
|
209 | > import mod.ambigrel as ambigrel | |
210 | > def extsetup(): |
|
210 | > def extsetup(): | |
211 | > print('ambigrel.s=%s' % ambigrel.s) |
|
211 | > print('ambigrel.s=%s' % ambigrel.s) | |
212 | > EOF |
|
212 | > EOF | |
213 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) |
|
213 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) | |
214 | ambigrel.s=libroot/mod/ambig.py |
|
214 | ambigrel.s=libroot/mod/ambig.py | |
215 | $TESTTMP/a |
|
215 | $TESTTMP/a | |
216 | #endif |
|
216 | #endif | |
217 |
|
217 | |||
218 | Check absolute/relative import of extension specific modules |
|
218 | Check absolute/relative import of extension specific modules | |
219 |
|
219 | |||
220 | $ mkdir $TESTTMP/extroot |
|
220 | $ mkdir $TESTTMP/extroot | |
221 | $ cat > $TESTTMP/extroot/bar.py <<EOF |
|
221 | $ cat > $TESTTMP/extroot/bar.py <<EOF | |
222 | > s = 'this is extroot.bar' |
|
222 | > s = 'this is extroot.bar' | |
223 | > EOF |
|
223 | > EOF | |
224 | $ mkdir $TESTTMP/extroot/sub1 |
|
224 | $ mkdir $TESTTMP/extroot/sub1 | |
225 | $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF |
|
225 | $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF | |
226 | > s = 'this is extroot.sub1.__init__' |
|
226 | > s = 'this is extroot.sub1.__init__' | |
227 | > EOF |
|
227 | > EOF | |
228 | $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF |
|
228 | $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF | |
229 | > s = 'this is extroot.sub1.baz' |
|
229 | > s = 'this is extroot.sub1.baz' | |
230 | > EOF |
|
230 | > EOF | |
231 | $ cat > $TESTTMP/extroot/__init__.py <<EOF |
|
231 | $ cat > $TESTTMP/extroot/__init__.py <<EOF | |
232 | > s = 'this is extroot.__init__' |
|
232 | > s = 'this is extroot.__init__' | |
233 | > import foo |
|
233 | > import foo | |
234 | > def extsetup(ui): |
|
234 | > def extsetup(ui): | |
235 | > ui.write('(extroot) ', foo.func(), '\n') |
|
235 | > ui.write('(extroot) ', foo.func(), '\n') | |
236 | > ui.flush() |
|
236 | > ui.flush() | |
237 | > EOF |
|
237 | > EOF | |
238 |
|
238 | |||
239 | $ cat > $TESTTMP/extroot/foo.py <<EOF |
|
239 | $ cat > $TESTTMP/extroot/foo.py <<EOF | |
240 | > # test absolute import |
|
240 | > # test absolute import | |
241 | > buf = [] |
|
241 | > buf = [] | |
242 | > def func(): |
|
242 | > def func(): | |
243 | > # "not locals" case |
|
243 | > # "not locals" case | |
244 | > import extroot.bar |
|
244 | > import extroot.bar | |
245 | > buf.append('import extroot.bar in func(): %s' % extroot.bar.s) |
|
245 | > buf.append('import extroot.bar in func(): %s' % extroot.bar.s) | |
246 | > return '\n(extroot) '.join(buf) |
|
246 | > return '\n(extroot) '.join(buf) | |
247 | > # "fromlist == ('*',)" case |
|
247 | > # "fromlist == ('*',)" case | |
248 | > from extroot.bar import * |
|
248 | > from extroot.bar import * | |
249 | > buf.append('from extroot.bar import *: %s' % s) |
|
249 | > buf.append('from extroot.bar import *: %s' % s) | |
250 | > # "not fromlist" and "if '.' in name" case |
|
250 | > # "not fromlist" and "if '.' in name" case | |
251 | > import extroot.sub1.baz |
|
251 | > import extroot.sub1.baz | |
252 | > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s) |
|
252 | > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s) | |
253 | > # "not fromlist" and NOT "if '.' in name" case |
|
253 | > # "not fromlist" and NOT "if '.' in name" case | |
254 | > import extroot |
|
254 | > import extroot | |
255 | > buf.append('import extroot: %s' % extroot.s) |
|
255 | > buf.append('import extroot: %s' % extroot.s) | |
256 | > # NOT "not fromlist" and NOT "level != -1" case |
|
256 | > # NOT "not fromlist" and NOT "level != -1" case | |
257 | > from extroot.bar import s |
|
257 | > from extroot.bar import s | |
258 | > buf.append('from extroot.bar import s: %s' % s) |
|
258 | > buf.append('from extroot.bar import s: %s' % s) | |
259 | > EOF |
|
259 | > EOF | |
260 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.extroot=$TESTTMP/extroot root) |
|
260 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.extroot=$TESTTMP/extroot root) | |
261 | (extroot) from extroot.bar import *: this is extroot.bar |
|
261 | (extroot) from extroot.bar import *: this is extroot.bar | |
262 | (extroot) import extroot.sub1.baz: this is extroot.sub1.baz |
|
262 | (extroot) import extroot.sub1.baz: this is extroot.sub1.baz | |
263 | (extroot) import extroot: this is extroot.__init__ |
|
263 | (extroot) import extroot: this is extroot.__init__ | |
264 | (extroot) from extroot.bar import s: this is extroot.bar |
|
264 | (extroot) from extroot.bar import s: this is extroot.bar | |
265 | (extroot) import extroot.bar in func(): this is extroot.bar |
|
265 | (extroot) import extroot.bar in func(): this is extroot.bar | |
266 | $TESTTMP/a |
|
266 | $TESTTMP/a | |
267 |
|
267 | |||
268 | #if no-py3k |
|
268 | #if no-py3k | |
269 | $ rm "$TESTTMP"/extroot/foo.* |
|
269 | $ rm "$TESTTMP"/extroot/foo.* | |
270 | $ rm -Rf "$TESTTMP/extroot/__pycache__" |
|
270 | $ rm -Rf "$TESTTMP/extroot/__pycache__" | |
271 | $ cat > $TESTTMP/extroot/foo.py <<EOF |
|
271 | $ cat > $TESTTMP/extroot/foo.py <<EOF | |
272 | > # test relative import |
|
272 | > # test relative import | |
273 | > buf = [] |
|
273 | > buf = [] | |
274 | > def func(): |
|
274 | > def func(): | |
275 | > # "not locals" case |
|
275 | > # "not locals" case | |
276 | > import bar |
|
276 | > import bar | |
277 | > buf.append('import bar in func(): %s' % bar.s) |
|
277 | > buf.append('import bar in func(): %s' % bar.s) | |
278 | > return '\n(extroot) '.join(buf) |
|
278 | > return '\n(extroot) '.join(buf) | |
279 | > # "fromlist == ('*',)" case |
|
279 | > # "fromlist == ('*',)" case | |
280 | > from bar import * |
|
280 | > from bar import * | |
281 | > buf.append('from bar import *: %s' % s) |
|
281 | > buf.append('from bar import *: %s' % s) | |
282 | > # "not fromlist" and "if '.' in name" case |
|
282 | > # "not fromlist" and "if '.' in name" case | |
283 | > import sub1.baz |
|
283 | > import sub1.baz | |
284 | > buf.append('import sub1.baz: %s' % sub1.baz.s) |
|
284 | > buf.append('import sub1.baz: %s' % sub1.baz.s) | |
285 | > # "not fromlist" and NOT "if '.' in name" case |
|
285 | > # "not fromlist" and NOT "if '.' in name" case | |
286 | > import sub1 |
|
286 | > import sub1 | |
287 | > buf.append('import sub1: %s' % sub1.s) |
|
287 | > buf.append('import sub1: %s' % sub1.s) | |
288 | > # NOT "not fromlist" and NOT "level != -1" case |
|
288 | > # NOT "not fromlist" and NOT "level != -1" case | |
289 | > from bar import s |
|
289 | > from bar import s | |
290 | > buf.append('from bar import s: %s' % s) |
|
290 | > buf.append('from bar import s: %s' % s) | |
291 | > EOF |
|
291 | > EOF | |
292 | $ hg --config extensions.extroot=$TESTTMP/extroot root |
|
292 | $ hg --config extensions.extroot=$TESTTMP/extroot root | |
293 | (extroot) from bar import *: this is extroot.bar |
|
293 | (extroot) from bar import *: this is extroot.bar | |
294 | (extroot) import sub1.baz: this is extroot.sub1.baz |
|
294 | (extroot) import sub1.baz: this is extroot.sub1.baz | |
295 | (extroot) import sub1: this is extroot.sub1.__init__ |
|
295 | (extroot) import sub1: this is extroot.sub1.__init__ | |
296 | (extroot) from bar import s: this is extroot.bar |
|
296 | (extroot) from bar import s: this is extroot.bar | |
297 | (extroot) import bar in func(): this is extroot.bar |
|
297 | (extroot) import bar in func(): this is extroot.bar | |
298 | $TESTTMP/a |
|
298 | $TESTTMP/a | |
299 | #endif |
|
299 | #endif | |
300 |
|
300 | |||
301 | #if demandimport |
|
301 | #if demandimport | |
302 |
|
302 | |||
303 | Examine whether module loading is delayed until actual referring, even |
|
303 | Examine whether module loading is delayed until actual referring, even | |
304 | though module is imported with "absolute_import" feature. |
|
304 | though module is imported with "absolute_import" feature. | |
305 |
|
305 | |||
306 | Files below in each packages are used for described purpose: |
|
306 | Files below in each packages are used for described purpose: | |
307 |
|
307 | |||
308 | - "called": examine whether "from MODULE import ATTR" works correctly |
|
308 | - "called": examine whether "from MODULE import ATTR" works correctly | |
309 | - "unused": examine whether loading is delayed correctly |
|
309 | - "unused": examine whether loading is delayed correctly | |
310 | - "used": examine whether "from PACKAGE import MODULE" works correctly |
|
310 | - "used": examine whether "from PACKAGE import MODULE" works correctly | |
311 |
|
311 | |||
312 | Package hierarchy is needed to examine whether demand importing works |
|
312 | Package hierarchy is needed to examine whether demand importing works | |
313 | as expected for "from SUB.PACK.AGE import MODULE". |
|
313 | as expected for "from SUB.PACK.AGE import MODULE". | |
314 |
|
314 | |||
315 | Setup "external library" to be imported with "absolute_import" |
|
315 | Setup "external library" to be imported with "absolute_import" | |
316 | feature. |
|
316 | feature. | |
317 |
|
317 | |||
318 | $ mkdir -p $TESTTMP/extlibroot/lsub1/lsub2 |
|
318 | $ mkdir -p $TESTTMP/extlibroot/lsub1/lsub2 | |
319 | $ touch $TESTTMP/extlibroot/__init__.py |
|
319 | $ touch $TESTTMP/extlibroot/__init__.py | |
320 | $ touch $TESTTMP/extlibroot/lsub1/__init__.py |
|
320 | $ touch $TESTTMP/extlibroot/lsub1/__init__.py | |
321 | $ touch $TESTTMP/extlibroot/lsub1/lsub2/__init__.py |
|
321 | $ touch $TESTTMP/extlibroot/lsub1/lsub2/__init__.py | |
322 |
|
322 | |||
323 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/called.py <<EOF |
|
323 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/called.py <<EOF | |
324 | > def func(): |
|
324 | > def func(): | |
325 | > return "this is extlibroot.lsub1.lsub2.called.func()" |
|
325 | > return "this is extlibroot.lsub1.lsub2.called.func()" | |
326 | > EOF |
|
326 | > EOF | |
327 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/unused.py <<EOF |
|
327 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/unused.py <<EOF | |
328 | > raise Exception("extlibroot.lsub1.lsub2.unused is loaded unintentionally") |
|
328 | > raise Exception("extlibroot.lsub1.lsub2.unused is loaded unintentionally") | |
329 | > EOF |
|
329 | > EOF | |
330 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/used.py <<EOF |
|
330 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/used.py <<EOF | |
331 | > detail = "this is extlibroot.lsub1.lsub2.used" |
|
331 | > detail = "this is extlibroot.lsub1.lsub2.used" | |
332 | > EOF |
|
332 | > EOF | |
333 |
|
333 | |||
334 | Setup sub-package of "external library", which causes instantiation of |
|
334 | Setup sub-package of "external library", which causes instantiation of | |
335 | demandmod in "recurse down the module chain" code path. Relative |
|
335 | demandmod in "recurse down the module chain" code path. Relative | |
336 | importing with "absolute_import" feature isn't tested, because "level |
|
336 | importing with "absolute_import" feature isn't tested, because "level | |
337 | >=1 " doesn't cause instantiation of demandmod. |
|
337 | >=1 " doesn't cause instantiation of demandmod. | |
338 |
|
338 | |||
339 | $ mkdir -p $TESTTMP/extlibroot/recursedown/abs |
|
339 | $ mkdir -p $TESTTMP/extlibroot/recursedown/abs | |
340 | $ cat > $TESTTMP/extlibroot/recursedown/abs/used.py <<EOF |
|
340 | $ cat > $TESTTMP/extlibroot/recursedown/abs/used.py <<EOF | |
341 | > detail = "this is extlibroot.recursedown.abs.used" |
|
341 | > detail = "this is extlibroot.recursedown.abs.used" | |
342 | > EOF |
|
342 | > EOF | |
343 | $ cat > $TESTTMP/extlibroot/recursedown/abs/__init__.py <<EOF |
|
343 | $ cat > $TESTTMP/extlibroot/recursedown/abs/__init__.py <<EOF | |
344 | > from __future__ import absolute_import |
|
344 | > from __future__ import absolute_import | |
345 | > from extlibroot.recursedown.abs.used import detail |
|
345 | > from extlibroot.recursedown.abs.used import detail | |
346 | > EOF |
|
346 | > EOF | |
347 |
|
347 | |||
348 | $ mkdir -p $TESTTMP/extlibroot/recursedown/legacy |
|
348 | $ mkdir -p $TESTTMP/extlibroot/recursedown/legacy | |
349 | $ cat > $TESTTMP/extlibroot/recursedown/legacy/used.py <<EOF |
|
349 | $ cat > $TESTTMP/extlibroot/recursedown/legacy/used.py <<EOF | |
350 | > detail = "this is extlibroot.recursedown.legacy.used" |
|
350 | > detail = "this is extlibroot.recursedown.legacy.used" | |
351 | > EOF |
|
351 | > EOF | |
352 | $ cat > $TESTTMP/extlibroot/recursedown/legacy/__init__.py <<EOF |
|
352 | $ cat > $TESTTMP/extlibroot/recursedown/legacy/__init__.py <<EOF | |
353 | > # legacy style (level == -1) import |
|
353 | > # legacy style (level == -1) import | |
354 | > from extlibroot.recursedown.legacy.used import detail |
|
354 | > from extlibroot.recursedown.legacy.used import detail | |
355 | > EOF |
|
355 | > EOF | |
356 |
|
356 | |||
357 | $ cat > $TESTTMP/extlibroot/recursedown/__init__.py <<EOF |
|
357 | $ cat > $TESTTMP/extlibroot/recursedown/__init__.py <<EOF | |
358 | > from __future__ import absolute_import |
|
358 | > from __future__ import absolute_import | |
359 | > from extlibroot.recursedown.abs import detail as absdetail |
|
359 | > from extlibroot.recursedown.abs import detail as absdetail | |
360 | > from .legacy import detail as legacydetail |
|
360 | > from .legacy import detail as legacydetail | |
361 | > EOF |
|
361 | > EOF | |
362 |
|
362 | |||
363 | Setup package that re-exports an attribute of its submodule as the same |
|
363 | Setup package that re-exports an attribute of its submodule as the same | |
364 | name. This leaves 'shadowing.used' pointing to 'used.detail', but still |
|
364 | name. This leaves 'shadowing.used' pointing to 'used.detail', but still | |
365 | the submodule 'used' should be somehow accessible. (issue5617) |
|
365 | the submodule 'used' should be somehow accessible. (issue5617) | |
366 |
|
366 | |||
367 | $ mkdir -p $TESTTMP/extlibroot/shadowing |
|
367 | $ mkdir -p $TESTTMP/extlibroot/shadowing | |
368 | $ cat > $TESTTMP/extlibroot/shadowing/used.py <<EOF |
|
368 | $ cat > $TESTTMP/extlibroot/shadowing/used.py <<EOF | |
369 | > detail = "this is extlibroot.shadowing.used" |
|
369 | > detail = "this is extlibroot.shadowing.used" | |
370 | > EOF |
|
370 | > EOF | |
371 | $ cat > $TESTTMP/extlibroot/shadowing/proxied.py <<EOF |
|
371 | $ cat > $TESTTMP/extlibroot/shadowing/proxied.py <<EOF | |
372 | > from __future__ import absolute_import |
|
372 | > from __future__ import absolute_import | |
373 | > from extlibroot.shadowing.used import detail |
|
373 | > from extlibroot.shadowing.used import detail | |
374 | > EOF |
|
374 | > EOF | |
375 | $ cat > $TESTTMP/extlibroot/shadowing/__init__.py <<EOF |
|
375 | $ cat > $TESTTMP/extlibroot/shadowing/__init__.py <<EOF | |
376 | > from __future__ import absolute_import |
|
376 | > from __future__ import absolute_import | |
377 | > from .used import detail as used |
|
377 | > from .used import detail as used | |
378 | > EOF |
|
378 | > EOF | |
379 |
|
379 | |||
380 | Setup extension local modules to be imported with "absolute_import" |
|
380 | Setup extension local modules to be imported with "absolute_import" | |
381 | feature. |
|
381 | feature. | |
382 |
|
382 | |||
383 | $ mkdir -p $TESTTMP/absextroot/xsub1/xsub2 |
|
383 | $ mkdir -p $TESTTMP/absextroot/xsub1/xsub2 | |
384 | $ touch $TESTTMP/absextroot/xsub1/__init__.py |
|
384 | $ touch $TESTTMP/absextroot/xsub1/__init__.py | |
385 | $ touch $TESTTMP/absextroot/xsub1/xsub2/__init__.py |
|
385 | $ touch $TESTTMP/absextroot/xsub1/xsub2/__init__.py | |
386 |
|
386 | |||
387 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/called.py <<EOF |
|
387 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/called.py <<EOF | |
388 | > def func(): |
|
388 | > def func(): | |
389 | > return "this is absextroot.xsub1.xsub2.called.func()" |
|
389 | > return "this is absextroot.xsub1.xsub2.called.func()" | |
390 | > EOF |
|
390 | > EOF | |
391 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/unused.py <<EOF |
|
391 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/unused.py <<EOF | |
392 | > raise Exception("absextroot.xsub1.xsub2.unused is loaded unintentionally") |
|
392 | > raise Exception("absextroot.xsub1.xsub2.unused is loaded unintentionally") | |
393 | > EOF |
|
393 | > EOF | |
394 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/used.py <<EOF |
|
394 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/used.py <<EOF | |
395 | > detail = "this is absextroot.xsub1.xsub2.used" |
|
395 | > detail = "this is absextroot.xsub1.xsub2.used" | |
396 | > EOF |
|
396 | > EOF | |
397 |
|
397 | |||
398 | Setup extension local modules to examine whether demand importing |
|
398 | Setup extension local modules to examine whether demand importing | |
399 | works as expected in "level > 1" case. |
|
399 | works as expected in "level > 1" case. | |
400 |
|
400 | |||
401 | $ cat > $TESTTMP/absextroot/relimportee.py <<EOF |
|
401 | $ cat > $TESTTMP/absextroot/relimportee.py <<EOF | |
402 | > detail = "this is absextroot.relimportee" |
|
402 | > detail = "this is absextroot.relimportee" | |
403 | > EOF |
|
403 | > EOF | |
404 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/relimporter.py <<EOF |
|
404 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/relimporter.py <<EOF | |
405 | > from __future__ import absolute_import |
|
405 | > from __future__ import absolute_import | |
406 | > from ... import relimportee |
|
406 | > from ... import relimportee | |
407 | > detail = "this relimporter imports %r" % (relimportee.detail) |
|
407 | > detail = "this relimporter imports %r" % (relimportee.detail) | |
408 | > EOF |
|
408 | > EOF | |
409 |
|
409 | |||
410 | Setup modules, which actually import extension local modules at |
|
410 | Setup modules, which actually import extension local modules at | |
411 | runtime. |
|
411 | runtime. | |
412 |
|
412 | |||
413 | $ cat > $TESTTMP/absextroot/absolute.py << EOF |
|
413 | $ cat > $TESTTMP/absextroot/absolute.py << EOF | |
414 | > from __future__ import absolute_import |
|
414 | > from __future__ import absolute_import | |
415 | > |
|
415 | > | |
416 | > # import extension local modules absolutely (level = 0) |
|
416 | > # import extension local modules absolutely (level = 0) | |
417 | > from absextroot.xsub1.xsub2 import used, unused |
|
417 | > from absextroot.xsub1.xsub2 import used, unused | |
418 | > from absextroot.xsub1.xsub2.called import func |
|
418 | > from absextroot.xsub1.xsub2.called import func | |
419 | > |
|
419 | > | |
420 | > def getresult(): |
|
420 | > def getresult(): | |
421 | > result = [] |
|
421 | > result = [] | |
422 | > result.append(used.detail) |
|
422 | > result.append(used.detail) | |
423 | > result.append(func()) |
|
423 | > result.append(func()) | |
424 | > return result |
|
424 | > return result | |
425 | > EOF |
|
425 | > EOF | |
426 |
|
426 | |||
427 | $ cat > $TESTTMP/absextroot/relative.py << EOF |
|
427 | $ cat > $TESTTMP/absextroot/relative.py << EOF | |
428 | > from __future__ import absolute_import |
|
428 | > from __future__ import absolute_import | |
429 | > |
|
429 | > | |
430 | > # import extension local modules relatively (level == 1) |
|
430 | > # import extension local modules relatively (level == 1) | |
431 | > from .xsub1.xsub2 import used, unused |
|
431 | > from .xsub1.xsub2 import used, unused | |
432 | > from .xsub1.xsub2.called import func |
|
432 | > from .xsub1.xsub2.called import func | |
433 | > |
|
433 | > | |
434 | > # import a module, which implies "importing with level > 1" |
|
434 | > # import a module, which implies "importing with level > 1" | |
435 | > from .xsub1.xsub2 import relimporter |
|
435 | > from .xsub1.xsub2 import relimporter | |
436 | > |
|
436 | > | |
437 | > def getresult(): |
|
437 | > def getresult(): | |
438 | > result = [] |
|
438 | > result = [] | |
439 | > result.append(used.detail) |
|
439 | > result.append(used.detail) | |
440 | > result.append(func()) |
|
440 | > result.append(func()) | |
441 | > result.append(relimporter.detail) |
|
441 | > result.append(relimporter.detail) | |
442 | > return result |
|
442 | > return result | |
443 | > EOF |
|
443 | > EOF | |
444 |
|
444 | |||
445 | Setup main procedure of extension. |
|
445 | Setup main procedure of extension. | |
446 |
|
446 | |||
447 | $ cat > $TESTTMP/absextroot/__init__.py <<EOF |
|
447 | $ cat > $TESTTMP/absextroot/__init__.py <<EOF | |
448 | > from __future__ import absolute_import |
|
448 | > from __future__ import absolute_import | |
449 | > from mercurial import registrar |
|
449 | > from mercurial import registrar | |
450 | > cmdtable = {} |
|
450 | > cmdtable = {} | |
451 | > command = registrar.command(cmdtable) |
|
451 | > command = registrar.command(cmdtable) | |
452 | > |
|
452 | > | |
453 | > # "absolute" and "relative" shouldn't be imported before actual |
|
453 | > # "absolute" and "relative" shouldn't be imported before actual | |
454 | > # command execution, because (1) they import same modules, and (2) |
|
454 | > # command execution, because (1) they import same modules, and (2) | |
455 | > # preceding import (= instantiate "demandmod" object instead of |
|
455 | > # preceding import (= instantiate "demandmod" object instead of | |
456 | > # real "module" object) might hide problem of succeeding import. |
|
456 | > # real "module" object) might hide problem of succeeding import. | |
457 | > |
|
457 | > | |
458 | > @command(b'showabsolute', [], norepo=True) |
|
458 | > @command(b'showabsolute', [], norepo=True) | |
459 | > def showabsolute(ui, *args, **opts): |
|
459 | > def showabsolute(ui, *args, **opts): | |
460 | > from absextroot import absolute |
|
460 | > from absextroot import absolute | |
461 | > ui.write(b'ABS: %s\n' % '\nABS: '.join(absolute.getresult())) |
|
461 | > ui.write(b'ABS: %s\n' % '\nABS: '.join(absolute.getresult())) | |
462 | > |
|
462 | > | |
463 | > @command(b'showrelative', [], norepo=True) |
|
463 | > @command(b'showrelative', [], norepo=True) | |
464 | > def showrelative(ui, *args, **opts): |
|
464 | > def showrelative(ui, *args, **opts): | |
465 | > from . import relative |
|
465 | > from . import relative | |
466 | > ui.write(b'REL: %s\n' % '\nREL: '.join(relative.getresult())) |
|
466 | > ui.write(b'REL: %s\n' % '\nREL: '.join(relative.getresult())) | |
467 | > |
|
467 | > | |
468 | > # import modules from external library |
|
468 | > # import modules from external library | |
469 | > from extlibroot.lsub1.lsub2 import used as lused, unused as lunused |
|
469 | > from extlibroot.lsub1.lsub2 import used as lused, unused as lunused | |
470 | > from extlibroot.lsub1.lsub2.called import func as lfunc |
|
470 | > from extlibroot.lsub1.lsub2.called import func as lfunc | |
471 | > from extlibroot.recursedown import absdetail, legacydetail |
|
471 | > from extlibroot.recursedown import absdetail, legacydetail | |
472 | > from extlibroot.shadowing import proxied |
|
472 | > from extlibroot.shadowing import proxied | |
473 | > |
|
473 | > | |
474 | > def uisetup(ui): |
|
474 | > def uisetup(ui): | |
475 | > result = [] |
|
475 | > result = [] | |
476 | > result.append(lused.detail) |
|
476 | > result.append(lused.detail) | |
477 | > result.append(lfunc()) |
|
477 | > result.append(lfunc()) | |
478 | > result.append(absdetail) |
|
478 | > result.append(absdetail) | |
479 | > result.append(legacydetail) |
|
479 | > result.append(legacydetail) | |
480 | > result.append(proxied.detail) |
|
480 | > result.append(proxied.detail) | |
481 | > ui.write(b'LIB: %s\n' % '\nLIB: '.join(result)) |
|
481 | > ui.write(b'LIB: %s\n' % '\nLIB: '.join(result)) | |
482 | > EOF |
|
482 | > EOF | |
483 |
|
483 | |||
484 | Examine module importing. |
|
484 | Examine module importing. | |
485 |
|
485 | |||
486 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showabsolute) |
|
486 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showabsolute) | |
487 | LIB: this is extlibroot.lsub1.lsub2.used |
|
487 | LIB: this is extlibroot.lsub1.lsub2.used | |
488 | LIB: this is extlibroot.lsub1.lsub2.called.func() |
|
488 | LIB: this is extlibroot.lsub1.lsub2.called.func() | |
489 | LIB: this is extlibroot.recursedown.abs.used |
|
489 | LIB: this is extlibroot.recursedown.abs.used | |
490 | LIB: this is extlibroot.recursedown.legacy.used |
|
490 | LIB: this is extlibroot.recursedown.legacy.used | |
491 | LIB: this is extlibroot.shadowing.used |
|
491 | LIB: this is extlibroot.shadowing.used | |
492 | ABS: this is absextroot.xsub1.xsub2.used |
|
492 | ABS: this is absextroot.xsub1.xsub2.used | |
493 | ABS: this is absextroot.xsub1.xsub2.called.func() |
|
493 | ABS: this is absextroot.xsub1.xsub2.called.func() | |
494 |
|
494 | |||
495 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showrelative) |
|
495 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showrelative) | |
496 | LIB: this is extlibroot.lsub1.lsub2.used |
|
496 | LIB: this is extlibroot.lsub1.lsub2.used | |
497 | LIB: this is extlibroot.lsub1.lsub2.called.func() |
|
497 | LIB: this is extlibroot.lsub1.lsub2.called.func() | |
498 | LIB: this is extlibroot.recursedown.abs.used |
|
498 | LIB: this is extlibroot.recursedown.abs.used | |
499 | LIB: this is extlibroot.recursedown.legacy.used |
|
499 | LIB: this is extlibroot.recursedown.legacy.used | |
500 | LIB: this is extlibroot.shadowing.used |
|
500 | LIB: this is extlibroot.shadowing.used | |
501 | REL: this is absextroot.xsub1.xsub2.used |
|
501 | REL: this is absextroot.xsub1.xsub2.used | |
502 | REL: this is absextroot.xsub1.xsub2.called.func() |
|
502 | REL: this is absextroot.xsub1.xsub2.called.func() | |
503 | REL: this relimporter imports 'this is absextroot.relimportee' |
|
503 | REL: this relimporter imports 'this is absextroot.relimportee' | |
504 |
|
504 | |||
505 | Examine whether sub-module is imported relatively as expected. |
|
505 | Examine whether sub-module is imported relatively as expected. | |
506 |
|
506 | |||
507 | See also issue5208 for detail about example case on Python 3.x. |
|
507 | See also issue5208 for detail about example case on Python 3.x. | |
508 |
|
508 | |||
509 | $ f -q $TESTTMP/extlibroot/lsub1/lsub2/notexist.py |
|
509 | $ f -q $TESTTMP/extlibroot/lsub1/lsub2/notexist.py | |
510 | $TESTTMP/extlibroot/lsub1/lsub2/notexist.py: file not found |
|
510 | $TESTTMP/extlibroot/lsub1/lsub2/notexist.py: file not found | |
511 |
|
511 | |||
512 | $ cat > $TESTTMP/notexist.py <<EOF |
|
512 | $ cat > $TESTTMP/notexist.py <<EOF | |
513 | > text = 'notexist.py at root is loaded unintentionally\n' |
|
513 | > text = 'notexist.py at root is loaded unintentionally\n' | |
514 | > EOF |
|
514 | > EOF | |
515 |
|
515 | |||
516 | $ cat > $TESTTMP/checkrelativity.py <<EOF |
|
516 | $ cat > $TESTTMP/checkrelativity.py <<EOF | |
517 | > from mercurial import registrar |
|
517 | > from mercurial import registrar | |
518 | > cmdtable = {} |
|
518 | > cmdtable = {} | |
519 | > command = registrar.command(cmdtable) |
|
519 | > command = registrar.command(cmdtable) | |
520 | > |
|
520 | > | |
521 | > # demand import avoids failure of importing notexist here |
|
521 | > # demand import avoids failure of importing notexist here | |
522 | > import extlibroot.lsub1.lsub2.notexist |
|
522 | > import extlibroot.lsub1.lsub2.notexist | |
523 | > |
|
523 | > | |
524 | > @command(b'checkrelativity', [], norepo=True) |
|
524 | > @command(b'checkrelativity', [], norepo=True) | |
525 | > def checkrelativity(ui, *args, **opts): |
|
525 | > def checkrelativity(ui, *args, **opts): | |
526 | > try: |
|
526 | > try: | |
527 | > ui.write(extlibroot.lsub1.lsub2.notexist.text) |
|
527 | > ui.write(extlibroot.lsub1.lsub2.notexist.text) | |
528 | > return 1 # unintentional success |
|
528 | > return 1 # unintentional success | |
529 | > except ImportError: |
|
529 | > except ImportError: | |
530 | > pass # intentional failure |
|
530 | > pass # intentional failure | |
531 | > EOF |
|
531 | > EOF | |
532 |
|
532 | |||
533 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.checkrelativity=$TESTTMP/checkrelativity.py checkrelativity) |
|
533 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.checkrelativity=$TESTTMP/checkrelativity.py checkrelativity) | |
534 |
|
534 | |||
535 | #endif |
|
535 | #endif | |
536 |
|
536 | |||
537 | Make sure a broken uisetup doesn't globally break hg: |
|
537 | Make sure a broken uisetup doesn't globally break hg: | |
538 | $ cat > $TESTTMP/baduisetup.py <<EOF |
|
538 | $ cat > $TESTTMP/baduisetup.py <<EOF | |
539 | > def uisetup(ui): |
|
539 | > def uisetup(ui): | |
540 | > 1/0 |
|
540 | > 1/0 | |
541 | > EOF |
|
541 | > EOF | |
542 |
|
542 | |||
543 | Even though the extension fails during uisetup, hg is still basically usable: |
|
543 | Even though the extension fails during uisetup, hg is still basically usable: | |
544 | $ hg --config extensions.baduisetup=$TESTTMP/baduisetup.py version |
|
544 | $ hg --config extensions.baduisetup=$TESTTMP/baduisetup.py version | |
545 | Traceback (most recent call last): |
|
545 | Traceback (most recent call last): | |
546 | File "*/mercurial/extensions.py", line *, in _runuisetup (glob) |
|
546 | File "*/mercurial/extensions.py", line *, in _runuisetup (glob) | |
547 | uisetup(ui) |
|
547 | uisetup(ui) | |
548 | File "$TESTTMP/baduisetup.py", line 2, in uisetup |
|
548 | File "$TESTTMP/baduisetup.py", line 2, in uisetup | |
549 | 1/0 |
|
549 | 1/0 | |
550 | ZeroDivisionError: integer division or modulo by zero |
|
550 | ZeroDivisionError: integer division or modulo by zero | |
551 | *** failed to set up extension baduisetup: integer division or modulo by zero |
|
551 | *** failed to set up extension baduisetup: integer division or modulo by zero | |
552 | Mercurial Distributed SCM (version *) (glob) |
|
552 | Mercurial Distributed SCM (version *) (glob) | |
553 | (see https://mercurial-scm.org for more information) |
|
553 | (see https://mercurial-scm.org for more information) | |
554 |
|
554 | |||
555 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
555 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
556 | This is free software; see the source for copying conditions. There is NO |
|
556 | This is free software; see the source for copying conditions. There is NO | |
557 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
557 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
558 |
|
558 | |||
559 | $ cd .. |
|
559 | $ cd .. | |
560 |
|
560 | |||
561 | hide outer repo |
|
561 | hide outer repo | |
562 | $ hg init |
|
562 | $ hg init | |
563 |
|
563 | |||
564 | $ cat > empty.py <<EOF |
|
564 | $ cat > empty.py <<EOF | |
565 | > '''empty cmdtable |
|
565 | > '''empty cmdtable | |
566 | > ''' |
|
566 | > ''' | |
567 | > cmdtable = {} |
|
567 | > cmdtable = {} | |
568 | > EOF |
|
568 | > EOF | |
569 | $ emptypath=`pwd`/empty.py |
|
569 | $ emptypath=`pwd`/empty.py | |
570 | $ echo "empty = $emptypath" >> $HGRCPATH |
|
570 | $ echo "empty = $emptypath" >> $HGRCPATH | |
571 | $ hg help empty |
|
571 | $ hg help empty | |
572 | empty extension - empty cmdtable |
|
572 | empty extension - empty cmdtable | |
573 |
|
573 | |||
574 | no commands defined |
|
574 | no commands defined | |
575 |
|
575 | |||
576 |
|
576 | |||
577 | $ echo 'empty = !' >> $HGRCPATH |
|
577 | $ echo 'empty = !' >> $HGRCPATH | |
578 |
|
578 | |||
579 | $ cat > debugextension.py <<EOF |
|
579 | $ cat > debugextension.py <<EOF | |
580 | > '''only debugcommands |
|
580 | > '''only debugcommands | |
581 | > ''' |
|
581 | > ''' | |
582 | > from mercurial import registrar |
|
582 | > from mercurial import registrar | |
583 | > cmdtable = {} |
|
583 | > cmdtable = {} | |
584 | > command = registrar.command(cmdtable) |
|
584 | > command = registrar.command(cmdtable) | |
585 | > @command(b'debugfoobar', [], b'hg debugfoobar') |
|
585 | > @command(b'debugfoobar', [], b'hg debugfoobar') | |
586 | > def debugfoobar(ui, repo, *args, **opts): |
|
586 | > def debugfoobar(ui, repo, *args, **opts): | |
587 | > "yet another debug command" |
|
587 | > "yet another debug command" | |
588 | > pass |
|
588 | > pass | |
589 | > @command(b'foo', [], b'hg foo') |
|
589 | > @command(b'foo', [], b'hg foo') | |
590 | > def foo(ui, repo, *args, **opts): |
|
590 | > def foo(ui, repo, *args, **opts): | |
591 | > """yet another foo command |
|
591 | > """yet another foo command | |
592 | > This command has been DEPRECATED since forever. |
|
592 | > This command has been DEPRECATED since forever. | |
593 | > """ |
|
593 | > """ | |
594 | > pass |
|
594 | > pass | |
595 | > EOF |
|
595 | > EOF | |
596 | $ debugpath=`pwd`/debugextension.py |
|
596 | $ debugpath=`pwd`/debugextension.py | |
597 | $ echo "debugextension = $debugpath" >> $HGRCPATH |
|
597 | $ echo "debugextension = $debugpath" >> $HGRCPATH | |
598 |
|
598 | |||
599 | $ hg help debugextension |
|
599 | $ hg help debugextension | |
600 | hg debugextensions |
|
600 | hg debugextensions | |
601 |
|
601 | |||
602 | show information about active extensions |
|
602 | show information about active extensions | |
603 |
|
603 | |||
604 | options: |
|
604 | options: | |
605 |
|
605 | |||
606 | (some details hidden, use --verbose to show complete help) |
|
606 | (some details hidden, use --verbose to show complete help) | |
607 |
|
607 | |||
608 |
|
608 | |||
609 | $ hg --verbose help debugextension |
|
609 | $ hg --verbose help debugextension | |
610 | hg debugextensions |
|
610 | hg debugextensions | |
611 |
|
611 | |||
612 | show information about active extensions |
|
612 | show information about active extensions | |
613 |
|
613 | |||
614 | options: |
|
614 | options: | |
615 |
|
615 | |||
616 | -T --template TEMPLATE display with template (EXPERIMENTAL) |
|
616 | -T --template TEMPLATE display with template (EXPERIMENTAL) | |
617 |
|
617 | |||
618 | global options ([+] can be repeated): |
|
618 | global options ([+] can be repeated): | |
619 |
|
619 | |||
620 | -R --repository REPO repository root directory or name of overlay bundle |
|
620 | -R --repository REPO repository root directory or name of overlay bundle | |
621 | file |
|
621 | file | |
622 | --cwd DIR change working directory |
|
622 | --cwd DIR change working directory | |
623 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
623 | -y --noninteractive do not prompt, automatically pick the first choice for | |
624 | all prompts |
|
624 | all prompts | |
625 | -q --quiet suppress output |
|
625 | -q --quiet suppress output | |
626 | -v --verbose enable additional output |
|
626 | -v --verbose enable additional output | |
627 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
627 | --color TYPE when to colorize (boolean, always, auto, never, or | |
628 | debug) |
|
628 | debug) | |
629 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
629 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
630 | --debug enable debugging output |
|
630 | --debug enable debugging output | |
631 | --debugger start debugger |
|
631 | --debugger start debugger | |
632 | --encoding ENCODE set the charset encoding (default: ascii) |
|
632 | --encoding ENCODE set the charset encoding (default: ascii) | |
633 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
633 | --encodingmode MODE set the charset encoding mode (default: strict) | |
634 | --traceback always print a traceback on exception |
|
634 | --traceback always print a traceback on exception | |
635 | --time time how long the command takes |
|
635 | --time time how long the command takes | |
636 | --profile print command execution profile |
|
636 | --profile print command execution profile | |
637 | --version output version information and exit |
|
637 | --version output version information and exit | |
638 | -h --help display help and exit |
|
638 | -h --help display help and exit | |
639 | --hidden consider hidden changesets |
|
639 | --hidden consider hidden changesets | |
640 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
640 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
641 | (default: auto) |
|
641 | (default: auto) | |
642 |
|
642 | |||
643 |
|
643 | |||
644 |
|
644 | |||
645 |
|
645 | |||
646 |
|
646 | |||
647 |
|
647 | |||
648 | $ hg --debug help debugextension |
|
648 | $ hg --debug help debugextension | |
649 | hg debugextensions |
|
649 | hg debugextensions | |
650 |
|
650 | |||
651 | show information about active extensions |
|
651 | show information about active extensions | |
652 |
|
652 | |||
653 | options: |
|
653 | options: | |
654 |
|
654 | |||
655 | -T --template TEMPLATE display with template (EXPERIMENTAL) |
|
655 | -T --template TEMPLATE display with template (EXPERIMENTAL) | |
656 |
|
656 | |||
657 | global options ([+] can be repeated): |
|
657 | global options ([+] can be repeated): | |
658 |
|
658 | |||
659 | -R --repository REPO repository root directory or name of overlay bundle |
|
659 | -R --repository REPO repository root directory or name of overlay bundle | |
660 | file |
|
660 | file | |
661 | --cwd DIR change working directory |
|
661 | --cwd DIR change working directory | |
662 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
662 | -y --noninteractive do not prompt, automatically pick the first choice for | |
663 | all prompts |
|
663 | all prompts | |
664 | -q --quiet suppress output |
|
664 | -q --quiet suppress output | |
665 | -v --verbose enable additional output |
|
665 | -v --verbose enable additional output | |
666 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
666 | --color TYPE when to colorize (boolean, always, auto, never, or | |
667 | debug) |
|
667 | debug) | |
668 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
668 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
669 | --debug enable debugging output |
|
669 | --debug enable debugging output | |
670 | --debugger start debugger |
|
670 | --debugger start debugger | |
671 | --encoding ENCODE set the charset encoding (default: ascii) |
|
671 | --encoding ENCODE set the charset encoding (default: ascii) | |
672 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
672 | --encodingmode MODE set the charset encoding mode (default: strict) | |
673 | --traceback always print a traceback on exception |
|
673 | --traceback always print a traceback on exception | |
674 | --time time how long the command takes |
|
674 | --time time how long the command takes | |
675 | --profile print command execution profile |
|
675 | --profile print command execution profile | |
676 | --version output version information and exit |
|
676 | --version output version information and exit | |
677 | -h --help display help and exit |
|
677 | -h --help display help and exit | |
678 | --hidden consider hidden changesets |
|
678 | --hidden consider hidden changesets | |
679 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
679 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
680 | (default: auto) |
|
680 | (default: auto) | |
681 |
|
681 | |||
682 |
|
682 | |||
683 |
|
683 | |||
684 |
|
684 | |||
685 |
|
685 | |||
686 | $ echo 'debugextension = !' >> $HGRCPATH |
|
686 | $ echo 'debugextension = !' >> $HGRCPATH | |
687 |
|
687 | |||
688 | Asking for help about a deprecated extension should do something useful: |
|
688 | Asking for help about a deprecated extension should do something useful: | |
689 |
|
689 | |||
690 | $ hg help glog |
|
690 | $ hg help glog | |
691 | 'glog' is provided by the following extension: |
|
691 | 'glog' is provided by the following extension: | |
692 |
|
692 | |||
693 | graphlog command to view revision graphs from a shell (DEPRECATED) |
|
693 | graphlog command to view revision graphs from a shell (DEPRECATED) | |
694 |
|
694 | |||
695 | (use 'hg help extensions' for information on enabling extensions) |
|
695 | (use 'hg help extensions' for information on enabling extensions) | |
696 |
|
696 | |||
697 | Extension module help vs command help: |
|
697 | Extension module help vs command help: | |
698 |
|
698 | |||
699 | $ echo 'extdiff =' >> $HGRCPATH |
|
699 | $ echo 'extdiff =' >> $HGRCPATH | |
700 | $ hg help extdiff |
|
700 | $ hg help extdiff | |
701 | hg extdiff [OPT]... [FILE]... |
|
701 | hg extdiff [OPT]... [FILE]... | |
702 |
|
702 | |||
703 | use external program to diff repository (or selected files) |
|
703 | use external program to diff repository (or selected files) | |
704 |
|
704 | |||
705 | Show differences between revisions for the specified files, using an |
|
705 | Show differences between revisions for the specified files, using an | |
706 | external program. The default program used is diff, with default options |
|
706 | external program. The default program used is diff, with default options | |
707 | "-Npru". |
|
707 | "-Npru". | |
708 |
|
708 | |||
709 | To select a different program, use the -p/--program option. The program |
|
709 | To select a different program, use the -p/--program option. The program | |
710 | will be passed the names of two directories to compare. To pass additional |
|
710 | will be passed the names of two directories to compare. To pass additional | |
711 | options to the program, use -o/--option. These will be passed before the |
|
711 | options to the program, use -o/--option. These will be passed before the | |
712 | names of the directories to compare. |
|
712 | names of the directories to compare. | |
713 |
|
713 | |||
714 | When two revision arguments are given, then changes are shown between |
|
714 | When two revision arguments are given, then changes are shown between | |
715 | those revisions. If only one revision is specified then that revision is |
|
715 | those revisions. If only one revision is specified then that revision is | |
716 | compared to the working directory, and, when no revisions are specified, |
|
716 | compared to the working directory, and, when no revisions are specified, | |
717 | the working directory files are compared to its parent. |
|
717 | the working directory files are compared to its parent. | |
718 |
|
718 | |||
719 | (use 'hg help -e extdiff' to show help for the extdiff extension) |
|
719 | (use 'hg help -e extdiff' to show help for the extdiff extension) | |
720 |
|
720 | |||
721 | options ([+] can be repeated): |
|
721 | options ([+] can be repeated): | |
722 |
|
722 | |||
723 | -p --program CMD comparison program to run |
|
723 | -p --program CMD comparison program to run | |
724 | -o --option OPT [+] pass option to comparison program |
|
724 | -o --option OPT [+] pass option to comparison program | |
725 | -r --rev REV [+] revision |
|
725 | -r --rev REV [+] revision | |
726 | -c --change REV change made by revision |
|
726 | -c --change REV change made by revision | |
727 | --patch compare patches for two revisions |
|
727 | --patch compare patches for two revisions | |
728 | -I --include PATTERN [+] include names matching the given patterns |
|
728 | -I --include PATTERN [+] include names matching the given patterns | |
729 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
729 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
730 | -S --subrepos recurse into subrepositories |
|
730 | -S --subrepos recurse into subrepositories | |
731 |
|
731 | |||
732 | (some details hidden, use --verbose to show complete help) |
|
732 | (some details hidden, use --verbose to show complete help) | |
733 |
|
733 | |||
734 |
|
734 | |||
735 |
|
735 | |||
736 |
|
736 | |||
737 |
|
737 | |||
738 |
|
738 | |||
739 |
|
739 | |||
740 |
|
740 | |||
741 |
|
741 | |||
742 |
|
742 | |||
743 | $ hg help --extension extdiff |
|
743 | $ hg help --extension extdiff | |
744 | extdiff extension - command to allow external programs to compare revisions |
|
744 | extdiff extension - command to allow external programs to compare revisions | |
745 |
|
745 | |||
746 | The extdiff Mercurial extension allows you to use external programs to compare |
|
746 | The extdiff Mercurial extension allows you to use external programs to compare | |
747 | revisions, or revision with working directory. The external diff programs are |
|
747 | revisions, or revision with working directory. The external diff programs are | |
748 | called with a configurable set of options and two non-option arguments: paths |
|
748 | called with a configurable set of options and two non-option arguments: paths | |
749 | to directories containing snapshots of files to compare. |
|
749 | to directories containing snapshots of files to compare. | |
750 |
|
750 | |||
751 | If there is more than one file being compared and the "child" revision is the |
|
751 | If there is more than one file being compared and the "child" revision is the | |
752 | working directory, any modifications made in the external diff program will be |
|
752 | working directory, any modifications made in the external diff program will be | |
753 | copied back to the working directory from the temporary directory. |
|
753 | copied back to the working directory from the temporary directory. | |
754 |
|
754 | |||
755 | The extdiff extension also allows you to configure new diff commands, so you |
|
755 | The extdiff extension also allows you to configure new diff commands, so you | |
756 | do not need to type 'hg extdiff -p kdiff3' always. |
|
756 | do not need to type 'hg extdiff -p kdiff3' always. | |
757 |
|
757 | |||
758 | [extdiff] |
|
758 | [extdiff] | |
759 | # add new command that runs GNU diff(1) in 'context diff' mode |
|
759 | # add new command that runs GNU diff(1) in 'context diff' mode | |
760 | cdiff = gdiff -Nprc5 |
|
760 | cdiff = gdiff -Nprc5 | |
761 | ## or the old way: |
|
761 | ## or the old way: | |
762 | #cmd.cdiff = gdiff |
|
762 | #cmd.cdiff = gdiff | |
763 | #opts.cdiff = -Nprc5 |
|
763 | #opts.cdiff = -Nprc5 | |
764 |
|
764 | |||
765 | # add new command called meld, runs meld (no need to name twice). If |
|
765 | # add new command called meld, runs meld (no need to name twice). If | |
766 | # the meld executable is not available, the meld tool in [merge-tools] |
|
766 | # the meld executable is not available, the meld tool in [merge-tools] | |
767 | # will be used, if available |
|
767 | # will be used, if available | |
768 | meld = |
|
768 | meld = | |
769 |
|
769 | |||
770 | # add new command called vimdiff, runs gvimdiff with DirDiff plugin |
|
770 | # add new command called vimdiff, runs gvimdiff with DirDiff plugin | |
771 | # (see http://www.vim.org/scripts/script.php?script_id=102) Non |
|
771 | # (see http://www.vim.org/scripts/script.php?script_id=102) Non | |
772 | # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
|
772 | # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in | |
773 | # your .vimrc |
|
773 | # your .vimrc | |
774 | vimdiff = gvim -f "+next" \ |
|
774 | vimdiff = gvim -f "+next" \ | |
775 | "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" |
|
775 | "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" | |
776 |
|
776 | |||
777 | Tool arguments can include variables that are expanded at runtime: |
|
777 | Tool arguments can include variables that are expanded at runtime: | |
778 |
|
778 | |||
779 | $parent1, $plabel1 - filename, descriptive label of first parent |
|
779 | $parent1, $plabel1 - filename, descriptive label of first parent | |
780 | $child, $clabel - filename, descriptive label of child revision |
|
780 | $child, $clabel - filename, descriptive label of child revision | |
781 | $parent2, $plabel2 - filename, descriptive label of second parent |
|
781 | $parent2, $plabel2 - filename, descriptive label of second parent | |
782 | $root - repository root |
|
782 | $root - repository root | |
783 | $parent is an alias for $parent1. |
|
783 | $parent is an alias for $parent1. | |
784 |
|
784 | |||
785 | The extdiff extension will look in your [diff-tools] and [merge-tools] |
|
785 | The extdiff extension will look in your [diff-tools] and [merge-tools] | |
786 | sections for diff tool arguments, when none are specified in [extdiff]. |
|
786 | sections for diff tool arguments, when none are specified in [extdiff]. | |
787 |
|
787 | |||
788 | [extdiff] |
|
788 | [extdiff] | |
789 | kdiff3 = |
|
789 | kdiff3 = | |
790 |
|
790 | |||
791 | [diff-tools] |
|
791 | [diff-tools] | |
792 | kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child |
|
792 | kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child | |
793 |
|
793 | |||
794 | You can use -I/-X and list of file or directory names like normal 'hg diff' |
|
794 | You can use -I/-X and list of file or directory names like normal 'hg diff' | |
795 | command. The extdiff extension makes snapshots of only needed files, so |
|
795 | command. The extdiff extension makes snapshots of only needed files, so | |
796 | running the external diff program will actually be pretty fast (at least |
|
796 | running the external diff program will actually be pretty fast (at least | |
797 | faster than having to compare the entire tree). |
|
797 | faster than having to compare the entire tree). | |
798 |
|
798 | |||
799 | list of commands: |
|
799 | list of commands: | |
800 |
|
800 | |||
801 | extdiff use external program to diff repository (or selected files) |
|
801 | extdiff use external program to diff repository (or selected files) | |
802 |
|
802 | |||
803 | (use 'hg help -v -e extdiff' to show built-in aliases and global options) |
|
803 | (use 'hg help -v -e extdiff' to show built-in aliases and global options) | |
804 |
|
804 | |||
805 |
|
805 | |||
806 |
|
806 | |||
807 |
|
807 | |||
808 |
|
808 | |||
809 |
|
809 | |||
810 |
|
810 | |||
811 |
|
811 | |||
812 |
|
812 | |||
813 |
|
813 | |||
814 |
|
814 | |||
815 |
|
815 | |||
816 |
|
816 | |||
817 |
|
817 | |||
818 |
|
818 | |||
819 |
|
819 | |||
820 | $ echo 'extdiff = !' >> $HGRCPATH |
|
820 | $ echo 'extdiff = !' >> $HGRCPATH | |
821 |
|
821 | |||
822 | Test help topic with same name as extension |
|
822 | Test help topic with same name as extension | |
823 |
|
823 | |||
824 | $ cat > multirevs.py <<EOF |
|
824 | $ cat > multirevs.py <<EOF | |
825 | > from mercurial import commands, registrar |
|
825 | > from mercurial import commands, registrar | |
826 | > cmdtable = {} |
|
826 | > cmdtable = {} | |
827 | > command = registrar.command(cmdtable) |
|
827 | > command = registrar.command(cmdtable) | |
828 | > """multirevs extension |
|
828 | > """multirevs extension | |
829 | > Big multi-line module docstring.""" |
|
829 | > Big multi-line module docstring.""" | |
830 | > @command(b'multirevs', [], b'ARG', norepo=True) |
|
830 | > @command(b'multirevs', [], b'ARG', norepo=True) | |
831 | > def multirevs(ui, repo, arg, *args, **opts): |
|
831 | > def multirevs(ui, repo, arg, *args, **opts): | |
832 | > """multirevs command""" |
|
832 | > """multirevs command""" | |
833 | > pass |
|
833 | > pass | |
834 | > EOF |
|
834 | > EOF | |
835 | $ echo "multirevs = multirevs.py" >> $HGRCPATH |
|
835 | $ echo "multirevs = multirevs.py" >> $HGRCPATH | |
836 |
|
836 | |||
837 | $ hg help multirevs | tail |
|
837 | $ hg help multirevs | tail | |
838 | used): |
|
838 | used): | |
839 |
|
839 | |||
840 | hg update :@ |
|
840 | hg update :@ | |
841 |
|
841 | |||
842 | - Show diff between tags 1.3 and 1.5 (this works because the first and the |
|
842 | - Show diff between tags 1.3 and 1.5 (this works because the first and the | |
843 | last revisions of the revset are used): |
|
843 | last revisions of the revset are used): | |
844 |
|
844 | |||
845 | hg diff -r 1.3::1.5 |
|
845 | hg diff -r 1.3::1.5 | |
846 |
|
846 | |||
847 | use 'hg help -c multirevs' to see help for the multirevs command |
|
847 | use 'hg help -c multirevs' to see help for the multirevs command | |
848 |
|
848 | |||
849 |
|
849 | |||
850 |
|
850 | |||
851 |
|
851 | |||
852 |
|
852 | |||
853 |
|
853 | |||
854 | $ hg help -c multirevs |
|
854 | $ hg help -c multirevs | |
855 | hg multirevs ARG |
|
855 | hg multirevs ARG | |
856 |
|
856 | |||
857 | multirevs command |
|
857 | multirevs command | |
858 |
|
858 | |||
859 | (some details hidden, use --verbose to show complete help) |
|
859 | (some details hidden, use --verbose to show complete help) | |
860 |
|
860 | |||
861 |
|
861 | |||
862 |
|
862 | |||
863 | $ hg multirevs |
|
863 | $ hg multirevs | |
864 | hg multirevs: invalid arguments |
|
864 | hg multirevs: invalid arguments | |
865 | hg multirevs ARG |
|
865 | hg multirevs ARG | |
866 |
|
866 | |||
867 | multirevs command |
|
867 | multirevs command | |
868 |
|
868 | |||
869 | (use 'hg multirevs -h' to show more help) |
|
869 | (use 'hg multirevs -h' to show more help) | |
870 | [255] |
|
870 | [255] | |
871 |
|
871 | |||
872 |
|
872 | |||
873 |
|
873 | |||
874 | $ echo "multirevs = !" >> $HGRCPATH |
|
874 | $ echo "multirevs = !" >> $HGRCPATH | |
875 |
|
875 | |||
876 | Issue811: Problem loading extensions twice (by site and by user) |
|
876 | Issue811: Problem loading extensions twice (by site and by user) | |
877 |
|
877 | |||
878 | $ cat <<EOF >> $HGRCPATH |
|
878 | $ cat <<EOF >> $HGRCPATH | |
879 | > mq = |
|
879 | > mq = | |
880 | > strip = |
|
880 | > strip = | |
881 | > hgext.mq = |
|
881 | > hgext.mq = | |
882 | > hgext/mq = |
|
882 | > hgext/mq = | |
883 | > EOF |
|
883 | > EOF | |
884 |
|
884 | |||
885 | Show extensions: |
|
885 | Show extensions: | |
886 | (note that mq force load strip, also checking it's not loaded twice) |
|
886 | (note that mq force load strip, also checking it's not loaded twice) | |
887 |
|
887 | |||
888 | #if no-extraextensions |
|
888 | #if no-extraextensions | |
889 | $ hg debugextensions |
|
889 | $ hg debugextensions | |
890 | mq |
|
890 | mq | |
891 | strip |
|
891 | strip | |
892 | #endif |
|
892 | #endif | |
893 |
|
893 | |||
894 | For extensions, which name matches one of its commands, help |
|
894 | For extensions, which name matches one of its commands, help | |
895 | message should ask '-v -e' to get list of built-in aliases |
|
895 | message should ask '-v -e' to get list of built-in aliases | |
896 | along with extension help itself |
|
896 | along with extension help itself | |
897 |
|
897 | |||
898 | $ mkdir $TESTTMP/d |
|
898 | $ mkdir $TESTTMP/d | |
899 | $ cat > $TESTTMP/d/dodo.py <<EOF |
|
899 | $ cat > $TESTTMP/d/dodo.py <<EOF | |
900 | > """ |
|
900 | > """ | |
901 | > This is an awesome 'dodo' extension. It does nothing and |
|
901 | > This is an awesome 'dodo' extension. It does nothing and | |
902 | > writes 'Foo foo' |
|
902 | > writes 'Foo foo' | |
903 | > """ |
|
903 | > """ | |
904 | > from mercurial import commands, registrar |
|
904 | > from mercurial import commands, registrar | |
905 | > cmdtable = {} |
|
905 | > cmdtable = {} | |
906 | > command = registrar.command(cmdtable) |
|
906 | > command = registrar.command(cmdtable) | |
907 | > @command(b'dodo', [], b'hg dodo') |
|
907 | > @command(b'dodo', [], b'hg dodo') | |
908 | > def dodo(ui, *args, **kwargs): |
|
908 | > def dodo(ui, *args, **kwargs): | |
909 | > """Does nothing""" |
|
909 | > """Does nothing""" | |
910 | > ui.write(b"I do nothing. Yay\\n") |
|
910 | > ui.write(b"I do nothing. Yay\\n") | |
911 | > @command(b'foofoo', [], b'hg foofoo') |
|
911 | > @command(b'foofoo', [], b'hg foofoo') | |
912 | > def foofoo(ui, *args, **kwargs): |
|
912 | > def foofoo(ui, *args, **kwargs): | |
913 | > """Writes 'Foo foo'""" |
|
913 | > """Writes 'Foo foo'""" | |
914 | > ui.write(b"Foo foo\\n") |
|
914 | > ui.write(b"Foo foo\\n") | |
915 | > EOF |
|
915 | > EOF | |
916 | $ dodopath=$TESTTMP/d/dodo.py |
|
916 | $ dodopath=$TESTTMP/d/dodo.py | |
917 |
|
917 | |||
918 | $ echo "dodo = $dodopath" >> $HGRCPATH |
|
918 | $ echo "dodo = $dodopath" >> $HGRCPATH | |
919 |
|
919 | |||
920 | Make sure that user is asked to enter '-v -e' to get list of built-in aliases |
|
920 | Make sure that user is asked to enter '-v -e' to get list of built-in aliases | |
921 | $ hg help -e dodo |
|
921 | $ hg help -e dodo | |
922 | dodo extension - |
|
922 | dodo extension - | |
923 |
|
923 | |||
924 | This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo' |
|
924 | This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo' | |
925 |
|
925 | |||
926 | list of commands: |
|
926 | list of commands: | |
927 |
|
927 | |||
928 | dodo Does nothing |
|
928 | dodo Does nothing | |
929 | foofoo Writes 'Foo foo' |
|
929 | foofoo Writes 'Foo foo' | |
930 |
|
930 | |||
931 | (use 'hg help -v -e dodo' to show built-in aliases and global options) |
|
931 | (use 'hg help -v -e dodo' to show built-in aliases and global options) | |
932 |
|
932 | |||
933 | Make sure that '-v -e' prints list of built-in aliases along with |
|
933 | Make sure that '-v -e' prints list of built-in aliases along with | |
934 | extension help itself |
|
934 | extension help itself | |
935 | $ hg help -v -e dodo |
|
935 | $ hg help -v -e dodo | |
936 | dodo extension - |
|
936 | dodo extension - | |
937 |
|
937 | |||
938 | This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo' |
|
938 | This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo' | |
939 |
|
939 | |||
940 | list of commands: |
|
940 | list of commands: | |
941 |
|
941 | |||
942 | dodo Does nothing |
|
942 | dodo Does nothing | |
943 | foofoo Writes 'Foo foo' |
|
943 | foofoo Writes 'Foo foo' | |
944 |
|
944 | |||
945 | global options ([+] can be repeated): |
|
945 | global options ([+] can be repeated): | |
946 |
|
946 | |||
947 | -R --repository REPO repository root directory or name of overlay bundle |
|
947 | -R --repository REPO repository root directory or name of overlay bundle | |
948 | file |
|
948 | file | |
949 | --cwd DIR change working directory |
|
949 | --cwd DIR change working directory | |
950 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
950 | -y --noninteractive do not prompt, automatically pick the first choice for | |
951 | all prompts |
|
951 | all prompts | |
952 | -q --quiet suppress output |
|
952 | -q --quiet suppress output | |
953 | -v --verbose enable additional output |
|
953 | -v --verbose enable additional output | |
954 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
954 | --color TYPE when to colorize (boolean, always, auto, never, or | |
955 | debug) |
|
955 | debug) | |
956 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
956 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
957 | --debug enable debugging output |
|
957 | --debug enable debugging output | |
958 | --debugger start debugger |
|
958 | --debugger start debugger | |
959 | --encoding ENCODE set the charset encoding (default: ascii) |
|
959 | --encoding ENCODE set the charset encoding (default: ascii) | |
960 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
960 | --encodingmode MODE set the charset encoding mode (default: strict) | |
961 | --traceback always print a traceback on exception |
|
961 | --traceback always print a traceback on exception | |
962 | --time time how long the command takes |
|
962 | --time time how long the command takes | |
963 | --profile print command execution profile |
|
963 | --profile print command execution profile | |
964 | --version output version information and exit |
|
964 | --version output version information and exit | |
965 | -h --help display help and exit |
|
965 | -h --help display help and exit | |
966 | --hidden consider hidden changesets |
|
966 | --hidden consider hidden changesets | |
967 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
967 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
968 | (default: auto) |
|
968 | (default: auto) | |
969 |
|
969 | |||
970 | Make sure that single '-v' option shows help and built-ins only for 'dodo' command |
|
970 | Make sure that single '-v' option shows help and built-ins only for 'dodo' command | |
971 | $ hg help -v dodo |
|
971 | $ hg help -v dodo | |
972 | hg dodo |
|
972 | hg dodo | |
973 |
|
973 | |||
974 | Does nothing |
|
974 | Does nothing | |
975 |
|
975 | |||
976 | (use 'hg help -e dodo' to show help for the dodo extension) |
|
976 | (use 'hg help -e dodo' to show help for the dodo extension) | |
977 |
|
977 | |||
978 | options: |
|
978 | options: | |
979 |
|
979 | |||
980 | --mq operate on patch repository |
|
980 | --mq operate on patch repository | |
981 |
|
981 | |||
982 | global options ([+] can be repeated): |
|
982 | global options ([+] can be repeated): | |
983 |
|
983 | |||
984 | -R --repository REPO repository root directory or name of overlay bundle |
|
984 | -R --repository REPO repository root directory or name of overlay bundle | |
985 | file |
|
985 | file | |
986 | --cwd DIR change working directory |
|
986 | --cwd DIR change working directory | |
987 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
987 | -y --noninteractive do not prompt, automatically pick the first choice for | |
988 | all prompts |
|
988 | all prompts | |
989 | -q --quiet suppress output |
|
989 | -q --quiet suppress output | |
990 | -v --verbose enable additional output |
|
990 | -v --verbose enable additional output | |
991 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
991 | --color TYPE when to colorize (boolean, always, auto, never, or | |
992 | debug) |
|
992 | debug) | |
993 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
993 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
994 | --debug enable debugging output |
|
994 | --debug enable debugging output | |
995 | --debugger start debugger |
|
995 | --debugger start debugger | |
996 | --encoding ENCODE set the charset encoding (default: ascii) |
|
996 | --encoding ENCODE set the charset encoding (default: ascii) | |
997 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
997 | --encodingmode MODE set the charset encoding mode (default: strict) | |
998 | --traceback always print a traceback on exception |
|
998 | --traceback always print a traceback on exception | |
999 | --time time how long the command takes |
|
999 | --time time how long the command takes | |
1000 | --profile print command execution profile |
|
1000 | --profile print command execution profile | |
1001 | --version output version information and exit |
|
1001 | --version output version information and exit | |
1002 | -h --help display help and exit |
|
1002 | -h --help display help and exit | |
1003 | --hidden consider hidden changesets |
|
1003 | --hidden consider hidden changesets | |
1004 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
1004 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
1005 | (default: auto) |
|
1005 | (default: auto) | |
1006 |
|
1006 | |||
1007 | In case when extension name doesn't match any of its commands, |
|
1007 | In case when extension name doesn't match any of its commands, | |
1008 | help message should ask for '-v' to get list of built-in aliases |
|
1008 | help message should ask for '-v' to get list of built-in aliases | |
1009 | along with extension help |
|
1009 | along with extension help | |
1010 | $ cat > $TESTTMP/d/dudu.py <<EOF |
|
1010 | $ cat > $TESTTMP/d/dudu.py <<EOF | |
1011 | > """ |
|
1011 | > """ | |
1012 | > This is an awesome 'dudu' extension. It does something and |
|
1012 | > This is an awesome 'dudu' extension. It does something and | |
1013 | > also writes 'Beep beep' |
|
1013 | > also writes 'Beep beep' | |
1014 | > """ |
|
1014 | > """ | |
1015 | > from mercurial import commands, registrar |
|
1015 | > from mercurial import commands, registrar | |
1016 | > cmdtable = {} |
|
1016 | > cmdtable = {} | |
1017 | > command = registrar.command(cmdtable) |
|
1017 | > command = registrar.command(cmdtable) | |
1018 | > @command(b'something', [], b'hg something') |
|
1018 | > @command(b'something', [], b'hg something') | |
1019 | > def something(ui, *args, **kwargs): |
|
1019 | > def something(ui, *args, **kwargs): | |
1020 | > """Does something""" |
|
1020 | > """Does something""" | |
1021 | > ui.write(b"I do something. Yaaay\\n") |
|
1021 | > ui.write(b"I do something. Yaaay\\n") | |
1022 | > @command(b'beep', [], b'hg beep') |
|
1022 | > @command(b'beep', [], b'hg beep') | |
1023 | > def beep(ui, *args, **kwargs): |
|
1023 | > def beep(ui, *args, **kwargs): | |
1024 | > """Writes 'Beep beep'""" |
|
1024 | > """Writes 'Beep beep'""" | |
1025 | > ui.write(b"Beep beep\\n") |
|
1025 | > ui.write(b"Beep beep\\n") | |
1026 | > EOF |
|
1026 | > EOF | |
1027 | $ dudupath=$TESTTMP/d/dudu.py |
|
1027 | $ dudupath=$TESTTMP/d/dudu.py | |
1028 |
|
1028 | |||
1029 | $ echo "dudu = $dudupath" >> $HGRCPATH |
|
1029 | $ echo "dudu = $dudupath" >> $HGRCPATH | |
1030 |
|
1030 | |||
1031 | $ hg help -e dudu |
|
1031 | $ hg help -e dudu | |
1032 | dudu extension - |
|
1032 | dudu extension - | |
1033 |
|
1033 | |||
1034 | This is an awesome 'dudu' extension. It does something and also writes 'Beep |
|
1034 | This is an awesome 'dudu' extension. It does something and also writes 'Beep | |
1035 | beep' |
|
1035 | beep' | |
1036 |
|
1036 | |||
1037 | list of commands: |
|
1037 | list of commands: | |
1038 |
|
1038 | |||
1039 | beep Writes 'Beep beep' |
|
1039 | beep Writes 'Beep beep' | |
1040 | something Does something |
|
1040 | something Does something | |
1041 |
|
1041 | |||
1042 | (use 'hg help -v dudu' to show built-in aliases and global options) |
|
1042 | (use 'hg help -v dudu' to show built-in aliases and global options) | |
1043 |
|
1043 | |||
1044 | In case when extension name doesn't match any of its commands, |
|
1044 | In case when extension name doesn't match any of its commands, | |
1045 | help options '-v' and '-v -e' should be equivalent |
|
1045 | help options '-v' and '-v -e' should be equivalent | |
1046 | $ hg help -v dudu |
|
1046 | $ hg help -v dudu | |
1047 | dudu extension - |
|
1047 | dudu extension - | |
1048 |
|
1048 | |||
1049 | This is an awesome 'dudu' extension. It does something and also writes 'Beep |
|
1049 | This is an awesome 'dudu' extension. It does something and also writes 'Beep | |
1050 | beep' |
|
1050 | beep' | |
1051 |
|
1051 | |||
1052 | list of commands: |
|
1052 | list of commands: | |
1053 |
|
1053 | |||
1054 | beep Writes 'Beep beep' |
|
1054 | beep Writes 'Beep beep' | |
1055 | something Does something |
|
1055 | something Does something | |
1056 |
|
1056 | |||
1057 | global options ([+] can be repeated): |
|
1057 | global options ([+] can be repeated): | |
1058 |
|
1058 | |||
1059 | -R --repository REPO repository root directory or name of overlay bundle |
|
1059 | -R --repository REPO repository root directory or name of overlay bundle | |
1060 | file |
|
1060 | file | |
1061 | --cwd DIR change working directory |
|
1061 | --cwd DIR change working directory | |
1062 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
1062 | -y --noninteractive do not prompt, automatically pick the first choice for | |
1063 | all prompts |
|
1063 | all prompts | |
1064 | -q --quiet suppress output |
|
1064 | -q --quiet suppress output | |
1065 | -v --verbose enable additional output |
|
1065 | -v --verbose enable additional output | |
1066 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
1066 | --color TYPE when to colorize (boolean, always, auto, never, or | |
1067 | debug) |
|
1067 | debug) | |
1068 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
1068 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
1069 | --debug enable debugging output |
|
1069 | --debug enable debugging output | |
1070 | --debugger start debugger |
|
1070 | --debugger start debugger | |
1071 | --encoding ENCODE set the charset encoding (default: ascii) |
|
1071 | --encoding ENCODE set the charset encoding (default: ascii) | |
1072 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
1072 | --encodingmode MODE set the charset encoding mode (default: strict) | |
1073 | --traceback always print a traceback on exception |
|
1073 | --traceback always print a traceback on exception | |
1074 | --time time how long the command takes |
|
1074 | --time time how long the command takes | |
1075 | --profile print command execution profile |
|
1075 | --profile print command execution profile | |
1076 | --version output version information and exit |
|
1076 | --version output version information and exit | |
1077 | -h --help display help and exit |
|
1077 | -h --help display help and exit | |
1078 | --hidden consider hidden changesets |
|
1078 | --hidden consider hidden changesets | |
1079 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
1079 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
1080 | (default: auto) |
|
1080 | (default: auto) | |
1081 |
|
1081 | |||
1082 | $ hg help -v -e dudu |
|
1082 | $ hg help -v -e dudu | |
1083 | dudu extension - |
|
1083 | dudu extension - | |
1084 |
|
1084 | |||
1085 | This is an awesome 'dudu' extension. It does something and also writes 'Beep |
|
1085 | This is an awesome 'dudu' extension. It does something and also writes 'Beep | |
1086 | beep' |
|
1086 | beep' | |
1087 |
|
1087 | |||
1088 | list of commands: |
|
1088 | list of commands: | |
1089 |
|
1089 | |||
1090 | beep Writes 'Beep beep' |
|
1090 | beep Writes 'Beep beep' | |
1091 | something Does something |
|
1091 | something Does something | |
1092 |
|
1092 | |||
1093 | global options ([+] can be repeated): |
|
1093 | global options ([+] can be repeated): | |
1094 |
|
1094 | |||
1095 | -R --repository REPO repository root directory or name of overlay bundle |
|
1095 | -R --repository REPO repository root directory or name of overlay bundle | |
1096 | file |
|
1096 | file | |
1097 | --cwd DIR change working directory |
|
1097 | --cwd DIR change working directory | |
1098 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
1098 | -y --noninteractive do not prompt, automatically pick the first choice for | |
1099 | all prompts |
|
1099 | all prompts | |
1100 | -q --quiet suppress output |
|
1100 | -q --quiet suppress output | |
1101 | -v --verbose enable additional output |
|
1101 | -v --verbose enable additional output | |
1102 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
1102 | --color TYPE when to colorize (boolean, always, auto, never, or | |
1103 | debug) |
|
1103 | debug) | |
1104 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
1104 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
1105 | --debug enable debugging output |
|
1105 | --debug enable debugging output | |
1106 | --debugger start debugger |
|
1106 | --debugger start debugger | |
1107 | --encoding ENCODE set the charset encoding (default: ascii) |
|
1107 | --encoding ENCODE set the charset encoding (default: ascii) | |
1108 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
1108 | --encodingmode MODE set the charset encoding mode (default: strict) | |
1109 | --traceback always print a traceback on exception |
|
1109 | --traceback always print a traceback on exception | |
1110 | --time time how long the command takes |
|
1110 | --time time how long the command takes | |
1111 | --profile print command execution profile |
|
1111 | --profile print command execution profile | |
1112 | --version output version information and exit |
|
1112 | --version output version information and exit | |
1113 | -h --help display help and exit |
|
1113 | -h --help display help and exit | |
1114 | --hidden consider hidden changesets |
|
1114 | --hidden consider hidden changesets | |
1115 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
1115 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
1116 | (default: auto) |
|
1116 | (default: auto) | |
1117 |
|
1117 | |||
1118 | Disabled extension commands: |
|
1118 | Disabled extension commands: | |
1119 |
|
1119 | |||
1120 | $ ORGHGRCPATH=$HGRCPATH |
|
1120 | $ ORGHGRCPATH=$HGRCPATH | |
1121 | $ HGRCPATH= |
|
1121 | $ HGRCPATH= | |
1122 | $ export HGRCPATH |
|
1122 | $ export HGRCPATH | |
1123 | $ hg help email |
|
1123 | $ hg help email | |
1124 | 'email' is provided by the following extension: |
|
1124 | 'email' is provided by the following extension: | |
1125 |
|
1125 | |||
1126 | patchbomb command to send changesets as (a series of) patch emails |
|
1126 | patchbomb command to send changesets as (a series of) patch emails | |
1127 |
|
1127 | |||
1128 | (use 'hg help extensions' for information on enabling extensions) |
|
1128 | (use 'hg help extensions' for information on enabling extensions) | |
1129 |
|
1129 | |||
1130 |
|
1130 | |||
1131 | $ hg qdel |
|
1131 | $ hg qdel | |
1132 | hg: unknown command 'qdel' |
|
1132 | hg: unknown command 'qdel' | |
1133 | 'qdelete' is provided by the following extension: |
|
1133 | 'qdelete' is provided by the following extension: | |
1134 |
|
1134 | |||
1135 | mq manage a stack of patches |
|
1135 | mq manage a stack of patches | |
1136 |
|
1136 | |||
1137 | (use 'hg help extensions' for information on enabling extensions) |
|
1137 | (use 'hg help extensions' for information on enabling extensions) | |
1138 | [255] |
|
1138 | [255] | |
1139 |
|
1139 | |||
1140 |
|
1140 | |||
1141 | $ hg churn |
|
1141 | $ hg churn | |
1142 | hg: unknown command 'churn' |
|
1142 | hg: unknown command 'churn' | |
1143 | 'churn' is provided by the following extension: |
|
1143 | 'churn' is provided by the following extension: | |
1144 |
|
1144 | |||
1145 | churn command to display statistics about repository history |
|
1145 | churn command to display statistics about repository history | |
1146 |
|
1146 | |||
1147 | (use 'hg help extensions' for information on enabling extensions) |
|
1147 | (use 'hg help extensions' for information on enabling extensions) | |
1148 | [255] |
|
1148 | [255] | |
1149 |
|
1149 | |||
1150 |
|
1150 | |||
1151 |
|
1151 | |||
1152 | Disabled extensions: |
|
1152 | Disabled extensions: | |
1153 |
|
1153 | |||
1154 | $ hg help churn |
|
1154 | $ hg help churn | |
1155 | churn extension - command to display statistics about repository history |
|
1155 | churn extension - command to display statistics about repository history | |
1156 |
|
1156 | |||
1157 | (use 'hg help extensions' for information on enabling extensions) |
|
1157 | (use 'hg help extensions' for information on enabling extensions) | |
1158 |
|
1158 | |||
1159 | $ hg help patchbomb |
|
1159 | $ hg help patchbomb | |
1160 | patchbomb extension - command to send changesets as (a series of) patch emails |
|
1160 | patchbomb extension - command to send changesets as (a series of) patch emails | |
1161 |
|
1161 | |||
1162 | The series is started off with a "[PATCH 0 of N]" introduction, which |
|
1162 | The series is started off with a "[PATCH 0 of N]" introduction, which | |
1163 | describes the series as a whole. |
|
1163 | describes the series as a whole. | |
1164 |
|
1164 | |||
1165 | Each patch email has a Subject line of "[PATCH M of N] ...", using the first |
|
1165 | Each patch email has a Subject line of "[PATCH M of N] ...", using the first | |
1166 | line of the changeset description as the subject text. The message contains |
|
1166 | line of the changeset description as the subject text. The message contains | |
1167 | two or three body parts: |
|
1167 | two or three body parts: | |
1168 |
|
1168 | |||
1169 | - The changeset description. |
|
1169 | - The changeset description. | |
1170 | - [Optional] The result of running diffstat on the patch. |
|
1170 | - [Optional] The result of running diffstat on the patch. | |
1171 | - The patch itself, as generated by 'hg export'. |
|
1171 | - The patch itself, as generated by 'hg export'. | |
1172 |
|
1172 | |||
1173 | Each message refers to the first in the series using the In-Reply-To and |
|
1173 | Each message refers to the first in the series using the In-Reply-To and | |
1174 | References headers, so they will show up as a sequence in threaded mail and |
|
1174 | References headers, so they will show up as a sequence in threaded mail and | |
1175 | news readers, and in mail archives. |
|
1175 | news readers, and in mail archives. | |
1176 |
|
1176 | |||
1177 | To configure other defaults, add a section like this to your configuration |
|
1177 | To configure other defaults, add a section like this to your configuration | |
1178 | file: |
|
1178 | file: | |
1179 |
|
1179 | |||
1180 | [email] |
|
1180 | [email] | |
1181 | from = My Name <my@email> |
|
1181 | from = My Name <my@email> | |
1182 | to = recipient1, recipient2, ... |
|
1182 | to = recipient1, recipient2, ... | |
1183 | cc = cc1, cc2, ... |
|
1183 | cc = cc1, cc2, ... | |
1184 | bcc = bcc1, bcc2, ... |
|
1184 | bcc = bcc1, bcc2, ... | |
1185 | reply-to = address1, address2, ... |
|
1185 | reply-to = address1, address2, ... | |
1186 |
|
1186 | |||
1187 | Use "[patchbomb]" as configuration section name if you need to override global |
|
1187 | Use "[patchbomb]" as configuration section name if you need to override global | |
1188 | "[email]" address settings. |
|
1188 | "[email]" address settings. | |
1189 |
|
1189 | |||
1190 | Then you can use the 'hg email' command to mail a series of changesets as a |
|
1190 | Then you can use the 'hg email' command to mail a series of changesets as a | |
1191 | patchbomb. |
|
1191 | patchbomb. | |
1192 |
|
1192 | |||
1193 | You can also either configure the method option in the email section to be a |
|
1193 | You can also either configure the method option in the email section to be a | |
1194 | sendmail compatible mailer or fill out the [smtp] section so that the |
|
1194 | sendmail compatible mailer or fill out the [smtp] section so that the | |
1195 | patchbomb extension can automatically send patchbombs directly from the |
|
1195 | patchbomb extension can automatically send patchbombs directly from the | |
1196 | commandline. See the [email] and [smtp] sections in hgrc(5) for details. |
|
1196 | commandline. See the [email] and [smtp] sections in hgrc(5) for details. | |
1197 |
|
1197 | |||
1198 | By default, 'hg email' will prompt for a "To" or "CC" header if you do not |
|
1198 | By default, 'hg email' will prompt for a "To" or "CC" header if you do not | |
1199 | supply one via configuration or the command line. You can override this to |
|
1199 | supply one via configuration or the command line. You can override this to | |
1200 | never prompt by configuring an empty value: |
|
1200 | never prompt by configuring an empty value: | |
1201 |
|
1201 | |||
1202 | [email] |
|
1202 | [email] | |
1203 | cc = |
|
1203 | cc = | |
1204 |
|
1204 | |||
1205 | You can control the default inclusion of an introduction message with the |
|
1205 | You can control the default inclusion of an introduction message with the | |
1206 | "patchbomb.intro" configuration option. The configuration is always |
|
1206 | "patchbomb.intro" configuration option. The configuration is always | |
1207 | overwritten by command line flags like --intro and --desc: |
|
1207 | overwritten by command line flags like --intro and --desc: | |
1208 |
|
1208 | |||
1209 | [patchbomb] |
|
1209 | [patchbomb] | |
1210 | intro=auto # include introduction message if more than 1 patch (default) |
|
1210 | intro=auto # include introduction message if more than 1 patch (default) | |
1211 | intro=never # never include an introduction message |
|
1211 | intro=never # never include an introduction message | |
1212 | intro=always # always include an introduction message |
|
1212 | intro=always # always include an introduction message | |
1213 |
|
1213 | |||
1214 | You can specify a template for flags to be added in subject prefixes. Flags |
|
1214 | You can specify a template for flags to be added in subject prefixes. Flags | |
1215 | specified by --flag option are exported as "{flags}" keyword: |
|
1215 | specified by --flag option are exported as "{flags}" keyword: | |
1216 |
|
1216 | |||
1217 | [patchbomb] |
|
1217 | [patchbomb] | |
1218 | flagtemplate = "{separate(' ', |
|
1218 | flagtemplate = "{separate(' ', | |
1219 | ifeq(branch, 'default', '', branch|upper), |
|
1219 | ifeq(branch, 'default', '', branch|upper), | |
1220 | flags)}" |
|
1220 | flags)}" | |
1221 |
|
1221 | |||
1222 | You can set patchbomb to always ask for confirmation by setting |
|
1222 | You can set patchbomb to always ask for confirmation by setting | |
1223 | "patchbomb.confirm" to true. |
|
1223 | "patchbomb.confirm" to true. | |
1224 |
|
1224 | |||
1225 | (use 'hg help extensions' for information on enabling extensions) |
|
1225 | (use 'hg help extensions' for information on enabling extensions) | |
1226 |
|
1226 | |||
1227 |
|
1227 | |||
1228 | Broken disabled extension and command: |
|
1228 | Broken disabled extension and command: | |
1229 |
|
1229 | |||
1230 | $ mkdir hgext |
|
1230 | $ mkdir hgext | |
1231 | $ echo > hgext/__init__.py |
|
1231 | $ echo > hgext/__init__.py | |
1232 | $ cat > hgext/broken.py <<EOF |
|
1232 | $ cat > hgext/broken.py <<EOF | |
1233 | > "broken extension' |
|
1233 | > "broken extension' | |
1234 | > EOF |
|
1234 | > EOF | |
1235 | $ cat > path.py <<EOF |
|
1235 | $ cat > path.py <<EOF | |
1236 | > import os, sys |
|
1236 | > import os, sys | |
1237 | > sys.path.insert(0, os.environ['HGEXTPATH']) |
|
1237 | > sys.path.insert(0, os.environ['HGEXTPATH']) | |
1238 | > EOF |
|
1238 | > EOF | |
1239 | $ HGEXTPATH=`pwd` |
|
1239 | $ HGEXTPATH=`pwd` | |
1240 | $ export HGEXTPATH |
|
1240 | $ export HGEXTPATH | |
1241 |
|
1241 | |||
1242 | $ hg --config extensions.path=./path.py help broken |
|
1242 | $ hg --config extensions.path=./path.py help broken | |
1243 | broken extension - (no help text available) |
|
1243 | broken extension - (no help text available) | |
1244 |
|
1244 | |||
1245 | (use 'hg help extensions' for information on enabling extensions) |
|
1245 | (use 'hg help extensions' for information on enabling extensions) | |
1246 |
|
1246 | |||
1247 |
|
1247 | |||
1248 | $ cat > hgext/forest.py <<EOF |
|
1248 | $ cat > hgext/forest.py <<EOF | |
1249 | > cmdtable = None |
|
1249 | > cmdtable = None | |
1250 | > @command() |
|
1250 | > @command() | |
1251 | > def f(): |
|
1251 | > def f(): | |
1252 | > pass |
|
1252 | > pass | |
1253 | > @command(123) |
|
1253 | > @command(123) | |
1254 | > def g(): |
|
1254 | > def g(): | |
1255 | > pass |
|
1255 | > pass | |
1256 | > EOF |
|
1256 | > EOF | |
1257 | $ hg --config extensions.path=./path.py help foo > /dev/null |
|
1257 | $ hg --config extensions.path=./path.py help foo > /dev/null | |
1258 | abort: no such help topic: foo |
|
1258 | abort: no such help topic: foo (no-windows !) | |
1259 | (try 'hg help --keyword foo') |
|
1259 | (try 'hg help --keyword foo') (no-windows !) | |
|
1260 | \x1b[0;31mabort: no such help topic: foo\x1b[0m (esc) (windows !) | |||
|
1261 | \x1b[0;31m(try 'hg help --keyword foo')\x1b[0m (esc) (windows !) | |||
1260 |
|
|
1262 | [255] | |
1261 |
|
1263 | |||
1262 | $ cat > throw.py <<EOF |
|
1264 | $ cat > throw.py <<EOF | |
1263 | > from mercurial import commands, registrar, util |
|
1265 | > from mercurial import commands, registrar, util | |
1264 | > cmdtable = {} |
|
1266 | > cmdtable = {} | |
1265 | > command = registrar.command(cmdtable) |
|
1267 | > command = registrar.command(cmdtable) | |
1266 | > class Bogon(Exception): pass |
|
1268 | > class Bogon(Exception): pass | |
1267 | > @command(b'throw', [], b'hg throw', norepo=True) |
|
1269 | > @command(b'throw', [], b'hg throw', norepo=True) | |
1268 | > def throw(ui, **opts): |
|
1270 | > def throw(ui, **opts): | |
1269 | > """throws an exception""" |
|
1271 | > """throws an exception""" | |
1270 | > raise Bogon() |
|
1272 | > raise Bogon() | |
1271 | > EOF |
|
1273 | > EOF | |
1272 |
|
1274 | |||
1273 | No declared supported version, extension complains: |
|
1275 | No declared supported version, extension complains: | |
1274 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1276 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
1275 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
1277 | ** Unknown exception encountered with possibly-broken third-party extension throw | |
1276 | ** which supports versions unknown of Mercurial. |
|
1278 | ** which supports versions unknown of Mercurial. | |
1277 | ** Please disable throw and try your action again. |
|
1279 | ** Please disable throw and try your action again. | |
1278 | ** If that fixes the bug please report it to the extension author. |
|
1280 | ** If that fixes the bug please report it to the extension author. | |
1279 | ** Python * (glob) |
|
1281 | ** Python * (glob) | |
1280 | ** Mercurial Distributed SCM * (glob) |
|
1282 | ** Mercurial Distributed SCM * (glob) | |
1281 | ** Extensions loaded: throw |
|
1283 | ** Extensions loaded: throw | |
1282 |
|
1284 | |||
1283 | empty declaration of supported version, extension complains: |
|
1285 | empty declaration of supported version, extension complains: | |
1284 | $ echo "testedwith = ''" >> throw.py |
|
1286 | $ echo "testedwith = ''" >> throw.py | |
1285 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1287 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
1286 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
1288 | ** Unknown exception encountered with possibly-broken third-party extension throw | |
1287 | ** which supports versions unknown of Mercurial. |
|
1289 | ** which supports versions unknown of Mercurial. | |
1288 | ** Please disable throw and try your action again. |
|
1290 | ** Please disable throw and try your action again. | |
1289 | ** If that fixes the bug please report it to the extension author. |
|
1291 | ** If that fixes the bug please report it to the extension author. | |
1290 | ** Python * (glob) |
|
1292 | ** Python * (glob) | |
1291 | ** Mercurial Distributed SCM (*) (glob) |
|
1293 | ** Mercurial Distributed SCM (*) (glob) | |
1292 | ** Extensions loaded: throw |
|
1294 | ** Extensions loaded: throw | |
1293 |
|
1295 | |||
1294 | If the extension specifies a buglink, show that: |
|
1296 | If the extension specifies a buglink, show that: | |
1295 | $ echo 'buglink = "http://example.com/bts"' >> throw.py |
|
1297 | $ echo 'buglink = "http://example.com/bts"' >> throw.py | |
1296 | $ rm -f throw.pyc throw.pyo |
|
1298 | $ rm -f throw.pyc throw.pyo | |
1297 | $ rm -Rf __pycache__ |
|
1299 | $ rm -Rf __pycache__ | |
1298 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1300 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
1299 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
1301 | ** Unknown exception encountered with possibly-broken third-party extension throw | |
1300 | ** which supports versions unknown of Mercurial. |
|
1302 | ** which supports versions unknown of Mercurial. | |
1301 | ** Please disable throw and try your action again. |
|
1303 | ** Please disable throw and try your action again. | |
1302 | ** If that fixes the bug please report it to http://example.com/bts |
|
1304 | ** If that fixes the bug please report it to http://example.com/bts | |
1303 | ** Python * (glob) |
|
1305 | ** Python * (glob) | |
1304 | ** Mercurial Distributed SCM (*) (glob) |
|
1306 | ** Mercurial Distributed SCM (*) (glob) | |
1305 | ** Extensions loaded: throw |
|
1307 | ** Extensions loaded: throw | |
1306 |
|
1308 | |||
1307 | If the extensions declare outdated versions, accuse the older extension first: |
|
1309 | If the extensions declare outdated versions, accuse the older extension first: | |
1308 | $ echo "from mercurial import util" >> older.py |
|
1310 | $ echo "from mercurial import util" >> older.py | |
1309 | $ echo "util.version = lambda:b'2.2'" >> older.py |
|
1311 | $ echo "util.version = lambda:b'2.2'" >> older.py | |
1310 | $ echo "testedwith = b'1.9.3'" >> older.py |
|
1312 | $ echo "testedwith = b'1.9.3'" >> older.py | |
1311 | $ echo "testedwith = b'2.1.1'" >> throw.py |
|
1313 | $ echo "testedwith = b'2.1.1'" >> throw.py | |
1312 | $ rm -f throw.pyc throw.pyo |
|
1314 | $ rm -f throw.pyc throw.pyo | |
1313 | $ rm -Rf __pycache__ |
|
1315 | $ rm -Rf __pycache__ | |
1314 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1316 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ | |
1315 | > throw 2>&1 | egrep '^\*\*' |
|
1317 | > throw 2>&1 | egrep '^\*\*' | |
1316 | ** Unknown exception encountered with possibly-broken third-party extension older |
|
1318 | ** Unknown exception encountered with possibly-broken third-party extension older | |
1317 | ** which supports versions 1.9 of Mercurial. |
|
1319 | ** which supports versions 1.9 of Mercurial. | |
1318 | ** Please disable older and try your action again. |
|
1320 | ** Please disable older and try your action again. | |
1319 | ** If that fixes the bug please report it to the extension author. |
|
1321 | ** If that fixes the bug please report it to the extension author. | |
1320 | ** Python * (glob) |
|
1322 | ** Python * (glob) | |
1321 | ** Mercurial Distributed SCM (version 2.2) |
|
1323 | ** Mercurial Distributed SCM (version 2.2) | |
1322 | ** Extensions loaded: throw, older |
|
1324 | ** Extensions loaded: throw, older | |
1323 |
|
1325 | |||
1324 | One extension only tested with older, one only with newer versions: |
|
1326 | One extension only tested with older, one only with newer versions: | |
1325 | $ echo "util.version = lambda:b'2.1'" >> older.py |
|
1327 | $ echo "util.version = lambda:b'2.1'" >> older.py | |
1326 | $ rm -f older.pyc older.pyo |
|
1328 | $ rm -f older.pyc older.pyo | |
1327 | $ rm -Rf __pycache__ |
|
1329 | $ rm -Rf __pycache__ | |
1328 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1330 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ | |
1329 | > throw 2>&1 | egrep '^\*\*' |
|
1331 | > throw 2>&1 | egrep '^\*\*' | |
1330 | ** Unknown exception encountered with possibly-broken third-party extension older |
|
1332 | ** Unknown exception encountered with possibly-broken third-party extension older | |
1331 | ** which supports versions 1.9 of Mercurial. |
|
1333 | ** which supports versions 1.9 of Mercurial. | |
1332 | ** Please disable older and try your action again. |
|
1334 | ** Please disable older and try your action again. | |
1333 | ** If that fixes the bug please report it to the extension author. |
|
1335 | ** If that fixes the bug please report it to the extension author. | |
1334 | ** Python * (glob) |
|
1336 | ** Python * (glob) | |
1335 | ** Mercurial Distributed SCM (version 2.1) |
|
1337 | ** Mercurial Distributed SCM (version 2.1) | |
1336 | ** Extensions loaded: throw, older |
|
1338 | ** Extensions loaded: throw, older | |
1337 |
|
1339 | |||
1338 | Older extension is tested with current version, the other only with newer: |
|
1340 | Older extension is tested with current version, the other only with newer: | |
1339 | $ echo "util.version = lambda:b'1.9.3'" >> older.py |
|
1341 | $ echo "util.version = lambda:b'1.9.3'" >> older.py | |
1340 | $ rm -f older.pyc older.pyo |
|
1342 | $ rm -f older.pyc older.pyo | |
1341 | $ rm -Rf __pycache__ |
|
1343 | $ rm -Rf __pycache__ | |
1342 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1344 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ | |
1343 | > throw 2>&1 | egrep '^\*\*' |
|
1345 | > throw 2>&1 | egrep '^\*\*' | |
1344 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
1346 | ** Unknown exception encountered with possibly-broken third-party extension throw | |
1345 | ** which supports versions 2.1 of Mercurial. |
|
1347 | ** which supports versions 2.1 of Mercurial. | |
1346 | ** Please disable throw and try your action again. |
|
1348 | ** Please disable throw and try your action again. | |
1347 | ** If that fixes the bug please report it to http://example.com/bts |
|
1349 | ** If that fixes the bug please report it to http://example.com/bts | |
1348 | ** Python * (glob) |
|
1350 | ** Python * (glob) | |
1349 | ** Mercurial Distributed SCM (version 1.9.3) |
|
1351 | ** Mercurial Distributed SCM (version 1.9.3) | |
1350 | ** Extensions loaded: throw, older |
|
1352 | ** Extensions loaded: throw, older | |
1351 |
|
1353 | |||
1352 | Ability to point to a different point |
|
1354 | Ability to point to a different point | |
1353 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1355 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ | |
1354 | > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | egrep '^\*\*' |
|
1356 | > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | egrep '^\*\*' | |
1355 | ** unknown exception encountered, please report by visiting |
|
1357 | ** unknown exception encountered, please report by visiting | |
1356 | ** Your Local Goat Lenders |
|
1358 | ** Your Local Goat Lenders | |
1357 | ** Python * (glob) |
|
1359 | ** Python * (glob) | |
1358 | ** Mercurial Distributed SCM (*) (glob) |
|
1360 | ** Mercurial Distributed SCM (*) (glob) | |
1359 | ** Extensions loaded: throw, older |
|
1361 | ** Extensions loaded: throw, older | |
1360 |
|
1362 | |||
1361 | Declare the version as supporting this hg version, show regular bts link: |
|
1363 | Declare the version as supporting this hg version, show regular bts link: | |
1362 | $ hgver=`hg debuginstall -T '{hgver}'` |
|
1364 | $ hgver=`hg debuginstall -T '{hgver}'` | |
1363 | $ echo 'testedwith = """'"$hgver"'"""' >> throw.py |
|
1365 | $ echo 'testedwith = """'"$hgver"'"""' >> throw.py | |
1364 | $ if [ -z "$hgver" ]; then |
|
1366 | $ if [ -z "$hgver" ]; then | |
1365 | > echo "unable to fetch a mercurial version. Make sure __version__ is correct"; |
|
1367 | > echo "unable to fetch a mercurial version. Make sure __version__ is correct"; | |
1366 | > fi |
|
1368 | > fi | |
1367 | $ rm -f throw.pyc throw.pyo |
|
1369 | $ rm -f throw.pyc throw.pyo | |
1368 | $ rm -Rf __pycache__ |
|
1370 | $ rm -Rf __pycache__ | |
1369 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1371 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
1370 | ** unknown exception encountered, please report by visiting |
|
1372 | ** unknown exception encountered, please report by visiting | |
1371 | ** https://mercurial-scm.org/wiki/BugTracker |
|
1373 | ** https://mercurial-scm.org/wiki/BugTracker | |
1372 | ** Python * (glob) |
|
1374 | ** Python * (glob) | |
1373 | ** Mercurial Distributed SCM (*) (glob) |
|
1375 | ** Mercurial Distributed SCM (*) (glob) | |
1374 | ** Extensions loaded: throw |
|
1376 | ** Extensions loaded: throw | |
1375 |
|
1377 | |||
1376 | Patch version is ignored during compatibility check |
|
1378 | Patch version is ignored during compatibility check | |
1377 | $ echo "testedwith = b'3.2'" >> throw.py |
|
1379 | $ echo "testedwith = b'3.2'" >> throw.py | |
1378 | $ echo "util.version = lambda:b'3.2.2'" >> throw.py |
|
1380 | $ echo "util.version = lambda:b'3.2.2'" >> throw.py | |
1379 | $ rm -f throw.pyc throw.pyo |
|
1381 | $ rm -f throw.pyc throw.pyo | |
1380 | $ rm -Rf __pycache__ |
|
1382 | $ rm -Rf __pycache__ | |
1381 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1383 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
1382 | ** unknown exception encountered, please report by visiting |
|
1384 | ** unknown exception encountered, please report by visiting | |
1383 | ** https://mercurial-scm.org/wiki/BugTracker |
|
1385 | ** https://mercurial-scm.org/wiki/BugTracker | |
1384 | ** Python * (glob) |
|
1386 | ** Python * (glob) | |
1385 | ** Mercurial Distributed SCM (*) (glob) |
|
1387 | ** Mercurial Distributed SCM (*) (glob) | |
1386 | ** Extensions loaded: throw |
|
1388 | ** Extensions loaded: throw | |
1387 |
|
1389 | |||
1388 | Test version number support in 'hg version': |
|
1390 | Test version number support in 'hg version': | |
1389 | $ echo '__version__ = (1, 2, 3)' >> throw.py |
|
1391 | $ echo '__version__ = (1, 2, 3)' >> throw.py | |
1390 | $ rm -f throw.pyc throw.pyo |
|
1392 | $ rm -f throw.pyc throw.pyo | |
1391 | $ rm -Rf __pycache__ |
|
1393 | $ rm -Rf __pycache__ | |
1392 | $ hg version -v |
|
1394 | $ hg version -v | |
1393 | Mercurial Distributed SCM (version *) (glob) |
|
1395 | Mercurial Distributed SCM (version *) (glob) | |
1394 | (see https://mercurial-scm.org for more information) |
|
1396 | (see https://mercurial-scm.org for more information) | |
1395 |
|
1397 | |||
1396 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
1398 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
1397 | This is free software; see the source for copying conditions. There is NO |
|
1399 | This is free software; see the source for copying conditions. There is NO | |
1398 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
1400 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
1399 |
|
1401 | |||
1400 | Enabled extensions: |
|
1402 | Enabled extensions: | |
1401 |
|
1403 | |||
1402 |
|
1404 | |||
1403 | $ hg version -v --config extensions.throw=throw.py |
|
1405 | $ hg version -v --config extensions.throw=throw.py | |
1404 | Mercurial Distributed SCM (version *) (glob) |
|
1406 | Mercurial Distributed SCM (version *) (glob) | |
1405 | (see https://mercurial-scm.org for more information) |
|
1407 | (see https://mercurial-scm.org for more information) | |
1406 |
|
1408 | |||
1407 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
1409 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
1408 | This is free software; see the source for copying conditions. There is NO |
|
1410 | This is free software; see the source for copying conditions. There is NO | |
1409 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
1411 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
1410 |
|
1412 | |||
1411 | Enabled extensions: |
|
1413 | Enabled extensions: | |
1412 |
|
1414 | |||
1413 | throw external 1.2.3 |
|
1415 | throw external 1.2.3 | |
1414 | $ echo 'getversion = lambda: b"1.twentythree"' >> throw.py |
|
1416 | $ echo 'getversion = lambda: b"1.twentythree"' >> throw.py | |
1415 | $ rm -f throw.pyc throw.pyo |
|
1417 | $ rm -f throw.pyc throw.pyo | |
1416 | $ rm -Rf __pycache__ |
|
1418 | $ rm -Rf __pycache__ | |
1417 | $ hg version -v --config extensions.throw=throw.py --config extensions.strip= |
|
1419 | $ hg version -v --config extensions.throw=throw.py --config extensions.strip= | |
1418 | Mercurial Distributed SCM (version *) (glob) |
|
1420 | Mercurial Distributed SCM (version *) (glob) | |
1419 | (see https://mercurial-scm.org for more information) |
|
1421 | (see https://mercurial-scm.org for more information) | |
1420 |
|
1422 | |||
1421 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
1423 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
1422 | This is free software; see the source for copying conditions. There is NO |
|
1424 | This is free software; see the source for copying conditions. There is NO | |
1423 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
1425 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
1424 |
|
1426 | |||
1425 | Enabled extensions: |
|
1427 | Enabled extensions: | |
1426 |
|
1428 | |||
1427 | throw external 1.twentythree |
|
1429 | throw external 1.twentythree | |
1428 | strip internal |
|
1430 | strip internal | |
1429 |
|
1431 | |||
1430 | $ hg version -q --config extensions.throw=throw.py |
|
1432 | $ hg version -q --config extensions.throw=throw.py | |
1431 | Mercurial Distributed SCM (version *) (glob) |
|
1433 | Mercurial Distributed SCM (version *) (glob) | |
1432 |
|
1434 | |||
1433 | Test template output: |
|
1435 | Test template output: | |
1434 |
|
1436 | |||
1435 | $ hg version --config extensions.strip= -T'{extensions}' |
|
1437 | $ hg version --config extensions.strip= -T'{extensions}' | |
1436 | strip |
|
1438 | strip | |
1437 |
|
1439 | |||
1438 | Test JSON output of version: |
|
1440 | Test JSON output of version: | |
1439 |
|
1441 | |||
1440 | $ hg version -Tjson |
|
1442 | $ hg version -Tjson | |
1441 | [ |
|
1443 | [ | |
1442 | { |
|
1444 | { | |
1443 | "extensions": [], |
|
1445 | "extensions": [], | |
1444 | "ver": "*" (glob) |
|
1446 | "ver": "*" (glob) | |
1445 | } |
|
1447 | } | |
1446 | ] |
|
1448 | ] | |
1447 |
|
1449 | |||
1448 | $ hg version --config extensions.throw=throw.py -Tjson |
|
1450 | $ hg version --config extensions.throw=throw.py -Tjson | |
1449 | [ |
|
1451 | [ | |
1450 | { |
|
1452 | { | |
1451 | "extensions": [{"bundled": false, "name": "throw", "ver": "1.twentythree"}], |
|
1453 | "extensions": [{"bundled": false, "name": "throw", "ver": "1.twentythree"}], | |
1452 | "ver": "3.2.2" |
|
1454 | "ver": "3.2.2" | |
1453 | } |
|
1455 | } | |
1454 | ] |
|
1456 | ] | |
1455 |
|
1457 | |||
1456 | $ hg version --config extensions.strip= -Tjson |
|
1458 | $ hg version --config extensions.strip= -Tjson | |
1457 | [ |
|
1459 | [ | |
1458 | { |
|
1460 | { | |
1459 | "extensions": [{"bundled": true, "name": "strip", "ver": null}], |
|
1461 | "extensions": [{"bundled": true, "name": "strip", "ver": null}], | |
1460 | "ver": "*" (glob) |
|
1462 | "ver": "*" (glob) | |
1461 | } |
|
1463 | } | |
1462 | ] |
|
1464 | ] | |
1463 |
|
1465 | |||
1464 | Test template output of version: |
|
1466 | Test template output of version: | |
1465 |
|
1467 | |||
1466 | $ hg version --config extensions.throw=throw.py --config extensions.strip= \ |
|
1468 | $ hg version --config extensions.throw=throw.py --config extensions.strip= \ | |
1467 | > -T'{extensions % "{name} {pad(ver, 16)} ({if(bundled, "internal", "external")})\n"}' |
|
1469 | > -T'{extensions % "{name} {pad(ver, 16)} ({if(bundled, "internal", "external")})\n"}' | |
1468 | throw 1.twentythree (external) |
|
1470 | throw 1.twentythree (external) | |
1469 | strip (internal) |
|
1471 | strip (internal) | |
1470 |
|
1472 | |||
1471 | Refuse to load extensions with minimum version requirements |
|
1473 | Refuse to load extensions with minimum version requirements | |
1472 |
|
1474 | |||
1473 | $ cat > minversion1.py << EOF |
|
1475 | $ cat > minversion1.py << EOF | |
1474 | > from mercurial import util |
|
1476 | > from mercurial import util | |
1475 | > util.version = lambda: b'3.5.2' |
|
1477 | > util.version = lambda: b'3.5.2' | |
1476 | > minimumhgversion = b'3.6' |
|
1478 | > minimumhgversion = b'3.6' | |
1477 | > EOF |
|
1479 | > EOF | |
1478 | $ hg --config extensions.minversion=minversion1.py version |
|
1480 | $ hg --config extensions.minversion=minversion1.py version | |
1479 | (third party extension minversion requires version 3.6 or newer of Mercurial; disabling) |
|
1481 | (third party extension minversion requires version 3.6 or newer of Mercurial; disabling) | |
1480 | Mercurial Distributed SCM (version 3.5.2) |
|
1482 | Mercurial Distributed SCM (version 3.5.2) | |
1481 | (see https://mercurial-scm.org for more information) |
|
1483 | (see https://mercurial-scm.org for more information) | |
1482 |
|
1484 | |||
1483 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
1485 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
1484 | This is free software; see the source for copying conditions. There is NO |
|
1486 | This is free software; see the source for copying conditions. There is NO | |
1485 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
1487 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
1486 |
|
1488 | |||
1487 | $ cat > minversion2.py << EOF |
|
1489 | $ cat > minversion2.py << EOF | |
1488 | > from mercurial import util |
|
1490 | > from mercurial import util | |
1489 | > util.version = lambda: b'3.6' |
|
1491 | > util.version = lambda: b'3.6' | |
1490 | > minimumhgversion = b'3.7' |
|
1492 | > minimumhgversion = b'3.7' | |
1491 | > EOF |
|
1493 | > EOF | |
1492 | $ hg --config extensions.minversion=minversion2.py version 2>&1 | egrep '\(third' |
|
1494 | $ hg --config extensions.minversion=minversion2.py version 2>&1 | egrep '\(third' | |
1493 | (third party extension minversion requires version 3.7 or newer of Mercurial; disabling) |
|
1495 | (third party extension minversion requires version 3.7 or newer of Mercurial; disabling) | |
1494 |
|
1496 | |||
1495 | Can load version that is only off by point release |
|
1497 | Can load version that is only off by point release | |
1496 |
|
1498 | |||
1497 | $ cat > minversion2.py << EOF |
|
1499 | $ cat > minversion2.py << EOF | |
1498 | > from mercurial import util |
|
1500 | > from mercurial import util | |
1499 | > util.version = lambda: b'3.6.1' |
|
1501 | > util.version = lambda: b'3.6.1' | |
1500 | > minimumhgversion = b'3.6' |
|
1502 | > minimumhgversion = b'3.6' | |
1501 | > EOF |
|
1503 | > EOF | |
1502 | $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' |
|
1504 | $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' | |
1503 | [1] |
|
1505 | [1] | |
1504 |
|
1506 | |||
1505 | Can load minimum version identical to current |
|
1507 | Can load minimum version identical to current | |
1506 |
|
1508 | |||
1507 | $ cat > minversion3.py << EOF |
|
1509 | $ cat > minversion3.py << EOF | |
1508 | > from mercurial import util |
|
1510 | > from mercurial import util | |
1509 | > util.version = lambda: b'3.5' |
|
1511 | > util.version = lambda: b'3.5' | |
1510 | > minimumhgversion = b'3.5' |
|
1512 | > minimumhgversion = b'3.5' | |
1511 | > EOF |
|
1513 | > EOF | |
1512 | $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' |
|
1514 | $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' | |
1513 | [1] |
|
1515 | [1] | |
1514 |
|
1516 | |||
1515 | Restore HGRCPATH |
|
1517 | Restore HGRCPATH | |
1516 |
|
1518 | |||
1517 | $ HGRCPATH=$ORGHGRCPATH |
|
1519 | $ HGRCPATH=$ORGHGRCPATH | |
1518 | $ export HGRCPATH |
|
1520 | $ export HGRCPATH | |
1519 |
|
1521 | |||
1520 | Commands handling multiple repositories at a time should invoke only |
|
1522 | Commands handling multiple repositories at a time should invoke only | |
1521 | "reposetup()" of extensions enabling in the target repository. |
|
1523 | "reposetup()" of extensions enabling in the target repository. | |
1522 |
|
1524 | |||
1523 | $ mkdir reposetup-test |
|
1525 | $ mkdir reposetup-test | |
1524 | $ cd reposetup-test |
|
1526 | $ cd reposetup-test | |
1525 |
|
1527 | |||
1526 | $ cat > $TESTTMP/reposetuptest.py <<EOF |
|
1528 | $ cat > $TESTTMP/reposetuptest.py <<EOF | |
1527 | > from mercurial import extensions |
|
1529 | > from mercurial import extensions | |
1528 | > def reposetup(ui, repo): |
|
1530 | > def reposetup(ui, repo): | |
1529 | > ui.write(b'reposetup() for %s\n' % (repo.root)) |
|
1531 | > ui.write(b'reposetup() for %s\n' % (repo.root)) | |
1530 | > ui.flush() |
|
1532 | > ui.flush() | |
1531 | > EOF |
|
1533 | > EOF | |
1532 | $ hg init src |
|
1534 | $ hg init src | |
1533 | $ echo a > src/a |
|
1535 | $ echo a > src/a | |
1534 | $ hg -R src commit -Am '#0 at src/a' |
|
1536 | $ hg -R src commit -Am '#0 at src/a' | |
1535 | adding a |
|
1537 | adding a | |
1536 | $ echo '[extensions]' >> src/.hg/hgrc |
|
1538 | $ echo '[extensions]' >> src/.hg/hgrc | |
1537 | $ echo '# enable extension locally' >> src/.hg/hgrc |
|
1539 | $ echo '# enable extension locally' >> src/.hg/hgrc | |
1538 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc |
|
1540 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc | |
1539 | $ hg -R src status |
|
1541 | $ hg -R src status | |
1540 | reposetup() for $TESTTMP/reposetup-test/src |
|
1542 | reposetup() for $TESTTMP/reposetup-test/src | |
1541 | reposetup() for $TESTTMP/reposetup-test/src (chg !) |
|
1543 | reposetup() for $TESTTMP/reposetup-test/src (chg !) | |
1542 |
|
1544 | |||
1543 | #if no-extraextensions |
|
1545 | #if no-extraextensions | |
1544 | $ hg --cwd src debugextensions |
|
1546 | $ hg --cwd src debugextensions | |
1545 | reposetup() for $TESTTMP/reposetup-test/src |
|
1547 | reposetup() for $TESTTMP/reposetup-test/src | |
1546 | dodo (untested!) |
|
1548 | dodo (untested!) | |
1547 | dudu (untested!) |
|
1549 | dudu (untested!) | |
1548 | mq |
|
1550 | mq | |
1549 | reposetuptest (untested!) |
|
1551 | reposetuptest (untested!) | |
1550 | strip |
|
1552 | strip | |
1551 | #endif |
|
1553 | #endif | |
1552 |
|
1554 | |||
1553 | $ hg clone -U src clone-dst1 |
|
1555 | $ hg clone -U src clone-dst1 | |
1554 | reposetup() for $TESTTMP/reposetup-test/src |
|
1556 | reposetup() for $TESTTMP/reposetup-test/src | |
1555 | $ hg init push-dst1 |
|
1557 | $ hg init push-dst1 | |
1556 | $ hg -q -R src push push-dst1 |
|
1558 | $ hg -q -R src push push-dst1 | |
1557 | reposetup() for $TESTTMP/reposetup-test/src |
|
1559 | reposetup() for $TESTTMP/reposetup-test/src | |
1558 | $ hg init pull-src1 |
|
1560 | $ hg init pull-src1 | |
1559 | $ hg -q -R pull-src1 pull src |
|
1561 | $ hg -q -R pull-src1 pull src | |
1560 | reposetup() for $TESTTMP/reposetup-test/src |
|
1562 | reposetup() for $TESTTMP/reposetup-test/src | |
1561 |
|
1563 | |||
1562 | $ cat <<EOF >> $HGRCPATH |
|
1564 | $ cat <<EOF >> $HGRCPATH | |
1563 | > [extensions] |
|
1565 | > [extensions] | |
1564 | > # disable extension globally and explicitly |
|
1566 | > # disable extension globally and explicitly | |
1565 | > reposetuptest = ! |
|
1567 | > reposetuptest = ! | |
1566 | > EOF |
|
1568 | > EOF | |
1567 | $ hg clone -U src clone-dst2 |
|
1569 | $ hg clone -U src clone-dst2 | |
1568 | reposetup() for $TESTTMP/reposetup-test/src |
|
1570 | reposetup() for $TESTTMP/reposetup-test/src | |
1569 | $ hg init push-dst2 |
|
1571 | $ hg init push-dst2 | |
1570 | $ hg -q -R src push push-dst2 |
|
1572 | $ hg -q -R src push push-dst2 | |
1571 | reposetup() for $TESTTMP/reposetup-test/src |
|
1573 | reposetup() for $TESTTMP/reposetup-test/src | |
1572 | $ hg init pull-src2 |
|
1574 | $ hg init pull-src2 | |
1573 | $ hg -q -R pull-src2 pull src |
|
1575 | $ hg -q -R pull-src2 pull src | |
1574 | reposetup() for $TESTTMP/reposetup-test/src |
|
1576 | reposetup() for $TESTTMP/reposetup-test/src | |
1575 |
|
1577 | |||
1576 | $ cat <<EOF >> $HGRCPATH |
|
1578 | $ cat <<EOF >> $HGRCPATH | |
1577 | > [extensions] |
|
1579 | > [extensions] | |
1578 | > # enable extension globally |
|
1580 | > # enable extension globally | |
1579 | > reposetuptest = $TESTTMP/reposetuptest.py |
|
1581 | > reposetuptest = $TESTTMP/reposetuptest.py | |
1580 | > EOF |
|
1582 | > EOF | |
1581 | $ hg clone -U src clone-dst3 |
|
1583 | $ hg clone -U src clone-dst3 | |
1582 | reposetup() for $TESTTMP/reposetup-test/src |
|
1584 | reposetup() for $TESTTMP/reposetup-test/src | |
1583 | reposetup() for $TESTTMP/reposetup-test/clone-dst3 |
|
1585 | reposetup() for $TESTTMP/reposetup-test/clone-dst3 | |
1584 | $ hg init push-dst3 |
|
1586 | $ hg init push-dst3 | |
1585 | reposetup() for $TESTTMP/reposetup-test/push-dst3 |
|
1587 | reposetup() for $TESTTMP/reposetup-test/push-dst3 | |
1586 | $ hg -q -R src push push-dst3 |
|
1588 | $ hg -q -R src push push-dst3 | |
1587 | reposetup() for $TESTTMP/reposetup-test/src |
|
1589 | reposetup() for $TESTTMP/reposetup-test/src | |
1588 | reposetup() for $TESTTMP/reposetup-test/push-dst3 |
|
1590 | reposetup() for $TESTTMP/reposetup-test/push-dst3 | |
1589 | $ hg init pull-src3 |
|
1591 | $ hg init pull-src3 | |
1590 | reposetup() for $TESTTMP/reposetup-test/pull-src3 |
|
1592 | reposetup() for $TESTTMP/reposetup-test/pull-src3 | |
1591 | $ hg -q -R pull-src3 pull src |
|
1593 | $ hg -q -R pull-src3 pull src | |
1592 | reposetup() for $TESTTMP/reposetup-test/pull-src3 |
|
1594 | reposetup() for $TESTTMP/reposetup-test/pull-src3 | |
1593 | reposetup() for $TESTTMP/reposetup-test/src |
|
1595 | reposetup() for $TESTTMP/reposetup-test/src | |
1594 |
|
1596 | |||
1595 | $ echo '[extensions]' >> src/.hg/hgrc |
|
1597 | $ echo '[extensions]' >> src/.hg/hgrc | |
1596 | $ echo '# disable extension locally' >> src/.hg/hgrc |
|
1598 | $ echo '# disable extension locally' >> src/.hg/hgrc | |
1597 | $ echo 'reposetuptest = !' >> src/.hg/hgrc |
|
1599 | $ echo 'reposetuptest = !' >> src/.hg/hgrc | |
1598 | $ hg clone -U src clone-dst4 |
|
1600 | $ hg clone -U src clone-dst4 | |
1599 | reposetup() for $TESTTMP/reposetup-test/clone-dst4 |
|
1601 | reposetup() for $TESTTMP/reposetup-test/clone-dst4 | |
1600 | $ hg init push-dst4 |
|
1602 | $ hg init push-dst4 | |
1601 | reposetup() for $TESTTMP/reposetup-test/push-dst4 |
|
1603 | reposetup() for $TESTTMP/reposetup-test/push-dst4 | |
1602 | $ hg -q -R src push push-dst4 |
|
1604 | $ hg -q -R src push push-dst4 | |
1603 | reposetup() for $TESTTMP/reposetup-test/push-dst4 |
|
1605 | reposetup() for $TESTTMP/reposetup-test/push-dst4 | |
1604 | $ hg init pull-src4 |
|
1606 | $ hg init pull-src4 | |
1605 | reposetup() for $TESTTMP/reposetup-test/pull-src4 |
|
1607 | reposetup() for $TESTTMP/reposetup-test/pull-src4 | |
1606 | $ hg -q -R pull-src4 pull src |
|
1608 | $ hg -q -R pull-src4 pull src | |
1607 | reposetup() for $TESTTMP/reposetup-test/pull-src4 |
|
1609 | reposetup() for $TESTTMP/reposetup-test/pull-src4 | |
1608 |
|
1610 | |||
1609 | disabling in command line overlays with all configuration |
|
1611 | disabling in command line overlays with all configuration | |
1610 | $ hg --config extensions.reposetuptest=! clone -U src clone-dst5 |
|
1612 | $ hg --config extensions.reposetuptest=! clone -U src clone-dst5 | |
1611 | $ hg --config extensions.reposetuptest=! init push-dst5 |
|
1613 | $ hg --config extensions.reposetuptest=! init push-dst5 | |
1612 | $ hg --config extensions.reposetuptest=! -q -R src push push-dst5 |
|
1614 | $ hg --config extensions.reposetuptest=! -q -R src push push-dst5 | |
1613 | $ hg --config extensions.reposetuptest=! init pull-src5 |
|
1615 | $ hg --config extensions.reposetuptest=! init pull-src5 | |
1614 | $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src |
|
1616 | $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src | |
1615 |
|
1617 | |||
1616 | $ cat <<EOF >> $HGRCPATH |
|
1618 | $ cat <<EOF >> $HGRCPATH | |
1617 | > [extensions] |
|
1619 | > [extensions] | |
1618 | > # disable extension globally and explicitly |
|
1620 | > # disable extension globally and explicitly | |
1619 | > reposetuptest = ! |
|
1621 | > reposetuptest = ! | |
1620 | > EOF |
|
1622 | > EOF | |
1621 | $ hg init parent |
|
1623 | $ hg init parent | |
1622 | $ hg init parent/sub1 |
|
1624 | $ hg init parent/sub1 | |
1623 | $ echo 1 > parent/sub1/1 |
|
1625 | $ echo 1 > parent/sub1/1 | |
1624 | $ hg -R parent/sub1 commit -Am '#0 at parent/sub1' |
|
1626 | $ hg -R parent/sub1 commit -Am '#0 at parent/sub1' | |
1625 | adding 1 |
|
1627 | adding 1 | |
1626 | $ hg init parent/sub2 |
|
1628 | $ hg init parent/sub2 | |
1627 | $ hg init parent/sub2/sub21 |
|
1629 | $ hg init parent/sub2/sub21 | |
1628 | $ echo 21 > parent/sub2/sub21/21 |
|
1630 | $ echo 21 > parent/sub2/sub21/21 | |
1629 | $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21' |
|
1631 | $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21' | |
1630 | adding 21 |
|
1632 | adding 21 | |
1631 | $ cat > parent/sub2/.hgsub <<EOF |
|
1633 | $ cat > parent/sub2/.hgsub <<EOF | |
1632 | > sub21 = sub21 |
|
1634 | > sub21 = sub21 | |
1633 | > EOF |
|
1635 | > EOF | |
1634 | $ hg -R parent/sub2 commit -Am '#0 at parent/sub2' |
|
1636 | $ hg -R parent/sub2 commit -Am '#0 at parent/sub2' | |
1635 | adding .hgsub |
|
1637 | adding .hgsub | |
1636 | $ hg init parent/sub3 |
|
1638 | $ hg init parent/sub3 | |
1637 | $ echo 3 > parent/sub3/3 |
|
1639 | $ echo 3 > parent/sub3/3 | |
1638 | $ hg -R parent/sub3 commit -Am '#0 at parent/sub3' |
|
1640 | $ hg -R parent/sub3 commit -Am '#0 at parent/sub3' | |
1639 | adding 3 |
|
1641 | adding 3 | |
1640 | $ cat > parent/.hgsub <<EOF |
|
1642 | $ cat > parent/.hgsub <<EOF | |
1641 | > sub1 = sub1 |
|
1643 | > sub1 = sub1 | |
1642 | > sub2 = sub2 |
|
1644 | > sub2 = sub2 | |
1643 | > sub3 = sub3 |
|
1645 | > sub3 = sub3 | |
1644 | > EOF |
|
1646 | > EOF | |
1645 | $ hg -R parent commit -Am '#0 at parent' |
|
1647 | $ hg -R parent commit -Am '#0 at parent' | |
1646 | adding .hgsub |
|
1648 | adding .hgsub | |
1647 | $ echo '[extensions]' >> parent/.hg/hgrc |
|
1649 | $ echo '[extensions]' >> parent/.hg/hgrc | |
1648 | $ echo '# enable extension locally' >> parent/.hg/hgrc |
|
1650 | $ echo '# enable extension locally' >> parent/.hg/hgrc | |
1649 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc |
|
1651 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc | |
1650 | $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc |
|
1652 | $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc | |
1651 | $ hg -R parent status -S -A |
|
1653 | $ hg -R parent status -S -A | |
1652 | reposetup() for $TESTTMP/reposetup-test/parent |
|
1654 | reposetup() for $TESTTMP/reposetup-test/parent | |
1653 | reposetup() for $TESTTMP/reposetup-test/parent/sub2 |
|
1655 | reposetup() for $TESTTMP/reposetup-test/parent/sub2 | |
1654 | C .hgsub |
|
1656 | C .hgsub | |
1655 | C .hgsubstate |
|
1657 | C .hgsubstate | |
1656 | C sub1/1 |
|
1658 | C sub1/1 | |
1657 | C sub2/.hgsub |
|
1659 | C sub2/.hgsub | |
1658 | C sub2/.hgsubstate |
|
1660 | C sub2/.hgsubstate | |
1659 | C sub2/sub21/21 |
|
1661 | C sub2/sub21/21 | |
1660 | C sub3/3 |
|
1662 | C sub3/3 | |
1661 |
|
1663 | |||
1662 | $ cd .. |
|
1664 | $ cd .. | |
1663 |
|
1665 | |||
1664 | Prohibit registration of commands that don't use @command (issue5137) |
|
1666 | Prohibit registration of commands that don't use @command (issue5137) | |
1665 |
|
1667 | |||
1666 | $ hg init deprecated |
|
1668 | $ hg init deprecated | |
1667 | $ cd deprecated |
|
1669 | $ cd deprecated | |
1668 |
|
1670 | |||
1669 | $ cat <<EOF > deprecatedcmd.py |
|
1671 | $ cat <<EOF > deprecatedcmd.py | |
1670 | > def deprecatedcmd(repo, ui): |
|
1672 | > def deprecatedcmd(repo, ui): | |
1671 | > pass |
|
1673 | > pass | |
1672 | > cmdtable = { |
|
1674 | > cmdtable = { | |
1673 | > b'deprecatedcmd': (deprecatedcmd, [], b''), |
|
1675 | > b'deprecatedcmd': (deprecatedcmd, [], b''), | |
1674 | > } |
|
1676 | > } | |
1675 | > EOF |
|
1677 | > EOF | |
1676 | $ cat <<EOF > .hg/hgrc |
|
1678 | $ cat <<EOF > .hg/hgrc | |
1677 | > [extensions] |
|
1679 | > [extensions] | |
1678 | > deprecatedcmd = `pwd`/deprecatedcmd.py |
|
1680 | > deprecatedcmd = `pwd`/deprecatedcmd.py | |
1679 | > mq = ! |
|
1681 | > mq = ! | |
1680 | > hgext.mq = ! |
|
1682 | > hgext.mq = ! | |
1681 | > hgext/mq = ! |
|
1683 | > hgext/mq = ! | |
1682 | > EOF |
|
1684 | > EOF | |
1683 |
|
1685 | |||
1684 | $ hg deprecatedcmd > /dev/null |
|
1686 | $ hg deprecatedcmd > /dev/null | |
1685 | *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo |
|
1687 | *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo | |
1686 | *** (use @command decorator to register 'deprecatedcmd') |
|
1688 | *** (use @command decorator to register 'deprecatedcmd') | |
1687 | hg: unknown command 'deprecatedcmd' |
|
1689 | hg: unknown command 'deprecatedcmd' | |
1688 | (use 'hg help' for a list of commands) |
|
1690 | (use 'hg help' for a list of commands) | |
1689 | [255] |
|
1691 | [255] | |
1690 |
|
1692 | |||
1691 | the extension shouldn't be loaded at all so the mq works: |
|
1693 | the extension shouldn't be loaded at all so the mq works: | |
1692 |
|
1694 | |||
1693 | $ hg qseries --config extensions.mq= > /dev/null |
|
1695 | $ hg qseries --config extensions.mq= > /dev/null | |
1694 | *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo |
|
1696 | *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo | |
1695 | *** (use @command decorator to register 'deprecatedcmd') |
|
1697 | *** (use @command decorator to register 'deprecatedcmd') | |
1696 |
|
1698 | |||
1697 | $ cd .. |
|
1699 | $ cd .. | |
1698 |
|
1700 | |||
1699 | Test synopsis and docstring extending |
|
1701 | Test synopsis and docstring extending | |
1700 |
|
1702 | |||
1701 | $ hg init exthelp |
|
1703 | $ hg init exthelp | |
1702 | $ cat > exthelp.py <<EOF |
|
1704 | $ cat > exthelp.py <<EOF | |
1703 | > from mercurial import commands, extensions |
|
1705 | > from mercurial import commands, extensions | |
1704 | > def exbookmarks(orig, *args, **opts): |
|
1706 | > def exbookmarks(orig, *args, **opts): | |
1705 | > return orig(*args, **opts) |
|
1707 | > return orig(*args, **opts) | |
1706 | > def uisetup(ui): |
|
1708 | > def uisetup(ui): | |
1707 | > synopsis = b' GREPME [--foo] [-x]' |
|
1709 | > synopsis = b' GREPME [--foo] [-x]' | |
1708 | > docstring = ''' |
|
1710 | > docstring = ''' | |
1709 | > GREPME make sure that this is in the help! |
|
1711 | > GREPME make sure that this is in the help! | |
1710 | > ''' |
|
1712 | > ''' | |
1711 | > extensions.wrapcommand(commands.table, b'bookmarks', exbookmarks, |
|
1713 | > extensions.wrapcommand(commands.table, b'bookmarks', exbookmarks, | |
1712 | > synopsis, docstring) |
|
1714 | > synopsis, docstring) | |
1713 | > EOF |
|
1715 | > EOF | |
1714 | $ abspath=`pwd`/exthelp.py |
|
1716 | $ abspath=`pwd`/exthelp.py | |
1715 | $ echo '[extensions]' >> $HGRCPATH |
|
1717 | $ echo '[extensions]' >> $HGRCPATH | |
1716 | $ echo "exthelp = $abspath" >> $HGRCPATH |
|
1718 | $ echo "exthelp = $abspath" >> $HGRCPATH | |
1717 | $ cd exthelp |
|
1719 | $ cd exthelp | |
1718 | $ hg help bookmarks | grep GREPME |
|
1720 | $ hg help bookmarks | grep GREPME | |
1719 | hg bookmarks [OPTIONS]... [NAME]... GREPME [--foo] [-x] |
|
1721 | hg bookmarks [OPTIONS]... [NAME]... GREPME [--foo] [-x] | |
1720 | GREPME make sure that this is in the help! |
|
1722 | GREPME make sure that this is in the help! | |
1721 | $ cd .. |
|
1723 | $ cd .. | |
1722 |
|
1724 | |||
1723 | Show deprecation warning for the use of cmdutil.command |
|
1725 | Show deprecation warning for the use of cmdutil.command | |
1724 |
|
1726 | |||
1725 | $ cat > nonregistrar.py <<EOF |
|
1727 | $ cat > nonregistrar.py <<EOF | |
1726 | > from mercurial import cmdutil |
|
1728 | > from mercurial import cmdutil | |
1727 | > cmdtable = {} |
|
1729 | > cmdtable = {} | |
1728 | > command = cmdutil.command(cmdtable) |
|
1730 | > command = cmdutil.command(cmdtable) | |
1729 | > @command(b'foo', [], norepo=True) |
|
1731 | > @command(b'foo', [], norepo=True) | |
1730 | > def foo(ui): |
|
1732 | > def foo(ui): | |
1731 | > pass |
|
1733 | > pass | |
1732 | > EOF |
|
1734 | > EOF | |
1733 |
|
1735 | |||
1734 | Prohibit the use of unicode strings as the default value of options |
|
1736 | Prohibit the use of unicode strings as the default value of options | |
1735 |
|
1737 | |||
1736 | $ hg init $TESTTMP/opt-unicode-default |
|
1738 | $ hg init $TESTTMP/opt-unicode-default | |
1737 |
|
1739 | |||
1738 | $ cat > $TESTTMP/test_unicode_default_value.py << EOF |
|
1740 | $ cat > $TESTTMP/test_unicode_default_value.py << EOF | |
1739 | > from mercurial import registrar |
|
1741 | > from mercurial import registrar | |
1740 | > cmdtable = {} |
|
1742 | > cmdtable = {} | |
1741 | > command = registrar.command(cmdtable) |
|
1743 | > command = registrar.command(cmdtable) | |
1742 | > @command(b'dummy', [(b'', b'opt', u'value', u'help')], 'ext [OPTIONS]') |
|
1744 | > @command(b'dummy', [(b'', b'opt', u'value', u'help')], 'ext [OPTIONS]') | |
1743 | > def ext(*args, **opts): |
|
1745 | > def ext(*args, **opts): | |
1744 | > print(opts[b'opt']) |
|
1746 | > print(opts[b'opt']) | |
1745 | > EOF |
|
1747 | > EOF | |
1746 | $ cat > $TESTTMP/opt-unicode-default/.hg/hgrc << EOF |
|
1748 | $ cat > $TESTTMP/opt-unicode-default/.hg/hgrc << EOF | |
1747 | > [extensions] |
|
1749 | > [extensions] | |
1748 | > test_unicode_default_value = $TESTTMP/test_unicode_default_value.py |
|
1750 | > test_unicode_default_value = $TESTTMP/test_unicode_default_value.py | |
1749 | > EOF |
|
1751 | > EOF | |
1750 | $ hg -R $TESTTMP/opt-unicode-default dummy |
|
1752 | $ hg -R $TESTTMP/opt-unicode-default dummy | |
1751 | *** failed to import extension test_unicode_default_value from $TESTTMP/test_unicode_default_value.py: unicode u'value' found in cmdtable.dummy |
|
1753 | *** failed to import extension test_unicode_default_value from $TESTTMP/test_unicode_default_value.py: unicode u'value' found in cmdtable.dummy | |
1752 | *** (use b'' to make it byte string) |
|
1754 | *** (use b'' to make it byte string) | |
1753 | hg: unknown command 'dummy' |
|
1755 | hg: unknown command 'dummy' | |
1754 | (did you mean summary?) |
|
1756 | (did you mean summary?) | |
1755 | [255] |
|
1757 | [255] |
@@ -1,3628 +1,3630 | |||||
1 | Short help: |
|
1 | Short help: | |
2 |
|
2 | |||
3 | $ hg |
|
3 | $ hg | |
4 | Mercurial Distributed SCM |
|
4 | Mercurial Distributed SCM | |
5 |
|
5 | |||
6 | basic commands: |
|
6 | basic commands: | |
7 |
|
7 | |||
8 | add add the specified files on the next commit |
|
8 | add add the specified files on the next commit | |
9 | annotate show changeset information by line for each file |
|
9 | annotate show changeset information by line for each file | |
10 | clone make a copy of an existing repository |
|
10 | clone make a copy of an existing repository | |
11 | commit commit the specified files or all outstanding changes |
|
11 | commit commit the specified files or all outstanding changes | |
12 | diff diff repository (or selected files) |
|
12 | diff diff repository (or selected files) | |
13 | export dump the header and diffs for one or more changesets |
|
13 | export dump the header and diffs for one or more changesets | |
14 | forget forget the specified files on the next commit |
|
14 | forget forget the specified files on the next commit | |
15 | init create a new repository in the given directory |
|
15 | init create a new repository in the given directory | |
16 | log show revision history of entire repository or files |
|
16 | log show revision history of entire repository or files | |
17 | merge merge another revision into working directory |
|
17 | merge merge another revision into working directory | |
18 | pull pull changes from the specified source |
|
18 | pull pull changes from the specified source | |
19 | push push changes to the specified destination |
|
19 | push push changes to the specified destination | |
20 | remove remove the specified files on the next commit |
|
20 | remove remove the specified files on the next commit | |
21 | serve start stand-alone webserver |
|
21 | serve start stand-alone webserver | |
22 | status show changed files in the working directory |
|
22 | status show changed files in the working directory | |
23 | summary summarize working directory state |
|
23 | summary summarize working directory state | |
24 | update update working directory (or switch revisions) |
|
24 | update update working directory (or switch revisions) | |
25 |
|
25 | |||
26 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
26 | (use 'hg help' for the full list of commands or 'hg -v' for details) | |
27 |
|
27 | |||
28 | $ hg -q |
|
28 | $ hg -q | |
29 | add add the specified files on the next commit |
|
29 | add add the specified files on the next commit | |
30 | annotate show changeset information by line for each file |
|
30 | annotate show changeset information by line for each file | |
31 | clone make a copy of an existing repository |
|
31 | clone make a copy of an existing repository | |
32 | commit commit the specified files or all outstanding changes |
|
32 | commit commit the specified files or all outstanding changes | |
33 | diff diff repository (or selected files) |
|
33 | diff diff repository (or selected files) | |
34 | export dump the header and diffs for one or more changesets |
|
34 | export dump the header and diffs for one or more changesets | |
35 | forget forget the specified files on the next commit |
|
35 | forget forget the specified files on the next commit | |
36 | init create a new repository in the given directory |
|
36 | init create a new repository in the given directory | |
37 | log show revision history of entire repository or files |
|
37 | log show revision history of entire repository or files | |
38 | merge merge another revision into working directory |
|
38 | merge merge another revision into working directory | |
39 | pull pull changes from the specified source |
|
39 | pull pull changes from the specified source | |
40 | push push changes to the specified destination |
|
40 | push push changes to the specified destination | |
41 | remove remove the specified files on the next commit |
|
41 | remove remove the specified files on the next commit | |
42 | serve start stand-alone webserver |
|
42 | serve start stand-alone webserver | |
43 | status show changed files in the working directory |
|
43 | status show changed files in the working directory | |
44 | summary summarize working directory state |
|
44 | summary summarize working directory state | |
45 | update update working directory (or switch revisions) |
|
45 | update update working directory (or switch revisions) | |
46 |
|
46 | |||
47 | Extra extensions will be printed in help output in a non-reliable order since |
|
47 | Extra extensions will be printed in help output in a non-reliable order since | |
48 | the extension is unknown. |
|
48 | the extension is unknown. | |
49 | #if no-extraextensions |
|
49 | #if no-extraextensions | |
50 |
|
50 | |||
51 | $ hg help |
|
51 | $ hg help | |
52 | Mercurial Distributed SCM |
|
52 | Mercurial Distributed SCM | |
53 |
|
53 | |||
54 | list of commands: |
|
54 | list of commands: | |
55 |
|
55 | |||
56 | add add the specified files on the next commit |
|
56 | add add the specified files on the next commit | |
57 | addremove add all new files, delete all missing files |
|
57 | addremove add all new files, delete all missing files | |
58 | annotate show changeset information by line for each file |
|
58 | annotate show changeset information by line for each file | |
59 | archive create an unversioned archive of a repository revision |
|
59 | archive create an unversioned archive of a repository revision | |
60 | backout reverse effect of earlier changeset |
|
60 | backout reverse effect of earlier changeset | |
61 | bisect subdivision search of changesets |
|
61 | bisect subdivision search of changesets | |
62 | bookmarks create a new bookmark or list existing bookmarks |
|
62 | bookmarks create a new bookmark or list existing bookmarks | |
63 | branch set or show the current branch name |
|
63 | branch set or show the current branch name | |
64 | branches list repository named branches |
|
64 | branches list repository named branches | |
65 | bundle create a bundle file |
|
65 | bundle create a bundle file | |
66 | cat output the current or given revision of files |
|
66 | cat output the current or given revision of files | |
67 | clone make a copy of an existing repository |
|
67 | clone make a copy of an existing repository | |
68 | commit commit the specified files or all outstanding changes |
|
68 | commit commit the specified files or all outstanding changes | |
69 | config show combined config settings from all hgrc files |
|
69 | config show combined config settings from all hgrc files | |
70 | copy mark files as copied for the next commit |
|
70 | copy mark files as copied for the next commit | |
71 | diff diff repository (or selected files) |
|
71 | diff diff repository (or selected files) | |
72 | export dump the header and diffs for one or more changesets |
|
72 | export dump the header and diffs for one or more changesets | |
73 | files list tracked files |
|
73 | files list tracked files | |
74 | forget forget the specified files on the next commit |
|
74 | forget forget the specified files on the next commit | |
75 | graft copy changes from other branches onto the current branch |
|
75 | graft copy changes from other branches onto the current branch | |
76 | grep search revision history for a pattern in specified files |
|
76 | grep search revision history for a pattern in specified files | |
77 | heads show branch heads |
|
77 | heads show branch heads | |
78 | help show help for a given topic or a help overview |
|
78 | help show help for a given topic or a help overview | |
79 | identify identify the working directory or specified revision |
|
79 | identify identify the working directory or specified revision | |
80 | import import an ordered set of patches |
|
80 | import import an ordered set of patches | |
81 | incoming show new changesets found in source |
|
81 | incoming show new changesets found in source | |
82 | init create a new repository in the given directory |
|
82 | init create a new repository in the given directory | |
83 | log show revision history of entire repository or files |
|
83 | log show revision history of entire repository or files | |
84 | manifest output the current or given revision of the project manifest |
|
84 | manifest output the current or given revision of the project manifest | |
85 | merge merge another revision into working directory |
|
85 | merge merge another revision into working directory | |
86 | outgoing show changesets not found in the destination |
|
86 | outgoing show changesets not found in the destination | |
87 | paths show aliases for remote repositories |
|
87 | paths show aliases for remote repositories | |
88 | phase set or show the current phase name |
|
88 | phase set or show the current phase name | |
89 | pull pull changes from the specified source |
|
89 | pull pull changes from the specified source | |
90 | push push changes to the specified destination |
|
90 | push push changes to the specified destination | |
91 | recover roll back an interrupted transaction |
|
91 | recover roll back an interrupted transaction | |
92 | remove remove the specified files on the next commit |
|
92 | remove remove the specified files on the next commit | |
93 | rename rename files; equivalent of copy + remove |
|
93 | rename rename files; equivalent of copy + remove | |
94 | resolve redo merges or set/view the merge status of files |
|
94 | resolve redo merges or set/view the merge status of files | |
95 | revert restore files to their checkout state |
|
95 | revert restore files to their checkout state | |
96 | root print the root (top) of the current working directory |
|
96 | root print the root (top) of the current working directory | |
97 | serve start stand-alone webserver |
|
97 | serve start stand-alone webserver | |
98 | status show changed files in the working directory |
|
98 | status show changed files in the working directory | |
99 | summary summarize working directory state |
|
99 | summary summarize working directory state | |
100 | tag add one or more tags for the current or given revision |
|
100 | tag add one or more tags for the current or given revision | |
101 | tags list repository tags |
|
101 | tags list repository tags | |
102 | unbundle apply one or more bundle files |
|
102 | unbundle apply one or more bundle files | |
103 | update update working directory (or switch revisions) |
|
103 | update update working directory (or switch revisions) | |
104 | verify verify the integrity of the repository |
|
104 | verify verify the integrity of the repository | |
105 | version output version and copyright information |
|
105 | version output version and copyright information | |
106 |
|
106 | |||
107 | additional help topics: |
|
107 | additional help topics: | |
108 |
|
108 | |||
109 | bundlespec Bundle File Formats |
|
109 | bundlespec Bundle File Formats | |
110 | color Colorizing Outputs |
|
110 | color Colorizing Outputs | |
111 | config Configuration Files |
|
111 | config Configuration Files | |
112 | dates Date Formats |
|
112 | dates Date Formats | |
113 | deprecated Deprecated Features |
|
113 | deprecated Deprecated Features | |
114 | diffs Diff Formats |
|
114 | diffs Diff Formats | |
115 | environment Environment Variables |
|
115 | environment Environment Variables | |
116 | extensions Using Additional Features |
|
116 | extensions Using Additional Features | |
117 | filesets Specifying File Sets |
|
117 | filesets Specifying File Sets | |
118 | flags Command-line flags |
|
118 | flags Command-line flags | |
119 | glossary Glossary |
|
119 | glossary Glossary | |
120 | hgignore Syntax for Mercurial Ignore Files |
|
120 | hgignore Syntax for Mercurial Ignore Files | |
121 | hgweb Configuring hgweb |
|
121 | hgweb Configuring hgweb | |
122 | internals Technical implementation topics |
|
122 | internals Technical implementation topics | |
123 | merge-tools Merge Tools |
|
123 | merge-tools Merge Tools | |
124 | pager Pager Support |
|
124 | pager Pager Support | |
125 | patterns File Name Patterns |
|
125 | patterns File Name Patterns | |
126 | phases Working with Phases |
|
126 | phases Working with Phases | |
127 | revisions Specifying Revisions |
|
127 | revisions Specifying Revisions | |
128 | scripting Using Mercurial from scripts and automation |
|
128 | scripting Using Mercurial from scripts and automation | |
129 | subrepos Subrepositories |
|
129 | subrepos Subrepositories | |
130 | templating Template Usage |
|
130 | templating Template Usage | |
131 | urls URL Paths |
|
131 | urls URL Paths | |
132 |
|
132 | |||
133 | (use 'hg help -v' to show built-in aliases and global options) |
|
133 | (use 'hg help -v' to show built-in aliases and global options) | |
134 |
|
134 | |||
135 | $ hg -q help |
|
135 | $ hg -q help | |
136 | add add the specified files on the next commit |
|
136 | add add the specified files on the next commit | |
137 | addremove add all new files, delete all missing files |
|
137 | addremove add all new files, delete all missing files | |
138 | annotate show changeset information by line for each file |
|
138 | annotate show changeset information by line for each file | |
139 | archive create an unversioned archive of a repository revision |
|
139 | archive create an unversioned archive of a repository revision | |
140 | backout reverse effect of earlier changeset |
|
140 | backout reverse effect of earlier changeset | |
141 | bisect subdivision search of changesets |
|
141 | bisect subdivision search of changesets | |
142 | bookmarks create a new bookmark or list existing bookmarks |
|
142 | bookmarks create a new bookmark or list existing bookmarks | |
143 | branch set or show the current branch name |
|
143 | branch set or show the current branch name | |
144 | branches list repository named branches |
|
144 | branches list repository named branches | |
145 | bundle create a bundle file |
|
145 | bundle create a bundle file | |
146 | cat output the current or given revision of files |
|
146 | cat output the current or given revision of files | |
147 | clone make a copy of an existing repository |
|
147 | clone make a copy of an existing repository | |
148 | commit commit the specified files or all outstanding changes |
|
148 | commit commit the specified files or all outstanding changes | |
149 | config show combined config settings from all hgrc files |
|
149 | config show combined config settings from all hgrc files | |
150 | copy mark files as copied for the next commit |
|
150 | copy mark files as copied for the next commit | |
151 | diff diff repository (or selected files) |
|
151 | diff diff repository (or selected files) | |
152 | export dump the header and diffs for one or more changesets |
|
152 | export dump the header and diffs for one or more changesets | |
153 | files list tracked files |
|
153 | files list tracked files | |
154 | forget forget the specified files on the next commit |
|
154 | forget forget the specified files on the next commit | |
155 | graft copy changes from other branches onto the current branch |
|
155 | graft copy changes from other branches onto the current branch | |
156 | grep search revision history for a pattern in specified files |
|
156 | grep search revision history for a pattern in specified files | |
157 | heads show branch heads |
|
157 | heads show branch heads | |
158 | help show help for a given topic or a help overview |
|
158 | help show help for a given topic or a help overview | |
159 | identify identify the working directory or specified revision |
|
159 | identify identify the working directory or specified revision | |
160 | import import an ordered set of patches |
|
160 | import import an ordered set of patches | |
161 | incoming show new changesets found in source |
|
161 | incoming show new changesets found in source | |
162 | init create a new repository in the given directory |
|
162 | init create a new repository in the given directory | |
163 | log show revision history of entire repository or files |
|
163 | log show revision history of entire repository or files | |
164 | manifest output the current or given revision of the project manifest |
|
164 | manifest output the current or given revision of the project manifest | |
165 | merge merge another revision into working directory |
|
165 | merge merge another revision into working directory | |
166 | outgoing show changesets not found in the destination |
|
166 | outgoing show changesets not found in the destination | |
167 | paths show aliases for remote repositories |
|
167 | paths show aliases for remote repositories | |
168 | phase set or show the current phase name |
|
168 | phase set or show the current phase name | |
169 | pull pull changes from the specified source |
|
169 | pull pull changes from the specified source | |
170 | push push changes to the specified destination |
|
170 | push push changes to the specified destination | |
171 | recover roll back an interrupted transaction |
|
171 | recover roll back an interrupted transaction | |
172 | remove remove the specified files on the next commit |
|
172 | remove remove the specified files on the next commit | |
173 | rename rename files; equivalent of copy + remove |
|
173 | rename rename files; equivalent of copy + remove | |
174 | resolve redo merges or set/view the merge status of files |
|
174 | resolve redo merges or set/view the merge status of files | |
175 | revert restore files to their checkout state |
|
175 | revert restore files to their checkout state | |
176 | root print the root (top) of the current working directory |
|
176 | root print the root (top) of the current working directory | |
177 | serve start stand-alone webserver |
|
177 | serve start stand-alone webserver | |
178 | status show changed files in the working directory |
|
178 | status show changed files in the working directory | |
179 | summary summarize working directory state |
|
179 | summary summarize working directory state | |
180 | tag add one or more tags for the current or given revision |
|
180 | tag add one or more tags for the current or given revision | |
181 | tags list repository tags |
|
181 | tags list repository tags | |
182 | unbundle apply one or more bundle files |
|
182 | unbundle apply one or more bundle files | |
183 | update update working directory (or switch revisions) |
|
183 | update update working directory (or switch revisions) | |
184 | verify verify the integrity of the repository |
|
184 | verify verify the integrity of the repository | |
185 | version output version and copyright information |
|
185 | version output version and copyright information | |
186 |
|
186 | |||
187 | additional help topics: |
|
187 | additional help topics: | |
188 |
|
188 | |||
189 | bundlespec Bundle File Formats |
|
189 | bundlespec Bundle File Formats | |
190 | color Colorizing Outputs |
|
190 | color Colorizing Outputs | |
191 | config Configuration Files |
|
191 | config Configuration Files | |
192 | dates Date Formats |
|
192 | dates Date Formats | |
193 | deprecated Deprecated Features |
|
193 | deprecated Deprecated Features | |
194 | diffs Diff Formats |
|
194 | diffs Diff Formats | |
195 | environment Environment Variables |
|
195 | environment Environment Variables | |
196 | extensions Using Additional Features |
|
196 | extensions Using Additional Features | |
197 | filesets Specifying File Sets |
|
197 | filesets Specifying File Sets | |
198 | flags Command-line flags |
|
198 | flags Command-line flags | |
199 | glossary Glossary |
|
199 | glossary Glossary | |
200 | hgignore Syntax for Mercurial Ignore Files |
|
200 | hgignore Syntax for Mercurial Ignore Files | |
201 | hgweb Configuring hgweb |
|
201 | hgweb Configuring hgweb | |
202 | internals Technical implementation topics |
|
202 | internals Technical implementation topics | |
203 | merge-tools Merge Tools |
|
203 | merge-tools Merge Tools | |
204 | pager Pager Support |
|
204 | pager Pager Support | |
205 | patterns File Name Patterns |
|
205 | patterns File Name Patterns | |
206 | phases Working with Phases |
|
206 | phases Working with Phases | |
207 | revisions Specifying Revisions |
|
207 | revisions Specifying Revisions | |
208 | scripting Using Mercurial from scripts and automation |
|
208 | scripting Using Mercurial from scripts and automation | |
209 | subrepos Subrepositories |
|
209 | subrepos Subrepositories | |
210 | templating Template Usage |
|
210 | templating Template Usage | |
211 | urls URL Paths |
|
211 | urls URL Paths | |
212 |
|
212 | |||
213 | Test extension help: |
|
213 | Test extension help: | |
214 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
214 | $ hg help extensions --config extensions.rebase= --config extensions.children= | |
215 | Using Additional Features |
|
215 | Using Additional Features | |
216 | """"""""""""""""""""""""" |
|
216 | """"""""""""""""""""""""" | |
217 |
|
217 | |||
218 | Mercurial has the ability to add new features through the use of |
|
218 | Mercurial has the ability to add new features through the use of | |
219 | extensions. Extensions may add new commands, add options to existing |
|
219 | extensions. Extensions may add new commands, add options to existing | |
220 | commands, change the default behavior of commands, or implement hooks. |
|
220 | commands, change the default behavior of commands, or implement hooks. | |
221 |
|
221 | |||
222 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
222 | To enable the "foo" extension, either shipped with Mercurial or in the | |
223 | Python search path, create an entry for it in your configuration file, |
|
223 | Python search path, create an entry for it in your configuration file, | |
224 | like this: |
|
224 | like this: | |
225 |
|
225 | |||
226 | [extensions] |
|
226 | [extensions] | |
227 | foo = |
|
227 | foo = | |
228 |
|
228 | |||
229 | You may also specify the full path to an extension: |
|
229 | You may also specify the full path to an extension: | |
230 |
|
230 | |||
231 | [extensions] |
|
231 | [extensions] | |
232 | myfeature = ~/.hgext/myfeature.py |
|
232 | myfeature = ~/.hgext/myfeature.py | |
233 |
|
233 | |||
234 | See 'hg help config' for more information on configuration files. |
|
234 | See 'hg help config' for more information on configuration files. | |
235 |
|
235 | |||
236 | Extensions are not loaded by default for a variety of reasons: they can |
|
236 | Extensions are not loaded by default for a variety of reasons: they can | |
237 | increase startup overhead; they may be meant for advanced usage only; they |
|
237 | increase startup overhead; they may be meant for advanced usage only; they | |
238 | may provide potentially dangerous abilities (such as letting you destroy |
|
238 | may provide potentially dangerous abilities (such as letting you destroy | |
239 | or modify history); they might not be ready for prime time; or they may |
|
239 | or modify history); they might not be ready for prime time; or they may | |
240 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
240 | alter some usual behaviors of stock Mercurial. It is thus up to the user | |
241 | to activate extensions as needed. |
|
241 | to activate extensions as needed. | |
242 |
|
242 | |||
243 | To explicitly disable an extension enabled in a configuration file of |
|
243 | To explicitly disable an extension enabled in a configuration file of | |
244 | broader scope, prepend its path with !: |
|
244 | broader scope, prepend its path with !: | |
245 |
|
245 | |||
246 | [extensions] |
|
246 | [extensions] | |
247 | # disabling extension bar residing in /path/to/extension/bar.py |
|
247 | # disabling extension bar residing in /path/to/extension/bar.py | |
248 | bar = !/path/to/extension/bar.py |
|
248 | bar = !/path/to/extension/bar.py | |
249 | # ditto, but no path was supplied for extension baz |
|
249 | # ditto, but no path was supplied for extension baz | |
250 | baz = ! |
|
250 | baz = ! | |
251 |
|
251 | |||
252 | enabled extensions: |
|
252 | enabled extensions: | |
253 |
|
253 | |||
254 | children command to display child changesets (DEPRECATED) |
|
254 | children command to display child changesets (DEPRECATED) | |
255 | rebase command to move sets of revisions to a different ancestor |
|
255 | rebase command to move sets of revisions to a different ancestor | |
256 |
|
256 | |||
257 | disabled extensions: |
|
257 | disabled extensions: | |
258 |
|
258 | |||
259 | acl hooks for controlling repository access |
|
259 | acl hooks for controlling repository access | |
260 | blackbox log repository events to a blackbox for debugging |
|
260 | blackbox log repository events to a blackbox for debugging | |
261 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
261 | bugzilla hooks for integrating with the Bugzilla bug tracker | |
262 | censor erase file content at a given revision |
|
262 | censor erase file content at a given revision | |
263 | churn command to display statistics about repository history |
|
263 | churn command to display statistics about repository history | |
264 | clonebundles advertise pre-generated bundles to seed clones |
|
264 | clonebundles advertise pre-generated bundles to seed clones | |
265 | convert import revisions from foreign VCS repositories into |
|
265 | convert import revisions from foreign VCS repositories into | |
266 | Mercurial |
|
266 | Mercurial | |
267 | eol automatically manage newlines in repository files |
|
267 | eol automatically manage newlines in repository files | |
268 | extdiff command to allow external programs to compare revisions |
|
268 | extdiff command to allow external programs to compare revisions | |
269 | factotum http authentication with factotum |
|
269 | factotum http authentication with factotum | |
270 | githelp try mapping git commands to Mercurial commands |
|
270 | githelp try mapping git commands to Mercurial commands | |
271 | gpg commands to sign and verify changesets |
|
271 | gpg commands to sign and verify changesets | |
272 | hgk browse the repository in a graphical way |
|
272 | hgk browse the repository in a graphical way | |
273 | highlight syntax highlighting for hgweb (requires Pygments) |
|
273 | highlight syntax highlighting for hgweb (requires Pygments) | |
274 | histedit interactive history editing |
|
274 | histedit interactive history editing | |
275 | keyword expand keywords in tracked files |
|
275 | keyword expand keywords in tracked files | |
276 | largefiles track large binary files |
|
276 | largefiles track large binary files | |
277 | mq manage a stack of patches |
|
277 | mq manage a stack of patches | |
278 | notify hooks for sending email push notifications |
|
278 | notify hooks for sending email push notifications | |
279 | patchbomb command to send changesets as (a series of) patch emails |
|
279 | patchbomb command to send changesets as (a series of) patch emails | |
280 | purge command to delete untracked files from the working |
|
280 | purge command to delete untracked files from the working | |
281 | directory |
|
281 | directory | |
282 | relink recreates hardlinks between repository clones |
|
282 | relink recreates hardlinks between repository clones | |
283 | schemes extend schemes with shortcuts to repository swarms |
|
283 | schemes extend schemes with shortcuts to repository swarms | |
284 | share share a common history between several working directories |
|
284 | share share a common history between several working directories | |
285 | shelve save and restore changes to the working directory |
|
285 | shelve save and restore changes to the working directory | |
286 | strip strip changesets and their descendants from history |
|
286 | strip strip changesets and their descendants from history | |
287 | transplant command to transplant changesets from another branch |
|
287 | transplant command to transplant changesets from another branch | |
288 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
288 | win32mbcs allow the use of MBCS paths with problematic encodings | |
289 | zeroconf discover and advertise repositories on the local network |
|
289 | zeroconf discover and advertise repositories on the local network | |
290 |
|
290 | |||
291 | #endif |
|
291 | #endif | |
292 |
|
292 | |||
293 | Verify that deprecated extensions are included if --verbose: |
|
293 | Verify that deprecated extensions are included if --verbose: | |
294 |
|
294 | |||
295 | $ hg -v help extensions | grep children |
|
295 | $ hg -v help extensions | grep children | |
296 | children command to display child changesets (DEPRECATED) |
|
296 | children command to display child changesets (DEPRECATED) | |
297 |
|
297 | |||
298 | Verify that extension keywords appear in help templates |
|
298 | Verify that extension keywords appear in help templates | |
299 |
|
299 | |||
300 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null |
|
300 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null | |
301 |
|
301 | |||
302 | Test short command list with verbose option |
|
302 | Test short command list with verbose option | |
303 |
|
303 | |||
304 | $ hg -v help shortlist |
|
304 | $ hg -v help shortlist | |
305 | Mercurial Distributed SCM |
|
305 | Mercurial Distributed SCM | |
306 |
|
306 | |||
307 | basic commands: |
|
307 | basic commands: | |
308 |
|
308 | |||
309 | add add the specified files on the next commit |
|
309 | add add the specified files on the next commit | |
310 | annotate, blame |
|
310 | annotate, blame | |
311 | show changeset information by line for each file |
|
311 | show changeset information by line for each file | |
312 | clone make a copy of an existing repository |
|
312 | clone make a copy of an existing repository | |
313 | commit, ci commit the specified files or all outstanding changes |
|
313 | commit, ci commit the specified files or all outstanding changes | |
314 | diff diff repository (or selected files) |
|
314 | diff diff repository (or selected files) | |
315 | export dump the header and diffs for one or more changesets |
|
315 | export dump the header and diffs for one or more changesets | |
316 | forget forget the specified files on the next commit |
|
316 | forget forget the specified files on the next commit | |
317 | init create a new repository in the given directory |
|
317 | init create a new repository in the given directory | |
318 | log, history show revision history of entire repository or files |
|
318 | log, history show revision history of entire repository or files | |
319 | merge merge another revision into working directory |
|
319 | merge merge another revision into working directory | |
320 | pull pull changes from the specified source |
|
320 | pull pull changes from the specified source | |
321 | push push changes to the specified destination |
|
321 | push push changes to the specified destination | |
322 | remove, rm remove the specified files on the next commit |
|
322 | remove, rm remove the specified files on the next commit | |
323 | serve start stand-alone webserver |
|
323 | serve start stand-alone webserver | |
324 | status, st show changed files in the working directory |
|
324 | status, st show changed files in the working directory | |
325 | summary, sum summarize working directory state |
|
325 | summary, sum summarize working directory state | |
326 | update, up, checkout, co |
|
326 | update, up, checkout, co | |
327 | update working directory (or switch revisions) |
|
327 | update working directory (or switch revisions) | |
328 |
|
328 | |||
329 | global options ([+] can be repeated): |
|
329 | global options ([+] can be repeated): | |
330 |
|
330 | |||
331 | -R --repository REPO repository root directory or name of overlay bundle |
|
331 | -R --repository REPO repository root directory or name of overlay bundle | |
332 | file |
|
332 | file | |
333 | --cwd DIR change working directory |
|
333 | --cwd DIR change working directory | |
334 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
334 | -y --noninteractive do not prompt, automatically pick the first choice for | |
335 | all prompts |
|
335 | all prompts | |
336 | -q --quiet suppress output |
|
336 | -q --quiet suppress output | |
337 | -v --verbose enable additional output |
|
337 | -v --verbose enable additional output | |
338 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
338 | --color TYPE when to colorize (boolean, always, auto, never, or | |
339 | debug) |
|
339 | debug) | |
340 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
340 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
341 | --debug enable debugging output |
|
341 | --debug enable debugging output | |
342 | --debugger start debugger |
|
342 | --debugger start debugger | |
343 | --encoding ENCODE set the charset encoding (default: ascii) |
|
343 | --encoding ENCODE set the charset encoding (default: ascii) | |
344 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
344 | --encodingmode MODE set the charset encoding mode (default: strict) | |
345 | --traceback always print a traceback on exception |
|
345 | --traceback always print a traceback on exception | |
346 | --time time how long the command takes |
|
346 | --time time how long the command takes | |
347 | --profile print command execution profile |
|
347 | --profile print command execution profile | |
348 | --version output version information and exit |
|
348 | --version output version information and exit | |
349 | -h --help display help and exit |
|
349 | -h --help display help and exit | |
350 | --hidden consider hidden changesets |
|
350 | --hidden consider hidden changesets | |
351 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
351 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
352 | (default: auto) |
|
352 | (default: auto) | |
353 |
|
353 | |||
354 | (use 'hg help' for the full list of commands) |
|
354 | (use 'hg help' for the full list of commands) | |
355 |
|
355 | |||
356 | $ hg add -h |
|
356 | $ hg add -h | |
357 | hg add [OPTION]... [FILE]... |
|
357 | hg add [OPTION]... [FILE]... | |
358 |
|
358 | |||
359 | add the specified files on the next commit |
|
359 | add the specified files on the next commit | |
360 |
|
360 | |||
361 | Schedule files to be version controlled and added to the repository. |
|
361 | Schedule files to be version controlled and added to the repository. | |
362 |
|
362 | |||
363 | The files will be added to the repository at the next commit. To undo an |
|
363 | The files will be added to the repository at the next commit. To undo an | |
364 | add before that, see 'hg forget'. |
|
364 | add before that, see 'hg forget'. | |
365 |
|
365 | |||
366 | If no names are given, add all files to the repository (except files |
|
366 | If no names are given, add all files to the repository (except files | |
367 | matching ".hgignore"). |
|
367 | matching ".hgignore"). | |
368 |
|
368 | |||
369 | Returns 0 if all files are successfully added. |
|
369 | Returns 0 if all files are successfully added. | |
370 |
|
370 | |||
371 | options ([+] can be repeated): |
|
371 | options ([+] can be repeated): | |
372 |
|
372 | |||
373 | -I --include PATTERN [+] include names matching the given patterns |
|
373 | -I --include PATTERN [+] include names matching the given patterns | |
374 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
374 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
375 | -S --subrepos recurse into subrepositories |
|
375 | -S --subrepos recurse into subrepositories | |
376 | -n --dry-run do not perform actions, just print output |
|
376 | -n --dry-run do not perform actions, just print output | |
377 |
|
377 | |||
378 | (some details hidden, use --verbose to show complete help) |
|
378 | (some details hidden, use --verbose to show complete help) | |
379 |
|
379 | |||
380 | Verbose help for add |
|
380 | Verbose help for add | |
381 |
|
381 | |||
382 | $ hg add -hv |
|
382 | $ hg add -hv | |
383 | hg add [OPTION]... [FILE]... |
|
383 | hg add [OPTION]... [FILE]... | |
384 |
|
384 | |||
385 | add the specified files on the next commit |
|
385 | add the specified files on the next commit | |
386 |
|
386 | |||
387 | Schedule files to be version controlled and added to the repository. |
|
387 | Schedule files to be version controlled and added to the repository. | |
388 |
|
388 | |||
389 | The files will be added to the repository at the next commit. To undo an |
|
389 | The files will be added to the repository at the next commit. To undo an | |
390 | add before that, see 'hg forget'. |
|
390 | add before that, see 'hg forget'. | |
391 |
|
391 | |||
392 | If no names are given, add all files to the repository (except files |
|
392 | If no names are given, add all files to the repository (except files | |
393 | matching ".hgignore"). |
|
393 | matching ".hgignore"). | |
394 |
|
394 | |||
395 | Examples: |
|
395 | Examples: | |
396 |
|
396 | |||
397 | - New (unknown) files are added automatically by 'hg add': |
|
397 | - New (unknown) files are added automatically by 'hg add': | |
398 |
|
398 | |||
399 | $ ls |
|
399 | $ ls | |
400 | foo.c |
|
400 | foo.c | |
401 | $ hg status |
|
401 | $ hg status | |
402 | ? foo.c |
|
402 | ? foo.c | |
403 | $ hg add |
|
403 | $ hg add | |
404 | adding foo.c |
|
404 | adding foo.c | |
405 | $ hg status |
|
405 | $ hg status | |
406 | A foo.c |
|
406 | A foo.c | |
407 |
|
407 | |||
408 | - Specific files to be added can be specified: |
|
408 | - Specific files to be added can be specified: | |
409 |
|
409 | |||
410 | $ ls |
|
410 | $ ls | |
411 | bar.c foo.c |
|
411 | bar.c foo.c | |
412 | $ hg status |
|
412 | $ hg status | |
413 | ? bar.c |
|
413 | ? bar.c | |
414 | ? foo.c |
|
414 | ? foo.c | |
415 | $ hg add bar.c |
|
415 | $ hg add bar.c | |
416 | $ hg status |
|
416 | $ hg status | |
417 | A bar.c |
|
417 | A bar.c | |
418 | ? foo.c |
|
418 | ? foo.c | |
419 |
|
419 | |||
420 | Returns 0 if all files are successfully added. |
|
420 | Returns 0 if all files are successfully added. | |
421 |
|
421 | |||
422 | options ([+] can be repeated): |
|
422 | options ([+] can be repeated): | |
423 |
|
423 | |||
424 | -I --include PATTERN [+] include names matching the given patterns |
|
424 | -I --include PATTERN [+] include names matching the given patterns | |
425 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
425 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
426 | -S --subrepos recurse into subrepositories |
|
426 | -S --subrepos recurse into subrepositories | |
427 | -n --dry-run do not perform actions, just print output |
|
427 | -n --dry-run do not perform actions, just print output | |
428 |
|
428 | |||
429 | global options ([+] can be repeated): |
|
429 | global options ([+] can be repeated): | |
430 |
|
430 | |||
431 | -R --repository REPO repository root directory or name of overlay bundle |
|
431 | -R --repository REPO repository root directory or name of overlay bundle | |
432 | file |
|
432 | file | |
433 | --cwd DIR change working directory |
|
433 | --cwd DIR change working directory | |
434 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
434 | -y --noninteractive do not prompt, automatically pick the first choice for | |
435 | all prompts |
|
435 | all prompts | |
436 | -q --quiet suppress output |
|
436 | -q --quiet suppress output | |
437 | -v --verbose enable additional output |
|
437 | -v --verbose enable additional output | |
438 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
438 | --color TYPE when to colorize (boolean, always, auto, never, or | |
439 | debug) |
|
439 | debug) | |
440 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
440 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
441 | --debug enable debugging output |
|
441 | --debug enable debugging output | |
442 | --debugger start debugger |
|
442 | --debugger start debugger | |
443 | --encoding ENCODE set the charset encoding (default: ascii) |
|
443 | --encoding ENCODE set the charset encoding (default: ascii) | |
444 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
444 | --encodingmode MODE set the charset encoding mode (default: strict) | |
445 | --traceback always print a traceback on exception |
|
445 | --traceback always print a traceback on exception | |
446 | --time time how long the command takes |
|
446 | --time time how long the command takes | |
447 | --profile print command execution profile |
|
447 | --profile print command execution profile | |
448 | --version output version information and exit |
|
448 | --version output version information and exit | |
449 | -h --help display help and exit |
|
449 | -h --help display help and exit | |
450 | --hidden consider hidden changesets |
|
450 | --hidden consider hidden changesets | |
451 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
451 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
452 | (default: auto) |
|
452 | (default: auto) | |
453 |
|
453 | |||
454 | Test the textwidth config option |
|
454 | Test the textwidth config option | |
455 |
|
455 | |||
456 | $ hg root -h --config ui.textwidth=50 |
|
456 | $ hg root -h --config ui.textwidth=50 | |
457 | hg root |
|
457 | hg root | |
458 |
|
458 | |||
459 | print the root (top) of the current working |
|
459 | print the root (top) of the current working | |
460 | directory |
|
460 | directory | |
461 |
|
461 | |||
462 | Print the root directory of the current |
|
462 | Print the root directory of the current | |
463 | repository. |
|
463 | repository. | |
464 |
|
464 | |||
465 | Returns 0 on success. |
|
465 | Returns 0 on success. | |
466 |
|
466 | |||
467 | (some details hidden, use --verbose to show |
|
467 | (some details hidden, use --verbose to show | |
468 | complete help) |
|
468 | complete help) | |
469 |
|
469 | |||
470 | Test help option with version option |
|
470 | Test help option with version option | |
471 |
|
471 | |||
472 | $ hg add -h --version |
|
472 | $ hg add -h --version | |
473 | Mercurial Distributed SCM (version *) (glob) |
|
473 | Mercurial Distributed SCM (version *) (glob) | |
474 | (see https://mercurial-scm.org for more information) |
|
474 | (see https://mercurial-scm.org for more information) | |
475 |
|
475 | |||
476 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
476 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
477 | This is free software; see the source for copying conditions. There is NO |
|
477 | This is free software; see the source for copying conditions. There is NO | |
478 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
478 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
479 |
|
479 | |||
480 | $ hg add --skjdfks |
|
480 | $ hg add --skjdfks | |
481 | hg add: option --skjdfks not recognized |
|
481 | hg add: option --skjdfks not recognized | |
482 | hg add [OPTION]... [FILE]... |
|
482 | hg add [OPTION]... [FILE]... | |
483 |
|
483 | |||
484 | add the specified files on the next commit |
|
484 | add the specified files on the next commit | |
485 |
|
485 | |||
486 | options ([+] can be repeated): |
|
486 | options ([+] can be repeated): | |
487 |
|
487 | |||
488 | -I --include PATTERN [+] include names matching the given patterns |
|
488 | -I --include PATTERN [+] include names matching the given patterns | |
489 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
489 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
490 | -S --subrepos recurse into subrepositories |
|
490 | -S --subrepos recurse into subrepositories | |
491 | -n --dry-run do not perform actions, just print output |
|
491 | -n --dry-run do not perform actions, just print output | |
492 |
|
492 | |||
493 | (use 'hg add -h' to show more help) |
|
493 | (use 'hg add -h' to show more help) | |
494 | [255] |
|
494 | [255] | |
495 |
|
495 | |||
496 | Test ambiguous command help |
|
496 | Test ambiguous command help | |
497 |
|
497 | |||
498 | $ hg help ad |
|
498 | $ hg help ad | |
499 | list of commands: |
|
499 | list of commands: | |
500 |
|
500 | |||
501 | add add the specified files on the next commit |
|
501 | add add the specified files on the next commit | |
502 | addremove add all new files, delete all missing files |
|
502 | addremove add all new files, delete all missing files | |
503 |
|
503 | |||
504 | (use 'hg help -v ad' to show built-in aliases and global options) |
|
504 | (use 'hg help -v ad' to show built-in aliases and global options) | |
505 |
|
505 | |||
506 | Test command without options |
|
506 | Test command without options | |
507 |
|
507 | |||
508 | $ hg help verify |
|
508 | $ hg help verify | |
509 | hg verify |
|
509 | hg verify | |
510 |
|
510 | |||
511 | verify the integrity of the repository |
|
511 | verify the integrity of the repository | |
512 |
|
512 | |||
513 | Verify the integrity of the current repository. |
|
513 | Verify the integrity of the current repository. | |
514 |
|
514 | |||
515 | This will perform an extensive check of the repository's integrity, |
|
515 | This will perform an extensive check of the repository's integrity, | |
516 | validating the hashes and checksums of each entry in the changelog, |
|
516 | validating the hashes and checksums of each entry in the changelog, | |
517 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
517 | manifest, and tracked files, as well as the integrity of their crosslinks | |
518 | and indices. |
|
518 | and indices. | |
519 |
|
519 | |||
520 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more |
|
520 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more | |
521 | information about recovery from corruption of the repository. |
|
521 | information about recovery from corruption of the repository. | |
522 |
|
522 | |||
523 | Returns 0 on success, 1 if errors are encountered. |
|
523 | Returns 0 on success, 1 if errors are encountered. | |
524 |
|
524 | |||
525 | (some details hidden, use --verbose to show complete help) |
|
525 | (some details hidden, use --verbose to show complete help) | |
526 |
|
526 | |||
527 | $ hg help diff |
|
527 | $ hg help diff | |
528 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
528 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
529 |
|
529 | |||
530 | diff repository (or selected files) |
|
530 | diff repository (or selected files) | |
531 |
|
531 | |||
532 | Show differences between revisions for the specified files. |
|
532 | Show differences between revisions for the specified files. | |
533 |
|
533 | |||
534 | Differences between files are shown using the unified diff format. |
|
534 | Differences between files are shown using the unified diff format. | |
535 |
|
535 | |||
536 | Note: |
|
536 | Note: | |
537 | 'hg diff' may generate unexpected results for merges, as it will |
|
537 | 'hg diff' may generate unexpected results for merges, as it will | |
538 | default to comparing against the working directory's first parent |
|
538 | default to comparing against the working directory's first parent | |
539 | changeset if no revisions are specified. |
|
539 | changeset if no revisions are specified. | |
540 |
|
540 | |||
541 | When two revision arguments are given, then changes are shown between |
|
541 | When two revision arguments are given, then changes are shown between | |
542 | those revisions. If only one revision is specified then that revision is |
|
542 | those revisions. If only one revision is specified then that revision is | |
543 | compared to the working directory, and, when no revisions are specified, |
|
543 | compared to the working directory, and, when no revisions are specified, | |
544 | the working directory files are compared to its first parent. |
|
544 | the working directory files are compared to its first parent. | |
545 |
|
545 | |||
546 | Alternatively you can specify -c/--change with a revision to see the |
|
546 | Alternatively you can specify -c/--change with a revision to see the | |
547 | changes in that changeset relative to its first parent. |
|
547 | changes in that changeset relative to its first parent. | |
548 |
|
548 | |||
549 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
549 | Without the -a/--text option, diff will avoid generating diffs of files it | |
550 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
550 | detects as binary. With -a, diff will generate a diff anyway, probably | |
551 | with undesirable results. |
|
551 | with undesirable results. | |
552 |
|
552 | |||
553 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
553 | Use the -g/--git option to generate diffs in the git extended diff format. | |
554 | For more information, read 'hg help diffs'. |
|
554 | For more information, read 'hg help diffs'. | |
555 |
|
555 | |||
556 | Returns 0 on success. |
|
556 | Returns 0 on success. | |
557 |
|
557 | |||
558 | options ([+] can be repeated): |
|
558 | options ([+] can be repeated): | |
559 |
|
559 | |||
560 | -r --rev REV [+] revision |
|
560 | -r --rev REV [+] revision | |
561 | -c --change REV change made by revision |
|
561 | -c --change REV change made by revision | |
562 | -a --text treat all files as text |
|
562 | -a --text treat all files as text | |
563 | -g --git use git extended diff format |
|
563 | -g --git use git extended diff format | |
564 | --binary generate binary diffs in git mode (default) |
|
564 | --binary generate binary diffs in git mode (default) | |
565 | --nodates omit dates from diff headers |
|
565 | --nodates omit dates from diff headers | |
566 | --noprefix omit a/ and b/ prefixes from filenames |
|
566 | --noprefix omit a/ and b/ prefixes from filenames | |
567 | -p --show-function show which function each change is in |
|
567 | -p --show-function show which function each change is in | |
568 | --reverse produce a diff that undoes the changes |
|
568 | --reverse produce a diff that undoes the changes | |
569 | -w --ignore-all-space ignore white space when comparing lines |
|
569 | -w --ignore-all-space ignore white space when comparing lines | |
570 | -b --ignore-space-change ignore changes in the amount of white space |
|
570 | -b --ignore-space-change ignore changes in the amount of white space | |
571 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
571 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
572 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL |
|
572 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL | |
573 | -U --unified NUM number of lines of context to show |
|
573 | -U --unified NUM number of lines of context to show | |
574 | --stat output diffstat-style summary of changes |
|
574 | --stat output diffstat-style summary of changes | |
575 | --root DIR produce diffs relative to subdirectory |
|
575 | --root DIR produce diffs relative to subdirectory | |
576 | -I --include PATTERN [+] include names matching the given patterns |
|
576 | -I --include PATTERN [+] include names matching the given patterns | |
577 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
577 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
578 | -S --subrepos recurse into subrepositories |
|
578 | -S --subrepos recurse into subrepositories | |
579 |
|
579 | |||
580 | (some details hidden, use --verbose to show complete help) |
|
580 | (some details hidden, use --verbose to show complete help) | |
581 |
|
581 | |||
582 | $ hg help status |
|
582 | $ hg help status | |
583 | hg status [OPTION]... [FILE]... |
|
583 | hg status [OPTION]... [FILE]... | |
584 |
|
584 | |||
585 | aliases: st |
|
585 | aliases: st | |
586 |
|
586 | |||
587 | show changed files in the working directory |
|
587 | show changed files in the working directory | |
588 |
|
588 | |||
589 | Show status of files in the repository. If names are given, only files |
|
589 | Show status of files in the repository. If names are given, only files | |
590 | that match are shown. Files that are clean or ignored or the source of a |
|
590 | that match are shown. Files that are clean or ignored or the source of a | |
591 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
591 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
592 | -C/--copies or -A/--all are given. Unless options described with "show |
|
592 | -C/--copies or -A/--all are given. Unless options described with "show | |
593 | only ..." are given, the options -mardu are used. |
|
593 | only ..." are given, the options -mardu are used. | |
594 |
|
594 | |||
595 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
595 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
596 | explicitly requested with -u/--unknown or -i/--ignored. |
|
596 | explicitly requested with -u/--unknown or -i/--ignored. | |
597 |
|
597 | |||
598 | Note: |
|
598 | Note: | |
599 | 'hg status' may appear to disagree with diff if permissions have |
|
599 | 'hg status' may appear to disagree with diff if permissions have | |
600 | changed or a merge has occurred. The standard diff format does not |
|
600 | changed or a merge has occurred. The standard diff format does not | |
601 | report permission changes and diff only reports changes relative to one |
|
601 | report permission changes and diff only reports changes relative to one | |
602 | merge parent. |
|
602 | merge parent. | |
603 |
|
603 | |||
604 | If one revision is given, it is used as the base revision. If two |
|
604 | If one revision is given, it is used as the base revision. If two | |
605 | revisions are given, the differences between them are shown. The --change |
|
605 | revisions are given, the differences between them are shown. The --change | |
606 | option can also be used as a shortcut to list the changed files of a |
|
606 | option can also be used as a shortcut to list the changed files of a | |
607 | revision from its first parent. |
|
607 | revision from its first parent. | |
608 |
|
608 | |||
609 | The codes used to show the status of files are: |
|
609 | The codes used to show the status of files are: | |
610 |
|
610 | |||
611 | M = modified |
|
611 | M = modified | |
612 | A = added |
|
612 | A = added | |
613 | R = removed |
|
613 | R = removed | |
614 | C = clean |
|
614 | C = clean | |
615 | ! = missing (deleted by non-hg command, but still tracked) |
|
615 | ! = missing (deleted by non-hg command, but still tracked) | |
616 | ? = not tracked |
|
616 | ? = not tracked | |
617 | I = ignored |
|
617 | I = ignored | |
618 | = origin of the previous file (with --copies) |
|
618 | = origin of the previous file (with --copies) | |
619 |
|
619 | |||
620 | Returns 0 on success. |
|
620 | Returns 0 on success. | |
621 |
|
621 | |||
622 | options ([+] can be repeated): |
|
622 | options ([+] can be repeated): | |
623 |
|
623 | |||
624 | -A --all show status of all files |
|
624 | -A --all show status of all files | |
625 | -m --modified show only modified files |
|
625 | -m --modified show only modified files | |
626 | -a --added show only added files |
|
626 | -a --added show only added files | |
627 | -r --removed show only removed files |
|
627 | -r --removed show only removed files | |
628 | -d --deleted show only deleted (but tracked) files |
|
628 | -d --deleted show only deleted (but tracked) files | |
629 | -c --clean show only files without changes |
|
629 | -c --clean show only files without changes | |
630 | -u --unknown show only unknown (not tracked) files |
|
630 | -u --unknown show only unknown (not tracked) files | |
631 | -i --ignored show only ignored files |
|
631 | -i --ignored show only ignored files | |
632 | -n --no-status hide status prefix |
|
632 | -n --no-status hide status prefix | |
633 | -C --copies show source of copied files |
|
633 | -C --copies show source of copied files | |
634 | -0 --print0 end filenames with NUL, for use with xargs |
|
634 | -0 --print0 end filenames with NUL, for use with xargs | |
635 | --rev REV [+] show difference from revision |
|
635 | --rev REV [+] show difference from revision | |
636 | --change REV list the changed files of a revision |
|
636 | --change REV list the changed files of a revision | |
637 | -I --include PATTERN [+] include names matching the given patterns |
|
637 | -I --include PATTERN [+] include names matching the given patterns | |
638 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
638 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
639 | -S --subrepos recurse into subrepositories |
|
639 | -S --subrepos recurse into subrepositories | |
640 |
|
640 | |||
641 | (some details hidden, use --verbose to show complete help) |
|
641 | (some details hidden, use --verbose to show complete help) | |
642 |
|
642 | |||
643 | $ hg -q help status |
|
643 | $ hg -q help status | |
644 | hg status [OPTION]... [FILE]... |
|
644 | hg status [OPTION]... [FILE]... | |
645 |
|
645 | |||
646 | show changed files in the working directory |
|
646 | show changed files in the working directory | |
647 |
|
647 | |||
648 | $ hg help foo |
|
648 | $ hg help foo | |
649 | abort: no such help topic: foo |
|
649 | abort: no such help topic: foo | |
650 | (try 'hg help --keyword foo') |
|
650 | (try 'hg help --keyword foo') | |
651 | [255] |
|
651 | [255] | |
652 |
|
652 | |||
653 | $ hg skjdfks |
|
653 | $ hg skjdfks | |
654 | hg: unknown command 'skjdfks' |
|
654 | hg: unknown command 'skjdfks' | |
655 | (use 'hg help' for a list of commands) |
|
655 | (use 'hg help' for a list of commands) | |
656 | [255] |
|
656 | [255] | |
657 |
|
657 | |||
658 | Typoed command gives suggestion |
|
658 | Typoed command gives suggestion | |
659 | $ hg puls |
|
659 | $ hg puls | |
660 | hg: unknown command 'puls' |
|
660 | hg: unknown command 'puls' | |
661 | (did you mean one of pull, push?) |
|
661 | (did you mean one of pull, push?) | |
662 | [255] |
|
662 | [255] | |
663 |
|
663 | |||
664 | Not enabled extension gets suggested |
|
664 | Not enabled extension gets suggested | |
665 |
|
665 | |||
666 | $ hg rebase |
|
666 | $ hg rebase | |
667 | hg: unknown command 'rebase' |
|
667 | hg: unknown command 'rebase' | |
668 | 'rebase' is provided by the following extension: |
|
668 | 'rebase' is provided by the following extension: | |
669 |
|
669 | |||
670 | rebase command to move sets of revisions to a different ancestor |
|
670 | rebase command to move sets of revisions to a different ancestor | |
671 |
|
671 | |||
672 | (use 'hg help extensions' for information on enabling extensions) |
|
672 | (use 'hg help extensions' for information on enabling extensions) | |
673 | [255] |
|
673 | [255] | |
674 |
|
674 | |||
675 | Disabled extension gets suggested |
|
675 | Disabled extension gets suggested | |
676 | $ hg --config extensions.rebase=! rebase |
|
676 | $ hg --config extensions.rebase=! rebase | |
677 | hg: unknown command 'rebase' |
|
677 | hg: unknown command 'rebase' | |
678 | 'rebase' is provided by the following extension: |
|
678 | 'rebase' is provided by the following extension: | |
679 |
|
679 | |||
680 | rebase command to move sets of revisions to a different ancestor |
|
680 | rebase command to move sets of revisions to a different ancestor | |
681 |
|
681 | |||
682 | (use 'hg help extensions' for information on enabling extensions) |
|
682 | (use 'hg help extensions' for information on enabling extensions) | |
683 | [255] |
|
683 | [255] | |
684 |
|
684 | |||
685 | Make sure that we don't run afoul of the help system thinking that |
|
685 | Make sure that we don't run afoul of the help system thinking that | |
686 | this is a section and erroring out weirdly. |
|
686 | this is a section and erroring out weirdly. | |
687 |
|
687 | |||
688 | $ hg .log |
|
688 | $ hg .log | |
689 | hg: unknown command '.log' |
|
689 | hg: unknown command '.log' | |
690 | (did you mean log?) |
|
690 | (did you mean log?) | |
691 | [255] |
|
691 | [255] | |
692 |
|
692 | |||
693 | $ hg log. |
|
693 | $ hg log. | |
694 | hg: unknown command 'log.' |
|
694 | hg: unknown command 'log.' | |
695 | (did you mean log?) |
|
695 | (did you mean log?) | |
696 | [255] |
|
696 | [255] | |
697 | $ hg pu.lh |
|
697 | $ hg pu.lh | |
698 | hg: unknown command 'pu.lh' |
|
698 | hg: unknown command 'pu.lh' | |
699 | (did you mean one of pull, push?) |
|
699 | (did you mean one of pull, push?) | |
700 | [255] |
|
700 | [255] | |
701 |
|
701 | |||
702 | $ cat > helpext.py <<EOF |
|
702 | $ cat > helpext.py <<EOF | |
703 | > import os |
|
703 | > import os | |
704 | > from mercurial import commands, fancyopts, registrar |
|
704 | > from mercurial import commands, fancyopts, registrar | |
705 | > |
|
705 | > | |
706 | > def func(arg): |
|
706 | > def func(arg): | |
707 | > return '%sfoo' % arg |
|
707 | > return '%sfoo' % arg | |
708 | > class customopt(fancyopts.customopt): |
|
708 | > class customopt(fancyopts.customopt): | |
709 | > def newstate(self, oldstate, newparam, abort): |
|
709 | > def newstate(self, oldstate, newparam, abort): | |
710 | > return '%sbar' % oldstate |
|
710 | > return '%sbar' % oldstate | |
711 | > cmdtable = {} |
|
711 | > cmdtable = {} | |
712 | > command = registrar.command(cmdtable) |
|
712 | > command = registrar.command(cmdtable) | |
713 | > |
|
713 | > | |
714 | > @command(b'nohelp', |
|
714 | > @command(b'nohelp', | |
715 | > [(b'', b'longdesc', 3, b'x'*67), |
|
715 | > [(b'', b'longdesc', 3, b'x'*67), | |
716 | > (b'n', b'', None, b'normal desc'), |
|
716 | > (b'n', b'', None, b'normal desc'), | |
717 | > (b'', b'newline', b'', b'line1\nline2'), |
|
717 | > (b'', b'newline', b'', b'line1\nline2'), | |
718 | > (b'', b'callableopt', func, b'adds foo'), |
|
718 | > (b'', b'callableopt', func, b'adds foo'), | |
719 | > (b'', b'customopt', customopt(''), b'adds bar'), |
|
719 | > (b'', b'customopt', customopt(''), b'adds bar'), | |
720 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], |
|
720 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], | |
721 | > b'hg nohelp', |
|
721 | > b'hg nohelp', | |
722 | > norepo=True) |
|
722 | > norepo=True) | |
723 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) |
|
723 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) | |
724 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) |
|
724 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) | |
725 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) |
|
725 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) | |
726 | > def nohelp(ui, *args, **kwargs): |
|
726 | > def nohelp(ui, *args, **kwargs): | |
727 | > pass |
|
727 | > pass | |
728 | > |
|
728 | > | |
729 | > def uisetup(ui): |
|
729 | > def uisetup(ui): | |
730 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') |
|
730 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') | |
731 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') |
|
731 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') | |
732 | > |
|
732 | > | |
733 | > EOF |
|
733 | > EOF | |
734 | $ echo '[extensions]' >> $HGRCPATH |
|
734 | $ echo '[extensions]' >> $HGRCPATH | |
735 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
735 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
736 |
|
736 | |||
737 | Test for aliases |
|
737 | Test for aliases | |
738 |
|
738 | |||
739 | $ hg help hgalias |
|
739 | $ hg help hgalias | |
740 | hg hgalias [--remote] |
|
740 | hg hgalias [--remote] | |
741 |
|
741 | |||
742 | alias for: hg summary |
|
742 | alias for: hg summary | |
743 |
|
743 | |||
744 | summarize working directory state |
|
744 | summarize working directory state | |
745 |
|
745 | |||
746 | This generates a brief summary of the working directory state, including |
|
746 | This generates a brief summary of the working directory state, including | |
747 | parents, branch, commit status, phase and available updates. |
|
747 | parents, branch, commit status, phase and available updates. | |
748 |
|
748 | |||
749 | With the --remote option, this will check the default paths for incoming |
|
749 | With the --remote option, this will check the default paths for incoming | |
750 | and outgoing changes. This can be time-consuming. |
|
750 | and outgoing changes. This can be time-consuming. | |
751 |
|
751 | |||
752 | Returns 0 on success. |
|
752 | Returns 0 on success. | |
753 |
|
753 | |||
754 | defined by: helpext |
|
754 | defined by: helpext | |
755 |
|
755 | |||
756 | options: |
|
756 | options: | |
757 |
|
757 | |||
758 | --remote check for push and pull |
|
758 | --remote check for push and pull | |
759 |
|
759 | |||
760 | (some details hidden, use --verbose to show complete help) |
|
760 | (some details hidden, use --verbose to show complete help) | |
761 |
|
761 | |||
762 | $ hg help shellalias |
|
762 | $ hg help shellalias | |
763 | hg shellalias |
|
763 | hg shellalias | |
764 |
|
764 | |||
765 | shell alias for: echo hi |
|
765 | shell alias for: echo hi | |
766 |
|
766 | |||
767 | (no help text available) |
|
767 | (no help text available) | |
768 |
|
768 | |||
769 | defined by: helpext |
|
769 | defined by: helpext | |
770 |
|
770 | |||
771 | (some details hidden, use --verbose to show complete help) |
|
771 | (some details hidden, use --verbose to show complete help) | |
772 |
|
772 | |||
773 | Test command with no help text |
|
773 | Test command with no help text | |
774 |
|
774 | |||
775 | $ hg help nohelp |
|
775 | $ hg help nohelp | |
776 | hg nohelp |
|
776 | hg nohelp | |
777 |
|
777 | |||
778 | (no help text available) |
|
778 | (no help text available) | |
779 |
|
779 | |||
780 | options: |
|
780 | options: | |
781 |
|
781 | |||
782 | --longdesc VALUE |
|
782 | --longdesc VALUE | |
783 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
783 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
784 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
784 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) | |
785 | -n -- normal desc |
|
785 | -n -- normal desc | |
786 | --newline VALUE line1 line2 |
|
786 | --newline VALUE line1 line2 | |
787 | --callableopt VALUE adds foo |
|
787 | --callableopt VALUE adds foo | |
788 | --customopt VALUE adds bar |
|
788 | --customopt VALUE adds bar | |
789 | --customopt-withdefault VALUE adds bar (default: foo) |
|
789 | --customopt-withdefault VALUE adds bar (default: foo) | |
790 |
|
790 | |||
791 | (some details hidden, use --verbose to show complete help) |
|
791 | (some details hidden, use --verbose to show complete help) | |
792 |
|
792 | |||
793 | $ hg help -k nohelp |
|
793 | $ hg help -k nohelp | |
794 | Commands: |
|
794 | Commands: | |
795 |
|
795 | |||
796 | nohelp hg nohelp |
|
796 | nohelp hg nohelp | |
797 |
|
797 | |||
798 | Extension Commands: |
|
798 | Extension Commands: | |
799 |
|
799 | |||
800 | nohelp (no help text available) |
|
800 | nohelp (no help text available) | |
801 |
|
801 | |||
802 | Test that default list of commands omits extension commands |
|
802 | Test that default list of commands omits extension commands | |
803 |
|
803 | |||
804 | #if no-extraextensions |
|
804 | #if no-extraextensions | |
805 |
|
805 | |||
806 | $ hg help |
|
806 | $ hg help | |
807 | Mercurial Distributed SCM |
|
807 | Mercurial Distributed SCM | |
808 |
|
808 | |||
809 | list of commands: |
|
809 | list of commands: | |
810 |
|
810 | |||
811 | add add the specified files on the next commit |
|
811 | add add the specified files on the next commit | |
812 | addremove add all new files, delete all missing files |
|
812 | addremove add all new files, delete all missing files | |
813 | annotate show changeset information by line for each file |
|
813 | annotate show changeset information by line for each file | |
814 | archive create an unversioned archive of a repository revision |
|
814 | archive create an unversioned archive of a repository revision | |
815 | backout reverse effect of earlier changeset |
|
815 | backout reverse effect of earlier changeset | |
816 | bisect subdivision search of changesets |
|
816 | bisect subdivision search of changesets | |
817 | bookmarks create a new bookmark or list existing bookmarks |
|
817 | bookmarks create a new bookmark or list existing bookmarks | |
818 | branch set or show the current branch name |
|
818 | branch set or show the current branch name | |
819 | branches list repository named branches |
|
819 | branches list repository named branches | |
820 | bundle create a bundle file |
|
820 | bundle create a bundle file | |
821 | cat output the current or given revision of files |
|
821 | cat output the current or given revision of files | |
822 | clone make a copy of an existing repository |
|
822 | clone make a copy of an existing repository | |
823 | commit commit the specified files or all outstanding changes |
|
823 | commit commit the specified files or all outstanding changes | |
824 | config show combined config settings from all hgrc files |
|
824 | config show combined config settings from all hgrc files | |
825 | copy mark files as copied for the next commit |
|
825 | copy mark files as copied for the next commit | |
826 | diff diff repository (or selected files) |
|
826 | diff diff repository (or selected files) | |
827 | export dump the header and diffs for one or more changesets |
|
827 | export dump the header and diffs for one or more changesets | |
828 | files list tracked files |
|
828 | files list tracked files | |
829 | forget forget the specified files on the next commit |
|
829 | forget forget the specified files on the next commit | |
830 | graft copy changes from other branches onto the current branch |
|
830 | graft copy changes from other branches onto the current branch | |
831 | grep search revision history for a pattern in specified files |
|
831 | grep search revision history for a pattern in specified files | |
832 | heads show branch heads |
|
832 | heads show branch heads | |
833 | help show help for a given topic or a help overview |
|
833 | help show help for a given topic or a help overview | |
834 | identify identify the working directory or specified revision |
|
834 | identify identify the working directory or specified revision | |
835 | import import an ordered set of patches |
|
835 | import import an ordered set of patches | |
836 | incoming show new changesets found in source |
|
836 | incoming show new changesets found in source | |
837 | init create a new repository in the given directory |
|
837 | init create a new repository in the given directory | |
838 | log show revision history of entire repository or files |
|
838 | log show revision history of entire repository or files | |
839 | manifest output the current or given revision of the project manifest |
|
839 | manifest output the current or given revision of the project manifest | |
840 | merge merge another revision into working directory |
|
840 | merge merge another revision into working directory | |
841 | outgoing show changesets not found in the destination |
|
841 | outgoing show changesets not found in the destination | |
842 | paths show aliases for remote repositories |
|
842 | paths show aliases for remote repositories | |
843 | phase set or show the current phase name |
|
843 | phase set or show the current phase name | |
844 | pull pull changes from the specified source |
|
844 | pull pull changes from the specified source | |
845 | push push changes to the specified destination |
|
845 | push push changes to the specified destination | |
846 | recover roll back an interrupted transaction |
|
846 | recover roll back an interrupted transaction | |
847 | remove remove the specified files on the next commit |
|
847 | remove remove the specified files on the next commit | |
848 | rename rename files; equivalent of copy + remove |
|
848 | rename rename files; equivalent of copy + remove | |
849 | resolve redo merges or set/view the merge status of files |
|
849 | resolve redo merges or set/view the merge status of files | |
850 | revert restore files to their checkout state |
|
850 | revert restore files to their checkout state | |
851 | root print the root (top) of the current working directory |
|
851 | root print the root (top) of the current working directory | |
852 | serve start stand-alone webserver |
|
852 | serve start stand-alone webserver | |
853 | status show changed files in the working directory |
|
853 | status show changed files in the working directory | |
854 | summary summarize working directory state |
|
854 | summary summarize working directory state | |
855 | tag add one or more tags for the current or given revision |
|
855 | tag add one or more tags for the current or given revision | |
856 | tags list repository tags |
|
856 | tags list repository tags | |
857 | unbundle apply one or more bundle files |
|
857 | unbundle apply one or more bundle files | |
858 | update update working directory (or switch revisions) |
|
858 | update update working directory (or switch revisions) | |
859 | verify verify the integrity of the repository |
|
859 | verify verify the integrity of the repository | |
860 | version output version and copyright information |
|
860 | version output version and copyright information | |
861 |
|
861 | |||
862 | enabled extensions: |
|
862 | enabled extensions: | |
863 |
|
863 | |||
864 | helpext (no help text available) |
|
864 | helpext (no help text available) | |
865 |
|
865 | |||
866 | additional help topics: |
|
866 | additional help topics: | |
867 |
|
867 | |||
868 | bundlespec Bundle File Formats |
|
868 | bundlespec Bundle File Formats | |
869 | color Colorizing Outputs |
|
869 | color Colorizing Outputs | |
870 | config Configuration Files |
|
870 | config Configuration Files | |
871 | dates Date Formats |
|
871 | dates Date Formats | |
872 | deprecated Deprecated Features |
|
872 | deprecated Deprecated Features | |
873 | diffs Diff Formats |
|
873 | diffs Diff Formats | |
874 | environment Environment Variables |
|
874 | environment Environment Variables | |
875 | extensions Using Additional Features |
|
875 | extensions Using Additional Features | |
876 | filesets Specifying File Sets |
|
876 | filesets Specifying File Sets | |
877 | flags Command-line flags |
|
877 | flags Command-line flags | |
878 | glossary Glossary |
|
878 | glossary Glossary | |
879 | hgignore Syntax for Mercurial Ignore Files |
|
879 | hgignore Syntax for Mercurial Ignore Files | |
880 | hgweb Configuring hgweb |
|
880 | hgweb Configuring hgweb | |
881 | internals Technical implementation topics |
|
881 | internals Technical implementation topics | |
882 | merge-tools Merge Tools |
|
882 | merge-tools Merge Tools | |
883 | pager Pager Support |
|
883 | pager Pager Support | |
884 | patterns File Name Patterns |
|
884 | patterns File Name Patterns | |
885 | phases Working with Phases |
|
885 | phases Working with Phases | |
886 | revisions Specifying Revisions |
|
886 | revisions Specifying Revisions | |
887 | scripting Using Mercurial from scripts and automation |
|
887 | scripting Using Mercurial from scripts and automation | |
888 | subrepos Subrepositories |
|
888 | subrepos Subrepositories | |
889 | templating Template Usage |
|
889 | templating Template Usage | |
890 | urls URL Paths |
|
890 | urls URL Paths | |
891 |
|
891 | |||
892 | (use 'hg help -v' to show built-in aliases and global options) |
|
892 | (use 'hg help -v' to show built-in aliases and global options) | |
893 |
|
893 | |||
894 | #endif |
|
894 | #endif | |
895 |
|
895 | |||
896 | Test list of internal help commands |
|
896 | Test list of internal help commands | |
897 |
|
897 | |||
898 | $ hg help debug |
|
898 | $ hg help debug | |
899 | debug commands (internal and unsupported): |
|
899 | debug commands (internal and unsupported): | |
900 |
|
900 | |||
901 | debugancestor |
|
901 | debugancestor | |
902 | find the ancestor revision of two revisions in a given index |
|
902 | find the ancestor revision of two revisions in a given index | |
903 | debugapplystreamclonebundle |
|
903 | debugapplystreamclonebundle | |
904 | apply a stream clone bundle file |
|
904 | apply a stream clone bundle file | |
905 | debugbuilddag |
|
905 | debugbuilddag | |
906 | builds a repo with a given DAG from scratch in the current |
|
906 | builds a repo with a given DAG from scratch in the current | |
907 | empty repo |
|
907 | empty repo | |
908 | debugbundle lists the contents of a bundle |
|
908 | debugbundle lists the contents of a bundle | |
909 | debugcapabilities |
|
909 | debugcapabilities | |
910 | lists the capabilities of a remote peer |
|
910 | lists the capabilities of a remote peer | |
911 | debugcheckstate |
|
911 | debugcheckstate | |
912 | validate the correctness of the current dirstate |
|
912 | validate the correctness of the current dirstate | |
913 | debugcolor show available color, effects or style |
|
913 | debugcolor show available color, effects or style | |
914 | debugcommands |
|
914 | debugcommands | |
915 | list all available commands and options |
|
915 | list all available commands and options | |
916 | debugcomplete |
|
916 | debugcomplete | |
917 | returns the completion list associated with the given command |
|
917 | returns the completion list associated with the given command | |
918 | debugcreatestreamclonebundle |
|
918 | debugcreatestreamclonebundle | |
919 | create a stream clone bundle file |
|
919 | create a stream clone bundle file | |
920 | debugdag format the changelog or an index DAG as a concise textual |
|
920 | debugdag format the changelog or an index DAG as a concise textual | |
921 | description |
|
921 | description | |
922 | debugdata dump the contents of a data file revision |
|
922 | debugdata dump the contents of a data file revision | |
923 | debugdate parse and display a date |
|
923 | debugdate parse and display a date | |
924 | debugdeltachain |
|
924 | debugdeltachain | |
925 | dump information about delta chains in a revlog |
|
925 | dump information about delta chains in a revlog | |
926 | debugdirstate |
|
926 | debugdirstate | |
927 | show the contents of the current dirstate |
|
927 | show the contents of the current dirstate | |
928 | debugdiscovery |
|
928 | debugdiscovery | |
929 | runs the changeset discovery protocol in isolation |
|
929 | runs the changeset discovery protocol in isolation | |
930 | debugdownload |
|
930 | debugdownload | |
931 | download a resource using Mercurial logic and config |
|
931 | download a resource using Mercurial logic and config | |
932 | debugextensions |
|
932 | debugextensions | |
933 | show information about active extensions |
|
933 | show information about active extensions | |
934 | debugfileset parse and apply a fileset specification |
|
934 | debugfileset parse and apply a fileset specification | |
935 | debugformat display format information about the current repository |
|
935 | debugformat display format information about the current repository | |
936 | debugfsinfo show information detected about current filesystem |
|
936 | debugfsinfo show information detected about current filesystem | |
937 | debuggetbundle |
|
937 | debuggetbundle | |
938 | retrieves a bundle from a repo |
|
938 | retrieves a bundle from a repo | |
939 | debugignore display the combined ignore pattern and information about |
|
939 | debugignore display the combined ignore pattern and information about | |
940 | ignored files |
|
940 | ignored files | |
941 | debugindex dump the contents of an index file |
|
941 | debugindex dump the contents of an index file | |
942 | debugindexdot |
|
942 | debugindexdot | |
943 | dump an index DAG as a graphviz dot file |
|
943 | dump an index DAG as a graphviz dot file | |
944 | debuginstall test Mercurial installation |
|
944 | debuginstall test Mercurial installation | |
945 | debugknown test whether node ids are known to a repo |
|
945 | debugknown test whether node ids are known to a repo | |
946 | debuglocks show or modify state of locks |
|
946 | debuglocks show or modify state of locks | |
947 | debugmanifestfulltextcache |
|
947 | debugmanifestfulltextcache | |
948 | show, clear or amend the contents of the manifest fulltext |
|
948 | show, clear or amend the contents of the manifest fulltext | |
949 | cache |
|
949 | cache | |
950 | debugmergestate |
|
950 | debugmergestate | |
951 | print merge state |
|
951 | print merge state | |
952 | debugnamecomplete |
|
952 | debugnamecomplete | |
953 | complete "names" - tags, open branch names, bookmark names |
|
953 | complete "names" - tags, open branch names, bookmark names | |
954 | debugobsolete |
|
954 | debugobsolete | |
955 | create arbitrary obsolete marker |
|
955 | create arbitrary obsolete marker | |
956 | debugoptADV (no help text available) |
|
956 | debugoptADV (no help text available) | |
957 | debugoptDEP (no help text available) |
|
957 | debugoptDEP (no help text available) | |
958 | debugoptEXP (no help text available) |
|
958 | debugoptEXP (no help text available) | |
959 | debugpathcomplete |
|
959 | debugpathcomplete | |
960 | complete part or all of a tracked path |
|
960 | complete part or all of a tracked path | |
961 | debugpeer establish a connection to a peer repository |
|
961 | debugpeer establish a connection to a peer repository | |
962 | debugpickmergetool |
|
962 | debugpickmergetool | |
963 | examine which merge tool is chosen for specified file |
|
963 | examine which merge tool is chosen for specified file | |
964 | debugpushkey access the pushkey key/value protocol |
|
964 | debugpushkey access the pushkey key/value protocol | |
965 | debugpvec (no help text available) |
|
965 | debugpvec (no help text available) | |
966 | debugrebuilddirstate |
|
966 | debugrebuilddirstate | |
967 | rebuild the dirstate as it would look like for the given |
|
967 | rebuild the dirstate as it would look like for the given | |
968 | revision |
|
968 | revision | |
969 | debugrebuildfncache |
|
969 | debugrebuildfncache | |
970 | rebuild the fncache file |
|
970 | rebuild the fncache file | |
971 | debugrename dump rename information |
|
971 | debugrename dump rename information | |
972 | debugrevlog show data and statistics about a revlog |
|
972 | debugrevlog show data and statistics about a revlog | |
973 | debugrevspec parse and apply a revision specification |
|
973 | debugrevspec parse and apply a revision specification | |
974 | debugserve run a server with advanced settings |
|
974 | debugserve run a server with advanced settings | |
975 | debugsetparents |
|
975 | debugsetparents | |
976 | manually set the parents of the current working directory |
|
976 | manually set the parents of the current working directory | |
977 | debugssl test a secure connection to a server |
|
977 | debugssl test a secure connection to a server | |
978 | debugsub (no help text available) |
|
978 | debugsub (no help text available) | |
979 | debugsuccessorssets |
|
979 | debugsuccessorssets | |
980 | show set of successors for revision |
|
980 | show set of successors for revision | |
981 | debugtemplate |
|
981 | debugtemplate | |
982 | parse and apply a template |
|
982 | parse and apply a template | |
983 | debuguigetpass |
|
983 | debuguigetpass | |
984 | show prompt to type password |
|
984 | show prompt to type password | |
985 | debuguiprompt |
|
985 | debuguiprompt | |
986 | show plain prompt |
|
986 | show plain prompt | |
987 | debugupdatecaches |
|
987 | debugupdatecaches | |
988 | warm all known caches in the repository |
|
988 | warm all known caches in the repository | |
989 | debugupgraderepo |
|
989 | debugupgraderepo | |
990 | upgrade a repository to use different features |
|
990 | upgrade a repository to use different features | |
991 | debugwalk show how files match on given patterns |
|
991 | debugwalk show how files match on given patterns | |
992 | debugwhyunstable |
|
992 | debugwhyunstable | |
993 | explain instabilities of a changeset |
|
993 | explain instabilities of a changeset | |
994 | debugwireargs |
|
994 | debugwireargs | |
995 | (no help text available) |
|
995 | (no help text available) | |
996 | debugwireproto |
|
996 | debugwireproto | |
997 | send wire protocol commands to a server |
|
997 | send wire protocol commands to a server | |
998 |
|
998 | |||
999 | (use 'hg help -v debug' to show built-in aliases and global options) |
|
999 | (use 'hg help -v debug' to show built-in aliases and global options) | |
1000 |
|
1000 | |||
1001 | internals topic renders index of available sub-topics |
|
1001 | internals topic renders index of available sub-topics | |
1002 |
|
1002 | |||
1003 | $ hg help internals |
|
1003 | $ hg help internals | |
1004 | Technical implementation topics |
|
1004 | Technical implementation topics | |
1005 | """"""""""""""""""""""""""""""" |
|
1005 | """"""""""""""""""""""""""""""" | |
1006 |
|
1006 | |||
1007 | To access a subtopic, use "hg help internals.{subtopic-name}" |
|
1007 | To access a subtopic, use "hg help internals.{subtopic-name}" | |
1008 |
|
1008 | |||
1009 | bundle2 Bundle2 |
|
1009 | bundle2 Bundle2 | |
1010 | bundles Bundles |
|
1010 | bundles Bundles | |
1011 | censor Censor |
|
1011 | censor Censor | |
1012 | changegroups Changegroups |
|
1012 | changegroups Changegroups | |
1013 | config Config Registrar |
|
1013 | config Config Registrar | |
1014 | requirements Repository Requirements |
|
1014 | requirements Repository Requirements | |
1015 | revlogs Revision Logs |
|
1015 | revlogs Revision Logs | |
1016 | wireprotocol Wire Protocol |
|
1016 | wireprotocol Wire Protocol | |
1017 |
|
1017 | |||
1018 | sub-topics can be accessed |
|
1018 | sub-topics can be accessed | |
1019 |
|
1019 | |||
1020 | $ hg help internals.changegroups |
|
1020 | $ hg help internals.changegroups | |
1021 | Changegroups |
|
1021 | Changegroups | |
1022 | """""""""""" |
|
1022 | """""""""""" | |
1023 |
|
1023 | |||
1024 | Changegroups are representations of repository revlog data, specifically |
|
1024 | Changegroups are representations of repository revlog data, specifically | |
1025 | the changelog data, root/flat manifest data, treemanifest data, and |
|
1025 | the changelog data, root/flat manifest data, treemanifest data, and | |
1026 | filelogs. |
|
1026 | filelogs. | |
1027 |
|
1027 | |||
1028 | There are 3 versions of changegroups: "1", "2", and "3". From a high- |
|
1028 | There are 3 versions of changegroups: "1", "2", and "3". From a high- | |
1029 | level, versions "1" and "2" are almost exactly the same, with the only |
|
1029 | level, versions "1" and "2" are almost exactly the same, with the only | |
1030 | difference being an additional item in the *delta header*. Version "3" |
|
1030 | difference being an additional item in the *delta header*. Version "3" | |
1031 | adds support for revlog flags in the *delta header* and optionally |
|
1031 | adds support for revlog flags in the *delta header* and optionally | |
1032 | exchanging treemanifests (enabled by setting an option on the |
|
1032 | exchanging treemanifests (enabled by setting an option on the | |
1033 | "changegroup" part in the bundle2). |
|
1033 | "changegroup" part in the bundle2). | |
1034 |
|
1034 | |||
1035 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
1035 | Changegroups when not exchanging treemanifests consist of 3 logical | |
1036 | segments: |
|
1036 | segments: | |
1037 |
|
1037 | |||
1038 | +---------------------------------+ |
|
1038 | +---------------------------------+ | |
1039 | | | | | |
|
1039 | | | | | | |
1040 | | changeset | manifest | filelogs | |
|
1040 | | changeset | manifest | filelogs | | |
1041 | | | | | |
|
1041 | | | | | | |
1042 | | | | | |
|
1042 | | | | | | |
1043 | +---------------------------------+ |
|
1043 | +---------------------------------+ | |
1044 |
|
1044 | |||
1045 | When exchanging treemanifests, there are 4 logical segments: |
|
1045 | When exchanging treemanifests, there are 4 logical segments: | |
1046 |
|
1046 | |||
1047 | +-------------------------------------------------+ |
|
1047 | +-------------------------------------------------+ | |
1048 | | | | | | |
|
1048 | | | | | | | |
1049 | | changeset | root | treemanifests | filelogs | |
|
1049 | | changeset | root | treemanifests | filelogs | | |
1050 | | | manifest | | | |
|
1050 | | | manifest | | | | |
1051 | | | | | | |
|
1051 | | | | | | | |
1052 | +-------------------------------------------------+ |
|
1052 | +-------------------------------------------------+ | |
1053 |
|
1053 | |||
1054 | The principle building block of each segment is a *chunk*. A *chunk* is a |
|
1054 | The principle building block of each segment is a *chunk*. A *chunk* is a | |
1055 | framed piece of data: |
|
1055 | framed piece of data: | |
1056 |
|
1056 | |||
1057 | +---------------------------------------+ |
|
1057 | +---------------------------------------+ | |
1058 | | | | |
|
1058 | | | | | |
1059 | | length | data | |
|
1059 | | length | data | | |
1060 | | (4 bytes) | (<length - 4> bytes) | |
|
1060 | | (4 bytes) | (<length - 4> bytes) | | |
1061 | | | | |
|
1061 | | | | | |
1062 | +---------------------------------------+ |
|
1062 | +---------------------------------------+ | |
1063 |
|
1063 | |||
1064 | All integers are big-endian signed integers. Each chunk starts with a |
|
1064 | All integers are big-endian signed integers. Each chunk starts with a | |
1065 | 32-bit integer indicating the length of the entire chunk (including the |
|
1065 | 32-bit integer indicating the length of the entire chunk (including the | |
1066 | length field itself). |
|
1066 | length field itself). | |
1067 |
|
1067 | |||
1068 | There is a special case chunk that has a value of 0 for the length |
|
1068 | There is a special case chunk that has a value of 0 for the length | |
1069 | ("0x00000000"). We call this an *empty chunk*. |
|
1069 | ("0x00000000"). We call this an *empty chunk*. | |
1070 |
|
1070 | |||
1071 | Delta Groups |
|
1071 | Delta Groups | |
1072 | ============ |
|
1072 | ============ | |
1073 |
|
1073 | |||
1074 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
1074 | A *delta group* expresses the content of a revlog as a series of deltas, | |
1075 | or patches against previous revisions. |
|
1075 | or patches against previous revisions. | |
1076 |
|
1076 | |||
1077 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
1077 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
1078 | to signal the end of the delta group: |
|
1078 | to signal the end of the delta group: | |
1079 |
|
1079 | |||
1080 | +------------------------------------------------------------------------+ |
|
1080 | +------------------------------------------------------------------------+ | |
1081 | | | | | | | |
|
1081 | | | | | | | | |
1082 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
1082 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
1083 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
1083 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
1084 | | | | | | | |
|
1084 | | | | | | | | |
1085 | +------------------------------------------------------------------------+ |
|
1085 | +------------------------------------------------------------------------+ | |
1086 |
|
1086 | |||
1087 | Each *chunk*'s data consists of the following: |
|
1087 | Each *chunk*'s data consists of the following: | |
1088 |
|
1088 | |||
1089 | +---------------------------------------+ |
|
1089 | +---------------------------------------+ | |
1090 | | | | |
|
1090 | | | | | |
1091 | | delta header | delta data | |
|
1091 | | delta header | delta data | | |
1092 | | (various by version) | (various) | |
|
1092 | | (various by version) | (various) | | |
1093 | | | | |
|
1093 | | | | | |
1094 | +---------------------------------------+ |
|
1094 | +---------------------------------------+ | |
1095 |
|
1095 | |||
1096 | The *delta data* is a series of *delta*s that describe a diff from an |
|
1096 | The *delta data* is a series of *delta*s that describe a diff from an | |
1097 | existing entry (either that the recipient already has, or previously |
|
1097 | existing entry (either that the recipient already has, or previously | |
1098 | specified in the bundle/changegroup). |
|
1098 | specified in the bundle/changegroup). | |
1099 |
|
1099 | |||
1100 | The *delta header* is different between versions "1", "2", and "3" of the |
|
1100 | The *delta header* is different between versions "1", "2", and "3" of the | |
1101 | changegroup format. |
|
1101 | changegroup format. | |
1102 |
|
1102 | |||
1103 | Version 1 (headerlen=80): |
|
1103 | Version 1 (headerlen=80): | |
1104 |
|
1104 | |||
1105 | +------------------------------------------------------+ |
|
1105 | +------------------------------------------------------+ | |
1106 | | | | | | |
|
1106 | | | | | | | |
1107 | | node | p1 node | p2 node | link node | |
|
1107 | | node | p1 node | p2 node | link node | | |
1108 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1108 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1109 | | | | | | |
|
1109 | | | | | | | |
1110 | +------------------------------------------------------+ |
|
1110 | +------------------------------------------------------+ | |
1111 |
|
1111 | |||
1112 | Version 2 (headerlen=100): |
|
1112 | Version 2 (headerlen=100): | |
1113 |
|
1113 | |||
1114 | +------------------------------------------------------------------+ |
|
1114 | +------------------------------------------------------------------+ | |
1115 | | | | | | | |
|
1115 | | | | | | | | |
1116 | | node | p1 node | p2 node | base node | link node | |
|
1116 | | node | p1 node | p2 node | base node | link node | | |
1117 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1117 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1118 | | | | | | | |
|
1118 | | | | | | | | |
1119 | +------------------------------------------------------------------+ |
|
1119 | +------------------------------------------------------------------+ | |
1120 |
|
1120 | |||
1121 | Version 3 (headerlen=102): |
|
1121 | Version 3 (headerlen=102): | |
1122 |
|
1122 | |||
1123 | +------------------------------------------------------------------------------+ |
|
1123 | +------------------------------------------------------------------------------+ | |
1124 | | | | | | | | |
|
1124 | | | | | | | | | |
1125 | | node | p1 node | p2 node | base node | link node | flags | |
|
1125 | | node | p1 node | p2 node | base node | link node | flags | | |
1126 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
1126 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
1127 | | | | | | | | |
|
1127 | | | | | | | | | |
1128 | +------------------------------------------------------------------------------+ |
|
1128 | +------------------------------------------------------------------------------+ | |
1129 |
|
1129 | |||
1130 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which |
|
1130 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which | |
1131 | contain a series of *delta*s, densely packed (no separators). These deltas |
|
1131 | contain a series of *delta*s, densely packed (no separators). These deltas | |
1132 | describe a diff from an existing entry (either that the recipient already |
|
1132 | describe a diff from an existing entry (either that the recipient already | |
1133 | has, or previously specified in the bundle/changegroup). The format is |
|
1133 | has, or previously specified in the bundle/changegroup). The format is | |
1134 | described more fully in "hg help internals.bdiff", but briefly: |
|
1134 | described more fully in "hg help internals.bdiff", but briefly: | |
1135 |
|
1135 | |||
1136 | +---------------------------------------------------------------+ |
|
1136 | +---------------------------------------------------------------+ | |
1137 | | | | | | |
|
1137 | | | | | | | |
1138 | | start offset | end offset | new length | content | |
|
1138 | | start offset | end offset | new length | content | | |
1139 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
1139 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
1140 | | | | | | |
|
1140 | | | | | | | |
1141 | +---------------------------------------------------------------+ |
|
1141 | +---------------------------------------------------------------+ | |
1142 |
|
1142 | |||
1143 | Please note that the length field in the delta data does *not* include |
|
1143 | Please note that the length field in the delta data does *not* include | |
1144 | itself. |
|
1144 | itself. | |
1145 |
|
1145 | |||
1146 | In version 1, the delta is always applied against the previous node from |
|
1146 | In version 1, the delta is always applied against the previous node from | |
1147 | the changegroup or the first parent if this is the first entry in the |
|
1147 | the changegroup or the first parent if this is the first entry in the | |
1148 | changegroup. |
|
1148 | changegroup. | |
1149 |
|
1149 | |||
1150 | In version 2 and up, the delta base node is encoded in the entry in the |
|
1150 | In version 2 and up, the delta base node is encoded in the entry in the | |
1151 | changegroup. This allows the delta to be expressed against any parent, |
|
1151 | changegroup. This allows the delta to be expressed against any parent, | |
1152 | which can result in smaller deltas and more efficient encoding of data. |
|
1152 | which can result in smaller deltas and more efficient encoding of data. | |
1153 |
|
1153 | |||
1154 | Changeset Segment |
|
1154 | Changeset Segment | |
1155 | ================= |
|
1155 | ================= | |
1156 |
|
1156 | |||
1157 | The *changeset segment* consists of a single *delta group* holding |
|
1157 | The *changeset segment* consists of a single *delta group* holding | |
1158 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
1158 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
1159 | the boundary to the *manifest segment*. |
|
1159 | the boundary to the *manifest segment*. | |
1160 |
|
1160 | |||
1161 | Manifest Segment |
|
1161 | Manifest Segment | |
1162 | ================ |
|
1162 | ================ | |
1163 |
|
1163 | |||
1164 | The *manifest segment* consists of a single *delta group* holding manifest |
|
1164 | The *manifest segment* consists of a single *delta group* holding manifest | |
1165 | data. If treemanifests are in use, it contains only the manifest for the |
|
1165 | data. If treemanifests are in use, it contains only the manifest for the | |
1166 | root directory of the repository. Otherwise, it contains the entire |
|
1166 | root directory of the repository. Otherwise, it contains the entire | |
1167 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
1167 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
1168 | the boundary to the next segment (either the *treemanifests segment* or |
|
1168 | the boundary to the next segment (either the *treemanifests segment* or | |
1169 | the *filelogs segment*, depending on version and the request options). |
|
1169 | the *filelogs segment*, depending on version and the request options). | |
1170 |
|
1170 | |||
1171 | Treemanifests Segment |
|
1171 | Treemanifests Segment | |
1172 | --------------------- |
|
1172 | --------------------- | |
1173 |
|
1173 | |||
1174 | The *treemanifests segment* only exists in changegroup version "3", and |
|
1174 | The *treemanifests segment* only exists in changegroup version "3", and | |
1175 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
1175 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
1176 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
1176 | (it is not possible to use changegroup version 3 outside of bundle2). | |
1177 | Aside from the filenames in the *treemanifests segment* containing a |
|
1177 | Aside from the filenames in the *treemanifests segment* containing a | |
1178 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
1178 | trailing "/" character, it behaves identically to the *filelogs segment* | |
1179 | (see below). The final sub-segment is followed by an *empty chunk* |
|
1179 | (see below). The final sub-segment is followed by an *empty chunk* | |
1180 | (logically, a sub-segment with filename size 0). This denotes the boundary |
|
1180 | (logically, a sub-segment with filename size 0). This denotes the boundary | |
1181 | to the *filelogs segment*. |
|
1181 | to the *filelogs segment*. | |
1182 |
|
1182 | |||
1183 | Filelogs Segment |
|
1183 | Filelogs Segment | |
1184 | ================ |
|
1184 | ================ | |
1185 |
|
1185 | |||
1186 | The *filelogs segment* consists of multiple sub-segments, each |
|
1186 | The *filelogs segment* consists of multiple sub-segments, each | |
1187 | corresponding to an individual file whose data is being described: |
|
1187 | corresponding to an individual file whose data is being described: | |
1188 |
|
1188 | |||
1189 | +--------------------------------------------------+ |
|
1189 | +--------------------------------------------------+ | |
1190 | | | | | | | |
|
1190 | | | | | | | | |
1191 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
1191 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
1192 | | | | | | (4 bytes) | |
|
1192 | | | | | | (4 bytes) | | |
1193 | | | | | | | |
|
1193 | | | | | | | | |
1194 | +--------------------------------------------------+ |
|
1194 | +--------------------------------------------------+ | |
1195 |
|
1195 | |||
1196 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
1196 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
1197 | a sub-segment with filename size 0). This denotes the end of the segment |
|
1197 | a sub-segment with filename size 0). This denotes the end of the segment | |
1198 | and of the overall changegroup. |
|
1198 | and of the overall changegroup. | |
1199 |
|
1199 | |||
1200 | Each filelog sub-segment consists of the following: |
|
1200 | Each filelog sub-segment consists of the following: | |
1201 |
|
1201 | |||
1202 | +------------------------------------------------------+ |
|
1202 | +------------------------------------------------------+ | |
1203 | | | | | |
|
1203 | | | | | | |
1204 | | filename length | filename | delta group | |
|
1204 | | filename length | filename | delta group | | |
1205 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
1205 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
1206 | | | | | |
|
1206 | | | | | | |
1207 | +------------------------------------------------------+ |
|
1207 | +------------------------------------------------------+ | |
1208 |
|
1208 | |||
1209 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
1209 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
1210 | followed by N chunks constituting the *delta group* for this file. The |
|
1210 | followed by N chunks constituting the *delta group* for this file. The | |
1211 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
1211 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
1212 | next filelog sub-segment. |
|
1212 | next filelog sub-segment. | |
1213 |
|
1213 | |||
1214 | Test list of commands with command with no help text |
|
1214 | Test list of commands with command with no help text | |
1215 |
|
1215 | |||
1216 | $ hg help helpext |
|
1216 | $ hg help helpext | |
1217 | helpext extension - no help text available |
|
1217 | helpext extension - no help text available | |
1218 |
|
1218 | |||
1219 | list of commands: |
|
1219 | list of commands: | |
1220 |
|
1220 | |||
1221 | nohelp (no help text available) |
|
1221 | nohelp (no help text available) | |
1222 |
|
1222 | |||
1223 | (use 'hg help -v helpext' to show built-in aliases and global options) |
|
1223 | (use 'hg help -v helpext' to show built-in aliases and global options) | |
1224 |
|
1224 | |||
1225 |
|
1225 | |||
1226 | test advanced, deprecated and experimental options are hidden in command help |
|
1226 | test advanced, deprecated and experimental options are hidden in command help | |
1227 | $ hg help debugoptADV |
|
1227 | $ hg help debugoptADV | |
1228 | hg debugoptADV |
|
1228 | hg debugoptADV | |
1229 |
|
1229 | |||
1230 | (no help text available) |
|
1230 | (no help text available) | |
1231 |
|
1231 | |||
1232 | options: |
|
1232 | options: | |
1233 |
|
1233 | |||
1234 | (some details hidden, use --verbose to show complete help) |
|
1234 | (some details hidden, use --verbose to show complete help) | |
1235 | $ hg help debugoptDEP |
|
1235 | $ hg help debugoptDEP | |
1236 | hg debugoptDEP |
|
1236 | hg debugoptDEP | |
1237 |
|
1237 | |||
1238 | (no help text available) |
|
1238 | (no help text available) | |
1239 |
|
1239 | |||
1240 | options: |
|
1240 | options: | |
1241 |
|
1241 | |||
1242 | (some details hidden, use --verbose to show complete help) |
|
1242 | (some details hidden, use --verbose to show complete help) | |
1243 |
|
1243 | |||
1244 | $ hg help debugoptEXP |
|
1244 | $ hg help debugoptEXP | |
1245 | hg debugoptEXP |
|
1245 | hg debugoptEXP | |
1246 |
|
1246 | |||
1247 | (no help text available) |
|
1247 | (no help text available) | |
1248 |
|
1248 | |||
1249 | options: |
|
1249 | options: | |
1250 |
|
1250 | |||
1251 | (some details hidden, use --verbose to show complete help) |
|
1251 | (some details hidden, use --verbose to show complete help) | |
1252 |
|
1252 | |||
1253 | test advanced, deprecated and experimental options are shown with -v |
|
1253 | test advanced, deprecated and experimental options are shown with -v | |
1254 | $ hg help -v debugoptADV | grep aopt |
|
1254 | $ hg help -v debugoptADV | grep aopt | |
1255 | --aopt option is (ADVANCED) |
|
1255 | --aopt option is (ADVANCED) | |
1256 | $ hg help -v debugoptDEP | grep dopt |
|
1256 | $ hg help -v debugoptDEP | grep dopt | |
1257 | --dopt option is (DEPRECATED) |
|
1257 | --dopt option is (DEPRECATED) | |
1258 | $ hg help -v debugoptEXP | grep eopt |
|
1258 | $ hg help -v debugoptEXP | grep eopt | |
1259 | --eopt option is (EXPERIMENTAL) |
|
1259 | --eopt option is (EXPERIMENTAL) | |
1260 |
|
1260 | |||
1261 | #if gettext |
|
1261 | #if gettext | |
1262 | test deprecated option is hidden with translation with untranslated description |
|
1262 | test deprecated option is hidden with translation with untranslated description | |
1263 | (use many globy for not failing on changed transaction) |
|
1263 | (use many globy for not failing on changed transaction) | |
1264 | $ LANGUAGE=sv hg help debugoptDEP |
|
1264 | $ LANGUAGE=sv hg help debugoptDEP | |
1265 | hg debugoptDEP |
|
1265 | hg debugoptDEP | |
1266 |
|
1266 | |||
1267 | (*) (glob) |
|
1267 | (*) (glob) | |
1268 |
|
1268 | |||
1269 | options: |
|
1269 | options: | |
1270 |
|
1270 | |||
1271 | (some details hidden, use --verbose to show complete help) |
|
1271 | (some details hidden, use --verbose to show complete help) | |
1272 | #endif |
|
1272 | #endif | |
1273 |
|
1273 | |||
1274 | Test commands that collide with topics (issue4240) |
|
1274 | Test commands that collide with topics (issue4240) | |
1275 |
|
1275 | |||
1276 | $ hg config -hq |
|
1276 | $ hg config -hq | |
1277 | hg config [-u] [NAME]... |
|
1277 | hg config [-u] [NAME]... | |
1278 |
|
1278 | |||
1279 | show combined config settings from all hgrc files |
|
1279 | show combined config settings from all hgrc files | |
1280 | $ hg showconfig -hq |
|
1280 | $ hg showconfig -hq | |
1281 | hg config [-u] [NAME]... |
|
1281 | hg config [-u] [NAME]... | |
1282 |
|
1282 | |||
1283 | show combined config settings from all hgrc files |
|
1283 | show combined config settings from all hgrc files | |
1284 |
|
1284 | |||
1285 | Test a help topic |
|
1285 | Test a help topic | |
1286 |
|
1286 | |||
1287 | $ hg help dates |
|
1287 | $ hg help dates | |
1288 | Date Formats |
|
1288 | Date Formats | |
1289 | """""""""""" |
|
1289 | """""""""""" | |
1290 |
|
1290 | |||
1291 | Some commands allow the user to specify a date, e.g.: |
|
1291 | Some commands allow the user to specify a date, e.g.: | |
1292 |
|
1292 | |||
1293 | - backout, commit, import, tag: Specify the commit date. |
|
1293 | - backout, commit, import, tag: Specify the commit date. | |
1294 | - log, revert, update: Select revision(s) by date. |
|
1294 | - log, revert, update: Select revision(s) by date. | |
1295 |
|
1295 | |||
1296 | Many date formats are valid. Here are some examples: |
|
1296 | Many date formats are valid. Here are some examples: | |
1297 |
|
1297 | |||
1298 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
1298 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
1299 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
1299 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
1300 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
1300 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
1301 | - "Dec 6" (midnight) |
|
1301 | - "Dec 6" (midnight) | |
1302 | - "13:18" (today assumed) |
|
1302 | - "13:18" (today assumed) | |
1303 | - "3:39" (3:39AM assumed) |
|
1303 | - "3:39" (3:39AM assumed) | |
1304 | - "3:39pm" (15:39) |
|
1304 | - "3:39pm" (15:39) | |
1305 | - "2006-12-06 13:18:29" (ISO 8601 format) |
|
1305 | - "2006-12-06 13:18:29" (ISO 8601 format) | |
1306 | - "2006-12-6 13:18" |
|
1306 | - "2006-12-6 13:18" | |
1307 | - "2006-12-6" |
|
1307 | - "2006-12-6" | |
1308 | - "12-6" |
|
1308 | - "12-6" | |
1309 | - "12/6" |
|
1309 | - "12/6" | |
1310 | - "12/6/6" (Dec 6 2006) |
|
1310 | - "12/6/6" (Dec 6 2006) | |
1311 | - "today" (midnight) |
|
1311 | - "today" (midnight) | |
1312 | - "yesterday" (midnight) |
|
1312 | - "yesterday" (midnight) | |
1313 | - "now" - right now |
|
1313 | - "now" - right now | |
1314 |
|
1314 | |||
1315 | Lastly, there is Mercurial's internal format: |
|
1315 | Lastly, there is Mercurial's internal format: | |
1316 |
|
1316 | |||
1317 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
1317 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
1318 |
|
1318 | |||
1319 | This is the internal representation format for dates. The first number is |
|
1319 | This is the internal representation format for dates. The first number is | |
1320 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second |
|
1320 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second | |
1321 | is the offset of the local timezone, in seconds west of UTC (negative if |
|
1321 | is the offset of the local timezone, in seconds west of UTC (negative if | |
1322 | the timezone is east of UTC). |
|
1322 | the timezone is east of UTC). | |
1323 |
|
1323 | |||
1324 | The log command also accepts date ranges: |
|
1324 | The log command also accepts date ranges: | |
1325 |
|
1325 | |||
1326 | - "<DATE" - at or before a given date/time |
|
1326 | - "<DATE" - at or before a given date/time | |
1327 | - ">DATE" - on or after a given date/time |
|
1327 | - ">DATE" - on or after a given date/time | |
1328 | - "DATE to DATE" - a date range, inclusive |
|
1328 | - "DATE to DATE" - a date range, inclusive | |
1329 | - "-DAYS" - within a given number of days of today |
|
1329 | - "-DAYS" - within a given number of days of today | |
1330 |
|
1330 | |||
1331 | Test repeated config section name |
|
1331 | Test repeated config section name | |
1332 |
|
1332 | |||
1333 | $ hg help config.host |
|
1333 | $ hg help config.host | |
1334 | "http_proxy.host" |
|
1334 | "http_proxy.host" | |
1335 | Host name and (optional) port of the proxy server, for example |
|
1335 | Host name and (optional) port of the proxy server, for example | |
1336 | "myproxy:8000". |
|
1336 | "myproxy:8000". | |
1337 |
|
1337 | |||
1338 | "smtp.host" |
|
1338 | "smtp.host" | |
1339 | Host name of mail server, e.g. "mail.example.com". |
|
1339 | Host name of mail server, e.g. "mail.example.com". | |
1340 |
|
1340 | |||
1341 | Unrelated trailing paragraphs shouldn't be included |
|
1341 | Unrelated trailing paragraphs shouldn't be included | |
1342 |
|
1342 | |||
1343 | $ hg help config.extramsg | grep '^$' |
|
1343 | $ hg help config.extramsg | grep '^$' | |
1344 |
|
1344 | |||
1345 |
|
1345 | |||
1346 | Test capitalized section name |
|
1346 | Test capitalized section name | |
1347 |
|
1347 | |||
1348 | $ hg help scripting.HGPLAIN > /dev/null |
|
1348 | $ hg help scripting.HGPLAIN > /dev/null | |
1349 |
|
1349 | |||
1350 | Help subsection: |
|
1350 | Help subsection: | |
1351 |
|
1351 | |||
1352 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
1352 | $ hg help config.charsets |grep "Email example:" > /dev/null | |
1353 | [1] |
|
1353 | [1] | |
1354 |
|
1354 | |||
1355 | Show nested definitions |
|
1355 | Show nested definitions | |
1356 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
1356 | ("profiling.type"[break]"ls"[break]"stat"[break]) | |
1357 |
|
1357 | |||
1358 | $ hg help config.type | egrep '^$'|wc -l |
|
1358 | $ hg help config.type | egrep '^$'|wc -l | |
1359 | \s*3 (re) |
|
1359 | \s*3 (re) | |
1360 |
|
1360 | |||
1361 | Separate sections from subsections |
|
1361 | Separate sections from subsections | |
1362 |
|
1362 | |||
1363 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq |
|
1363 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq | |
1364 | "format" |
|
1364 | "format" | |
1365 | -------- |
|
1365 | -------- | |
1366 |
|
1366 | |||
1367 | "usegeneraldelta" |
|
1367 | "usegeneraldelta" | |
1368 |
|
1368 | |||
1369 | "dotencode" |
|
1369 | "dotencode" | |
1370 |
|
1370 | |||
1371 | "usefncache" |
|
1371 | "usefncache" | |
1372 |
|
1372 | |||
1373 | "usestore" |
|
1373 | "usestore" | |
1374 |
|
1374 | |||
1375 | "profiling" |
|
1375 | "profiling" | |
1376 | ----------- |
|
1376 | ----------- | |
1377 |
|
1377 | |||
1378 | "format" |
|
1378 | "format" | |
1379 |
|
1379 | |||
1380 | "progress" |
|
1380 | "progress" | |
1381 | ---------- |
|
1381 | ---------- | |
1382 |
|
1382 | |||
1383 | "format" |
|
1383 | "format" | |
1384 |
|
1384 | |||
1385 |
|
1385 | |||
1386 | Last item in help config.*: |
|
1386 | Last item in help config.*: | |
1387 |
|
1387 | |||
1388 | $ hg help config.`hg help config|grep '^ "'| \ |
|
1388 | $ hg help config.`hg help config|grep '^ "'| \ | |
1389 | > tail -1|sed 's![ "]*!!g'`| \ |
|
1389 | > tail -1|sed 's![ "]*!!g'`| \ | |
1390 | > grep 'hg help -c config' > /dev/null |
|
1390 | > grep 'hg help -c config' > /dev/null | |
1391 | [1] |
|
1391 | [1] | |
1392 |
|
1392 | |||
1393 | note to use help -c for general hg help config: |
|
1393 | note to use help -c for general hg help config: | |
1394 |
|
1394 | |||
1395 | $ hg help config |grep 'hg help -c config' > /dev/null |
|
1395 | $ hg help config |grep 'hg help -c config' > /dev/null | |
1396 |
|
1396 | |||
1397 | Test templating help |
|
1397 | Test templating help | |
1398 |
|
1398 | |||
1399 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
1399 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
1400 | desc String. The text of the changeset description. |
|
1400 | desc String. The text of the changeset description. | |
1401 | diffstat String. Statistics of changes with the following format: |
|
1401 | diffstat String. Statistics of changes with the following format: | |
1402 | firstline Any text. Returns the first line of text. |
|
1402 | firstline Any text. Returns the first line of text. | |
1403 | nonempty Any text. Returns '(none)' if the string is empty. |
|
1403 | nonempty Any text. Returns '(none)' if the string is empty. | |
1404 |
|
1404 | |||
1405 | Test deprecated items |
|
1405 | Test deprecated items | |
1406 |
|
1406 | |||
1407 | $ hg help -v templating | grep currentbookmark |
|
1407 | $ hg help -v templating | grep currentbookmark | |
1408 | currentbookmark |
|
1408 | currentbookmark | |
1409 | $ hg help templating | (grep currentbookmark || true) |
|
1409 | $ hg help templating | (grep currentbookmark || true) | |
1410 |
|
1410 | |||
1411 | Test help hooks |
|
1411 | Test help hooks | |
1412 |
|
1412 | |||
1413 | $ cat > helphook1.py <<EOF |
|
1413 | $ cat > helphook1.py <<EOF | |
1414 | > from mercurial import help |
|
1414 | > from mercurial import help | |
1415 | > |
|
1415 | > | |
1416 | > def rewrite(ui, topic, doc): |
|
1416 | > def rewrite(ui, topic, doc): | |
1417 | > return doc + '\nhelphook1\n' |
|
1417 | > return doc + '\nhelphook1\n' | |
1418 | > |
|
1418 | > | |
1419 | > def extsetup(ui): |
|
1419 | > def extsetup(ui): | |
1420 | > help.addtopichook('revisions', rewrite) |
|
1420 | > help.addtopichook('revisions', rewrite) | |
1421 | > EOF |
|
1421 | > EOF | |
1422 | $ cat > helphook2.py <<EOF |
|
1422 | $ cat > helphook2.py <<EOF | |
1423 | > from mercurial import help |
|
1423 | > from mercurial import help | |
1424 | > |
|
1424 | > | |
1425 | > def rewrite(ui, topic, doc): |
|
1425 | > def rewrite(ui, topic, doc): | |
1426 | > return doc + '\nhelphook2\n' |
|
1426 | > return doc + '\nhelphook2\n' | |
1427 | > |
|
1427 | > | |
1428 | > def extsetup(ui): |
|
1428 | > def extsetup(ui): | |
1429 | > help.addtopichook('revisions', rewrite) |
|
1429 | > help.addtopichook('revisions', rewrite) | |
1430 | > EOF |
|
1430 | > EOF | |
1431 | $ echo '[extensions]' >> $HGRCPATH |
|
1431 | $ echo '[extensions]' >> $HGRCPATH | |
1432 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
1432 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
1433 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
1433 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
1434 | $ hg help revsets | grep helphook |
|
1434 | $ hg help revsets | grep helphook | |
1435 | helphook1 |
|
1435 | helphook1 | |
1436 | helphook2 |
|
1436 | helphook2 | |
1437 |
|
1437 | |||
1438 | help -c should only show debug --debug |
|
1438 | help -c should only show debug --debug | |
1439 |
|
1439 | |||
1440 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' |
|
1440 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' | |
1441 | [1] |
|
1441 | [1] | |
1442 |
|
1442 | |||
1443 | help -c should only show deprecated for -v |
|
1443 | help -c should only show deprecated for -v | |
1444 |
|
1444 | |||
1445 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1445 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' | |
1446 | [1] |
|
1446 | [1] | |
1447 |
|
1447 | |||
1448 | Test -s / --system |
|
1448 | Test -s / --system | |
1449 |
|
1449 | |||
1450 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ |
|
1450 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ | |
1451 | > wc -l | sed -e 's/ //g' |
|
1451 | > wc -l | sed -e 's/ //g' | |
1452 | 0 |
|
1452 | 0 | |
1453 | $ hg help config.files --system unix | grep 'USER' | \ |
|
1453 | $ hg help config.files --system unix | grep 'USER' | \ | |
1454 | > wc -l | sed -e 's/ //g' |
|
1454 | > wc -l | sed -e 's/ //g' | |
1455 | 0 |
|
1455 | 0 | |
1456 |
|
1456 | |||
1457 | Test -e / -c / -k combinations |
|
1457 | Test -e / -c / -k combinations | |
1458 |
|
1458 | |||
1459 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1459 | $ hg help -c|egrep '^[A-Z].*:|^ debug' | |
1460 | Commands: |
|
1460 | Commands: | |
1461 | $ hg help -e|egrep '^[A-Z].*:|^ debug' |
|
1461 | $ hg help -e|egrep '^[A-Z].*:|^ debug' | |
1462 | Extensions: |
|
1462 | Extensions: | |
1463 | $ hg help -k|egrep '^[A-Z].*:|^ debug' |
|
1463 | $ hg help -k|egrep '^[A-Z].*:|^ debug' | |
1464 | Topics: |
|
1464 | Topics: | |
1465 | Commands: |
|
1465 | Commands: | |
1466 | Extensions: |
|
1466 | Extensions: | |
1467 | Extension Commands: |
|
1467 | Extension Commands: | |
1468 | $ hg help -c schemes |
|
1468 | $ hg help -c schemes | |
1469 | abort: no such help topic: schemes |
|
1469 | abort: no such help topic: schemes | |
1470 | (try 'hg help --keyword schemes') |
|
1470 | (try 'hg help --keyword schemes') | |
1471 | [255] |
|
1471 | [255] | |
1472 | $ hg help -e schemes |head -1 |
|
1472 | $ hg help -e schemes |head -1 | |
1473 | schemes extension - extend schemes with shortcuts to repository swarms |
|
1473 | schemes extension - extend schemes with shortcuts to repository swarms | |
1474 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1474 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' | |
1475 | Commands: |
|
1475 | Commands: | |
1476 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1476 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' | |
1477 | Extensions: |
|
1477 | Extensions: | |
1478 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1478 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' | |
1479 | Extensions: |
|
1479 | Extensions: | |
1480 | Commands: |
|
1480 | Commands: | |
1481 | $ hg help -c commit > /dev/null |
|
1481 | $ hg help -c commit > /dev/null | |
1482 | $ hg help -e -c commit > /dev/null |
|
1482 | $ hg help -e -c commit > /dev/null | |
1483 | $ hg help -e commit > /dev/null |
|
1483 | $ hg help -e commit > /dev/null | |
1484 | abort: no such help topic: commit |
|
1484 | abort: no such help topic: commit (no-windows !) | |
1485 | (try 'hg help --keyword commit') |
|
1485 | (try 'hg help --keyword commit') (no-windows !) | |
|
1486 | \x1b[0;31mabort: no such help topic: commit\x1b[0m (esc) (windows !) | |||
|
1487 | \x1b[0;31m(try 'hg help --keyword commit')\x1b[0m (esc) (windows !) | |||
1486 |
|
|
1488 | [255] | |
1487 |
|
1489 | |||
1488 |
|
|
1490 | Test keyword search help | |
1489 |
|
1491 | |||
1490 | $ cat > prefixedname.py <<EOF |
|
1492 | $ cat > prefixedname.py <<EOF | |
1491 | > '''matched against word "clone" |
|
1493 | > '''matched against word "clone" | |
1492 | > ''' |
|
1494 | > ''' | |
1493 | > EOF |
|
1495 | > EOF | |
1494 | $ echo '[extensions]' >> $HGRCPATH |
|
1496 | $ echo '[extensions]' >> $HGRCPATH | |
1495 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
1497 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH | |
1496 | $ hg help -k clone |
|
1498 | $ hg help -k clone | |
1497 | Topics: |
|
1499 | Topics: | |
1498 |
|
1500 | |||
1499 | config Configuration Files |
|
1501 | config Configuration Files | |
1500 | extensions Using Additional Features |
|
1502 | extensions Using Additional Features | |
1501 | glossary Glossary |
|
1503 | glossary Glossary | |
1502 | phases Working with Phases |
|
1504 | phases Working with Phases | |
1503 | subrepos Subrepositories |
|
1505 | subrepos Subrepositories | |
1504 | urls URL Paths |
|
1506 | urls URL Paths | |
1505 |
|
1507 | |||
1506 | Commands: |
|
1508 | Commands: | |
1507 |
|
1509 | |||
1508 | bookmarks create a new bookmark or list existing bookmarks |
|
1510 | bookmarks create a new bookmark or list existing bookmarks | |
1509 | clone make a copy of an existing repository |
|
1511 | clone make a copy of an existing repository | |
1510 | paths show aliases for remote repositories |
|
1512 | paths show aliases for remote repositories | |
1511 | pull pull changes from the specified source |
|
1513 | pull pull changes from the specified source | |
1512 | update update working directory (or switch revisions) |
|
1514 | update update working directory (or switch revisions) | |
1513 |
|
1515 | |||
1514 | Extensions: |
|
1516 | Extensions: | |
1515 |
|
1517 | |||
1516 | clonebundles advertise pre-generated bundles to seed clones |
|
1518 | clonebundles advertise pre-generated bundles to seed clones | |
1517 | narrow create clones which fetch history data for subset of files |
|
1519 | narrow create clones which fetch history data for subset of files | |
1518 | (EXPERIMENTAL) |
|
1520 | (EXPERIMENTAL) | |
1519 | prefixedname matched against word "clone" |
|
1521 | prefixedname matched against word "clone" | |
1520 | relink recreates hardlinks between repository clones |
|
1522 | relink recreates hardlinks between repository clones | |
1521 |
|
1523 | |||
1522 | Extension Commands: |
|
1524 | Extension Commands: | |
1523 |
|
1525 | |||
1524 | qclone clone main and patch repository at same time |
|
1526 | qclone clone main and patch repository at same time | |
1525 |
|
1527 | |||
1526 | Test unfound topic |
|
1528 | Test unfound topic | |
1527 |
|
1529 | |||
1528 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1530 | $ hg help nonexistingtopicthatwillneverexisteverever | |
1529 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1531 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever | |
1530 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') |
|
1532 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') | |
1531 | [255] |
|
1533 | [255] | |
1532 |
|
1534 | |||
1533 | Test unfound keyword |
|
1535 | Test unfound keyword | |
1534 |
|
1536 | |||
1535 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1537 | $ hg help --keyword nonexistingwordthatwillneverexisteverever | |
1536 | abort: no matches |
|
1538 | abort: no matches | |
1537 | (try 'hg help' for a list of topics) |
|
1539 | (try 'hg help' for a list of topics) | |
1538 | [255] |
|
1540 | [255] | |
1539 |
|
1541 | |||
1540 | Test omit indicating for help |
|
1542 | Test omit indicating for help | |
1541 |
|
1543 | |||
1542 | $ cat > addverboseitems.py <<EOF |
|
1544 | $ cat > addverboseitems.py <<EOF | |
1543 | > '''extension to test omit indicating. |
|
1545 | > '''extension to test omit indicating. | |
1544 | > |
|
1546 | > | |
1545 | > This paragraph is never omitted (for extension) |
|
1547 | > This paragraph is never omitted (for extension) | |
1546 | > |
|
1548 | > | |
1547 | > .. container:: verbose |
|
1549 | > .. container:: verbose | |
1548 | > |
|
1550 | > | |
1549 | > This paragraph is omitted, |
|
1551 | > This paragraph is omitted, | |
1550 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1552 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | |
1551 | > |
|
1553 | > | |
1552 | > This paragraph is never omitted, too (for extension) |
|
1554 | > This paragraph is never omitted, too (for extension) | |
1553 | > ''' |
|
1555 | > ''' | |
1554 | > from __future__ import absolute_import |
|
1556 | > from __future__ import absolute_import | |
1555 | > from mercurial import commands, help |
|
1557 | > from mercurial import commands, help | |
1556 | > testtopic = """This paragraph is never omitted (for topic). |
|
1558 | > testtopic = """This paragraph is never omitted (for topic). | |
1557 | > |
|
1559 | > | |
1558 | > .. container:: verbose |
|
1560 | > .. container:: verbose | |
1559 | > |
|
1561 | > | |
1560 | > This paragraph is omitted, |
|
1562 | > This paragraph is omitted, | |
1561 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1563 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | |
1562 | > |
|
1564 | > | |
1563 | > This paragraph is never omitted, too (for topic) |
|
1565 | > This paragraph is never omitted, too (for topic) | |
1564 | > """ |
|
1566 | > """ | |
1565 | > def extsetup(ui): |
|
1567 | > def extsetup(ui): | |
1566 | > help.helptable.append((["topic-containing-verbose"], |
|
1568 | > help.helptable.append((["topic-containing-verbose"], | |
1567 | > "This is the topic to test omit indicating.", |
|
1569 | > "This is the topic to test omit indicating.", | |
1568 | > lambda ui: testtopic)) |
|
1570 | > lambda ui: testtopic)) | |
1569 | > EOF |
|
1571 | > EOF | |
1570 | $ echo '[extensions]' >> $HGRCPATH |
|
1572 | $ echo '[extensions]' >> $HGRCPATH | |
1571 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1573 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | |
1572 | $ hg help addverboseitems |
|
1574 | $ hg help addverboseitems | |
1573 | addverboseitems extension - extension to test omit indicating. |
|
1575 | addverboseitems extension - extension to test omit indicating. | |
1574 |
|
1576 | |||
1575 | This paragraph is never omitted (for extension) |
|
1577 | This paragraph is never omitted (for extension) | |
1576 |
|
1578 | |||
1577 | This paragraph is never omitted, too (for extension) |
|
1579 | This paragraph is never omitted, too (for extension) | |
1578 |
|
1580 | |||
1579 | (some details hidden, use --verbose to show complete help) |
|
1581 | (some details hidden, use --verbose to show complete help) | |
1580 |
|
1582 | |||
1581 | no commands defined |
|
1583 | no commands defined | |
1582 | $ hg help -v addverboseitems |
|
1584 | $ hg help -v addverboseitems | |
1583 | addverboseitems extension - extension to test omit indicating. |
|
1585 | addverboseitems extension - extension to test omit indicating. | |
1584 |
|
1586 | |||
1585 | This paragraph is never omitted (for extension) |
|
1587 | This paragraph is never omitted (for extension) | |
1586 |
|
1588 | |||
1587 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1589 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1588 | extension) |
|
1590 | extension) | |
1589 |
|
1591 | |||
1590 | This paragraph is never omitted, too (for extension) |
|
1592 | This paragraph is never omitted, too (for extension) | |
1591 |
|
1593 | |||
1592 | no commands defined |
|
1594 | no commands defined | |
1593 | $ hg help topic-containing-verbose |
|
1595 | $ hg help topic-containing-verbose | |
1594 | This is the topic to test omit indicating. |
|
1596 | This is the topic to test omit indicating. | |
1595 | """""""""""""""""""""""""""""""""""""""""" |
|
1597 | """""""""""""""""""""""""""""""""""""""""" | |
1596 |
|
1598 | |||
1597 | This paragraph is never omitted (for topic). |
|
1599 | This paragraph is never omitted (for topic). | |
1598 |
|
1600 | |||
1599 | This paragraph is never omitted, too (for topic) |
|
1601 | This paragraph is never omitted, too (for topic) | |
1600 |
|
1602 | |||
1601 | (some details hidden, use --verbose to show complete help) |
|
1603 | (some details hidden, use --verbose to show complete help) | |
1602 | $ hg help -v topic-containing-verbose |
|
1604 | $ hg help -v topic-containing-verbose | |
1603 | This is the topic to test omit indicating. |
|
1605 | This is the topic to test omit indicating. | |
1604 | """""""""""""""""""""""""""""""""""""""""" |
|
1606 | """""""""""""""""""""""""""""""""""""""""" | |
1605 |
|
1607 | |||
1606 | This paragraph is never omitted (for topic). |
|
1608 | This paragraph is never omitted (for topic). | |
1607 |
|
1609 | |||
1608 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1610 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1609 | topic) |
|
1611 | topic) | |
1610 |
|
1612 | |||
1611 | This paragraph is never omitted, too (for topic) |
|
1613 | This paragraph is never omitted, too (for topic) | |
1612 |
|
1614 | |||
1613 | Test section lookup |
|
1615 | Test section lookup | |
1614 |
|
1616 | |||
1615 | $ hg help revset.merge |
|
1617 | $ hg help revset.merge | |
1616 | "merge()" |
|
1618 | "merge()" | |
1617 | Changeset is a merge changeset. |
|
1619 | Changeset is a merge changeset. | |
1618 |
|
1620 | |||
1619 | $ hg help glossary.dag |
|
1621 | $ hg help glossary.dag | |
1620 | DAG |
|
1622 | DAG | |
1621 | The repository of changesets of a distributed version control system |
|
1623 | The repository of changesets of a distributed version control system | |
1622 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1624 | (DVCS) can be described as a directed acyclic graph (DAG), consisting | |
1623 | of nodes and edges, where nodes correspond to changesets and edges |
|
1625 | of nodes and edges, where nodes correspond to changesets and edges | |
1624 | imply a parent -> child relation. This graph can be visualized by |
|
1626 | imply a parent -> child relation. This graph can be visualized by | |
1625 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is |
|
1627 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is | |
1626 | limited by the requirement for children to have at most two parents. |
|
1628 | limited by the requirement for children to have at most two parents. | |
1627 |
|
1629 | |||
1628 |
|
1630 | |||
1629 | $ hg help hgrc.paths |
|
1631 | $ hg help hgrc.paths | |
1630 | "paths" |
|
1632 | "paths" | |
1631 | ------- |
|
1633 | ------- | |
1632 |
|
1634 | |||
1633 | Assigns symbolic names and behavior to repositories. |
|
1635 | Assigns symbolic names and behavior to repositories. | |
1634 |
|
1636 | |||
1635 | Options are symbolic names defining the URL or directory that is the |
|
1637 | Options are symbolic names defining the URL or directory that is the | |
1636 | location of the repository. Example: |
|
1638 | location of the repository. Example: | |
1637 |
|
1639 | |||
1638 | [paths] |
|
1640 | [paths] | |
1639 | my_server = https://example.com/my_repo |
|
1641 | my_server = https://example.com/my_repo | |
1640 | local_path = /home/me/repo |
|
1642 | local_path = /home/me/repo | |
1641 |
|
1643 | |||
1642 | These symbolic names can be used from the command line. To pull from |
|
1644 | These symbolic names can be used from the command line. To pull from | |
1643 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push |
|
1645 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push | |
1644 | local_path'. |
|
1646 | local_path'. | |
1645 |
|
1647 | |||
1646 | Options containing colons (":") denote sub-options that can influence |
|
1648 | Options containing colons (":") denote sub-options that can influence | |
1647 | behavior for that specific path. Example: |
|
1649 | behavior for that specific path. Example: | |
1648 |
|
1650 | |||
1649 | [paths] |
|
1651 | [paths] | |
1650 | my_server = https://example.com/my_path |
|
1652 | my_server = https://example.com/my_path | |
1651 | my_server:pushurl = ssh://example.com/my_path |
|
1653 | my_server:pushurl = ssh://example.com/my_path | |
1652 |
|
1654 | |||
1653 | The following sub-options can be defined: |
|
1655 | The following sub-options can be defined: | |
1654 |
|
1656 | |||
1655 | "pushurl" |
|
1657 | "pushurl" | |
1656 | The URL to use for push operations. If not defined, the location |
|
1658 | The URL to use for push operations. If not defined, the location | |
1657 | defined by the path's main entry is used. |
|
1659 | defined by the path's main entry is used. | |
1658 |
|
1660 | |||
1659 | "pushrev" |
|
1661 | "pushrev" | |
1660 | A revset defining which revisions to push by default. |
|
1662 | A revset defining which revisions to push by default. | |
1661 |
|
1663 | |||
1662 | When 'hg push' is executed without a "-r" argument, the revset defined |
|
1664 | When 'hg push' is executed without a "-r" argument, the revset defined | |
1663 | by this sub-option is evaluated to determine what to push. |
|
1665 | by this sub-option is evaluated to determine what to push. | |
1664 |
|
1666 | |||
1665 | For example, a value of "." will push the working directory's revision |
|
1667 | For example, a value of "." will push the working directory's revision | |
1666 | by default. |
|
1668 | by default. | |
1667 |
|
1669 | |||
1668 | Revsets specifying bookmarks will not result in the bookmark being |
|
1670 | Revsets specifying bookmarks will not result in the bookmark being | |
1669 | pushed. |
|
1671 | pushed. | |
1670 |
|
1672 | |||
1671 | The following special named paths exist: |
|
1673 | The following special named paths exist: | |
1672 |
|
1674 | |||
1673 | "default" |
|
1675 | "default" | |
1674 | The URL or directory to use when no source or remote is specified. |
|
1676 | The URL or directory to use when no source or remote is specified. | |
1675 |
|
1677 | |||
1676 | 'hg clone' will automatically define this path to the location the |
|
1678 | 'hg clone' will automatically define this path to the location the | |
1677 | repository was cloned from. |
|
1679 | repository was cloned from. | |
1678 |
|
1680 | |||
1679 | "default-push" |
|
1681 | "default-push" | |
1680 | (deprecated) The URL or directory for the default 'hg push' location. |
|
1682 | (deprecated) The URL or directory for the default 'hg push' location. | |
1681 | "default:pushurl" should be used instead. |
|
1683 | "default:pushurl" should be used instead. | |
1682 |
|
1684 | |||
1683 | $ hg help glossary.mcguffin |
|
1685 | $ hg help glossary.mcguffin | |
1684 | abort: help section not found: glossary.mcguffin |
|
1686 | abort: help section not found: glossary.mcguffin | |
1685 | [255] |
|
1687 | [255] | |
1686 |
|
1688 | |||
1687 | $ hg help glossary.mc.guffin |
|
1689 | $ hg help glossary.mc.guffin | |
1688 | abort: help section not found: glossary.mc.guffin |
|
1690 | abort: help section not found: glossary.mc.guffin | |
1689 | [255] |
|
1691 | [255] | |
1690 |
|
1692 | |||
1691 | $ hg help template.files |
|
1693 | $ hg help template.files | |
1692 | files List of strings. All files modified, added, or removed by |
|
1694 | files List of strings. All files modified, added, or removed by | |
1693 | this changeset. |
|
1695 | this changeset. | |
1694 | files(pattern) |
|
1696 | files(pattern) | |
1695 | All files of the current changeset matching the pattern. See |
|
1697 | All files of the current changeset matching the pattern. See | |
1696 | 'hg help patterns'. |
|
1698 | 'hg help patterns'. | |
1697 |
|
1699 | |||
1698 | Test section lookup by translated message |
|
1700 | Test section lookup by translated message | |
1699 |
|
1701 | |||
1700 | str.lower() instead of encoding.lower(str) on translated message might |
|
1702 | str.lower() instead of encoding.lower(str) on translated message might | |
1701 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) |
|
1703 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) | |
1702 | as the second or later byte of multi-byte character. |
|
1704 | as the second or later byte of multi-byte character. | |
1703 |
|
1705 | |||
1704 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) |
|
1706 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) | |
1705 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this |
|
1707 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this | |
1706 | replacement makes message meaningless. |
|
1708 | replacement makes message meaningless. | |
1707 |
|
1709 | |||
1708 | This tests that section lookup by translated string isn't broken by |
|
1710 | This tests that section lookup by translated string isn't broken by | |
1709 | such str.lower(). |
|
1711 | such str.lower(). | |
1710 |
|
1712 | |||
1711 | $ $PYTHON <<EOF |
|
1713 | $ $PYTHON <<EOF | |
1712 | > def escape(s): |
|
1714 | > def escape(s): | |
1713 | > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) |
|
1715 | > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) | |
1714 | > # translation of "record" in ja_JP.cp932 |
|
1716 | > # translation of "record" in ja_JP.cp932 | |
1715 | > upper = "\x8bL\x98^" |
|
1717 | > upper = "\x8bL\x98^" | |
1716 | > # str.lower()-ed section name should be treated as different one |
|
1718 | > # str.lower()-ed section name should be treated as different one | |
1717 | > lower = "\x8bl\x98^" |
|
1719 | > lower = "\x8bl\x98^" | |
1718 | > with open('ambiguous.py', 'w') as fp: |
|
1720 | > with open('ambiguous.py', 'w') as fp: | |
1719 | > fp.write("""# ambiguous section names in ja_JP.cp932 |
|
1721 | > fp.write("""# ambiguous section names in ja_JP.cp932 | |
1720 | > u'''summary of extension |
|
1722 | > u'''summary of extension | |
1721 | > |
|
1723 | > | |
1722 | > %s |
|
1724 | > %s | |
1723 | > ---- |
|
1725 | > ---- | |
1724 | > |
|
1726 | > | |
1725 | > Upper name should show only this message |
|
1727 | > Upper name should show only this message | |
1726 | > |
|
1728 | > | |
1727 | > %s |
|
1729 | > %s | |
1728 | > ---- |
|
1730 | > ---- | |
1729 | > |
|
1731 | > | |
1730 | > Lower name should show only this message |
|
1732 | > Lower name should show only this message | |
1731 | > |
|
1733 | > | |
1732 | > subsequent section |
|
1734 | > subsequent section | |
1733 | > ------------------ |
|
1735 | > ------------------ | |
1734 | > |
|
1736 | > | |
1735 | > This should be hidden at 'hg help ambiguous' with section name. |
|
1737 | > This should be hidden at 'hg help ambiguous' with section name. | |
1736 | > ''' |
|
1738 | > ''' | |
1737 | > """ % (escape(upper), escape(lower))) |
|
1739 | > """ % (escape(upper), escape(lower))) | |
1738 | > EOF |
|
1740 | > EOF | |
1739 |
|
1741 | |||
1740 | $ cat >> $HGRCPATH <<EOF |
|
1742 | $ cat >> $HGRCPATH <<EOF | |
1741 | > [extensions] |
|
1743 | > [extensions] | |
1742 | > ambiguous = ./ambiguous.py |
|
1744 | > ambiguous = ./ambiguous.py | |
1743 | > EOF |
|
1745 | > EOF | |
1744 |
|
1746 | |||
1745 | $ $PYTHON <<EOF | sh |
|
1747 | $ $PYTHON <<EOF | sh | |
1746 | > upper = "\x8bL\x98^" |
|
1748 | > upper = "\x8bL\x98^" | |
1747 | > print("hg --encoding cp932 help -e ambiguous.%s" % upper) |
|
1749 | > print("hg --encoding cp932 help -e ambiguous.%s" % upper) | |
1748 | > EOF |
|
1750 | > EOF | |
1749 | \x8bL\x98^ (esc) |
|
1751 | \x8bL\x98^ (esc) | |
1750 | ---- |
|
1752 | ---- | |
1751 |
|
1753 | |||
1752 | Upper name should show only this message |
|
1754 | Upper name should show only this message | |
1753 |
|
1755 | |||
1754 |
|
1756 | |||
1755 | $ $PYTHON <<EOF | sh |
|
1757 | $ $PYTHON <<EOF | sh | |
1756 | > lower = "\x8bl\x98^" |
|
1758 | > lower = "\x8bl\x98^" | |
1757 | > print("hg --encoding cp932 help -e ambiguous.%s" % lower) |
|
1759 | > print("hg --encoding cp932 help -e ambiguous.%s" % lower) | |
1758 | > EOF |
|
1760 | > EOF | |
1759 | \x8bl\x98^ (esc) |
|
1761 | \x8bl\x98^ (esc) | |
1760 | ---- |
|
1762 | ---- | |
1761 |
|
1763 | |||
1762 | Lower name should show only this message |
|
1764 | Lower name should show only this message | |
1763 |
|
1765 | |||
1764 |
|
1766 | |||
1765 | $ cat >> $HGRCPATH <<EOF |
|
1767 | $ cat >> $HGRCPATH <<EOF | |
1766 | > [extensions] |
|
1768 | > [extensions] | |
1767 | > ambiguous = ! |
|
1769 | > ambiguous = ! | |
1768 | > EOF |
|
1770 | > EOF | |
1769 |
|
1771 | |||
1770 | Show help content of disabled extensions |
|
1772 | Show help content of disabled extensions | |
1771 |
|
1773 | |||
1772 | $ cat >> $HGRCPATH <<EOF |
|
1774 | $ cat >> $HGRCPATH <<EOF | |
1773 | > [extensions] |
|
1775 | > [extensions] | |
1774 | > ambiguous = !./ambiguous.py |
|
1776 | > ambiguous = !./ambiguous.py | |
1775 | > EOF |
|
1777 | > EOF | |
1776 | $ hg help -e ambiguous |
|
1778 | $ hg help -e ambiguous | |
1777 | ambiguous extension - (no help text available) |
|
1779 | ambiguous extension - (no help text available) | |
1778 |
|
1780 | |||
1779 | (use 'hg help extensions' for information on enabling extensions) |
|
1781 | (use 'hg help extensions' for information on enabling extensions) | |
1780 |
|
1782 | |||
1781 | Test dynamic list of merge tools only shows up once |
|
1783 | Test dynamic list of merge tools only shows up once | |
1782 | $ hg help merge-tools |
|
1784 | $ hg help merge-tools | |
1783 | Merge Tools |
|
1785 | Merge Tools | |
1784 | """"""""""" |
|
1786 | """"""""""" | |
1785 |
|
1787 | |||
1786 | To merge files Mercurial uses merge tools. |
|
1788 | To merge files Mercurial uses merge tools. | |
1787 |
|
1789 | |||
1788 | A merge tool combines two different versions of a file into a merged file. |
|
1790 | A merge tool combines two different versions of a file into a merged file. | |
1789 | Merge tools are given the two files and the greatest common ancestor of |
|
1791 | Merge tools are given the two files and the greatest common ancestor of | |
1790 | the two file versions, so they can determine the changes made on both |
|
1792 | the two file versions, so they can determine the changes made on both | |
1791 | branches. |
|
1793 | branches. | |
1792 |
|
1794 | |||
1793 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg |
|
1795 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg | |
1794 | backout' and in several extensions. |
|
1796 | backout' and in several extensions. | |
1795 |
|
1797 | |||
1796 | Usually, the merge tool tries to automatically reconcile the files by |
|
1798 | Usually, the merge tool tries to automatically reconcile the files by | |
1797 | combining all non-overlapping changes that occurred separately in the two |
|
1799 | combining all non-overlapping changes that occurred separately in the two | |
1798 | different evolutions of the same initial base file. Furthermore, some |
|
1800 | different evolutions of the same initial base file. Furthermore, some | |
1799 | interactive merge programs make it easier to manually resolve conflicting |
|
1801 | interactive merge programs make it easier to manually resolve conflicting | |
1800 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1802 | merges, either in a graphical way, or by inserting some conflict markers. | |
1801 | Mercurial does not include any interactive merge programs but relies on |
|
1803 | Mercurial does not include any interactive merge programs but relies on | |
1802 | external tools for that. |
|
1804 | external tools for that. | |
1803 |
|
1805 | |||
1804 | Available merge tools |
|
1806 | Available merge tools | |
1805 | ===================== |
|
1807 | ===================== | |
1806 |
|
1808 | |||
1807 | External merge tools and their properties are configured in the merge- |
|
1809 | External merge tools and their properties are configured in the merge- | |
1808 | tools configuration section - see hgrc(5) - but they can often just be |
|
1810 | tools configuration section - see hgrc(5) - but they can often just be | |
1809 | named by their executable. |
|
1811 | named by their executable. | |
1810 |
|
1812 | |||
1811 | A merge tool is generally usable if its executable can be found on the |
|
1813 | A merge tool is generally usable if its executable can be found on the | |
1812 | system and if it can handle the merge. The executable is found if it is an |
|
1814 | system and if it can handle the merge. The executable is found if it is an | |
1813 | absolute or relative executable path or the name of an application in the |
|
1815 | absolute or relative executable path or the name of an application in the | |
1814 | executable search path. The tool is assumed to be able to handle the merge |
|
1816 | executable search path. The tool is assumed to be able to handle the merge | |
1815 | if it can handle symlinks if the file is a symlink, if it can handle |
|
1817 | if it can handle symlinks if the file is a symlink, if it can handle | |
1816 | binary files if the file is binary, and if a GUI is available if the tool |
|
1818 | binary files if the file is binary, and if a GUI is available if the tool | |
1817 | requires a GUI. |
|
1819 | requires a GUI. | |
1818 |
|
1820 | |||
1819 | There are some internal merge tools which can be used. The internal merge |
|
1821 | There are some internal merge tools which can be used. The internal merge | |
1820 | tools are: |
|
1822 | tools are: | |
1821 |
|
1823 | |||
1822 | ":dump" |
|
1824 | ":dump" | |
1823 | Creates three versions of the files to merge, containing the contents of |
|
1825 | Creates three versions of the files to merge, containing the contents of | |
1824 | local, other and base. These files can then be used to perform a merge |
|
1826 | local, other and base. These files can then be used to perform a merge | |
1825 | manually. If the file to be merged is named "a.txt", these files will |
|
1827 | manually. If the file to be merged is named "a.txt", these files will | |
1826 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
1828 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and | |
1827 | they will be placed in the same directory as "a.txt". |
|
1829 | they will be placed in the same directory as "a.txt". | |
1828 |
|
1830 | |||
1829 | This implies premerge. Therefore, files aren't dumped, if premerge runs |
|
1831 | This implies premerge. Therefore, files aren't dumped, if premerge runs | |
1830 | successfully. Use :forcedump to forcibly write files out. |
|
1832 | successfully. Use :forcedump to forcibly write files out. | |
1831 |
|
1833 | |||
1832 | (actual capabilities: binary, symlink) |
|
1834 | (actual capabilities: binary, symlink) | |
1833 |
|
1835 | |||
1834 | ":fail" |
|
1836 | ":fail" | |
1835 | Rather than attempting to merge files that were modified on both |
|
1837 | Rather than attempting to merge files that were modified on both | |
1836 | branches, it marks them as unresolved. The resolve command must be used |
|
1838 | branches, it marks them as unresolved. The resolve command must be used | |
1837 | to resolve these conflicts. |
|
1839 | to resolve these conflicts. | |
1838 |
|
1840 | |||
1839 | (actual capabilities: binary, symlink) |
|
1841 | (actual capabilities: binary, symlink) | |
1840 |
|
1842 | |||
1841 | ":forcedump" |
|
1843 | ":forcedump" | |
1842 | Creates three versions of the files as same as :dump, but omits |
|
1844 | Creates three versions of the files as same as :dump, but omits | |
1843 | premerge. |
|
1845 | premerge. | |
1844 |
|
1846 | |||
1845 | (actual capabilities: binary, symlink) |
|
1847 | (actual capabilities: binary, symlink) | |
1846 |
|
1848 | |||
1847 | ":local" |
|
1849 | ":local" | |
1848 | Uses the local 'p1()' version of files as the merged version. |
|
1850 | Uses the local 'p1()' version of files as the merged version. | |
1849 |
|
1851 | |||
1850 | (actual capabilities: binary, symlink) |
|
1852 | (actual capabilities: binary, symlink) | |
1851 |
|
1853 | |||
1852 | ":merge" |
|
1854 | ":merge" | |
1853 | Uses the internal non-interactive simple merge algorithm for merging |
|
1855 | Uses the internal non-interactive simple merge algorithm for merging | |
1854 | files. It will fail if there are any conflicts and leave markers in the |
|
1856 | files. It will fail if there are any conflicts and leave markers in the | |
1855 | partially merged file. Markers will have two sections, one for each side |
|
1857 | partially merged file. Markers will have two sections, one for each side | |
1856 | of merge. |
|
1858 | of merge. | |
1857 |
|
1859 | |||
1858 | ":merge-local" |
|
1860 | ":merge-local" | |
1859 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1861 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
1860 | local 'p1()' changes. |
|
1862 | local 'p1()' changes. | |
1861 |
|
1863 | |||
1862 | ":merge-other" |
|
1864 | ":merge-other" | |
1863 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1865 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
1864 | other 'p2()' changes. |
|
1866 | other 'p2()' changes. | |
1865 |
|
1867 | |||
1866 | ":merge3" |
|
1868 | ":merge3" | |
1867 | Uses the internal non-interactive simple merge algorithm for merging |
|
1869 | Uses the internal non-interactive simple merge algorithm for merging | |
1868 | files. It will fail if there are any conflicts and leave markers in the |
|
1870 | files. It will fail if there are any conflicts and leave markers in the | |
1869 | partially merged file. Marker will have three sections, one from each |
|
1871 | partially merged file. Marker will have three sections, one from each | |
1870 | side of the merge and one for the base content. |
|
1872 | side of the merge and one for the base content. | |
1871 |
|
1873 | |||
1872 | ":other" |
|
1874 | ":other" | |
1873 | Uses the other 'p2()' version of files as the merged version. |
|
1875 | Uses the other 'p2()' version of files as the merged version. | |
1874 |
|
1876 | |||
1875 | (actual capabilities: binary, symlink) |
|
1877 | (actual capabilities: binary, symlink) | |
1876 |
|
1878 | |||
1877 | ":prompt" |
|
1879 | ":prompt" | |
1878 | Asks the user which of the local 'p1()' or the other 'p2()' version to |
|
1880 | Asks the user which of the local 'p1()' or the other 'p2()' version to | |
1879 | keep as the merged version. |
|
1881 | keep as the merged version. | |
1880 |
|
1882 | |||
1881 | (actual capabilities: binary, symlink) |
|
1883 | (actual capabilities: binary, symlink) | |
1882 |
|
1884 | |||
1883 | ":tagmerge" |
|
1885 | ":tagmerge" | |
1884 | Uses the internal tag merge algorithm (experimental). |
|
1886 | Uses the internal tag merge algorithm (experimental). | |
1885 |
|
1887 | |||
1886 | ":union" |
|
1888 | ":union" | |
1887 | Uses the internal non-interactive simple merge algorithm for merging |
|
1889 | Uses the internal non-interactive simple merge algorithm for merging | |
1888 | files. It will use both left and right sides for conflict regions. No |
|
1890 | files. It will use both left and right sides for conflict regions. No | |
1889 | markers are inserted. |
|
1891 | markers are inserted. | |
1890 |
|
1892 | |||
1891 | Internal tools are always available and do not require a GUI but will by |
|
1893 | Internal tools are always available and do not require a GUI but will by | |
1892 | default not handle symlinks or binary files. See next section for detail |
|
1894 | default not handle symlinks or binary files. See next section for detail | |
1893 | about "actual capabilities" described above. |
|
1895 | about "actual capabilities" described above. | |
1894 |
|
1896 | |||
1895 | Choosing a merge tool |
|
1897 | Choosing a merge tool | |
1896 | ===================== |
|
1898 | ===================== | |
1897 |
|
1899 | |||
1898 | Mercurial uses these rules when deciding which merge tool to use: |
|
1900 | Mercurial uses these rules when deciding which merge tool to use: | |
1899 |
|
1901 | |||
1900 | 1. If a tool has been specified with the --tool option to merge or |
|
1902 | 1. If a tool has been specified with the --tool option to merge or | |
1901 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
1903 | resolve, it is used. If it is the name of a tool in the merge-tools | |
1902 | configuration, its configuration is used. Otherwise the specified tool |
|
1904 | configuration, its configuration is used. Otherwise the specified tool | |
1903 | must be executable by the shell. |
|
1905 | must be executable by the shell. | |
1904 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
1906 | 2. If the "HGMERGE" environment variable is present, its value is used and | |
1905 | must be executable by the shell. |
|
1907 | must be executable by the shell. | |
1906 | 3. If the filename of the file to be merged matches any of the patterns in |
|
1908 | 3. If the filename of the file to be merged matches any of the patterns in | |
1907 | the merge-patterns configuration section, the first usable merge tool |
|
1909 | the merge-patterns configuration section, the first usable merge tool | |
1908 | corresponding to a matching pattern is used. |
|
1910 | corresponding to a matching pattern is used. | |
1909 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
1911 | 4. If ui.merge is set it will be considered next. If the value is not the | |
1910 | name of a configured tool, the specified value is used and must be |
|
1912 | name of a configured tool, the specified value is used and must be | |
1911 | executable by the shell. Otherwise the named tool is used if it is |
|
1913 | executable by the shell. Otherwise the named tool is used if it is | |
1912 | usable. |
|
1914 | usable. | |
1913 | 5. If any usable merge tools are present in the merge-tools configuration |
|
1915 | 5. If any usable merge tools are present in the merge-tools configuration | |
1914 | section, the one with the highest priority is used. |
|
1916 | section, the one with the highest priority is used. | |
1915 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
1917 | 6. If a program named "hgmerge" can be found on the system, it is used - | |
1916 | but it will by default not be used for symlinks and binary files. |
|
1918 | but it will by default not be used for symlinks and binary files. | |
1917 | 7. If the file to be merged is not binary and is not a symlink, then |
|
1919 | 7. If the file to be merged is not binary and is not a symlink, then | |
1918 | internal ":merge" is used. |
|
1920 | internal ":merge" is used. | |
1919 | 8. Otherwise, ":prompt" is used. |
|
1921 | 8. Otherwise, ":prompt" is used. | |
1920 |
|
1922 | |||
1921 | For historical reason, Mercurial assumes capabilities of internal merge |
|
1923 | For historical reason, Mercurial assumes capabilities of internal merge | |
1922 | tools as below while examining rules above, regardless of actual |
|
1924 | tools as below while examining rules above, regardless of actual | |
1923 | capabilities of them. |
|
1925 | capabilities of them. | |
1924 |
|
1926 | |||
1925 | step specified via binary symlink |
|
1927 | step specified via binary symlink | |
1926 | ---------------------------------- |
|
1928 | ---------------------------------- | |
1927 | 1. --tool o o |
|
1929 | 1. --tool o o | |
1928 | 2. HGMERGE o o |
|
1930 | 2. HGMERGE o o | |
1929 | 3. merge-patterns o (*) x (*) |
|
1931 | 3. merge-patterns o (*) x (*) | |
1930 | 4. ui.merge x (*) x (*) |
|
1932 | 4. ui.merge x (*) x (*) | |
1931 |
|
1933 | |||
1932 | If "merge.strict-capability-check" configuration is true, Mercurial checks |
|
1934 | If "merge.strict-capability-check" configuration is true, Mercurial checks | |
1933 | capabilities of internal merge tools strictly in (*) cases above. It is |
|
1935 | capabilities of internal merge tools strictly in (*) cases above. It is | |
1934 | false by default for backward compatibility. |
|
1936 | false by default for backward compatibility. | |
1935 |
|
1937 | |||
1936 | Note: |
|
1938 | Note: | |
1937 | After selecting a merge program, Mercurial will by default attempt to |
|
1939 | After selecting a merge program, Mercurial will by default attempt to | |
1938 | merge the files using a simple merge algorithm first. Only if it |
|
1940 | merge the files using a simple merge algorithm first. Only if it | |
1939 | doesn't succeed because of conflicting changes will Mercurial actually |
|
1941 | doesn't succeed because of conflicting changes will Mercurial actually | |
1940 | execute the merge program. Whether to use the simple merge algorithm |
|
1942 | execute the merge program. Whether to use the simple merge algorithm | |
1941 | first can be controlled by the premerge setting of the merge tool. |
|
1943 | first can be controlled by the premerge setting of the merge tool. | |
1942 | Premerge is enabled by default unless the file is binary or a symlink. |
|
1944 | Premerge is enabled by default unless the file is binary or a symlink. | |
1943 |
|
1945 | |||
1944 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
1946 | See the merge-tools and ui sections of hgrc(5) for details on the | |
1945 | configuration of merge tools. |
|
1947 | configuration of merge tools. | |
1946 |
|
1948 | |||
1947 | Compression engines listed in `hg help bundlespec` |
|
1949 | Compression engines listed in `hg help bundlespec` | |
1948 |
|
1950 | |||
1949 | $ hg help bundlespec | grep gzip |
|
1951 | $ hg help bundlespec | grep gzip | |
1950 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression |
|
1952 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression | |
1951 | An algorithm that produces smaller bundles than "gzip". |
|
1953 | An algorithm that produces smaller bundles than "gzip". | |
1952 | This engine will likely produce smaller bundles than "gzip" but will be |
|
1954 | This engine will likely produce smaller bundles than "gzip" but will be | |
1953 | "gzip" |
|
1955 | "gzip" | |
1954 | better compression than "gzip". It also frequently yields better (?) |
|
1956 | better compression than "gzip". It also frequently yields better (?) | |
1955 |
|
1957 | |||
1956 | Test usage of section marks in help documents |
|
1958 | Test usage of section marks in help documents | |
1957 |
|
1959 | |||
1958 | $ cd "$TESTDIR"/../doc |
|
1960 | $ cd "$TESTDIR"/../doc | |
1959 | $ $PYTHON check-seclevel.py |
|
1961 | $ $PYTHON check-seclevel.py | |
1960 | $ cd $TESTTMP |
|
1962 | $ cd $TESTTMP | |
1961 |
|
1963 | |||
1962 | #if serve |
|
1964 | #if serve | |
1963 |
|
1965 | |||
1964 | Test the help pages in hgweb. |
|
1966 | Test the help pages in hgweb. | |
1965 |
|
1967 | |||
1966 | Dish up an empty repo; serve it cold. |
|
1968 | Dish up an empty repo; serve it cold. | |
1967 |
|
1969 | |||
1968 | $ hg init "$TESTTMP/test" |
|
1970 | $ hg init "$TESTTMP/test" | |
1969 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
1971 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid | |
1970 | $ cat hg.pid >> $DAEMON_PIDS |
|
1972 | $ cat hg.pid >> $DAEMON_PIDS | |
1971 |
|
1973 | |||
1972 | $ get-with-headers.py $LOCALIP:$HGPORT "help" |
|
1974 | $ get-with-headers.py $LOCALIP:$HGPORT "help" | |
1973 | 200 Script output follows |
|
1975 | 200 Script output follows | |
1974 |
|
1976 | |||
1975 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1977 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
1976 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1978 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
1977 | <head> |
|
1979 | <head> | |
1978 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1980 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
1979 | <meta name="robots" content="index, nofollow" /> |
|
1981 | <meta name="robots" content="index, nofollow" /> | |
1980 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1982 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
1981 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1983 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
1982 |
|
1984 | |||
1983 | <title>Help: Index</title> |
|
1985 | <title>Help: Index</title> | |
1984 | </head> |
|
1986 | </head> | |
1985 | <body> |
|
1987 | <body> | |
1986 |
|
1988 | |||
1987 | <div class="container"> |
|
1989 | <div class="container"> | |
1988 | <div class="menu"> |
|
1990 | <div class="menu"> | |
1989 | <div class="logo"> |
|
1991 | <div class="logo"> | |
1990 | <a href="https://mercurial-scm.org/"> |
|
1992 | <a href="https://mercurial-scm.org/"> | |
1991 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1993 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
1992 | </div> |
|
1994 | </div> | |
1993 | <ul> |
|
1995 | <ul> | |
1994 | <li><a href="/shortlog">log</a></li> |
|
1996 | <li><a href="/shortlog">log</a></li> | |
1995 | <li><a href="/graph">graph</a></li> |
|
1997 | <li><a href="/graph">graph</a></li> | |
1996 | <li><a href="/tags">tags</a></li> |
|
1998 | <li><a href="/tags">tags</a></li> | |
1997 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1999 | <li><a href="/bookmarks">bookmarks</a></li> | |
1998 | <li><a href="/branches">branches</a></li> |
|
2000 | <li><a href="/branches">branches</a></li> | |
1999 | </ul> |
|
2001 | </ul> | |
2000 | <ul> |
|
2002 | <ul> | |
2001 | <li class="active">help</li> |
|
2003 | <li class="active">help</li> | |
2002 | </ul> |
|
2004 | </ul> | |
2003 | </div> |
|
2005 | </div> | |
2004 |
|
2006 | |||
2005 | <div class="main"> |
|
2007 | <div class="main"> | |
2006 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2008 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2007 |
|
2009 | |||
2008 | <form class="search" action="/log"> |
|
2010 | <form class="search" action="/log"> | |
2009 |
|
2011 | |||
2010 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2012 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2011 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2013 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2012 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2014 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2013 | </form> |
|
2015 | </form> | |
2014 | <table class="bigtable"> |
|
2016 | <table class="bigtable"> | |
2015 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
2017 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
2016 |
|
2018 | |||
2017 | <tr><td> |
|
2019 | <tr><td> | |
2018 | <a href="/help/bundlespec"> |
|
2020 | <a href="/help/bundlespec"> | |
2019 | bundlespec |
|
2021 | bundlespec | |
2020 | </a> |
|
2022 | </a> | |
2021 | </td><td> |
|
2023 | </td><td> | |
2022 | Bundle File Formats |
|
2024 | Bundle File Formats | |
2023 | </td></tr> |
|
2025 | </td></tr> | |
2024 | <tr><td> |
|
2026 | <tr><td> | |
2025 | <a href="/help/color"> |
|
2027 | <a href="/help/color"> | |
2026 | color |
|
2028 | color | |
2027 | </a> |
|
2029 | </a> | |
2028 | </td><td> |
|
2030 | </td><td> | |
2029 | Colorizing Outputs |
|
2031 | Colorizing Outputs | |
2030 | </td></tr> |
|
2032 | </td></tr> | |
2031 | <tr><td> |
|
2033 | <tr><td> | |
2032 | <a href="/help/config"> |
|
2034 | <a href="/help/config"> | |
2033 | config |
|
2035 | config | |
2034 | </a> |
|
2036 | </a> | |
2035 | </td><td> |
|
2037 | </td><td> | |
2036 | Configuration Files |
|
2038 | Configuration Files | |
2037 | </td></tr> |
|
2039 | </td></tr> | |
2038 | <tr><td> |
|
2040 | <tr><td> | |
2039 | <a href="/help/dates"> |
|
2041 | <a href="/help/dates"> | |
2040 | dates |
|
2042 | dates | |
2041 | </a> |
|
2043 | </a> | |
2042 | </td><td> |
|
2044 | </td><td> | |
2043 | Date Formats |
|
2045 | Date Formats | |
2044 | </td></tr> |
|
2046 | </td></tr> | |
2045 | <tr><td> |
|
2047 | <tr><td> | |
2046 | <a href="/help/deprecated"> |
|
2048 | <a href="/help/deprecated"> | |
2047 | deprecated |
|
2049 | deprecated | |
2048 | </a> |
|
2050 | </a> | |
2049 | </td><td> |
|
2051 | </td><td> | |
2050 | Deprecated Features |
|
2052 | Deprecated Features | |
2051 | </td></tr> |
|
2053 | </td></tr> | |
2052 | <tr><td> |
|
2054 | <tr><td> | |
2053 | <a href="/help/diffs"> |
|
2055 | <a href="/help/diffs"> | |
2054 | diffs |
|
2056 | diffs | |
2055 | </a> |
|
2057 | </a> | |
2056 | </td><td> |
|
2058 | </td><td> | |
2057 | Diff Formats |
|
2059 | Diff Formats | |
2058 | </td></tr> |
|
2060 | </td></tr> | |
2059 | <tr><td> |
|
2061 | <tr><td> | |
2060 | <a href="/help/environment"> |
|
2062 | <a href="/help/environment"> | |
2061 | environment |
|
2063 | environment | |
2062 | </a> |
|
2064 | </a> | |
2063 | </td><td> |
|
2065 | </td><td> | |
2064 | Environment Variables |
|
2066 | Environment Variables | |
2065 | </td></tr> |
|
2067 | </td></tr> | |
2066 | <tr><td> |
|
2068 | <tr><td> | |
2067 | <a href="/help/extensions"> |
|
2069 | <a href="/help/extensions"> | |
2068 | extensions |
|
2070 | extensions | |
2069 | </a> |
|
2071 | </a> | |
2070 | </td><td> |
|
2072 | </td><td> | |
2071 | Using Additional Features |
|
2073 | Using Additional Features | |
2072 | </td></tr> |
|
2074 | </td></tr> | |
2073 | <tr><td> |
|
2075 | <tr><td> | |
2074 | <a href="/help/filesets"> |
|
2076 | <a href="/help/filesets"> | |
2075 | filesets |
|
2077 | filesets | |
2076 | </a> |
|
2078 | </a> | |
2077 | </td><td> |
|
2079 | </td><td> | |
2078 | Specifying File Sets |
|
2080 | Specifying File Sets | |
2079 | </td></tr> |
|
2081 | </td></tr> | |
2080 | <tr><td> |
|
2082 | <tr><td> | |
2081 | <a href="/help/flags"> |
|
2083 | <a href="/help/flags"> | |
2082 | flags |
|
2084 | flags | |
2083 | </a> |
|
2085 | </a> | |
2084 | </td><td> |
|
2086 | </td><td> | |
2085 | Command-line flags |
|
2087 | Command-line flags | |
2086 | </td></tr> |
|
2088 | </td></tr> | |
2087 | <tr><td> |
|
2089 | <tr><td> | |
2088 | <a href="/help/glossary"> |
|
2090 | <a href="/help/glossary"> | |
2089 | glossary |
|
2091 | glossary | |
2090 | </a> |
|
2092 | </a> | |
2091 | </td><td> |
|
2093 | </td><td> | |
2092 | Glossary |
|
2094 | Glossary | |
2093 | </td></tr> |
|
2095 | </td></tr> | |
2094 | <tr><td> |
|
2096 | <tr><td> | |
2095 | <a href="/help/hgignore"> |
|
2097 | <a href="/help/hgignore"> | |
2096 | hgignore |
|
2098 | hgignore | |
2097 | </a> |
|
2099 | </a> | |
2098 | </td><td> |
|
2100 | </td><td> | |
2099 | Syntax for Mercurial Ignore Files |
|
2101 | Syntax for Mercurial Ignore Files | |
2100 | </td></tr> |
|
2102 | </td></tr> | |
2101 | <tr><td> |
|
2103 | <tr><td> | |
2102 | <a href="/help/hgweb"> |
|
2104 | <a href="/help/hgweb"> | |
2103 | hgweb |
|
2105 | hgweb | |
2104 | </a> |
|
2106 | </a> | |
2105 | </td><td> |
|
2107 | </td><td> | |
2106 | Configuring hgweb |
|
2108 | Configuring hgweb | |
2107 | </td></tr> |
|
2109 | </td></tr> | |
2108 | <tr><td> |
|
2110 | <tr><td> | |
2109 | <a href="/help/internals"> |
|
2111 | <a href="/help/internals"> | |
2110 | internals |
|
2112 | internals | |
2111 | </a> |
|
2113 | </a> | |
2112 | </td><td> |
|
2114 | </td><td> | |
2113 | Technical implementation topics |
|
2115 | Technical implementation topics | |
2114 | </td></tr> |
|
2116 | </td></tr> | |
2115 | <tr><td> |
|
2117 | <tr><td> | |
2116 | <a href="/help/merge-tools"> |
|
2118 | <a href="/help/merge-tools"> | |
2117 | merge-tools |
|
2119 | merge-tools | |
2118 | </a> |
|
2120 | </a> | |
2119 | </td><td> |
|
2121 | </td><td> | |
2120 | Merge Tools |
|
2122 | Merge Tools | |
2121 | </td></tr> |
|
2123 | </td></tr> | |
2122 | <tr><td> |
|
2124 | <tr><td> | |
2123 | <a href="/help/pager"> |
|
2125 | <a href="/help/pager"> | |
2124 | pager |
|
2126 | pager | |
2125 | </a> |
|
2127 | </a> | |
2126 | </td><td> |
|
2128 | </td><td> | |
2127 | Pager Support |
|
2129 | Pager Support | |
2128 | </td></tr> |
|
2130 | </td></tr> | |
2129 | <tr><td> |
|
2131 | <tr><td> | |
2130 | <a href="/help/patterns"> |
|
2132 | <a href="/help/patterns"> | |
2131 | patterns |
|
2133 | patterns | |
2132 | </a> |
|
2134 | </a> | |
2133 | </td><td> |
|
2135 | </td><td> | |
2134 | File Name Patterns |
|
2136 | File Name Patterns | |
2135 | </td></tr> |
|
2137 | </td></tr> | |
2136 | <tr><td> |
|
2138 | <tr><td> | |
2137 | <a href="/help/phases"> |
|
2139 | <a href="/help/phases"> | |
2138 | phases |
|
2140 | phases | |
2139 | </a> |
|
2141 | </a> | |
2140 | </td><td> |
|
2142 | </td><td> | |
2141 | Working with Phases |
|
2143 | Working with Phases | |
2142 | </td></tr> |
|
2144 | </td></tr> | |
2143 | <tr><td> |
|
2145 | <tr><td> | |
2144 | <a href="/help/revisions"> |
|
2146 | <a href="/help/revisions"> | |
2145 | revisions |
|
2147 | revisions | |
2146 | </a> |
|
2148 | </a> | |
2147 | </td><td> |
|
2149 | </td><td> | |
2148 | Specifying Revisions |
|
2150 | Specifying Revisions | |
2149 | </td></tr> |
|
2151 | </td></tr> | |
2150 | <tr><td> |
|
2152 | <tr><td> | |
2151 | <a href="/help/scripting"> |
|
2153 | <a href="/help/scripting"> | |
2152 | scripting |
|
2154 | scripting | |
2153 | </a> |
|
2155 | </a> | |
2154 | </td><td> |
|
2156 | </td><td> | |
2155 | Using Mercurial from scripts and automation |
|
2157 | Using Mercurial from scripts and automation | |
2156 | </td></tr> |
|
2158 | </td></tr> | |
2157 | <tr><td> |
|
2159 | <tr><td> | |
2158 | <a href="/help/subrepos"> |
|
2160 | <a href="/help/subrepos"> | |
2159 | subrepos |
|
2161 | subrepos | |
2160 | </a> |
|
2162 | </a> | |
2161 | </td><td> |
|
2163 | </td><td> | |
2162 | Subrepositories |
|
2164 | Subrepositories | |
2163 | </td></tr> |
|
2165 | </td></tr> | |
2164 | <tr><td> |
|
2166 | <tr><td> | |
2165 | <a href="/help/templating"> |
|
2167 | <a href="/help/templating"> | |
2166 | templating |
|
2168 | templating | |
2167 | </a> |
|
2169 | </a> | |
2168 | </td><td> |
|
2170 | </td><td> | |
2169 | Template Usage |
|
2171 | Template Usage | |
2170 | </td></tr> |
|
2172 | </td></tr> | |
2171 | <tr><td> |
|
2173 | <tr><td> | |
2172 | <a href="/help/urls"> |
|
2174 | <a href="/help/urls"> | |
2173 | urls |
|
2175 | urls | |
2174 | </a> |
|
2176 | </a> | |
2175 | </td><td> |
|
2177 | </td><td> | |
2176 | URL Paths |
|
2178 | URL Paths | |
2177 | </td></tr> |
|
2179 | </td></tr> | |
2178 | <tr><td> |
|
2180 | <tr><td> | |
2179 | <a href="/help/topic-containing-verbose"> |
|
2181 | <a href="/help/topic-containing-verbose"> | |
2180 | topic-containing-verbose |
|
2182 | topic-containing-verbose | |
2181 | </a> |
|
2183 | </a> | |
2182 | </td><td> |
|
2184 | </td><td> | |
2183 | This is the topic to test omit indicating. |
|
2185 | This is the topic to test omit indicating. | |
2184 | </td></tr> |
|
2186 | </td></tr> | |
2185 |
|
2187 | |||
2186 |
|
2188 | |||
2187 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
2189 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> | |
2188 |
|
2190 | |||
2189 | <tr><td> |
|
2191 | <tr><td> | |
2190 | <a href="/help/add"> |
|
2192 | <a href="/help/add"> | |
2191 | add |
|
2193 | add | |
2192 | </a> |
|
2194 | </a> | |
2193 | </td><td> |
|
2195 | </td><td> | |
2194 | add the specified files on the next commit |
|
2196 | add the specified files on the next commit | |
2195 | </td></tr> |
|
2197 | </td></tr> | |
2196 | <tr><td> |
|
2198 | <tr><td> | |
2197 | <a href="/help/annotate"> |
|
2199 | <a href="/help/annotate"> | |
2198 | annotate |
|
2200 | annotate | |
2199 | </a> |
|
2201 | </a> | |
2200 | </td><td> |
|
2202 | </td><td> | |
2201 | show changeset information by line for each file |
|
2203 | show changeset information by line for each file | |
2202 | </td></tr> |
|
2204 | </td></tr> | |
2203 | <tr><td> |
|
2205 | <tr><td> | |
2204 | <a href="/help/clone"> |
|
2206 | <a href="/help/clone"> | |
2205 | clone |
|
2207 | clone | |
2206 | </a> |
|
2208 | </a> | |
2207 | </td><td> |
|
2209 | </td><td> | |
2208 | make a copy of an existing repository |
|
2210 | make a copy of an existing repository | |
2209 | </td></tr> |
|
2211 | </td></tr> | |
2210 | <tr><td> |
|
2212 | <tr><td> | |
2211 | <a href="/help/commit"> |
|
2213 | <a href="/help/commit"> | |
2212 | commit |
|
2214 | commit | |
2213 | </a> |
|
2215 | </a> | |
2214 | </td><td> |
|
2216 | </td><td> | |
2215 | commit the specified files or all outstanding changes |
|
2217 | commit the specified files or all outstanding changes | |
2216 | </td></tr> |
|
2218 | </td></tr> | |
2217 | <tr><td> |
|
2219 | <tr><td> | |
2218 | <a href="/help/diff"> |
|
2220 | <a href="/help/diff"> | |
2219 | diff |
|
2221 | diff | |
2220 | </a> |
|
2222 | </a> | |
2221 | </td><td> |
|
2223 | </td><td> | |
2222 | diff repository (or selected files) |
|
2224 | diff repository (or selected files) | |
2223 | </td></tr> |
|
2225 | </td></tr> | |
2224 | <tr><td> |
|
2226 | <tr><td> | |
2225 | <a href="/help/export"> |
|
2227 | <a href="/help/export"> | |
2226 | export |
|
2228 | export | |
2227 | </a> |
|
2229 | </a> | |
2228 | </td><td> |
|
2230 | </td><td> | |
2229 | dump the header and diffs for one or more changesets |
|
2231 | dump the header and diffs for one or more changesets | |
2230 | </td></tr> |
|
2232 | </td></tr> | |
2231 | <tr><td> |
|
2233 | <tr><td> | |
2232 | <a href="/help/forget"> |
|
2234 | <a href="/help/forget"> | |
2233 | forget |
|
2235 | forget | |
2234 | </a> |
|
2236 | </a> | |
2235 | </td><td> |
|
2237 | </td><td> | |
2236 | forget the specified files on the next commit |
|
2238 | forget the specified files on the next commit | |
2237 | </td></tr> |
|
2239 | </td></tr> | |
2238 | <tr><td> |
|
2240 | <tr><td> | |
2239 | <a href="/help/init"> |
|
2241 | <a href="/help/init"> | |
2240 | init |
|
2242 | init | |
2241 | </a> |
|
2243 | </a> | |
2242 | </td><td> |
|
2244 | </td><td> | |
2243 | create a new repository in the given directory |
|
2245 | create a new repository in the given directory | |
2244 | </td></tr> |
|
2246 | </td></tr> | |
2245 | <tr><td> |
|
2247 | <tr><td> | |
2246 | <a href="/help/log"> |
|
2248 | <a href="/help/log"> | |
2247 | log |
|
2249 | log | |
2248 | </a> |
|
2250 | </a> | |
2249 | </td><td> |
|
2251 | </td><td> | |
2250 | show revision history of entire repository or files |
|
2252 | show revision history of entire repository or files | |
2251 | </td></tr> |
|
2253 | </td></tr> | |
2252 | <tr><td> |
|
2254 | <tr><td> | |
2253 | <a href="/help/merge"> |
|
2255 | <a href="/help/merge"> | |
2254 | merge |
|
2256 | merge | |
2255 | </a> |
|
2257 | </a> | |
2256 | </td><td> |
|
2258 | </td><td> | |
2257 | merge another revision into working directory |
|
2259 | merge another revision into working directory | |
2258 | </td></tr> |
|
2260 | </td></tr> | |
2259 | <tr><td> |
|
2261 | <tr><td> | |
2260 | <a href="/help/pull"> |
|
2262 | <a href="/help/pull"> | |
2261 | pull |
|
2263 | pull | |
2262 | </a> |
|
2264 | </a> | |
2263 | </td><td> |
|
2265 | </td><td> | |
2264 | pull changes from the specified source |
|
2266 | pull changes from the specified source | |
2265 | </td></tr> |
|
2267 | </td></tr> | |
2266 | <tr><td> |
|
2268 | <tr><td> | |
2267 | <a href="/help/push"> |
|
2269 | <a href="/help/push"> | |
2268 | push |
|
2270 | push | |
2269 | </a> |
|
2271 | </a> | |
2270 | </td><td> |
|
2272 | </td><td> | |
2271 | push changes to the specified destination |
|
2273 | push changes to the specified destination | |
2272 | </td></tr> |
|
2274 | </td></tr> | |
2273 | <tr><td> |
|
2275 | <tr><td> | |
2274 | <a href="/help/remove"> |
|
2276 | <a href="/help/remove"> | |
2275 | remove |
|
2277 | remove | |
2276 | </a> |
|
2278 | </a> | |
2277 | </td><td> |
|
2279 | </td><td> | |
2278 | remove the specified files on the next commit |
|
2280 | remove the specified files on the next commit | |
2279 | </td></tr> |
|
2281 | </td></tr> | |
2280 | <tr><td> |
|
2282 | <tr><td> | |
2281 | <a href="/help/serve"> |
|
2283 | <a href="/help/serve"> | |
2282 | serve |
|
2284 | serve | |
2283 | </a> |
|
2285 | </a> | |
2284 | </td><td> |
|
2286 | </td><td> | |
2285 | start stand-alone webserver |
|
2287 | start stand-alone webserver | |
2286 | </td></tr> |
|
2288 | </td></tr> | |
2287 | <tr><td> |
|
2289 | <tr><td> | |
2288 | <a href="/help/status"> |
|
2290 | <a href="/help/status"> | |
2289 | status |
|
2291 | status | |
2290 | </a> |
|
2292 | </a> | |
2291 | </td><td> |
|
2293 | </td><td> | |
2292 | show changed files in the working directory |
|
2294 | show changed files in the working directory | |
2293 | </td></tr> |
|
2295 | </td></tr> | |
2294 | <tr><td> |
|
2296 | <tr><td> | |
2295 | <a href="/help/summary"> |
|
2297 | <a href="/help/summary"> | |
2296 | summary |
|
2298 | summary | |
2297 | </a> |
|
2299 | </a> | |
2298 | </td><td> |
|
2300 | </td><td> | |
2299 | summarize working directory state |
|
2301 | summarize working directory state | |
2300 | </td></tr> |
|
2302 | </td></tr> | |
2301 | <tr><td> |
|
2303 | <tr><td> | |
2302 | <a href="/help/update"> |
|
2304 | <a href="/help/update"> | |
2303 | update |
|
2305 | update | |
2304 | </a> |
|
2306 | </a> | |
2305 | </td><td> |
|
2307 | </td><td> | |
2306 | update working directory (or switch revisions) |
|
2308 | update working directory (or switch revisions) | |
2307 | </td></tr> |
|
2309 | </td></tr> | |
2308 |
|
2310 | |||
2309 |
|
2311 | |||
2310 |
|
2312 | |||
2311 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
2313 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> | |
2312 |
|
2314 | |||
2313 | <tr><td> |
|
2315 | <tr><td> | |
2314 | <a href="/help/addremove"> |
|
2316 | <a href="/help/addremove"> | |
2315 | addremove |
|
2317 | addremove | |
2316 | </a> |
|
2318 | </a> | |
2317 | </td><td> |
|
2319 | </td><td> | |
2318 | add all new files, delete all missing files |
|
2320 | add all new files, delete all missing files | |
2319 | </td></tr> |
|
2321 | </td></tr> | |
2320 | <tr><td> |
|
2322 | <tr><td> | |
2321 | <a href="/help/archive"> |
|
2323 | <a href="/help/archive"> | |
2322 | archive |
|
2324 | archive | |
2323 | </a> |
|
2325 | </a> | |
2324 | </td><td> |
|
2326 | </td><td> | |
2325 | create an unversioned archive of a repository revision |
|
2327 | create an unversioned archive of a repository revision | |
2326 | </td></tr> |
|
2328 | </td></tr> | |
2327 | <tr><td> |
|
2329 | <tr><td> | |
2328 | <a href="/help/backout"> |
|
2330 | <a href="/help/backout"> | |
2329 | backout |
|
2331 | backout | |
2330 | </a> |
|
2332 | </a> | |
2331 | </td><td> |
|
2333 | </td><td> | |
2332 | reverse effect of earlier changeset |
|
2334 | reverse effect of earlier changeset | |
2333 | </td></tr> |
|
2335 | </td></tr> | |
2334 | <tr><td> |
|
2336 | <tr><td> | |
2335 | <a href="/help/bisect"> |
|
2337 | <a href="/help/bisect"> | |
2336 | bisect |
|
2338 | bisect | |
2337 | </a> |
|
2339 | </a> | |
2338 | </td><td> |
|
2340 | </td><td> | |
2339 | subdivision search of changesets |
|
2341 | subdivision search of changesets | |
2340 | </td></tr> |
|
2342 | </td></tr> | |
2341 | <tr><td> |
|
2343 | <tr><td> | |
2342 | <a href="/help/bookmarks"> |
|
2344 | <a href="/help/bookmarks"> | |
2343 | bookmarks |
|
2345 | bookmarks | |
2344 | </a> |
|
2346 | </a> | |
2345 | </td><td> |
|
2347 | </td><td> | |
2346 | create a new bookmark or list existing bookmarks |
|
2348 | create a new bookmark or list existing bookmarks | |
2347 | </td></tr> |
|
2349 | </td></tr> | |
2348 | <tr><td> |
|
2350 | <tr><td> | |
2349 | <a href="/help/branch"> |
|
2351 | <a href="/help/branch"> | |
2350 | branch |
|
2352 | branch | |
2351 | </a> |
|
2353 | </a> | |
2352 | </td><td> |
|
2354 | </td><td> | |
2353 | set or show the current branch name |
|
2355 | set or show the current branch name | |
2354 | </td></tr> |
|
2356 | </td></tr> | |
2355 | <tr><td> |
|
2357 | <tr><td> | |
2356 | <a href="/help/branches"> |
|
2358 | <a href="/help/branches"> | |
2357 | branches |
|
2359 | branches | |
2358 | </a> |
|
2360 | </a> | |
2359 | </td><td> |
|
2361 | </td><td> | |
2360 | list repository named branches |
|
2362 | list repository named branches | |
2361 | </td></tr> |
|
2363 | </td></tr> | |
2362 | <tr><td> |
|
2364 | <tr><td> | |
2363 | <a href="/help/bundle"> |
|
2365 | <a href="/help/bundle"> | |
2364 | bundle |
|
2366 | bundle | |
2365 | </a> |
|
2367 | </a> | |
2366 | </td><td> |
|
2368 | </td><td> | |
2367 | create a bundle file |
|
2369 | create a bundle file | |
2368 | </td></tr> |
|
2370 | </td></tr> | |
2369 | <tr><td> |
|
2371 | <tr><td> | |
2370 | <a href="/help/cat"> |
|
2372 | <a href="/help/cat"> | |
2371 | cat |
|
2373 | cat | |
2372 | </a> |
|
2374 | </a> | |
2373 | </td><td> |
|
2375 | </td><td> | |
2374 | output the current or given revision of files |
|
2376 | output the current or given revision of files | |
2375 | </td></tr> |
|
2377 | </td></tr> | |
2376 | <tr><td> |
|
2378 | <tr><td> | |
2377 | <a href="/help/config"> |
|
2379 | <a href="/help/config"> | |
2378 | config |
|
2380 | config | |
2379 | </a> |
|
2381 | </a> | |
2380 | </td><td> |
|
2382 | </td><td> | |
2381 | show combined config settings from all hgrc files |
|
2383 | show combined config settings from all hgrc files | |
2382 | </td></tr> |
|
2384 | </td></tr> | |
2383 | <tr><td> |
|
2385 | <tr><td> | |
2384 | <a href="/help/copy"> |
|
2386 | <a href="/help/copy"> | |
2385 | copy |
|
2387 | copy | |
2386 | </a> |
|
2388 | </a> | |
2387 | </td><td> |
|
2389 | </td><td> | |
2388 | mark files as copied for the next commit |
|
2390 | mark files as copied for the next commit | |
2389 | </td></tr> |
|
2391 | </td></tr> | |
2390 | <tr><td> |
|
2392 | <tr><td> | |
2391 | <a href="/help/files"> |
|
2393 | <a href="/help/files"> | |
2392 | files |
|
2394 | files | |
2393 | </a> |
|
2395 | </a> | |
2394 | </td><td> |
|
2396 | </td><td> | |
2395 | list tracked files |
|
2397 | list tracked files | |
2396 | </td></tr> |
|
2398 | </td></tr> | |
2397 | <tr><td> |
|
2399 | <tr><td> | |
2398 | <a href="/help/graft"> |
|
2400 | <a href="/help/graft"> | |
2399 | graft |
|
2401 | graft | |
2400 | </a> |
|
2402 | </a> | |
2401 | </td><td> |
|
2403 | </td><td> | |
2402 | copy changes from other branches onto the current branch |
|
2404 | copy changes from other branches onto the current branch | |
2403 | </td></tr> |
|
2405 | </td></tr> | |
2404 | <tr><td> |
|
2406 | <tr><td> | |
2405 | <a href="/help/grep"> |
|
2407 | <a href="/help/grep"> | |
2406 | grep |
|
2408 | grep | |
2407 | </a> |
|
2409 | </a> | |
2408 | </td><td> |
|
2410 | </td><td> | |
2409 | search revision history for a pattern in specified files |
|
2411 | search revision history for a pattern in specified files | |
2410 | </td></tr> |
|
2412 | </td></tr> | |
2411 | <tr><td> |
|
2413 | <tr><td> | |
2412 | <a href="/help/heads"> |
|
2414 | <a href="/help/heads"> | |
2413 | heads |
|
2415 | heads | |
2414 | </a> |
|
2416 | </a> | |
2415 | </td><td> |
|
2417 | </td><td> | |
2416 | show branch heads |
|
2418 | show branch heads | |
2417 | </td></tr> |
|
2419 | </td></tr> | |
2418 | <tr><td> |
|
2420 | <tr><td> | |
2419 | <a href="/help/help"> |
|
2421 | <a href="/help/help"> | |
2420 | help |
|
2422 | help | |
2421 | </a> |
|
2423 | </a> | |
2422 | </td><td> |
|
2424 | </td><td> | |
2423 | show help for a given topic or a help overview |
|
2425 | show help for a given topic or a help overview | |
2424 | </td></tr> |
|
2426 | </td></tr> | |
2425 | <tr><td> |
|
2427 | <tr><td> | |
2426 | <a href="/help/hgalias"> |
|
2428 | <a href="/help/hgalias"> | |
2427 | hgalias |
|
2429 | hgalias | |
2428 | </a> |
|
2430 | </a> | |
2429 | </td><td> |
|
2431 | </td><td> | |
2430 | summarize working directory state |
|
2432 | summarize working directory state | |
2431 | </td></tr> |
|
2433 | </td></tr> | |
2432 | <tr><td> |
|
2434 | <tr><td> | |
2433 | <a href="/help/identify"> |
|
2435 | <a href="/help/identify"> | |
2434 | identify |
|
2436 | identify | |
2435 | </a> |
|
2437 | </a> | |
2436 | </td><td> |
|
2438 | </td><td> | |
2437 | identify the working directory or specified revision |
|
2439 | identify the working directory or specified revision | |
2438 | </td></tr> |
|
2440 | </td></tr> | |
2439 | <tr><td> |
|
2441 | <tr><td> | |
2440 | <a href="/help/import"> |
|
2442 | <a href="/help/import"> | |
2441 | import |
|
2443 | import | |
2442 | </a> |
|
2444 | </a> | |
2443 | </td><td> |
|
2445 | </td><td> | |
2444 | import an ordered set of patches |
|
2446 | import an ordered set of patches | |
2445 | </td></tr> |
|
2447 | </td></tr> | |
2446 | <tr><td> |
|
2448 | <tr><td> | |
2447 | <a href="/help/incoming"> |
|
2449 | <a href="/help/incoming"> | |
2448 | incoming |
|
2450 | incoming | |
2449 | </a> |
|
2451 | </a> | |
2450 | </td><td> |
|
2452 | </td><td> | |
2451 | show new changesets found in source |
|
2453 | show new changesets found in source | |
2452 | </td></tr> |
|
2454 | </td></tr> | |
2453 | <tr><td> |
|
2455 | <tr><td> | |
2454 | <a href="/help/manifest"> |
|
2456 | <a href="/help/manifest"> | |
2455 | manifest |
|
2457 | manifest | |
2456 | </a> |
|
2458 | </a> | |
2457 | </td><td> |
|
2459 | </td><td> | |
2458 | output the current or given revision of the project manifest |
|
2460 | output the current or given revision of the project manifest | |
2459 | </td></tr> |
|
2461 | </td></tr> | |
2460 | <tr><td> |
|
2462 | <tr><td> | |
2461 | <a href="/help/nohelp"> |
|
2463 | <a href="/help/nohelp"> | |
2462 | nohelp |
|
2464 | nohelp | |
2463 | </a> |
|
2465 | </a> | |
2464 | </td><td> |
|
2466 | </td><td> | |
2465 | (no help text available) |
|
2467 | (no help text available) | |
2466 | </td></tr> |
|
2468 | </td></tr> | |
2467 | <tr><td> |
|
2469 | <tr><td> | |
2468 | <a href="/help/outgoing"> |
|
2470 | <a href="/help/outgoing"> | |
2469 | outgoing |
|
2471 | outgoing | |
2470 | </a> |
|
2472 | </a> | |
2471 | </td><td> |
|
2473 | </td><td> | |
2472 | show changesets not found in the destination |
|
2474 | show changesets not found in the destination | |
2473 | </td></tr> |
|
2475 | </td></tr> | |
2474 | <tr><td> |
|
2476 | <tr><td> | |
2475 | <a href="/help/paths"> |
|
2477 | <a href="/help/paths"> | |
2476 | paths |
|
2478 | paths | |
2477 | </a> |
|
2479 | </a> | |
2478 | </td><td> |
|
2480 | </td><td> | |
2479 | show aliases for remote repositories |
|
2481 | show aliases for remote repositories | |
2480 | </td></tr> |
|
2482 | </td></tr> | |
2481 | <tr><td> |
|
2483 | <tr><td> | |
2482 | <a href="/help/phase"> |
|
2484 | <a href="/help/phase"> | |
2483 | phase |
|
2485 | phase | |
2484 | </a> |
|
2486 | </a> | |
2485 | </td><td> |
|
2487 | </td><td> | |
2486 | set or show the current phase name |
|
2488 | set or show the current phase name | |
2487 | </td></tr> |
|
2489 | </td></tr> | |
2488 | <tr><td> |
|
2490 | <tr><td> | |
2489 | <a href="/help/recover"> |
|
2491 | <a href="/help/recover"> | |
2490 | recover |
|
2492 | recover | |
2491 | </a> |
|
2493 | </a> | |
2492 | </td><td> |
|
2494 | </td><td> | |
2493 | roll back an interrupted transaction |
|
2495 | roll back an interrupted transaction | |
2494 | </td></tr> |
|
2496 | </td></tr> | |
2495 | <tr><td> |
|
2497 | <tr><td> | |
2496 | <a href="/help/rename"> |
|
2498 | <a href="/help/rename"> | |
2497 | rename |
|
2499 | rename | |
2498 | </a> |
|
2500 | </a> | |
2499 | </td><td> |
|
2501 | </td><td> | |
2500 | rename files; equivalent of copy + remove |
|
2502 | rename files; equivalent of copy + remove | |
2501 | </td></tr> |
|
2503 | </td></tr> | |
2502 | <tr><td> |
|
2504 | <tr><td> | |
2503 | <a href="/help/resolve"> |
|
2505 | <a href="/help/resolve"> | |
2504 | resolve |
|
2506 | resolve | |
2505 | </a> |
|
2507 | </a> | |
2506 | </td><td> |
|
2508 | </td><td> | |
2507 | redo merges or set/view the merge status of files |
|
2509 | redo merges or set/view the merge status of files | |
2508 | </td></tr> |
|
2510 | </td></tr> | |
2509 | <tr><td> |
|
2511 | <tr><td> | |
2510 | <a href="/help/revert"> |
|
2512 | <a href="/help/revert"> | |
2511 | revert |
|
2513 | revert | |
2512 | </a> |
|
2514 | </a> | |
2513 | </td><td> |
|
2515 | </td><td> | |
2514 | restore files to their checkout state |
|
2516 | restore files to their checkout state | |
2515 | </td></tr> |
|
2517 | </td></tr> | |
2516 | <tr><td> |
|
2518 | <tr><td> | |
2517 | <a href="/help/root"> |
|
2519 | <a href="/help/root"> | |
2518 | root |
|
2520 | root | |
2519 | </a> |
|
2521 | </a> | |
2520 | </td><td> |
|
2522 | </td><td> | |
2521 | print the root (top) of the current working directory |
|
2523 | print the root (top) of the current working directory | |
2522 | </td></tr> |
|
2524 | </td></tr> | |
2523 | <tr><td> |
|
2525 | <tr><td> | |
2524 | <a href="/help/shellalias"> |
|
2526 | <a href="/help/shellalias"> | |
2525 | shellalias |
|
2527 | shellalias | |
2526 | </a> |
|
2528 | </a> | |
2527 | </td><td> |
|
2529 | </td><td> | |
2528 | (no help text available) |
|
2530 | (no help text available) | |
2529 | </td></tr> |
|
2531 | </td></tr> | |
2530 | <tr><td> |
|
2532 | <tr><td> | |
2531 | <a href="/help/tag"> |
|
2533 | <a href="/help/tag"> | |
2532 | tag |
|
2534 | tag | |
2533 | </a> |
|
2535 | </a> | |
2534 | </td><td> |
|
2536 | </td><td> | |
2535 | add one or more tags for the current or given revision |
|
2537 | add one or more tags for the current or given revision | |
2536 | </td></tr> |
|
2538 | </td></tr> | |
2537 | <tr><td> |
|
2539 | <tr><td> | |
2538 | <a href="/help/tags"> |
|
2540 | <a href="/help/tags"> | |
2539 | tags |
|
2541 | tags | |
2540 | </a> |
|
2542 | </a> | |
2541 | </td><td> |
|
2543 | </td><td> | |
2542 | list repository tags |
|
2544 | list repository tags | |
2543 | </td></tr> |
|
2545 | </td></tr> | |
2544 | <tr><td> |
|
2546 | <tr><td> | |
2545 | <a href="/help/unbundle"> |
|
2547 | <a href="/help/unbundle"> | |
2546 | unbundle |
|
2548 | unbundle | |
2547 | </a> |
|
2549 | </a> | |
2548 | </td><td> |
|
2550 | </td><td> | |
2549 | apply one or more bundle files |
|
2551 | apply one or more bundle files | |
2550 | </td></tr> |
|
2552 | </td></tr> | |
2551 | <tr><td> |
|
2553 | <tr><td> | |
2552 | <a href="/help/verify"> |
|
2554 | <a href="/help/verify"> | |
2553 | verify |
|
2555 | verify | |
2554 | </a> |
|
2556 | </a> | |
2555 | </td><td> |
|
2557 | </td><td> | |
2556 | verify the integrity of the repository |
|
2558 | verify the integrity of the repository | |
2557 | </td></tr> |
|
2559 | </td></tr> | |
2558 | <tr><td> |
|
2560 | <tr><td> | |
2559 | <a href="/help/version"> |
|
2561 | <a href="/help/version"> | |
2560 | version |
|
2562 | version | |
2561 | </a> |
|
2563 | </a> | |
2562 | </td><td> |
|
2564 | </td><td> | |
2563 | output version and copyright information |
|
2565 | output version and copyright information | |
2564 | </td></tr> |
|
2566 | </td></tr> | |
2565 |
|
2567 | |||
2566 |
|
2568 | |||
2567 | </table> |
|
2569 | </table> | |
2568 | </div> |
|
2570 | </div> | |
2569 | </div> |
|
2571 | </div> | |
2570 |
|
2572 | |||
2571 |
|
2573 | |||
2572 |
|
2574 | |||
2573 | </body> |
|
2575 | </body> | |
2574 | </html> |
|
2576 | </html> | |
2575 |
|
2577 | |||
2576 |
|
2578 | |||
2577 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" |
|
2579 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" | |
2578 | 200 Script output follows |
|
2580 | 200 Script output follows | |
2579 |
|
2581 | |||
2580 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2582 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2581 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2583 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2582 | <head> |
|
2584 | <head> | |
2583 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2585 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2584 | <meta name="robots" content="index, nofollow" /> |
|
2586 | <meta name="robots" content="index, nofollow" /> | |
2585 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2587 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2586 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2588 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2587 |
|
2589 | |||
2588 | <title>Help: add</title> |
|
2590 | <title>Help: add</title> | |
2589 | </head> |
|
2591 | </head> | |
2590 | <body> |
|
2592 | <body> | |
2591 |
|
2593 | |||
2592 | <div class="container"> |
|
2594 | <div class="container"> | |
2593 | <div class="menu"> |
|
2595 | <div class="menu"> | |
2594 | <div class="logo"> |
|
2596 | <div class="logo"> | |
2595 | <a href="https://mercurial-scm.org/"> |
|
2597 | <a href="https://mercurial-scm.org/"> | |
2596 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2598 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2597 | </div> |
|
2599 | </div> | |
2598 | <ul> |
|
2600 | <ul> | |
2599 | <li><a href="/shortlog">log</a></li> |
|
2601 | <li><a href="/shortlog">log</a></li> | |
2600 | <li><a href="/graph">graph</a></li> |
|
2602 | <li><a href="/graph">graph</a></li> | |
2601 | <li><a href="/tags">tags</a></li> |
|
2603 | <li><a href="/tags">tags</a></li> | |
2602 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2604 | <li><a href="/bookmarks">bookmarks</a></li> | |
2603 | <li><a href="/branches">branches</a></li> |
|
2605 | <li><a href="/branches">branches</a></li> | |
2604 | </ul> |
|
2606 | </ul> | |
2605 | <ul> |
|
2607 | <ul> | |
2606 | <li class="active"><a href="/help">help</a></li> |
|
2608 | <li class="active"><a href="/help">help</a></li> | |
2607 | </ul> |
|
2609 | </ul> | |
2608 | </div> |
|
2610 | </div> | |
2609 |
|
2611 | |||
2610 | <div class="main"> |
|
2612 | <div class="main"> | |
2611 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2613 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2612 | <h3>Help: add</h3> |
|
2614 | <h3>Help: add</h3> | |
2613 |
|
2615 | |||
2614 | <form class="search" action="/log"> |
|
2616 | <form class="search" action="/log"> | |
2615 |
|
2617 | |||
2616 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2618 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2617 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2619 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2618 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2620 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2619 | </form> |
|
2621 | </form> | |
2620 | <div id="doc"> |
|
2622 | <div id="doc"> | |
2621 | <p> |
|
2623 | <p> | |
2622 | hg add [OPTION]... [FILE]... |
|
2624 | hg add [OPTION]... [FILE]... | |
2623 | </p> |
|
2625 | </p> | |
2624 | <p> |
|
2626 | <p> | |
2625 | add the specified files on the next commit |
|
2627 | add the specified files on the next commit | |
2626 | </p> |
|
2628 | </p> | |
2627 | <p> |
|
2629 | <p> | |
2628 | Schedule files to be version controlled and added to the |
|
2630 | Schedule files to be version controlled and added to the | |
2629 | repository. |
|
2631 | repository. | |
2630 | </p> |
|
2632 | </p> | |
2631 | <p> |
|
2633 | <p> | |
2632 | The files will be added to the repository at the next commit. To |
|
2634 | The files will be added to the repository at the next commit. To | |
2633 | undo an add before that, see 'hg forget'. |
|
2635 | undo an add before that, see 'hg forget'. | |
2634 | </p> |
|
2636 | </p> | |
2635 | <p> |
|
2637 | <p> | |
2636 | If no names are given, add all files to the repository (except |
|
2638 | If no names are given, add all files to the repository (except | |
2637 | files matching ".hgignore"). |
|
2639 | files matching ".hgignore"). | |
2638 | </p> |
|
2640 | </p> | |
2639 | <p> |
|
2641 | <p> | |
2640 | Examples: |
|
2642 | Examples: | |
2641 | </p> |
|
2643 | </p> | |
2642 | <ul> |
|
2644 | <ul> | |
2643 | <li> New (unknown) files are added automatically by 'hg add': |
|
2645 | <li> New (unknown) files are added automatically by 'hg add': | |
2644 | <pre> |
|
2646 | <pre> | |
2645 | \$ ls (re) |
|
2647 | \$ ls (re) | |
2646 | foo.c |
|
2648 | foo.c | |
2647 | \$ hg status (re) |
|
2649 | \$ hg status (re) | |
2648 | ? foo.c |
|
2650 | ? foo.c | |
2649 | \$ hg add (re) |
|
2651 | \$ hg add (re) | |
2650 | adding foo.c |
|
2652 | adding foo.c | |
2651 | \$ hg status (re) |
|
2653 | \$ hg status (re) | |
2652 | A foo.c |
|
2654 | A foo.c | |
2653 | </pre> |
|
2655 | </pre> | |
2654 | <li> Specific files to be added can be specified: |
|
2656 | <li> Specific files to be added can be specified: | |
2655 | <pre> |
|
2657 | <pre> | |
2656 | \$ ls (re) |
|
2658 | \$ ls (re) | |
2657 | bar.c foo.c |
|
2659 | bar.c foo.c | |
2658 | \$ hg status (re) |
|
2660 | \$ hg status (re) | |
2659 | ? bar.c |
|
2661 | ? bar.c | |
2660 | ? foo.c |
|
2662 | ? foo.c | |
2661 | \$ hg add bar.c (re) |
|
2663 | \$ hg add bar.c (re) | |
2662 | \$ hg status (re) |
|
2664 | \$ hg status (re) | |
2663 | A bar.c |
|
2665 | A bar.c | |
2664 | ? foo.c |
|
2666 | ? foo.c | |
2665 | </pre> |
|
2667 | </pre> | |
2666 | </ul> |
|
2668 | </ul> | |
2667 | <p> |
|
2669 | <p> | |
2668 | Returns 0 if all files are successfully added. |
|
2670 | Returns 0 if all files are successfully added. | |
2669 | </p> |
|
2671 | </p> | |
2670 | <p> |
|
2672 | <p> | |
2671 | options ([+] can be repeated): |
|
2673 | options ([+] can be repeated): | |
2672 | </p> |
|
2674 | </p> | |
2673 | <table> |
|
2675 | <table> | |
2674 | <tr><td>-I</td> |
|
2676 | <tr><td>-I</td> | |
2675 | <td>--include PATTERN [+]</td> |
|
2677 | <td>--include PATTERN [+]</td> | |
2676 | <td>include names matching the given patterns</td></tr> |
|
2678 | <td>include names matching the given patterns</td></tr> | |
2677 | <tr><td>-X</td> |
|
2679 | <tr><td>-X</td> | |
2678 | <td>--exclude PATTERN [+]</td> |
|
2680 | <td>--exclude PATTERN [+]</td> | |
2679 | <td>exclude names matching the given patterns</td></tr> |
|
2681 | <td>exclude names matching the given patterns</td></tr> | |
2680 | <tr><td>-S</td> |
|
2682 | <tr><td>-S</td> | |
2681 | <td>--subrepos</td> |
|
2683 | <td>--subrepos</td> | |
2682 | <td>recurse into subrepositories</td></tr> |
|
2684 | <td>recurse into subrepositories</td></tr> | |
2683 | <tr><td>-n</td> |
|
2685 | <tr><td>-n</td> | |
2684 | <td>--dry-run</td> |
|
2686 | <td>--dry-run</td> | |
2685 | <td>do not perform actions, just print output</td></tr> |
|
2687 | <td>do not perform actions, just print output</td></tr> | |
2686 | </table> |
|
2688 | </table> | |
2687 | <p> |
|
2689 | <p> | |
2688 | global options ([+] can be repeated): |
|
2690 | global options ([+] can be repeated): | |
2689 | </p> |
|
2691 | </p> | |
2690 | <table> |
|
2692 | <table> | |
2691 | <tr><td>-R</td> |
|
2693 | <tr><td>-R</td> | |
2692 | <td>--repository REPO</td> |
|
2694 | <td>--repository REPO</td> | |
2693 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2695 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2694 | <tr><td></td> |
|
2696 | <tr><td></td> | |
2695 | <td>--cwd DIR</td> |
|
2697 | <td>--cwd DIR</td> | |
2696 | <td>change working directory</td></tr> |
|
2698 | <td>change working directory</td></tr> | |
2697 | <tr><td>-y</td> |
|
2699 | <tr><td>-y</td> | |
2698 | <td>--noninteractive</td> |
|
2700 | <td>--noninteractive</td> | |
2699 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2701 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2700 | <tr><td>-q</td> |
|
2702 | <tr><td>-q</td> | |
2701 | <td>--quiet</td> |
|
2703 | <td>--quiet</td> | |
2702 | <td>suppress output</td></tr> |
|
2704 | <td>suppress output</td></tr> | |
2703 | <tr><td>-v</td> |
|
2705 | <tr><td>-v</td> | |
2704 | <td>--verbose</td> |
|
2706 | <td>--verbose</td> | |
2705 | <td>enable additional output</td></tr> |
|
2707 | <td>enable additional output</td></tr> | |
2706 | <tr><td></td> |
|
2708 | <tr><td></td> | |
2707 | <td>--color TYPE</td> |
|
2709 | <td>--color TYPE</td> | |
2708 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2710 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
2709 | <tr><td></td> |
|
2711 | <tr><td></td> | |
2710 | <td>--config CONFIG [+]</td> |
|
2712 | <td>--config CONFIG [+]</td> | |
2711 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2713 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2712 | <tr><td></td> |
|
2714 | <tr><td></td> | |
2713 | <td>--debug</td> |
|
2715 | <td>--debug</td> | |
2714 | <td>enable debugging output</td></tr> |
|
2716 | <td>enable debugging output</td></tr> | |
2715 | <tr><td></td> |
|
2717 | <tr><td></td> | |
2716 | <td>--debugger</td> |
|
2718 | <td>--debugger</td> | |
2717 | <td>start debugger</td></tr> |
|
2719 | <td>start debugger</td></tr> | |
2718 | <tr><td></td> |
|
2720 | <tr><td></td> | |
2719 | <td>--encoding ENCODE</td> |
|
2721 | <td>--encoding ENCODE</td> | |
2720 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2722 | <td>set the charset encoding (default: ascii)</td></tr> | |
2721 | <tr><td></td> |
|
2723 | <tr><td></td> | |
2722 | <td>--encodingmode MODE</td> |
|
2724 | <td>--encodingmode MODE</td> | |
2723 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2725 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2724 | <tr><td></td> |
|
2726 | <tr><td></td> | |
2725 | <td>--traceback</td> |
|
2727 | <td>--traceback</td> | |
2726 | <td>always print a traceback on exception</td></tr> |
|
2728 | <td>always print a traceback on exception</td></tr> | |
2727 | <tr><td></td> |
|
2729 | <tr><td></td> | |
2728 | <td>--time</td> |
|
2730 | <td>--time</td> | |
2729 | <td>time how long the command takes</td></tr> |
|
2731 | <td>time how long the command takes</td></tr> | |
2730 | <tr><td></td> |
|
2732 | <tr><td></td> | |
2731 | <td>--profile</td> |
|
2733 | <td>--profile</td> | |
2732 | <td>print command execution profile</td></tr> |
|
2734 | <td>print command execution profile</td></tr> | |
2733 | <tr><td></td> |
|
2735 | <tr><td></td> | |
2734 | <td>--version</td> |
|
2736 | <td>--version</td> | |
2735 | <td>output version information and exit</td></tr> |
|
2737 | <td>output version information and exit</td></tr> | |
2736 | <tr><td>-h</td> |
|
2738 | <tr><td>-h</td> | |
2737 | <td>--help</td> |
|
2739 | <td>--help</td> | |
2738 | <td>display help and exit</td></tr> |
|
2740 | <td>display help and exit</td></tr> | |
2739 | <tr><td></td> |
|
2741 | <tr><td></td> | |
2740 | <td>--hidden</td> |
|
2742 | <td>--hidden</td> | |
2741 | <td>consider hidden changesets</td></tr> |
|
2743 | <td>consider hidden changesets</td></tr> | |
2742 | <tr><td></td> |
|
2744 | <tr><td></td> | |
2743 | <td>--pager TYPE</td> |
|
2745 | <td>--pager TYPE</td> | |
2744 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2746 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
2745 | </table> |
|
2747 | </table> | |
2746 |
|
2748 | |||
2747 | </div> |
|
2749 | </div> | |
2748 | </div> |
|
2750 | </div> | |
2749 | </div> |
|
2751 | </div> | |
2750 |
|
2752 | |||
2751 |
|
2753 | |||
2752 |
|
2754 | |||
2753 | </body> |
|
2755 | </body> | |
2754 | </html> |
|
2756 | </html> | |
2755 |
|
2757 | |||
2756 |
|
2758 | |||
2757 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" |
|
2759 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" | |
2758 | 200 Script output follows |
|
2760 | 200 Script output follows | |
2759 |
|
2761 | |||
2760 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2762 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2761 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2763 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2762 | <head> |
|
2764 | <head> | |
2763 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2765 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2764 | <meta name="robots" content="index, nofollow" /> |
|
2766 | <meta name="robots" content="index, nofollow" /> | |
2765 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2767 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2766 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2768 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2767 |
|
2769 | |||
2768 | <title>Help: remove</title> |
|
2770 | <title>Help: remove</title> | |
2769 | </head> |
|
2771 | </head> | |
2770 | <body> |
|
2772 | <body> | |
2771 |
|
2773 | |||
2772 | <div class="container"> |
|
2774 | <div class="container"> | |
2773 | <div class="menu"> |
|
2775 | <div class="menu"> | |
2774 | <div class="logo"> |
|
2776 | <div class="logo"> | |
2775 | <a href="https://mercurial-scm.org/"> |
|
2777 | <a href="https://mercurial-scm.org/"> | |
2776 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2778 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2777 | </div> |
|
2779 | </div> | |
2778 | <ul> |
|
2780 | <ul> | |
2779 | <li><a href="/shortlog">log</a></li> |
|
2781 | <li><a href="/shortlog">log</a></li> | |
2780 | <li><a href="/graph">graph</a></li> |
|
2782 | <li><a href="/graph">graph</a></li> | |
2781 | <li><a href="/tags">tags</a></li> |
|
2783 | <li><a href="/tags">tags</a></li> | |
2782 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2784 | <li><a href="/bookmarks">bookmarks</a></li> | |
2783 | <li><a href="/branches">branches</a></li> |
|
2785 | <li><a href="/branches">branches</a></li> | |
2784 | </ul> |
|
2786 | </ul> | |
2785 | <ul> |
|
2787 | <ul> | |
2786 | <li class="active"><a href="/help">help</a></li> |
|
2788 | <li class="active"><a href="/help">help</a></li> | |
2787 | </ul> |
|
2789 | </ul> | |
2788 | </div> |
|
2790 | </div> | |
2789 |
|
2791 | |||
2790 | <div class="main"> |
|
2792 | <div class="main"> | |
2791 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2793 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2792 | <h3>Help: remove</h3> |
|
2794 | <h3>Help: remove</h3> | |
2793 |
|
2795 | |||
2794 | <form class="search" action="/log"> |
|
2796 | <form class="search" action="/log"> | |
2795 |
|
2797 | |||
2796 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2798 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
2797 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2799 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2798 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2800 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2799 | </form> |
|
2801 | </form> | |
2800 | <div id="doc"> |
|
2802 | <div id="doc"> | |
2801 | <p> |
|
2803 | <p> | |
2802 | hg remove [OPTION]... FILE... |
|
2804 | hg remove [OPTION]... FILE... | |
2803 | </p> |
|
2805 | </p> | |
2804 | <p> |
|
2806 | <p> | |
2805 | aliases: rm |
|
2807 | aliases: rm | |
2806 | </p> |
|
2808 | </p> | |
2807 | <p> |
|
2809 | <p> | |
2808 | remove the specified files on the next commit |
|
2810 | remove the specified files on the next commit | |
2809 | </p> |
|
2811 | </p> | |
2810 | <p> |
|
2812 | <p> | |
2811 | Schedule the indicated files for removal from the current branch. |
|
2813 | Schedule the indicated files for removal from the current branch. | |
2812 | </p> |
|
2814 | </p> | |
2813 | <p> |
|
2815 | <p> | |
2814 | This command schedules the files to be removed at the next commit. |
|
2816 | This command schedules the files to be removed at the next commit. | |
2815 | To undo a remove before that, see 'hg revert'. To undo added |
|
2817 | To undo a remove before that, see 'hg revert'. To undo added | |
2816 | files, see 'hg forget'. |
|
2818 | files, see 'hg forget'. | |
2817 | </p> |
|
2819 | </p> | |
2818 | <p> |
|
2820 | <p> | |
2819 | -A/--after can be used to remove only files that have already |
|
2821 | -A/--after can be used to remove only files that have already | |
2820 | been deleted, -f/--force can be used to force deletion, and -Af |
|
2822 | been deleted, -f/--force can be used to force deletion, and -Af | |
2821 | can be used to remove files from the next revision without |
|
2823 | can be used to remove files from the next revision without | |
2822 | deleting them from the working directory. |
|
2824 | deleting them from the working directory. | |
2823 | </p> |
|
2825 | </p> | |
2824 | <p> |
|
2826 | <p> | |
2825 | The following table details the behavior of remove for different |
|
2827 | The following table details the behavior of remove for different | |
2826 | file states (columns) and option combinations (rows). The file |
|
2828 | file states (columns) and option combinations (rows). The file | |
2827 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
2829 | states are Added [A], Clean [C], Modified [M] and Missing [!] | |
2828 | (as reported by 'hg status'). The actions are Warn, Remove |
|
2830 | (as reported by 'hg status'). The actions are Warn, Remove | |
2829 | (from branch) and Delete (from disk): |
|
2831 | (from branch) and Delete (from disk): | |
2830 | </p> |
|
2832 | </p> | |
2831 | <table> |
|
2833 | <table> | |
2832 | <tr><td>opt/state</td> |
|
2834 | <tr><td>opt/state</td> | |
2833 | <td>A</td> |
|
2835 | <td>A</td> | |
2834 | <td>C</td> |
|
2836 | <td>C</td> | |
2835 | <td>M</td> |
|
2837 | <td>M</td> | |
2836 | <td>!</td></tr> |
|
2838 | <td>!</td></tr> | |
2837 | <tr><td>none</td> |
|
2839 | <tr><td>none</td> | |
2838 | <td>W</td> |
|
2840 | <td>W</td> | |
2839 | <td>RD</td> |
|
2841 | <td>RD</td> | |
2840 | <td>W</td> |
|
2842 | <td>W</td> | |
2841 | <td>R</td></tr> |
|
2843 | <td>R</td></tr> | |
2842 | <tr><td>-f</td> |
|
2844 | <tr><td>-f</td> | |
2843 | <td>R</td> |
|
2845 | <td>R</td> | |
2844 | <td>RD</td> |
|
2846 | <td>RD</td> | |
2845 | <td>RD</td> |
|
2847 | <td>RD</td> | |
2846 | <td>R</td></tr> |
|
2848 | <td>R</td></tr> | |
2847 | <tr><td>-A</td> |
|
2849 | <tr><td>-A</td> | |
2848 | <td>W</td> |
|
2850 | <td>W</td> | |
2849 | <td>W</td> |
|
2851 | <td>W</td> | |
2850 | <td>W</td> |
|
2852 | <td>W</td> | |
2851 | <td>R</td></tr> |
|
2853 | <td>R</td></tr> | |
2852 | <tr><td>-Af</td> |
|
2854 | <tr><td>-Af</td> | |
2853 | <td>R</td> |
|
2855 | <td>R</td> | |
2854 | <td>R</td> |
|
2856 | <td>R</td> | |
2855 | <td>R</td> |
|
2857 | <td>R</td> | |
2856 | <td>R</td></tr> |
|
2858 | <td>R</td></tr> | |
2857 | </table> |
|
2859 | </table> | |
2858 | <p> |
|
2860 | <p> | |
2859 | <b>Note:</b> |
|
2861 | <b>Note:</b> | |
2860 | </p> |
|
2862 | </p> | |
2861 | <p> |
|
2863 | <p> | |
2862 | 'hg remove' never deletes files in Added [A] state from the |
|
2864 | 'hg remove' never deletes files in Added [A] state from the | |
2863 | working directory, not even if "--force" is specified. |
|
2865 | working directory, not even if "--force" is specified. | |
2864 | </p> |
|
2866 | </p> | |
2865 | <p> |
|
2867 | <p> | |
2866 | Returns 0 on success, 1 if any warnings encountered. |
|
2868 | Returns 0 on success, 1 if any warnings encountered. | |
2867 | </p> |
|
2869 | </p> | |
2868 | <p> |
|
2870 | <p> | |
2869 | options ([+] can be repeated): |
|
2871 | options ([+] can be repeated): | |
2870 | </p> |
|
2872 | </p> | |
2871 | <table> |
|
2873 | <table> | |
2872 | <tr><td>-A</td> |
|
2874 | <tr><td>-A</td> | |
2873 | <td>--after</td> |
|
2875 | <td>--after</td> | |
2874 | <td>record delete for missing files</td></tr> |
|
2876 | <td>record delete for missing files</td></tr> | |
2875 | <tr><td>-f</td> |
|
2877 | <tr><td>-f</td> | |
2876 | <td>--force</td> |
|
2878 | <td>--force</td> | |
2877 | <td>forget added files, delete modified files</td></tr> |
|
2879 | <td>forget added files, delete modified files</td></tr> | |
2878 | <tr><td>-S</td> |
|
2880 | <tr><td>-S</td> | |
2879 | <td>--subrepos</td> |
|
2881 | <td>--subrepos</td> | |
2880 | <td>recurse into subrepositories</td></tr> |
|
2882 | <td>recurse into subrepositories</td></tr> | |
2881 | <tr><td>-I</td> |
|
2883 | <tr><td>-I</td> | |
2882 | <td>--include PATTERN [+]</td> |
|
2884 | <td>--include PATTERN [+]</td> | |
2883 | <td>include names matching the given patterns</td></tr> |
|
2885 | <td>include names matching the given patterns</td></tr> | |
2884 | <tr><td>-X</td> |
|
2886 | <tr><td>-X</td> | |
2885 | <td>--exclude PATTERN [+]</td> |
|
2887 | <td>--exclude PATTERN [+]</td> | |
2886 | <td>exclude names matching the given patterns</td></tr> |
|
2888 | <td>exclude names matching the given patterns</td></tr> | |
2887 | <tr><td>-n</td> |
|
2889 | <tr><td>-n</td> | |
2888 | <td>--dry-run</td> |
|
2890 | <td>--dry-run</td> | |
2889 | <td>do not perform actions, just print output</td></tr> |
|
2891 | <td>do not perform actions, just print output</td></tr> | |
2890 | </table> |
|
2892 | </table> | |
2891 | <p> |
|
2893 | <p> | |
2892 | global options ([+] can be repeated): |
|
2894 | global options ([+] can be repeated): | |
2893 | </p> |
|
2895 | </p> | |
2894 | <table> |
|
2896 | <table> | |
2895 | <tr><td>-R</td> |
|
2897 | <tr><td>-R</td> | |
2896 | <td>--repository REPO</td> |
|
2898 | <td>--repository REPO</td> | |
2897 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2899 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2898 | <tr><td></td> |
|
2900 | <tr><td></td> | |
2899 | <td>--cwd DIR</td> |
|
2901 | <td>--cwd DIR</td> | |
2900 | <td>change working directory</td></tr> |
|
2902 | <td>change working directory</td></tr> | |
2901 | <tr><td>-y</td> |
|
2903 | <tr><td>-y</td> | |
2902 | <td>--noninteractive</td> |
|
2904 | <td>--noninteractive</td> | |
2903 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2905 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2904 | <tr><td>-q</td> |
|
2906 | <tr><td>-q</td> | |
2905 | <td>--quiet</td> |
|
2907 | <td>--quiet</td> | |
2906 | <td>suppress output</td></tr> |
|
2908 | <td>suppress output</td></tr> | |
2907 | <tr><td>-v</td> |
|
2909 | <tr><td>-v</td> | |
2908 | <td>--verbose</td> |
|
2910 | <td>--verbose</td> | |
2909 | <td>enable additional output</td></tr> |
|
2911 | <td>enable additional output</td></tr> | |
2910 | <tr><td></td> |
|
2912 | <tr><td></td> | |
2911 | <td>--color TYPE</td> |
|
2913 | <td>--color TYPE</td> | |
2912 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2914 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
2913 | <tr><td></td> |
|
2915 | <tr><td></td> | |
2914 | <td>--config CONFIG [+]</td> |
|
2916 | <td>--config CONFIG [+]</td> | |
2915 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2917 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2916 | <tr><td></td> |
|
2918 | <tr><td></td> | |
2917 | <td>--debug</td> |
|
2919 | <td>--debug</td> | |
2918 | <td>enable debugging output</td></tr> |
|
2920 | <td>enable debugging output</td></tr> | |
2919 | <tr><td></td> |
|
2921 | <tr><td></td> | |
2920 | <td>--debugger</td> |
|
2922 | <td>--debugger</td> | |
2921 | <td>start debugger</td></tr> |
|
2923 | <td>start debugger</td></tr> | |
2922 | <tr><td></td> |
|
2924 | <tr><td></td> | |
2923 | <td>--encoding ENCODE</td> |
|
2925 | <td>--encoding ENCODE</td> | |
2924 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2926 | <td>set the charset encoding (default: ascii)</td></tr> | |
2925 | <tr><td></td> |
|
2927 | <tr><td></td> | |
2926 | <td>--encodingmode MODE</td> |
|
2928 | <td>--encodingmode MODE</td> | |
2927 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2929 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2928 | <tr><td></td> |
|
2930 | <tr><td></td> | |
2929 | <td>--traceback</td> |
|
2931 | <td>--traceback</td> | |
2930 | <td>always print a traceback on exception</td></tr> |
|
2932 | <td>always print a traceback on exception</td></tr> | |
2931 | <tr><td></td> |
|
2933 | <tr><td></td> | |
2932 | <td>--time</td> |
|
2934 | <td>--time</td> | |
2933 | <td>time how long the command takes</td></tr> |
|
2935 | <td>time how long the command takes</td></tr> | |
2934 | <tr><td></td> |
|
2936 | <tr><td></td> | |
2935 | <td>--profile</td> |
|
2937 | <td>--profile</td> | |
2936 | <td>print command execution profile</td></tr> |
|
2938 | <td>print command execution profile</td></tr> | |
2937 | <tr><td></td> |
|
2939 | <tr><td></td> | |
2938 | <td>--version</td> |
|
2940 | <td>--version</td> | |
2939 | <td>output version information and exit</td></tr> |
|
2941 | <td>output version information and exit</td></tr> | |
2940 | <tr><td>-h</td> |
|
2942 | <tr><td>-h</td> | |
2941 | <td>--help</td> |
|
2943 | <td>--help</td> | |
2942 | <td>display help and exit</td></tr> |
|
2944 | <td>display help and exit</td></tr> | |
2943 | <tr><td></td> |
|
2945 | <tr><td></td> | |
2944 | <td>--hidden</td> |
|
2946 | <td>--hidden</td> | |
2945 | <td>consider hidden changesets</td></tr> |
|
2947 | <td>consider hidden changesets</td></tr> | |
2946 | <tr><td></td> |
|
2948 | <tr><td></td> | |
2947 | <td>--pager TYPE</td> |
|
2949 | <td>--pager TYPE</td> | |
2948 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2950 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
2949 | </table> |
|
2951 | </table> | |
2950 |
|
2952 | |||
2951 | </div> |
|
2953 | </div> | |
2952 | </div> |
|
2954 | </div> | |
2953 | </div> |
|
2955 | </div> | |
2954 |
|
2956 | |||
2955 |
|
2957 | |||
2956 |
|
2958 | |||
2957 | </body> |
|
2959 | </body> | |
2958 | </html> |
|
2960 | </html> | |
2959 |
|
2961 | |||
2960 |
|
2962 | |||
2961 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" |
|
2963 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" | |
2962 | 200 Script output follows |
|
2964 | 200 Script output follows | |
2963 |
|
2965 | |||
2964 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2966 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2965 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2967 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2966 | <head> |
|
2968 | <head> | |
2967 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2969 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2968 | <meta name="robots" content="index, nofollow" /> |
|
2970 | <meta name="robots" content="index, nofollow" /> | |
2969 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2971 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2970 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2972 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2971 |
|
2973 | |||
2972 | <title>Help: dates</title> |
|
2974 | <title>Help: dates</title> | |
2973 | </head> |
|
2975 | </head> | |
2974 | <body> |
|
2976 | <body> | |
2975 |
|
2977 | |||
2976 | <div class="container"> |
|
2978 | <div class="container"> | |
2977 | <div class="menu"> |
|
2979 | <div class="menu"> | |
2978 | <div class="logo"> |
|
2980 | <div class="logo"> | |
2979 | <a href="https://mercurial-scm.org/"> |
|
2981 | <a href="https://mercurial-scm.org/"> | |
2980 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2982 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2981 | </div> |
|
2983 | </div> | |
2982 | <ul> |
|
2984 | <ul> | |
2983 | <li><a href="/shortlog">log</a></li> |
|
2985 | <li><a href="/shortlog">log</a></li> | |
2984 | <li><a href="/graph">graph</a></li> |
|
2986 | <li><a href="/graph">graph</a></li> | |
2985 | <li><a href="/tags">tags</a></li> |
|
2987 | <li><a href="/tags">tags</a></li> | |
2986 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2988 | <li><a href="/bookmarks">bookmarks</a></li> | |
2987 | <li><a href="/branches">branches</a></li> |
|
2989 | <li><a href="/branches">branches</a></li> | |
2988 | </ul> |
|
2990 | </ul> | |
2989 | <ul> |
|
2991 | <ul> | |
2990 | <li class="active"><a href="/help">help</a></li> |
|
2992 | <li class="active"><a href="/help">help</a></li> | |
2991 | </ul> |
|
2993 | </ul> | |
2992 | </div> |
|
2994 | </div> | |
2993 |
|
2995 | |||
2994 | <div class="main"> |
|
2996 | <div class="main"> | |
2995 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2997 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2996 | <h3>Help: dates</h3> |
|
2998 | <h3>Help: dates</h3> | |
2997 |
|
2999 | |||
2998 | <form class="search" action="/log"> |
|
3000 | <form class="search" action="/log"> | |
2999 |
|
3001 | |||
3000 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3002 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3001 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3003 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3002 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3004 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3003 | </form> |
|
3005 | </form> | |
3004 | <div id="doc"> |
|
3006 | <div id="doc"> | |
3005 | <h1>Date Formats</h1> |
|
3007 | <h1>Date Formats</h1> | |
3006 | <p> |
|
3008 | <p> | |
3007 | Some commands allow the user to specify a date, e.g.: |
|
3009 | Some commands allow the user to specify a date, e.g.: | |
3008 | </p> |
|
3010 | </p> | |
3009 | <ul> |
|
3011 | <ul> | |
3010 | <li> backout, commit, import, tag: Specify the commit date. |
|
3012 | <li> backout, commit, import, tag: Specify the commit date. | |
3011 | <li> log, revert, update: Select revision(s) by date. |
|
3013 | <li> log, revert, update: Select revision(s) by date. | |
3012 | </ul> |
|
3014 | </ul> | |
3013 | <p> |
|
3015 | <p> | |
3014 | Many date formats are valid. Here are some examples: |
|
3016 | Many date formats are valid. Here are some examples: | |
3015 | </p> |
|
3017 | </p> | |
3016 | <ul> |
|
3018 | <ul> | |
3017 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
3019 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
3018 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
3020 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
3019 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
3021 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
3020 | <li> "Dec 6" (midnight) |
|
3022 | <li> "Dec 6" (midnight) | |
3021 | <li> "13:18" (today assumed) |
|
3023 | <li> "13:18" (today assumed) | |
3022 | <li> "3:39" (3:39AM assumed) |
|
3024 | <li> "3:39" (3:39AM assumed) | |
3023 | <li> "3:39pm" (15:39) |
|
3025 | <li> "3:39pm" (15:39) | |
3024 | <li> "2006-12-06 13:18:29" (ISO 8601 format) |
|
3026 | <li> "2006-12-06 13:18:29" (ISO 8601 format) | |
3025 | <li> "2006-12-6 13:18" |
|
3027 | <li> "2006-12-6 13:18" | |
3026 | <li> "2006-12-6" |
|
3028 | <li> "2006-12-6" | |
3027 | <li> "12-6" |
|
3029 | <li> "12-6" | |
3028 | <li> "12/6" |
|
3030 | <li> "12/6" | |
3029 | <li> "12/6/6" (Dec 6 2006) |
|
3031 | <li> "12/6/6" (Dec 6 2006) | |
3030 | <li> "today" (midnight) |
|
3032 | <li> "today" (midnight) | |
3031 | <li> "yesterday" (midnight) |
|
3033 | <li> "yesterday" (midnight) | |
3032 | <li> "now" - right now |
|
3034 | <li> "now" - right now | |
3033 | </ul> |
|
3035 | </ul> | |
3034 | <p> |
|
3036 | <p> | |
3035 | Lastly, there is Mercurial's internal format: |
|
3037 | Lastly, there is Mercurial's internal format: | |
3036 | </p> |
|
3038 | </p> | |
3037 | <ul> |
|
3039 | <ul> | |
3038 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
3040 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
3039 | </ul> |
|
3041 | </ul> | |
3040 | <p> |
|
3042 | <p> | |
3041 | This is the internal representation format for dates. The first number |
|
3043 | This is the internal representation format for dates. The first number | |
3042 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The |
|
3044 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The | |
3043 | second is the offset of the local timezone, in seconds west of UTC |
|
3045 | second is the offset of the local timezone, in seconds west of UTC | |
3044 | (negative if the timezone is east of UTC). |
|
3046 | (negative if the timezone is east of UTC). | |
3045 | </p> |
|
3047 | </p> | |
3046 | <p> |
|
3048 | <p> | |
3047 | The log command also accepts date ranges: |
|
3049 | The log command also accepts date ranges: | |
3048 | </p> |
|
3050 | </p> | |
3049 | <ul> |
|
3051 | <ul> | |
3050 | <li> "<DATE" - at or before a given date/time |
|
3052 | <li> "<DATE" - at or before a given date/time | |
3051 | <li> ">DATE" - on or after a given date/time |
|
3053 | <li> ">DATE" - on or after a given date/time | |
3052 | <li> "DATE to DATE" - a date range, inclusive |
|
3054 | <li> "DATE to DATE" - a date range, inclusive | |
3053 | <li> "-DAYS" - within a given number of days of today |
|
3055 | <li> "-DAYS" - within a given number of days of today | |
3054 | </ul> |
|
3056 | </ul> | |
3055 |
|
3057 | |||
3056 | </div> |
|
3058 | </div> | |
3057 | </div> |
|
3059 | </div> | |
3058 | </div> |
|
3060 | </div> | |
3059 |
|
3061 | |||
3060 |
|
3062 | |||
3061 |
|
3063 | |||
3062 | </body> |
|
3064 | </body> | |
3063 | </html> |
|
3065 | </html> | |
3064 |
|
3066 | |||
3065 |
|
3067 | |||
3066 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" |
|
3068 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" | |
3067 | 200 Script output follows |
|
3069 | 200 Script output follows | |
3068 |
|
3070 | |||
3069 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3071 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3070 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3072 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3071 | <head> |
|
3073 | <head> | |
3072 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3074 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3073 | <meta name="robots" content="index, nofollow" /> |
|
3075 | <meta name="robots" content="index, nofollow" /> | |
3074 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3076 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3075 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3077 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3076 |
|
3078 | |||
3077 | <title>Help: pager</title> |
|
3079 | <title>Help: pager</title> | |
3078 | </head> |
|
3080 | </head> | |
3079 | <body> |
|
3081 | <body> | |
3080 |
|
3082 | |||
3081 | <div class="container"> |
|
3083 | <div class="container"> | |
3082 | <div class="menu"> |
|
3084 | <div class="menu"> | |
3083 | <div class="logo"> |
|
3085 | <div class="logo"> | |
3084 | <a href="https://mercurial-scm.org/"> |
|
3086 | <a href="https://mercurial-scm.org/"> | |
3085 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3087 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3086 | </div> |
|
3088 | </div> | |
3087 | <ul> |
|
3089 | <ul> | |
3088 | <li><a href="/shortlog">log</a></li> |
|
3090 | <li><a href="/shortlog">log</a></li> | |
3089 | <li><a href="/graph">graph</a></li> |
|
3091 | <li><a href="/graph">graph</a></li> | |
3090 | <li><a href="/tags">tags</a></li> |
|
3092 | <li><a href="/tags">tags</a></li> | |
3091 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3093 | <li><a href="/bookmarks">bookmarks</a></li> | |
3092 | <li><a href="/branches">branches</a></li> |
|
3094 | <li><a href="/branches">branches</a></li> | |
3093 | </ul> |
|
3095 | </ul> | |
3094 | <ul> |
|
3096 | <ul> | |
3095 | <li class="active"><a href="/help">help</a></li> |
|
3097 | <li class="active"><a href="/help">help</a></li> | |
3096 | </ul> |
|
3098 | </ul> | |
3097 | </div> |
|
3099 | </div> | |
3098 |
|
3100 | |||
3099 | <div class="main"> |
|
3101 | <div class="main"> | |
3100 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3102 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3101 | <h3>Help: pager</h3> |
|
3103 | <h3>Help: pager</h3> | |
3102 |
|
3104 | |||
3103 | <form class="search" action="/log"> |
|
3105 | <form class="search" action="/log"> | |
3104 |
|
3106 | |||
3105 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3107 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3106 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3108 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3107 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3109 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3108 | </form> |
|
3110 | </form> | |
3109 | <div id="doc"> |
|
3111 | <div id="doc"> | |
3110 | <h1>Pager Support</h1> |
|
3112 | <h1>Pager Support</h1> | |
3111 | <p> |
|
3113 | <p> | |
3112 | Some Mercurial commands can produce a lot of output, and Mercurial will |
|
3114 | Some Mercurial commands can produce a lot of output, and Mercurial will | |
3113 | attempt to use a pager to make those commands more pleasant. |
|
3115 | attempt to use a pager to make those commands more pleasant. | |
3114 | </p> |
|
3116 | </p> | |
3115 | <p> |
|
3117 | <p> | |
3116 | To set the pager that should be used, set the application variable: |
|
3118 | To set the pager that should be used, set the application variable: | |
3117 | </p> |
|
3119 | </p> | |
3118 | <pre> |
|
3120 | <pre> | |
3119 | [pager] |
|
3121 | [pager] | |
3120 | pager = less -FRX |
|
3122 | pager = less -FRX | |
3121 | </pre> |
|
3123 | </pre> | |
3122 | <p> |
|
3124 | <p> | |
3123 | If no pager is set in the user or repository configuration, Mercurial uses the |
|
3125 | If no pager is set in the user or repository configuration, Mercurial uses the | |
3124 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default |
|
3126 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default | |
3125 | or system configuration is used. If none of these are set, a default pager will |
|
3127 | or system configuration is used. If none of these are set, a default pager will | |
3126 | be used, typically 'less' on Unix and 'more' on Windows. |
|
3128 | be used, typically 'less' on Unix and 'more' on Windows. | |
3127 | </p> |
|
3129 | </p> | |
3128 | <p> |
|
3130 | <p> | |
3129 | You can disable the pager for certain commands by adding them to the |
|
3131 | You can disable the pager for certain commands by adding them to the | |
3130 | pager.ignore list: |
|
3132 | pager.ignore list: | |
3131 | </p> |
|
3133 | </p> | |
3132 | <pre> |
|
3134 | <pre> | |
3133 | [pager] |
|
3135 | [pager] | |
3134 | ignore = version, help, update |
|
3136 | ignore = version, help, update | |
3135 | </pre> |
|
3137 | </pre> | |
3136 | <p> |
|
3138 | <p> | |
3137 | To ignore global commands like 'hg version' or 'hg help', you have |
|
3139 | To ignore global commands like 'hg version' or 'hg help', you have | |
3138 | to specify them in your user configuration file. |
|
3140 | to specify them in your user configuration file. | |
3139 | </p> |
|
3141 | </p> | |
3140 | <p> |
|
3142 | <p> | |
3141 | To control whether the pager is used at all for an individual command, |
|
3143 | To control whether the pager is used at all for an individual command, | |
3142 | you can use --pager=<value>: |
|
3144 | you can use --pager=<value>: | |
3143 | </p> |
|
3145 | </p> | |
3144 | <ul> |
|
3146 | <ul> | |
3145 | <li> use as needed: 'auto'. |
|
3147 | <li> use as needed: 'auto'. | |
3146 | <li> require the pager: 'yes' or 'on'. |
|
3148 | <li> require the pager: 'yes' or 'on'. | |
3147 | <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). |
|
3149 | <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). | |
3148 | </ul> |
|
3150 | </ul> | |
3149 | <p> |
|
3151 | <p> | |
3150 | To globally turn off all attempts to use a pager, set: |
|
3152 | To globally turn off all attempts to use a pager, set: | |
3151 | </p> |
|
3153 | </p> | |
3152 | <pre> |
|
3154 | <pre> | |
3153 | [ui] |
|
3155 | [ui] | |
3154 | paginate = never |
|
3156 | paginate = never | |
3155 | </pre> |
|
3157 | </pre> | |
3156 | <p> |
|
3158 | <p> | |
3157 | which will prevent the pager from running. |
|
3159 | which will prevent the pager from running. | |
3158 | </p> |
|
3160 | </p> | |
3159 |
|
3161 | |||
3160 | </div> |
|
3162 | </div> | |
3161 | </div> |
|
3163 | </div> | |
3162 | </div> |
|
3164 | </div> | |
3163 |
|
3165 | |||
3164 |
|
3166 | |||
3165 |
|
3167 | |||
3166 | </body> |
|
3168 | </body> | |
3167 | </html> |
|
3169 | </html> | |
3168 |
|
3170 | |||
3169 |
|
3171 | |||
3170 | Sub-topic indexes rendered properly |
|
3172 | Sub-topic indexes rendered properly | |
3171 |
|
3173 | |||
3172 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" |
|
3174 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" | |
3173 | 200 Script output follows |
|
3175 | 200 Script output follows | |
3174 |
|
3176 | |||
3175 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3177 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3176 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3178 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3177 | <head> |
|
3179 | <head> | |
3178 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3180 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3179 | <meta name="robots" content="index, nofollow" /> |
|
3181 | <meta name="robots" content="index, nofollow" /> | |
3180 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3182 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3181 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3183 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3182 |
|
3184 | |||
3183 | <title>Help: internals</title> |
|
3185 | <title>Help: internals</title> | |
3184 | </head> |
|
3186 | </head> | |
3185 | <body> |
|
3187 | <body> | |
3186 |
|
3188 | |||
3187 | <div class="container"> |
|
3189 | <div class="container"> | |
3188 | <div class="menu"> |
|
3190 | <div class="menu"> | |
3189 | <div class="logo"> |
|
3191 | <div class="logo"> | |
3190 | <a href="https://mercurial-scm.org/"> |
|
3192 | <a href="https://mercurial-scm.org/"> | |
3191 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3193 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3192 | </div> |
|
3194 | </div> | |
3193 | <ul> |
|
3195 | <ul> | |
3194 | <li><a href="/shortlog">log</a></li> |
|
3196 | <li><a href="/shortlog">log</a></li> | |
3195 | <li><a href="/graph">graph</a></li> |
|
3197 | <li><a href="/graph">graph</a></li> | |
3196 | <li><a href="/tags">tags</a></li> |
|
3198 | <li><a href="/tags">tags</a></li> | |
3197 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3199 | <li><a href="/bookmarks">bookmarks</a></li> | |
3198 | <li><a href="/branches">branches</a></li> |
|
3200 | <li><a href="/branches">branches</a></li> | |
3199 | </ul> |
|
3201 | </ul> | |
3200 | <ul> |
|
3202 | <ul> | |
3201 | <li><a href="/help">help</a></li> |
|
3203 | <li><a href="/help">help</a></li> | |
3202 | </ul> |
|
3204 | </ul> | |
3203 | </div> |
|
3205 | </div> | |
3204 |
|
3206 | |||
3205 | <div class="main"> |
|
3207 | <div class="main"> | |
3206 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3208 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3207 |
|
3209 | |||
3208 | <form class="search" action="/log"> |
|
3210 | <form class="search" action="/log"> | |
3209 |
|
3211 | |||
3210 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3212 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3211 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3213 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3212 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3214 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3213 | </form> |
|
3215 | </form> | |
3214 | <table class="bigtable"> |
|
3216 | <table class="bigtable"> | |
3215 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
3217 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
3216 |
|
3218 | |||
3217 | <tr><td> |
|
3219 | <tr><td> | |
3218 | <a href="/help/internals.bundle2"> |
|
3220 | <a href="/help/internals.bundle2"> | |
3219 | bundle2 |
|
3221 | bundle2 | |
3220 | </a> |
|
3222 | </a> | |
3221 | </td><td> |
|
3223 | </td><td> | |
3222 | Bundle2 |
|
3224 | Bundle2 | |
3223 | </td></tr> |
|
3225 | </td></tr> | |
3224 | <tr><td> |
|
3226 | <tr><td> | |
3225 | <a href="/help/internals.bundles"> |
|
3227 | <a href="/help/internals.bundles"> | |
3226 | bundles |
|
3228 | bundles | |
3227 | </a> |
|
3229 | </a> | |
3228 | </td><td> |
|
3230 | </td><td> | |
3229 | Bundles |
|
3231 | Bundles | |
3230 | </td></tr> |
|
3232 | </td></tr> | |
3231 | <tr><td> |
|
3233 | <tr><td> | |
3232 | <a href="/help/internals.censor"> |
|
3234 | <a href="/help/internals.censor"> | |
3233 | censor |
|
3235 | censor | |
3234 | </a> |
|
3236 | </a> | |
3235 | </td><td> |
|
3237 | </td><td> | |
3236 | Censor |
|
3238 | Censor | |
3237 | </td></tr> |
|
3239 | </td></tr> | |
3238 | <tr><td> |
|
3240 | <tr><td> | |
3239 | <a href="/help/internals.changegroups"> |
|
3241 | <a href="/help/internals.changegroups"> | |
3240 | changegroups |
|
3242 | changegroups | |
3241 | </a> |
|
3243 | </a> | |
3242 | </td><td> |
|
3244 | </td><td> | |
3243 | Changegroups |
|
3245 | Changegroups | |
3244 | </td></tr> |
|
3246 | </td></tr> | |
3245 | <tr><td> |
|
3247 | <tr><td> | |
3246 | <a href="/help/internals.config"> |
|
3248 | <a href="/help/internals.config"> | |
3247 | config |
|
3249 | config | |
3248 | </a> |
|
3250 | </a> | |
3249 | </td><td> |
|
3251 | </td><td> | |
3250 | Config Registrar |
|
3252 | Config Registrar | |
3251 | </td></tr> |
|
3253 | </td></tr> | |
3252 | <tr><td> |
|
3254 | <tr><td> | |
3253 | <a href="/help/internals.requirements"> |
|
3255 | <a href="/help/internals.requirements"> | |
3254 | requirements |
|
3256 | requirements | |
3255 | </a> |
|
3257 | </a> | |
3256 | </td><td> |
|
3258 | </td><td> | |
3257 | Repository Requirements |
|
3259 | Repository Requirements | |
3258 | </td></tr> |
|
3260 | </td></tr> | |
3259 | <tr><td> |
|
3261 | <tr><td> | |
3260 | <a href="/help/internals.revlogs"> |
|
3262 | <a href="/help/internals.revlogs"> | |
3261 | revlogs |
|
3263 | revlogs | |
3262 | </a> |
|
3264 | </a> | |
3263 | </td><td> |
|
3265 | </td><td> | |
3264 | Revision Logs |
|
3266 | Revision Logs | |
3265 | </td></tr> |
|
3267 | </td></tr> | |
3266 | <tr><td> |
|
3268 | <tr><td> | |
3267 | <a href="/help/internals.wireprotocol"> |
|
3269 | <a href="/help/internals.wireprotocol"> | |
3268 | wireprotocol |
|
3270 | wireprotocol | |
3269 | </a> |
|
3271 | </a> | |
3270 | </td><td> |
|
3272 | </td><td> | |
3271 | Wire Protocol |
|
3273 | Wire Protocol | |
3272 | </td></tr> |
|
3274 | </td></tr> | |
3273 |
|
3275 | |||
3274 |
|
3276 | |||
3275 |
|
3277 | |||
3276 |
|
3278 | |||
3277 |
|
3279 | |||
3278 | </table> |
|
3280 | </table> | |
3279 | </div> |
|
3281 | </div> | |
3280 | </div> |
|
3282 | </div> | |
3281 |
|
3283 | |||
3282 |
|
3284 | |||
3283 |
|
3285 | |||
3284 | </body> |
|
3286 | </body> | |
3285 | </html> |
|
3287 | </html> | |
3286 |
|
3288 | |||
3287 |
|
3289 | |||
3288 | Sub-topic topics rendered properly |
|
3290 | Sub-topic topics rendered properly | |
3289 |
|
3291 | |||
3290 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" |
|
3292 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" | |
3291 | 200 Script output follows |
|
3293 | 200 Script output follows | |
3292 |
|
3294 | |||
3293 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3295 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3294 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3296 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3295 | <head> |
|
3297 | <head> | |
3296 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3298 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3297 | <meta name="robots" content="index, nofollow" /> |
|
3299 | <meta name="robots" content="index, nofollow" /> | |
3298 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3300 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3299 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3301 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3300 |
|
3302 | |||
3301 | <title>Help: internals.changegroups</title> |
|
3303 | <title>Help: internals.changegroups</title> | |
3302 | </head> |
|
3304 | </head> | |
3303 | <body> |
|
3305 | <body> | |
3304 |
|
3306 | |||
3305 | <div class="container"> |
|
3307 | <div class="container"> | |
3306 | <div class="menu"> |
|
3308 | <div class="menu"> | |
3307 | <div class="logo"> |
|
3309 | <div class="logo"> | |
3308 | <a href="https://mercurial-scm.org/"> |
|
3310 | <a href="https://mercurial-scm.org/"> | |
3309 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3311 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3310 | </div> |
|
3312 | </div> | |
3311 | <ul> |
|
3313 | <ul> | |
3312 | <li><a href="/shortlog">log</a></li> |
|
3314 | <li><a href="/shortlog">log</a></li> | |
3313 | <li><a href="/graph">graph</a></li> |
|
3315 | <li><a href="/graph">graph</a></li> | |
3314 | <li><a href="/tags">tags</a></li> |
|
3316 | <li><a href="/tags">tags</a></li> | |
3315 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3317 | <li><a href="/bookmarks">bookmarks</a></li> | |
3316 | <li><a href="/branches">branches</a></li> |
|
3318 | <li><a href="/branches">branches</a></li> | |
3317 | </ul> |
|
3319 | </ul> | |
3318 | <ul> |
|
3320 | <ul> | |
3319 | <li class="active"><a href="/help">help</a></li> |
|
3321 | <li class="active"><a href="/help">help</a></li> | |
3320 | </ul> |
|
3322 | </ul> | |
3321 | </div> |
|
3323 | </div> | |
3322 |
|
3324 | |||
3323 | <div class="main"> |
|
3325 | <div class="main"> | |
3324 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3326 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3325 | <h3>Help: internals.changegroups</h3> |
|
3327 | <h3>Help: internals.changegroups</h3> | |
3326 |
|
3328 | |||
3327 | <form class="search" action="/log"> |
|
3329 | <form class="search" action="/log"> | |
3328 |
|
3330 | |||
3329 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3331 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3330 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3332 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3331 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3333 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3332 | </form> |
|
3334 | </form> | |
3333 | <div id="doc"> |
|
3335 | <div id="doc"> | |
3334 | <h1>Changegroups</h1> |
|
3336 | <h1>Changegroups</h1> | |
3335 | <p> |
|
3337 | <p> | |
3336 | Changegroups are representations of repository revlog data, specifically |
|
3338 | Changegroups are representations of repository revlog data, specifically | |
3337 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3339 | the changelog data, root/flat manifest data, treemanifest data, and | |
3338 | filelogs. |
|
3340 | filelogs. | |
3339 | </p> |
|
3341 | </p> | |
3340 | <p> |
|
3342 | <p> | |
3341 | There are 3 versions of changegroups: "1", "2", and "3". From a |
|
3343 | There are 3 versions of changegroups: "1", "2", and "3". From a | |
3342 | high-level, versions "1" and "2" are almost exactly the same, with the |
|
3344 | high-level, versions "1" and "2" are almost exactly the same, with the | |
3343 | only difference being an additional item in the *delta header*. Version |
|
3345 | only difference being an additional item in the *delta header*. Version | |
3344 | "3" adds support for revlog flags in the *delta header* and optionally |
|
3346 | "3" adds support for revlog flags in the *delta header* and optionally | |
3345 | exchanging treemanifests (enabled by setting an option on the |
|
3347 | exchanging treemanifests (enabled by setting an option on the | |
3346 | "changegroup" part in the bundle2). |
|
3348 | "changegroup" part in the bundle2). | |
3347 | </p> |
|
3349 | </p> | |
3348 | <p> |
|
3350 | <p> | |
3349 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
3351 | Changegroups when not exchanging treemanifests consist of 3 logical | |
3350 | segments: |
|
3352 | segments: | |
3351 | </p> |
|
3353 | </p> | |
3352 | <pre> |
|
3354 | <pre> | |
3353 | +---------------------------------+ |
|
3355 | +---------------------------------+ | |
3354 | | | | | |
|
3356 | | | | | | |
3355 | | changeset | manifest | filelogs | |
|
3357 | | changeset | manifest | filelogs | | |
3356 | | | | | |
|
3358 | | | | | | |
3357 | | | | | |
|
3359 | | | | | | |
3358 | +---------------------------------+ |
|
3360 | +---------------------------------+ | |
3359 | </pre> |
|
3361 | </pre> | |
3360 | <p> |
|
3362 | <p> | |
3361 | When exchanging treemanifests, there are 4 logical segments: |
|
3363 | When exchanging treemanifests, there are 4 logical segments: | |
3362 | </p> |
|
3364 | </p> | |
3363 | <pre> |
|
3365 | <pre> | |
3364 | +-------------------------------------------------+ |
|
3366 | +-------------------------------------------------+ | |
3365 | | | | | | |
|
3367 | | | | | | | |
3366 | | changeset | root | treemanifests | filelogs | |
|
3368 | | changeset | root | treemanifests | filelogs | | |
3367 | | | manifest | | | |
|
3369 | | | manifest | | | | |
3368 | | | | | | |
|
3370 | | | | | | | |
3369 | +-------------------------------------------------+ |
|
3371 | +-------------------------------------------------+ | |
3370 | </pre> |
|
3372 | </pre> | |
3371 | <p> |
|
3373 | <p> | |
3372 | The principle building block of each segment is a *chunk*. A *chunk* |
|
3374 | The principle building block of each segment is a *chunk*. A *chunk* | |
3373 | is a framed piece of data: |
|
3375 | is a framed piece of data: | |
3374 | </p> |
|
3376 | </p> | |
3375 | <pre> |
|
3377 | <pre> | |
3376 | +---------------------------------------+ |
|
3378 | +---------------------------------------+ | |
3377 | | | | |
|
3379 | | | | | |
3378 | | length | data | |
|
3380 | | length | data | | |
3379 | | (4 bytes) | (<length - 4> bytes) | |
|
3381 | | (4 bytes) | (<length - 4> bytes) | | |
3380 | | | | |
|
3382 | | | | | |
3381 | +---------------------------------------+ |
|
3383 | +---------------------------------------+ | |
3382 | </pre> |
|
3384 | </pre> | |
3383 | <p> |
|
3385 | <p> | |
3384 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
3386 | All integers are big-endian signed integers. Each chunk starts with a 32-bit | |
3385 | integer indicating the length of the entire chunk (including the length field |
|
3387 | integer indicating the length of the entire chunk (including the length field | |
3386 | itself). |
|
3388 | itself). | |
3387 | </p> |
|
3389 | </p> | |
3388 | <p> |
|
3390 | <p> | |
3389 | There is a special case chunk that has a value of 0 for the length |
|
3391 | There is a special case chunk that has a value of 0 for the length | |
3390 | ("0x00000000"). We call this an *empty chunk*. |
|
3392 | ("0x00000000"). We call this an *empty chunk*. | |
3391 | </p> |
|
3393 | </p> | |
3392 | <h2>Delta Groups</h2> |
|
3394 | <h2>Delta Groups</h2> | |
3393 | <p> |
|
3395 | <p> | |
3394 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
3396 | A *delta group* expresses the content of a revlog as a series of deltas, | |
3395 | or patches against previous revisions. |
|
3397 | or patches against previous revisions. | |
3396 | </p> |
|
3398 | </p> | |
3397 | <p> |
|
3399 | <p> | |
3398 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
3400 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
3399 | to signal the end of the delta group: |
|
3401 | to signal the end of the delta group: | |
3400 | </p> |
|
3402 | </p> | |
3401 | <pre> |
|
3403 | <pre> | |
3402 | +------------------------------------------------------------------------+ |
|
3404 | +------------------------------------------------------------------------+ | |
3403 | | | | | | | |
|
3405 | | | | | | | | |
3404 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
3406 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
3405 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
3407 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
3406 | | | | | | | |
|
3408 | | | | | | | | |
3407 | +------------------------------------------------------------------------+ |
|
3409 | +------------------------------------------------------------------------+ | |
3408 | </pre> |
|
3410 | </pre> | |
3409 | <p> |
|
3411 | <p> | |
3410 | Each *chunk*'s data consists of the following: |
|
3412 | Each *chunk*'s data consists of the following: | |
3411 | </p> |
|
3413 | </p> | |
3412 | <pre> |
|
3414 | <pre> | |
3413 | +---------------------------------------+ |
|
3415 | +---------------------------------------+ | |
3414 | | | | |
|
3416 | | | | | |
3415 | | delta header | delta data | |
|
3417 | | delta header | delta data | | |
3416 | | (various by version) | (various) | |
|
3418 | | (various by version) | (various) | | |
3417 | | | | |
|
3419 | | | | | |
3418 | +---------------------------------------+ |
|
3420 | +---------------------------------------+ | |
3419 | </pre> |
|
3421 | </pre> | |
3420 | <p> |
|
3422 | <p> | |
3421 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
3423 | The *delta data* is a series of *delta*s that describe a diff from an existing | |
3422 | entry (either that the recipient already has, or previously specified in the |
|
3424 | entry (either that the recipient already has, or previously specified in the | |
3423 | bundle/changegroup). |
|
3425 | bundle/changegroup). | |
3424 | </p> |
|
3426 | </p> | |
3425 | <p> |
|
3427 | <p> | |
3426 | The *delta header* is different between versions "1", "2", and |
|
3428 | The *delta header* is different between versions "1", "2", and | |
3427 | "3" of the changegroup format. |
|
3429 | "3" of the changegroup format. | |
3428 | </p> |
|
3430 | </p> | |
3429 | <p> |
|
3431 | <p> | |
3430 | Version 1 (headerlen=80): |
|
3432 | Version 1 (headerlen=80): | |
3431 | </p> |
|
3433 | </p> | |
3432 | <pre> |
|
3434 | <pre> | |
3433 | +------------------------------------------------------+ |
|
3435 | +------------------------------------------------------+ | |
3434 | | | | | | |
|
3436 | | | | | | | |
3435 | | node | p1 node | p2 node | link node | |
|
3437 | | node | p1 node | p2 node | link node | | |
3436 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3438 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3437 | | | | | | |
|
3439 | | | | | | | |
3438 | +------------------------------------------------------+ |
|
3440 | +------------------------------------------------------+ | |
3439 | </pre> |
|
3441 | </pre> | |
3440 | <p> |
|
3442 | <p> | |
3441 | Version 2 (headerlen=100): |
|
3443 | Version 2 (headerlen=100): | |
3442 | </p> |
|
3444 | </p> | |
3443 | <pre> |
|
3445 | <pre> | |
3444 | +------------------------------------------------------------------+ |
|
3446 | +------------------------------------------------------------------+ | |
3445 | | | | | | | |
|
3447 | | | | | | | | |
3446 | | node | p1 node | p2 node | base node | link node | |
|
3448 | | node | p1 node | p2 node | base node | link node | | |
3447 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3449 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3448 | | | | | | | |
|
3450 | | | | | | | | |
3449 | +------------------------------------------------------------------+ |
|
3451 | +------------------------------------------------------------------+ | |
3450 | </pre> |
|
3452 | </pre> | |
3451 | <p> |
|
3453 | <p> | |
3452 | Version 3 (headerlen=102): |
|
3454 | Version 3 (headerlen=102): | |
3453 | </p> |
|
3455 | </p> | |
3454 | <pre> |
|
3456 | <pre> | |
3455 | +------------------------------------------------------------------------------+ |
|
3457 | +------------------------------------------------------------------------------+ | |
3456 | | | | | | | | |
|
3458 | | | | | | | | | |
3457 | | node | p1 node | p2 node | base node | link node | flags | |
|
3459 | | node | p1 node | p2 node | base node | link node | flags | | |
3458 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
3460 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
3459 | | | | | | | | |
|
3461 | | | | | | | | | |
3460 | +------------------------------------------------------------------------------+ |
|
3462 | +------------------------------------------------------------------------------+ | |
3461 | </pre> |
|
3463 | </pre> | |
3462 | <p> |
|
3464 | <p> | |
3463 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a |
|
3465 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a | |
3464 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
3466 | series of *delta*s, densely packed (no separators). These deltas describe a diff | |
3465 | from an existing entry (either that the recipient already has, or previously |
|
3467 | from an existing entry (either that the recipient already has, or previously | |
3466 | specified in the bundle/changegroup). The format is described more fully in |
|
3468 | specified in the bundle/changegroup). The format is described more fully in | |
3467 | "hg help internals.bdiff", but briefly: |
|
3469 | "hg help internals.bdiff", but briefly: | |
3468 | </p> |
|
3470 | </p> | |
3469 | <pre> |
|
3471 | <pre> | |
3470 | +---------------------------------------------------------------+ |
|
3472 | +---------------------------------------------------------------+ | |
3471 | | | | | | |
|
3473 | | | | | | | |
3472 | | start offset | end offset | new length | content | |
|
3474 | | start offset | end offset | new length | content | | |
3473 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
3475 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
3474 | | | | | | |
|
3476 | | | | | | | |
3475 | +---------------------------------------------------------------+ |
|
3477 | +---------------------------------------------------------------+ | |
3476 | </pre> |
|
3478 | </pre> | |
3477 | <p> |
|
3479 | <p> | |
3478 | Please note that the length field in the delta data does *not* include itself. |
|
3480 | Please note that the length field in the delta data does *not* include itself. | |
3479 | </p> |
|
3481 | </p> | |
3480 | <p> |
|
3482 | <p> | |
3481 | In version 1, the delta is always applied against the previous node from |
|
3483 | In version 1, the delta is always applied against the previous node from | |
3482 | the changegroup or the first parent if this is the first entry in the |
|
3484 | the changegroup or the first parent if this is the first entry in the | |
3483 | changegroup. |
|
3485 | changegroup. | |
3484 | </p> |
|
3486 | </p> | |
3485 | <p> |
|
3487 | <p> | |
3486 | In version 2 and up, the delta base node is encoded in the entry in the |
|
3488 | In version 2 and up, the delta base node is encoded in the entry in the | |
3487 | changegroup. This allows the delta to be expressed against any parent, |
|
3489 | changegroup. This allows the delta to be expressed against any parent, | |
3488 | which can result in smaller deltas and more efficient encoding of data. |
|
3490 | which can result in smaller deltas and more efficient encoding of data. | |
3489 | </p> |
|
3491 | </p> | |
3490 | <h2>Changeset Segment</h2> |
|
3492 | <h2>Changeset Segment</h2> | |
3491 | <p> |
|
3493 | <p> | |
3492 | The *changeset segment* consists of a single *delta group* holding |
|
3494 | The *changeset segment* consists of a single *delta group* holding | |
3493 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
3495 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
3494 | the boundary to the *manifest segment*. |
|
3496 | the boundary to the *manifest segment*. | |
3495 | </p> |
|
3497 | </p> | |
3496 | <h2>Manifest Segment</h2> |
|
3498 | <h2>Manifest Segment</h2> | |
3497 | <p> |
|
3499 | <p> | |
3498 | The *manifest segment* consists of a single *delta group* holding manifest |
|
3500 | The *manifest segment* consists of a single *delta group* holding manifest | |
3499 | data. If treemanifests are in use, it contains only the manifest for the |
|
3501 | data. If treemanifests are in use, it contains only the manifest for the | |
3500 | root directory of the repository. Otherwise, it contains the entire |
|
3502 | root directory of the repository. Otherwise, it contains the entire | |
3501 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
3503 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
3502 | the boundary to the next segment (either the *treemanifests segment* or the |
|
3504 | the boundary to the next segment (either the *treemanifests segment* or the | |
3503 | *filelogs segment*, depending on version and the request options). |
|
3505 | *filelogs segment*, depending on version and the request options). | |
3504 | </p> |
|
3506 | </p> | |
3505 | <h3>Treemanifests Segment</h3> |
|
3507 | <h3>Treemanifests Segment</h3> | |
3506 | <p> |
|
3508 | <p> | |
3507 | The *treemanifests segment* only exists in changegroup version "3", and |
|
3509 | The *treemanifests segment* only exists in changegroup version "3", and | |
3508 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
3510 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
3509 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
3511 | (it is not possible to use changegroup version 3 outside of bundle2). | |
3510 | Aside from the filenames in the *treemanifests segment* containing a |
|
3512 | Aside from the filenames in the *treemanifests segment* containing a | |
3511 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
3513 | trailing "/" character, it behaves identically to the *filelogs segment* | |
3512 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
3514 | (see below). The final sub-segment is followed by an *empty chunk* (logically, | |
3513 | a sub-segment with filename size 0). This denotes the boundary to the |
|
3515 | a sub-segment with filename size 0). This denotes the boundary to the | |
3514 | *filelogs segment*. |
|
3516 | *filelogs segment*. | |
3515 | </p> |
|
3517 | </p> | |
3516 | <h2>Filelogs Segment</h2> |
|
3518 | <h2>Filelogs Segment</h2> | |
3517 | <p> |
|
3519 | <p> | |
3518 | The *filelogs segment* consists of multiple sub-segments, each |
|
3520 | The *filelogs segment* consists of multiple sub-segments, each | |
3519 | corresponding to an individual file whose data is being described: |
|
3521 | corresponding to an individual file whose data is being described: | |
3520 | </p> |
|
3522 | </p> | |
3521 | <pre> |
|
3523 | <pre> | |
3522 | +--------------------------------------------------+ |
|
3524 | +--------------------------------------------------+ | |
3523 | | | | | | | |
|
3525 | | | | | | | | |
3524 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
3526 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
3525 | | | | | | (4 bytes) | |
|
3527 | | | | | | (4 bytes) | | |
3526 | | | | | | | |
|
3528 | | | | | | | | |
3527 | +--------------------------------------------------+ |
|
3529 | +--------------------------------------------------+ | |
3528 | </pre> |
|
3530 | </pre> | |
3529 | <p> |
|
3531 | <p> | |
3530 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
3532 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
3531 | a sub-segment with filename size 0). This denotes the end of the segment |
|
3533 | a sub-segment with filename size 0). This denotes the end of the segment | |
3532 | and of the overall changegroup. |
|
3534 | and of the overall changegroup. | |
3533 | </p> |
|
3535 | </p> | |
3534 | <p> |
|
3536 | <p> | |
3535 | Each filelog sub-segment consists of the following: |
|
3537 | Each filelog sub-segment consists of the following: | |
3536 | </p> |
|
3538 | </p> | |
3537 | <pre> |
|
3539 | <pre> | |
3538 | +------------------------------------------------------+ |
|
3540 | +------------------------------------------------------+ | |
3539 | | | | | |
|
3541 | | | | | | |
3540 | | filename length | filename | delta group | |
|
3542 | | filename length | filename | delta group | | |
3541 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
3543 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
3542 | | | | | |
|
3544 | | | | | | |
3543 | +------------------------------------------------------+ |
|
3545 | +------------------------------------------------------+ | |
3544 | </pre> |
|
3546 | </pre> | |
3545 | <p> |
|
3547 | <p> | |
3546 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
3548 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
3547 | followed by N chunks constituting the *delta group* for this file. The |
|
3549 | followed by N chunks constituting the *delta group* for this file. The | |
3548 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
3550 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
3549 | next filelog sub-segment. |
|
3551 | next filelog sub-segment. | |
3550 | </p> |
|
3552 | </p> | |
3551 |
|
3553 | |||
3552 | </div> |
|
3554 | </div> | |
3553 | </div> |
|
3555 | </div> | |
3554 | </div> |
|
3556 | </div> | |
3555 |
|
3557 | |||
3556 |
|
3558 | |||
3557 |
|
3559 | |||
3558 | </body> |
|
3560 | </body> | |
3559 | </html> |
|
3561 | </html> | |
3560 |
|
3562 | |||
3561 |
|
3563 | |||
3562 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" |
|
3564 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" | |
3563 | 404 Not Found |
|
3565 | 404 Not Found | |
3564 |
|
3566 | |||
3565 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3567 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3566 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3568 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3567 | <head> |
|
3569 | <head> | |
3568 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3570 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3569 | <meta name="robots" content="index, nofollow" /> |
|
3571 | <meta name="robots" content="index, nofollow" /> | |
3570 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3572 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3571 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3573 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3572 |
|
3574 | |||
3573 | <title>test: error</title> |
|
3575 | <title>test: error</title> | |
3574 | </head> |
|
3576 | </head> | |
3575 | <body> |
|
3577 | <body> | |
3576 |
|
3578 | |||
3577 | <div class="container"> |
|
3579 | <div class="container"> | |
3578 | <div class="menu"> |
|
3580 | <div class="menu"> | |
3579 | <div class="logo"> |
|
3581 | <div class="logo"> | |
3580 | <a href="https://mercurial-scm.org/"> |
|
3582 | <a href="https://mercurial-scm.org/"> | |
3581 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
3583 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
3582 | </div> |
|
3584 | </div> | |
3583 | <ul> |
|
3585 | <ul> | |
3584 | <li><a href="/shortlog">log</a></li> |
|
3586 | <li><a href="/shortlog">log</a></li> | |
3585 | <li><a href="/graph">graph</a></li> |
|
3587 | <li><a href="/graph">graph</a></li> | |
3586 | <li><a href="/tags">tags</a></li> |
|
3588 | <li><a href="/tags">tags</a></li> | |
3587 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3589 | <li><a href="/bookmarks">bookmarks</a></li> | |
3588 | <li><a href="/branches">branches</a></li> |
|
3590 | <li><a href="/branches">branches</a></li> | |
3589 | </ul> |
|
3591 | </ul> | |
3590 | <ul> |
|
3592 | <ul> | |
3591 | <li><a href="/help">help</a></li> |
|
3593 | <li><a href="/help">help</a></li> | |
3592 | </ul> |
|
3594 | </ul> | |
3593 | </div> |
|
3595 | </div> | |
3594 |
|
3596 | |||
3595 | <div class="main"> |
|
3597 | <div class="main"> | |
3596 |
|
3598 | |||
3597 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3599 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3598 | <h3>error</h3> |
|
3600 | <h3>error</h3> | |
3599 |
|
3601 | |||
3600 |
|
3602 | |||
3601 | <form class="search" action="/log"> |
|
3603 | <form class="search" action="/log"> | |
3602 |
|
3604 | |||
3603 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3605 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
3604 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3606 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3605 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3607 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3606 | </form> |
|
3608 | </form> | |
3607 |
|
3609 | |||
3608 | <div class="description"> |
|
3610 | <div class="description"> | |
3609 | <p> |
|
3611 | <p> | |
3610 | An error occurred while processing your request: |
|
3612 | An error occurred while processing your request: | |
3611 | </p> |
|
3613 | </p> | |
3612 | <p> |
|
3614 | <p> | |
3613 | Not Found |
|
3615 | Not Found | |
3614 | </p> |
|
3616 | </p> | |
3615 | </div> |
|
3617 | </div> | |
3616 | </div> |
|
3618 | </div> | |
3617 | </div> |
|
3619 | </div> | |
3618 |
|
3620 | |||
3619 |
|
3621 | |||
3620 |
|
3622 | |||
3621 | </body> |
|
3623 | </body> | |
3622 | </html> |
|
3624 | </html> | |
3623 |
|
3625 | |||
3624 | [1] |
|
3626 | [1] | |
3625 |
|
3627 | |||
3626 | $ killdaemons.py |
|
3628 | $ killdaemons.py | |
3627 |
|
3629 | |||
3628 | #endif |
|
3630 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now