Mercurial > hg
annotate tests/test-extension.t @ 29181:dae38633eba8 stable
localrepo: prevent executable-bit only changes from being lost on amend
If you have just executable-bit change and amend it twice it will vanish:
* After the first amend the commit will have the proper executable bit set
in manifest but it won't have the the file on the list of files in
changelog.
* The second amend will read the wrong list of files from changelog and it
will copy the manifest entry from parent for this file.
* Voila! The change is lost.
This change repairs the bug in localrepo causing this and adds a test for it.
author | Mateusz Kwapich <mitrandir@fb.com> |
---|---|
date | Thu, 19 May 2016 14:35:22 -0700 |
parents | 38dc3f28f478 |
children | a3e5e1fb257c |
rev | line source |
---|---|
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
1 Test basic extension support |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
2 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
3 $ cat > foobar.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
4 > import os |
21254
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
5 > from mercurial import cmdutil, commands |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
6 > cmdtable = {} |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
7 > command = cmdutil.command(cmdtable) |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
8 > def uisetup(ui): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
9 > ui.write("uisetup called\\n") |
28612
6fb1d3c936d2
tests: explicitly flush output streams
Jun Wu <quark@fb.com>
parents:
27990
diff
changeset
|
10 > ui.flush() |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
11 > def reposetup(ui, repo): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
12 > ui.write("reposetup called for %s\\n" % os.path.basename(repo.root)) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
13 > ui.write("ui %s= repo.ui\\n" % (ui == repo.ui and "=" or "!")) |
28612
6fb1d3c936d2
tests: explicitly flush output streams
Jun Wu <quark@fb.com>
parents:
27990
diff
changeset
|
14 > ui.flush() |
21254
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
15 > @command('foo', [], 'hg foo') |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
16 > def foo(ui, *args, **kwargs): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
17 > ui.write("Foo\\n") |
21773
26d2fb899637
tests: define norepo in command decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21289
diff
changeset
|
18 > @command('bar', [], 'hg bar', norepo=True) |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
19 > def bar(ui, *args, **kwargs): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
20 > ui.write("Bar\\n") |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
21 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
22 $ abspath=`pwd`/foobar.py |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
23 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
24 $ mkdir barfoo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
25 $ cp foobar.py barfoo/__init__.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
26 $ barfoopath=`pwd`/barfoo |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
27 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
28 $ hg init a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
29 $ cd a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
30 $ echo foo > file |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
31 $ hg add file |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
32 $ hg commit -m 'add file' |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
33 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
34 $ echo '[extensions]' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
35 $ echo "foobar = $abspath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
36 $ hg foo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
37 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
38 reposetup called for a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
39 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
40 Foo |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
41 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
42 $ cd .. |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
43 $ hg clone a b |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
44 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
45 reposetup called for a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
46 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
47 reposetup called for b |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
48 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
49 updating to branch default |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
50 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
4569
622d8ed78b47
extensions: load modules in module/__init__.py form.
Brendan Cully <brendan@kublai.com>
parents:
4074
diff
changeset
|
51 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
52 $ hg bar |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
53 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
54 Bar |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
55 $ echo 'foobar = !' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
56 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
57 module/__init__.py-style |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
58 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
59 $ echo "barfoo = $barfoopath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
60 $ cd a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
61 $ hg foo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
62 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
63 reposetup called for a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
64 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
65 Foo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
66 $ echo 'barfoo = !' >> $HGRCPATH |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
67 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
68 Check that extensions are loaded in phases: |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
69 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
70 $ cat > foo.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
71 > import os |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
72 > name = os.path.basename(__file__).rsplit('.', 1)[0] |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
73 > print "1) %s imported" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
74 > def uisetup(ui): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
75 > print "2) %s uisetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
76 > def extsetup(): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
77 > print "3) %s extsetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
78 > def reposetup(ui, repo): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
79 > print "4) %s reposetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
80 > EOF |
4569
622d8ed78b47
extensions: load modules in module/__init__.py form.
Brendan Cully <brendan@kublai.com>
parents:
4074
diff
changeset
|
81 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
82 $ cp foo.py bar.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
83 $ echo 'foo = foo.py' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
84 $ echo 'bar = bar.py' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
85 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
86 Command with no output, we just want to see the extensions loaded: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
87 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
88 $ hg paths |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
89 1) foo imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
90 1) bar imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
91 2) foo uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
92 2) bar uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
93 3) foo extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
94 3) bar extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
95 4) foo reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
96 4) bar reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
97 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
98 Check hgweb's load order: |
4738
c41a404ac387
Handle extensions with defined but empty cmdtable
Brendan Cully <brendan@kublai.com>
parents:
4569
diff
changeset
|
99 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
100 $ cat > hgweb.cgi <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
101 > #!/usr/bin/env python |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
102 > from mercurial import demandimport; demandimport.enable() |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
103 > from mercurial.hgweb import hgweb |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
104 > from mercurial.hgweb import wsgicgi |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
105 > application = hgweb('.', 'test repo') |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
106 > wsgicgi.launch(application) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
107 > EOF |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
108 |
18646
c6a81e54c209
hgweb: make the test suite use hgweb in a more WSGI compliant way
Mads Kiilerich <mads@kiilerich.com>
parents:
18267
diff
changeset
|
109 $ REQUEST_METHOD='GET' PATH_INFO='/' SCRIPT_NAME='' QUERY_STRING='' \ |
c6a81e54c209
hgweb: make the test suite use hgweb in a more WSGI compliant way
Mads Kiilerich <mads@kiilerich.com>
parents:
18267
diff
changeset
|
110 > SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \ |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
111 > | grep '^[0-9]) ' # ignores HTML output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
112 1) foo imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
113 1) bar imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
114 2) foo uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
115 2) bar uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
116 3) foo extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
117 3) bar extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
118 4) foo reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
119 4) bar reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
120 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
121 $ echo 'foo = !' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
122 $ echo 'bar = !' >> $HGRCPATH |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
123 |
19932
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
124 Check "from __future__ import absolute_import" support for external libraries |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
125 |
20001
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
126 #if windows |
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
127 $ PATHSEP=";" |
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
128 #else |
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
129 $ PATHSEP=":" |
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
130 #endif |
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
131 $ export PATHSEP |
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
132 |
19932
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
133 $ mkdir $TESTTMP/libroot |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
134 $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
135 $ mkdir $TESTTMP/libroot/mod |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
136 $ touch $TESTTMP/libroot/mod/__init__.py |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
137 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
138 |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
139 #if absimport |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
140 $ cat > $TESTTMP/libroot/mod/ambigabs.py <<EOF |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
141 > from __future__ import absolute_import |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
142 > import ambig # should load "libroot/ambig.py" |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
143 > s = ambig.s |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
144 > EOF |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
145 $ cat > loadabs.py <<EOF |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
146 > import mod.ambigabs as ambigabs |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
147 > def extsetup(): |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
148 > print 'ambigabs.s=%s' % ambigabs.s |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
149 > EOF |
20001
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
150 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) |
19932
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
151 ambigabs.s=libroot/ambig.py |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
152 $TESTTMP/a (glob) |
19932
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
153 #endif |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
154 |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
155 #if no-py3k |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
156 $ cat > $TESTTMP/libroot/mod/ambigrel.py <<EOF |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
157 > import ambig # should load "libroot/mod/ambig.py" |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
158 > s = ambig.s |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
159 > EOF |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
160 $ cat > loadrel.py <<EOF |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
161 > import mod.ambigrel as ambigrel |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
162 > def extsetup(): |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
163 > print 'ambigrel.s=%s' % ambigrel.s |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
164 > EOF |
20001
a1f99a7f2d72
tests: choose the path separator in PYTHONPATH suitable for platform
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19933
diff
changeset
|
165 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) |
19932
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
166 ambigrel.s=libroot/mod/ambig.py |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
167 $TESTTMP/a (glob) |
19932
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
168 #endif |
e3a5922e18c3
demandimport: support "absolute_import" for external libraries (issue4029)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19822
diff
changeset
|
169 |
19933
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
170 Check absolute/relative import of extension specific modules |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
171 |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
172 $ mkdir $TESTTMP/extroot |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
173 $ cat > $TESTTMP/extroot/bar.py <<EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
174 > s = 'this is extroot.bar' |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
175 > EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
176 $ mkdir $TESTTMP/extroot/sub1 |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
177 $ cat > $TESTTMP/extroot/sub1/__init__.py <<EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
178 > s = 'this is extroot.sub1.__init__' |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
179 > EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
180 $ cat > $TESTTMP/extroot/sub1/baz.py <<EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
181 > s = 'this is extroot.sub1.baz' |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
182 > EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
183 $ cat > $TESTTMP/extroot/__init__.py <<EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
184 > s = 'this is extroot.__init__' |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
185 > import foo |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
186 > def extsetup(ui): |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
187 > ui.write('(extroot) ', foo.func(), '\n') |
28612
6fb1d3c936d2
tests: explicitly flush output streams
Jun Wu <quark@fb.com>
parents:
27990
diff
changeset
|
188 > ui.flush() |
19933
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
189 > EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
190 |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
191 $ cat > $TESTTMP/extroot/foo.py <<EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
192 > # test absolute import |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
193 > buf = [] |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
194 > def func(): |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
195 > # "not locals" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
196 > import extroot.bar |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
197 > buf.append('import extroot.bar in func(): %s' % extroot.bar.s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
198 > return '\n(extroot) '.join(buf) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
199 > # "fromlist == ('*',)" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
200 > from extroot.bar import * |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
201 > buf.append('from extroot.bar import *: %s' % s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
202 > # "not fromlist" and "if '.' in name" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
203 > import extroot.sub1.baz |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
204 > buf.append('import extroot.sub1.baz: %s' % extroot.sub1.baz.s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
205 > # "not fromlist" and NOT "if '.' in name" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
206 > import extroot |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
207 > buf.append('import extroot: %s' % extroot.s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
208 > # NOT "not fromlist" and NOT "level != -1" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
209 > from extroot.bar import s |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
210 > buf.append('from extroot.bar import s: %s' % s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
211 > EOF |
27491
28c1aa12f5de
test-extension: do not depend on demandimport (issue5012)
Jun Wu <quark@fb.com>
parents:
27152
diff
changeset
|
212 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.extroot=$TESTTMP/extroot root) |
19933
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
213 (extroot) from extroot.bar import *: this is extroot.bar |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
214 (extroot) import extroot.sub1.baz: this is extroot.sub1.baz |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
215 (extroot) import extroot: this is extroot.__init__ |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
216 (extroot) from extroot.bar import s: this is extroot.bar |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
217 (extroot) import extroot.bar in func(): this is extroot.bar |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
218 $TESTTMP/a (glob) |
19933
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
219 |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
220 #if no-py3k |
20002
83347ff50134
tests: quote environment variable to extract wildcard on MinGW environment
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20001
diff
changeset
|
221 $ rm "$TESTTMP"/extroot/foo.* |
19933
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
222 $ cat > $TESTTMP/extroot/foo.py <<EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
223 > # test relative import |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
224 > buf = [] |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
225 > def func(): |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
226 > # "not locals" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
227 > import bar |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
228 > buf.append('import bar in func(): %s' % bar.s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
229 > return '\n(extroot) '.join(buf) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
230 > # "fromlist == ('*',)" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
231 > from bar import * |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
232 > buf.append('from bar import *: %s' % s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
233 > # "not fromlist" and "if '.' in name" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
234 > import sub1.baz |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
235 > buf.append('import sub1.baz: %s' % sub1.baz.s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
236 > # "not fromlist" and NOT "if '.' in name" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
237 > import sub1 |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
238 > buf.append('import sub1: %s' % sub1.s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
239 > # NOT "not fromlist" and NOT "level != -1" case |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
240 > from bar import s |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
241 > buf.append('from bar import s: %s' % s) |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
242 > EOF |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
243 $ hg --config extensions.extroot=$TESTTMP/extroot root |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
244 (extroot) from bar import *: this is extroot.bar |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
245 (extroot) import sub1.baz: this is extroot.sub1.baz |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
246 (extroot) import sub1: this is extroot.sub1.__init__ |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
247 (extroot) from bar import s: this is extroot.bar |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
248 (extroot) import bar in func(): this is extroot.bar |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
249 $TESTTMP/a (glob) |
19933
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
250 #endif |
621a26eb3a99
demandimport: allow extensions to import own modules by absolute name
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19932
diff
changeset
|
251 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
252 $ cd .. |
9661
c4f6c02e33c4
hgweb: added test case for extension loading phases (issue1824)
Yuya Nishihara <yuya@tcha.org>
parents:
9410
diff
changeset
|
253 |
17014
50fbe9063ff2
tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16853
diff
changeset
|
254 hide outer repo |
50fbe9063ff2
tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16853
diff
changeset
|
255 $ hg init |
50fbe9063ff2
tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16853
diff
changeset
|
256 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
257 $ cat > empty.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
258 > '''empty cmdtable |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
259 > ''' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
260 > cmdtable = {} |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
261 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
262 $ emptypath=`pwd`/empty.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
263 $ echo "empty = $emptypath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
264 $ hg help empty |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
265 empty extension - empty cmdtable |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
266 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
267 no commands defined |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
268 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
269 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
270 $ echo 'empty = !' >> $HGRCPATH |
9661
c4f6c02e33c4
hgweb: added test case for extension loading phases (issue1824)
Yuya Nishihara <yuya@tcha.org>
parents:
9410
diff
changeset
|
271 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
272 $ cat > debugextension.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
273 > '''only debugcommands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
274 > ''' |
21254
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
275 > from mercurial import cmdutil |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
276 > cmdtable = {} |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
277 > command = cmdutil.command(cmdtable) |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
278 > @command('debugfoobar', [], 'hg debugfoobar') |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
279 > def debugfoobar(ui, repo, *args, **opts): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
280 > "yet another debug command" |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
281 > pass |
21254
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
282 > @command('foo', [], 'hg foo') |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
283 > def foo(ui, repo, *args, **opts): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
284 > """yet another foo command |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
285 > This command has been DEPRECATED since forever. |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
286 > """ |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
287 > pass |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
288 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
289 $ debugpath=`pwd`/debugextension.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
290 $ echo "debugextension = $debugpath" >> $HGRCPATH |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
291 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
292 $ hg help debugextension |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
293 hg debugextensions |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
294 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
295 show information about active extensions |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
296 |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
297 options: |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
298 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
299 (some details hidden, use --verbose to show complete help) |
4950
93b7e2fa7ee3
help: avoid traceback if an extension has only debug commands
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4738
diff
changeset
|
300 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
301 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
302 $ hg --verbose help debugextension |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
303 hg debugextensions |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
304 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
305 show information about active extensions |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
306 |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
307 options: |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
308 |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
309 -T --template TEMPLATE display with template (EXPERIMENTAL) |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
310 |
22117
c1d93edcf004
help: fold repeatable option message into option table header
Matt Mackall <mpm@selenic.com>
parents:
22113
diff
changeset
|
311 global options ([+] can be repeated): |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
312 |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
313 -R --repository REPO repository root directory or name of overlay bundle |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
314 file |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
315 --cwd DIR change working directory |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
316 -y --noninteractive do not prompt, automatically pick the first choice for |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
317 all prompts |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
318 -q --quiet suppress output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
319 -v --verbose enable additional output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
320 --config CONFIG [+] set/override config option (use 'section.name=value') |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
321 --debug enable debugging output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
322 --debugger start debugger |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
323 --encoding ENCODE set the charset encoding (default: ascii) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
324 --encodingmode MODE set the charset encoding mode (default: strict) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
325 --traceback always print a traceback on exception |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
326 --time time how long the command takes |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
327 --profile print command execution profile |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
328 --version output version information and exit |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
329 -h --help display help and exit |
18267
5bb610f87d1d
clfilter: enforce hidden changeset globally
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18224
diff
changeset
|
330 --hidden consider hidden changesets |
9128
98d90ad54749
commands: hide deprecated commands.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
8189
diff
changeset
|
331 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
332 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
333 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
334 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
335 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
336 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
337 $ hg --debug help debugextension |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
338 hg debugextensions |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
339 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
340 show information about active extensions |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
341 |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
342 options: |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
343 |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
344 -T --template TEMPLATE display with template (EXPERIMENTAL) |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
345 |
22117
c1d93edcf004
help: fold repeatable option message into option table header
Matt Mackall <mpm@selenic.com>
parents:
22113
diff
changeset
|
346 global options ([+] can be repeated): |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
347 |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
348 -R --repository REPO repository root directory or name of overlay bundle |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
349 file |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
350 --cwd DIR change working directory |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
351 -y --noninteractive do not prompt, automatically pick the first choice for |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
352 all prompts |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
353 -q --quiet suppress output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
354 -v --verbose enable additional output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
355 --config CONFIG [+] set/override config option (use 'section.name=value') |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
356 --debug enable debugging output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
357 --debugger start debugger |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
358 --encoding ENCODE set the charset encoding (default: ascii) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
359 --encodingmode MODE set the charset encoding mode (default: strict) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
360 --traceback always print a traceback on exception |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
361 --time time how long the command takes |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
362 --profile print command execution profile |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
363 --version output version information and exit |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
364 -h --help display help and exit |
18267
5bb610f87d1d
clfilter: enforce hidden changeset globally
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18224
diff
changeset
|
365 --hidden consider hidden changesets |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
366 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
367 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
368 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
369 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
370 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
371 $ echo 'debugextension = !' >> $HGRCPATH |
7011
7da76778dbd7
Do not try to load extensions twice (issue811)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5523
diff
changeset
|
372 |
27152
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
373 Asking for help about a deprecated extension should do something useful: |
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
374 |
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
375 $ hg help glog |
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
376 'glog' is provided by the following extension: |
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
377 |
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
378 graphlog command to view revision graphs from a shell (DEPRECATED) |
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
379 |
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
380 (use "hg help extensions" for information on enabling extensions) |
ac27b1b3be85
help: make help deprecated mention the extension
timeless <timeless@mozdev.org>
parents:
27142
diff
changeset
|
381 |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
382 Extension module help vs command help: |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
383 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
384 $ echo 'extdiff =' >> $HGRCPATH |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
385 $ hg help extdiff |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
386 hg extdiff [OPT]... [FILE]... |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
387 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
388 use external program to diff repository (or selected files) |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
389 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
390 Show differences between revisions for the specified files, using an |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
391 external program. The default program used is diff, with default options |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
392 "-Npru". |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
393 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
394 To select a different program, use the -p/--program option. The program |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
395 will be passed the names of two directories to compare. To pass additional |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
396 options to the program, use -o/--option. These will be passed before the |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
397 names of the directories to compare. |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
398 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
399 When two revision arguments are given, then changes are shown between |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
400 those revisions. If only one revision is specified then that revision is |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
401 compared to the working directory, and, when no revisions are specified, |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
402 the working directory files are compared to its parent. |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
403 |
22112
d968f4741a22
help: normalize extension shadow hint
Matt Mackall <mpm@selenic.com>
parents:
22111
diff
changeset
|
404 (use "hg help -e extdiff" to show help for the extdiff extension) |
14285
aa64a87b493d
help: give hint about 'hg help -e' when appropriate
Martin Geisler <mg@aragost.com>
parents:
14284
diff
changeset
|
405 |
22117
c1d93edcf004
help: fold repeatable option message into option table header
Matt Mackall <mpm@selenic.com>
parents:
22113
diff
changeset
|
406 options ([+] can be repeated): |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
407 |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
408 -p --program CMD comparison program to run |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
409 -o --option OPT [+] pass option to comparison program |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
410 -r --rev REV [+] revision |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
411 -c --change REV change made by revision |
26228
0fd20a71abdb
extdiff: add a --patch argument for diffing changeset deltas
Matt Harbison <matt_harbison@yahoo.com>
parents:
26219
diff
changeset
|
412 --patch compare patches for two revisions |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
413 -I --include PATTERN [+] include names matching the given patterns |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
414 -X --exclude PATTERN [+] exclude names matching the given patterns |
25813
18bae5eb58c5
extdiff: add support for subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
24257
diff
changeset
|
415 -S --subrepos recurse into subrepositories |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
416 |
22110
26f7c8033bed
help: tweak --verbose command help hint
Matt Mackall <mpm@selenic.com>
parents:
21937
diff
changeset
|
417 (some details hidden, use --verbose to show complete help) |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
418 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
419 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
420 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
421 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
422 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
423 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
424 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
425 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
426 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
427 |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
428 $ hg help --extension extdiff |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
429 extdiff extension - command to allow external programs to compare revisions |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
430 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
431 The extdiff Mercurial extension allows you to use external programs to compare |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
432 revisions, or revision with working directory. The external diff programs are |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
433 called with a configurable set of options and two non-option arguments: paths |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
434 to directories containing snapshots of files to compare. |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
435 |
14327
d943412e2fba
extdiff: grammar "allows to" -> "allows one to"
Javi Merino <cibervicho@gmail.com>
parents:
14286
diff
changeset
|
436 The extdiff extension also allows you to configure new diff commands, so you |
27729
58f8b29c37ff
minirst: change hgrole to use single quotes
timeless <timeless@mozdev.org>
parents:
27491
diff
changeset
|
437 do not need to type 'hg extdiff -p kdiff3' always. |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
438 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
439 [extdiff] |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
440 # add new command that runs GNU diff(1) in 'context diff' mode |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
441 cdiff = gdiff -Nprc5 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
442 ## or the old way: |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
443 #cmd.cdiff = gdiff |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
444 #opts.cdiff = -Nprc5 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
445 |
23150
aff73c777b0b
extdiff: allow a preconfigured merge-tool to be invoked
Matt Harbison <matt_harbison@yahoo.com>
parents:
22947
diff
changeset
|
446 # add new command called meld, runs meld (no need to name twice). If |
aff73c777b0b
extdiff: allow a preconfigured merge-tool to be invoked
Matt Harbison <matt_harbison@yahoo.com>
parents:
22947
diff
changeset
|
447 # the meld executable is not available, the meld tool in [merge-tools] |
aff73c777b0b
extdiff: allow a preconfigured merge-tool to be invoked
Matt Harbison <matt_harbison@yahoo.com>
parents:
22947
diff
changeset
|
448 # will be used, if available |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
449 meld = |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
450 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
451 # add new command called vimdiff, runs gvimdiff with DirDiff plugin |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
452 # (see http://www.vim.org/scripts/script.php?script_id=102) Non |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
453 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
454 # your .vimrc |
16242
55174ab81973
extdiff: escape filenames with vim/DirDiff and make quoting work with Windows
Thomas Arendsen Hein <thomas@intevation.de>
parents:
15862
diff
changeset
|
455 vimdiff = gvim -f "+next" \ |
55174ab81973
extdiff: escape filenames with vim/DirDiff and make quoting work with Windows
Thomas Arendsen Hein <thomas@intevation.de>
parents:
15862
diff
changeset
|
456 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
457 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
458 Tool arguments can include variables that are expanded at runtime: |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
459 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
460 $parent1, $plabel1 - filename, descriptive label of first parent |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
461 $child, $clabel - filename, descriptive label of child revision |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
462 $parent2, $plabel2 - filename, descriptive label of second parent |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
463 $root - repository root |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
464 $parent is an alias for $parent1. |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
465 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
466 The extdiff extension will look in your [diff-tools] and [merge-tools] |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
467 sections for diff tool arguments, when none are specified in [extdiff]. |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
468 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
469 [extdiff] |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
470 kdiff3 = |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
471 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
472 [diff-tools] |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
473 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
474 |
27729
58f8b29c37ff
minirst: change hgrole to use single quotes
timeless <timeless@mozdev.org>
parents:
27491
diff
changeset
|
475 You can use -I/-X and list of file or directory names like normal 'hg diff' |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
476 command. The extdiff extension makes snapshots of only needed files, so |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
477 running the external diff program will actually be pretty fast (at least |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
478 faster than having to compare the entire tree). |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
479 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
480 list of commands: |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
481 |
16853
7863ff383894
help: format command and option list help using RST
Olav Reinert <seroton10@gmail.com>
parents:
16744
diff
changeset
|
482 extdiff use external program to diff repository (or selected files) |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
483 |
23624
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
484 (use "hg help -v -e extdiff" to show built-in aliases and global options) |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
485 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
486 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
487 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
488 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
489 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
490 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
491 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
492 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
493 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
494 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
495 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
496 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
497 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
498 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
499 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
500 |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
501 $ echo 'extdiff = !' >> $HGRCPATH |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
502 |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
503 Test help topic with same name as extension |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
504 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
505 $ cat > multirevs.py <<EOF |
21254
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
506 > from mercurial import cmdutil, commands |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
507 > cmdtable = {} |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20003
diff
changeset
|
508 > command = cmdutil.command(cmdtable) |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
509 > """multirevs extension |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
510 > Big multi-line module docstring.""" |
21773
26d2fb899637
tests: define norepo in command decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21289
diff
changeset
|
511 > @command('multirevs', [], 'ARG', norepo=True) |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
512 > def multirevs(ui, repo, arg, *args, **opts): |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
513 > """multirevs command""" |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
514 > pass |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
515 > EOF |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
516 $ echo "multirevs = multirevs.py" >> $HGRCPATH |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
517 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
518 $ hg help multirevs |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
519 Specifying Multiple Revisions |
18748
6e676fb6ea44
help: use a full header for topic titles
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
18646
diff
changeset
|
520 """"""""""""""""""""""""""""" |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
521 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
522 When Mercurial accepts more than one revision, they may be specified |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
523 individually, or provided as a topologically continuous range, separated |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
524 by the ":" character. |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
525 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
526 The syntax of range notation is [BEGIN]:[END], where BEGIN and END are |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
527 revision identifiers. Both BEGIN and END are optional. If BEGIN is not |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
528 specified, it defaults to revision number 0. If END is not specified, it |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
529 defaults to the tip. The range ":" thus means "all revisions". |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
530 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
531 If BEGIN is greater than END, revisions are treated in reverse order. |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
532 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
533 A range acts as a closed interval. This means that a range of 3:5 gives 3, |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
534 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
535 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
536 use "hg help -c multirevs" to see help for the multirevs command |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
537 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
538 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
539 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
540 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
541 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
542 |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
543 $ hg help -c multirevs |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
544 hg multirevs ARG |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
545 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
546 multirevs command |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
547 |
22110
26f7c8033bed
help: tweak --verbose command help hint
Matt Mackall <mpm@selenic.com>
parents:
21937
diff
changeset
|
548 (some details hidden, use --verbose to show complete help) |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
549 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
550 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
551 |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
552 $ hg multirevs |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
553 hg multirevs: invalid arguments |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
554 hg multirevs ARG |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
555 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
556 multirevs command |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
557 |
22111
aa5e256839d5
help: improve command summary hint
Matt Mackall <mpm@selenic.com>
parents:
22110
diff
changeset
|
558 (use "hg multirevs -h" to show more help) |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
559 [255] |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
560 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
561 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
562 |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
563 $ echo "multirevs = !" >> $HGRCPATH |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
564 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12327
diff
changeset
|
565 Issue811: Problem loading extensions twice (by site and by user) |
7011
7da76778dbd7
Do not try to load extensions twice (issue811)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5523
diff
changeset
|
566 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
567 $ cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
568 > mq = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
569 > strip = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
570 > hgext.mq = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
571 > hgext/mq = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
572 > EOF |
7011
7da76778dbd7
Do not try to load extensions twice (issue811)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5523
diff
changeset
|
573 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
574 Show extensions: |
19822
a194a33f8cb2
mq: prepare a strip extension for extraction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19777
diff
changeset
|
575 (note that mq force load strip, also checking it's not loaded twice) |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
576 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
577 $ hg debugextensions |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
26263
diff
changeset
|
578 mq |
19822
a194a33f8cb2
mq: prepare a strip extension for extraction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19777
diff
changeset
|
579 strip |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
580 |
23624
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
581 For extensions, which name matches one of its commands, help |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
582 message should ask '-v -e' to get list of built-in aliases |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
583 along with extension help itself |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
584 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
585 $ mkdir $TESTTMP/d |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
586 $ cat > $TESTTMP/d/dodo.py <<EOF |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
587 > """ |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
588 > This is an awesome 'dodo' extension. It does nothing and |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
589 > writes 'Foo foo' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
590 > """ |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
591 > from mercurial import cmdutil, commands |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
592 > cmdtable = {} |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
593 > command = cmdutil.command(cmdtable) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
594 > @command('dodo', [], 'hg dodo') |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
595 > def dodo(ui, *args, **kwargs): |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
596 > """Does nothing""" |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
597 > ui.write("I do nothing. Yay\\n") |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
598 > @command('foofoo', [], 'hg foofoo') |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
599 > def foofoo(ui, *args, **kwargs): |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
600 > """Writes 'Foo foo'""" |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
601 > ui.write("Foo foo\\n") |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
602 > EOF |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
603 $ dodopath=$TESTTMP/d/dodo.py |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
604 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
605 $ echo "dodo = $dodopath" >> $HGRCPATH |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
606 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
607 Make sure that user is asked to enter '-v -e' to get list of built-in aliases |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
608 $ hg help -e dodo |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
609 dodo extension - |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
610 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
611 This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
612 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
613 list of commands: |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
614 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
615 dodo Does nothing |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
616 foofoo Writes 'Foo foo' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
617 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
618 (use "hg help -v -e dodo" to show built-in aliases and global options) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
619 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
620 Make sure that '-v -e' prints list of built-in aliases along with |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
621 extension help itself |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
622 $ hg help -v -e dodo |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
623 dodo extension - |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
624 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
625 This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
626 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
627 list of commands: |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
628 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
629 dodo Does nothing |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
630 foofoo Writes 'Foo foo' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
631 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
632 global options ([+] can be repeated): |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
633 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
634 -R --repository REPO repository root directory or name of overlay bundle |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
635 file |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
636 --cwd DIR change working directory |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
637 -y --noninteractive do not prompt, automatically pick the first choice for |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
638 all prompts |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
639 -q --quiet suppress output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
640 -v --verbose enable additional output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
641 --config CONFIG [+] set/override config option (use 'section.name=value') |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
642 --debug enable debugging output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
643 --debugger start debugger |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
644 --encoding ENCODE set the charset encoding (default: ascii) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
645 --encodingmode MODE set the charset encoding mode (default: strict) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
646 --traceback always print a traceback on exception |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
647 --time time how long the command takes |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
648 --profile print command execution profile |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
649 --version output version information and exit |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
650 -h --help display help and exit |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
651 --hidden consider hidden changesets |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
652 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
653 Make sure that single '-v' option shows help and built-ins only for 'dodo' command |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
654 $ hg help -v dodo |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
655 hg dodo |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
656 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
657 Does nothing |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
658 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
659 (use "hg help -e dodo" to show help for the dodo extension) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
660 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
661 options: |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
662 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
663 --mq operate on patch repository |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
664 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
665 global options ([+] can be repeated): |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
666 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
667 -R --repository REPO repository root directory or name of overlay bundle |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
668 file |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
669 --cwd DIR change working directory |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
670 -y --noninteractive do not prompt, automatically pick the first choice for |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
671 all prompts |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
672 -q --quiet suppress output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
673 -v --verbose enable additional output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
674 --config CONFIG [+] set/override config option (use 'section.name=value') |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
675 --debug enable debugging output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
676 --debugger start debugger |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
677 --encoding ENCODE set the charset encoding (default: ascii) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
678 --encodingmode MODE set the charset encoding mode (default: strict) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
679 --traceback always print a traceback on exception |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
680 --time time how long the command takes |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
681 --profile print command execution profile |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
682 --version output version information and exit |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
683 -h --help display help and exit |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
684 --hidden consider hidden changesets |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
685 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
686 In case when extension name doesn't match any of its commands, |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
687 help message should ask for '-v' to get list of built-in aliases |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
688 along with extension help |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
689 $ cat > $TESTTMP/d/dudu.py <<EOF |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
690 > """ |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
691 > This is an awesome 'dudu' extension. It does something and |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
692 > also writes 'Beep beep' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
693 > """ |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
694 > from mercurial import cmdutil, commands |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
695 > cmdtable = {} |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
696 > command = cmdutil.command(cmdtable) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
697 > @command('something', [], 'hg something') |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
698 > def something(ui, *args, **kwargs): |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
699 > """Does something""" |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
700 > ui.write("I do something. Yaaay\\n") |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
701 > @command('beep', [], 'hg beep') |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
702 > def beep(ui, *args, **kwargs): |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
703 > """Writes 'Beep beep'""" |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
704 > ui.write("Beep beep\\n") |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
705 > EOF |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
706 $ dudupath=$TESTTMP/d/dudu.py |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
707 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
708 $ echo "dudu = $dudupath" >> $HGRCPATH |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
709 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
710 $ hg help -e dudu |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
711 dudu extension - |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
712 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
713 This is an awesome 'dudu' extension. It does something and also writes 'Beep |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
714 beep' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
715 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
716 list of commands: |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
717 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
718 beep Writes 'Beep beep' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
719 something Does something |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
720 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
721 (use "hg help -v dudu" to show built-in aliases and global options) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
722 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
723 In case when extension name doesn't match any of its commands, |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
724 help options '-v' and '-v -e' should be equivalent |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
725 $ hg help -v dudu |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
726 dudu extension - |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
727 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
728 This is an awesome 'dudu' extension. It does something and also writes 'Beep |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
729 beep' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
730 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
731 list of commands: |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
732 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
733 beep Writes 'Beep beep' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
734 something Does something |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
735 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
736 global options ([+] can be repeated): |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
737 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
738 -R --repository REPO repository root directory or name of overlay bundle |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
739 file |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
740 --cwd DIR change working directory |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
741 -y --noninteractive do not prompt, automatically pick the first choice for |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
742 all prompts |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
743 -q --quiet suppress output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
744 -v --verbose enable additional output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
745 --config CONFIG [+] set/override config option (use 'section.name=value') |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
746 --debug enable debugging output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
747 --debugger start debugger |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
748 --encoding ENCODE set the charset encoding (default: ascii) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
749 --encodingmode MODE set the charset encoding mode (default: strict) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
750 --traceback always print a traceback on exception |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
751 --time time how long the command takes |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
752 --profile print command execution profile |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
753 --version output version information and exit |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
754 -h --help display help and exit |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
755 --hidden consider hidden changesets |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
756 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
757 $ hg help -v -e dudu |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
758 dudu extension - |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
759 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
760 This is an awesome 'dudu' extension. It does something and also writes 'Beep |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
761 beep' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
762 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
763 list of commands: |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
764 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
765 beep Writes 'Beep beep' |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
766 something Does something |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
767 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
768 global options ([+] can be repeated): |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
769 |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
770 -R --repository REPO repository root directory or name of overlay bundle |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
771 file |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
772 --cwd DIR change working directory |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
773 -y --noninteractive do not prompt, automatically pick the first choice for |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
774 all prompts |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
775 -q --quiet suppress output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
776 -v --verbose enable additional output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
777 --config CONFIG [+] set/override config option (use 'section.name=value') |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
778 --debug enable debugging output |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
779 --debugger start debugger |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
780 --encoding ENCODE set the charset encoding (default: ascii) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
781 --encodingmode MODE set the charset encoding mode (default: strict) |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
782 --traceback always print a traceback on exception |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
783 --time time how long the command takes |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
784 --profile print command execution profile |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
785 --version output version information and exit |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
786 -h --help display help and exit |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
787 --hidden consider hidden changesets |
861ddedfb402
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)
Chingis Dugarzhapov <chingis.dug@gmail.com>
parents:
23172
diff
changeset
|
788 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
789 Disabled extension commands: |
10364
de1e7099d100
dispatch: provide help for disabled extensions and commands
Brodie Rao <me+hg@dackz.net>
parents:
9802
diff
changeset
|
790 |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
791 $ ORGHGRCPATH=$HGRCPATH |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
792 $ HGRCPATH= |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
793 $ export HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
794 $ hg help email |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
795 'email' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
796 |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15447
diff
changeset
|
797 patchbomb command to send changesets as (a series of) patch emails |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
798 |
22113
2d2cb5e50095
help: normalize hint about enabling extensions
Matt Mackall <mpm@selenic.com>
parents:
22112
diff
changeset
|
799 (use "hg help extensions" for information on enabling extensions) |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
800 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
801 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
802 $ hg qdel |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
803 hg: unknown command 'qdel' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
804 'qdelete' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
805 |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15447
diff
changeset
|
806 mq manage a stack of patches |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
807 |
22113
2d2cb5e50095
help: normalize hint about enabling extensions
Matt Mackall <mpm@selenic.com>
parents:
22112
diff
changeset
|
808 (use "hg help extensions" for information on enabling extensions) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12191
diff
changeset
|
809 [255] |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
810 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
811 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
812 $ hg churn |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
813 hg: unknown command 'churn' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
814 'churn' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
815 |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15447
diff
changeset
|
816 churn command to display statistics about repository history |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
817 |
22113
2d2cb5e50095
help: normalize hint about enabling extensions
Matt Mackall <mpm@selenic.com>
parents:
22112
diff
changeset
|
818 (use "hg help extensions" for information on enabling extensions) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12191
diff
changeset
|
819 [255] |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
820 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
821 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
822 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
823 Disabled extensions: |
10364
de1e7099d100
dispatch: provide help for disabled extensions and commands
Brodie Rao <me+hg@dackz.net>
parents:
9802
diff
changeset
|
824 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
825 $ hg help churn |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
826 churn extension - command to display statistics about repository history |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
827 |
22113
2d2cb5e50095
help: normalize hint about enabling extensions
Matt Mackall <mpm@selenic.com>
parents:
22112
diff
changeset
|
828 (use "hg help extensions" for information on enabling extensions) |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
829 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
830 $ hg help patchbomb |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
831 patchbomb extension - command to send changesets as (a series of) patch emails |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
832 |
22113
2d2cb5e50095
help: normalize hint about enabling extensions
Matt Mackall <mpm@selenic.com>
parents:
22112
diff
changeset
|
833 (use "hg help extensions" for information on enabling extensions) |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
834 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
835 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
836 Broken disabled extension and command: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
837 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
838 $ mkdir hgext |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
839 $ echo > hgext/__init__.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
840 $ cat > hgext/broken.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
841 > "broken extension' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
842 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
843 $ cat > path.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
844 > import os, sys |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
845 > sys.path.insert(0, os.environ['HGEXTPATH']) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
846 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
847 $ HGEXTPATH=`pwd` |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
848 $ export HGEXTPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
849 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
850 $ hg --config extensions.path=./path.py help broken |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
851 broken extension - (no help text available) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
852 |
22113
2d2cb5e50095
help: normalize hint about enabling extensions
Matt Mackall <mpm@selenic.com>
parents:
22112
diff
changeset
|
853 (use "hg help extensions" for information on enabling extensions) |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
854 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
855 |
13191
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
856 $ cat > hgext/forest.py <<EOF |
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
857 > cmdtable = None |
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
858 > EOF |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
859 $ hg --config extensions.path=./path.py help foo > /dev/null |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15202
diff
changeset
|
860 warning: error finding commands in $TESTTMP/hgext/forest.py (glob) |
21289
c3784e3c3e8d
help: suggest keyword search when no topic is found
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21254
diff
changeset
|
861 abort: no such help topic: foo |
c3784e3c3e8d
help: suggest keyword search when no topic is found
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21254
diff
changeset
|
862 (try "hg help --keyword foo") |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12191
diff
changeset
|
863 [255] |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
864 |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
865 $ cat > throw.py <<EOF |
23871
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
866 > from mercurial import cmdutil, commands, util |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
867 > cmdtable = {} |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
868 > command = cmdutil.command(cmdtable) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
869 > class Bogon(Exception): pass |
21773
26d2fb899637
tests: define norepo in command decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21289
diff
changeset
|
870 > @command('throw', [], 'hg throw', norepo=True) |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
871 > def throw(ui, **opts): |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
872 > """throws an exception""" |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
873 > raise Bogon() |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
874 > EOF |
23869
d9967b82394a
test-extension: improve test readability
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23624
diff
changeset
|
875 |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
876 No declared supported version, extension complains: |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
877 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
878 ** Unknown exception encountered with possibly-broken third-party extension throw |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
879 ** which supports versions unknown of Mercurial. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
880 ** Please disable throw and try your action again. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
881 ** If that fixes the bug please report it to the extension author. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
882 ** Python * (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
883 ** Mercurial Distributed SCM * (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
884 ** Extensions loaded: throw |
23869
d9967b82394a
test-extension: improve test readability
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23624
diff
changeset
|
885 |
18224
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
886 empty declaration of supported version, extension complains: |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
887 $ echo "testedwith = ''" >> throw.py |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
888 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
889 ** Unknown exception encountered with possibly-broken third-party extension throw |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
890 ** which supports versions unknown of Mercurial. |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
891 ** Please disable throw and try your action again. |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
892 ** If that fixes the bug please report it to the extension author. |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
893 ** Python * (glob) |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
894 ** Mercurial Distributed SCM (*) (glob) |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
895 ** Extensions loaded: throw |
23869
d9967b82394a
test-extension: improve test readability
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23624
diff
changeset
|
896 |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
897 If the extension specifies a buglink, show that: |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
898 $ echo 'buglink = "http://example.com/bts"' >> throw.py |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
899 $ rm -f throw.pyc throw.pyo |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
900 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
901 ** Unknown exception encountered with possibly-broken third-party extension throw |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
902 ** which supports versions unknown of Mercurial. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
903 ** Please disable throw and try your action again. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
904 ** If that fixes the bug please report it to http://example.com/bts |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
905 ** Python * (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
906 ** Mercurial Distributed SCM (*) (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
907 ** Extensions loaded: throw |
23869
d9967b82394a
test-extension: improve test readability
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23624
diff
changeset
|
908 |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
909 If the extensions declare outdated versions, accuse the older extension first: |
17227
7af38fe1f829
test-extension.t: use fixed version string instead of current tag
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17014
diff
changeset
|
910 $ echo "from mercurial import util" >> older.py |
7af38fe1f829
test-extension.t: use fixed version string instead of current tag
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17014
diff
changeset
|
911 $ echo "util.version = lambda:'2.2'" >> older.py |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
912 $ echo "testedwith = '1.9.3'" >> older.py |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
913 $ echo "testedwith = '2.1.1'" >> throw.py |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
914 $ rm -f throw.pyc throw.pyo |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
915 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
916 > throw 2>&1 | egrep '^\*\*' |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
917 ** Unknown exception encountered with possibly-broken third-party extension older |
23871
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
918 ** which supports versions 1.9 of Mercurial. |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
919 ** Please disable older and try your action again. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
920 ** If that fixes the bug please report it to the extension author. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
921 ** Python * (glob) |
17228
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
922 ** Mercurial Distributed SCM (version 2.2) |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
923 ** Extensions loaded: throw, older |
23869
d9967b82394a
test-extension: improve test readability
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23624
diff
changeset
|
924 |
17228
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
925 One extension only tested with older, one only with newer versions: |
23870
9070e20057ae
test-extension: use a realistic Mercurial version
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23869
diff
changeset
|
926 $ echo "util.version = lambda:'2.1'" >> older.py |
17228
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
927 $ rm -f older.pyc older.pyo |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
928 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
929 > throw 2>&1 | egrep '^\*\*' |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
930 ** Unknown exception encountered with possibly-broken third-party extension older |
23871
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
931 ** which supports versions 1.9 of Mercurial. |
17228
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
932 ** Please disable older and try your action again. |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
933 ** If that fixes the bug please report it to the extension author. |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
934 ** Python * (glob) |
23870
9070e20057ae
test-extension: use a realistic Mercurial version
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23869
diff
changeset
|
935 ** Mercurial Distributed SCM (version 2.1) |
17228
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
936 ** Extensions loaded: throw, older |
23869
d9967b82394a
test-extension: improve test readability
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23624
diff
changeset
|
937 |
17228
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
938 Older extension is tested with current version, the other only with newer: |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
939 $ echo "util.version = lambda:'1.9.3'" >> older.py |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
940 $ rm -f older.pyc older.pyo |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
941 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
942 > throw 2>&1 | egrep '^\*\*' |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
943 ** Unknown exception encountered with possibly-broken third-party extension throw |
23871
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
944 ** which supports versions 2.1 of Mercurial. |
17228
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
945 ** Please disable throw and try your action again. |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
946 ** If that fixes the bug please report it to http://example.com/bts |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
947 ** Python * (glob) |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
948 ** Mercurial Distributed SCM (version 1.9.3) |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
949 ** Extensions loaded: throw, older |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
950 |
26263
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
951 Ability to point to a different point |
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
952 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
953 > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | egrep '^\*\*' |
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
954 ** unknown exception encountered, please report by visiting |
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
955 ** Your Local Goat Lenders |
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
956 ** Python * (glob) |
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
957 ** Mercurial Distributed SCM (*) (glob) |
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
958 ** Extensions loaded: throw, older |
bf2bfc6f45fb
traceback: allow providing a local support contact point
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26228
diff
changeset
|
959 |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
960 Declare the version as supporting this hg version, show regular bts link: |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
22118
diff
changeset
|
961 $ hgver=`$PYTHON -c 'from mercurial import util; print util.version().split("+")[0]'` |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
962 $ echo 'testedwith = """'"$hgver"'"""' >> throw.py |
24257
31e9f66863f3
test: make version based test-extensions failure more explanatory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24124
diff
changeset
|
963 $ if [ -z "$hgver" ]; then |
31e9f66863f3
test: make version based test-extensions failure more explanatory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24124
diff
changeset
|
964 > echo "unable to fetch a mercurial version. Make sure __version__ is correct"; |
31e9f66863f3
test: make version based test-extensions failure more explanatory
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24124
diff
changeset
|
965 > fi |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
966 $ rm -f throw.pyc throw.pyo |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
967 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
968 ** unknown exception encountered, please report by visiting |
26421
4b0fc75f9403
urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents:
26351
diff
changeset
|
969 ** https://mercurial-scm.org/wiki/BugTracker |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
970 ** Python * (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
971 ** Mercurial Distributed SCM (*) (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
972 ** Extensions loaded: throw |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
973 |
23871
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
974 Patch version is ignored during compatibility check |
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
975 $ echo "testedwith = '3.2'" >> throw.py |
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
976 $ echo "util.version = lambda:'3.2.2'" >> throw.py |
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
977 $ rm -f throw.pyc throw.pyo |
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
978 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
979 ** unknown exception encountered, please report by visiting |
26421
4b0fc75f9403
urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents:
26351
diff
changeset
|
980 ** https://mercurial-scm.org/wiki/BugTracker |
23871
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
981 ** Python * (glob) |
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
982 ** Mercurial Distributed SCM (*) (glob) |
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
983 ** Extensions loaded: throw |
b2d8f3685b06
dispatch: only check compatibility against major and minor versions (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23870
diff
changeset
|
984 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
985 Test version number support in 'hg version': |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
986 $ echo '__version__ = (1, 2, 3)' >> throw.py |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
987 $ rm -f throw.pyc throw.pyo |
21937
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
988 $ hg version -v |
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
989 Mercurial Distributed SCM (version *) (glob) |
26421
4b0fc75f9403
urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents:
26351
diff
changeset
|
990 (see https://mercurial-scm.org for more information) |
21937
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
991 |
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
992 Copyright (C) 2005-* Matt Mackall and others (glob) |
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
993 This is free software; see the source for copying conditions. There is NO |
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
994 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
995 |
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
996 Enabled extensions: |
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
997 |
54ff2789d75e
version: don't traceback if no extensions to list (issue4312)
Matt Mackall <mpm@selenic.com>
parents:
21849
diff
changeset
|
998 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
999 $ hg version -v --config extensions.throw=throw.py |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1000 Mercurial Distributed SCM (version *) (glob) |
26421
4b0fc75f9403
urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents:
26351
diff
changeset
|
1001 (see https://mercurial-scm.org for more information) |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1002 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1003 Copyright (C) 2005-* Matt Mackall and others (glob) |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1004 This is free software; see the source for copying conditions. There is NO |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1005 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1006 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1007 Enabled extensions: |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1008 |
27990
96bfd2875213
version: verbose list internal and external extension source (issue4731)
liscju <piotr.listkiewicz@gmail.com>
parents:
27729
diff
changeset
|
1009 throw external 1.2.3 |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1010 $ echo 'getversion = lambda: "1.twentythree"' >> throw.py |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1011 $ rm -f throw.pyc throw.pyo |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1012 $ hg version -v --config extensions.throw=throw.py |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1013 Mercurial Distributed SCM (version *) (glob) |
26421
4b0fc75f9403
urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents:
26351
diff
changeset
|
1014 (see https://mercurial-scm.org for more information) |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1015 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1016 Copyright (C) 2005-* Matt Mackall and others (glob) |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1017 This is free software; see the source for copying conditions. There is NO |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1018 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1019 |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1020 Enabled extensions: |
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1021 |
27990
96bfd2875213
version: verbose list internal and external extension source (issue4731)
liscju <piotr.listkiewicz@gmail.com>
parents:
27729
diff
changeset
|
1022 throw external 1.twentythree |
21849
a3306b8cdc0f
test-extension: add check for 'hg version -v' listing enabled extensions
Augie Fackler <raf@durin42.com>
parents:
21773
diff
changeset
|
1023 |
27142
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1024 Refuse to load extensions with minimum version requirements |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1025 |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1026 $ cat > minversion1.py << EOF |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1027 > from mercurial import util |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1028 > util.version = lambda: '3.5.2' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1029 > minimumhgversion = '3.6' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1030 > EOF |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1031 $ hg --config extensions.minversion=minversion1.py version |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1032 (third party extension minversion requires version 3.6 or newer of Mercurial; disabling) |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1033 Mercurial Distributed SCM (version 3.5.2) |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1034 (see https://mercurial-scm.org for more information) |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1035 |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1036 Copyright (C) 2005-* Matt Mackall and others (glob) |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1037 This is free software; see the source for copying conditions. There is NO |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1038 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1039 |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1040 $ cat > minversion2.py << EOF |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1041 > from mercurial import util |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1042 > util.version = lambda: '3.6' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1043 > minimumhgversion = '3.7' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1044 > EOF |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1045 $ hg --config extensions.minversion=minversion2.py version 2>&1 | egrep '\(third' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1046 (third party extension minversion requires version 3.7 or newer of Mercurial; disabling) |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1047 |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1048 Can load version that is only off by point release |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1049 |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1050 $ cat > minversion2.py << EOF |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1051 > from mercurial import util |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1052 > util.version = lambda: '3.6.1' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1053 > minimumhgversion = '3.6' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1054 > EOF |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1055 $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1056 [1] |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1057 |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1058 Can load minimum version identical to current |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1059 |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1060 $ cat > minversion3.py << EOF |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1061 > from mercurial import util |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1062 > util.version = lambda: '3.5' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1063 > minimumhgversion = '3.5' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1064 > EOF |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1065 $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1066 [1] |
060f83d219b9
extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com>
parents:
26421
diff
changeset
|
1067 |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1068 Restore HGRCPATH |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1069 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1070 $ HGRCPATH=$ORGHGRCPATH |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1071 $ export HGRCPATH |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1072 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1073 Commands handling multiple repositories at a time should invoke only |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1074 "reposetup()" of extensions enabling in the target repository. |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1075 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1076 $ mkdir reposetup-test |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1077 $ cd reposetup-test |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1078 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1079 $ cat > $TESTTMP/reposetuptest.py <<EOF |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1080 > from mercurial import extensions |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1081 > def reposetup(ui, repo): |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1082 > ui.write('reposetup() for %s\n' % (repo.root)) |
28612
6fb1d3c936d2
tests: explicitly flush output streams
Jun Wu <quark@fb.com>
parents:
27990
diff
changeset
|
1083 > ui.flush() |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1084 > EOF |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1085 $ hg init src |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1086 $ echo a > src/a |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1087 $ hg -R src commit -Am '#0 at src/a' |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1088 adding a |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1089 $ echo '[extensions]' >> src/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1090 $ echo '# enable extension locally' >> src/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1091 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1092 $ hg -R src status |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1093 reposetup() for $TESTTMP/reposetup-test/src (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1094 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1095 $ hg clone -U src clone-dst1 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1096 reposetup() for $TESTTMP/reposetup-test/src (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1097 $ hg init push-dst1 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1098 $ hg -q -R src push push-dst1 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1099 reposetup() for $TESTTMP/reposetup-test/src (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1100 $ hg init pull-src1 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1101 $ hg -q -R pull-src1 pull src |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1102 reposetup() for $TESTTMP/reposetup-test/src (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1103 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1104 $ cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1105 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1106 > # disable extension globally and explicitly |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1107 > reposetuptest = ! |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1108 > EOF |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1109 $ hg clone -U src clone-dst2 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1110 reposetup() for $TESTTMP/reposetup-test/src (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1111 $ hg init push-dst2 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1112 $ hg -q -R src push push-dst2 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1113 reposetup() for $TESTTMP/reposetup-test/src (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1114 $ hg init pull-src2 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1115 $ hg -q -R pull-src2 pull src |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1116 reposetup() for $TESTTMP/reposetup-test/src (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1117 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1118 $ cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1119 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1120 > # enable extension globally |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1121 > reposetuptest = $TESTTMP/reposetuptest.py |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1122 > EOF |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1123 $ hg clone -U src clone-dst3 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1124 reposetup() for $TESTTMP/reposetup-test/src (glob) |
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1125 reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1126 $ hg init push-dst3 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1127 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1128 $ hg -q -R src push push-dst3 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1129 reposetup() for $TESTTMP/reposetup-test/src (glob) |
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1130 reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1131 $ hg init pull-src3 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1132 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1133 $ hg -q -R pull-src3 pull src |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1134 reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob) |
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1135 reposetup() for $TESTTMP/reposetup-test/src (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1136 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1137 $ echo '[extensions]' >> src/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1138 $ echo '# disable extension locally' >> src/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1139 $ echo 'reposetuptest = !' >> src/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1140 $ hg clone -U src clone-dst4 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1141 reposetup() for $TESTTMP/reposetup-test/clone-dst4 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1142 $ hg init push-dst4 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1143 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1144 $ hg -q -R src push push-dst4 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1145 reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1146 $ hg init pull-src4 |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1147 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1148 $ hg -q -R pull-src4 pull src |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1149 reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1150 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1151 disabling in command line overlays with all configuration |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1152 $ hg --config extensions.reposetuptest=! clone -U src clone-dst5 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1153 $ hg --config extensions.reposetuptest=! init push-dst5 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1154 $ hg --config extensions.reposetuptest=! -q -R src push push-dst5 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1155 $ hg --config extensions.reposetuptest=! init pull-src5 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1156 $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1157 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1158 $ cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1159 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1160 > # disable extension globally and explicitly |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1161 > reposetuptest = ! |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23151
diff
changeset
|
1162 > EOF |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1163 $ hg init parent |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1164 $ hg init parent/sub1 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1165 $ echo 1 > parent/sub1/1 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1166 $ hg -R parent/sub1 commit -Am '#0 at parent/sub1' |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1167 adding 1 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1168 $ hg init parent/sub2 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1169 $ hg init parent/sub2/sub21 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1170 $ echo 21 > parent/sub2/sub21/21 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1171 $ hg -R parent/sub2/sub21 commit -Am '#0 at parent/sub2/sub21' |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1172 adding 21 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1173 $ cat > parent/sub2/.hgsub <<EOF |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1174 > sub21 = sub21 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1175 > EOF |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1176 $ hg -R parent/sub2 commit -Am '#0 at parent/sub2' |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1177 adding .hgsub |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1178 $ hg init parent/sub3 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1179 $ echo 3 > parent/sub3/3 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1180 $ hg -R parent/sub3 commit -Am '#0 at parent/sub3' |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1181 adding 3 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1182 $ cat > parent/.hgsub <<EOF |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1183 > sub1 = sub1 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1184 > sub2 = sub2 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1185 > sub3 = sub3 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1186 > EOF |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1187 $ hg -R parent commit -Am '#0 at parent' |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1188 adding .hgsub |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1189 $ echo '[extensions]' >> parent/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1190 $ echo '# enable extension locally' >> parent/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1191 $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1192 $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1193 $ hg -R parent status -S -A |
20003
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1194 reposetup() for $TESTTMP/reposetup-test/parent (glob) |
dcd3c47e464b
tests: end output lines including path with "(glob)" to pass on Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20002
diff
changeset
|
1195 reposetup() for $TESTTMP/reposetup-test/parent/sub2 (glob) |
19777
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1196 C .hgsub |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1197 C .hgsubstate |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1198 C sub1/1 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1199 C sub2/.hgsub |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1200 C sub2/.hgsubstate |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1201 C sub2/sub21/21 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1202 C sub3/3 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1203 |
6f72e7d28b35
extensions: list up only enabled extensions, if "ui" is specified
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18748
diff
changeset
|
1204 $ cd .. |
24124
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1205 |
28623
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1206 Test compatibility with extension commands that don't use @command (issue5137) |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1207 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1208 $ hg init deprecated |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1209 $ cd deprecated |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1210 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1211 $ cat <<EOF > deprecatedcmd.py |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1212 > def deprecatedcmd(repo, ui): |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1213 > pass |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1214 > cmdtable = { |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1215 > 'deprecatedcmd': (deprecatedcmd, [], ''), |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1216 > } |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1217 > EOF |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1218 $ cat <<EOF > .hg/hgrc |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1219 > [extensions] |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1220 > deprecatedcmd = `pwd`/deprecatedcmd.py |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1221 > mq = ! |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1222 > hgext.mq = ! |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1223 > hgext/mq = ! |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1224 > [alias] |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1225 > deprecatedalias = deprecatedcmd |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1226 > EOF |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1227 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1228 $ hg deprecatedcmd |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1229 devel-warn: missing attribute 'norepo', use @command decorator to register 'deprecatedcmd' |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1230 (compatibility will be dropped after Mercurial-3.8, update your code.) at: * (glob) |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1231 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1232 $ hg deprecatedalias |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1233 devel-warn: missing attribute 'norepo', use @command decorator to register 'deprecatedalias' |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1234 (compatibility will be dropped after Mercurial-3.8, update your code.) at: * (glob) |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1235 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1236 no warning unless command is executed: |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1237 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1238 $ hg paths |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1239 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1240 but mq iterates over command table: |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1241 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1242 $ hg --config extensions.mq= paths |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1243 devel-warn: missing attribute 'norepo', use @command decorator to register 'deprecatedcmd' |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1244 (compatibility will be dropped after Mercurial-3.8, update your code.) at: * (glob) |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1245 |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1246 $ cd .. |
38dc3f28f478
dispatch: show deprecation warning if command has no attributes (issue5137)
Yuya Nishihara <yuya@tcha.org>
parents:
28612
diff
changeset
|
1247 |
24124
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1248 Test synopsis and docstring extending |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1249 |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1250 $ hg init exthelp |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1251 $ cat > exthelp.py <<EOF |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1252 > from mercurial import commands, extensions |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1253 > def exbookmarks(orig, *args, **opts): |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1254 > return orig(*args, **opts) |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1255 > def uisetup(ui): |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1256 > synopsis = ' GREPME [--foo] [-x]' |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1257 > docstring = ''' |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1258 > GREPME make sure that this is in the help! |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1259 > ''' |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1260 > extensions.wrapcommand(commands.table, 'bookmarks', exbookmarks, |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1261 > synopsis, docstring) |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1262 > EOF |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1263 $ abspath=`pwd`/exthelp.py |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1264 $ echo '[extensions]' >> $HGRCPATH |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1265 $ echo "exthelp = $abspath" >> $HGRCPATH |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1266 $ cd exthelp |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1267 $ hg help bookmarks | grep GREPME |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1268 hg bookmarks [OPTIONS]... [NAME]... GREPME [--foo] [-x] |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1269 GREPME make sure that this is in the help! |
042d95beeee8
extensions: allow extending command synopsis and docstring
Ryan McElroy <rm@fb.com>
parents:
23871
diff
changeset
|
1270 |