annotate tests/test-extension.t @ 14849:d87814992728 stable

commands: improve help for -y/--noninteractive Before, the help text said that Mercurial would assume 'yes' for all prompts, but this is confusing since many prompts don't have any 'yes' choice. It now more accurately describes what will happen.
author Martin Geisler <mg@aragost.com>
date Thu, 07 Jul 2011 10:32:30 +0200
parents d943412e2fba
children ff26712a0c50
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
14849
d87814992728 commands: improve help for -y/--noninteractive
Martin Geisler <mg@aragost.com>
parents: 14327
diff changeset
188 -y --noninteractive do not prompt, automatically pick the first choice
d87814992728 commands: improve help for -y/--noninteractive
Martin Geisler <mg@aragost.com>
parents: 14327
diff changeset
189 for all prompts
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
190 -q --quiet suppress output
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
191 -v --verbose enable additional output
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
192 --config CONFIG [+] set/override config option (use 'section.name=value')
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
193 --debug enable debugging output
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
194 --debugger start debugger
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
195 --encoding ENCODE set the charset encoding (default: ascii)
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
196 --encodingmode MODE set the charset encoding mode (default: strict)
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
197 --traceback always print a traceback on exception
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
198 --time time how long the command takes
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
199 --profile print command execution profile
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
200 --version output version information and exit
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
201 -h --help display help and exit
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
202
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
203 [+] marked option can be specified multiple times
9128
98d90ad54749 commands: hide deprecated commands.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8189
diff changeset
204
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
205 $ hg --debug help debugextension
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
206 debugextension extension - only debugcommands
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
207
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
208 list of commands:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
209
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
210 debugfoobar:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
211 yet another debug command
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
212 foo:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
213 yet another foo command
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
214
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
215 global options:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
216 -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
217 file
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
218 --cwd DIR change working directory
14849
d87814992728 commands: improve help for -y/--noninteractive
Martin Geisler <mg@aragost.com>
parents: 14327
diff changeset
219 -y --noninteractive do not prompt, automatically pick the first choice
d87814992728 commands: improve help for -y/--noninteractive
Martin Geisler <mg@aragost.com>
parents: 14327
diff changeset
220 for all prompts
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
221 -q --quiet suppress output
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
222 -v --verbose enable additional output
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
223 --config CONFIG [+] set/override config option (use 'section.name=value')
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
224 --debug enable debugging output
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
225 --debugger start debugger
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
226 --encoding ENCODE set the charset encoding (default: ascii)
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
227 --encodingmode MODE set the charset encoding mode (default: strict)
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
228 --traceback always print a traceback on exception
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
229 --time time how long the command takes
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
230 --profile print command execution profile
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
231 --version output version information and exit
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
232 -h --help display help and exit
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
233
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
234 [+] marked option can be specified multiple times
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
235 $ echo 'debugextension = !' >> $HGRCPATH
7011
7da76778dbd7 Do not try to load extensions twice (issue811)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
236
14284
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
237 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
238
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
239 $ echo 'extdiff =' >> $HGRCPATH
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
240 $ hg help extdiff
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
241 hg extdiff [OPT]... [FILE]...
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
242
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
243 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
244
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
245 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
246 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
247 "-Npru".
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
248
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
249 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
250 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
251 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
252 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
253
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
254 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
255 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
256 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
257 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
258
14285
aa64a87b493d help: give hint about 'hg help -e' when appropriate
Martin Geisler <mg@aragost.com>
parents: 14284
diff changeset
259 use "hg help -e extdiff" to show help for the extdiff extension
aa64a87b493d help: give hint about 'hg help -e' when appropriate
Martin Geisler <mg@aragost.com>
parents: 14284
diff changeset
260
14284
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
261 options:
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
262
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
263 -p --program CMD comparison program to run
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
264 -o --option OPT [+] pass option to comparison program
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
265 -r --rev REV [+] revision
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
266 -c --change REV change made by revision
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
267 -I --include PATTERN [+] include names matching the given patterns
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
268 -X --exclude PATTERN [+] exclude names matching the given patterns
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
269
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
270 [+] marked option can be specified multiple times
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
271
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
272 use "hg -v help extdiff" to show global options
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
273
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
274 $ hg help --extension extdiff
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
275 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
276
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
277 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
278 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
279 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
280 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
281
14327
d943412e2fba extdiff: grammar "allows to" -> "allows one to"
Javi Merino <cibervicho@gmail.com>
parents: 14286
diff changeset
282 The extdiff extension also allows you to configure new diff commands, so you
d943412e2fba extdiff: grammar "allows to" -> "allows one to"
Javi Merino <cibervicho@gmail.com>
parents: 14286
diff changeset
283 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
284
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
285 [extdiff]
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
286 # 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
287 cdiff = gdiff -Nprc5
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
288 ## or the old way:
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
289 #cmd.cdiff = gdiff
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
290 #opts.cdiff = -Nprc5
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
291
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
292 # add new command called vdiff, runs kdiff3
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
293 vdiff = kdiff3
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
294
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
295 # add new command called meld, runs meld (no need to name twice)
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
296 meld =
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
297
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
298 # 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
299 # (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
300 # 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
301 # your .vimrc
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
302 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)'
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
303
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
304 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
305
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
306 $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
307 $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
308 $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
309 $root - repository root
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
310 $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
311
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
312 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
313 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
314
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
315 [extdiff]
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
316 kdiff3 =
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
317
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
318 [diff-tools]
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
319 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
320
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
321 You can use -I/-X and list of file or directory names like normal "hg diff"
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
322 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
323 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
324 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
325
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
326 list of commands:
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
327
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
328 extdiff 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
329
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
330 use "hg -v help extdiff" to show builtin aliases and global options
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
331
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
332 $ echo 'extdiff = !' >> $HGRCPATH
1f9e11f65cd7 help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents: 13191
diff changeset
333
14286
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
334 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
335
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
336 $ cat > multirevs.py <<EOF
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
337 > from mercurial import commands
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
338 > """multirevs extension
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
339 > Big multi-line module docstring."""
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
340 > 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
341 > """multirevs command"""
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
342 > pass
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
343 > cmdtable = {
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
344 > "multirevs": (multirevs, [], 'ARG')
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
345 > }
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
346 > commands.norepo += ' multirevs'
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
347 > EOF
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
348 $ 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
349
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
350 $ hg help multirevs
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
351 Specifying Multiple Revisions
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
352
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
353 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
354 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
355 by the ":" character.
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
356
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
357 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
358 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
359 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
360 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
361
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
362 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
363
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
364 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
365 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
366
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
367 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
368
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
369 $ 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
370 hg multirevs ARG
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
371
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
372 multirevs command
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
373
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
374 use "hg -v help multirevs" to show global options
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
375
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
376 $ hg multirevs
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
377 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
378 hg multirevs ARG
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
379
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
380 multirevs command
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
381
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
382 use "hg help multirevs" to show the full help text
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
383 [255]
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
384
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
385 $ echo "multirevs = !" >> $HGRCPATH
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14285
diff changeset
386
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12327
diff changeset
387 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
388
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
389 $ debugpath=`pwd`/debugissue811.py
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
390 $ cat > debugissue811.py <<EOF
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
391 > '''show all loaded extensions
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
392 > '''
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
393 > from mercurial import extensions, commands
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
394 >
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
395 > def debugextensions(ui):
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
396 > "yet another debug command"
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
397 > 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
398 >
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
399 > cmdtable = {"debugextensions": (debugextensions, (), "hg debugextensions")}
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
400 > commands.norepo += " debugextensions"
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
401 > EOF
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
402 $ echo "debugissue811 = $debugpath" >> $HGRCPATH
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
403 $ echo "mq=" >> $HGRCPATH
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
404 $ echo "hgext.mq=" >> $HGRCPATH
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
405 $ 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
406
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
407 Show extensions:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
408
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
409 $ hg debugextensions
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
410 debugissue811
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
411 mq
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
412
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
413 Disabled extension commands:
10364
de1e7099d100 dispatch: provide help for disabled extensions and commands
Brodie Rao <me+hg@dackz.net>
parents: 9802
diff changeset
414
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
415 $ HGRCPATH=
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
416 $ export HGRCPATH
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
417 $ hg help email
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
418 'email' is provided by the following extension:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
419
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
420 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
421
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
422 use "hg help extensions" for information on enabling extensions
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
423 $ hg qdel
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
424 hg: unknown command 'qdel'
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
425 'qdelete' is provided by the following extension:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
426
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
427 mq manage a stack of patches
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
428
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
429 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
430 [255]
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
431 $ hg churn
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
432 hg: unknown command 'churn'
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
433 'churn' is provided by the following extension:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
434
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
435 churn command to display statistics about repository history
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
436
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
437 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
438 [255]
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
439
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
440 Disabled extensions:
10364
de1e7099d100 dispatch: provide help for disabled extensions and commands
Brodie Rao <me+hg@dackz.net>
parents: 9802
diff changeset
441
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
442 $ hg help churn
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
443 churn extension - command to display statistics about repository history
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
444
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
445 use "hg help extensions" for information on enabling extensions
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
446 $ hg help patchbomb
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
447 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
448
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
449 use "hg help extensions" for information on enabling extensions
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
450
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
451 Broken disabled extension and command:
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
452
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
453 $ mkdir hgext
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
454 $ echo > hgext/__init__.py
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
455 $ cat > hgext/broken.py <<EOF
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
456 > "broken extension'
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
457 > EOF
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
458 $ cat > path.py <<EOF
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
459 > import os, sys
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
460 > sys.path.insert(0, os.environ['HGEXTPATH'])
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
461 > EOF
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
462 $ HGEXTPATH=`pwd`
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
463 $ export HGEXTPATH
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
464
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
465 $ hg --config extensions.path=./path.py help broken
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
466 broken extension - (no help text available)
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
467
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
468 use "hg help extensions" for information on enabling extensions
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
469
13191
1aea66b71f4f extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
470 $ cat > hgext/forest.py <<EOF
1aea66b71f4f extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
471 > cmdtable = None
1aea66b71f4f extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
472 > EOF
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
473 $ 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
474 warning: error finding commands in $TESTTMP/hgext/forest.py
12191
56c74b2df53d tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents: 11070
diff changeset
475 hg: unknown command 'foo'
13191
1aea66b71f4f extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
476 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
477 [255]