Mercurial > hg
annotate tests/test-extension.t @ 13290:82133e91ce7d
record: turn consumefile() into a pure function
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 23 Jan 2011 12:44:05 +0100 |
parents | 1aea66b71f4f |
children | 1f9e11f65cd7 |
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 $ "$TESTDIR/hghave" no-outer-repo || exit 80 |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
4 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
5 $ cat > foobar.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
6 > import os |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
7 > from mercurial import commands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
8 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
9 > def uisetup(ui): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
10 > ui.write("uisetup called\\n") |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
11 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
12 > def reposetup(ui, repo): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
13 > 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
|
14 > ui.write("ui %s= repo.ui\\n" % (ui == repo.ui and "=" or "!")) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
15 > |
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") |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
18 > |
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 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
22 > cmdtable = { |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
23 > "foo": (foo, [], "hg foo"), |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
24 > "bar": (bar, [], "hg bar"), |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
25 > } |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
26 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
27 > commands.norepo += ' bar' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
28 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
29 $ 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
|
30 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
31 $ mkdir barfoo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
32 $ cp foobar.py barfoo/__init__.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
33 $ barfoopath=`pwd`/barfoo |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
34 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
35 $ hg init a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
36 $ cd a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
37 $ echo foo > file |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
38 $ hg add file |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
39 $ 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
|
40 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
41 $ echo '[extensions]' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
42 $ echo "foobar = $abspath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
43 $ hg foo |
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 Foo |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
48 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
49 $ cd .. |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
50 $ hg clone a b |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
51 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
52 reposetup called for a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
53 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
54 reposetup called for b |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
55 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
56 updating to branch default |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
57 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
|
58 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
59 $ hg bar |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
60 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
61 Bar |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
62 $ echo 'foobar = !' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
63 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
64 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
|
65 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
66 $ echo "barfoo = $barfoopath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
67 $ cd a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
68 $ hg foo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
69 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
70 reposetup called for a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
71 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
72 Foo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
73 $ echo 'barfoo = !' >> $HGRCPATH |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
74 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
75 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
|
76 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
77 $ cat > foo.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
78 > import os |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
79 > name = os.path.basename(__file__).rsplit('.', 1)[0] |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
80 > print "1) %s imported" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
81 > def uisetup(ui): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
82 > print "2) %s uisetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
83 > def extsetup(): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
84 > print "3) %s extsetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
85 > def reposetup(ui, repo): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
86 > print "4) %s reposetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
87 > EOF |
4569
622d8ed78b47
extensions: load modules in module/__init__.py form.
Brendan Cully <brendan@kublai.com>
parents:
4074
diff
changeset
|
88 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
89 $ cp foo.py bar.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
90 $ echo 'foo = foo.py' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
91 $ echo 'bar = bar.py' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
92 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
93 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
|
94 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
95 $ hg paths |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
96 1) foo imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
97 1) bar imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
98 2) foo uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
99 2) bar uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
100 3) foo extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
101 3) bar extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
102 4) foo reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
103 4) bar reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
104 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
105 Check hgweb's load order: |
4738
c41a404ac387
Handle extensions with defined but empty cmdtable
Brendan Cully <brendan@kublai.com>
parents:
4569
diff
changeset
|
106 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
107 $ cat > hgweb.cgi <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
108 > #!/usr/bin/env python |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
109 > from mercurial import demandimport; demandimport.enable() |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
110 > from mercurial.hgweb import hgweb |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
111 > from mercurial.hgweb import wsgicgi |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
112 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
113 > application = hgweb('.', 'test repo') |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
114 > wsgicgi.launch(application) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
115 > EOF |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
116 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
117 $ SCRIPT_NAME='/' SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \ |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
118 > | grep '^[0-9]) ' # ignores HTML output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
119 1) foo imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
120 1) bar imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
121 2) foo uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
122 2) bar uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
123 3) foo extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
124 3) bar extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
125 4) foo reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
126 4) bar reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
127 4) foo reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
128 4) bar reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
129 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
130 $ echo 'foo = !' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
131 $ echo 'bar = !' >> $HGRCPATH |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
132 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
133 $ cd .. |
9661
c4f6c02e33c4
hgweb: added test case for extension loading phases (issue1824)
Yuya Nishihara <yuya@tcha.org>
parents:
9410
diff
changeset
|
134 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
135 $ cat > empty.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
136 > '''empty cmdtable |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
137 > ''' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
138 > cmdtable = {} |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
139 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
140 $ emptypath=`pwd`/empty.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
141 $ echo "empty = $emptypath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
142 $ hg help empty |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
143 empty extension - empty cmdtable |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
144 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
145 no commands defined |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
146 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
147 $ echo 'empty = !' >> $HGRCPATH |
9661
c4f6c02e33c4
hgweb: added test case for extension loading phases (issue1824)
Yuya Nishihara <yuya@tcha.org>
parents:
9410
diff
changeset
|
148 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
149 $ cat > debugextension.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
150 > '''only debugcommands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
151 > ''' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
152 > def debugfoobar(ui, repo, *args, **opts): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
153 > "yet another debug command" |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
154 > pass |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
155 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
156 > def foo(ui, repo, *args, **opts): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
157 > """yet another foo command |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
158 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
159 > This command has been DEPRECATED since forever. |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
160 > """ |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
161 > pass |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
162 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
163 > cmdtable = { |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
164 > "debugfoobar": (debugfoobar, (), "hg debugfoobar"), |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
165 > "foo": (foo, (), "hg foo") |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
166 > } |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
167 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
168 $ debugpath=`pwd`/debugextension.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
169 $ echo "debugextension = $debugpath" >> $HGRCPATH |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
170 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
171 $ hg help debugextension |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
172 debugextension extension - only debugcommands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
173 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
174 no commands defined |
4950
93b7e2fa7ee3
help: avoid traceback if an extension has only debug commands
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4738
diff
changeset
|
175 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
176 $ hg --verbose help debugextension |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
177 debugextension extension - only debugcommands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
178 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
179 list of commands: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
180 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
181 foo: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
182 yet another foo command |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
183 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
184 global options: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
185 -R --repository REPO repository root directory or name of overlay bundle |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
186 file |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
187 --cwd DIR change working directory |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
188 -y --noninteractive do not prompt, assume 'yes' for any required answers |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
189 -q --quiet suppress output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
190 -v --verbose enable additional output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
191 --config CONFIG [+] set/override config option (use 'section.name=value') |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
192 --debug enable debugging output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
193 --debugger start debugger |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
194 --encoding ENCODE set the charset encoding (default: ascii) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
195 --encodingmode MODE set the charset encoding mode (default: strict) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
196 --traceback always print a traceback on exception |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
197 --time time how long the command takes |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
198 --profile print command execution profile |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
199 --version output version information and exit |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
200 -h --help display help and exit |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
201 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
202 [+] marked option can be specified multiple times |
9128
98d90ad54749
commands: hide deprecated commands.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
8189
diff
changeset
|
203 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
204 $ hg --debug help debugextension |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
205 debugextension extension - only debugcommands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
206 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
207 list of commands: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
208 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
209 debugfoobar: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
210 yet another debug command |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
211 foo: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
212 yet another foo command |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
213 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
214 global options: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
215 -R --repository REPO repository root directory or name of overlay bundle |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
216 file |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
217 --cwd DIR change working directory |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
218 -y --noninteractive do not prompt, assume 'yes' for any required answers |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
219 -q --quiet suppress output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
220 -v --verbose enable additional output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
221 --config CONFIG [+] set/override config option (use 'section.name=value') |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
222 --debug enable debugging output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
223 --debugger start debugger |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
224 --encoding ENCODE set the charset encoding (default: ascii) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
225 --encodingmode MODE set the charset encoding mode (default: strict) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
226 --traceback always print a traceback on exception |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
227 --time time how long the command takes |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
228 --profile print command execution profile |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
229 --version output version information and exit |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
230 -h --help display help and exit |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
231 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
232 [+] marked option can be specified multiple times |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
233 $ echo 'debugextension = !' >> $HGRCPATH |
7011
7da76778dbd7
Do not try to load extensions twice (issue811)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5523
diff
changeset
|
234 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12327
diff
changeset
|
235 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
|
236 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
237 $ debugpath=`pwd`/debugissue811.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
238 $ cat > debugissue811.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
239 > '''show all loaded extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
240 > ''' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
241 > from mercurial import extensions, commands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
242 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
243 > def debugextensions(ui): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
244 > "yet another debug command" |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
245 > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()])) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
246 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
247 > cmdtable = {"debugextensions": (debugextensions, (), "hg debugextensions")} |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
248 > commands.norepo += " debugextensions" |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
249 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
250 $ echo "debugissue811 = $debugpath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
251 $ echo "mq=" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
252 $ echo "hgext.mq=" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
253 $ echo "hgext/mq=" >> $HGRCPATH |
7011
7da76778dbd7
Do not try to load extensions twice (issue811)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5523
diff
changeset
|
254 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
255 Show extensions: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
256 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
257 $ hg debugextensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
258 debugissue811 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
259 mq |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
260 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
261 Disabled extension commands: |
10364
de1e7099d100
dispatch: provide help for disabled extensions and commands
Brodie Rao <me+hg@dackz.net>
parents:
9802
diff
changeset
|
262 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
263 $ HGRCPATH= |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
264 $ export HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
265 $ hg help email |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
266 'email' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
267 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
268 patchbomb command to send changesets as (a series of) patch emails |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
269 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
270 use "hg help extensions" for information on enabling extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
271 $ hg qdel |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
272 hg: unknown command 'qdel' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
273 'qdelete' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
274 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
275 mq manage a stack of patches |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
276 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
277 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
|
278 [255] |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
279 $ hg churn |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
280 hg: unknown command 'churn' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
281 'churn' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
282 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
283 churn command to display statistics about repository history |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
284 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
285 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
|
286 [255] |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
287 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
288 Disabled extensions: |
10364
de1e7099d100
dispatch: provide help for disabled extensions and commands
Brodie Rao <me+hg@dackz.net>
parents:
9802
diff
changeset
|
289 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
290 $ hg help churn |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
291 churn extension - command to display statistics about repository history |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
292 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
293 use "hg help extensions" for information on enabling extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
294 $ hg help patchbomb |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
295 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
|
296 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
297 use "hg help extensions" for information on enabling extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
298 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
299 Broken disabled extension and command: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
300 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
301 $ mkdir hgext |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
302 $ echo > hgext/__init__.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
303 $ cat > hgext/broken.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
304 > "broken extension' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
305 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
306 $ cat > path.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
307 > import os, sys |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
308 > sys.path.insert(0, os.environ['HGEXTPATH']) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
309 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
310 $ HGEXTPATH=`pwd` |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
311 $ export HGEXTPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
312 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
313 $ hg --config extensions.path=./path.py help broken |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
314 broken extension - (no help text available) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
315 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
316 use "hg help extensions" for information on enabling extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
317 |
13191
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
318 $ cat > hgext/forest.py <<EOF |
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
319 > cmdtable = None |
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
320 > EOF |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
321 $ hg --config extensions.path=./path.py help foo > /dev/null |
13191
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
322 warning: error finding commands in $TESTTMP/hgext/forest.py |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
323 hg: unknown command 'foo' |
13191
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
324 warning: error finding commands in $TESTTMP/hgext/forest.py |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12191
diff
changeset
|
325 [255] |