Show More
@@ -1,1755 +1,1757 | |||
|
1 | 1 | Test basic extension support |
|
2 | 2 | |
|
3 | 3 | $ cat > foobar.py <<EOF |
|
4 | 4 | > import os |
|
5 | 5 | > from mercurial import commands, registrar |
|
6 | 6 | > cmdtable = {} |
|
7 | 7 | > command = registrar.command(cmdtable) |
|
8 | 8 | > configtable = {} |
|
9 | 9 | > configitem = registrar.configitem(configtable) |
|
10 | 10 | > configitem(b'tests', b'foo', default=b"Foo") |
|
11 | 11 | > def uisetup(ui): |
|
12 | 12 | > ui.debug(b"uisetup called [debug]\\n") |
|
13 | 13 | > ui.write(b"uisetup called\\n") |
|
14 | 14 | > ui.status(b"uisetup called [status]\\n") |
|
15 | 15 | > ui.flush() |
|
16 | 16 | > def reposetup(ui, repo): |
|
17 | 17 | > ui.write(b"reposetup called for %s\\n" % os.path.basename(repo.root)) |
|
18 | 18 | > ui.write(b"ui %s= repo.ui\\n" % (ui == repo.ui and b"=" or b"!")) |
|
19 | 19 | > ui.flush() |
|
20 | 20 | > @command(b'foo', [], b'hg foo') |
|
21 | 21 | > def foo(ui, *args, **kwargs): |
|
22 | 22 | > foo = ui.config(b'tests', b'foo') |
|
23 | 23 | > ui.write(foo) |
|
24 | 24 | > ui.write(b"\\n") |
|
25 | 25 | > @command(b'bar', [], b'hg bar', norepo=True) |
|
26 | 26 | > def bar(ui, *args, **kwargs): |
|
27 | 27 | > ui.write(b"Bar\\n") |
|
28 | 28 | > EOF |
|
29 | 29 | $ abspath=`pwd`/foobar.py |
|
30 | 30 | |
|
31 | 31 | $ mkdir barfoo |
|
32 | 32 | $ cp foobar.py barfoo/__init__.py |
|
33 | 33 | $ barfoopath=`pwd`/barfoo |
|
34 | 34 | |
|
35 | 35 | $ hg init a |
|
36 | 36 | $ cd a |
|
37 | 37 | $ echo foo > file |
|
38 | 38 | $ hg add file |
|
39 | 39 | $ hg commit -m 'add file' |
|
40 | 40 | |
|
41 | 41 | $ echo '[extensions]' >> $HGRCPATH |
|
42 | 42 | $ echo "foobar = $abspath" >> $HGRCPATH |
|
43 | 43 | $ hg foo |
|
44 | 44 | uisetup called |
|
45 | 45 | uisetup called [status] |
|
46 | 46 | reposetup called for a |
|
47 | 47 | ui == repo.ui |
|
48 | 48 | reposetup called for a (chg !) |
|
49 | 49 | ui == repo.ui (chg !) |
|
50 | 50 | Foo |
|
51 | 51 | $ hg foo --quiet |
|
52 | 52 | uisetup called (no-chg !) |
|
53 | 53 | reposetup called for a (chg !) |
|
54 | 54 | ui == repo.ui |
|
55 | 55 | Foo |
|
56 | 56 | $ hg foo --debug |
|
57 | 57 | uisetup called [debug] (no-chg !) |
|
58 | 58 | uisetup called (no-chg !) |
|
59 | 59 | uisetup called [status] (no-chg !) |
|
60 | 60 | reposetup called for a (chg !) |
|
61 | 61 | ui == repo.ui |
|
62 | 62 | Foo |
|
63 | 63 | |
|
64 | 64 | $ cd .. |
|
65 | 65 | $ hg clone a b |
|
66 | 66 | uisetup called (no-chg !) |
|
67 | 67 | uisetup called [status] (no-chg !) |
|
68 | 68 | reposetup called for a |
|
69 | 69 | ui == repo.ui |
|
70 | 70 | reposetup called for b |
|
71 | 71 | ui == repo.ui |
|
72 | 72 | updating to branch default |
|
73 | 73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
74 | 74 | |
|
75 | 75 | $ hg bar |
|
76 | 76 | uisetup called (no-chg !) |
|
77 | 77 | uisetup called [status] (no-chg !) |
|
78 | 78 | Bar |
|
79 | 79 | $ echo 'foobar = !' >> $HGRCPATH |
|
80 | 80 | |
|
81 | 81 | module/__init__.py-style |
|
82 | 82 | |
|
83 | 83 | $ echo "barfoo = $barfoopath" >> $HGRCPATH |
|
84 | 84 | $ cd a |
|
85 | 85 | $ hg foo |
|
86 | 86 | uisetup called |
|
87 | 87 | uisetup called [status] |
|
88 | 88 | reposetup called for a |
|
89 | 89 | ui == repo.ui |
|
90 | 90 | reposetup called for a (chg !) |
|
91 | 91 | ui == repo.ui (chg !) |
|
92 | 92 | Foo |
|
93 | 93 | $ echo 'barfoo = !' >> $HGRCPATH |
|
94 | 94 | |
|
95 | 95 | Check that extensions are loaded in phases: |
|
96 | 96 | |
|
97 | 97 | $ cat > foo.py <<EOF |
|
98 | 98 | > import os |
|
99 | 99 | > name = os.path.basename(__file__).rsplit('.', 1)[0] |
|
100 | 100 | > print("1) %s imported" % name) |
|
101 | 101 | > def uisetup(ui): |
|
102 | 102 | > print("2) %s uisetup" % name) |
|
103 | 103 | > def extsetup(): |
|
104 | 104 | > print("3) %s extsetup" % name) |
|
105 | 105 | > def reposetup(ui, repo): |
|
106 | 106 | > print("4) %s reposetup" % name) |
|
107 | 107 | > |
|
108 | 108 | > # custom predicate to check registration of functions at loading |
|
109 | 109 | > from mercurial import ( |
|
110 | 110 | > registrar, |
|
111 | 111 | > smartset, |
|
112 | 112 | > ) |
|
113 | 113 | > revsetpredicate = registrar.revsetpredicate() |
|
114 | 114 | > @revsetpredicate(name, safe=True) # safe=True for query via hgweb |
|
115 | 115 | > def custompredicate(repo, subset, x): |
|
116 | 116 | > return smartset.baseset([r for r in subset if r in {0}]) |
|
117 | 117 | > EOF |
|
118 | 118 | |
|
119 | 119 | $ cp foo.py bar.py |
|
120 | 120 | $ echo 'foo = foo.py' >> $HGRCPATH |
|
121 | 121 | $ echo 'bar = bar.py' >> $HGRCPATH |
|
122 | 122 | |
|
123 | 123 | Check normal command's load order of extensions and registration of functions |
|
124 | 124 | |
|
125 | 125 | $ hg log -r "foo() and bar()" -q |
|
126 | 126 | 1) foo imported |
|
127 | 127 | 1) bar imported |
|
128 | 128 | 2) foo uisetup |
|
129 | 129 | 2) bar uisetup |
|
130 | 130 | 3) foo extsetup |
|
131 | 131 | 3) bar extsetup |
|
132 | 132 | 4) foo reposetup |
|
133 | 133 | 4) bar reposetup |
|
134 | 134 | 0:c24b9ac61126 |
|
135 | 135 | |
|
136 | 136 | Check hgweb's load order of extensions and registration of functions |
|
137 | 137 | |
|
138 | 138 | $ cat > hgweb.cgi <<EOF |
|
139 | 139 | > #!$PYTHON |
|
140 | 140 | > from mercurial import demandimport; demandimport.enable() |
|
141 | 141 | > from mercurial.hgweb import hgweb |
|
142 | 142 | > from mercurial.hgweb import wsgicgi |
|
143 | 143 | > application = hgweb('.', 'test repo') |
|
144 | 144 | > wsgicgi.launch(application) |
|
145 | 145 | > EOF |
|
146 | 146 | $ . "$TESTDIR/cgienv" |
|
147 | 147 | |
|
148 | 148 | $ PATH_INFO='/' SCRIPT_NAME='' $PYTHON hgweb.cgi \ |
|
149 | 149 | > | grep '^[0-9]) ' # ignores HTML output |
|
150 | 150 | 1) foo imported |
|
151 | 151 | 1) bar imported |
|
152 | 152 | 2) foo uisetup |
|
153 | 153 | 2) bar uisetup |
|
154 | 154 | 3) foo extsetup |
|
155 | 155 | 3) bar extsetup |
|
156 | 156 | 4) foo reposetup |
|
157 | 157 | 4) bar reposetup |
|
158 | 158 | |
|
159 | 159 | (check that revset predicate foo() and bar() are available) |
|
160 | 160 | |
|
161 | 161 | #if msys |
|
162 | 162 | $ PATH_INFO='//shortlog' |
|
163 | 163 | #else |
|
164 | 164 | $ PATH_INFO='/shortlog' |
|
165 | 165 | #endif |
|
166 | 166 | $ export PATH_INFO |
|
167 | 167 | $ SCRIPT_NAME='' QUERY_STRING='rev=foo() and bar()' $PYTHON hgweb.cgi \ |
|
168 | 168 | > | grep '<a href="/rev/[0-9a-z]*">' |
|
169 | 169 | <a href="/rev/c24b9ac61126">add file</a> |
|
170 | 170 | |
|
171 | 171 | $ echo 'foo = !' >> $HGRCPATH |
|
172 | 172 | $ echo 'bar = !' >> $HGRCPATH |
|
173 | 173 | |
|
174 | 174 | Check "from __future__ import absolute_import" support for external libraries |
|
175 | 175 | |
|
176 | 176 | #if windows |
|
177 | 177 | $ PATHSEP=";" |
|
178 | 178 | #else |
|
179 | 179 | $ PATHSEP=":" |
|
180 | 180 | #endif |
|
181 | 181 | $ export PATHSEP |
|
182 | 182 | |
|
183 | 183 | $ mkdir $TESTTMP/libroot |
|
184 | 184 | $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py |
|
185 | 185 | $ mkdir $TESTTMP/libroot/mod |
|
186 | 186 | $ touch $TESTTMP/libroot/mod/__init__.py |
|
187 | 187 | $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py |
|
188 | 188 | |
|
189 | 189 | $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF |
|
190 | 190 | > from __future__ import absolute_import |
|
191 | 191 | > import ambig # should load "libroot/ambig.py" |
|
192 | 192 | > s = ambig.s |
|
193 | 193 | > EOF |
|
194 | 194 | $ cat > loadabs.py <<EOF |
|
195 | 195 | > import mod.ambigabs as ambigabs |
|
196 | 196 | > def extsetup(): |
|
197 | 197 | > print('ambigabs.s=%s' % ambigabs.s) |
|
198 | 198 | > EOF |
|
199 | 199 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) |
|
200 | 200 | ambigabs.s=libroot/ambig.py |
|
201 | 201 | $TESTTMP/a |
|
202 | 202 | |
|
203 | 203 | #if no-py3k |
|
204 | 204 | $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF |
|
205 | 205 | > import ambig # should load "libroot/mod/ambig.py" |
|
206 | 206 | > s = ambig.s |
|
207 | 207 | > EOF |
|
208 | 208 | $ cat > loadrel.py <<EOF |
|
209 | 209 | > import mod.ambigrel as ambigrel |
|
210 | 210 | > def extsetup(): |
|
211 | 211 | > print('ambigrel.s=%s' % ambigrel.s) |
|
212 | 212 | > EOF |
|
213 | 213 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) |
|
214 | 214 | ambigrel.s=libroot/mod/ambig.py |
|
215 | 215 | $TESTTMP/a |
|
216 | 216 | #endif |
|
217 | 217 | |
|
218 | 218 | Check absolute/relative import of extension specific modules |
|
219 | 219 | |
|
220 | 220 | $ mkdir $TESTTMP/extroot |
|
221 | 221 | $ cat > $TESTTMP/extroot/bar.py <<EOF |
|
222 | 222 | > s = 'this is extroot.bar' |
|
223 | 223 | > EOF |
|
224 | 224 | $ mkdir $TESTTMP/extroot/sub1 |
|
225 | 225 | $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF |
|
226 | 226 | > s = 'this is extroot.sub1.__init__' |
|
227 | 227 | > EOF |
|
228 | 228 | $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF |
|
229 | 229 | > s = 'this is extroot.sub1.baz' |
|
230 | 230 | > EOF |
|
231 | 231 | $ cat > $TESTTMP/extroot/__init__.py <<EOF |
|
232 | 232 | > s = 'this is extroot.__init__' |
|
233 | 233 | > import foo |
|
234 | 234 | > def extsetup(ui): |
|
235 | 235 | > ui.write('(extroot) ', foo.func(), '\n') |
|
236 | 236 | > ui.flush() |
|
237 | 237 | > EOF |
|
238 | 238 | |
|
239 | 239 | $ cat > $TESTTMP/extroot/foo.py <<EOF |
|
240 | 240 | > # test absolute import |
|
241 | 241 | > buf = [] |
|
242 | 242 | > def func(): |
|
243 | 243 | > # "not locals" case |
|
244 | 244 | > import extroot.bar |
|
245 | 245 | > buf.append('import extroot.bar in func(): %s' % extroot.bar.s) |
|
246 | 246 | > return '\n(extroot) '.join(buf) |
|
247 | 247 | > # "fromlist == ('*',)" case |
|
248 | 248 | > from extroot.bar import * |
|
249 | 249 | > buf.append('from extroot.bar import *: %s' % s) |
|
250 | 250 | > # "not fromlist" and "if '.' in name" case |
|
251 | 251 | > import extroot.sub1.baz |
|
252 | 252 | > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s) |
|
253 | 253 | > # "not fromlist" and NOT "if '.' in name" case |
|
254 | 254 | > import extroot |
|
255 | 255 | > buf.append('import extroot: %s' % extroot.s) |
|
256 | 256 | > # NOT "not fromlist" and NOT "level != -1" case |
|
257 | 257 | > from extroot.bar import s |
|
258 | 258 | > buf.append('from extroot.bar import s: %s' % s) |
|
259 | 259 | > EOF |
|
260 | 260 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.extroot=$TESTTMP/extroot root) |
|
261 | 261 | (extroot) from extroot.bar import *: this is extroot.bar |
|
262 | 262 | (extroot) import extroot.sub1.baz: this is extroot.sub1.baz |
|
263 | 263 | (extroot) import extroot: this is extroot.__init__ |
|
264 | 264 | (extroot) from extroot.bar import s: this is extroot.bar |
|
265 | 265 | (extroot) import extroot.bar in func(): this is extroot.bar |
|
266 | 266 | $TESTTMP/a |
|
267 | 267 | |
|
268 | 268 | #if no-py3k |
|
269 | 269 | $ rm "$TESTTMP"/extroot/foo.* |
|
270 | 270 | $ rm -Rf "$TESTTMP/extroot/__pycache__" |
|
271 | 271 | $ cat > $TESTTMP/extroot/foo.py <<EOF |
|
272 | 272 | > # test relative import |
|
273 | 273 | > buf = [] |
|
274 | 274 | > def func(): |
|
275 | 275 | > # "not locals" case |
|
276 | 276 | > import bar |
|
277 | 277 | > buf.append('import bar in func(): %s' % bar.s) |
|
278 | 278 | > return '\n(extroot) '.join(buf) |
|
279 | 279 | > # "fromlist == ('*',)" case |
|
280 | 280 | > from bar import * |
|
281 | 281 | > buf.append('from bar import *: %s' % s) |
|
282 | 282 | > # "not fromlist" and "if '.' in name" case |
|
283 | 283 | > import sub1.baz |
|
284 | 284 | > buf.append('import sub1.baz: %s' % sub1.baz.s) |
|
285 | 285 | > # "not fromlist" and NOT "if '.' in name" case |
|
286 | 286 | > import sub1 |
|
287 | 287 | > buf.append('import sub1: %s' % sub1.s) |
|
288 | 288 | > # NOT "not fromlist" and NOT "level != -1" case |
|
289 | 289 | > from bar import s |
|
290 | 290 | > buf.append('from bar import s: %s' % s) |
|
291 | 291 | > EOF |
|
292 | 292 | $ hg --config extensions.extroot=$TESTTMP/extroot root |
|
293 | 293 | (extroot) from bar import *: this is extroot.bar |
|
294 | 294 | (extroot) import sub1.baz: this is extroot.sub1.baz |
|
295 | 295 | (extroot) import sub1: this is extroot.sub1.__init__ |
|
296 | 296 | (extroot) from bar import s: this is extroot.bar |
|
297 | 297 | (extroot) import bar in func(): this is extroot.bar |
|
298 | 298 | $TESTTMP/a |
|
299 | 299 | #endif |
|
300 | 300 | |
|
301 | 301 | #if demandimport |
|
302 | 302 | |
|
303 | 303 | Examine whether module loading is delayed until actual referring, even |
|
304 | 304 | though module is imported with "absolute_import" feature. |
|
305 | 305 | |
|
306 | 306 | Files below in each packages are used for described purpose: |
|
307 | 307 | |
|
308 | 308 | - "called": examine whether "from MODULE import ATTR" works correctly |
|
309 | 309 | - "unused": examine whether loading is delayed correctly |
|
310 | 310 | - "used": examine whether "from PACKAGE import MODULE" works correctly |
|
311 | 311 | |
|
312 | 312 | Package hierarchy is needed to examine whether demand importing works |
|
313 | 313 | as expected for "from SUB.PACK.AGE import MODULE". |
|
314 | 314 | |
|
315 | 315 | Setup "external library" to be imported with "absolute_import" |
|
316 | 316 | feature. |
|
317 | 317 | |
|
318 | 318 | $ mkdir -p $TESTTMP/extlibroot/lsub1/lsub2 |
|
319 | 319 | $ touch $TESTTMP/extlibroot/__init__.py |
|
320 | 320 | $ touch $TESTTMP/extlibroot/lsub1/__init__.py |
|
321 | 321 | $ touch $TESTTMP/extlibroot/lsub1/lsub2/__init__.py |
|
322 | 322 | |
|
323 | 323 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/called.py <<EOF |
|
324 | 324 | > def func(): |
|
325 | 325 | > return "this is extlibroot.lsub1.lsub2.called.func()" |
|
326 | 326 | > EOF |
|
327 | 327 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/unused.py <<EOF |
|
328 | 328 | > raise Exception("extlibroot.lsub1.lsub2.unused is loaded unintentionally") |
|
329 | 329 | > EOF |
|
330 | 330 | $ cat > $TESTTMP/extlibroot/lsub1/lsub2/used.py <<EOF |
|
331 | 331 | > detail = "this is extlibroot.lsub1.lsub2.used" |
|
332 | 332 | > EOF |
|
333 | 333 | |
|
334 | 334 | Setup sub-package of "external library", which causes instantiation of |
|
335 | 335 | demandmod in "recurse down the module chain" code path. Relative |
|
336 | 336 | importing with "absolute_import" feature isn't tested, because "level |
|
337 | 337 | >=1 " doesn't cause instantiation of demandmod. |
|
338 | 338 | |
|
339 | 339 | $ mkdir -p $TESTTMP/extlibroot/recursedown/abs |
|
340 | 340 | $ cat > $TESTTMP/extlibroot/recursedown/abs/used.py <<EOF |
|
341 | 341 | > detail = "this is extlibroot.recursedown.abs.used" |
|
342 | 342 | > EOF |
|
343 | 343 | $ cat > $TESTTMP/extlibroot/recursedown/abs/__init__.py <<EOF |
|
344 | 344 | > from __future__ import absolute_import |
|
345 | 345 | > from extlibroot.recursedown.abs.used import detail |
|
346 | 346 | > EOF |
|
347 | 347 | |
|
348 | 348 | $ mkdir -p $TESTTMP/extlibroot/recursedown/legacy |
|
349 | 349 | $ cat > $TESTTMP/extlibroot/recursedown/legacy/used.py <<EOF |
|
350 | 350 | > detail = "this is extlibroot.recursedown.legacy.used" |
|
351 | 351 | > EOF |
|
352 | 352 | $ cat > $TESTTMP/extlibroot/recursedown/legacy/__init__.py <<EOF |
|
353 | 353 | > # legacy style (level == -1) import |
|
354 | 354 | > from extlibroot.recursedown.legacy.used import detail |
|
355 | 355 | > EOF |
|
356 | 356 | |
|
357 | 357 | $ cat > $TESTTMP/extlibroot/recursedown/__init__.py <<EOF |
|
358 | 358 | > from __future__ import absolute_import |
|
359 | 359 | > from extlibroot.recursedown.abs import detail as absdetail |
|
360 | 360 | > from .legacy import detail as legacydetail |
|
361 | 361 | > EOF |
|
362 | 362 | |
|
363 | 363 | Setup package that re-exports an attribute of its submodule as the same |
|
364 | 364 | name. This leaves 'shadowing.used' pointing to 'used.detail', but still |
|
365 | 365 | the submodule 'used' should be somehow accessible. (issue5617) |
|
366 | 366 | |
|
367 | 367 | $ mkdir -p $TESTTMP/extlibroot/shadowing |
|
368 | 368 | $ cat > $TESTTMP/extlibroot/shadowing/used.py <<EOF |
|
369 | 369 | > detail = "this is extlibroot.shadowing.used" |
|
370 | 370 | > EOF |
|
371 | 371 | $ cat > $TESTTMP/extlibroot/shadowing/proxied.py <<EOF |
|
372 | 372 | > from __future__ import absolute_import |
|
373 | 373 | > from extlibroot.shadowing.used import detail |
|
374 | 374 | > EOF |
|
375 | 375 | $ cat > $TESTTMP/extlibroot/shadowing/__init__.py <<EOF |
|
376 | 376 | > from __future__ import absolute_import |
|
377 | 377 | > from .used import detail as used |
|
378 | 378 | > EOF |
|
379 | 379 | |
|
380 | 380 | Setup extension local modules to be imported with "absolute_import" |
|
381 | 381 | feature. |
|
382 | 382 | |
|
383 | 383 | $ mkdir -p $TESTTMP/absextroot/xsub1/xsub2 |
|
384 | 384 | $ touch $TESTTMP/absextroot/xsub1/__init__.py |
|
385 | 385 | $ touch $TESTTMP/absextroot/xsub1/xsub2/__init__.py |
|
386 | 386 | |
|
387 | 387 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/called.py <<EOF |
|
388 | 388 | > def func(): |
|
389 | 389 | > return "this is absextroot.xsub1.xsub2.called.func()" |
|
390 | 390 | > EOF |
|
391 | 391 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/unused.py <<EOF |
|
392 | 392 | > raise Exception("absextroot.xsub1.xsub2.unused is loaded unintentionally") |
|
393 | 393 | > EOF |
|
394 | 394 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/used.py <<EOF |
|
395 | 395 | > detail = "this is absextroot.xsub1.xsub2.used" |
|
396 | 396 | > EOF |
|
397 | 397 | |
|
398 | 398 | Setup extension local modules to examine whether demand importing |
|
399 | 399 | works as expected in "level > 1" case. |
|
400 | 400 | |
|
401 | 401 | $ cat > $TESTTMP/absextroot/relimportee.py <<EOF |
|
402 | 402 | > detail = "this is absextroot.relimportee" |
|
403 | 403 | > EOF |
|
404 | 404 | $ cat > $TESTTMP/absextroot/xsub1/xsub2/relimporter.py <<EOF |
|
405 | 405 | > from __future__ import absolute_import |
|
406 | 406 | > from ... import relimportee |
|
407 | 407 | > detail = "this relimporter imports %r" % (relimportee.detail) |
|
408 | 408 | > EOF |
|
409 | 409 | |
|
410 | 410 | Setup modules, which actually import extension local modules at |
|
411 | 411 | runtime. |
|
412 | 412 | |
|
413 | 413 | $ cat > $TESTTMP/absextroot/absolute.py << EOF |
|
414 | 414 | > from __future__ import absolute_import |
|
415 | 415 | > |
|
416 | 416 | > # import extension local modules absolutely (level = 0) |
|
417 | 417 | > from absextroot.xsub1.xsub2 import used, unused |
|
418 | 418 | > from absextroot.xsub1.xsub2.called import func |
|
419 | 419 | > |
|
420 | 420 | > def getresult(): |
|
421 | 421 | > result = [] |
|
422 | 422 | > result.append(used.detail) |
|
423 | 423 | > result.append(func()) |
|
424 | 424 | > return result |
|
425 | 425 | > EOF |
|
426 | 426 | |
|
427 | 427 | $ cat > $TESTTMP/absextroot/relative.py << EOF |
|
428 | 428 | > from __future__ import absolute_import |
|
429 | 429 | > |
|
430 | 430 | > # import extension local modules relatively (level == 1) |
|
431 | 431 | > from .xsub1.xsub2 import used, unused |
|
432 | 432 | > from .xsub1.xsub2.called import func |
|
433 | 433 | > |
|
434 | 434 | > # import a module, which implies "importing with level > 1" |
|
435 | 435 | > from .xsub1.xsub2 import relimporter |
|
436 | 436 | > |
|
437 | 437 | > def getresult(): |
|
438 | 438 | > result = [] |
|
439 | 439 | > result.append(used.detail) |
|
440 | 440 | > result.append(func()) |
|
441 | 441 | > result.append(relimporter.detail) |
|
442 | 442 | > return result |
|
443 | 443 | > EOF |
|
444 | 444 | |
|
445 | 445 | Setup main procedure of extension. |
|
446 | 446 | |
|
447 | 447 | $ cat > $TESTTMP/absextroot/__init__.py <<EOF |
|
448 | 448 | > from __future__ import absolute_import |
|
449 | 449 | > from mercurial import registrar |
|
450 | 450 | > cmdtable = {} |
|
451 | 451 | > command = registrar.command(cmdtable) |
|
452 | 452 | > |
|
453 | 453 | > # "absolute" and "relative" shouldn't be imported before actual |
|
454 | 454 | > # command execution, because (1) they import same modules, and (2) |
|
455 | 455 | > # preceding import (= instantiate "demandmod" object instead of |
|
456 | 456 | > # real "module" object) might hide problem of succeeding import. |
|
457 | 457 | > |
|
458 | 458 | > @command(b'showabsolute', [], norepo=True) |
|
459 | 459 | > def showabsolute(ui, *args, **opts): |
|
460 | 460 | > from absextroot import absolute |
|
461 | 461 | > ui.write(b'ABS: %s\n' % '\nABS: '.join(absolute.getresult())) |
|
462 | 462 | > |
|
463 | 463 | > @command(b'showrelative', [], norepo=True) |
|
464 | 464 | > def showrelative(ui, *args, **opts): |
|
465 | 465 | > from . import relative |
|
466 | 466 | > ui.write(b'REL: %s\n' % '\nREL: '.join(relative.getresult())) |
|
467 | 467 | > |
|
468 | 468 | > # import modules from external library |
|
469 | 469 | > from extlibroot.lsub1.lsub2 import used as lused, unused as lunused |
|
470 | 470 | > from extlibroot.lsub1.lsub2.called import func as lfunc |
|
471 | 471 | > from extlibroot.recursedown import absdetail, legacydetail |
|
472 | 472 | > from extlibroot.shadowing import proxied |
|
473 | 473 | > |
|
474 | 474 | > def uisetup(ui): |
|
475 | 475 | > result = [] |
|
476 | 476 | > result.append(lused.detail) |
|
477 | 477 | > result.append(lfunc()) |
|
478 | 478 | > result.append(absdetail) |
|
479 | 479 | > result.append(legacydetail) |
|
480 | 480 | > result.append(proxied.detail) |
|
481 | 481 | > ui.write(b'LIB: %s\n' % '\nLIB: '.join(result)) |
|
482 | 482 | > EOF |
|
483 | 483 | |
|
484 | 484 | Examine module importing. |
|
485 | 485 | |
|
486 | 486 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showabsolute) |
|
487 | 487 | LIB: this is extlibroot.lsub1.lsub2.used |
|
488 | 488 | LIB: this is extlibroot.lsub1.lsub2.called.func() |
|
489 | 489 | LIB: this is extlibroot.recursedown.abs.used |
|
490 | 490 | LIB: this is extlibroot.recursedown.legacy.used |
|
491 | 491 | LIB: this is extlibroot.shadowing.used |
|
492 | 492 | ABS: this is absextroot.xsub1.xsub2.used |
|
493 | 493 | ABS: this is absextroot.xsub1.xsub2.called.func() |
|
494 | 494 | |
|
495 | 495 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.absextroot=$TESTTMP/absextroot showrelative) |
|
496 | 496 | LIB: this is extlibroot.lsub1.lsub2.used |
|
497 | 497 | LIB: this is extlibroot.lsub1.lsub2.called.func() |
|
498 | 498 | LIB: this is extlibroot.recursedown.abs.used |
|
499 | 499 | LIB: this is extlibroot.recursedown.legacy.used |
|
500 | 500 | LIB: this is extlibroot.shadowing.used |
|
501 | 501 | REL: this is absextroot.xsub1.xsub2.used |
|
502 | 502 | REL: this is absextroot.xsub1.xsub2.called.func() |
|
503 | 503 | REL: this relimporter imports 'this is absextroot.relimportee' |
|
504 | 504 | |
|
505 | 505 | Examine whether sub-module is imported relatively as expected. |
|
506 | 506 | |
|
507 | 507 | See also issue5208 for detail about example case on Python 3.x. |
|
508 | 508 | |
|
509 | 509 | $ f -q $TESTTMP/extlibroot/lsub1/lsub2/notexist.py |
|
510 | 510 | $TESTTMP/extlibroot/lsub1/lsub2/notexist.py: file not found |
|
511 | 511 | |
|
512 | 512 | $ cat > $TESTTMP/notexist.py <<EOF |
|
513 | 513 | > text = 'notexist.py at root is loaded unintentionally\n' |
|
514 | 514 | > EOF |
|
515 | 515 | |
|
516 | 516 | $ cat > $TESTTMP/checkrelativity.py <<EOF |
|
517 | 517 | > from mercurial import registrar |
|
518 | 518 | > cmdtable = {} |
|
519 | 519 | > command = registrar.command(cmdtable) |
|
520 | 520 | > |
|
521 | 521 | > # demand import avoids failure of importing notexist here |
|
522 | 522 | > import extlibroot.lsub1.lsub2.notexist |
|
523 | 523 | > |
|
524 | 524 | > @command(b'checkrelativity', [], norepo=True) |
|
525 | 525 | > def checkrelativity(ui, *args, **opts): |
|
526 | 526 | > try: |
|
527 | 527 | > ui.write(extlibroot.lsub1.lsub2.notexist.text) |
|
528 | 528 | > return 1 # unintentional success |
|
529 | 529 | > except ImportError: |
|
530 | 530 | > pass # intentional failure |
|
531 | 531 | > EOF |
|
532 | 532 | |
|
533 | 533 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.checkrelativity=$TESTTMP/checkrelativity.py checkrelativity) |
|
534 | 534 | |
|
535 | 535 | #endif |
|
536 | 536 | |
|
537 | 537 | Make sure a broken uisetup doesn't globally break hg: |
|
538 | 538 | $ cat > $TESTTMP/baduisetup.py <<EOF |
|
539 | 539 | > def uisetup(ui): |
|
540 | 540 | > 1/0 |
|
541 | 541 | > EOF |
|
542 | 542 | |
|
543 | 543 | Even though the extension fails during uisetup, hg is still basically usable: |
|
544 | 544 | $ hg --config extensions.baduisetup=$TESTTMP/baduisetup.py version |
|
545 | 545 | Traceback (most recent call last): |
|
546 | 546 | File "*/mercurial/extensions.py", line *, in _runuisetup (glob) |
|
547 | 547 | uisetup(ui) |
|
548 | 548 | File "$TESTTMP/baduisetup.py", line 2, in uisetup |
|
549 | 549 | 1/0 |
|
550 | 550 | ZeroDivisionError: integer division or modulo by zero |
|
551 | 551 | *** failed to set up extension baduisetup: integer division or modulo by zero |
|
552 | 552 | Mercurial Distributed SCM (version *) (glob) |
|
553 | 553 | (see https://mercurial-scm.org for more information) |
|
554 | 554 | |
|
555 | 555 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
556 | 556 | This is free software; see the source for copying conditions. There is NO |
|
557 | 557 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
558 | 558 | |
|
559 | 559 | $ cd .. |
|
560 | 560 | |
|
561 | 561 | hide outer repo |
|
562 | 562 | $ hg init |
|
563 | 563 | |
|
564 | 564 | $ cat > empty.py <<EOF |
|
565 | 565 | > '''empty cmdtable |
|
566 | 566 | > ''' |
|
567 | 567 | > cmdtable = {} |
|
568 | 568 | > EOF |
|
569 | 569 | $ emptypath=`pwd`/empty.py |
|
570 | 570 | $ echo "empty = $emptypath" >> $HGRCPATH |
|
571 | 571 | $ hg help empty |
|
572 | 572 | empty extension - empty cmdtable |
|
573 | 573 | |
|
574 | 574 | no commands defined |
|
575 | 575 | |
|
576 | 576 | |
|
577 | 577 | $ echo 'empty = !' >> $HGRCPATH |
|
578 | 578 | |
|
579 | 579 | $ cat > debugextension.py <<EOF |
|
580 | 580 | > '''only debugcommands |
|
581 | 581 | > ''' |
|
582 | 582 | > from mercurial import registrar |
|
583 | 583 | > cmdtable = {} |
|
584 | 584 | > command = registrar.command(cmdtable) |
|
585 | 585 | > @command(b'debugfoobar', [], b'hg debugfoobar') |
|
586 | 586 | > def debugfoobar(ui, repo, *args, **opts): |
|
587 | 587 | > "yet another debug command" |
|
588 | 588 | > pass |
|
589 | 589 | > @command(b'foo', [], b'hg foo') |
|
590 | 590 | > def foo(ui, repo, *args, **opts): |
|
591 | 591 | > """yet another foo command |
|
592 | 592 | > This command has been DEPRECATED since forever. |
|
593 | 593 | > """ |
|
594 | 594 | > pass |
|
595 | 595 | > EOF |
|
596 | 596 | $ debugpath=`pwd`/debugextension.py |
|
597 | 597 | $ echo "debugextension = $debugpath" >> $HGRCPATH |
|
598 | 598 | |
|
599 | 599 | $ hg help debugextension |
|
600 | 600 | hg debugextensions |
|
601 | 601 | |
|
602 | 602 | show information about active extensions |
|
603 | 603 | |
|
604 | 604 | options: |
|
605 | 605 | |
|
606 | 606 | (some details hidden, use --verbose to show complete help) |
|
607 | 607 | |
|
608 | 608 | |
|
609 | 609 | $ hg --verbose help debugextension |
|
610 | 610 | hg debugextensions |
|
611 | 611 | |
|
612 | 612 | show information about active extensions |
|
613 | 613 | |
|
614 | 614 | options: |
|
615 | 615 | |
|
616 | 616 | -T --template TEMPLATE display with template (EXPERIMENTAL) |
|
617 | 617 | |
|
618 | 618 | global options ([+] can be repeated): |
|
619 | 619 | |
|
620 | 620 | -R --repository REPO repository root directory or name of overlay bundle |
|
621 | 621 | file |
|
622 | 622 | --cwd DIR change working directory |
|
623 | 623 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
624 | 624 | all prompts |
|
625 | 625 | -q --quiet suppress output |
|
626 | 626 | -v --verbose enable additional output |
|
627 | 627 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
628 | 628 | debug) |
|
629 | 629 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
630 | 630 | --debug enable debugging output |
|
631 | 631 | --debugger start debugger |
|
632 | 632 | --encoding ENCODE set the charset encoding (default: ascii) |
|
633 | 633 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
634 | 634 | --traceback always print a traceback on exception |
|
635 | 635 | --time time how long the command takes |
|
636 | 636 | --profile print command execution profile |
|
637 | 637 | --version output version information and exit |
|
638 | 638 | -h --help display help and exit |
|
639 | 639 | --hidden consider hidden changesets |
|
640 | 640 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
641 | 641 | (default: auto) |
|
642 | 642 | |
|
643 | 643 | |
|
644 | 644 | |
|
645 | 645 | |
|
646 | 646 | |
|
647 | 647 | |
|
648 | 648 | $ hg --debug help debugextension |
|
649 | 649 | hg debugextensions |
|
650 | 650 | |
|
651 | 651 | show information about active extensions |
|
652 | 652 | |
|
653 | 653 | options: |
|
654 | 654 | |
|
655 | 655 | -T --template TEMPLATE display with template (EXPERIMENTAL) |
|
656 | 656 | |
|
657 | 657 | global options ([+] can be repeated): |
|
658 | 658 | |
|
659 | 659 | -R --repository REPO repository root directory or name of overlay bundle |
|
660 | 660 | file |
|
661 | 661 | --cwd DIR change working directory |
|
662 | 662 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
663 | 663 | all prompts |
|
664 | 664 | -q --quiet suppress output |
|
665 | 665 | -v --verbose enable additional output |
|
666 | 666 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
667 | 667 | debug) |
|
668 | 668 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
669 | 669 | --debug enable debugging output |
|
670 | 670 | --debugger start debugger |
|
671 | 671 | --encoding ENCODE set the charset encoding (default: ascii) |
|
672 | 672 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
673 | 673 | --traceback always print a traceback on exception |
|
674 | 674 | --time time how long the command takes |
|
675 | 675 | --profile print command execution profile |
|
676 | 676 | --version output version information and exit |
|
677 | 677 | -h --help display help and exit |
|
678 | 678 | --hidden consider hidden changesets |
|
679 | 679 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
680 | 680 | (default: auto) |
|
681 | 681 | |
|
682 | 682 | |
|
683 | 683 | |
|
684 | 684 | |
|
685 | 685 | |
|
686 | 686 | $ echo 'debugextension = !' >> $HGRCPATH |
|
687 | 687 | |
|
688 | 688 | Asking for help about a deprecated extension should do something useful: |
|
689 | 689 | |
|
690 | 690 | $ hg help glog |
|
691 | 691 | 'glog' is provided by the following extension: |
|
692 | 692 | |
|
693 | 693 | graphlog command to view revision graphs from a shell (DEPRECATED) |
|
694 | 694 | |
|
695 | 695 | (use 'hg help extensions' for information on enabling extensions) |
|
696 | 696 | |
|
697 | 697 | Extension module help vs command help: |
|
698 | 698 | |
|
699 | 699 | $ echo 'extdiff =' >> $HGRCPATH |
|
700 | 700 | $ hg help extdiff |
|
701 | 701 | hg extdiff [OPT]... [FILE]... |
|
702 | 702 | |
|
703 | 703 | use external program to diff repository (or selected files) |
|
704 | 704 | |
|
705 | 705 | Show differences between revisions for the specified files, using an |
|
706 | 706 | external program. The default program used is diff, with default options |
|
707 | 707 | "-Npru". |
|
708 | 708 | |
|
709 | 709 | To select a different program, use the -p/--program option. The program |
|
710 | 710 | will be passed the names of two directories to compare. To pass additional |
|
711 | 711 | options to the program, use -o/--option. These will be passed before the |
|
712 | 712 | names of the directories to compare. |
|
713 | 713 | |
|
714 | 714 | When two revision arguments are given, then changes are shown between |
|
715 | 715 | those revisions. If only one revision is specified then that revision is |
|
716 | 716 | compared to the working directory, and, when no revisions are specified, |
|
717 | 717 | the working directory files are compared to its parent. |
|
718 | 718 | |
|
719 | 719 | (use 'hg help -e extdiff' to show help for the extdiff extension) |
|
720 | 720 | |
|
721 | 721 | options ([+] can be repeated): |
|
722 | 722 | |
|
723 | 723 | -p --program CMD comparison program to run |
|
724 | 724 | -o --option OPT [+] pass option to comparison program |
|
725 | 725 | -r --rev REV [+] revision |
|
726 | 726 | -c --change REV change made by revision |
|
727 | 727 | --patch compare patches for two revisions |
|
728 | 728 | -I --include PATTERN [+] include names matching the given patterns |
|
729 | 729 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
730 | 730 | -S --subrepos recurse into subrepositories |
|
731 | 731 | |
|
732 | 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 | 743 | $ hg help --extension extdiff |
|
744 | 744 | extdiff extension - command to allow external programs to compare revisions |
|
745 | 745 | |
|
746 | 746 | The extdiff Mercurial extension allows you to use external programs to compare |
|
747 | 747 | revisions, or revision with working directory. The external diff programs are |
|
748 | 748 | called with a configurable set of options and two non-option arguments: paths |
|
749 | 749 | to directories containing snapshots of files to compare. |
|
750 | 750 | |
|
751 | 751 | If there is more than one file being compared and the "child" revision is the |
|
752 | 752 | working directory, any modifications made in the external diff program will be |
|
753 | 753 | copied back to the working directory from the temporary directory. |
|
754 | 754 | |
|
755 | 755 | The extdiff extension also allows you to configure new diff commands, so you |
|
756 | 756 | do not need to type 'hg extdiff -p kdiff3' always. |
|
757 | 757 | |
|
758 | 758 | [extdiff] |
|
759 | 759 | # add new command that runs GNU diff(1) in 'context diff' mode |
|
760 | 760 | cdiff = gdiff -Nprc5 |
|
761 | 761 | ## or the old way: |
|
762 | 762 | #cmd.cdiff = gdiff |
|
763 | 763 | #opts.cdiff = -Nprc5 |
|
764 | 764 | |
|
765 | 765 | # add new command called meld, runs meld (no need to name twice). If |
|
766 | 766 | # the meld executable is not available, the meld tool in [merge-tools] |
|
767 | 767 | # will be used, if available |
|
768 | 768 | meld = |
|
769 | 769 | |
|
770 | 770 | # add new command called vimdiff, runs gvimdiff with DirDiff plugin |
|
771 | 771 | # (see http://www.vim.org/scripts/script.php?script_id=102) Non |
|
772 | 772 | # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
|
773 | 773 | # your .vimrc |
|
774 | 774 | vimdiff = gvim -f "+next" \ |
|
775 | 775 | "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" |
|
776 | 776 | |
|
777 | 777 | Tool arguments can include variables that are expanded at runtime: |
|
778 | 778 | |
|
779 | 779 | $parent1, $plabel1 - filename, descriptive label of first parent |
|
780 | 780 | $child, $clabel - filename, descriptive label of child revision |
|
781 | 781 | $parent2, $plabel2 - filename, descriptive label of second parent |
|
782 | 782 | $root - repository root |
|
783 | 783 | $parent is an alias for $parent1. |
|
784 | 784 | |
|
785 | 785 | The extdiff extension will look in your [diff-tools] and [merge-tools] |
|
786 | 786 | sections for diff tool arguments, when none are specified in [extdiff]. |
|
787 | 787 | |
|
788 | 788 | [extdiff] |
|
789 | 789 | kdiff3 = |
|
790 | 790 | |
|
791 | 791 | [diff-tools] |
|
792 | 792 | kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child |
|
793 | 793 | |
|
794 | 794 | You can use -I/-X and list of file or directory names like normal 'hg diff' |
|
795 | 795 | command. The extdiff extension makes snapshots of only needed files, so |
|
796 | 796 | running the external diff program will actually be pretty fast (at least |
|
797 | 797 | faster than having to compare the entire tree). |
|
798 | 798 | |
|
799 | 799 | list of commands: |
|
800 | 800 | |
|
801 | 801 | extdiff use external program to diff repository (or selected files) |
|
802 | 802 | |
|
803 | 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 | 820 | $ echo 'extdiff = !' >> $HGRCPATH |
|
821 | 821 | |
|
822 | 822 | Test help topic with same name as extension |
|
823 | 823 | |
|
824 | 824 | $ cat > multirevs.py <<EOF |
|
825 | 825 | > from mercurial import commands, registrar |
|
826 | 826 | > cmdtable = {} |
|
827 | 827 | > command = registrar.command(cmdtable) |
|
828 | 828 | > """multirevs extension |
|
829 | 829 | > Big multi-line module docstring.""" |
|
830 | 830 | > @command(b'multirevs', [], b'ARG', norepo=True) |
|
831 | 831 | > def multirevs(ui, repo, arg, *args, **opts): |
|
832 | 832 | > """multirevs command""" |
|
833 | 833 | > pass |
|
834 | 834 | > EOF |
|
835 | 835 | $ echo "multirevs = multirevs.py" >> $HGRCPATH |
|
836 | 836 | |
|
837 | 837 | $ hg help multirevs | tail |
|
838 | 838 | used): |
|
839 | 839 | |
|
840 | 840 | hg update :@ |
|
841 | 841 | |
|
842 | 842 | - Show diff between tags 1.3 and 1.5 (this works because the first and the |
|
843 | 843 | last revisions of the revset are used): |
|
844 | 844 | |
|
845 | 845 | hg diff -r 1.3::1.5 |
|
846 | 846 | |
|
847 | 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 | 854 | $ hg help -c multirevs |
|
855 | 855 | hg multirevs ARG |
|
856 | 856 | |
|
857 | 857 | multirevs command |
|
858 | 858 | |
|
859 | 859 | (some details hidden, use --verbose to show complete help) |
|
860 | 860 | |
|
861 | 861 | |
|
862 | 862 | |
|
863 | 863 | $ hg multirevs |
|
864 | 864 | hg multirevs: invalid arguments |
|
865 | 865 | hg multirevs ARG |
|
866 | 866 | |
|
867 | 867 | multirevs command |
|
868 | 868 | |
|
869 | 869 | (use 'hg multirevs -h' to show more help) |
|
870 | 870 | [255] |
|
871 | 871 | |
|
872 | 872 | |
|
873 | 873 | |
|
874 | 874 | $ echo "multirevs = !" >> $HGRCPATH |
|
875 | 875 | |
|
876 | 876 | Issue811: Problem loading extensions twice (by site and by user) |
|
877 | 877 | |
|
878 | 878 | $ cat <<EOF >> $HGRCPATH |
|
879 | 879 | > mq = |
|
880 | 880 | > strip = |
|
881 | 881 | > hgext.mq = |
|
882 | 882 | > hgext/mq = |
|
883 | 883 | > EOF |
|
884 | 884 | |
|
885 | 885 | Show extensions: |
|
886 | 886 | (note that mq force load strip, also checking it's not loaded twice) |
|
887 | 887 | |
|
888 | 888 | #if no-extraextensions |
|
889 | 889 | $ hg debugextensions |
|
890 | 890 | mq |
|
891 | 891 | strip |
|
892 | 892 | #endif |
|
893 | 893 | |
|
894 | 894 | For extensions, which name matches one of its commands, help |
|
895 | 895 | message should ask '-v -e' to get list of built-in aliases |
|
896 | 896 | along with extension help itself |
|
897 | 897 | |
|
898 | 898 | $ mkdir $TESTTMP/d |
|
899 | 899 | $ cat > $TESTTMP/d/dodo.py <<EOF |
|
900 | 900 | > """ |
|
901 | 901 | > This is an awesome 'dodo' extension. It does nothing and |
|
902 | 902 | > writes 'Foo foo' |
|
903 | 903 | > """ |
|
904 | 904 | > from mercurial import commands, registrar |
|
905 | 905 | > cmdtable = {} |
|
906 | 906 | > command = registrar.command(cmdtable) |
|
907 | 907 | > @command(b'dodo', [], b'hg dodo') |
|
908 | 908 | > def dodo(ui, *args, **kwargs): |
|
909 | 909 | > """Does nothing""" |
|
910 | 910 | > ui.write(b"I do nothing. Yay\\n") |
|
911 | 911 | > @command(b'foofoo', [], b'hg foofoo') |
|
912 | 912 | > def foofoo(ui, *args, **kwargs): |
|
913 | 913 | > """Writes 'Foo foo'""" |
|
914 | 914 | > ui.write(b"Foo foo\\n") |
|
915 | 915 | > EOF |
|
916 | 916 | $ dodopath=$TESTTMP/d/dodo.py |
|
917 | 917 | |
|
918 | 918 | $ echo "dodo = $dodopath" >> $HGRCPATH |
|
919 | 919 | |
|
920 | 920 | Make sure that user is asked to enter '-v -e' to get list of built-in aliases |
|
921 | 921 | $ hg help -e dodo |
|
922 | 922 | dodo extension - |
|
923 | 923 | |
|
924 | 924 | This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo' |
|
925 | 925 | |
|
926 | 926 | list of commands: |
|
927 | 927 | |
|
928 | 928 | dodo Does nothing |
|
929 | 929 | foofoo Writes 'Foo foo' |
|
930 | 930 | |
|
931 | 931 | (use 'hg help -v -e dodo' to show built-in aliases and global options) |
|
932 | 932 | |
|
933 | 933 | Make sure that '-v -e' prints list of built-in aliases along with |
|
934 | 934 | extension help itself |
|
935 | 935 | $ hg help -v -e dodo |
|
936 | 936 | dodo extension - |
|
937 | 937 | |
|
938 | 938 | This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo' |
|
939 | 939 | |
|
940 | 940 | list of commands: |
|
941 | 941 | |
|
942 | 942 | dodo Does nothing |
|
943 | 943 | foofoo Writes 'Foo foo' |
|
944 | 944 | |
|
945 | 945 | global options ([+] can be repeated): |
|
946 | 946 | |
|
947 | 947 | -R --repository REPO repository root directory or name of overlay bundle |
|
948 | 948 | file |
|
949 | 949 | --cwd DIR change working directory |
|
950 | 950 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
951 | 951 | all prompts |
|
952 | 952 | -q --quiet suppress output |
|
953 | 953 | -v --verbose enable additional output |
|
954 | 954 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
955 | 955 | debug) |
|
956 | 956 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
957 | 957 | --debug enable debugging output |
|
958 | 958 | --debugger start debugger |
|
959 | 959 | --encoding ENCODE set the charset encoding (default: ascii) |
|
960 | 960 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
961 | 961 | --traceback always print a traceback on exception |
|
962 | 962 | --time time how long the command takes |
|
963 | 963 | --profile print command execution profile |
|
964 | 964 | --version output version information and exit |
|
965 | 965 | -h --help display help and exit |
|
966 | 966 | --hidden consider hidden changesets |
|
967 | 967 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
968 | 968 | (default: auto) |
|
969 | 969 | |
|
970 | 970 | Make sure that single '-v' option shows help and built-ins only for 'dodo' command |
|
971 | 971 | $ hg help -v dodo |
|
972 | 972 | hg dodo |
|
973 | 973 | |
|
974 | 974 | Does nothing |
|
975 | 975 | |
|
976 | 976 | (use 'hg help -e dodo' to show help for the dodo extension) |
|
977 | 977 | |
|
978 | 978 | options: |
|
979 | 979 | |
|
980 | 980 | --mq operate on patch repository |
|
981 | 981 | |
|
982 | 982 | global options ([+] can be repeated): |
|
983 | 983 | |
|
984 | 984 | -R --repository REPO repository root directory or name of overlay bundle |
|
985 | 985 | file |
|
986 | 986 | --cwd DIR change working directory |
|
987 | 987 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
988 | 988 | all prompts |
|
989 | 989 | -q --quiet suppress output |
|
990 | 990 | -v --verbose enable additional output |
|
991 | 991 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
992 | 992 | debug) |
|
993 | 993 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
994 | 994 | --debug enable debugging output |
|
995 | 995 | --debugger start debugger |
|
996 | 996 | --encoding ENCODE set the charset encoding (default: ascii) |
|
997 | 997 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
998 | 998 | --traceback always print a traceback on exception |
|
999 | 999 | --time time how long the command takes |
|
1000 | 1000 | --profile print command execution profile |
|
1001 | 1001 | --version output version information and exit |
|
1002 | 1002 | -h --help display help and exit |
|
1003 | 1003 | --hidden consider hidden changesets |
|
1004 | 1004 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
1005 | 1005 | (default: auto) |
|
1006 | 1006 | |
|
1007 | 1007 | In case when extension name doesn't match any of its commands, |
|
1008 | 1008 | help message should ask for '-v' to get list of built-in aliases |
|
1009 | 1009 | along with extension help |
|
1010 | 1010 | $ cat > $TESTTMP/d/dudu.py <<EOF |
|
1011 | 1011 | > """ |
|
1012 | 1012 | > This is an awesome 'dudu' extension. It does something and |
|
1013 | 1013 | > also writes 'Beep beep' |
|
1014 | 1014 | > """ |
|
1015 | 1015 | > from mercurial import commands, registrar |
|
1016 | 1016 | > cmdtable = {} |
|
1017 | 1017 | > command = registrar.command(cmdtable) |
|
1018 | 1018 | > @command(b'something', [], b'hg something') |
|
1019 | 1019 | > def something(ui, *args, **kwargs): |
|
1020 | 1020 | > """Does something""" |
|
1021 | 1021 | > ui.write(b"I do something. Yaaay\\n") |
|
1022 | 1022 | > @command(b'beep', [], b'hg beep') |
|
1023 | 1023 | > def beep(ui, *args, **kwargs): |
|
1024 | 1024 | > """Writes 'Beep beep'""" |
|
1025 | 1025 | > ui.write(b"Beep beep\\n") |
|
1026 | 1026 | > EOF |
|
1027 | 1027 | $ dudupath=$TESTTMP/d/dudu.py |
|
1028 | 1028 | |
|
1029 | 1029 | $ echo "dudu = $dudupath" >> $HGRCPATH |
|
1030 | 1030 | |
|
1031 | 1031 | $ hg help -e dudu |
|
1032 | 1032 | dudu extension - |
|
1033 | 1033 | |
|
1034 | 1034 | This is an awesome 'dudu' extension. It does something and also writes 'Beep |
|
1035 | 1035 | beep' |
|
1036 | 1036 | |
|
1037 | 1037 | list of commands: |
|
1038 | 1038 | |
|
1039 | 1039 | beep Writes 'Beep beep' |
|
1040 | 1040 | something Does something |
|
1041 | 1041 | |
|
1042 | 1042 | (use 'hg help -v dudu' to show built-in aliases and global options) |
|
1043 | 1043 | |
|
1044 | 1044 | In case when extension name doesn't match any of its commands, |
|
1045 | 1045 | help options '-v' and '-v -e' should be equivalent |
|
1046 | 1046 | $ hg help -v dudu |
|
1047 | 1047 | dudu extension - |
|
1048 | 1048 | |
|
1049 | 1049 | This is an awesome 'dudu' extension. It does something and also writes 'Beep |
|
1050 | 1050 | beep' |
|
1051 | 1051 | |
|
1052 | 1052 | list of commands: |
|
1053 | 1053 | |
|
1054 | 1054 | beep Writes 'Beep beep' |
|
1055 | 1055 | something Does something |
|
1056 | 1056 | |
|
1057 | 1057 | global options ([+] can be repeated): |
|
1058 | 1058 | |
|
1059 | 1059 | -R --repository REPO repository root directory or name of overlay bundle |
|
1060 | 1060 | file |
|
1061 | 1061 | --cwd DIR change working directory |
|
1062 | 1062 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
1063 | 1063 | all prompts |
|
1064 | 1064 | -q --quiet suppress output |
|
1065 | 1065 | -v --verbose enable additional output |
|
1066 | 1066 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
1067 | 1067 | debug) |
|
1068 | 1068 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
1069 | 1069 | --debug enable debugging output |
|
1070 | 1070 | --debugger start debugger |
|
1071 | 1071 | --encoding ENCODE set the charset encoding (default: ascii) |
|
1072 | 1072 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
1073 | 1073 | --traceback always print a traceback on exception |
|
1074 | 1074 | --time time how long the command takes |
|
1075 | 1075 | --profile print command execution profile |
|
1076 | 1076 | --version output version information and exit |
|
1077 | 1077 | -h --help display help and exit |
|
1078 | 1078 | --hidden consider hidden changesets |
|
1079 | 1079 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
1080 | 1080 | (default: auto) |
|
1081 | 1081 | |
|
1082 | 1082 | $ hg help -v -e dudu |
|
1083 | 1083 | dudu extension - |
|
1084 | 1084 | |
|
1085 | 1085 | This is an awesome 'dudu' extension. It does something and also writes 'Beep |
|
1086 | 1086 | beep' |
|
1087 | 1087 | |
|
1088 | 1088 | list of commands: |
|
1089 | 1089 | |
|
1090 | 1090 | beep Writes 'Beep beep' |
|
1091 | 1091 | something Does something |
|
1092 | 1092 | |
|
1093 | 1093 | global options ([+] can be repeated): |
|
1094 | 1094 | |
|
1095 | 1095 | -R --repository REPO repository root directory or name of overlay bundle |
|
1096 | 1096 | file |
|
1097 | 1097 | --cwd DIR change working directory |
|
1098 | 1098 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
1099 | 1099 | all prompts |
|
1100 | 1100 | -q --quiet suppress output |
|
1101 | 1101 | -v --verbose enable additional output |
|
1102 | 1102 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
1103 | 1103 | debug) |
|
1104 | 1104 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
1105 | 1105 | --debug enable debugging output |
|
1106 | 1106 | --debugger start debugger |
|
1107 | 1107 | --encoding ENCODE set the charset encoding (default: ascii) |
|
1108 | 1108 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
1109 | 1109 | --traceback always print a traceback on exception |
|
1110 | 1110 | --time time how long the command takes |
|
1111 | 1111 | --profile print command execution profile |
|
1112 | 1112 | --version output version information and exit |
|
1113 | 1113 | -h --help display help and exit |
|
1114 | 1114 | --hidden consider hidden changesets |
|
1115 | 1115 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
1116 | 1116 | (default: auto) |
|
1117 | 1117 | |
|
1118 | 1118 | Disabled extension commands: |
|
1119 | 1119 | |
|
1120 | 1120 | $ ORGHGRCPATH=$HGRCPATH |
|
1121 | 1121 | $ HGRCPATH= |
|
1122 | 1122 | $ export HGRCPATH |
|
1123 | 1123 | $ hg help email |
|
1124 | 1124 | 'email' is provided by the following extension: |
|
1125 | 1125 | |
|
1126 | 1126 | patchbomb command to send changesets as (a series of) patch emails |
|
1127 | 1127 | |
|
1128 | 1128 | (use 'hg help extensions' for information on enabling extensions) |
|
1129 | 1129 | |
|
1130 | 1130 | |
|
1131 | 1131 | $ hg qdel |
|
1132 | 1132 | hg: unknown command 'qdel' |
|
1133 | 1133 | 'qdelete' is provided by the following extension: |
|
1134 | 1134 | |
|
1135 | 1135 | mq manage a stack of patches |
|
1136 | 1136 | |
|
1137 | 1137 | (use 'hg help extensions' for information on enabling extensions) |
|
1138 | 1138 | [255] |
|
1139 | 1139 | |
|
1140 | 1140 | |
|
1141 | 1141 | $ hg churn |
|
1142 | 1142 | hg: unknown command 'churn' |
|
1143 | 1143 | 'churn' is provided by the following extension: |
|
1144 | 1144 | |
|
1145 | 1145 | churn command to display statistics about repository history |
|
1146 | 1146 | |
|
1147 | 1147 | (use 'hg help extensions' for information on enabling extensions) |
|
1148 | 1148 | [255] |
|
1149 | 1149 | |
|
1150 | 1150 | |
|
1151 | 1151 | |
|
1152 | 1152 | Disabled extensions: |
|
1153 | 1153 | |
|
1154 | 1154 | $ hg help churn |
|
1155 | 1155 | churn extension - command to display statistics about repository history |
|
1156 | 1156 | |
|
1157 | 1157 | (use 'hg help extensions' for information on enabling extensions) |
|
1158 | 1158 | |
|
1159 | 1159 | $ hg help patchbomb |
|
1160 | 1160 | patchbomb extension - command to send changesets as (a series of) patch emails |
|
1161 | 1161 | |
|
1162 | 1162 | The series is started off with a "[PATCH 0 of N]" introduction, which |
|
1163 | 1163 | describes the series as a whole. |
|
1164 | 1164 | |
|
1165 | 1165 | Each patch email has a Subject line of "[PATCH M of N] ...", using the first |
|
1166 | 1166 | line of the changeset description as the subject text. The message contains |
|
1167 | 1167 | two or three body parts: |
|
1168 | 1168 | |
|
1169 | 1169 | - The changeset description. |
|
1170 | 1170 | - [Optional] The result of running diffstat on the patch. |
|
1171 | 1171 | - The patch itself, as generated by 'hg export'. |
|
1172 | 1172 | |
|
1173 | 1173 | Each message refers to the first in the series using the In-Reply-To and |
|
1174 | 1174 | References headers, so they will show up as a sequence in threaded mail and |
|
1175 | 1175 | news readers, and in mail archives. |
|
1176 | 1176 | |
|
1177 | 1177 | To configure other defaults, add a section like this to your configuration |
|
1178 | 1178 | file: |
|
1179 | 1179 | |
|
1180 | 1180 | [email] |
|
1181 | 1181 | from = My Name <my@email> |
|
1182 | 1182 | to = recipient1, recipient2, ... |
|
1183 | 1183 | cc = cc1, cc2, ... |
|
1184 | 1184 | bcc = bcc1, bcc2, ... |
|
1185 | 1185 | reply-to = address1, address2, ... |
|
1186 | 1186 | |
|
1187 | 1187 | Use "[patchbomb]" as configuration section name if you need to override global |
|
1188 | 1188 | "[email]" address settings. |
|
1189 | 1189 | |
|
1190 | 1190 | Then you can use the 'hg email' command to mail a series of changesets as a |
|
1191 | 1191 | patchbomb. |
|
1192 | 1192 | |
|
1193 | 1193 | You can also either configure the method option in the email section to be a |
|
1194 | 1194 | sendmail compatible mailer or fill out the [smtp] section so that the |
|
1195 | 1195 | patchbomb extension can automatically send patchbombs directly from the |
|
1196 | 1196 | commandline. See the [email] and [smtp] sections in hgrc(5) for details. |
|
1197 | 1197 | |
|
1198 | 1198 | By default, 'hg email' will prompt for a "To" or "CC" header if you do not |
|
1199 | 1199 | supply one via configuration or the command line. You can override this to |
|
1200 | 1200 | never prompt by configuring an empty value: |
|
1201 | 1201 | |
|
1202 | 1202 | [email] |
|
1203 | 1203 | cc = |
|
1204 | 1204 | |
|
1205 | 1205 | You can control the default inclusion of an introduction message with the |
|
1206 | 1206 | "patchbomb.intro" configuration option. The configuration is always |
|
1207 | 1207 | overwritten by command line flags like --intro and --desc: |
|
1208 | 1208 | |
|
1209 | 1209 | [patchbomb] |
|
1210 | 1210 | intro=auto # include introduction message if more than 1 patch (default) |
|
1211 | 1211 | intro=never # never include an introduction message |
|
1212 | 1212 | intro=always # always include an introduction message |
|
1213 | 1213 | |
|
1214 | 1214 | You can specify a template for flags to be added in subject prefixes. Flags |
|
1215 | 1215 | specified by --flag option are exported as "{flags}" keyword: |
|
1216 | 1216 | |
|
1217 | 1217 | [patchbomb] |
|
1218 | 1218 | flagtemplate = "{separate(' ', |
|
1219 | 1219 | ifeq(branch, 'default', '', branch|upper), |
|
1220 | 1220 | flags)}" |
|
1221 | 1221 | |
|
1222 | 1222 | You can set patchbomb to always ask for confirmation by setting |
|
1223 | 1223 | "patchbomb.confirm" to true. |
|
1224 | 1224 | |
|
1225 | 1225 | (use 'hg help extensions' for information on enabling extensions) |
|
1226 | 1226 | |
|
1227 | 1227 | |
|
1228 | 1228 | Broken disabled extension and command: |
|
1229 | 1229 | |
|
1230 | 1230 | $ mkdir hgext |
|
1231 | 1231 | $ echo > hgext/__init__.py |
|
1232 | 1232 | $ cat > hgext/broken.py <<EOF |
|
1233 | 1233 | > "broken extension' |
|
1234 | 1234 | > EOF |
|
1235 | 1235 | $ cat > path.py <<EOF |
|
1236 | 1236 | > import os, sys |
|
1237 | 1237 | > sys.path.insert(0, os.environ['HGEXTPATH']) |
|
1238 | 1238 | > EOF |
|
1239 | 1239 | $ HGEXTPATH=`pwd` |
|
1240 | 1240 | $ export HGEXTPATH |
|
1241 | 1241 | |
|
1242 | 1242 | $ hg --config extensions.path=./path.py help broken |
|
1243 | 1243 | broken extension - (no help text available) |
|
1244 | 1244 | |
|
1245 | 1245 | (use 'hg help extensions' for information on enabling extensions) |
|
1246 | 1246 | |
|
1247 | 1247 | |
|
1248 | 1248 | $ cat > hgext/forest.py <<EOF |
|
1249 | 1249 | > cmdtable = None |
|
1250 | 1250 | > @command() |
|
1251 | 1251 | > def f(): |
|
1252 | 1252 | > pass |
|
1253 | 1253 | > @command(123) |
|
1254 | 1254 | > def g(): |
|
1255 | 1255 | > pass |
|
1256 | 1256 | > EOF |
|
1257 | 1257 | $ hg --config extensions.path=./path.py help foo > /dev/null |
|
1258 | abort: no such help topic: foo | |
|
1259 | (try 'hg help --keyword foo') | |
|
1258 | abort: no such help topic: foo (no-windows !) | |
|
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 |
|
|
1261 | 1263 | |
|
1262 | 1264 | $ cat > throw.py <<EOF |
|
1263 | 1265 | > from mercurial import commands, registrar, util |
|
1264 | 1266 | > cmdtable = {} |
|
1265 | 1267 | > command = registrar.command(cmdtable) |
|
1266 | 1268 | > class Bogon(Exception): pass |
|
1267 | 1269 | > @command(b'throw', [], b'hg throw', norepo=True) |
|
1268 | 1270 | > def throw(ui, **opts): |
|
1269 | 1271 | > """throws an exception""" |
|
1270 | 1272 | > raise Bogon() |
|
1271 | 1273 | > EOF |
|
1272 | 1274 | |
|
1273 | 1275 | No declared supported version, extension complains: |
|
1274 | 1276 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1275 | 1277 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
1276 | 1278 | ** which supports versions unknown of Mercurial. |
|
1277 | 1279 | ** Please disable throw and try your action again. |
|
1278 | 1280 | ** If that fixes the bug please report it to the extension author. |
|
1279 | 1281 | ** Python * (glob) |
|
1280 | 1282 | ** Mercurial Distributed SCM * (glob) |
|
1281 | 1283 | ** Extensions loaded: throw |
|
1282 | 1284 | |
|
1283 | 1285 | empty declaration of supported version, extension complains: |
|
1284 | 1286 | $ echo "testedwith = ''" >> throw.py |
|
1285 | 1287 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1286 | 1288 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
1287 | 1289 | ** which supports versions unknown of Mercurial. |
|
1288 | 1290 | ** Please disable throw and try your action again. |
|
1289 | 1291 | ** If that fixes the bug please report it to the extension author. |
|
1290 | 1292 | ** Python * (glob) |
|
1291 | 1293 | ** Mercurial Distributed SCM (*) (glob) |
|
1292 | 1294 | ** Extensions loaded: throw |
|
1293 | 1295 | |
|
1294 | 1296 | If the extension specifies a buglink, show that: |
|
1295 | 1297 | $ echo 'buglink = "http://example.com/bts"' >> throw.py |
|
1296 | 1298 | $ rm -f throw.pyc throw.pyo |
|
1297 | 1299 | $ rm -Rf __pycache__ |
|
1298 | 1300 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1299 | 1301 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
1300 | 1302 | ** which supports versions unknown of Mercurial. |
|
1301 | 1303 | ** Please disable throw and try your action again. |
|
1302 | 1304 | ** If that fixes the bug please report it to http://example.com/bts |
|
1303 | 1305 | ** Python * (glob) |
|
1304 | 1306 | ** Mercurial Distributed SCM (*) (glob) |
|
1305 | 1307 | ** Extensions loaded: throw |
|
1306 | 1308 | |
|
1307 | 1309 | If the extensions declare outdated versions, accuse the older extension first: |
|
1308 | 1310 | $ echo "from mercurial import util" >> older.py |
|
1309 | 1311 | $ echo "util.version = lambda:b'2.2'" >> older.py |
|
1310 | 1312 | $ echo "testedwith = b'1.9.3'" >> older.py |
|
1311 | 1313 | $ echo "testedwith = b'2.1.1'" >> throw.py |
|
1312 | 1314 | $ rm -f throw.pyc throw.pyo |
|
1313 | 1315 | $ rm -Rf __pycache__ |
|
1314 | 1316 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1315 | 1317 | > throw 2>&1 | egrep '^\*\*' |
|
1316 | 1318 | ** Unknown exception encountered with possibly-broken third-party extension older |
|
1317 | 1319 | ** which supports versions 1.9 of Mercurial. |
|
1318 | 1320 | ** Please disable older and try your action again. |
|
1319 | 1321 | ** If that fixes the bug please report it to the extension author. |
|
1320 | 1322 | ** Python * (glob) |
|
1321 | 1323 | ** Mercurial Distributed SCM (version 2.2) |
|
1322 | 1324 | ** Extensions loaded: throw, older |
|
1323 | 1325 | |
|
1324 | 1326 | One extension only tested with older, one only with newer versions: |
|
1325 | 1327 | $ echo "util.version = lambda:b'2.1'" >> older.py |
|
1326 | 1328 | $ rm -f older.pyc older.pyo |
|
1327 | 1329 | $ rm -Rf __pycache__ |
|
1328 | 1330 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1329 | 1331 | > throw 2>&1 | egrep '^\*\*' |
|
1330 | 1332 | ** Unknown exception encountered with possibly-broken third-party extension older |
|
1331 | 1333 | ** which supports versions 1.9 of Mercurial. |
|
1332 | 1334 | ** Please disable older and try your action again. |
|
1333 | 1335 | ** If that fixes the bug please report it to the extension author. |
|
1334 | 1336 | ** Python * (glob) |
|
1335 | 1337 | ** Mercurial Distributed SCM (version 2.1) |
|
1336 | 1338 | ** Extensions loaded: throw, older |
|
1337 | 1339 | |
|
1338 | 1340 | Older extension is tested with current version, the other only with newer: |
|
1339 | 1341 | $ echo "util.version = lambda:b'1.9.3'" >> older.py |
|
1340 | 1342 | $ rm -f older.pyc older.pyo |
|
1341 | 1343 | $ rm -Rf __pycache__ |
|
1342 | 1344 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1343 | 1345 | > throw 2>&1 | egrep '^\*\*' |
|
1344 | 1346 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
1345 | 1347 | ** which supports versions 2.1 of Mercurial. |
|
1346 | 1348 | ** Please disable throw and try your action again. |
|
1347 | 1349 | ** If that fixes the bug please report it to http://example.com/bts |
|
1348 | 1350 | ** Python * (glob) |
|
1349 | 1351 | ** Mercurial Distributed SCM (version 1.9.3) |
|
1350 | 1352 | ** Extensions loaded: throw, older |
|
1351 | 1353 | |
|
1352 | 1354 | Ability to point to a different point |
|
1353 | 1355 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1354 | 1356 | > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | egrep '^\*\*' |
|
1355 | 1357 | ** unknown exception encountered, please report by visiting |
|
1356 | 1358 | ** Your Local Goat Lenders |
|
1357 | 1359 | ** Python * (glob) |
|
1358 | 1360 | ** Mercurial Distributed SCM (*) (glob) |
|
1359 | 1361 | ** Extensions loaded: throw, older |
|
1360 | 1362 | |
|
1361 | 1363 | Declare the version as supporting this hg version, show regular bts link: |
|
1362 | 1364 | $ hgver=`hg debuginstall -T '{hgver}'` |
|
1363 | 1365 | $ echo 'testedwith = """'"$hgver"'"""' >> throw.py |
|
1364 | 1366 | $ if [ -z "$hgver" ]; then |
|
1365 | 1367 | > echo "unable to fetch a mercurial version. Make sure __version__ is correct"; |
|
1366 | 1368 | > fi |
|
1367 | 1369 | $ rm -f throw.pyc throw.pyo |
|
1368 | 1370 | $ rm -Rf __pycache__ |
|
1369 | 1371 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1370 | 1372 | ** unknown exception encountered, please report by visiting |
|
1371 | 1373 | ** https://mercurial-scm.org/wiki/BugTracker |
|
1372 | 1374 | ** Python * (glob) |
|
1373 | 1375 | ** Mercurial Distributed SCM (*) (glob) |
|
1374 | 1376 | ** Extensions loaded: throw |
|
1375 | 1377 | |
|
1376 | 1378 | Patch version is ignored during compatibility check |
|
1377 | 1379 | $ echo "testedwith = b'3.2'" >> throw.py |
|
1378 | 1380 | $ echo "util.version = lambda:b'3.2.2'" >> throw.py |
|
1379 | 1381 | $ rm -f throw.pyc throw.pyo |
|
1380 | 1382 | $ rm -Rf __pycache__ |
|
1381 | 1383 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
|
1382 | 1384 | ** unknown exception encountered, please report by visiting |
|
1383 | 1385 | ** https://mercurial-scm.org/wiki/BugTracker |
|
1384 | 1386 | ** Python * (glob) |
|
1385 | 1387 | ** Mercurial Distributed SCM (*) (glob) |
|
1386 | 1388 | ** Extensions loaded: throw |
|
1387 | 1389 | |
|
1388 | 1390 | Test version number support in 'hg version': |
|
1389 | 1391 | $ echo '__version__ = (1, 2, 3)' >> throw.py |
|
1390 | 1392 | $ rm -f throw.pyc throw.pyo |
|
1391 | 1393 | $ rm -Rf __pycache__ |
|
1392 | 1394 | $ hg version -v |
|
1393 | 1395 | Mercurial Distributed SCM (version *) (glob) |
|
1394 | 1396 | (see https://mercurial-scm.org for more information) |
|
1395 | 1397 | |
|
1396 | 1398 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
1397 | 1399 | This is free software; see the source for copying conditions. There is NO |
|
1398 | 1400 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
1399 | 1401 | |
|
1400 | 1402 | Enabled extensions: |
|
1401 | 1403 | |
|
1402 | 1404 | |
|
1403 | 1405 | $ hg version -v --config extensions.throw=throw.py |
|
1404 | 1406 | Mercurial Distributed SCM (version *) (glob) |
|
1405 | 1407 | (see https://mercurial-scm.org for more information) |
|
1406 | 1408 | |
|
1407 | 1409 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
1408 | 1410 | This is free software; see the source for copying conditions. There is NO |
|
1409 | 1411 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
1410 | 1412 | |
|
1411 | 1413 | Enabled extensions: |
|
1412 | 1414 | |
|
1413 | 1415 | throw external 1.2.3 |
|
1414 | 1416 | $ echo 'getversion = lambda: b"1.twentythree"' >> throw.py |
|
1415 | 1417 | $ rm -f throw.pyc throw.pyo |
|
1416 | 1418 | $ rm -Rf __pycache__ |
|
1417 | 1419 | $ hg version -v --config extensions.throw=throw.py --config extensions.strip= |
|
1418 | 1420 | Mercurial Distributed SCM (version *) (glob) |
|
1419 | 1421 | (see https://mercurial-scm.org for more information) |
|
1420 | 1422 | |
|
1421 | 1423 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
1422 | 1424 | This is free software; see the source for copying conditions. There is NO |
|
1423 | 1425 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
1424 | 1426 | |
|
1425 | 1427 | Enabled extensions: |
|
1426 | 1428 | |
|
1427 | 1429 | throw external 1.twentythree |
|
1428 | 1430 | strip internal |
|
1429 | 1431 | |
|
1430 | 1432 | $ hg version -q --config extensions.throw=throw.py |
|
1431 | 1433 | Mercurial Distributed SCM (version *) (glob) |
|
1432 | 1434 | |
|
1433 | 1435 | Test template output: |
|
1434 | 1436 | |
|
1435 | 1437 | $ hg version --config extensions.strip= -T'{extensions}' |
|
1436 | 1438 | strip |
|
1437 | 1439 | |
|
1438 | 1440 | Test JSON output of version: |
|
1439 | 1441 | |
|
1440 | 1442 | $ hg version -Tjson |
|
1441 | 1443 | [ |
|
1442 | 1444 | { |
|
1443 | 1445 | "extensions": [], |
|
1444 | 1446 | "ver": "*" (glob) |
|
1445 | 1447 | } |
|
1446 | 1448 | ] |
|
1447 | 1449 | |
|
1448 | 1450 | $ hg version --config extensions.throw=throw.py -Tjson |
|
1449 | 1451 | [ |
|
1450 | 1452 | { |
|
1451 | 1453 | "extensions": [{"bundled": false, "name": "throw", "ver": "1.twentythree"}], |
|
1452 | 1454 | "ver": "3.2.2" |
|
1453 | 1455 | } |
|
1454 | 1456 | ] |
|
1455 | 1457 | |
|
1456 | 1458 | $ hg version --config extensions.strip= -Tjson |
|
1457 | 1459 | [ |
|
1458 | 1460 | { |
|
1459 | 1461 | "extensions": [{"bundled": true, "name": "strip", "ver": null}], |
|
1460 | 1462 | "ver": "*" (glob) |
|
1461 | 1463 | } |
|
1462 | 1464 | ] |
|
1463 | 1465 | |
|
1464 | 1466 | Test template output of version: |
|
1465 | 1467 | |
|
1466 | 1468 | $ hg version --config extensions.throw=throw.py --config extensions.strip= \ |
|
1467 | 1469 | > -T'{extensions % "{name} {pad(ver, 16)} ({if(bundled, "internal", "external")})\n"}' |
|
1468 | 1470 | throw 1.twentythree (external) |
|
1469 | 1471 | strip (internal) |
|
1470 | 1472 | |
|
1471 | 1473 | Refuse to load extensions with minimum version requirements |
|
1472 | 1474 | |
|
1473 | 1475 | $ cat > minversion1.py << EOF |
|
1474 | 1476 | > from mercurial import util |
|
1475 | 1477 | > util.version = lambda: b'3.5.2' |
|
1476 | 1478 | > minimumhgversion = b'3.6' |
|
1477 | 1479 | > EOF |
|
1478 | 1480 | $ hg --config extensions.minversion=minversion1.py version |
|
1479 | 1481 | (third party extension minversion requires version 3.6 or newer of Mercurial; disabling) |
|
1480 | 1482 | Mercurial Distributed SCM (version 3.5.2) |
|
1481 | 1483 | (see https://mercurial-scm.org for more information) |
|
1482 | 1484 | |
|
1483 | 1485 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
1484 | 1486 | This is free software; see the source for copying conditions. There is NO |
|
1485 | 1487 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
1486 | 1488 | |
|
1487 | 1489 | $ cat > minversion2.py << EOF |
|
1488 | 1490 | > from mercurial import util |
|
1489 | 1491 | > util.version = lambda: b'3.6' |
|
1490 | 1492 | > minimumhgversion = b'3.7' |
|
1491 | 1493 | > EOF |
|
1492 | 1494 | $ hg --config extensions.minversion=minversion2.py version 2>&1 | egrep '\(third' |
|
1493 | 1495 | (third party extension minversion requires version 3.7 or newer of Mercurial; disabling) |
|
1494 | 1496 | |
|
1495 | 1497 | Can load version that is only off by point release |
|
1496 | 1498 | |
|
1497 | 1499 | $ cat > minversion2.py << EOF |
|
1498 | 1500 | > from mercurial import util |
|
1499 | 1501 | > util.version = lambda: b'3.6.1' |
|
1500 | 1502 | > minimumhgversion = b'3.6' |
|
1501 | 1503 | > EOF |
|
1502 | 1504 | $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' |
|
1503 | 1505 | [1] |
|
1504 | 1506 | |
|
1505 | 1507 | Can load minimum version identical to current |
|
1506 | 1508 | |
|
1507 | 1509 | $ cat > minversion3.py << EOF |
|
1508 | 1510 | > from mercurial import util |
|
1509 | 1511 | > util.version = lambda: b'3.5' |
|
1510 | 1512 | > minimumhgversion = b'3.5' |
|
1511 | 1513 | > EOF |
|
1512 | 1514 | $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' |
|
1513 | 1515 | [1] |
|
1514 | 1516 | |
|
1515 | 1517 | Restore HGRCPATH |
|
1516 | 1518 | |
|
1517 | 1519 | $ HGRCPATH=$ORGHGRCPATH |
|
1518 | 1520 | $ export HGRCPATH |
|
1519 | 1521 | |
|
1520 | 1522 | Commands handling multiple repositories at a time should invoke only |
|
1521 | 1523 | "reposetup()" of extensions enabling in the target repository. |
|
1522 | 1524 | |
|
1523 | 1525 | $ mkdir reposetup-test |
|
1524 | 1526 | $ cd reposetup-test |
|
1525 | 1527 | |
|
1526 | 1528 | $ cat > $TESTTMP/reposetuptest.py <<EOF |
|
1527 | 1529 | > from mercurial import extensions |
|
1528 | 1530 | > def reposetup(ui, repo): |
|
1529 | 1531 | > ui.write(b'reposetup() for %s\n' % (repo.root)) |
|
1530 | 1532 | > ui.flush() |
|
1531 | 1533 | > EOF |
|
1532 | 1534 | $ hg init src |
|
1533 | 1535 | $ echo a > src/a |
|
1534 | 1536 | $ hg -R src commit -Am '#0 at src/a' |
|
1535 | 1537 | adding a |
|
1536 | 1538 | $ echo '[extensions]' >> src/.hg/hgrc |
|
1537 | 1539 | $ echo '# enable extension locally' >> src/.hg/hgrc |
|
1538 | 1540 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc |
|
1539 | 1541 | $ hg -R src status |
|
1540 | 1542 | reposetup() for $TESTTMP/reposetup-test/src |
|
1541 | 1543 | reposetup() for $TESTTMP/reposetup-test/src (chg !) |
|
1542 | 1544 | |
|
1543 | 1545 | #if no-extraextensions |
|
1544 | 1546 | $ hg --cwd src debugextensions |
|
1545 | 1547 | reposetup() for $TESTTMP/reposetup-test/src |
|
1546 | 1548 | dodo (untested!) |
|
1547 | 1549 | dudu (untested!) |
|
1548 | 1550 | mq |
|
1549 | 1551 | reposetuptest (untested!) |
|
1550 | 1552 | strip |
|
1551 | 1553 | #endif |
|
1552 | 1554 | |
|
1553 | 1555 | $ hg clone -U src clone-dst1 |
|
1554 | 1556 | reposetup() for $TESTTMP/reposetup-test/src |
|
1555 | 1557 | $ hg init push-dst1 |
|
1556 | 1558 | $ hg -q -R src push push-dst1 |
|
1557 | 1559 | reposetup() for $TESTTMP/reposetup-test/src |
|
1558 | 1560 | $ hg init pull-src1 |
|
1559 | 1561 | $ hg -q -R pull-src1 pull src |
|
1560 | 1562 | reposetup() for $TESTTMP/reposetup-test/src |
|
1561 | 1563 | |
|
1562 | 1564 | $ cat <<EOF >> $HGRCPATH |
|
1563 | 1565 | > [extensions] |
|
1564 | 1566 | > # disable extension globally and explicitly |
|
1565 | 1567 | > reposetuptest = ! |
|
1566 | 1568 | > EOF |
|
1567 | 1569 | $ hg clone -U src clone-dst2 |
|
1568 | 1570 | reposetup() for $TESTTMP/reposetup-test/src |
|
1569 | 1571 | $ hg init push-dst2 |
|
1570 | 1572 | $ hg -q -R src push push-dst2 |
|
1571 | 1573 | reposetup() for $TESTTMP/reposetup-test/src |
|
1572 | 1574 | $ hg init pull-src2 |
|
1573 | 1575 | $ hg -q -R pull-src2 pull src |
|
1574 | 1576 | reposetup() for $TESTTMP/reposetup-test/src |
|
1575 | 1577 | |
|
1576 | 1578 | $ cat <<EOF >> $HGRCPATH |
|
1577 | 1579 | > [extensions] |
|
1578 | 1580 | > # enable extension globally |
|
1579 | 1581 | > reposetuptest = $TESTTMP/reposetuptest.py |
|
1580 | 1582 | > EOF |
|
1581 | 1583 | $ hg clone -U src clone-dst3 |
|
1582 | 1584 | reposetup() for $TESTTMP/reposetup-test/src |
|
1583 | 1585 | reposetup() for $TESTTMP/reposetup-test/clone-dst3 |
|
1584 | 1586 | $ hg init push-dst3 |
|
1585 | 1587 | reposetup() for $TESTTMP/reposetup-test/push-dst3 |
|
1586 | 1588 | $ hg -q -R src push push-dst3 |
|
1587 | 1589 | reposetup() for $TESTTMP/reposetup-test/src |
|
1588 | 1590 | reposetup() for $TESTTMP/reposetup-test/push-dst3 |
|
1589 | 1591 | $ hg init pull-src3 |
|
1590 | 1592 | reposetup() for $TESTTMP/reposetup-test/pull-src3 |
|
1591 | 1593 | $ hg -q -R pull-src3 pull src |
|
1592 | 1594 | reposetup() for $TESTTMP/reposetup-test/pull-src3 |
|
1593 | 1595 | reposetup() for $TESTTMP/reposetup-test/src |
|
1594 | 1596 | |
|
1595 | 1597 | $ echo '[extensions]' >> src/.hg/hgrc |
|
1596 | 1598 | $ echo '# disable extension locally' >> src/.hg/hgrc |
|
1597 | 1599 | $ echo 'reposetuptest = !' >> src/.hg/hgrc |
|
1598 | 1600 | $ hg clone -U src clone-dst4 |
|
1599 | 1601 | reposetup() for $TESTTMP/reposetup-test/clone-dst4 |
|
1600 | 1602 | $ hg init push-dst4 |
|
1601 | 1603 | reposetup() for $TESTTMP/reposetup-test/push-dst4 |
|
1602 | 1604 | $ hg -q -R src push push-dst4 |
|
1603 | 1605 | reposetup() for $TESTTMP/reposetup-test/push-dst4 |
|
1604 | 1606 | $ hg init pull-src4 |
|
1605 | 1607 | reposetup() for $TESTTMP/reposetup-test/pull-src4 |
|
1606 | 1608 | $ hg -q -R pull-src4 pull src |
|
1607 | 1609 | reposetup() for $TESTTMP/reposetup-test/pull-src4 |
|
1608 | 1610 | |
|
1609 | 1611 | disabling in command line overlays with all configuration |
|
1610 | 1612 | $ hg --config extensions.reposetuptest=! clone -U src clone-dst5 |
|
1611 | 1613 | $ hg --config extensions.reposetuptest=! init push-dst5 |
|
1612 | 1614 | $ hg --config extensions.reposetuptest=! -q -R src push push-dst5 |
|
1613 | 1615 | $ hg --config extensions.reposetuptest=! init pull-src5 |
|
1614 | 1616 | $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src |
|
1615 | 1617 | |
|
1616 | 1618 | $ cat <<EOF >> $HGRCPATH |
|
1617 | 1619 | > [extensions] |
|
1618 | 1620 | > # disable extension globally and explicitly |
|
1619 | 1621 | > reposetuptest = ! |
|
1620 | 1622 | > EOF |
|
1621 | 1623 | $ hg init parent |
|
1622 | 1624 | $ hg init parent/sub1 |
|
1623 | 1625 | $ echo 1 > parent/sub1/1 |
|
1624 | 1626 | $ hg -R parent/sub1 commit -Am '#0 at parent/sub1' |
|
1625 | 1627 | adding 1 |
|
1626 | 1628 | $ hg init parent/sub2 |
|
1627 | 1629 | $ hg init parent/sub2/sub21 |
|
1628 | 1630 | $ echo 21 > parent/sub2/sub21/21 |
|
1629 | 1631 | $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21' |
|
1630 | 1632 | adding 21 |
|
1631 | 1633 | $ cat > parent/sub2/.hgsub <<EOF |
|
1632 | 1634 | > sub21 = sub21 |
|
1633 | 1635 | > EOF |
|
1634 | 1636 | $ hg -R parent/sub2 commit -Am '#0 at parent/sub2' |
|
1635 | 1637 | adding .hgsub |
|
1636 | 1638 | $ hg init parent/sub3 |
|
1637 | 1639 | $ echo 3 > parent/sub3/3 |
|
1638 | 1640 | $ hg -R parent/sub3 commit -Am '#0 at parent/sub3' |
|
1639 | 1641 | adding 3 |
|
1640 | 1642 | $ cat > parent/.hgsub <<EOF |
|
1641 | 1643 | > sub1 = sub1 |
|
1642 | 1644 | > sub2 = sub2 |
|
1643 | 1645 | > sub3 = sub3 |
|
1644 | 1646 | > EOF |
|
1645 | 1647 | $ hg -R parent commit -Am '#0 at parent' |
|
1646 | 1648 | adding .hgsub |
|
1647 | 1649 | $ echo '[extensions]' >> parent/.hg/hgrc |
|
1648 | 1650 | $ echo '# enable extension locally' >> parent/.hg/hgrc |
|
1649 | 1651 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc |
|
1650 | 1652 | $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc |
|
1651 | 1653 | $ hg -R parent status -S -A |
|
1652 | 1654 | reposetup() for $TESTTMP/reposetup-test/parent |
|
1653 | 1655 | reposetup() for $TESTTMP/reposetup-test/parent/sub2 |
|
1654 | 1656 | C .hgsub |
|
1655 | 1657 | C .hgsubstate |
|
1656 | 1658 | C sub1/1 |
|
1657 | 1659 | C sub2/.hgsub |
|
1658 | 1660 | C sub2/.hgsubstate |
|
1659 | 1661 | C sub2/sub21/21 |
|
1660 | 1662 | C sub3/3 |
|
1661 | 1663 | |
|
1662 | 1664 | $ cd .. |
|
1663 | 1665 | |
|
1664 | 1666 | Prohibit registration of commands that don't use @command (issue5137) |
|
1665 | 1667 | |
|
1666 | 1668 | $ hg init deprecated |
|
1667 | 1669 | $ cd deprecated |
|
1668 | 1670 | |
|
1669 | 1671 | $ cat <<EOF > deprecatedcmd.py |
|
1670 | 1672 | > def deprecatedcmd(repo, ui): |
|
1671 | 1673 | > pass |
|
1672 | 1674 | > cmdtable = { |
|
1673 | 1675 | > b'deprecatedcmd': (deprecatedcmd, [], b''), |
|
1674 | 1676 | > } |
|
1675 | 1677 | > EOF |
|
1676 | 1678 | $ cat <<EOF > .hg/hgrc |
|
1677 | 1679 | > [extensions] |
|
1678 | 1680 | > deprecatedcmd = `pwd`/deprecatedcmd.py |
|
1679 | 1681 | > mq = ! |
|
1680 | 1682 | > hgext.mq = ! |
|
1681 | 1683 | > hgext/mq = ! |
|
1682 | 1684 | > EOF |
|
1683 | 1685 | |
|
1684 | 1686 | $ hg deprecatedcmd > /dev/null |
|
1685 | 1687 | *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo |
|
1686 | 1688 | *** (use @command decorator to register 'deprecatedcmd') |
|
1687 | 1689 | hg: unknown command 'deprecatedcmd' |
|
1688 | 1690 | (use 'hg help' for a list of commands) |
|
1689 | 1691 | [255] |
|
1690 | 1692 | |
|
1691 | 1693 | the extension shouldn't be loaded at all so the mq works: |
|
1692 | 1694 | |
|
1693 | 1695 | $ hg qseries --config extensions.mq= > /dev/null |
|
1694 | 1696 | *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo |
|
1695 | 1697 | *** (use @command decorator to register 'deprecatedcmd') |
|
1696 | 1698 | |
|
1697 | 1699 | $ cd .. |
|
1698 | 1700 | |
|
1699 | 1701 | Test synopsis and docstring extending |
|
1700 | 1702 | |
|
1701 | 1703 | $ hg init exthelp |
|
1702 | 1704 | $ cat > exthelp.py <<EOF |
|
1703 | 1705 | > from mercurial import commands, extensions |
|
1704 | 1706 | > def exbookmarks(orig, *args, **opts): |
|
1705 | 1707 | > return orig(*args, **opts) |
|
1706 | 1708 | > def uisetup(ui): |
|
1707 | 1709 | > synopsis = b' GREPME [--foo] [-x]' |
|
1708 | 1710 | > docstring = ''' |
|
1709 | 1711 | > GREPME make sure that this is in the help! |
|
1710 | 1712 | > ''' |
|
1711 | 1713 | > extensions.wrapcommand(commands.table, b'bookmarks', exbookmarks, |
|
1712 | 1714 | > synopsis, docstring) |
|
1713 | 1715 | > EOF |
|
1714 | 1716 | $ abspath=`pwd`/exthelp.py |
|
1715 | 1717 | $ echo '[extensions]' >> $HGRCPATH |
|
1716 | 1718 | $ echo "exthelp = $abspath" >> $HGRCPATH |
|
1717 | 1719 | $ cd exthelp |
|
1718 | 1720 | $ hg help bookmarks | grep GREPME |
|
1719 | 1721 | hg bookmarks [OPTIONS]... [NAME]... GREPME [--foo] [-x] |
|
1720 | 1722 | GREPME make sure that this is in the help! |
|
1721 | 1723 | $ cd .. |
|
1722 | 1724 | |
|
1723 | 1725 | Show deprecation warning for the use of cmdutil.command |
|
1724 | 1726 | |
|
1725 | 1727 | $ cat > nonregistrar.py <<EOF |
|
1726 | 1728 | > from mercurial import cmdutil |
|
1727 | 1729 | > cmdtable = {} |
|
1728 | 1730 | > command = cmdutil.command(cmdtable) |
|
1729 | 1731 | > @command(b'foo', [], norepo=True) |
|
1730 | 1732 | > def foo(ui): |
|
1731 | 1733 | > pass |
|
1732 | 1734 | > EOF |
|
1733 | 1735 | |
|
1734 | 1736 | Prohibit the use of unicode strings as the default value of options |
|
1735 | 1737 | |
|
1736 | 1738 | $ hg init $TESTTMP/opt-unicode-default |
|
1737 | 1739 | |
|
1738 | 1740 | $ cat > $TESTTMP/test_unicode_default_value.py << EOF |
|
1739 | 1741 | > from mercurial import registrar |
|
1740 | 1742 | > cmdtable = {} |
|
1741 | 1743 | > command = registrar.command(cmdtable) |
|
1742 | 1744 | > @command(b'dummy', [(b'', b'opt', u'value', u'help')], 'ext [OPTIONS]') |
|
1743 | 1745 | > def ext(*args, **opts): |
|
1744 | 1746 | > print(opts[b'opt']) |
|
1745 | 1747 | > EOF |
|
1746 | 1748 | $ cat > $TESTTMP/opt-unicode-default/.hg/hgrc << EOF |
|
1747 | 1749 | > [extensions] |
|
1748 | 1750 | > test_unicode_default_value = $TESTTMP/test_unicode_default_value.py |
|
1749 | 1751 | > EOF |
|
1750 | 1752 | $ hg -R $TESTTMP/opt-unicode-default dummy |
|
1751 | 1753 | *** failed to import extension test_unicode_default_value from $TESTTMP/test_unicode_default_value.py: unicode u'value' found in cmdtable.dummy |
|
1752 | 1754 | *** (use b'' to make it byte string) |
|
1753 | 1755 | hg: unknown command 'dummy' |
|
1754 | 1756 | (did you mean summary?) |
|
1755 | 1757 | [255] |
@@ -1,3628 +1,3630 | |||
|
1 | 1 | Short help: |
|
2 | 2 | |
|
3 | 3 | $ hg |
|
4 | 4 | Mercurial Distributed SCM |
|
5 | 5 | |
|
6 | 6 | basic commands: |
|
7 | 7 | |
|
8 | 8 | add add the specified files on the next commit |
|
9 | 9 | annotate show changeset information by line for each file |
|
10 | 10 | clone make a copy of an existing repository |
|
11 | 11 | commit commit the specified files or all outstanding changes |
|
12 | 12 | diff diff repository (or selected files) |
|
13 | 13 | export dump the header and diffs for one or more changesets |
|
14 | 14 | forget forget the specified files on the next commit |
|
15 | 15 | init create a new repository in the given directory |
|
16 | 16 | log show revision history of entire repository or files |
|
17 | 17 | merge merge another revision into working directory |
|
18 | 18 | pull pull changes from the specified source |
|
19 | 19 | push push changes to the specified destination |
|
20 | 20 | remove remove the specified files on the next commit |
|
21 | 21 | serve start stand-alone webserver |
|
22 | 22 | status show changed files in the working directory |
|
23 | 23 | summary summarize working directory state |
|
24 | 24 | update update working directory (or switch revisions) |
|
25 | 25 | |
|
26 | 26 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
27 | 27 | |
|
28 | 28 | $ hg -q |
|
29 | 29 | add add the specified files on the next commit |
|
30 | 30 | annotate show changeset information by line for each file |
|
31 | 31 | clone make a copy of an existing repository |
|
32 | 32 | commit commit the specified files or all outstanding changes |
|
33 | 33 | diff diff repository (or selected files) |
|
34 | 34 | export dump the header and diffs for one or more changesets |
|
35 | 35 | forget forget the specified files on the next commit |
|
36 | 36 | init create a new repository in the given directory |
|
37 | 37 | log show revision history of entire repository or files |
|
38 | 38 | merge merge another revision into working directory |
|
39 | 39 | pull pull changes from the specified source |
|
40 | 40 | push push changes to the specified destination |
|
41 | 41 | remove remove the specified files on the next commit |
|
42 | 42 | serve start stand-alone webserver |
|
43 | 43 | status show changed files in the working directory |
|
44 | 44 | summary summarize working directory state |
|
45 | 45 | update update working directory (or switch revisions) |
|
46 | 46 | |
|
47 | 47 | Extra extensions will be printed in help output in a non-reliable order since |
|
48 | 48 | the extension is unknown. |
|
49 | 49 | #if no-extraextensions |
|
50 | 50 | |
|
51 | 51 | $ hg help |
|
52 | 52 | Mercurial Distributed SCM |
|
53 | 53 | |
|
54 | 54 | list of commands: |
|
55 | 55 | |
|
56 | 56 | add add the specified files on the next commit |
|
57 | 57 | addremove add all new files, delete all missing files |
|
58 | 58 | annotate show changeset information by line for each file |
|
59 | 59 | archive create an unversioned archive of a repository revision |
|
60 | 60 | backout reverse effect of earlier changeset |
|
61 | 61 | bisect subdivision search of changesets |
|
62 | 62 | bookmarks create a new bookmark or list existing bookmarks |
|
63 | 63 | branch set or show the current branch name |
|
64 | 64 | branches list repository named branches |
|
65 | 65 | bundle create a bundle file |
|
66 | 66 | cat output the current or given revision of files |
|
67 | 67 | clone make a copy of an existing repository |
|
68 | 68 | commit commit the specified files or all outstanding changes |
|
69 | 69 | config show combined config settings from all hgrc files |
|
70 | 70 | copy mark files as copied for the next commit |
|
71 | 71 | diff diff repository (or selected files) |
|
72 | 72 | export dump the header and diffs for one or more changesets |
|
73 | 73 | files list tracked files |
|
74 | 74 | forget forget the specified files on the next commit |
|
75 | 75 | graft copy changes from other branches onto the current branch |
|
76 | 76 | grep search revision history for a pattern in specified files |
|
77 | 77 | heads show branch heads |
|
78 | 78 | help show help for a given topic or a help overview |
|
79 | 79 | identify identify the working directory or specified revision |
|
80 | 80 | import import an ordered set of patches |
|
81 | 81 | incoming show new changesets found in source |
|
82 | 82 | init create a new repository in the given directory |
|
83 | 83 | log show revision history of entire repository or files |
|
84 | 84 | manifest output the current or given revision of the project manifest |
|
85 | 85 | merge merge another revision into working directory |
|
86 | 86 | outgoing show changesets not found in the destination |
|
87 | 87 | paths show aliases for remote repositories |
|
88 | 88 | phase set or show the current phase name |
|
89 | 89 | pull pull changes from the specified source |
|
90 | 90 | push push changes to the specified destination |
|
91 | 91 | recover roll back an interrupted transaction |
|
92 | 92 | remove remove the specified files on the next commit |
|
93 | 93 | rename rename files; equivalent of copy + remove |
|
94 | 94 | resolve redo merges or set/view the merge status of files |
|
95 | 95 | revert restore files to their checkout state |
|
96 | 96 | root print the root (top) of the current working directory |
|
97 | 97 | serve start stand-alone webserver |
|
98 | 98 | status show changed files in the working directory |
|
99 | 99 | summary summarize working directory state |
|
100 | 100 | tag add one or more tags for the current or given revision |
|
101 | 101 | tags list repository tags |
|
102 | 102 | unbundle apply one or more bundle files |
|
103 | 103 | update update working directory (or switch revisions) |
|
104 | 104 | verify verify the integrity of the repository |
|
105 | 105 | version output version and copyright information |
|
106 | 106 | |
|
107 | 107 | additional help topics: |
|
108 | 108 | |
|
109 | 109 | bundlespec Bundle File Formats |
|
110 | 110 | color Colorizing Outputs |
|
111 | 111 | config Configuration Files |
|
112 | 112 | dates Date Formats |
|
113 | 113 | deprecated Deprecated Features |
|
114 | 114 | diffs Diff Formats |
|
115 | 115 | environment Environment Variables |
|
116 | 116 | extensions Using Additional Features |
|
117 | 117 | filesets Specifying File Sets |
|
118 | 118 | flags Command-line flags |
|
119 | 119 | glossary Glossary |
|
120 | 120 | hgignore Syntax for Mercurial Ignore Files |
|
121 | 121 | hgweb Configuring hgweb |
|
122 | 122 | internals Technical implementation topics |
|
123 | 123 | merge-tools Merge Tools |
|
124 | 124 | pager Pager Support |
|
125 | 125 | patterns File Name Patterns |
|
126 | 126 | phases Working with Phases |
|
127 | 127 | revisions Specifying Revisions |
|
128 | 128 | scripting Using Mercurial from scripts and automation |
|
129 | 129 | subrepos Subrepositories |
|
130 | 130 | templating Template Usage |
|
131 | 131 | urls URL Paths |
|
132 | 132 | |
|
133 | 133 | (use 'hg help -v' to show built-in aliases and global options) |
|
134 | 134 | |
|
135 | 135 | $ hg -q help |
|
136 | 136 | add add the specified files on the next commit |
|
137 | 137 | addremove add all new files, delete all missing files |
|
138 | 138 | annotate show changeset information by line for each file |
|
139 | 139 | archive create an unversioned archive of a repository revision |
|
140 | 140 | backout reverse effect of earlier changeset |
|
141 | 141 | bisect subdivision search of changesets |
|
142 | 142 | bookmarks create a new bookmark or list existing bookmarks |
|
143 | 143 | branch set or show the current branch name |
|
144 | 144 | branches list repository named branches |
|
145 | 145 | bundle create a bundle file |
|
146 | 146 | cat output the current or given revision of files |
|
147 | 147 | clone make a copy of an existing repository |
|
148 | 148 | commit commit the specified files or all outstanding changes |
|
149 | 149 | config show combined config settings from all hgrc files |
|
150 | 150 | copy mark files as copied for the next commit |
|
151 | 151 | diff diff repository (or selected files) |
|
152 | 152 | export dump the header and diffs for one or more changesets |
|
153 | 153 | files list tracked files |
|
154 | 154 | forget forget the specified files on the next commit |
|
155 | 155 | graft copy changes from other branches onto the current branch |
|
156 | 156 | grep search revision history for a pattern in specified files |
|
157 | 157 | heads show branch heads |
|
158 | 158 | help show help for a given topic or a help overview |
|
159 | 159 | identify identify the working directory or specified revision |
|
160 | 160 | import import an ordered set of patches |
|
161 | 161 | incoming show new changesets found in source |
|
162 | 162 | init create a new repository in the given directory |
|
163 | 163 | log show revision history of entire repository or files |
|
164 | 164 | manifest output the current or given revision of the project manifest |
|
165 | 165 | merge merge another revision into working directory |
|
166 | 166 | outgoing show changesets not found in the destination |
|
167 | 167 | paths show aliases for remote repositories |
|
168 | 168 | phase set or show the current phase name |
|
169 | 169 | pull pull changes from the specified source |
|
170 | 170 | push push changes to the specified destination |
|
171 | 171 | recover roll back an interrupted transaction |
|
172 | 172 | remove remove the specified files on the next commit |
|
173 | 173 | rename rename files; equivalent of copy + remove |
|
174 | 174 | resolve redo merges or set/view the merge status of files |
|
175 | 175 | revert restore files to their checkout state |
|
176 | 176 | root print the root (top) of the current working directory |
|
177 | 177 | serve start stand-alone webserver |
|
178 | 178 | status show changed files in the working directory |
|
179 | 179 | summary summarize working directory state |
|
180 | 180 | tag add one or more tags for the current or given revision |
|
181 | 181 | tags list repository tags |
|
182 | 182 | unbundle apply one or more bundle files |
|
183 | 183 | update update working directory (or switch revisions) |
|
184 | 184 | verify verify the integrity of the repository |
|
185 | 185 | version output version and copyright information |
|
186 | 186 | |
|
187 | 187 | additional help topics: |
|
188 | 188 | |
|
189 | 189 | bundlespec Bundle File Formats |
|
190 | 190 | color Colorizing Outputs |
|
191 | 191 | config Configuration Files |
|
192 | 192 | dates Date Formats |
|
193 | 193 | deprecated Deprecated Features |
|
194 | 194 | diffs Diff Formats |
|
195 | 195 | environment Environment Variables |
|
196 | 196 | extensions Using Additional Features |
|
197 | 197 | filesets Specifying File Sets |
|
198 | 198 | flags Command-line flags |
|
199 | 199 | glossary Glossary |
|
200 | 200 | hgignore Syntax for Mercurial Ignore Files |
|
201 | 201 | hgweb Configuring hgweb |
|
202 | 202 | internals Technical implementation topics |
|
203 | 203 | merge-tools Merge Tools |
|
204 | 204 | pager Pager Support |
|
205 | 205 | patterns File Name Patterns |
|
206 | 206 | phases Working with Phases |
|
207 | 207 | revisions Specifying Revisions |
|
208 | 208 | scripting Using Mercurial from scripts and automation |
|
209 | 209 | subrepos Subrepositories |
|
210 | 210 | templating Template Usage |
|
211 | 211 | urls URL Paths |
|
212 | 212 | |
|
213 | 213 | Test extension help: |
|
214 | 214 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
215 | 215 | Using Additional Features |
|
216 | 216 | """"""""""""""""""""""""" |
|
217 | 217 | |
|
218 | 218 | Mercurial has the ability to add new features through the use of |
|
219 | 219 | extensions. Extensions may add new commands, add options to existing |
|
220 | 220 | commands, change the default behavior of commands, or implement hooks. |
|
221 | 221 | |
|
222 | 222 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
223 | 223 | Python search path, create an entry for it in your configuration file, |
|
224 | 224 | like this: |
|
225 | 225 | |
|
226 | 226 | [extensions] |
|
227 | 227 | foo = |
|
228 | 228 | |
|
229 | 229 | You may also specify the full path to an extension: |
|
230 | 230 | |
|
231 | 231 | [extensions] |
|
232 | 232 | myfeature = ~/.hgext/myfeature.py |
|
233 | 233 | |
|
234 | 234 | See 'hg help config' for more information on configuration files. |
|
235 | 235 | |
|
236 | 236 | Extensions are not loaded by default for a variety of reasons: they can |
|
237 | 237 | increase startup overhead; they may be meant for advanced usage only; they |
|
238 | 238 | may provide potentially dangerous abilities (such as letting you destroy |
|
239 | 239 | or modify history); they might not be ready for prime time; or they may |
|
240 | 240 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
241 | 241 | to activate extensions as needed. |
|
242 | 242 | |
|
243 | 243 | To explicitly disable an extension enabled in a configuration file of |
|
244 | 244 | broader scope, prepend its path with !: |
|
245 | 245 | |
|
246 | 246 | [extensions] |
|
247 | 247 | # disabling extension bar residing in /path/to/extension/bar.py |
|
248 | 248 | bar = !/path/to/extension/bar.py |
|
249 | 249 | # ditto, but no path was supplied for extension baz |
|
250 | 250 | baz = ! |
|
251 | 251 | |
|
252 | 252 | enabled extensions: |
|
253 | 253 | |
|
254 | 254 | children command to display child changesets (DEPRECATED) |
|
255 | 255 | rebase command to move sets of revisions to a different ancestor |
|
256 | 256 | |
|
257 | 257 | disabled extensions: |
|
258 | 258 | |
|
259 | 259 | acl hooks for controlling repository access |
|
260 | 260 | blackbox log repository events to a blackbox for debugging |
|
261 | 261 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
262 | 262 | censor erase file content at a given revision |
|
263 | 263 | churn command to display statistics about repository history |
|
264 | 264 | clonebundles advertise pre-generated bundles to seed clones |
|
265 | 265 | convert import revisions from foreign VCS repositories into |
|
266 | 266 | Mercurial |
|
267 | 267 | eol automatically manage newlines in repository files |
|
268 | 268 | extdiff command to allow external programs to compare revisions |
|
269 | 269 | factotum http authentication with factotum |
|
270 | 270 | githelp try mapping git commands to Mercurial commands |
|
271 | 271 | gpg commands to sign and verify changesets |
|
272 | 272 | hgk browse the repository in a graphical way |
|
273 | 273 | highlight syntax highlighting for hgweb (requires Pygments) |
|
274 | 274 | histedit interactive history editing |
|
275 | 275 | keyword expand keywords in tracked files |
|
276 | 276 | largefiles track large binary files |
|
277 | 277 | mq manage a stack of patches |
|
278 | 278 | notify hooks for sending email push notifications |
|
279 | 279 | patchbomb command to send changesets as (a series of) patch emails |
|
280 | 280 | purge command to delete untracked files from the working |
|
281 | 281 | directory |
|
282 | 282 | relink recreates hardlinks between repository clones |
|
283 | 283 | schemes extend schemes with shortcuts to repository swarms |
|
284 | 284 | share share a common history between several working directories |
|
285 | 285 | shelve save and restore changes to the working directory |
|
286 | 286 | strip strip changesets and their descendants from history |
|
287 | 287 | transplant command to transplant changesets from another branch |
|
288 | 288 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
289 | 289 | zeroconf discover and advertise repositories on the local network |
|
290 | 290 | |
|
291 | 291 | #endif |
|
292 | 292 | |
|
293 | 293 | Verify that deprecated extensions are included if --verbose: |
|
294 | 294 | |
|
295 | 295 | $ hg -v help extensions | grep children |
|
296 | 296 | children command to display child changesets (DEPRECATED) |
|
297 | 297 | |
|
298 | 298 | Verify that extension keywords appear in help templates |
|
299 | 299 | |
|
300 | 300 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null |
|
301 | 301 | |
|
302 | 302 | Test short command list with verbose option |
|
303 | 303 | |
|
304 | 304 | $ hg -v help shortlist |
|
305 | 305 | Mercurial Distributed SCM |
|
306 | 306 | |
|
307 | 307 | basic commands: |
|
308 | 308 | |
|
309 | 309 | add add the specified files on the next commit |
|
310 | 310 | annotate, blame |
|
311 | 311 | show changeset information by line for each file |
|
312 | 312 | clone make a copy of an existing repository |
|
313 | 313 | commit, ci commit the specified files or all outstanding changes |
|
314 | 314 | diff diff repository (or selected files) |
|
315 | 315 | export dump the header and diffs for one or more changesets |
|
316 | 316 | forget forget the specified files on the next commit |
|
317 | 317 | init create a new repository in the given directory |
|
318 | 318 | log, history show revision history of entire repository or files |
|
319 | 319 | merge merge another revision into working directory |
|
320 | 320 | pull pull changes from the specified source |
|
321 | 321 | push push changes to the specified destination |
|
322 | 322 | remove, rm remove the specified files on the next commit |
|
323 | 323 | serve start stand-alone webserver |
|
324 | 324 | status, st show changed files in the working directory |
|
325 | 325 | summary, sum summarize working directory state |
|
326 | 326 | update, up, checkout, co |
|
327 | 327 | update working directory (or switch revisions) |
|
328 | 328 | |
|
329 | 329 | global options ([+] can be repeated): |
|
330 | 330 | |
|
331 | 331 | -R --repository REPO repository root directory or name of overlay bundle |
|
332 | 332 | file |
|
333 | 333 | --cwd DIR change working directory |
|
334 | 334 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
335 | 335 | all prompts |
|
336 | 336 | -q --quiet suppress output |
|
337 | 337 | -v --verbose enable additional output |
|
338 | 338 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
339 | 339 | debug) |
|
340 | 340 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
341 | 341 | --debug enable debugging output |
|
342 | 342 | --debugger start debugger |
|
343 | 343 | --encoding ENCODE set the charset encoding (default: ascii) |
|
344 | 344 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
345 | 345 | --traceback always print a traceback on exception |
|
346 | 346 | --time time how long the command takes |
|
347 | 347 | --profile print command execution profile |
|
348 | 348 | --version output version information and exit |
|
349 | 349 | -h --help display help and exit |
|
350 | 350 | --hidden consider hidden changesets |
|
351 | 351 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
352 | 352 | (default: auto) |
|
353 | 353 | |
|
354 | 354 | (use 'hg help' for the full list of commands) |
|
355 | 355 | |
|
356 | 356 | $ hg add -h |
|
357 | 357 | hg add [OPTION]... [FILE]... |
|
358 | 358 | |
|
359 | 359 | add the specified files on the next commit |
|
360 | 360 | |
|
361 | 361 | Schedule files to be version controlled and added to the repository. |
|
362 | 362 | |
|
363 | 363 | The files will be added to the repository at the next commit. To undo an |
|
364 | 364 | add before that, see 'hg forget'. |
|
365 | 365 | |
|
366 | 366 | If no names are given, add all files to the repository (except files |
|
367 | 367 | matching ".hgignore"). |
|
368 | 368 | |
|
369 | 369 | Returns 0 if all files are successfully added. |
|
370 | 370 | |
|
371 | 371 | options ([+] can be repeated): |
|
372 | 372 | |
|
373 | 373 | -I --include PATTERN [+] include names matching the given patterns |
|
374 | 374 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
375 | 375 | -S --subrepos recurse into subrepositories |
|
376 | 376 | -n --dry-run do not perform actions, just print output |
|
377 | 377 | |
|
378 | 378 | (some details hidden, use --verbose to show complete help) |
|
379 | 379 | |
|
380 | 380 | Verbose help for add |
|
381 | 381 | |
|
382 | 382 | $ hg add -hv |
|
383 | 383 | hg add [OPTION]... [FILE]... |
|
384 | 384 | |
|
385 | 385 | add the specified files on the next commit |
|
386 | 386 | |
|
387 | 387 | Schedule files to be version controlled and added to the repository. |
|
388 | 388 | |
|
389 | 389 | The files will be added to the repository at the next commit. To undo an |
|
390 | 390 | add before that, see 'hg forget'. |
|
391 | 391 | |
|
392 | 392 | If no names are given, add all files to the repository (except files |
|
393 | 393 | matching ".hgignore"). |
|
394 | 394 | |
|
395 | 395 | Examples: |
|
396 | 396 | |
|
397 | 397 | - New (unknown) files are added automatically by 'hg add': |
|
398 | 398 | |
|
399 | 399 | $ ls |
|
400 | 400 | foo.c |
|
401 | 401 | $ hg status |
|
402 | 402 | ? foo.c |
|
403 | 403 | $ hg add |
|
404 | 404 | adding foo.c |
|
405 | 405 | $ hg status |
|
406 | 406 | A foo.c |
|
407 | 407 | |
|
408 | 408 | - Specific files to be added can be specified: |
|
409 | 409 | |
|
410 | 410 | $ ls |
|
411 | 411 | bar.c foo.c |
|
412 | 412 | $ hg status |
|
413 | 413 | ? bar.c |
|
414 | 414 | ? foo.c |
|
415 | 415 | $ hg add bar.c |
|
416 | 416 | $ hg status |
|
417 | 417 | A bar.c |
|
418 | 418 | ? foo.c |
|
419 | 419 | |
|
420 | 420 | Returns 0 if all files are successfully added. |
|
421 | 421 | |
|
422 | 422 | options ([+] can be repeated): |
|
423 | 423 | |
|
424 | 424 | -I --include PATTERN [+] include names matching the given patterns |
|
425 | 425 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
426 | 426 | -S --subrepos recurse into subrepositories |
|
427 | 427 | -n --dry-run do not perform actions, just print output |
|
428 | 428 | |
|
429 | 429 | global options ([+] can be repeated): |
|
430 | 430 | |
|
431 | 431 | -R --repository REPO repository root directory or name of overlay bundle |
|
432 | 432 | file |
|
433 | 433 | --cwd DIR change working directory |
|
434 | 434 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
435 | 435 | all prompts |
|
436 | 436 | -q --quiet suppress output |
|
437 | 437 | -v --verbose enable additional output |
|
438 | 438 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
439 | 439 | debug) |
|
440 | 440 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
441 | 441 | --debug enable debugging output |
|
442 | 442 | --debugger start debugger |
|
443 | 443 | --encoding ENCODE set the charset encoding (default: ascii) |
|
444 | 444 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
445 | 445 | --traceback always print a traceback on exception |
|
446 | 446 | --time time how long the command takes |
|
447 | 447 | --profile print command execution profile |
|
448 | 448 | --version output version information and exit |
|
449 | 449 | -h --help display help and exit |
|
450 | 450 | --hidden consider hidden changesets |
|
451 | 451 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
452 | 452 | (default: auto) |
|
453 | 453 | |
|
454 | 454 | Test the textwidth config option |
|
455 | 455 | |
|
456 | 456 | $ hg root -h --config ui.textwidth=50 |
|
457 | 457 | hg root |
|
458 | 458 | |
|
459 | 459 | print the root (top) of the current working |
|
460 | 460 | directory |
|
461 | 461 | |
|
462 | 462 | Print the root directory of the current |
|
463 | 463 | repository. |
|
464 | 464 | |
|
465 | 465 | Returns 0 on success. |
|
466 | 466 | |
|
467 | 467 | (some details hidden, use --verbose to show |
|
468 | 468 | complete help) |
|
469 | 469 | |
|
470 | 470 | Test help option with version option |
|
471 | 471 | |
|
472 | 472 | $ hg add -h --version |
|
473 | 473 | Mercurial Distributed SCM (version *) (glob) |
|
474 | 474 | (see https://mercurial-scm.org for more information) |
|
475 | 475 | |
|
476 | 476 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
477 | 477 | This is free software; see the source for copying conditions. There is NO |
|
478 | 478 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
479 | 479 | |
|
480 | 480 | $ hg add --skjdfks |
|
481 | 481 | hg add: option --skjdfks not recognized |
|
482 | 482 | hg add [OPTION]... [FILE]... |
|
483 | 483 | |
|
484 | 484 | add the specified files on the next commit |
|
485 | 485 | |
|
486 | 486 | options ([+] can be repeated): |
|
487 | 487 | |
|
488 | 488 | -I --include PATTERN [+] include names matching the given patterns |
|
489 | 489 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
490 | 490 | -S --subrepos recurse into subrepositories |
|
491 | 491 | -n --dry-run do not perform actions, just print output |
|
492 | 492 | |
|
493 | 493 | (use 'hg add -h' to show more help) |
|
494 | 494 | [255] |
|
495 | 495 | |
|
496 | 496 | Test ambiguous command help |
|
497 | 497 | |
|
498 | 498 | $ hg help ad |
|
499 | 499 | list of commands: |
|
500 | 500 | |
|
501 | 501 | add add the specified files on the next commit |
|
502 | 502 | addremove add all new files, delete all missing files |
|
503 | 503 | |
|
504 | 504 | (use 'hg help -v ad' to show built-in aliases and global options) |
|
505 | 505 | |
|
506 | 506 | Test command without options |
|
507 | 507 | |
|
508 | 508 | $ hg help verify |
|
509 | 509 | hg verify |
|
510 | 510 | |
|
511 | 511 | verify the integrity of the repository |
|
512 | 512 | |
|
513 | 513 | Verify the integrity of the current repository. |
|
514 | 514 | |
|
515 | 515 | This will perform an extensive check of the repository's integrity, |
|
516 | 516 | validating the hashes and checksums of each entry in the changelog, |
|
517 | 517 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
518 | 518 | and indices. |
|
519 | 519 | |
|
520 | 520 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more |
|
521 | 521 | information about recovery from corruption of the repository. |
|
522 | 522 | |
|
523 | 523 | Returns 0 on success, 1 if errors are encountered. |
|
524 | 524 | |
|
525 | 525 | (some details hidden, use --verbose to show complete help) |
|
526 | 526 | |
|
527 | 527 | $ hg help diff |
|
528 | 528 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
529 | 529 | |
|
530 | 530 | diff repository (or selected files) |
|
531 | 531 | |
|
532 | 532 | Show differences between revisions for the specified files. |
|
533 | 533 | |
|
534 | 534 | Differences between files are shown using the unified diff format. |
|
535 | 535 | |
|
536 | 536 | Note: |
|
537 | 537 | 'hg diff' may generate unexpected results for merges, as it will |
|
538 | 538 | default to comparing against the working directory's first parent |
|
539 | 539 | changeset if no revisions are specified. |
|
540 | 540 | |
|
541 | 541 | When two revision arguments are given, then changes are shown between |
|
542 | 542 | those revisions. If only one revision is specified then that revision is |
|
543 | 543 | compared to the working directory, and, when no revisions are specified, |
|
544 | 544 | the working directory files are compared to its first parent. |
|
545 | 545 | |
|
546 | 546 | Alternatively you can specify -c/--change with a revision to see the |
|
547 | 547 | changes in that changeset relative to its first parent. |
|
548 | 548 | |
|
549 | 549 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
550 | 550 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
551 | 551 | with undesirable results. |
|
552 | 552 | |
|
553 | 553 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
554 | 554 | For more information, read 'hg help diffs'. |
|
555 | 555 | |
|
556 | 556 | Returns 0 on success. |
|
557 | 557 | |
|
558 | 558 | options ([+] can be repeated): |
|
559 | 559 | |
|
560 | 560 | -r --rev REV [+] revision |
|
561 | 561 | -c --change REV change made by revision |
|
562 | 562 | -a --text treat all files as text |
|
563 | 563 | -g --git use git extended diff format |
|
564 | 564 | --binary generate binary diffs in git mode (default) |
|
565 | 565 | --nodates omit dates from diff headers |
|
566 | 566 | --noprefix omit a/ and b/ prefixes from filenames |
|
567 | 567 | -p --show-function show which function each change is in |
|
568 | 568 | --reverse produce a diff that undoes the changes |
|
569 | 569 | -w --ignore-all-space ignore white space when comparing lines |
|
570 | 570 | -b --ignore-space-change ignore changes in the amount of white space |
|
571 | 571 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
572 | 572 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL |
|
573 | 573 | -U --unified NUM number of lines of context to show |
|
574 | 574 | --stat output diffstat-style summary of changes |
|
575 | 575 | --root DIR produce diffs relative to subdirectory |
|
576 | 576 | -I --include PATTERN [+] include names matching the given patterns |
|
577 | 577 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
578 | 578 | -S --subrepos recurse into subrepositories |
|
579 | 579 | |
|
580 | 580 | (some details hidden, use --verbose to show complete help) |
|
581 | 581 | |
|
582 | 582 | $ hg help status |
|
583 | 583 | hg status [OPTION]... [FILE]... |
|
584 | 584 | |
|
585 | 585 | aliases: st |
|
586 | 586 | |
|
587 | 587 | show changed files in the working directory |
|
588 | 588 | |
|
589 | 589 | Show status of files in the repository. If names are given, only files |
|
590 | 590 | that match are shown. Files that are clean or ignored or the source of a |
|
591 | 591 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
592 | 592 | -C/--copies or -A/--all are given. Unless options described with "show |
|
593 | 593 | only ..." are given, the options -mardu are used. |
|
594 | 594 | |
|
595 | 595 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
596 | 596 | explicitly requested with -u/--unknown or -i/--ignored. |
|
597 | 597 | |
|
598 | 598 | Note: |
|
599 | 599 | 'hg status' may appear to disagree with diff if permissions have |
|
600 | 600 | changed or a merge has occurred. The standard diff format does not |
|
601 | 601 | report permission changes and diff only reports changes relative to one |
|
602 | 602 | merge parent. |
|
603 | 603 | |
|
604 | 604 | If one revision is given, it is used as the base revision. If two |
|
605 | 605 | revisions are given, the differences between them are shown. The --change |
|
606 | 606 | option can also be used as a shortcut to list the changed files of a |
|
607 | 607 | revision from its first parent. |
|
608 | 608 | |
|
609 | 609 | The codes used to show the status of files are: |
|
610 | 610 | |
|
611 | 611 | M = modified |
|
612 | 612 | A = added |
|
613 | 613 | R = removed |
|
614 | 614 | C = clean |
|
615 | 615 | ! = missing (deleted by non-hg command, but still tracked) |
|
616 | 616 | ? = not tracked |
|
617 | 617 | I = ignored |
|
618 | 618 | = origin of the previous file (with --copies) |
|
619 | 619 | |
|
620 | 620 | Returns 0 on success. |
|
621 | 621 | |
|
622 | 622 | options ([+] can be repeated): |
|
623 | 623 | |
|
624 | 624 | -A --all show status of all files |
|
625 | 625 | -m --modified show only modified files |
|
626 | 626 | -a --added show only added files |
|
627 | 627 | -r --removed show only removed files |
|
628 | 628 | -d --deleted show only deleted (but tracked) files |
|
629 | 629 | -c --clean show only files without changes |
|
630 | 630 | -u --unknown show only unknown (not tracked) files |
|
631 | 631 | -i --ignored show only ignored files |
|
632 | 632 | -n --no-status hide status prefix |
|
633 | 633 | -C --copies show source of copied files |
|
634 | 634 | -0 --print0 end filenames with NUL, for use with xargs |
|
635 | 635 | --rev REV [+] show difference from revision |
|
636 | 636 | --change REV list the changed files of a revision |
|
637 | 637 | -I --include PATTERN [+] include names matching the given patterns |
|
638 | 638 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
639 | 639 | -S --subrepos recurse into subrepositories |
|
640 | 640 | |
|
641 | 641 | (some details hidden, use --verbose to show complete help) |
|
642 | 642 | |
|
643 | 643 | $ hg -q help status |
|
644 | 644 | hg status [OPTION]... [FILE]... |
|
645 | 645 | |
|
646 | 646 | show changed files in the working directory |
|
647 | 647 | |
|
648 | 648 | $ hg help foo |
|
649 | 649 | abort: no such help topic: foo |
|
650 | 650 | (try 'hg help --keyword foo') |
|
651 | 651 | [255] |
|
652 | 652 | |
|
653 | 653 | $ hg skjdfks |
|
654 | 654 | hg: unknown command 'skjdfks' |
|
655 | 655 | (use 'hg help' for a list of commands) |
|
656 | 656 | [255] |
|
657 | 657 | |
|
658 | 658 | Typoed command gives suggestion |
|
659 | 659 | $ hg puls |
|
660 | 660 | hg: unknown command 'puls' |
|
661 | 661 | (did you mean one of pull, push?) |
|
662 | 662 | [255] |
|
663 | 663 | |
|
664 | 664 | Not enabled extension gets suggested |
|
665 | 665 | |
|
666 | 666 | $ hg rebase |
|
667 | 667 | hg: unknown command 'rebase' |
|
668 | 668 | 'rebase' is provided by the following extension: |
|
669 | 669 | |
|
670 | 670 | rebase command to move sets of revisions to a different ancestor |
|
671 | 671 | |
|
672 | 672 | (use 'hg help extensions' for information on enabling extensions) |
|
673 | 673 | [255] |
|
674 | 674 | |
|
675 | 675 | Disabled extension gets suggested |
|
676 | 676 | $ hg --config extensions.rebase=! rebase |
|
677 | 677 | hg: unknown command 'rebase' |
|
678 | 678 | 'rebase' is provided by the following extension: |
|
679 | 679 | |
|
680 | 680 | rebase command to move sets of revisions to a different ancestor |
|
681 | 681 | |
|
682 | 682 | (use 'hg help extensions' for information on enabling extensions) |
|
683 | 683 | [255] |
|
684 | 684 | |
|
685 | 685 | Make sure that we don't run afoul of the help system thinking that |
|
686 | 686 | this is a section and erroring out weirdly. |
|
687 | 687 | |
|
688 | 688 | $ hg .log |
|
689 | 689 | hg: unknown command '.log' |
|
690 | 690 | (did you mean log?) |
|
691 | 691 | [255] |
|
692 | 692 | |
|
693 | 693 | $ hg log. |
|
694 | 694 | hg: unknown command 'log.' |
|
695 | 695 | (did you mean log?) |
|
696 | 696 | [255] |
|
697 | 697 | $ hg pu.lh |
|
698 | 698 | hg: unknown command 'pu.lh' |
|
699 | 699 | (did you mean one of pull, push?) |
|
700 | 700 | [255] |
|
701 | 701 | |
|
702 | 702 | $ cat > helpext.py <<EOF |
|
703 | 703 | > import os |
|
704 | 704 | > from mercurial import commands, fancyopts, registrar |
|
705 | 705 | > |
|
706 | 706 | > def func(arg): |
|
707 | 707 | > return '%sfoo' % arg |
|
708 | 708 | > class customopt(fancyopts.customopt): |
|
709 | 709 | > def newstate(self, oldstate, newparam, abort): |
|
710 | 710 | > return '%sbar' % oldstate |
|
711 | 711 | > cmdtable = {} |
|
712 | 712 | > command = registrar.command(cmdtable) |
|
713 | 713 | > |
|
714 | 714 | > @command(b'nohelp', |
|
715 | 715 | > [(b'', b'longdesc', 3, b'x'*67), |
|
716 | 716 | > (b'n', b'', None, b'normal desc'), |
|
717 | 717 | > (b'', b'newline', b'', b'line1\nline2'), |
|
718 | 718 | > (b'', b'callableopt', func, b'adds foo'), |
|
719 | 719 | > (b'', b'customopt', customopt(''), b'adds bar'), |
|
720 | 720 | > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], |
|
721 | 721 | > b'hg nohelp', |
|
722 | 722 | > norepo=True) |
|
723 | 723 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) |
|
724 | 724 | > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) |
|
725 | 725 | > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) |
|
726 | 726 | > def nohelp(ui, *args, **kwargs): |
|
727 | 727 | > pass |
|
728 | 728 | > |
|
729 | 729 | > def uisetup(ui): |
|
730 | 730 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') |
|
731 | 731 | > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') |
|
732 | 732 | > |
|
733 | 733 | > EOF |
|
734 | 734 | $ echo '[extensions]' >> $HGRCPATH |
|
735 | 735 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
736 | 736 | |
|
737 | 737 | Test for aliases |
|
738 | 738 | |
|
739 | 739 | $ hg help hgalias |
|
740 | 740 | hg hgalias [--remote] |
|
741 | 741 | |
|
742 | 742 | alias for: hg summary |
|
743 | 743 | |
|
744 | 744 | summarize working directory state |
|
745 | 745 | |
|
746 | 746 | This generates a brief summary of the working directory state, including |
|
747 | 747 | parents, branch, commit status, phase and available updates. |
|
748 | 748 | |
|
749 | 749 | With the --remote option, this will check the default paths for incoming |
|
750 | 750 | and outgoing changes. This can be time-consuming. |
|
751 | 751 | |
|
752 | 752 | Returns 0 on success. |
|
753 | 753 | |
|
754 | 754 | defined by: helpext |
|
755 | 755 | |
|
756 | 756 | options: |
|
757 | 757 | |
|
758 | 758 | --remote check for push and pull |
|
759 | 759 | |
|
760 | 760 | (some details hidden, use --verbose to show complete help) |
|
761 | 761 | |
|
762 | 762 | $ hg help shellalias |
|
763 | 763 | hg shellalias |
|
764 | 764 | |
|
765 | 765 | shell alias for: echo hi |
|
766 | 766 | |
|
767 | 767 | (no help text available) |
|
768 | 768 | |
|
769 | 769 | defined by: helpext |
|
770 | 770 | |
|
771 | 771 | (some details hidden, use --verbose to show complete help) |
|
772 | 772 | |
|
773 | 773 | Test command with no help text |
|
774 | 774 | |
|
775 | 775 | $ hg help nohelp |
|
776 | 776 | hg nohelp |
|
777 | 777 | |
|
778 | 778 | (no help text available) |
|
779 | 779 | |
|
780 | 780 | options: |
|
781 | 781 | |
|
782 | 782 | --longdesc VALUE |
|
783 | 783 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
784 | 784 | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
785 | 785 | -n -- normal desc |
|
786 | 786 | --newline VALUE line1 line2 |
|
787 | 787 | --callableopt VALUE adds foo |
|
788 | 788 | --customopt VALUE adds bar |
|
789 | 789 | --customopt-withdefault VALUE adds bar (default: foo) |
|
790 | 790 | |
|
791 | 791 | (some details hidden, use --verbose to show complete help) |
|
792 | 792 | |
|
793 | 793 | $ hg help -k nohelp |
|
794 | 794 | Commands: |
|
795 | 795 | |
|
796 | 796 | nohelp hg nohelp |
|
797 | 797 | |
|
798 | 798 | Extension Commands: |
|
799 | 799 | |
|
800 | 800 | nohelp (no help text available) |
|
801 | 801 | |
|
802 | 802 | Test that default list of commands omits extension commands |
|
803 | 803 | |
|
804 | 804 | #if no-extraextensions |
|
805 | 805 | |
|
806 | 806 | $ hg help |
|
807 | 807 | Mercurial Distributed SCM |
|
808 | 808 | |
|
809 | 809 | list of commands: |
|
810 | 810 | |
|
811 | 811 | add add the specified files on the next commit |
|
812 | 812 | addremove add all new files, delete all missing files |
|
813 | 813 | annotate show changeset information by line for each file |
|
814 | 814 | archive create an unversioned archive of a repository revision |
|
815 | 815 | backout reverse effect of earlier changeset |
|
816 | 816 | bisect subdivision search of changesets |
|
817 | 817 | bookmarks create a new bookmark or list existing bookmarks |
|
818 | 818 | branch set or show the current branch name |
|
819 | 819 | branches list repository named branches |
|
820 | 820 | bundle create a bundle file |
|
821 | 821 | cat output the current or given revision of files |
|
822 | 822 | clone make a copy of an existing repository |
|
823 | 823 | commit commit the specified files or all outstanding changes |
|
824 | 824 | config show combined config settings from all hgrc files |
|
825 | 825 | copy mark files as copied for the next commit |
|
826 | 826 | diff diff repository (or selected files) |
|
827 | 827 | export dump the header and diffs for one or more changesets |
|
828 | 828 | files list tracked files |
|
829 | 829 | forget forget the specified files on the next commit |
|
830 | 830 | graft copy changes from other branches onto the current branch |
|
831 | 831 | grep search revision history for a pattern in specified files |
|
832 | 832 | heads show branch heads |
|
833 | 833 | help show help for a given topic or a help overview |
|
834 | 834 | identify identify the working directory or specified revision |
|
835 | 835 | import import an ordered set of patches |
|
836 | 836 | incoming show new changesets found in source |
|
837 | 837 | init create a new repository in the given directory |
|
838 | 838 | log show revision history of entire repository or files |
|
839 | 839 | manifest output the current or given revision of the project manifest |
|
840 | 840 | merge merge another revision into working directory |
|
841 | 841 | outgoing show changesets not found in the destination |
|
842 | 842 | paths show aliases for remote repositories |
|
843 | 843 | phase set or show the current phase name |
|
844 | 844 | pull pull changes from the specified source |
|
845 | 845 | push push changes to the specified destination |
|
846 | 846 | recover roll back an interrupted transaction |
|
847 | 847 | remove remove the specified files on the next commit |
|
848 | 848 | rename rename files; equivalent of copy + remove |
|
849 | 849 | resolve redo merges or set/view the merge status of files |
|
850 | 850 | revert restore files to their checkout state |
|
851 | 851 | root print the root (top) of the current working directory |
|
852 | 852 | serve start stand-alone webserver |
|
853 | 853 | status show changed files in the working directory |
|
854 | 854 | summary summarize working directory state |
|
855 | 855 | tag add one or more tags for the current or given revision |
|
856 | 856 | tags list repository tags |
|
857 | 857 | unbundle apply one or more bundle files |
|
858 | 858 | update update working directory (or switch revisions) |
|
859 | 859 | verify verify the integrity of the repository |
|
860 | 860 | version output version and copyright information |
|
861 | 861 | |
|
862 | 862 | enabled extensions: |
|
863 | 863 | |
|
864 | 864 | helpext (no help text available) |
|
865 | 865 | |
|
866 | 866 | additional help topics: |
|
867 | 867 | |
|
868 | 868 | bundlespec Bundle File Formats |
|
869 | 869 | color Colorizing Outputs |
|
870 | 870 | config Configuration Files |
|
871 | 871 | dates Date Formats |
|
872 | 872 | deprecated Deprecated Features |
|
873 | 873 | diffs Diff Formats |
|
874 | 874 | environment Environment Variables |
|
875 | 875 | extensions Using Additional Features |
|
876 | 876 | filesets Specifying File Sets |
|
877 | 877 | flags Command-line flags |
|
878 | 878 | glossary Glossary |
|
879 | 879 | hgignore Syntax for Mercurial Ignore Files |
|
880 | 880 | hgweb Configuring hgweb |
|
881 | 881 | internals Technical implementation topics |
|
882 | 882 | merge-tools Merge Tools |
|
883 | 883 | pager Pager Support |
|
884 | 884 | patterns File Name Patterns |
|
885 | 885 | phases Working with Phases |
|
886 | 886 | revisions Specifying Revisions |
|
887 | 887 | scripting Using Mercurial from scripts and automation |
|
888 | 888 | subrepos Subrepositories |
|
889 | 889 | templating Template Usage |
|
890 | 890 | urls URL Paths |
|
891 | 891 | |
|
892 | 892 | (use 'hg help -v' to show built-in aliases and global options) |
|
893 | 893 | |
|
894 | 894 | #endif |
|
895 | 895 | |
|
896 | 896 | Test list of internal help commands |
|
897 | 897 | |
|
898 | 898 | $ hg help debug |
|
899 | 899 | debug commands (internal and unsupported): |
|
900 | 900 | |
|
901 | 901 | debugancestor |
|
902 | 902 | find the ancestor revision of two revisions in a given index |
|
903 | 903 | debugapplystreamclonebundle |
|
904 | 904 | apply a stream clone bundle file |
|
905 | 905 | debugbuilddag |
|
906 | 906 | builds a repo with a given DAG from scratch in the current |
|
907 | 907 | empty repo |
|
908 | 908 | debugbundle lists the contents of a bundle |
|
909 | 909 | debugcapabilities |
|
910 | 910 | lists the capabilities of a remote peer |
|
911 | 911 | debugcheckstate |
|
912 | 912 | validate the correctness of the current dirstate |
|
913 | 913 | debugcolor show available color, effects or style |
|
914 | 914 | debugcommands |
|
915 | 915 | list all available commands and options |
|
916 | 916 | debugcomplete |
|
917 | 917 | returns the completion list associated with the given command |
|
918 | 918 | debugcreatestreamclonebundle |
|
919 | 919 | create a stream clone bundle file |
|
920 | 920 | debugdag format the changelog or an index DAG as a concise textual |
|
921 | 921 | description |
|
922 | 922 | debugdata dump the contents of a data file revision |
|
923 | 923 | debugdate parse and display a date |
|
924 | 924 | debugdeltachain |
|
925 | 925 | dump information about delta chains in a revlog |
|
926 | 926 | debugdirstate |
|
927 | 927 | show the contents of the current dirstate |
|
928 | 928 | debugdiscovery |
|
929 | 929 | runs the changeset discovery protocol in isolation |
|
930 | 930 | debugdownload |
|
931 | 931 | download a resource using Mercurial logic and config |
|
932 | 932 | debugextensions |
|
933 | 933 | show information about active extensions |
|
934 | 934 | debugfileset parse and apply a fileset specification |
|
935 | 935 | debugformat display format information about the current repository |
|
936 | 936 | debugfsinfo show information detected about current filesystem |
|
937 | 937 | debuggetbundle |
|
938 | 938 | retrieves a bundle from a repo |
|
939 | 939 | debugignore display the combined ignore pattern and information about |
|
940 | 940 | ignored files |
|
941 | 941 | debugindex dump the contents of an index file |
|
942 | 942 | debugindexdot |
|
943 | 943 | dump an index DAG as a graphviz dot file |
|
944 | 944 | debuginstall test Mercurial installation |
|
945 | 945 | debugknown test whether node ids are known to a repo |
|
946 | 946 | debuglocks show or modify state of locks |
|
947 | 947 | debugmanifestfulltextcache |
|
948 | 948 | show, clear or amend the contents of the manifest fulltext |
|
949 | 949 | cache |
|
950 | 950 | debugmergestate |
|
951 | 951 | print merge state |
|
952 | 952 | debugnamecomplete |
|
953 | 953 | complete "names" - tags, open branch names, bookmark names |
|
954 | 954 | debugobsolete |
|
955 | 955 | create arbitrary obsolete marker |
|
956 | 956 | debugoptADV (no help text available) |
|
957 | 957 | debugoptDEP (no help text available) |
|
958 | 958 | debugoptEXP (no help text available) |
|
959 | 959 | debugpathcomplete |
|
960 | 960 | complete part or all of a tracked path |
|
961 | 961 | debugpeer establish a connection to a peer repository |
|
962 | 962 | debugpickmergetool |
|
963 | 963 | examine which merge tool is chosen for specified file |
|
964 | 964 | debugpushkey access the pushkey key/value protocol |
|
965 | 965 | debugpvec (no help text available) |
|
966 | 966 | debugrebuilddirstate |
|
967 | 967 | rebuild the dirstate as it would look like for the given |
|
968 | 968 | revision |
|
969 | 969 | debugrebuildfncache |
|
970 | 970 | rebuild the fncache file |
|
971 | 971 | debugrename dump rename information |
|
972 | 972 | debugrevlog show data and statistics about a revlog |
|
973 | 973 | debugrevspec parse and apply a revision specification |
|
974 | 974 | debugserve run a server with advanced settings |
|
975 | 975 | debugsetparents |
|
976 | 976 | manually set the parents of the current working directory |
|
977 | 977 | debugssl test a secure connection to a server |
|
978 | 978 | debugsub (no help text available) |
|
979 | 979 | debugsuccessorssets |
|
980 | 980 | show set of successors for revision |
|
981 | 981 | debugtemplate |
|
982 | 982 | parse and apply a template |
|
983 | 983 | debuguigetpass |
|
984 | 984 | show prompt to type password |
|
985 | 985 | debuguiprompt |
|
986 | 986 | show plain prompt |
|
987 | 987 | debugupdatecaches |
|
988 | 988 | warm all known caches in the repository |
|
989 | 989 | debugupgraderepo |
|
990 | 990 | upgrade a repository to use different features |
|
991 | 991 | debugwalk show how files match on given patterns |
|
992 | 992 | debugwhyunstable |
|
993 | 993 | explain instabilities of a changeset |
|
994 | 994 | debugwireargs |
|
995 | 995 | (no help text available) |
|
996 | 996 | debugwireproto |
|
997 | 997 | send wire protocol commands to a server |
|
998 | 998 | |
|
999 | 999 | (use 'hg help -v debug' to show built-in aliases and global options) |
|
1000 | 1000 | |
|
1001 | 1001 | internals topic renders index of available sub-topics |
|
1002 | 1002 | |
|
1003 | 1003 | $ hg help internals |
|
1004 | 1004 | Technical implementation topics |
|
1005 | 1005 | """"""""""""""""""""""""""""""" |
|
1006 | 1006 | |
|
1007 | 1007 | To access a subtopic, use "hg help internals.{subtopic-name}" |
|
1008 | 1008 | |
|
1009 | 1009 | bundle2 Bundle2 |
|
1010 | 1010 | bundles Bundles |
|
1011 | 1011 | censor Censor |
|
1012 | 1012 | changegroups Changegroups |
|
1013 | 1013 | config Config Registrar |
|
1014 | 1014 | requirements Repository Requirements |
|
1015 | 1015 | revlogs Revision Logs |
|
1016 | 1016 | wireprotocol Wire Protocol |
|
1017 | 1017 | |
|
1018 | 1018 | sub-topics can be accessed |
|
1019 | 1019 | |
|
1020 | 1020 | $ hg help internals.changegroups |
|
1021 | 1021 | Changegroups |
|
1022 | 1022 | """""""""""" |
|
1023 | 1023 | |
|
1024 | 1024 | Changegroups are representations of repository revlog data, specifically |
|
1025 | 1025 | the changelog data, root/flat manifest data, treemanifest data, and |
|
1026 | 1026 | filelogs. |
|
1027 | 1027 | |
|
1028 | 1028 | There are 3 versions of changegroups: "1", "2", and "3". From a high- |
|
1029 | 1029 | level, versions "1" and "2" are almost exactly the same, with the only |
|
1030 | 1030 | difference being an additional item in the *delta header*. Version "3" |
|
1031 | 1031 | adds support for revlog flags in the *delta header* and optionally |
|
1032 | 1032 | exchanging treemanifests (enabled by setting an option on the |
|
1033 | 1033 | "changegroup" part in the bundle2). |
|
1034 | 1034 | |
|
1035 | 1035 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
1036 | 1036 | segments: |
|
1037 | 1037 | |
|
1038 | 1038 | +---------------------------------+ |
|
1039 | 1039 | | | | | |
|
1040 | 1040 | | changeset | manifest | filelogs | |
|
1041 | 1041 | | | | | |
|
1042 | 1042 | | | | | |
|
1043 | 1043 | +---------------------------------+ |
|
1044 | 1044 | |
|
1045 | 1045 | When exchanging treemanifests, there are 4 logical segments: |
|
1046 | 1046 | |
|
1047 | 1047 | +-------------------------------------------------+ |
|
1048 | 1048 | | | | | | |
|
1049 | 1049 | | changeset | root | treemanifests | filelogs | |
|
1050 | 1050 | | | manifest | | | |
|
1051 | 1051 | | | | | | |
|
1052 | 1052 | +-------------------------------------------------+ |
|
1053 | 1053 | |
|
1054 | 1054 | The principle building block of each segment is a *chunk*. A *chunk* is a |
|
1055 | 1055 | framed piece of data: |
|
1056 | 1056 | |
|
1057 | 1057 | +---------------------------------------+ |
|
1058 | 1058 | | | | |
|
1059 | 1059 | | length | data | |
|
1060 | 1060 | | (4 bytes) | (<length - 4> bytes) | |
|
1061 | 1061 | | | | |
|
1062 | 1062 | +---------------------------------------+ |
|
1063 | 1063 | |
|
1064 | 1064 | All integers are big-endian signed integers. Each chunk starts with a |
|
1065 | 1065 | 32-bit integer indicating the length of the entire chunk (including the |
|
1066 | 1066 | length field itself). |
|
1067 | 1067 | |
|
1068 | 1068 | There is a special case chunk that has a value of 0 for the length |
|
1069 | 1069 | ("0x00000000"). We call this an *empty chunk*. |
|
1070 | 1070 | |
|
1071 | 1071 | Delta Groups |
|
1072 | 1072 | ============ |
|
1073 | 1073 | |
|
1074 | 1074 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
1075 | 1075 | or patches against previous revisions. |
|
1076 | 1076 | |
|
1077 | 1077 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
1078 | 1078 | to signal the end of the delta group: |
|
1079 | 1079 | |
|
1080 | 1080 | +------------------------------------------------------------------------+ |
|
1081 | 1081 | | | | | | | |
|
1082 | 1082 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
1083 | 1083 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
1084 | 1084 | | | | | | | |
|
1085 | 1085 | +------------------------------------------------------------------------+ |
|
1086 | 1086 | |
|
1087 | 1087 | Each *chunk*'s data consists of the following: |
|
1088 | 1088 | |
|
1089 | 1089 | +---------------------------------------+ |
|
1090 | 1090 | | | | |
|
1091 | 1091 | | delta header | delta data | |
|
1092 | 1092 | | (various by version) | (various) | |
|
1093 | 1093 | | | | |
|
1094 | 1094 | +---------------------------------------+ |
|
1095 | 1095 | |
|
1096 | 1096 | The *delta data* is a series of *delta*s that describe a diff from an |
|
1097 | 1097 | existing entry (either that the recipient already has, or previously |
|
1098 | 1098 | specified in the bundle/changegroup). |
|
1099 | 1099 | |
|
1100 | 1100 | The *delta header* is different between versions "1", "2", and "3" of the |
|
1101 | 1101 | changegroup format. |
|
1102 | 1102 | |
|
1103 | 1103 | Version 1 (headerlen=80): |
|
1104 | 1104 | |
|
1105 | 1105 | +------------------------------------------------------+ |
|
1106 | 1106 | | | | | | |
|
1107 | 1107 | | node | p1 node | p2 node | link node | |
|
1108 | 1108 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1109 | 1109 | | | | | | |
|
1110 | 1110 | +------------------------------------------------------+ |
|
1111 | 1111 | |
|
1112 | 1112 | Version 2 (headerlen=100): |
|
1113 | 1113 | |
|
1114 | 1114 | +------------------------------------------------------------------+ |
|
1115 | 1115 | | | | | | | |
|
1116 | 1116 | | node | p1 node | p2 node | base node | link node | |
|
1117 | 1117 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1118 | 1118 | | | | | | | |
|
1119 | 1119 | +------------------------------------------------------------------+ |
|
1120 | 1120 | |
|
1121 | 1121 | Version 3 (headerlen=102): |
|
1122 | 1122 | |
|
1123 | 1123 | +------------------------------------------------------------------------------+ |
|
1124 | 1124 | | | | | | | | |
|
1125 | 1125 | | node | p1 node | p2 node | base node | link node | flags | |
|
1126 | 1126 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
1127 | 1127 | | | | | | | | |
|
1128 | 1128 | +------------------------------------------------------------------------------+ |
|
1129 | 1129 | |
|
1130 | 1130 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which |
|
1131 | 1131 | contain a series of *delta*s, densely packed (no separators). These deltas |
|
1132 | 1132 | describe a diff from an existing entry (either that the recipient already |
|
1133 | 1133 | has, or previously specified in the bundle/changegroup). The format is |
|
1134 | 1134 | described more fully in "hg help internals.bdiff", but briefly: |
|
1135 | 1135 | |
|
1136 | 1136 | +---------------------------------------------------------------+ |
|
1137 | 1137 | | | | | | |
|
1138 | 1138 | | start offset | end offset | new length | content | |
|
1139 | 1139 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
1140 | 1140 | | | | | | |
|
1141 | 1141 | +---------------------------------------------------------------+ |
|
1142 | 1142 | |
|
1143 | 1143 | Please note that the length field in the delta data does *not* include |
|
1144 | 1144 | itself. |
|
1145 | 1145 | |
|
1146 | 1146 | In version 1, the delta is always applied against the previous node from |
|
1147 | 1147 | the changegroup or the first parent if this is the first entry in the |
|
1148 | 1148 | changegroup. |
|
1149 | 1149 | |
|
1150 | 1150 | In version 2 and up, the delta base node is encoded in the entry in the |
|
1151 | 1151 | changegroup. This allows the delta to be expressed against any parent, |
|
1152 | 1152 | which can result in smaller deltas and more efficient encoding of data. |
|
1153 | 1153 | |
|
1154 | 1154 | Changeset Segment |
|
1155 | 1155 | ================= |
|
1156 | 1156 | |
|
1157 | 1157 | The *changeset segment* consists of a single *delta group* holding |
|
1158 | 1158 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
1159 | 1159 | the boundary to the *manifest segment*. |
|
1160 | 1160 | |
|
1161 | 1161 | Manifest Segment |
|
1162 | 1162 | ================ |
|
1163 | 1163 | |
|
1164 | 1164 | The *manifest segment* consists of a single *delta group* holding manifest |
|
1165 | 1165 | data. If treemanifests are in use, it contains only the manifest for the |
|
1166 | 1166 | root directory of the repository. Otherwise, it contains the entire |
|
1167 | 1167 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
1168 | 1168 | the boundary to the next segment (either the *treemanifests segment* or |
|
1169 | 1169 | the *filelogs segment*, depending on version and the request options). |
|
1170 | 1170 | |
|
1171 | 1171 | Treemanifests Segment |
|
1172 | 1172 | --------------------- |
|
1173 | 1173 | |
|
1174 | 1174 | The *treemanifests segment* only exists in changegroup version "3", and |
|
1175 | 1175 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
1176 | 1176 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
1177 | 1177 | Aside from the filenames in the *treemanifests segment* containing a |
|
1178 | 1178 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
1179 | 1179 | (see below). The final sub-segment is followed by an *empty chunk* |
|
1180 | 1180 | (logically, a sub-segment with filename size 0). This denotes the boundary |
|
1181 | 1181 | to the *filelogs segment*. |
|
1182 | 1182 | |
|
1183 | 1183 | Filelogs Segment |
|
1184 | 1184 | ================ |
|
1185 | 1185 | |
|
1186 | 1186 | The *filelogs segment* consists of multiple sub-segments, each |
|
1187 | 1187 | corresponding to an individual file whose data is being described: |
|
1188 | 1188 | |
|
1189 | 1189 | +--------------------------------------------------+ |
|
1190 | 1190 | | | | | | | |
|
1191 | 1191 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
1192 | 1192 | | | | | | (4 bytes) | |
|
1193 | 1193 | | | | | | | |
|
1194 | 1194 | +--------------------------------------------------+ |
|
1195 | 1195 | |
|
1196 | 1196 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
1197 | 1197 | a sub-segment with filename size 0). This denotes the end of the segment |
|
1198 | 1198 | and of the overall changegroup. |
|
1199 | 1199 | |
|
1200 | 1200 | Each filelog sub-segment consists of the following: |
|
1201 | 1201 | |
|
1202 | 1202 | +------------------------------------------------------+ |
|
1203 | 1203 | | | | | |
|
1204 | 1204 | | filename length | filename | delta group | |
|
1205 | 1205 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
1206 | 1206 | | | | | |
|
1207 | 1207 | +------------------------------------------------------+ |
|
1208 | 1208 | |
|
1209 | 1209 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
1210 | 1210 | followed by N chunks constituting the *delta group* for this file. The |
|
1211 | 1211 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
1212 | 1212 | next filelog sub-segment. |
|
1213 | 1213 | |
|
1214 | 1214 | Test list of commands with command with no help text |
|
1215 | 1215 | |
|
1216 | 1216 | $ hg help helpext |
|
1217 | 1217 | helpext extension - no help text available |
|
1218 | 1218 | |
|
1219 | 1219 | list of commands: |
|
1220 | 1220 | |
|
1221 | 1221 | nohelp (no help text available) |
|
1222 | 1222 | |
|
1223 | 1223 | (use 'hg help -v helpext' to show built-in aliases and global options) |
|
1224 | 1224 | |
|
1225 | 1225 | |
|
1226 | 1226 | test advanced, deprecated and experimental options are hidden in command help |
|
1227 | 1227 | $ hg help debugoptADV |
|
1228 | 1228 | hg debugoptADV |
|
1229 | 1229 | |
|
1230 | 1230 | (no help text available) |
|
1231 | 1231 | |
|
1232 | 1232 | options: |
|
1233 | 1233 | |
|
1234 | 1234 | (some details hidden, use --verbose to show complete help) |
|
1235 | 1235 | $ hg help debugoptDEP |
|
1236 | 1236 | hg debugoptDEP |
|
1237 | 1237 | |
|
1238 | 1238 | (no help text available) |
|
1239 | 1239 | |
|
1240 | 1240 | options: |
|
1241 | 1241 | |
|
1242 | 1242 | (some details hidden, use --verbose to show complete help) |
|
1243 | 1243 | |
|
1244 | 1244 | $ hg help debugoptEXP |
|
1245 | 1245 | hg debugoptEXP |
|
1246 | 1246 | |
|
1247 | 1247 | (no help text available) |
|
1248 | 1248 | |
|
1249 | 1249 | options: |
|
1250 | 1250 | |
|
1251 | 1251 | (some details hidden, use --verbose to show complete help) |
|
1252 | 1252 | |
|
1253 | 1253 | test advanced, deprecated and experimental options are shown with -v |
|
1254 | 1254 | $ hg help -v debugoptADV | grep aopt |
|
1255 | 1255 | --aopt option is (ADVANCED) |
|
1256 | 1256 | $ hg help -v debugoptDEP | grep dopt |
|
1257 | 1257 | --dopt option is (DEPRECATED) |
|
1258 | 1258 | $ hg help -v debugoptEXP | grep eopt |
|
1259 | 1259 | --eopt option is (EXPERIMENTAL) |
|
1260 | 1260 | |
|
1261 | 1261 | #if gettext |
|
1262 | 1262 | test deprecated option is hidden with translation with untranslated description |
|
1263 | 1263 | (use many globy for not failing on changed transaction) |
|
1264 | 1264 | $ LANGUAGE=sv hg help debugoptDEP |
|
1265 | 1265 | hg debugoptDEP |
|
1266 | 1266 | |
|
1267 | 1267 | (*) (glob) |
|
1268 | 1268 | |
|
1269 | 1269 | options: |
|
1270 | 1270 | |
|
1271 | 1271 | (some details hidden, use --verbose to show complete help) |
|
1272 | 1272 | #endif |
|
1273 | 1273 | |
|
1274 | 1274 | Test commands that collide with topics (issue4240) |
|
1275 | 1275 | |
|
1276 | 1276 | $ hg config -hq |
|
1277 | 1277 | hg config [-u] [NAME]... |
|
1278 | 1278 | |
|
1279 | 1279 | show combined config settings from all hgrc files |
|
1280 | 1280 | $ hg showconfig -hq |
|
1281 | 1281 | hg config [-u] [NAME]... |
|
1282 | 1282 | |
|
1283 | 1283 | show combined config settings from all hgrc files |
|
1284 | 1284 | |
|
1285 | 1285 | Test a help topic |
|
1286 | 1286 | |
|
1287 | 1287 | $ hg help dates |
|
1288 | 1288 | Date Formats |
|
1289 | 1289 | """""""""""" |
|
1290 | 1290 | |
|
1291 | 1291 | Some commands allow the user to specify a date, e.g.: |
|
1292 | 1292 | |
|
1293 | 1293 | - backout, commit, import, tag: Specify the commit date. |
|
1294 | 1294 | - log, revert, update: Select revision(s) by date. |
|
1295 | 1295 | |
|
1296 | 1296 | Many date formats are valid. Here are some examples: |
|
1297 | 1297 | |
|
1298 | 1298 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
1299 | 1299 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
1300 | 1300 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
1301 | 1301 | - "Dec 6" (midnight) |
|
1302 | 1302 | - "13:18" (today assumed) |
|
1303 | 1303 | - "3:39" (3:39AM assumed) |
|
1304 | 1304 | - "3:39pm" (15:39) |
|
1305 | 1305 | - "2006-12-06 13:18:29" (ISO 8601 format) |
|
1306 | 1306 | - "2006-12-6 13:18" |
|
1307 | 1307 | - "2006-12-6" |
|
1308 | 1308 | - "12-6" |
|
1309 | 1309 | - "12/6" |
|
1310 | 1310 | - "12/6/6" (Dec 6 2006) |
|
1311 | 1311 | - "today" (midnight) |
|
1312 | 1312 | - "yesterday" (midnight) |
|
1313 | 1313 | - "now" - right now |
|
1314 | 1314 | |
|
1315 | 1315 | Lastly, there is Mercurial's internal format: |
|
1316 | 1316 | |
|
1317 | 1317 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
1318 | 1318 | |
|
1319 | 1319 | This is the internal representation format for dates. The first number is |
|
1320 | 1320 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second |
|
1321 | 1321 | is the offset of the local timezone, in seconds west of UTC (negative if |
|
1322 | 1322 | the timezone is east of UTC). |
|
1323 | 1323 | |
|
1324 | 1324 | The log command also accepts date ranges: |
|
1325 | 1325 | |
|
1326 | 1326 | - "<DATE" - at or before a given date/time |
|
1327 | 1327 | - ">DATE" - on or after a given date/time |
|
1328 | 1328 | - "DATE to DATE" - a date range, inclusive |
|
1329 | 1329 | - "-DAYS" - within a given number of days of today |
|
1330 | 1330 | |
|
1331 | 1331 | Test repeated config section name |
|
1332 | 1332 | |
|
1333 | 1333 | $ hg help config.host |
|
1334 | 1334 | "http_proxy.host" |
|
1335 | 1335 | Host name and (optional) port of the proxy server, for example |
|
1336 | 1336 | "myproxy:8000". |
|
1337 | 1337 | |
|
1338 | 1338 | "smtp.host" |
|
1339 | 1339 | Host name of mail server, e.g. "mail.example.com". |
|
1340 | 1340 | |
|
1341 | 1341 | Unrelated trailing paragraphs shouldn't be included |
|
1342 | 1342 | |
|
1343 | 1343 | $ hg help config.extramsg | grep '^$' |
|
1344 | 1344 | |
|
1345 | 1345 | |
|
1346 | 1346 | Test capitalized section name |
|
1347 | 1347 | |
|
1348 | 1348 | $ hg help scripting.HGPLAIN > /dev/null |
|
1349 | 1349 | |
|
1350 | 1350 | Help subsection: |
|
1351 | 1351 | |
|
1352 | 1352 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
1353 | 1353 | [1] |
|
1354 | 1354 | |
|
1355 | 1355 | Show nested definitions |
|
1356 | 1356 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
1357 | 1357 | |
|
1358 | 1358 | $ hg help config.type | egrep '^$'|wc -l |
|
1359 | 1359 | \s*3 (re) |
|
1360 | 1360 | |
|
1361 | 1361 | Separate sections from subsections |
|
1362 | 1362 | |
|
1363 | 1363 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq |
|
1364 | 1364 | "format" |
|
1365 | 1365 | -------- |
|
1366 | 1366 | |
|
1367 | 1367 | "usegeneraldelta" |
|
1368 | 1368 | |
|
1369 | 1369 | "dotencode" |
|
1370 | 1370 | |
|
1371 | 1371 | "usefncache" |
|
1372 | 1372 | |
|
1373 | 1373 | "usestore" |
|
1374 | 1374 | |
|
1375 | 1375 | "profiling" |
|
1376 | 1376 | ----------- |
|
1377 | 1377 | |
|
1378 | 1378 | "format" |
|
1379 | 1379 | |
|
1380 | 1380 | "progress" |
|
1381 | 1381 | ---------- |
|
1382 | 1382 | |
|
1383 | 1383 | "format" |
|
1384 | 1384 | |
|
1385 | 1385 | |
|
1386 | 1386 | Last item in help config.*: |
|
1387 | 1387 | |
|
1388 | 1388 | $ hg help config.`hg help config|grep '^ "'| \ |
|
1389 | 1389 | > tail -1|sed 's![ "]*!!g'`| \ |
|
1390 | 1390 | > grep 'hg help -c config' > /dev/null |
|
1391 | 1391 | [1] |
|
1392 | 1392 | |
|
1393 | 1393 | note to use help -c for general hg help config: |
|
1394 | 1394 | |
|
1395 | 1395 | $ hg help config |grep 'hg help -c config' > /dev/null |
|
1396 | 1396 | |
|
1397 | 1397 | Test templating help |
|
1398 | 1398 | |
|
1399 | 1399 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
1400 | 1400 | desc String. The text of the changeset description. |
|
1401 | 1401 | diffstat String. Statistics of changes with the following format: |
|
1402 | 1402 | firstline Any text. Returns the first line of text. |
|
1403 | 1403 | nonempty Any text. Returns '(none)' if the string is empty. |
|
1404 | 1404 | |
|
1405 | 1405 | Test deprecated items |
|
1406 | 1406 | |
|
1407 | 1407 | $ hg help -v templating | grep currentbookmark |
|
1408 | 1408 | currentbookmark |
|
1409 | 1409 | $ hg help templating | (grep currentbookmark || true) |
|
1410 | 1410 | |
|
1411 | 1411 | Test help hooks |
|
1412 | 1412 | |
|
1413 | 1413 | $ cat > helphook1.py <<EOF |
|
1414 | 1414 | > from mercurial import help |
|
1415 | 1415 | > |
|
1416 | 1416 | > def rewrite(ui, topic, doc): |
|
1417 | 1417 | > return doc + '\nhelphook1\n' |
|
1418 | 1418 | > |
|
1419 | 1419 | > def extsetup(ui): |
|
1420 | 1420 | > help.addtopichook('revisions', rewrite) |
|
1421 | 1421 | > EOF |
|
1422 | 1422 | $ cat > helphook2.py <<EOF |
|
1423 | 1423 | > from mercurial import help |
|
1424 | 1424 | > |
|
1425 | 1425 | > def rewrite(ui, topic, doc): |
|
1426 | 1426 | > return doc + '\nhelphook2\n' |
|
1427 | 1427 | > |
|
1428 | 1428 | > def extsetup(ui): |
|
1429 | 1429 | > help.addtopichook('revisions', rewrite) |
|
1430 | 1430 | > EOF |
|
1431 | 1431 | $ echo '[extensions]' >> $HGRCPATH |
|
1432 | 1432 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
1433 | 1433 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
1434 | 1434 | $ hg help revsets | grep helphook |
|
1435 | 1435 | helphook1 |
|
1436 | 1436 | helphook2 |
|
1437 | 1437 | |
|
1438 | 1438 | help -c should only show debug --debug |
|
1439 | 1439 | |
|
1440 | 1440 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' |
|
1441 | 1441 | [1] |
|
1442 | 1442 | |
|
1443 | 1443 | help -c should only show deprecated for -v |
|
1444 | 1444 | |
|
1445 | 1445 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1446 | 1446 | [1] |
|
1447 | 1447 | |
|
1448 | 1448 | Test -s / --system |
|
1449 | 1449 | |
|
1450 | 1450 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ |
|
1451 | 1451 | > wc -l | sed -e 's/ //g' |
|
1452 | 1452 | 0 |
|
1453 | 1453 | $ hg help config.files --system unix | grep 'USER' | \ |
|
1454 | 1454 | > wc -l | sed -e 's/ //g' |
|
1455 | 1455 | 0 |
|
1456 | 1456 | |
|
1457 | 1457 | Test -e / -c / -k combinations |
|
1458 | 1458 | |
|
1459 | 1459 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1460 | 1460 | Commands: |
|
1461 | 1461 | $ hg help -e|egrep '^[A-Z].*:|^ debug' |
|
1462 | 1462 | Extensions: |
|
1463 | 1463 | $ hg help -k|egrep '^[A-Z].*:|^ debug' |
|
1464 | 1464 | Topics: |
|
1465 | 1465 | Commands: |
|
1466 | 1466 | Extensions: |
|
1467 | 1467 | Extension Commands: |
|
1468 | 1468 | $ hg help -c schemes |
|
1469 | 1469 | abort: no such help topic: schemes |
|
1470 | 1470 | (try 'hg help --keyword schemes') |
|
1471 | 1471 | [255] |
|
1472 | 1472 | $ hg help -e schemes |head -1 |
|
1473 | 1473 | schemes extension - extend schemes with shortcuts to repository swarms |
|
1474 | 1474 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1475 | 1475 | Commands: |
|
1476 | 1476 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1477 | 1477 | Extensions: |
|
1478 | 1478 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1479 | 1479 | Extensions: |
|
1480 | 1480 | Commands: |
|
1481 | 1481 | $ hg help -c commit > /dev/null |
|
1482 | 1482 | $ hg help -e -c commit > /dev/null |
|
1483 | 1483 | $ hg help -e commit > /dev/null |
|
1484 | abort: no such help topic: commit | |
|
1485 | (try 'hg help --keyword commit') | |
|
1484 | abort: no such help topic: commit (no-windows !) | |
|
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 |
|
|
1487 | 1489 | |
|
1488 | 1490 |
|
|
1489 | 1491 | |
|
1490 | 1492 | $ cat > prefixedname.py <<EOF |
|
1491 | 1493 | > '''matched against word "clone" |
|
1492 | 1494 | > ''' |
|
1493 | 1495 | > EOF |
|
1494 | 1496 | $ echo '[extensions]' >> $HGRCPATH |
|
1495 | 1497 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
1496 | 1498 | $ hg help -k clone |
|
1497 | 1499 | Topics: |
|
1498 | 1500 | |
|
1499 | 1501 | config Configuration Files |
|
1500 | 1502 | extensions Using Additional Features |
|
1501 | 1503 | glossary Glossary |
|
1502 | 1504 | phases Working with Phases |
|
1503 | 1505 | subrepos Subrepositories |
|
1504 | 1506 | urls URL Paths |
|
1505 | 1507 | |
|
1506 | 1508 | Commands: |
|
1507 | 1509 | |
|
1508 | 1510 | bookmarks create a new bookmark or list existing bookmarks |
|
1509 | 1511 | clone make a copy of an existing repository |
|
1510 | 1512 | paths show aliases for remote repositories |
|
1511 | 1513 | pull pull changes from the specified source |
|
1512 | 1514 | update update working directory (or switch revisions) |
|
1513 | 1515 | |
|
1514 | 1516 | Extensions: |
|
1515 | 1517 | |
|
1516 | 1518 | clonebundles advertise pre-generated bundles to seed clones |
|
1517 | 1519 | narrow create clones which fetch history data for subset of files |
|
1518 | 1520 | (EXPERIMENTAL) |
|
1519 | 1521 | prefixedname matched against word "clone" |
|
1520 | 1522 | relink recreates hardlinks between repository clones |
|
1521 | 1523 | |
|
1522 | 1524 | Extension Commands: |
|
1523 | 1525 | |
|
1524 | 1526 | qclone clone main and patch repository at same time |
|
1525 | 1527 | |
|
1526 | 1528 | Test unfound topic |
|
1527 | 1529 | |
|
1528 | 1530 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1529 | 1531 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1530 | 1532 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') |
|
1531 | 1533 | [255] |
|
1532 | 1534 | |
|
1533 | 1535 | Test unfound keyword |
|
1534 | 1536 | |
|
1535 | 1537 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1536 | 1538 | abort: no matches |
|
1537 | 1539 | (try 'hg help' for a list of topics) |
|
1538 | 1540 | [255] |
|
1539 | 1541 | |
|
1540 | 1542 | Test omit indicating for help |
|
1541 | 1543 | |
|
1542 | 1544 | $ cat > addverboseitems.py <<EOF |
|
1543 | 1545 | > '''extension to test omit indicating. |
|
1544 | 1546 | > |
|
1545 | 1547 | > This paragraph is never omitted (for extension) |
|
1546 | 1548 | > |
|
1547 | 1549 | > .. container:: verbose |
|
1548 | 1550 | > |
|
1549 | 1551 | > This paragraph is omitted, |
|
1550 | 1552 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1551 | 1553 | > |
|
1552 | 1554 | > This paragraph is never omitted, too (for extension) |
|
1553 | 1555 | > ''' |
|
1554 | 1556 | > from __future__ import absolute_import |
|
1555 | 1557 | > from mercurial import commands, help |
|
1556 | 1558 | > testtopic = """This paragraph is never omitted (for topic). |
|
1557 | 1559 | > |
|
1558 | 1560 | > .. container:: verbose |
|
1559 | 1561 | > |
|
1560 | 1562 | > This paragraph is omitted, |
|
1561 | 1563 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1562 | 1564 | > |
|
1563 | 1565 | > This paragraph is never omitted, too (for topic) |
|
1564 | 1566 | > """ |
|
1565 | 1567 | > def extsetup(ui): |
|
1566 | 1568 | > help.helptable.append((["topic-containing-verbose"], |
|
1567 | 1569 | > "This is the topic to test omit indicating.", |
|
1568 | 1570 | > lambda ui: testtopic)) |
|
1569 | 1571 | > EOF |
|
1570 | 1572 | $ echo '[extensions]' >> $HGRCPATH |
|
1571 | 1573 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1572 | 1574 | $ hg help addverboseitems |
|
1573 | 1575 | addverboseitems extension - extension to test omit indicating. |
|
1574 | 1576 | |
|
1575 | 1577 | This paragraph is never omitted (for extension) |
|
1576 | 1578 | |
|
1577 | 1579 | This paragraph is never omitted, too (for extension) |
|
1578 | 1580 | |
|
1579 | 1581 | (some details hidden, use --verbose to show complete help) |
|
1580 | 1582 | |
|
1581 | 1583 | no commands defined |
|
1582 | 1584 | $ hg help -v addverboseitems |
|
1583 | 1585 | addverboseitems extension - extension to test omit indicating. |
|
1584 | 1586 | |
|
1585 | 1587 | This paragraph is never omitted (for extension) |
|
1586 | 1588 | |
|
1587 | 1589 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1588 | 1590 | extension) |
|
1589 | 1591 | |
|
1590 | 1592 | This paragraph is never omitted, too (for extension) |
|
1591 | 1593 | |
|
1592 | 1594 | no commands defined |
|
1593 | 1595 | $ hg help topic-containing-verbose |
|
1594 | 1596 | This is the topic to test omit indicating. |
|
1595 | 1597 | """""""""""""""""""""""""""""""""""""""""" |
|
1596 | 1598 | |
|
1597 | 1599 | This paragraph is never omitted (for topic). |
|
1598 | 1600 | |
|
1599 | 1601 | This paragraph is never omitted, too (for topic) |
|
1600 | 1602 | |
|
1601 | 1603 | (some details hidden, use --verbose to show complete help) |
|
1602 | 1604 | $ hg help -v topic-containing-verbose |
|
1603 | 1605 | This is the topic to test omit indicating. |
|
1604 | 1606 | """""""""""""""""""""""""""""""""""""""""" |
|
1605 | 1607 | |
|
1606 | 1608 | This paragraph is never omitted (for topic). |
|
1607 | 1609 | |
|
1608 | 1610 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1609 | 1611 | topic) |
|
1610 | 1612 | |
|
1611 | 1613 | This paragraph is never omitted, too (for topic) |
|
1612 | 1614 | |
|
1613 | 1615 | Test section lookup |
|
1614 | 1616 | |
|
1615 | 1617 | $ hg help revset.merge |
|
1616 | 1618 | "merge()" |
|
1617 | 1619 | Changeset is a merge changeset. |
|
1618 | 1620 | |
|
1619 | 1621 | $ hg help glossary.dag |
|
1620 | 1622 | DAG |
|
1621 | 1623 | The repository of changesets of a distributed version control system |
|
1622 | 1624 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1623 | 1625 | of nodes and edges, where nodes correspond to changesets and edges |
|
1624 | 1626 | imply a parent -> child relation. This graph can be visualized by |
|
1625 | 1627 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is |
|
1626 | 1628 | limited by the requirement for children to have at most two parents. |
|
1627 | 1629 | |
|
1628 | 1630 | |
|
1629 | 1631 | $ hg help hgrc.paths |
|
1630 | 1632 | "paths" |
|
1631 | 1633 | ------- |
|
1632 | 1634 | |
|
1633 | 1635 | Assigns symbolic names and behavior to repositories. |
|
1634 | 1636 | |
|
1635 | 1637 | Options are symbolic names defining the URL or directory that is the |
|
1636 | 1638 | location of the repository. Example: |
|
1637 | 1639 | |
|
1638 | 1640 | [paths] |
|
1639 | 1641 | my_server = https://example.com/my_repo |
|
1640 | 1642 | local_path = /home/me/repo |
|
1641 | 1643 | |
|
1642 | 1644 | These symbolic names can be used from the command line. To pull from |
|
1643 | 1645 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push |
|
1644 | 1646 | local_path'. |
|
1645 | 1647 | |
|
1646 | 1648 | Options containing colons (":") denote sub-options that can influence |
|
1647 | 1649 | behavior for that specific path. Example: |
|
1648 | 1650 | |
|
1649 | 1651 | [paths] |
|
1650 | 1652 | my_server = https://example.com/my_path |
|
1651 | 1653 | my_server:pushurl = ssh://example.com/my_path |
|
1652 | 1654 | |
|
1653 | 1655 | The following sub-options can be defined: |
|
1654 | 1656 | |
|
1655 | 1657 | "pushurl" |
|
1656 | 1658 | The URL to use for push operations. If not defined, the location |
|
1657 | 1659 | defined by the path's main entry is used. |
|
1658 | 1660 | |
|
1659 | 1661 | "pushrev" |
|
1660 | 1662 | A revset defining which revisions to push by default. |
|
1661 | 1663 | |
|
1662 | 1664 | When 'hg push' is executed without a "-r" argument, the revset defined |
|
1663 | 1665 | by this sub-option is evaluated to determine what to push. |
|
1664 | 1666 | |
|
1665 | 1667 | For example, a value of "." will push the working directory's revision |
|
1666 | 1668 | by default. |
|
1667 | 1669 | |
|
1668 | 1670 | Revsets specifying bookmarks will not result in the bookmark being |
|
1669 | 1671 | pushed. |
|
1670 | 1672 | |
|
1671 | 1673 | The following special named paths exist: |
|
1672 | 1674 | |
|
1673 | 1675 | "default" |
|
1674 | 1676 | The URL or directory to use when no source or remote is specified. |
|
1675 | 1677 | |
|
1676 | 1678 | 'hg clone' will automatically define this path to the location the |
|
1677 | 1679 | repository was cloned from. |
|
1678 | 1680 | |
|
1679 | 1681 | "default-push" |
|
1680 | 1682 | (deprecated) The URL or directory for the default 'hg push' location. |
|
1681 | 1683 | "default:pushurl" should be used instead. |
|
1682 | 1684 | |
|
1683 | 1685 | $ hg help glossary.mcguffin |
|
1684 | 1686 | abort: help section not found: glossary.mcguffin |
|
1685 | 1687 | [255] |
|
1686 | 1688 | |
|
1687 | 1689 | $ hg help glossary.mc.guffin |
|
1688 | 1690 | abort: help section not found: glossary.mc.guffin |
|
1689 | 1691 | [255] |
|
1690 | 1692 | |
|
1691 | 1693 | $ hg help template.files |
|
1692 | 1694 | files List of strings. All files modified, added, or removed by |
|
1693 | 1695 | this changeset. |
|
1694 | 1696 | files(pattern) |
|
1695 | 1697 | All files of the current changeset matching the pattern. See |
|
1696 | 1698 | 'hg help patterns'. |
|
1697 | 1699 | |
|
1698 | 1700 | Test section lookup by translated message |
|
1699 | 1701 | |
|
1700 | 1702 | str.lower() instead of encoding.lower(str) on translated message might |
|
1701 | 1703 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) |
|
1702 | 1704 | as the second or later byte of multi-byte character. |
|
1703 | 1705 | |
|
1704 | 1706 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) |
|
1705 | 1707 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this |
|
1706 | 1708 | replacement makes message meaningless. |
|
1707 | 1709 | |
|
1708 | 1710 | This tests that section lookup by translated string isn't broken by |
|
1709 | 1711 | such str.lower(). |
|
1710 | 1712 | |
|
1711 | 1713 | $ $PYTHON <<EOF |
|
1712 | 1714 | > def escape(s): |
|
1713 | 1715 | > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) |
|
1714 | 1716 | > # translation of "record" in ja_JP.cp932 |
|
1715 | 1717 | > upper = "\x8bL\x98^" |
|
1716 | 1718 | > # str.lower()-ed section name should be treated as different one |
|
1717 | 1719 | > lower = "\x8bl\x98^" |
|
1718 | 1720 | > with open('ambiguous.py', 'w') as fp: |
|
1719 | 1721 | > fp.write("""# ambiguous section names in ja_JP.cp932 |
|
1720 | 1722 | > u'''summary of extension |
|
1721 | 1723 | > |
|
1722 | 1724 | > %s |
|
1723 | 1725 | > ---- |
|
1724 | 1726 | > |
|
1725 | 1727 | > Upper name should show only this message |
|
1726 | 1728 | > |
|
1727 | 1729 | > %s |
|
1728 | 1730 | > ---- |
|
1729 | 1731 | > |
|
1730 | 1732 | > Lower name should show only this message |
|
1731 | 1733 | > |
|
1732 | 1734 | > subsequent section |
|
1733 | 1735 | > ------------------ |
|
1734 | 1736 | > |
|
1735 | 1737 | > This should be hidden at 'hg help ambiguous' with section name. |
|
1736 | 1738 | > ''' |
|
1737 | 1739 | > """ % (escape(upper), escape(lower))) |
|
1738 | 1740 | > EOF |
|
1739 | 1741 | |
|
1740 | 1742 | $ cat >> $HGRCPATH <<EOF |
|
1741 | 1743 | > [extensions] |
|
1742 | 1744 | > ambiguous = ./ambiguous.py |
|
1743 | 1745 | > EOF |
|
1744 | 1746 | |
|
1745 | 1747 | $ $PYTHON <<EOF | sh |
|
1746 | 1748 | > upper = "\x8bL\x98^" |
|
1747 | 1749 | > print("hg --encoding cp932 help -e ambiguous.%s" % upper) |
|
1748 | 1750 | > EOF |
|
1749 | 1751 | \x8bL\x98^ (esc) |
|
1750 | 1752 | ---- |
|
1751 | 1753 | |
|
1752 | 1754 | Upper name should show only this message |
|
1753 | 1755 | |
|
1754 | 1756 | |
|
1755 | 1757 | $ $PYTHON <<EOF | sh |
|
1756 | 1758 | > lower = "\x8bl\x98^" |
|
1757 | 1759 | > print("hg --encoding cp932 help -e ambiguous.%s" % lower) |
|
1758 | 1760 | > EOF |
|
1759 | 1761 | \x8bl\x98^ (esc) |
|
1760 | 1762 | ---- |
|
1761 | 1763 | |
|
1762 | 1764 | Lower name should show only this message |
|
1763 | 1765 | |
|
1764 | 1766 | |
|
1765 | 1767 | $ cat >> $HGRCPATH <<EOF |
|
1766 | 1768 | > [extensions] |
|
1767 | 1769 | > ambiguous = ! |
|
1768 | 1770 | > EOF |
|
1769 | 1771 | |
|
1770 | 1772 | Show help content of disabled extensions |
|
1771 | 1773 | |
|
1772 | 1774 | $ cat >> $HGRCPATH <<EOF |
|
1773 | 1775 | > [extensions] |
|
1774 | 1776 | > ambiguous = !./ambiguous.py |
|
1775 | 1777 | > EOF |
|
1776 | 1778 | $ hg help -e ambiguous |
|
1777 | 1779 | ambiguous extension - (no help text available) |
|
1778 | 1780 | |
|
1779 | 1781 | (use 'hg help extensions' for information on enabling extensions) |
|
1780 | 1782 | |
|
1781 | 1783 | Test dynamic list of merge tools only shows up once |
|
1782 | 1784 | $ hg help merge-tools |
|
1783 | 1785 | Merge Tools |
|
1784 | 1786 | """"""""""" |
|
1785 | 1787 | |
|
1786 | 1788 | To merge files Mercurial uses merge tools. |
|
1787 | 1789 | |
|
1788 | 1790 | A merge tool combines two different versions of a file into a merged file. |
|
1789 | 1791 | Merge tools are given the two files and the greatest common ancestor of |
|
1790 | 1792 | the two file versions, so they can determine the changes made on both |
|
1791 | 1793 | branches. |
|
1792 | 1794 | |
|
1793 | 1795 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg |
|
1794 | 1796 | backout' and in several extensions. |
|
1795 | 1797 | |
|
1796 | 1798 | Usually, the merge tool tries to automatically reconcile the files by |
|
1797 | 1799 | combining all non-overlapping changes that occurred separately in the two |
|
1798 | 1800 | different evolutions of the same initial base file. Furthermore, some |
|
1799 | 1801 | interactive merge programs make it easier to manually resolve conflicting |
|
1800 | 1802 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1801 | 1803 | Mercurial does not include any interactive merge programs but relies on |
|
1802 | 1804 | external tools for that. |
|
1803 | 1805 | |
|
1804 | 1806 | Available merge tools |
|
1805 | 1807 | ===================== |
|
1806 | 1808 | |
|
1807 | 1809 | External merge tools and their properties are configured in the merge- |
|
1808 | 1810 | tools configuration section - see hgrc(5) - but they can often just be |
|
1809 | 1811 | named by their executable. |
|
1810 | 1812 | |
|
1811 | 1813 | A merge tool is generally usable if its executable can be found on the |
|
1812 | 1814 | system and if it can handle the merge. The executable is found if it is an |
|
1813 | 1815 | absolute or relative executable path or the name of an application in the |
|
1814 | 1816 | executable search path. The tool is assumed to be able to handle the merge |
|
1815 | 1817 | if it can handle symlinks if the file is a symlink, if it can handle |
|
1816 | 1818 | binary files if the file is binary, and if a GUI is available if the tool |
|
1817 | 1819 | requires a GUI. |
|
1818 | 1820 | |
|
1819 | 1821 | There are some internal merge tools which can be used. The internal merge |
|
1820 | 1822 | tools are: |
|
1821 | 1823 | |
|
1822 | 1824 | ":dump" |
|
1823 | 1825 | Creates three versions of the files to merge, containing the contents of |
|
1824 | 1826 | local, other and base. These files can then be used to perform a merge |
|
1825 | 1827 | manually. If the file to be merged is named "a.txt", these files will |
|
1826 | 1828 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
1827 | 1829 | they will be placed in the same directory as "a.txt". |
|
1828 | 1830 | |
|
1829 | 1831 | This implies premerge. Therefore, files aren't dumped, if premerge runs |
|
1830 | 1832 | successfully. Use :forcedump to forcibly write files out. |
|
1831 | 1833 | |
|
1832 | 1834 | (actual capabilities: binary, symlink) |
|
1833 | 1835 | |
|
1834 | 1836 | ":fail" |
|
1835 | 1837 | Rather than attempting to merge files that were modified on both |
|
1836 | 1838 | branches, it marks them as unresolved. The resolve command must be used |
|
1837 | 1839 | to resolve these conflicts. |
|
1838 | 1840 | |
|
1839 | 1841 | (actual capabilities: binary, symlink) |
|
1840 | 1842 | |
|
1841 | 1843 | ":forcedump" |
|
1842 | 1844 | Creates three versions of the files as same as :dump, but omits |
|
1843 | 1845 | premerge. |
|
1844 | 1846 | |
|
1845 | 1847 | (actual capabilities: binary, symlink) |
|
1846 | 1848 | |
|
1847 | 1849 | ":local" |
|
1848 | 1850 | Uses the local 'p1()' version of files as the merged version. |
|
1849 | 1851 | |
|
1850 | 1852 | (actual capabilities: binary, symlink) |
|
1851 | 1853 | |
|
1852 | 1854 | ":merge" |
|
1853 | 1855 | Uses the internal non-interactive simple merge algorithm for merging |
|
1854 | 1856 | files. It will fail if there are any conflicts and leave markers in the |
|
1855 | 1857 | partially merged file. Markers will have two sections, one for each side |
|
1856 | 1858 | of merge. |
|
1857 | 1859 | |
|
1858 | 1860 | ":merge-local" |
|
1859 | 1861 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1860 | 1862 | local 'p1()' changes. |
|
1861 | 1863 | |
|
1862 | 1864 | ":merge-other" |
|
1863 | 1865 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1864 | 1866 | other 'p2()' changes. |
|
1865 | 1867 | |
|
1866 | 1868 | ":merge3" |
|
1867 | 1869 | Uses the internal non-interactive simple merge algorithm for merging |
|
1868 | 1870 | files. It will fail if there are any conflicts and leave markers in the |
|
1869 | 1871 | partially merged file. Marker will have three sections, one from each |
|
1870 | 1872 | side of the merge and one for the base content. |
|
1871 | 1873 | |
|
1872 | 1874 | ":other" |
|
1873 | 1875 | Uses the other 'p2()' version of files as the merged version. |
|
1874 | 1876 | |
|
1875 | 1877 | (actual capabilities: binary, symlink) |
|
1876 | 1878 | |
|
1877 | 1879 | ":prompt" |
|
1878 | 1880 | Asks the user which of the local 'p1()' or the other 'p2()' version to |
|
1879 | 1881 | keep as the merged version. |
|
1880 | 1882 | |
|
1881 | 1883 | (actual capabilities: binary, symlink) |
|
1882 | 1884 | |
|
1883 | 1885 | ":tagmerge" |
|
1884 | 1886 | Uses the internal tag merge algorithm (experimental). |
|
1885 | 1887 | |
|
1886 | 1888 | ":union" |
|
1887 | 1889 | Uses the internal non-interactive simple merge algorithm for merging |
|
1888 | 1890 | files. It will use both left and right sides for conflict regions. No |
|
1889 | 1891 | markers are inserted. |
|
1890 | 1892 | |
|
1891 | 1893 | Internal tools are always available and do not require a GUI but will by |
|
1892 | 1894 | default not handle symlinks or binary files. See next section for detail |
|
1893 | 1895 | about "actual capabilities" described above. |
|
1894 | 1896 | |
|
1895 | 1897 | Choosing a merge tool |
|
1896 | 1898 | ===================== |
|
1897 | 1899 | |
|
1898 | 1900 | Mercurial uses these rules when deciding which merge tool to use: |
|
1899 | 1901 | |
|
1900 | 1902 | 1. If a tool has been specified with the --tool option to merge or |
|
1901 | 1903 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
1902 | 1904 | configuration, its configuration is used. Otherwise the specified tool |
|
1903 | 1905 | must be executable by the shell. |
|
1904 | 1906 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
1905 | 1907 | must be executable by the shell. |
|
1906 | 1908 | 3. If the filename of the file to be merged matches any of the patterns in |
|
1907 | 1909 | the merge-patterns configuration section, the first usable merge tool |
|
1908 | 1910 | corresponding to a matching pattern is used. |
|
1909 | 1911 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
1910 | 1912 | name of a configured tool, the specified value is used and must be |
|
1911 | 1913 | executable by the shell. Otherwise the named tool is used if it is |
|
1912 | 1914 | usable. |
|
1913 | 1915 | 5. If any usable merge tools are present in the merge-tools configuration |
|
1914 | 1916 | section, the one with the highest priority is used. |
|
1915 | 1917 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
1916 | 1918 | but it will by default not be used for symlinks and binary files. |
|
1917 | 1919 | 7. If the file to be merged is not binary and is not a symlink, then |
|
1918 | 1920 | internal ":merge" is used. |
|
1919 | 1921 | 8. Otherwise, ":prompt" is used. |
|
1920 | 1922 | |
|
1921 | 1923 | For historical reason, Mercurial assumes capabilities of internal merge |
|
1922 | 1924 | tools as below while examining rules above, regardless of actual |
|
1923 | 1925 | capabilities of them. |
|
1924 | 1926 | |
|
1925 | 1927 | step specified via binary symlink |
|
1926 | 1928 | ---------------------------------- |
|
1927 | 1929 | 1. --tool o o |
|
1928 | 1930 | 2. HGMERGE o o |
|
1929 | 1931 | 3. merge-patterns o (*) x (*) |
|
1930 | 1932 | 4. ui.merge x (*) x (*) |
|
1931 | 1933 | |
|
1932 | 1934 | If "merge.strict-capability-check" configuration is true, Mercurial checks |
|
1933 | 1935 | capabilities of internal merge tools strictly in (*) cases above. It is |
|
1934 | 1936 | false by default for backward compatibility. |
|
1935 | 1937 | |
|
1936 | 1938 | Note: |
|
1937 | 1939 | After selecting a merge program, Mercurial will by default attempt to |
|
1938 | 1940 | merge the files using a simple merge algorithm first. Only if it |
|
1939 | 1941 | doesn't succeed because of conflicting changes will Mercurial actually |
|
1940 | 1942 | execute the merge program. Whether to use the simple merge algorithm |
|
1941 | 1943 | first can be controlled by the premerge setting of the merge tool. |
|
1942 | 1944 | Premerge is enabled by default unless the file is binary or a symlink. |
|
1943 | 1945 | |
|
1944 | 1946 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
1945 | 1947 | configuration of merge tools. |
|
1946 | 1948 | |
|
1947 | 1949 | Compression engines listed in `hg help bundlespec` |
|
1948 | 1950 | |
|
1949 | 1951 | $ hg help bundlespec | grep gzip |
|
1950 | 1952 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression |
|
1951 | 1953 | An algorithm that produces smaller bundles than "gzip". |
|
1952 | 1954 | This engine will likely produce smaller bundles than "gzip" but will be |
|
1953 | 1955 | "gzip" |
|
1954 | 1956 | better compression than "gzip". It also frequently yields better (?) |
|
1955 | 1957 | |
|
1956 | 1958 | Test usage of section marks in help documents |
|
1957 | 1959 | |
|
1958 | 1960 | $ cd "$TESTDIR"/../doc |
|
1959 | 1961 | $ $PYTHON check-seclevel.py |
|
1960 | 1962 | $ cd $TESTTMP |
|
1961 | 1963 | |
|
1962 | 1964 | #if serve |
|
1963 | 1965 | |
|
1964 | 1966 | Test the help pages in hgweb. |
|
1965 | 1967 | |
|
1966 | 1968 | Dish up an empty repo; serve it cold. |
|
1967 | 1969 | |
|
1968 | 1970 | $ hg init "$TESTTMP/test" |
|
1969 | 1971 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
1970 | 1972 | $ cat hg.pid >> $DAEMON_PIDS |
|
1971 | 1973 | |
|
1972 | 1974 | $ get-with-headers.py $LOCALIP:$HGPORT "help" |
|
1973 | 1975 | 200 Script output follows |
|
1974 | 1976 | |
|
1975 | 1977 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1976 | 1978 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1977 | 1979 | <head> |
|
1978 | 1980 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1979 | 1981 | <meta name="robots" content="index, nofollow" /> |
|
1980 | 1982 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1981 | 1983 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1982 | 1984 | |
|
1983 | 1985 | <title>Help: Index</title> |
|
1984 | 1986 | </head> |
|
1985 | 1987 | <body> |
|
1986 | 1988 | |
|
1987 | 1989 | <div class="container"> |
|
1988 | 1990 | <div class="menu"> |
|
1989 | 1991 | <div class="logo"> |
|
1990 | 1992 | <a href="https://mercurial-scm.org/"> |
|
1991 | 1993 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1992 | 1994 | </div> |
|
1993 | 1995 | <ul> |
|
1994 | 1996 | <li><a href="/shortlog">log</a></li> |
|
1995 | 1997 | <li><a href="/graph">graph</a></li> |
|
1996 | 1998 | <li><a href="/tags">tags</a></li> |
|
1997 | 1999 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1998 | 2000 | <li><a href="/branches">branches</a></li> |
|
1999 | 2001 | </ul> |
|
2000 | 2002 | <ul> |
|
2001 | 2003 | <li class="active">help</li> |
|
2002 | 2004 | </ul> |
|
2003 | 2005 | </div> |
|
2004 | 2006 | |
|
2005 | 2007 | <div class="main"> |
|
2006 | 2008 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2007 | 2009 | |
|
2008 | 2010 | <form class="search" action="/log"> |
|
2009 | 2011 | |
|
2010 | 2012 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2011 | 2013 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2012 | 2014 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2013 | 2015 | </form> |
|
2014 | 2016 | <table class="bigtable"> |
|
2015 | 2017 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
2016 | 2018 | |
|
2017 | 2019 | <tr><td> |
|
2018 | 2020 | <a href="/help/bundlespec"> |
|
2019 | 2021 | bundlespec |
|
2020 | 2022 | </a> |
|
2021 | 2023 | </td><td> |
|
2022 | 2024 | Bundle File Formats |
|
2023 | 2025 | </td></tr> |
|
2024 | 2026 | <tr><td> |
|
2025 | 2027 | <a href="/help/color"> |
|
2026 | 2028 | color |
|
2027 | 2029 | </a> |
|
2028 | 2030 | </td><td> |
|
2029 | 2031 | Colorizing Outputs |
|
2030 | 2032 | </td></tr> |
|
2031 | 2033 | <tr><td> |
|
2032 | 2034 | <a href="/help/config"> |
|
2033 | 2035 | config |
|
2034 | 2036 | </a> |
|
2035 | 2037 | </td><td> |
|
2036 | 2038 | Configuration Files |
|
2037 | 2039 | </td></tr> |
|
2038 | 2040 | <tr><td> |
|
2039 | 2041 | <a href="/help/dates"> |
|
2040 | 2042 | dates |
|
2041 | 2043 | </a> |
|
2042 | 2044 | </td><td> |
|
2043 | 2045 | Date Formats |
|
2044 | 2046 | </td></tr> |
|
2045 | 2047 | <tr><td> |
|
2046 | 2048 | <a href="/help/deprecated"> |
|
2047 | 2049 | deprecated |
|
2048 | 2050 | </a> |
|
2049 | 2051 | </td><td> |
|
2050 | 2052 | Deprecated Features |
|
2051 | 2053 | </td></tr> |
|
2052 | 2054 | <tr><td> |
|
2053 | 2055 | <a href="/help/diffs"> |
|
2054 | 2056 | diffs |
|
2055 | 2057 | </a> |
|
2056 | 2058 | </td><td> |
|
2057 | 2059 | Diff Formats |
|
2058 | 2060 | </td></tr> |
|
2059 | 2061 | <tr><td> |
|
2060 | 2062 | <a href="/help/environment"> |
|
2061 | 2063 | environment |
|
2062 | 2064 | </a> |
|
2063 | 2065 | </td><td> |
|
2064 | 2066 | Environment Variables |
|
2065 | 2067 | </td></tr> |
|
2066 | 2068 | <tr><td> |
|
2067 | 2069 | <a href="/help/extensions"> |
|
2068 | 2070 | extensions |
|
2069 | 2071 | </a> |
|
2070 | 2072 | </td><td> |
|
2071 | 2073 | Using Additional Features |
|
2072 | 2074 | </td></tr> |
|
2073 | 2075 | <tr><td> |
|
2074 | 2076 | <a href="/help/filesets"> |
|
2075 | 2077 | filesets |
|
2076 | 2078 | </a> |
|
2077 | 2079 | </td><td> |
|
2078 | 2080 | Specifying File Sets |
|
2079 | 2081 | </td></tr> |
|
2080 | 2082 | <tr><td> |
|
2081 | 2083 | <a href="/help/flags"> |
|
2082 | 2084 | flags |
|
2083 | 2085 | </a> |
|
2084 | 2086 | </td><td> |
|
2085 | 2087 | Command-line flags |
|
2086 | 2088 | </td></tr> |
|
2087 | 2089 | <tr><td> |
|
2088 | 2090 | <a href="/help/glossary"> |
|
2089 | 2091 | glossary |
|
2090 | 2092 | </a> |
|
2091 | 2093 | </td><td> |
|
2092 | 2094 | Glossary |
|
2093 | 2095 | </td></tr> |
|
2094 | 2096 | <tr><td> |
|
2095 | 2097 | <a href="/help/hgignore"> |
|
2096 | 2098 | hgignore |
|
2097 | 2099 | </a> |
|
2098 | 2100 | </td><td> |
|
2099 | 2101 | Syntax for Mercurial Ignore Files |
|
2100 | 2102 | </td></tr> |
|
2101 | 2103 | <tr><td> |
|
2102 | 2104 | <a href="/help/hgweb"> |
|
2103 | 2105 | hgweb |
|
2104 | 2106 | </a> |
|
2105 | 2107 | </td><td> |
|
2106 | 2108 | Configuring hgweb |
|
2107 | 2109 | </td></tr> |
|
2108 | 2110 | <tr><td> |
|
2109 | 2111 | <a href="/help/internals"> |
|
2110 | 2112 | internals |
|
2111 | 2113 | </a> |
|
2112 | 2114 | </td><td> |
|
2113 | 2115 | Technical implementation topics |
|
2114 | 2116 | </td></tr> |
|
2115 | 2117 | <tr><td> |
|
2116 | 2118 | <a href="/help/merge-tools"> |
|
2117 | 2119 | merge-tools |
|
2118 | 2120 | </a> |
|
2119 | 2121 | </td><td> |
|
2120 | 2122 | Merge Tools |
|
2121 | 2123 | </td></tr> |
|
2122 | 2124 | <tr><td> |
|
2123 | 2125 | <a href="/help/pager"> |
|
2124 | 2126 | pager |
|
2125 | 2127 | </a> |
|
2126 | 2128 | </td><td> |
|
2127 | 2129 | Pager Support |
|
2128 | 2130 | </td></tr> |
|
2129 | 2131 | <tr><td> |
|
2130 | 2132 | <a href="/help/patterns"> |
|
2131 | 2133 | patterns |
|
2132 | 2134 | </a> |
|
2133 | 2135 | </td><td> |
|
2134 | 2136 | File Name Patterns |
|
2135 | 2137 | </td></tr> |
|
2136 | 2138 | <tr><td> |
|
2137 | 2139 | <a href="/help/phases"> |
|
2138 | 2140 | phases |
|
2139 | 2141 | </a> |
|
2140 | 2142 | </td><td> |
|
2141 | 2143 | Working with Phases |
|
2142 | 2144 | </td></tr> |
|
2143 | 2145 | <tr><td> |
|
2144 | 2146 | <a href="/help/revisions"> |
|
2145 | 2147 | revisions |
|
2146 | 2148 | </a> |
|
2147 | 2149 | </td><td> |
|
2148 | 2150 | Specifying Revisions |
|
2149 | 2151 | </td></tr> |
|
2150 | 2152 | <tr><td> |
|
2151 | 2153 | <a href="/help/scripting"> |
|
2152 | 2154 | scripting |
|
2153 | 2155 | </a> |
|
2154 | 2156 | </td><td> |
|
2155 | 2157 | Using Mercurial from scripts and automation |
|
2156 | 2158 | </td></tr> |
|
2157 | 2159 | <tr><td> |
|
2158 | 2160 | <a href="/help/subrepos"> |
|
2159 | 2161 | subrepos |
|
2160 | 2162 | </a> |
|
2161 | 2163 | </td><td> |
|
2162 | 2164 | Subrepositories |
|
2163 | 2165 | </td></tr> |
|
2164 | 2166 | <tr><td> |
|
2165 | 2167 | <a href="/help/templating"> |
|
2166 | 2168 | templating |
|
2167 | 2169 | </a> |
|
2168 | 2170 | </td><td> |
|
2169 | 2171 | Template Usage |
|
2170 | 2172 | </td></tr> |
|
2171 | 2173 | <tr><td> |
|
2172 | 2174 | <a href="/help/urls"> |
|
2173 | 2175 | urls |
|
2174 | 2176 | </a> |
|
2175 | 2177 | </td><td> |
|
2176 | 2178 | URL Paths |
|
2177 | 2179 | </td></tr> |
|
2178 | 2180 | <tr><td> |
|
2179 | 2181 | <a href="/help/topic-containing-verbose"> |
|
2180 | 2182 | topic-containing-verbose |
|
2181 | 2183 | </a> |
|
2182 | 2184 | </td><td> |
|
2183 | 2185 | This is the topic to test omit indicating. |
|
2184 | 2186 | </td></tr> |
|
2185 | 2187 | |
|
2186 | 2188 | |
|
2187 | 2189 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
2188 | 2190 | |
|
2189 | 2191 | <tr><td> |
|
2190 | 2192 | <a href="/help/add"> |
|
2191 | 2193 | add |
|
2192 | 2194 | </a> |
|
2193 | 2195 | </td><td> |
|
2194 | 2196 | add the specified files on the next commit |
|
2195 | 2197 | </td></tr> |
|
2196 | 2198 | <tr><td> |
|
2197 | 2199 | <a href="/help/annotate"> |
|
2198 | 2200 | annotate |
|
2199 | 2201 | </a> |
|
2200 | 2202 | </td><td> |
|
2201 | 2203 | show changeset information by line for each file |
|
2202 | 2204 | </td></tr> |
|
2203 | 2205 | <tr><td> |
|
2204 | 2206 | <a href="/help/clone"> |
|
2205 | 2207 | clone |
|
2206 | 2208 | </a> |
|
2207 | 2209 | </td><td> |
|
2208 | 2210 | make a copy of an existing repository |
|
2209 | 2211 | </td></tr> |
|
2210 | 2212 | <tr><td> |
|
2211 | 2213 | <a href="/help/commit"> |
|
2212 | 2214 | commit |
|
2213 | 2215 | </a> |
|
2214 | 2216 | </td><td> |
|
2215 | 2217 | commit the specified files or all outstanding changes |
|
2216 | 2218 | </td></tr> |
|
2217 | 2219 | <tr><td> |
|
2218 | 2220 | <a href="/help/diff"> |
|
2219 | 2221 | diff |
|
2220 | 2222 | </a> |
|
2221 | 2223 | </td><td> |
|
2222 | 2224 | diff repository (or selected files) |
|
2223 | 2225 | </td></tr> |
|
2224 | 2226 | <tr><td> |
|
2225 | 2227 | <a href="/help/export"> |
|
2226 | 2228 | export |
|
2227 | 2229 | </a> |
|
2228 | 2230 | </td><td> |
|
2229 | 2231 | dump the header and diffs for one or more changesets |
|
2230 | 2232 | </td></tr> |
|
2231 | 2233 | <tr><td> |
|
2232 | 2234 | <a href="/help/forget"> |
|
2233 | 2235 | forget |
|
2234 | 2236 | </a> |
|
2235 | 2237 | </td><td> |
|
2236 | 2238 | forget the specified files on the next commit |
|
2237 | 2239 | </td></tr> |
|
2238 | 2240 | <tr><td> |
|
2239 | 2241 | <a href="/help/init"> |
|
2240 | 2242 | init |
|
2241 | 2243 | </a> |
|
2242 | 2244 | </td><td> |
|
2243 | 2245 | create a new repository in the given directory |
|
2244 | 2246 | </td></tr> |
|
2245 | 2247 | <tr><td> |
|
2246 | 2248 | <a href="/help/log"> |
|
2247 | 2249 | log |
|
2248 | 2250 | </a> |
|
2249 | 2251 | </td><td> |
|
2250 | 2252 | show revision history of entire repository or files |
|
2251 | 2253 | </td></tr> |
|
2252 | 2254 | <tr><td> |
|
2253 | 2255 | <a href="/help/merge"> |
|
2254 | 2256 | merge |
|
2255 | 2257 | </a> |
|
2256 | 2258 | </td><td> |
|
2257 | 2259 | merge another revision into working directory |
|
2258 | 2260 | </td></tr> |
|
2259 | 2261 | <tr><td> |
|
2260 | 2262 | <a href="/help/pull"> |
|
2261 | 2263 | pull |
|
2262 | 2264 | </a> |
|
2263 | 2265 | </td><td> |
|
2264 | 2266 | pull changes from the specified source |
|
2265 | 2267 | </td></tr> |
|
2266 | 2268 | <tr><td> |
|
2267 | 2269 | <a href="/help/push"> |
|
2268 | 2270 | push |
|
2269 | 2271 | </a> |
|
2270 | 2272 | </td><td> |
|
2271 | 2273 | push changes to the specified destination |
|
2272 | 2274 | </td></tr> |
|
2273 | 2275 | <tr><td> |
|
2274 | 2276 | <a href="/help/remove"> |
|
2275 | 2277 | remove |
|
2276 | 2278 | </a> |
|
2277 | 2279 | </td><td> |
|
2278 | 2280 | remove the specified files on the next commit |
|
2279 | 2281 | </td></tr> |
|
2280 | 2282 | <tr><td> |
|
2281 | 2283 | <a href="/help/serve"> |
|
2282 | 2284 | serve |
|
2283 | 2285 | </a> |
|
2284 | 2286 | </td><td> |
|
2285 | 2287 | start stand-alone webserver |
|
2286 | 2288 | </td></tr> |
|
2287 | 2289 | <tr><td> |
|
2288 | 2290 | <a href="/help/status"> |
|
2289 | 2291 | status |
|
2290 | 2292 | </a> |
|
2291 | 2293 | </td><td> |
|
2292 | 2294 | show changed files in the working directory |
|
2293 | 2295 | </td></tr> |
|
2294 | 2296 | <tr><td> |
|
2295 | 2297 | <a href="/help/summary"> |
|
2296 | 2298 | summary |
|
2297 | 2299 | </a> |
|
2298 | 2300 | </td><td> |
|
2299 | 2301 | summarize working directory state |
|
2300 | 2302 | </td></tr> |
|
2301 | 2303 | <tr><td> |
|
2302 | 2304 | <a href="/help/update"> |
|
2303 | 2305 | update |
|
2304 | 2306 | </a> |
|
2305 | 2307 | </td><td> |
|
2306 | 2308 | update working directory (or switch revisions) |
|
2307 | 2309 | </td></tr> |
|
2308 | 2310 | |
|
2309 | 2311 | |
|
2310 | 2312 | |
|
2311 | 2313 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
2312 | 2314 | |
|
2313 | 2315 | <tr><td> |
|
2314 | 2316 | <a href="/help/addremove"> |
|
2315 | 2317 | addremove |
|
2316 | 2318 | </a> |
|
2317 | 2319 | </td><td> |
|
2318 | 2320 | add all new files, delete all missing files |
|
2319 | 2321 | </td></tr> |
|
2320 | 2322 | <tr><td> |
|
2321 | 2323 | <a href="/help/archive"> |
|
2322 | 2324 | archive |
|
2323 | 2325 | </a> |
|
2324 | 2326 | </td><td> |
|
2325 | 2327 | create an unversioned archive of a repository revision |
|
2326 | 2328 | </td></tr> |
|
2327 | 2329 | <tr><td> |
|
2328 | 2330 | <a href="/help/backout"> |
|
2329 | 2331 | backout |
|
2330 | 2332 | </a> |
|
2331 | 2333 | </td><td> |
|
2332 | 2334 | reverse effect of earlier changeset |
|
2333 | 2335 | </td></tr> |
|
2334 | 2336 | <tr><td> |
|
2335 | 2337 | <a href="/help/bisect"> |
|
2336 | 2338 | bisect |
|
2337 | 2339 | </a> |
|
2338 | 2340 | </td><td> |
|
2339 | 2341 | subdivision search of changesets |
|
2340 | 2342 | </td></tr> |
|
2341 | 2343 | <tr><td> |
|
2342 | 2344 | <a href="/help/bookmarks"> |
|
2343 | 2345 | bookmarks |
|
2344 | 2346 | </a> |
|
2345 | 2347 | </td><td> |
|
2346 | 2348 | create a new bookmark or list existing bookmarks |
|
2347 | 2349 | </td></tr> |
|
2348 | 2350 | <tr><td> |
|
2349 | 2351 | <a href="/help/branch"> |
|
2350 | 2352 | branch |
|
2351 | 2353 | </a> |
|
2352 | 2354 | </td><td> |
|
2353 | 2355 | set or show the current branch name |
|
2354 | 2356 | </td></tr> |
|
2355 | 2357 | <tr><td> |
|
2356 | 2358 | <a href="/help/branches"> |
|
2357 | 2359 | branches |
|
2358 | 2360 | </a> |
|
2359 | 2361 | </td><td> |
|
2360 | 2362 | list repository named branches |
|
2361 | 2363 | </td></tr> |
|
2362 | 2364 | <tr><td> |
|
2363 | 2365 | <a href="/help/bundle"> |
|
2364 | 2366 | bundle |
|
2365 | 2367 | </a> |
|
2366 | 2368 | </td><td> |
|
2367 | 2369 | create a bundle file |
|
2368 | 2370 | </td></tr> |
|
2369 | 2371 | <tr><td> |
|
2370 | 2372 | <a href="/help/cat"> |
|
2371 | 2373 | cat |
|
2372 | 2374 | </a> |
|
2373 | 2375 | </td><td> |
|
2374 | 2376 | output the current or given revision of files |
|
2375 | 2377 | </td></tr> |
|
2376 | 2378 | <tr><td> |
|
2377 | 2379 | <a href="/help/config"> |
|
2378 | 2380 | config |
|
2379 | 2381 | </a> |
|
2380 | 2382 | </td><td> |
|
2381 | 2383 | show combined config settings from all hgrc files |
|
2382 | 2384 | </td></tr> |
|
2383 | 2385 | <tr><td> |
|
2384 | 2386 | <a href="/help/copy"> |
|
2385 | 2387 | copy |
|
2386 | 2388 | </a> |
|
2387 | 2389 | </td><td> |
|
2388 | 2390 | mark files as copied for the next commit |
|
2389 | 2391 | </td></tr> |
|
2390 | 2392 | <tr><td> |
|
2391 | 2393 | <a href="/help/files"> |
|
2392 | 2394 | files |
|
2393 | 2395 | </a> |
|
2394 | 2396 | </td><td> |
|
2395 | 2397 | list tracked files |
|
2396 | 2398 | </td></tr> |
|
2397 | 2399 | <tr><td> |
|
2398 | 2400 | <a href="/help/graft"> |
|
2399 | 2401 | graft |
|
2400 | 2402 | </a> |
|
2401 | 2403 | </td><td> |
|
2402 | 2404 | copy changes from other branches onto the current branch |
|
2403 | 2405 | </td></tr> |
|
2404 | 2406 | <tr><td> |
|
2405 | 2407 | <a href="/help/grep"> |
|
2406 | 2408 | grep |
|
2407 | 2409 | </a> |
|
2408 | 2410 | </td><td> |
|
2409 | 2411 | search revision history for a pattern in specified files |
|
2410 | 2412 | </td></tr> |
|
2411 | 2413 | <tr><td> |
|
2412 | 2414 | <a href="/help/heads"> |
|
2413 | 2415 | heads |
|
2414 | 2416 | </a> |
|
2415 | 2417 | </td><td> |
|
2416 | 2418 | show branch heads |
|
2417 | 2419 | </td></tr> |
|
2418 | 2420 | <tr><td> |
|
2419 | 2421 | <a href="/help/help"> |
|
2420 | 2422 | help |
|
2421 | 2423 | </a> |
|
2422 | 2424 | </td><td> |
|
2423 | 2425 | show help for a given topic or a help overview |
|
2424 | 2426 | </td></tr> |
|
2425 | 2427 | <tr><td> |
|
2426 | 2428 | <a href="/help/hgalias"> |
|
2427 | 2429 | hgalias |
|
2428 | 2430 | </a> |
|
2429 | 2431 | </td><td> |
|
2430 | 2432 | summarize working directory state |
|
2431 | 2433 | </td></tr> |
|
2432 | 2434 | <tr><td> |
|
2433 | 2435 | <a href="/help/identify"> |
|
2434 | 2436 | identify |
|
2435 | 2437 | </a> |
|
2436 | 2438 | </td><td> |
|
2437 | 2439 | identify the working directory or specified revision |
|
2438 | 2440 | </td></tr> |
|
2439 | 2441 | <tr><td> |
|
2440 | 2442 | <a href="/help/import"> |
|
2441 | 2443 | import |
|
2442 | 2444 | </a> |
|
2443 | 2445 | </td><td> |
|
2444 | 2446 | import an ordered set of patches |
|
2445 | 2447 | </td></tr> |
|
2446 | 2448 | <tr><td> |
|
2447 | 2449 | <a href="/help/incoming"> |
|
2448 | 2450 | incoming |
|
2449 | 2451 | </a> |
|
2450 | 2452 | </td><td> |
|
2451 | 2453 | show new changesets found in source |
|
2452 | 2454 | </td></tr> |
|
2453 | 2455 | <tr><td> |
|
2454 | 2456 | <a href="/help/manifest"> |
|
2455 | 2457 | manifest |
|
2456 | 2458 | </a> |
|
2457 | 2459 | </td><td> |
|
2458 | 2460 | output the current or given revision of the project manifest |
|
2459 | 2461 | </td></tr> |
|
2460 | 2462 | <tr><td> |
|
2461 | 2463 | <a href="/help/nohelp"> |
|
2462 | 2464 | nohelp |
|
2463 | 2465 | </a> |
|
2464 | 2466 | </td><td> |
|
2465 | 2467 | (no help text available) |
|
2466 | 2468 | </td></tr> |
|
2467 | 2469 | <tr><td> |
|
2468 | 2470 | <a href="/help/outgoing"> |
|
2469 | 2471 | outgoing |
|
2470 | 2472 | </a> |
|
2471 | 2473 | </td><td> |
|
2472 | 2474 | show changesets not found in the destination |
|
2473 | 2475 | </td></tr> |
|
2474 | 2476 | <tr><td> |
|
2475 | 2477 | <a href="/help/paths"> |
|
2476 | 2478 | paths |
|
2477 | 2479 | </a> |
|
2478 | 2480 | </td><td> |
|
2479 | 2481 | show aliases for remote repositories |
|
2480 | 2482 | </td></tr> |
|
2481 | 2483 | <tr><td> |
|
2482 | 2484 | <a href="/help/phase"> |
|
2483 | 2485 | phase |
|
2484 | 2486 | </a> |
|
2485 | 2487 | </td><td> |
|
2486 | 2488 | set or show the current phase name |
|
2487 | 2489 | </td></tr> |
|
2488 | 2490 | <tr><td> |
|
2489 | 2491 | <a href="/help/recover"> |
|
2490 | 2492 | recover |
|
2491 | 2493 | </a> |
|
2492 | 2494 | </td><td> |
|
2493 | 2495 | roll back an interrupted transaction |
|
2494 | 2496 | </td></tr> |
|
2495 | 2497 | <tr><td> |
|
2496 | 2498 | <a href="/help/rename"> |
|
2497 | 2499 | rename |
|
2498 | 2500 | </a> |
|
2499 | 2501 | </td><td> |
|
2500 | 2502 | rename files; equivalent of copy + remove |
|
2501 | 2503 | </td></tr> |
|
2502 | 2504 | <tr><td> |
|
2503 | 2505 | <a href="/help/resolve"> |
|
2504 | 2506 | resolve |
|
2505 | 2507 | </a> |
|
2506 | 2508 | </td><td> |
|
2507 | 2509 | redo merges or set/view the merge status of files |
|
2508 | 2510 | </td></tr> |
|
2509 | 2511 | <tr><td> |
|
2510 | 2512 | <a href="/help/revert"> |
|
2511 | 2513 | revert |
|
2512 | 2514 | </a> |
|
2513 | 2515 | </td><td> |
|
2514 | 2516 | restore files to their checkout state |
|
2515 | 2517 | </td></tr> |
|
2516 | 2518 | <tr><td> |
|
2517 | 2519 | <a href="/help/root"> |
|
2518 | 2520 | root |
|
2519 | 2521 | </a> |
|
2520 | 2522 | </td><td> |
|
2521 | 2523 | print the root (top) of the current working directory |
|
2522 | 2524 | </td></tr> |
|
2523 | 2525 | <tr><td> |
|
2524 | 2526 | <a href="/help/shellalias"> |
|
2525 | 2527 | shellalias |
|
2526 | 2528 | </a> |
|
2527 | 2529 | </td><td> |
|
2528 | 2530 | (no help text available) |
|
2529 | 2531 | </td></tr> |
|
2530 | 2532 | <tr><td> |
|
2531 | 2533 | <a href="/help/tag"> |
|
2532 | 2534 | tag |
|
2533 | 2535 | </a> |
|
2534 | 2536 | </td><td> |
|
2535 | 2537 | add one or more tags for the current or given revision |
|
2536 | 2538 | </td></tr> |
|
2537 | 2539 | <tr><td> |
|
2538 | 2540 | <a href="/help/tags"> |
|
2539 | 2541 | tags |
|
2540 | 2542 | </a> |
|
2541 | 2543 | </td><td> |
|
2542 | 2544 | list repository tags |
|
2543 | 2545 | </td></tr> |
|
2544 | 2546 | <tr><td> |
|
2545 | 2547 | <a href="/help/unbundle"> |
|
2546 | 2548 | unbundle |
|
2547 | 2549 | </a> |
|
2548 | 2550 | </td><td> |
|
2549 | 2551 | apply one or more bundle files |
|
2550 | 2552 | </td></tr> |
|
2551 | 2553 | <tr><td> |
|
2552 | 2554 | <a href="/help/verify"> |
|
2553 | 2555 | verify |
|
2554 | 2556 | </a> |
|
2555 | 2557 | </td><td> |
|
2556 | 2558 | verify the integrity of the repository |
|
2557 | 2559 | </td></tr> |
|
2558 | 2560 | <tr><td> |
|
2559 | 2561 | <a href="/help/version"> |
|
2560 | 2562 | version |
|
2561 | 2563 | </a> |
|
2562 | 2564 | </td><td> |
|
2563 | 2565 | output version and copyright information |
|
2564 | 2566 | </td></tr> |
|
2565 | 2567 | |
|
2566 | 2568 | |
|
2567 | 2569 | </table> |
|
2568 | 2570 | </div> |
|
2569 | 2571 | </div> |
|
2570 | 2572 | |
|
2571 | 2573 | |
|
2572 | 2574 | |
|
2573 | 2575 | </body> |
|
2574 | 2576 | </html> |
|
2575 | 2577 | |
|
2576 | 2578 | |
|
2577 | 2579 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" |
|
2578 | 2580 | 200 Script output follows |
|
2579 | 2581 | |
|
2580 | 2582 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2581 | 2583 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2582 | 2584 | <head> |
|
2583 | 2585 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2584 | 2586 | <meta name="robots" content="index, nofollow" /> |
|
2585 | 2587 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2586 | 2588 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2587 | 2589 | |
|
2588 | 2590 | <title>Help: add</title> |
|
2589 | 2591 | </head> |
|
2590 | 2592 | <body> |
|
2591 | 2593 | |
|
2592 | 2594 | <div class="container"> |
|
2593 | 2595 | <div class="menu"> |
|
2594 | 2596 | <div class="logo"> |
|
2595 | 2597 | <a href="https://mercurial-scm.org/"> |
|
2596 | 2598 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2597 | 2599 | </div> |
|
2598 | 2600 | <ul> |
|
2599 | 2601 | <li><a href="/shortlog">log</a></li> |
|
2600 | 2602 | <li><a href="/graph">graph</a></li> |
|
2601 | 2603 | <li><a href="/tags">tags</a></li> |
|
2602 | 2604 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2603 | 2605 | <li><a href="/branches">branches</a></li> |
|
2604 | 2606 | </ul> |
|
2605 | 2607 | <ul> |
|
2606 | 2608 | <li class="active"><a href="/help">help</a></li> |
|
2607 | 2609 | </ul> |
|
2608 | 2610 | </div> |
|
2609 | 2611 | |
|
2610 | 2612 | <div class="main"> |
|
2611 | 2613 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2612 | 2614 | <h3>Help: add</h3> |
|
2613 | 2615 | |
|
2614 | 2616 | <form class="search" action="/log"> |
|
2615 | 2617 | |
|
2616 | 2618 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2617 | 2619 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2618 | 2620 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2619 | 2621 | </form> |
|
2620 | 2622 | <div id="doc"> |
|
2621 | 2623 | <p> |
|
2622 | 2624 | hg add [OPTION]... [FILE]... |
|
2623 | 2625 | </p> |
|
2624 | 2626 | <p> |
|
2625 | 2627 | add the specified files on the next commit |
|
2626 | 2628 | </p> |
|
2627 | 2629 | <p> |
|
2628 | 2630 | Schedule files to be version controlled and added to the |
|
2629 | 2631 | repository. |
|
2630 | 2632 | </p> |
|
2631 | 2633 | <p> |
|
2632 | 2634 | The files will be added to the repository at the next commit. To |
|
2633 | 2635 | undo an add before that, see 'hg forget'. |
|
2634 | 2636 | </p> |
|
2635 | 2637 | <p> |
|
2636 | 2638 | If no names are given, add all files to the repository (except |
|
2637 | 2639 | files matching ".hgignore"). |
|
2638 | 2640 | </p> |
|
2639 | 2641 | <p> |
|
2640 | 2642 | Examples: |
|
2641 | 2643 | </p> |
|
2642 | 2644 | <ul> |
|
2643 | 2645 | <li> New (unknown) files are added automatically by 'hg add': |
|
2644 | 2646 | <pre> |
|
2645 | 2647 | \$ ls (re) |
|
2646 | 2648 | foo.c |
|
2647 | 2649 | \$ hg status (re) |
|
2648 | 2650 | ? foo.c |
|
2649 | 2651 | \$ hg add (re) |
|
2650 | 2652 | adding foo.c |
|
2651 | 2653 | \$ hg status (re) |
|
2652 | 2654 | A foo.c |
|
2653 | 2655 | </pre> |
|
2654 | 2656 | <li> Specific files to be added can be specified: |
|
2655 | 2657 | <pre> |
|
2656 | 2658 | \$ ls (re) |
|
2657 | 2659 | bar.c foo.c |
|
2658 | 2660 | \$ hg status (re) |
|
2659 | 2661 | ? bar.c |
|
2660 | 2662 | ? foo.c |
|
2661 | 2663 | \$ hg add bar.c (re) |
|
2662 | 2664 | \$ hg status (re) |
|
2663 | 2665 | A bar.c |
|
2664 | 2666 | ? foo.c |
|
2665 | 2667 | </pre> |
|
2666 | 2668 | </ul> |
|
2667 | 2669 | <p> |
|
2668 | 2670 | Returns 0 if all files are successfully added. |
|
2669 | 2671 | </p> |
|
2670 | 2672 | <p> |
|
2671 | 2673 | options ([+] can be repeated): |
|
2672 | 2674 | </p> |
|
2673 | 2675 | <table> |
|
2674 | 2676 | <tr><td>-I</td> |
|
2675 | 2677 | <td>--include PATTERN [+]</td> |
|
2676 | 2678 | <td>include names matching the given patterns</td></tr> |
|
2677 | 2679 | <tr><td>-X</td> |
|
2678 | 2680 | <td>--exclude PATTERN [+]</td> |
|
2679 | 2681 | <td>exclude names matching the given patterns</td></tr> |
|
2680 | 2682 | <tr><td>-S</td> |
|
2681 | 2683 | <td>--subrepos</td> |
|
2682 | 2684 | <td>recurse into subrepositories</td></tr> |
|
2683 | 2685 | <tr><td>-n</td> |
|
2684 | 2686 | <td>--dry-run</td> |
|
2685 | 2687 | <td>do not perform actions, just print output</td></tr> |
|
2686 | 2688 | </table> |
|
2687 | 2689 | <p> |
|
2688 | 2690 | global options ([+] can be repeated): |
|
2689 | 2691 | </p> |
|
2690 | 2692 | <table> |
|
2691 | 2693 | <tr><td>-R</td> |
|
2692 | 2694 | <td>--repository REPO</td> |
|
2693 | 2695 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2694 | 2696 | <tr><td></td> |
|
2695 | 2697 | <td>--cwd DIR</td> |
|
2696 | 2698 | <td>change working directory</td></tr> |
|
2697 | 2699 | <tr><td>-y</td> |
|
2698 | 2700 | <td>--noninteractive</td> |
|
2699 | 2701 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2700 | 2702 | <tr><td>-q</td> |
|
2701 | 2703 | <td>--quiet</td> |
|
2702 | 2704 | <td>suppress output</td></tr> |
|
2703 | 2705 | <tr><td>-v</td> |
|
2704 | 2706 | <td>--verbose</td> |
|
2705 | 2707 | <td>enable additional output</td></tr> |
|
2706 | 2708 | <tr><td></td> |
|
2707 | 2709 | <td>--color TYPE</td> |
|
2708 | 2710 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2709 | 2711 | <tr><td></td> |
|
2710 | 2712 | <td>--config CONFIG [+]</td> |
|
2711 | 2713 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2712 | 2714 | <tr><td></td> |
|
2713 | 2715 | <td>--debug</td> |
|
2714 | 2716 | <td>enable debugging output</td></tr> |
|
2715 | 2717 | <tr><td></td> |
|
2716 | 2718 | <td>--debugger</td> |
|
2717 | 2719 | <td>start debugger</td></tr> |
|
2718 | 2720 | <tr><td></td> |
|
2719 | 2721 | <td>--encoding ENCODE</td> |
|
2720 | 2722 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2721 | 2723 | <tr><td></td> |
|
2722 | 2724 | <td>--encodingmode MODE</td> |
|
2723 | 2725 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2724 | 2726 | <tr><td></td> |
|
2725 | 2727 | <td>--traceback</td> |
|
2726 | 2728 | <td>always print a traceback on exception</td></tr> |
|
2727 | 2729 | <tr><td></td> |
|
2728 | 2730 | <td>--time</td> |
|
2729 | 2731 | <td>time how long the command takes</td></tr> |
|
2730 | 2732 | <tr><td></td> |
|
2731 | 2733 | <td>--profile</td> |
|
2732 | 2734 | <td>print command execution profile</td></tr> |
|
2733 | 2735 | <tr><td></td> |
|
2734 | 2736 | <td>--version</td> |
|
2735 | 2737 | <td>output version information and exit</td></tr> |
|
2736 | 2738 | <tr><td>-h</td> |
|
2737 | 2739 | <td>--help</td> |
|
2738 | 2740 | <td>display help and exit</td></tr> |
|
2739 | 2741 | <tr><td></td> |
|
2740 | 2742 | <td>--hidden</td> |
|
2741 | 2743 | <td>consider hidden changesets</td></tr> |
|
2742 | 2744 | <tr><td></td> |
|
2743 | 2745 | <td>--pager TYPE</td> |
|
2744 | 2746 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2745 | 2747 | </table> |
|
2746 | 2748 | |
|
2747 | 2749 | </div> |
|
2748 | 2750 | </div> |
|
2749 | 2751 | </div> |
|
2750 | 2752 | |
|
2751 | 2753 | |
|
2752 | 2754 | |
|
2753 | 2755 | </body> |
|
2754 | 2756 | </html> |
|
2755 | 2757 | |
|
2756 | 2758 | |
|
2757 | 2759 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" |
|
2758 | 2760 | 200 Script output follows |
|
2759 | 2761 | |
|
2760 | 2762 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2761 | 2763 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2762 | 2764 | <head> |
|
2763 | 2765 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2764 | 2766 | <meta name="robots" content="index, nofollow" /> |
|
2765 | 2767 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2766 | 2768 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2767 | 2769 | |
|
2768 | 2770 | <title>Help: remove</title> |
|
2769 | 2771 | </head> |
|
2770 | 2772 | <body> |
|
2771 | 2773 | |
|
2772 | 2774 | <div class="container"> |
|
2773 | 2775 | <div class="menu"> |
|
2774 | 2776 | <div class="logo"> |
|
2775 | 2777 | <a href="https://mercurial-scm.org/"> |
|
2776 | 2778 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2777 | 2779 | </div> |
|
2778 | 2780 | <ul> |
|
2779 | 2781 | <li><a href="/shortlog">log</a></li> |
|
2780 | 2782 | <li><a href="/graph">graph</a></li> |
|
2781 | 2783 | <li><a href="/tags">tags</a></li> |
|
2782 | 2784 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2783 | 2785 | <li><a href="/branches">branches</a></li> |
|
2784 | 2786 | </ul> |
|
2785 | 2787 | <ul> |
|
2786 | 2788 | <li class="active"><a href="/help">help</a></li> |
|
2787 | 2789 | </ul> |
|
2788 | 2790 | </div> |
|
2789 | 2791 | |
|
2790 | 2792 | <div class="main"> |
|
2791 | 2793 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2792 | 2794 | <h3>Help: remove</h3> |
|
2793 | 2795 | |
|
2794 | 2796 | <form class="search" action="/log"> |
|
2795 | 2797 | |
|
2796 | 2798 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
2797 | 2799 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2798 | 2800 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2799 | 2801 | </form> |
|
2800 | 2802 | <div id="doc"> |
|
2801 | 2803 | <p> |
|
2802 | 2804 | hg remove [OPTION]... FILE... |
|
2803 | 2805 | </p> |
|
2804 | 2806 | <p> |
|
2805 | 2807 | aliases: rm |
|
2806 | 2808 | </p> |
|
2807 | 2809 | <p> |
|
2808 | 2810 | remove the specified files on the next commit |
|
2809 | 2811 | </p> |
|
2810 | 2812 | <p> |
|
2811 | 2813 | Schedule the indicated files for removal from the current branch. |
|
2812 | 2814 | </p> |
|
2813 | 2815 | <p> |
|
2814 | 2816 | This command schedules the files to be removed at the next commit. |
|
2815 | 2817 | To undo a remove before that, see 'hg revert'. To undo added |
|
2816 | 2818 | files, see 'hg forget'. |
|
2817 | 2819 | </p> |
|
2818 | 2820 | <p> |
|
2819 | 2821 | -A/--after can be used to remove only files that have already |
|
2820 | 2822 | been deleted, -f/--force can be used to force deletion, and -Af |
|
2821 | 2823 | can be used to remove files from the next revision without |
|
2822 | 2824 | deleting them from the working directory. |
|
2823 | 2825 | </p> |
|
2824 | 2826 | <p> |
|
2825 | 2827 | The following table details the behavior of remove for different |
|
2826 | 2828 | file states (columns) and option combinations (rows). The file |
|
2827 | 2829 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
2828 | 2830 | (as reported by 'hg status'). The actions are Warn, Remove |
|
2829 | 2831 | (from branch) and Delete (from disk): |
|
2830 | 2832 | </p> |
|
2831 | 2833 | <table> |
|
2832 | 2834 | <tr><td>opt/state</td> |
|
2833 | 2835 | <td>A</td> |
|
2834 | 2836 | <td>C</td> |
|
2835 | 2837 | <td>M</td> |
|
2836 | 2838 | <td>!</td></tr> |
|
2837 | 2839 | <tr><td>none</td> |
|
2838 | 2840 | <td>W</td> |
|
2839 | 2841 | <td>RD</td> |
|
2840 | 2842 | <td>W</td> |
|
2841 | 2843 | <td>R</td></tr> |
|
2842 | 2844 | <tr><td>-f</td> |
|
2843 | 2845 | <td>R</td> |
|
2844 | 2846 | <td>RD</td> |
|
2845 | 2847 | <td>RD</td> |
|
2846 | 2848 | <td>R</td></tr> |
|
2847 | 2849 | <tr><td>-A</td> |
|
2848 | 2850 | <td>W</td> |
|
2849 | 2851 | <td>W</td> |
|
2850 | 2852 | <td>W</td> |
|
2851 | 2853 | <td>R</td></tr> |
|
2852 | 2854 | <tr><td>-Af</td> |
|
2853 | 2855 | <td>R</td> |
|
2854 | 2856 | <td>R</td> |
|
2855 | 2857 | <td>R</td> |
|
2856 | 2858 | <td>R</td></tr> |
|
2857 | 2859 | </table> |
|
2858 | 2860 | <p> |
|
2859 | 2861 | <b>Note:</b> |
|
2860 | 2862 | </p> |
|
2861 | 2863 | <p> |
|
2862 | 2864 | 'hg remove' never deletes files in Added [A] state from the |
|
2863 | 2865 | working directory, not even if "--force" is specified. |
|
2864 | 2866 | </p> |
|
2865 | 2867 | <p> |
|
2866 | 2868 | Returns 0 on success, 1 if any warnings encountered. |
|
2867 | 2869 | </p> |
|
2868 | 2870 | <p> |
|
2869 | 2871 | options ([+] can be repeated): |
|
2870 | 2872 | </p> |
|
2871 | 2873 | <table> |
|
2872 | 2874 | <tr><td>-A</td> |
|
2873 | 2875 | <td>--after</td> |
|
2874 | 2876 | <td>record delete for missing files</td></tr> |
|
2875 | 2877 | <tr><td>-f</td> |
|
2876 | 2878 | <td>--force</td> |
|
2877 | 2879 | <td>forget added files, delete modified files</td></tr> |
|
2878 | 2880 | <tr><td>-S</td> |
|
2879 | 2881 | <td>--subrepos</td> |
|
2880 | 2882 | <td>recurse into subrepositories</td></tr> |
|
2881 | 2883 | <tr><td>-I</td> |
|
2882 | 2884 | <td>--include PATTERN [+]</td> |
|
2883 | 2885 | <td>include names matching the given patterns</td></tr> |
|
2884 | 2886 | <tr><td>-X</td> |
|
2885 | 2887 | <td>--exclude PATTERN [+]</td> |
|
2886 | 2888 | <td>exclude names matching the given patterns</td></tr> |
|
2887 | 2889 | <tr><td>-n</td> |
|
2888 | 2890 | <td>--dry-run</td> |
|
2889 | 2891 | <td>do not perform actions, just print output</td></tr> |
|
2890 | 2892 | </table> |
|
2891 | 2893 | <p> |
|
2892 | 2894 | global options ([+] can be repeated): |
|
2893 | 2895 | </p> |
|
2894 | 2896 | <table> |
|
2895 | 2897 | <tr><td>-R</td> |
|
2896 | 2898 | <td>--repository REPO</td> |
|
2897 | 2899 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2898 | 2900 | <tr><td></td> |
|
2899 | 2901 | <td>--cwd DIR</td> |
|
2900 | 2902 | <td>change working directory</td></tr> |
|
2901 | 2903 | <tr><td>-y</td> |
|
2902 | 2904 | <td>--noninteractive</td> |
|
2903 | 2905 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2904 | 2906 | <tr><td>-q</td> |
|
2905 | 2907 | <td>--quiet</td> |
|
2906 | 2908 | <td>suppress output</td></tr> |
|
2907 | 2909 | <tr><td>-v</td> |
|
2908 | 2910 | <td>--verbose</td> |
|
2909 | 2911 | <td>enable additional output</td></tr> |
|
2910 | 2912 | <tr><td></td> |
|
2911 | 2913 | <td>--color TYPE</td> |
|
2912 | 2914 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2913 | 2915 | <tr><td></td> |
|
2914 | 2916 | <td>--config CONFIG [+]</td> |
|
2915 | 2917 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2916 | 2918 | <tr><td></td> |
|
2917 | 2919 | <td>--debug</td> |
|
2918 | 2920 | <td>enable debugging output</td></tr> |
|
2919 | 2921 | <tr><td></td> |
|
2920 | 2922 | <td>--debugger</td> |
|
2921 | 2923 | <td>start debugger</td></tr> |
|
2922 | 2924 | <tr><td></td> |
|
2923 | 2925 | <td>--encoding ENCODE</td> |
|
2924 | 2926 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2925 | 2927 | <tr><td></td> |
|
2926 | 2928 | <td>--encodingmode MODE</td> |
|
2927 | 2929 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2928 | 2930 | <tr><td></td> |
|
2929 | 2931 | <td>--traceback</td> |
|
2930 | 2932 | <td>always print a traceback on exception</td></tr> |
|
2931 | 2933 | <tr><td></td> |
|
2932 | 2934 | <td>--time</td> |
|
2933 | 2935 | <td>time how long the command takes</td></tr> |
|
2934 | 2936 | <tr><td></td> |
|
2935 | 2937 | <td>--profile</td> |
|
2936 | 2938 | <td>print command execution profile</td></tr> |
|
2937 | 2939 | <tr><td></td> |
|
2938 | 2940 | <td>--version</td> |
|
2939 | 2941 | <td>output version information and exit</td></tr> |
|
2940 | 2942 | <tr><td>-h</td> |
|
2941 | 2943 | <td>--help</td> |
|
2942 | 2944 | <td>display help and exit</td></tr> |
|
2943 | 2945 | <tr><td></td> |
|
2944 | 2946 | <td>--hidden</td> |
|
2945 | 2947 | <td>consider hidden changesets</td></tr> |
|
2946 | 2948 | <tr><td></td> |
|
2947 | 2949 | <td>--pager TYPE</td> |
|
2948 | 2950 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2949 | 2951 | </table> |
|
2950 | 2952 | |
|
2951 | 2953 | </div> |
|
2952 | 2954 | </div> |
|
2953 | 2955 | </div> |
|
2954 | 2956 | |
|
2955 | 2957 | |
|
2956 | 2958 | |
|
2957 | 2959 | </body> |
|
2958 | 2960 | </html> |
|
2959 | 2961 | |
|
2960 | 2962 | |
|
2961 | 2963 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" |
|
2962 | 2964 | 200 Script output follows |
|
2963 | 2965 | |
|
2964 | 2966 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2965 | 2967 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2966 | 2968 | <head> |
|
2967 | 2969 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2968 | 2970 | <meta name="robots" content="index, nofollow" /> |
|
2969 | 2971 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2970 | 2972 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2971 | 2973 | |
|
2972 | 2974 | <title>Help: dates</title> |
|
2973 | 2975 | </head> |
|
2974 | 2976 | <body> |
|
2975 | 2977 | |
|
2976 | 2978 | <div class="container"> |
|
2977 | 2979 | <div class="menu"> |
|
2978 | 2980 | <div class="logo"> |
|
2979 | 2981 | <a href="https://mercurial-scm.org/"> |
|
2980 | 2982 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2981 | 2983 | </div> |
|
2982 | 2984 | <ul> |
|
2983 | 2985 | <li><a href="/shortlog">log</a></li> |
|
2984 | 2986 | <li><a href="/graph">graph</a></li> |
|
2985 | 2987 | <li><a href="/tags">tags</a></li> |
|
2986 | 2988 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2987 | 2989 | <li><a href="/branches">branches</a></li> |
|
2988 | 2990 | </ul> |
|
2989 | 2991 | <ul> |
|
2990 | 2992 | <li class="active"><a href="/help">help</a></li> |
|
2991 | 2993 | </ul> |
|
2992 | 2994 | </div> |
|
2993 | 2995 | |
|
2994 | 2996 | <div class="main"> |
|
2995 | 2997 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2996 | 2998 | <h3>Help: dates</h3> |
|
2997 | 2999 | |
|
2998 | 3000 | <form class="search" action="/log"> |
|
2999 | 3001 | |
|
3000 | 3002 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3001 | 3003 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3002 | 3004 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3003 | 3005 | </form> |
|
3004 | 3006 | <div id="doc"> |
|
3005 | 3007 | <h1>Date Formats</h1> |
|
3006 | 3008 | <p> |
|
3007 | 3009 | Some commands allow the user to specify a date, e.g.: |
|
3008 | 3010 | </p> |
|
3009 | 3011 | <ul> |
|
3010 | 3012 | <li> backout, commit, import, tag: Specify the commit date. |
|
3011 | 3013 | <li> log, revert, update: Select revision(s) by date. |
|
3012 | 3014 | </ul> |
|
3013 | 3015 | <p> |
|
3014 | 3016 | Many date formats are valid. Here are some examples: |
|
3015 | 3017 | </p> |
|
3016 | 3018 | <ul> |
|
3017 | 3019 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
3018 | 3020 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
3019 | 3021 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
3020 | 3022 | <li> "Dec 6" (midnight) |
|
3021 | 3023 | <li> "13:18" (today assumed) |
|
3022 | 3024 | <li> "3:39" (3:39AM assumed) |
|
3023 | 3025 | <li> "3:39pm" (15:39) |
|
3024 | 3026 | <li> "2006-12-06 13:18:29" (ISO 8601 format) |
|
3025 | 3027 | <li> "2006-12-6 13:18" |
|
3026 | 3028 | <li> "2006-12-6" |
|
3027 | 3029 | <li> "12-6" |
|
3028 | 3030 | <li> "12/6" |
|
3029 | 3031 | <li> "12/6/6" (Dec 6 2006) |
|
3030 | 3032 | <li> "today" (midnight) |
|
3031 | 3033 | <li> "yesterday" (midnight) |
|
3032 | 3034 | <li> "now" - right now |
|
3033 | 3035 | </ul> |
|
3034 | 3036 | <p> |
|
3035 | 3037 | Lastly, there is Mercurial's internal format: |
|
3036 | 3038 | </p> |
|
3037 | 3039 | <ul> |
|
3038 | 3040 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
3039 | 3041 | </ul> |
|
3040 | 3042 | <p> |
|
3041 | 3043 | This is the internal representation format for dates. The first number |
|
3042 | 3044 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The |
|
3043 | 3045 | second is the offset of the local timezone, in seconds west of UTC |
|
3044 | 3046 | (negative if the timezone is east of UTC). |
|
3045 | 3047 | </p> |
|
3046 | 3048 | <p> |
|
3047 | 3049 | The log command also accepts date ranges: |
|
3048 | 3050 | </p> |
|
3049 | 3051 | <ul> |
|
3050 | 3052 | <li> "<DATE" - at or before a given date/time |
|
3051 | 3053 | <li> ">DATE" - on or after a given date/time |
|
3052 | 3054 | <li> "DATE to DATE" - a date range, inclusive |
|
3053 | 3055 | <li> "-DAYS" - within a given number of days of today |
|
3054 | 3056 | </ul> |
|
3055 | 3057 | |
|
3056 | 3058 | </div> |
|
3057 | 3059 | </div> |
|
3058 | 3060 | </div> |
|
3059 | 3061 | |
|
3060 | 3062 | |
|
3061 | 3063 | |
|
3062 | 3064 | </body> |
|
3063 | 3065 | </html> |
|
3064 | 3066 | |
|
3065 | 3067 | |
|
3066 | 3068 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" |
|
3067 | 3069 | 200 Script output follows |
|
3068 | 3070 | |
|
3069 | 3071 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3070 | 3072 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3071 | 3073 | <head> |
|
3072 | 3074 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3073 | 3075 | <meta name="robots" content="index, nofollow" /> |
|
3074 | 3076 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3075 | 3077 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3076 | 3078 | |
|
3077 | 3079 | <title>Help: pager</title> |
|
3078 | 3080 | </head> |
|
3079 | 3081 | <body> |
|
3080 | 3082 | |
|
3081 | 3083 | <div class="container"> |
|
3082 | 3084 | <div class="menu"> |
|
3083 | 3085 | <div class="logo"> |
|
3084 | 3086 | <a href="https://mercurial-scm.org/"> |
|
3085 | 3087 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3086 | 3088 | </div> |
|
3087 | 3089 | <ul> |
|
3088 | 3090 | <li><a href="/shortlog">log</a></li> |
|
3089 | 3091 | <li><a href="/graph">graph</a></li> |
|
3090 | 3092 | <li><a href="/tags">tags</a></li> |
|
3091 | 3093 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3092 | 3094 | <li><a href="/branches">branches</a></li> |
|
3093 | 3095 | </ul> |
|
3094 | 3096 | <ul> |
|
3095 | 3097 | <li class="active"><a href="/help">help</a></li> |
|
3096 | 3098 | </ul> |
|
3097 | 3099 | </div> |
|
3098 | 3100 | |
|
3099 | 3101 | <div class="main"> |
|
3100 | 3102 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3101 | 3103 | <h3>Help: pager</h3> |
|
3102 | 3104 | |
|
3103 | 3105 | <form class="search" action="/log"> |
|
3104 | 3106 | |
|
3105 | 3107 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3106 | 3108 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3107 | 3109 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3108 | 3110 | </form> |
|
3109 | 3111 | <div id="doc"> |
|
3110 | 3112 | <h1>Pager Support</h1> |
|
3111 | 3113 | <p> |
|
3112 | 3114 | Some Mercurial commands can produce a lot of output, and Mercurial will |
|
3113 | 3115 | attempt to use a pager to make those commands more pleasant. |
|
3114 | 3116 | </p> |
|
3115 | 3117 | <p> |
|
3116 | 3118 | To set the pager that should be used, set the application variable: |
|
3117 | 3119 | </p> |
|
3118 | 3120 | <pre> |
|
3119 | 3121 | [pager] |
|
3120 | 3122 | pager = less -FRX |
|
3121 | 3123 | </pre> |
|
3122 | 3124 | <p> |
|
3123 | 3125 | If no pager is set in the user or repository configuration, Mercurial uses the |
|
3124 | 3126 | environment variable $PAGER. If $PAGER is not set, pager.pager from the default |
|
3125 | 3127 | or system configuration is used. If none of these are set, a default pager will |
|
3126 | 3128 | be used, typically 'less' on Unix and 'more' on Windows. |
|
3127 | 3129 | </p> |
|
3128 | 3130 | <p> |
|
3129 | 3131 | You can disable the pager for certain commands by adding them to the |
|
3130 | 3132 | pager.ignore list: |
|
3131 | 3133 | </p> |
|
3132 | 3134 | <pre> |
|
3133 | 3135 | [pager] |
|
3134 | 3136 | ignore = version, help, update |
|
3135 | 3137 | </pre> |
|
3136 | 3138 | <p> |
|
3137 | 3139 | To ignore global commands like 'hg version' or 'hg help', you have |
|
3138 | 3140 | to specify them in your user configuration file. |
|
3139 | 3141 | </p> |
|
3140 | 3142 | <p> |
|
3141 | 3143 | To control whether the pager is used at all for an individual command, |
|
3142 | 3144 | you can use --pager=<value>: |
|
3143 | 3145 | </p> |
|
3144 | 3146 | <ul> |
|
3145 | 3147 | <li> use as needed: 'auto'. |
|
3146 | 3148 | <li> require the pager: 'yes' or 'on'. |
|
3147 | 3149 | <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). |
|
3148 | 3150 | </ul> |
|
3149 | 3151 | <p> |
|
3150 | 3152 | To globally turn off all attempts to use a pager, set: |
|
3151 | 3153 | </p> |
|
3152 | 3154 | <pre> |
|
3153 | 3155 | [ui] |
|
3154 | 3156 | paginate = never |
|
3155 | 3157 | </pre> |
|
3156 | 3158 | <p> |
|
3157 | 3159 | which will prevent the pager from running. |
|
3158 | 3160 | </p> |
|
3159 | 3161 | |
|
3160 | 3162 | </div> |
|
3161 | 3163 | </div> |
|
3162 | 3164 | </div> |
|
3163 | 3165 | |
|
3164 | 3166 | |
|
3165 | 3167 | |
|
3166 | 3168 | </body> |
|
3167 | 3169 | </html> |
|
3168 | 3170 | |
|
3169 | 3171 | |
|
3170 | 3172 | Sub-topic indexes rendered properly |
|
3171 | 3173 | |
|
3172 | 3174 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" |
|
3173 | 3175 | 200 Script output follows |
|
3174 | 3176 | |
|
3175 | 3177 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3176 | 3178 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3177 | 3179 | <head> |
|
3178 | 3180 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3179 | 3181 | <meta name="robots" content="index, nofollow" /> |
|
3180 | 3182 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3181 | 3183 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3182 | 3184 | |
|
3183 | 3185 | <title>Help: internals</title> |
|
3184 | 3186 | </head> |
|
3185 | 3187 | <body> |
|
3186 | 3188 | |
|
3187 | 3189 | <div class="container"> |
|
3188 | 3190 | <div class="menu"> |
|
3189 | 3191 | <div class="logo"> |
|
3190 | 3192 | <a href="https://mercurial-scm.org/"> |
|
3191 | 3193 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3192 | 3194 | </div> |
|
3193 | 3195 | <ul> |
|
3194 | 3196 | <li><a href="/shortlog">log</a></li> |
|
3195 | 3197 | <li><a href="/graph">graph</a></li> |
|
3196 | 3198 | <li><a href="/tags">tags</a></li> |
|
3197 | 3199 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3198 | 3200 | <li><a href="/branches">branches</a></li> |
|
3199 | 3201 | </ul> |
|
3200 | 3202 | <ul> |
|
3201 | 3203 | <li><a href="/help">help</a></li> |
|
3202 | 3204 | </ul> |
|
3203 | 3205 | </div> |
|
3204 | 3206 | |
|
3205 | 3207 | <div class="main"> |
|
3206 | 3208 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3207 | 3209 | |
|
3208 | 3210 | <form class="search" action="/log"> |
|
3209 | 3211 | |
|
3210 | 3212 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3211 | 3213 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3212 | 3214 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3213 | 3215 | </form> |
|
3214 | 3216 | <table class="bigtable"> |
|
3215 | 3217 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
3216 | 3218 | |
|
3217 | 3219 | <tr><td> |
|
3218 | 3220 | <a href="/help/internals.bundle2"> |
|
3219 | 3221 | bundle2 |
|
3220 | 3222 | </a> |
|
3221 | 3223 | </td><td> |
|
3222 | 3224 | Bundle2 |
|
3223 | 3225 | </td></tr> |
|
3224 | 3226 | <tr><td> |
|
3225 | 3227 | <a href="/help/internals.bundles"> |
|
3226 | 3228 | bundles |
|
3227 | 3229 | </a> |
|
3228 | 3230 | </td><td> |
|
3229 | 3231 | Bundles |
|
3230 | 3232 | </td></tr> |
|
3231 | 3233 | <tr><td> |
|
3232 | 3234 | <a href="/help/internals.censor"> |
|
3233 | 3235 | censor |
|
3234 | 3236 | </a> |
|
3235 | 3237 | </td><td> |
|
3236 | 3238 | Censor |
|
3237 | 3239 | </td></tr> |
|
3238 | 3240 | <tr><td> |
|
3239 | 3241 | <a href="/help/internals.changegroups"> |
|
3240 | 3242 | changegroups |
|
3241 | 3243 | </a> |
|
3242 | 3244 | </td><td> |
|
3243 | 3245 | Changegroups |
|
3244 | 3246 | </td></tr> |
|
3245 | 3247 | <tr><td> |
|
3246 | 3248 | <a href="/help/internals.config"> |
|
3247 | 3249 | config |
|
3248 | 3250 | </a> |
|
3249 | 3251 | </td><td> |
|
3250 | 3252 | Config Registrar |
|
3251 | 3253 | </td></tr> |
|
3252 | 3254 | <tr><td> |
|
3253 | 3255 | <a href="/help/internals.requirements"> |
|
3254 | 3256 | requirements |
|
3255 | 3257 | </a> |
|
3256 | 3258 | </td><td> |
|
3257 | 3259 | Repository Requirements |
|
3258 | 3260 | </td></tr> |
|
3259 | 3261 | <tr><td> |
|
3260 | 3262 | <a href="/help/internals.revlogs"> |
|
3261 | 3263 | revlogs |
|
3262 | 3264 | </a> |
|
3263 | 3265 | </td><td> |
|
3264 | 3266 | Revision Logs |
|
3265 | 3267 | </td></tr> |
|
3266 | 3268 | <tr><td> |
|
3267 | 3269 | <a href="/help/internals.wireprotocol"> |
|
3268 | 3270 | wireprotocol |
|
3269 | 3271 | </a> |
|
3270 | 3272 | </td><td> |
|
3271 | 3273 | Wire Protocol |
|
3272 | 3274 | </td></tr> |
|
3273 | 3275 | |
|
3274 | 3276 | |
|
3275 | 3277 | |
|
3276 | 3278 | |
|
3277 | 3279 | |
|
3278 | 3280 | </table> |
|
3279 | 3281 | </div> |
|
3280 | 3282 | </div> |
|
3281 | 3283 | |
|
3282 | 3284 | |
|
3283 | 3285 | |
|
3284 | 3286 | </body> |
|
3285 | 3287 | </html> |
|
3286 | 3288 | |
|
3287 | 3289 | |
|
3288 | 3290 | Sub-topic topics rendered properly |
|
3289 | 3291 | |
|
3290 | 3292 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" |
|
3291 | 3293 | 200 Script output follows |
|
3292 | 3294 | |
|
3293 | 3295 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3294 | 3296 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3295 | 3297 | <head> |
|
3296 | 3298 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3297 | 3299 | <meta name="robots" content="index, nofollow" /> |
|
3298 | 3300 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3299 | 3301 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3300 | 3302 | |
|
3301 | 3303 | <title>Help: internals.changegroups</title> |
|
3302 | 3304 | </head> |
|
3303 | 3305 | <body> |
|
3304 | 3306 | |
|
3305 | 3307 | <div class="container"> |
|
3306 | 3308 | <div class="menu"> |
|
3307 | 3309 | <div class="logo"> |
|
3308 | 3310 | <a href="https://mercurial-scm.org/"> |
|
3309 | 3311 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3310 | 3312 | </div> |
|
3311 | 3313 | <ul> |
|
3312 | 3314 | <li><a href="/shortlog">log</a></li> |
|
3313 | 3315 | <li><a href="/graph">graph</a></li> |
|
3314 | 3316 | <li><a href="/tags">tags</a></li> |
|
3315 | 3317 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3316 | 3318 | <li><a href="/branches">branches</a></li> |
|
3317 | 3319 | </ul> |
|
3318 | 3320 | <ul> |
|
3319 | 3321 | <li class="active"><a href="/help">help</a></li> |
|
3320 | 3322 | </ul> |
|
3321 | 3323 | </div> |
|
3322 | 3324 | |
|
3323 | 3325 | <div class="main"> |
|
3324 | 3326 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3325 | 3327 | <h3>Help: internals.changegroups</h3> |
|
3326 | 3328 | |
|
3327 | 3329 | <form class="search" action="/log"> |
|
3328 | 3330 | |
|
3329 | 3331 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3330 | 3332 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3331 | 3333 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3332 | 3334 | </form> |
|
3333 | 3335 | <div id="doc"> |
|
3334 | 3336 | <h1>Changegroups</h1> |
|
3335 | 3337 | <p> |
|
3336 | 3338 | Changegroups are representations of repository revlog data, specifically |
|
3337 | 3339 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3338 | 3340 | filelogs. |
|
3339 | 3341 | </p> |
|
3340 | 3342 | <p> |
|
3341 | 3343 | There are 3 versions of changegroups: "1", "2", and "3". From a |
|
3342 | 3344 | high-level, versions "1" and "2" are almost exactly the same, with the |
|
3343 | 3345 | only difference being an additional item in the *delta header*. Version |
|
3344 | 3346 | "3" adds support for revlog flags in the *delta header* and optionally |
|
3345 | 3347 | exchanging treemanifests (enabled by setting an option on the |
|
3346 | 3348 | "changegroup" part in the bundle2). |
|
3347 | 3349 | </p> |
|
3348 | 3350 | <p> |
|
3349 | 3351 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
3350 | 3352 | segments: |
|
3351 | 3353 | </p> |
|
3352 | 3354 | <pre> |
|
3353 | 3355 | +---------------------------------+ |
|
3354 | 3356 | | | | | |
|
3355 | 3357 | | changeset | manifest | filelogs | |
|
3356 | 3358 | | | | | |
|
3357 | 3359 | | | | | |
|
3358 | 3360 | +---------------------------------+ |
|
3359 | 3361 | </pre> |
|
3360 | 3362 | <p> |
|
3361 | 3363 | When exchanging treemanifests, there are 4 logical segments: |
|
3362 | 3364 | </p> |
|
3363 | 3365 | <pre> |
|
3364 | 3366 | +-------------------------------------------------+ |
|
3365 | 3367 | | | | | | |
|
3366 | 3368 | | changeset | root | treemanifests | filelogs | |
|
3367 | 3369 | | | manifest | | | |
|
3368 | 3370 | | | | | | |
|
3369 | 3371 | +-------------------------------------------------+ |
|
3370 | 3372 | </pre> |
|
3371 | 3373 | <p> |
|
3372 | 3374 | The principle building block of each segment is a *chunk*. A *chunk* |
|
3373 | 3375 | is a framed piece of data: |
|
3374 | 3376 | </p> |
|
3375 | 3377 | <pre> |
|
3376 | 3378 | +---------------------------------------+ |
|
3377 | 3379 | | | | |
|
3378 | 3380 | | length | data | |
|
3379 | 3381 | | (4 bytes) | (<length - 4> bytes) | |
|
3380 | 3382 | | | | |
|
3381 | 3383 | +---------------------------------------+ |
|
3382 | 3384 | </pre> |
|
3383 | 3385 | <p> |
|
3384 | 3386 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
3385 | 3387 | integer indicating the length of the entire chunk (including the length field |
|
3386 | 3388 | itself). |
|
3387 | 3389 | </p> |
|
3388 | 3390 | <p> |
|
3389 | 3391 | There is a special case chunk that has a value of 0 for the length |
|
3390 | 3392 | ("0x00000000"). We call this an *empty chunk*. |
|
3391 | 3393 | </p> |
|
3392 | 3394 | <h2>Delta Groups</h2> |
|
3393 | 3395 | <p> |
|
3394 | 3396 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
3395 | 3397 | or patches against previous revisions. |
|
3396 | 3398 | </p> |
|
3397 | 3399 | <p> |
|
3398 | 3400 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
3399 | 3401 | to signal the end of the delta group: |
|
3400 | 3402 | </p> |
|
3401 | 3403 | <pre> |
|
3402 | 3404 | +------------------------------------------------------------------------+ |
|
3403 | 3405 | | | | | | | |
|
3404 | 3406 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
3405 | 3407 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
3406 | 3408 | | | | | | | |
|
3407 | 3409 | +------------------------------------------------------------------------+ |
|
3408 | 3410 | </pre> |
|
3409 | 3411 | <p> |
|
3410 | 3412 | Each *chunk*'s data consists of the following: |
|
3411 | 3413 | </p> |
|
3412 | 3414 | <pre> |
|
3413 | 3415 | +---------------------------------------+ |
|
3414 | 3416 | | | | |
|
3415 | 3417 | | delta header | delta data | |
|
3416 | 3418 | | (various by version) | (various) | |
|
3417 | 3419 | | | | |
|
3418 | 3420 | +---------------------------------------+ |
|
3419 | 3421 | </pre> |
|
3420 | 3422 | <p> |
|
3421 | 3423 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
3422 | 3424 | entry (either that the recipient already has, or previously specified in the |
|
3423 | 3425 | bundle/changegroup). |
|
3424 | 3426 | </p> |
|
3425 | 3427 | <p> |
|
3426 | 3428 | The *delta header* is different between versions "1", "2", and |
|
3427 | 3429 | "3" of the changegroup format. |
|
3428 | 3430 | </p> |
|
3429 | 3431 | <p> |
|
3430 | 3432 | Version 1 (headerlen=80): |
|
3431 | 3433 | </p> |
|
3432 | 3434 | <pre> |
|
3433 | 3435 | +------------------------------------------------------+ |
|
3434 | 3436 | | | | | | |
|
3435 | 3437 | | node | p1 node | p2 node | link node | |
|
3436 | 3438 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3437 | 3439 | | | | | | |
|
3438 | 3440 | +------------------------------------------------------+ |
|
3439 | 3441 | </pre> |
|
3440 | 3442 | <p> |
|
3441 | 3443 | Version 2 (headerlen=100): |
|
3442 | 3444 | </p> |
|
3443 | 3445 | <pre> |
|
3444 | 3446 | +------------------------------------------------------------------+ |
|
3445 | 3447 | | | | | | | |
|
3446 | 3448 | | node | p1 node | p2 node | base node | link node | |
|
3447 | 3449 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3448 | 3450 | | | | | | | |
|
3449 | 3451 | +------------------------------------------------------------------+ |
|
3450 | 3452 | </pre> |
|
3451 | 3453 | <p> |
|
3452 | 3454 | Version 3 (headerlen=102): |
|
3453 | 3455 | </p> |
|
3454 | 3456 | <pre> |
|
3455 | 3457 | +------------------------------------------------------------------------------+ |
|
3456 | 3458 | | | | | | | | |
|
3457 | 3459 | | node | p1 node | p2 node | base node | link node | flags | |
|
3458 | 3460 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
3459 | 3461 | | | | | | | | |
|
3460 | 3462 | +------------------------------------------------------------------------------+ |
|
3461 | 3463 | </pre> |
|
3462 | 3464 | <p> |
|
3463 | 3465 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a |
|
3464 | 3466 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
3465 | 3467 | from an existing entry (either that the recipient already has, or previously |
|
3466 | 3468 | specified in the bundle/changegroup). The format is described more fully in |
|
3467 | 3469 | "hg help internals.bdiff", but briefly: |
|
3468 | 3470 | </p> |
|
3469 | 3471 | <pre> |
|
3470 | 3472 | +---------------------------------------------------------------+ |
|
3471 | 3473 | | | | | | |
|
3472 | 3474 | | start offset | end offset | new length | content | |
|
3473 | 3475 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
3474 | 3476 | | | | | | |
|
3475 | 3477 | +---------------------------------------------------------------+ |
|
3476 | 3478 | </pre> |
|
3477 | 3479 | <p> |
|
3478 | 3480 | Please note that the length field in the delta data does *not* include itself. |
|
3479 | 3481 | </p> |
|
3480 | 3482 | <p> |
|
3481 | 3483 | In version 1, the delta is always applied against the previous node from |
|
3482 | 3484 | the changegroup or the first parent if this is the first entry in the |
|
3483 | 3485 | changegroup. |
|
3484 | 3486 | </p> |
|
3485 | 3487 | <p> |
|
3486 | 3488 | In version 2 and up, the delta base node is encoded in the entry in the |
|
3487 | 3489 | changegroup. This allows the delta to be expressed against any parent, |
|
3488 | 3490 | which can result in smaller deltas and more efficient encoding of data. |
|
3489 | 3491 | </p> |
|
3490 | 3492 | <h2>Changeset Segment</h2> |
|
3491 | 3493 | <p> |
|
3492 | 3494 | The *changeset segment* consists of a single *delta group* holding |
|
3493 | 3495 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
3494 | 3496 | the boundary to the *manifest segment*. |
|
3495 | 3497 | </p> |
|
3496 | 3498 | <h2>Manifest Segment</h2> |
|
3497 | 3499 | <p> |
|
3498 | 3500 | The *manifest segment* consists of a single *delta group* holding manifest |
|
3499 | 3501 | data. If treemanifests are in use, it contains only the manifest for the |
|
3500 | 3502 | root directory of the repository. Otherwise, it contains the entire |
|
3501 | 3503 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
3502 | 3504 | the boundary to the next segment (either the *treemanifests segment* or the |
|
3503 | 3505 | *filelogs segment*, depending on version and the request options). |
|
3504 | 3506 | </p> |
|
3505 | 3507 | <h3>Treemanifests Segment</h3> |
|
3506 | 3508 | <p> |
|
3507 | 3509 | The *treemanifests segment* only exists in changegroup version "3", and |
|
3508 | 3510 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
3509 | 3511 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
3510 | 3512 | Aside from the filenames in the *treemanifests segment* containing a |
|
3511 | 3513 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
3512 | 3514 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
3513 | 3515 | a sub-segment with filename size 0). This denotes the boundary to the |
|
3514 | 3516 | *filelogs segment*. |
|
3515 | 3517 | </p> |
|
3516 | 3518 | <h2>Filelogs Segment</h2> |
|
3517 | 3519 | <p> |
|
3518 | 3520 | The *filelogs segment* consists of multiple sub-segments, each |
|
3519 | 3521 | corresponding to an individual file whose data is being described: |
|
3520 | 3522 | </p> |
|
3521 | 3523 | <pre> |
|
3522 | 3524 | +--------------------------------------------------+ |
|
3523 | 3525 | | | | | | | |
|
3524 | 3526 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
3525 | 3527 | | | | | | (4 bytes) | |
|
3526 | 3528 | | | | | | | |
|
3527 | 3529 | +--------------------------------------------------+ |
|
3528 | 3530 | </pre> |
|
3529 | 3531 | <p> |
|
3530 | 3532 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
3531 | 3533 | a sub-segment with filename size 0). This denotes the end of the segment |
|
3532 | 3534 | and of the overall changegroup. |
|
3533 | 3535 | </p> |
|
3534 | 3536 | <p> |
|
3535 | 3537 | Each filelog sub-segment consists of the following: |
|
3536 | 3538 | </p> |
|
3537 | 3539 | <pre> |
|
3538 | 3540 | +------------------------------------------------------+ |
|
3539 | 3541 | | | | | |
|
3540 | 3542 | | filename length | filename | delta group | |
|
3541 | 3543 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
3542 | 3544 | | | | | |
|
3543 | 3545 | +------------------------------------------------------+ |
|
3544 | 3546 | </pre> |
|
3545 | 3547 | <p> |
|
3546 | 3548 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
3547 | 3549 | followed by N chunks constituting the *delta group* for this file. The |
|
3548 | 3550 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
3549 | 3551 | next filelog sub-segment. |
|
3550 | 3552 | </p> |
|
3551 | 3553 | |
|
3552 | 3554 | </div> |
|
3553 | 3555 | </div> |
|
3554 | 3556 | </div> |
|
3555 | 3557 | |
|
3556 | 3558 | |
|
3557 | 3559 | |
|
3558 | 3560 | </body> |
|
3559 | 3561 | </html> |
|
3560 | 3562 | |
|
3561 | 3563 | |
|
3562 | 3564 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" |
|
3563 | 3565 | 404 Not Found |
|
3564 | 3566 | |
|
3565 | 3567 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3566 | 3568 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3567 | 3569 | <head> |
|
3568 | 3570 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3569 | 3571 | <meta name="robots" content="index, nofollow" /> |
|
3570 | 3572 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3571 | 3573 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3572 | 3574 | |
|
3573 | 3575 | <title>test: error</title> |
|
3574 | 3576 | </head> |
|
3575 | 3577 | <body> |
|
3576 | 3578 | |
|
3577 | 3579 | <div class="container"> |
|
3578 | 3580 | <div class="menu"> |
|
3579 | 3581 | <div class="logo"> |
|
3580 | 3582 | <a href="https://mercurial-scm.org/"> |
|
3581 | 3583 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
3582 | 3584 | </div> |
|
3583 | 3585 | <ul> |
|
3584 | 3586 | <li><a href="/shortlog">log</a></li> |
|
3585 | 3587 | <li><a href="/graph">graph</a></li> |
|
3586 | 3588 | <li><a href="/tags">tags</a></li> |
|
3587 | 3589 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3588 | 3590 | <li><a href="/branches">branches</a></li> |
|
3589 | 3591 | </ul> |
|
3590 | 3592 | <ul> |
|
3591 | 3593 | <li><a href="/help">help</a></li> |
|
3592 | 3594 | </ul> |
|
3593 | 3595 | </div> |
|
3594 | 3596 | |
|
3595 | 3597 | <div class="main"> |
|
3596 | 3598 | |
|
3597 | 3599 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3598 | 3600 | <h3>error</h3> |
|
3599 | 3601 | |
|
3600 | 3602 | |
|
3601 | 3603 | <form class="search" action="/log"> |
|
3602 | 3604 | |
|
3603 | 3605 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
3604 | 3606 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3605 | 3607 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3606 | 3608 | </form> |
|
3607 | 3609 | |
|
3608 | 3610 | <div class="description"> |
|
3609 | 3611 | <p> |
|
3610 | 3612 | An error occurred while processing your request: |
|
3611 | 3613 | </p> |
|
3612 | 3614 | <p> |
|
3613 | 3615 | Not Found |
|
3614 | 3616 | </p> |
|
3615 | 3617 | </div> |
|
3616 | 3618 | </div> |
|
3617 | 3619 | </div> |
|
3618 | 3620 | |
|
3619 | 3621 | |
|
3620 | 3622 | |
|
3621 | 3623 | </body> |
|
3622 | 3624 | </html> |
|
3623 | 3625 | |
|
3624 | 3626 | [1] |
|
3625 | 3627 | |
|
3626 | 3628 | $ killdaemons.py |
|
3627 | 3629 | |
|
3628 | 3630 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now