Mercurial > hg
annotate tests/test-extension.t @ 18337:557c8522aec0
tests: better test coverage of merges of flags
This makes existing problems with merges of symlinks and files more obvious and
add test coverage for tricky merges without real common ancestors.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 15 Jan 2013 01:05:12 +0100 |
parents | 5bb610f87d1d |
children | c6a81e54c209 |
rev | line source |
---|---|
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
1 Test basic extension support |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
2 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
3 $ cat > foobar.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
4 > import os |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
5 > from mercurial import commands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
6 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
7 > def uisetup(ui): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
8 > ui.write("uisetup called\\n") |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
9 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
10 > def reposetup(ui, repo): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
11 > 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
|
12 > 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
|
13 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
14 > def foo(ui, *args, **kwargs): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
15 > ui.write("Foo\\n") |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
16 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
17 > def bar(ui, *args, **kwargs): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
18 > ui.write("Bar\\n") |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
19 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
20 > cmdtable = { |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
21 > "foo": (foo, [], "hg foo"), |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
22 > "bar": (bar, [], "hg bar"), |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
23 > } |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
24 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
25 > commands.norepo += ' bar' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
26 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
27 $ 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
|
28 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
29 $ mkdir barfoo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
30 $ cp foobar.py barfoo/__init__.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
31 $ barfoopath=`pwd`/barfoo |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
32 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
33 $ hg init a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
34 $ cd a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
35 $ echo foo > file |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
36 $ hg add file |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
37 $ 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
|
38 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
39 $ echo '[extensions]' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
40 $ echo "foobar = $abspath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
41 $ hg foo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
42 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
43 reposetup called for a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
44 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
45 Foo |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
46 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
47 $ cd .. |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
48 $ hg clone a b |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
49 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
50 reposetup called for a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
51 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
52 reposetup called for b |
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 updating to branch default |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
55 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
|
56 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
57 $ hg bar |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
58 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
59 Bar |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
60 $ echo 'foobar = !' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
61 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
62 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
|
63 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
64 $ echo "barfoo = $barfoopath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
65 $ cd a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
66 $ hg foo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
67 uisetup called |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
68 reposetup called for a |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
69 ui == repo.ui |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
70 Foo |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
71 $ echo 'barfoo = !' >> $HGRCPATH |
4064
5d9ede002453
install reposetup hook right after loading the extension
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
72 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
73 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
|
74 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
75 $ cat > foo.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
76 > import os |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
77 > name = os.path.basename(__file__).rsplit('.', 1)[0] |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
78 > print "1) %s imported" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
79 > def uisetup(ui): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
80 > print "2) %s uisetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
81 > def extsetup(): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
82 > print "3) %s extsetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
83 > def reposetup(ui, repo): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
84 > print "4) %s reposetup" % name |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
85 > EOF |
4569
622d8ed78b47
extensions: load modules in module/__init__.py form.
Brendan Cully <brendan@kublai.com>
parents:
4074
diff
changeset
|
86 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
87 $ cp foo.py bar.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
88 $ echo 'foo = foo.py' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
89 $ echo 'bar = bar.py' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
90 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
91 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
|
92 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
93 $ hg paths |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
94 1) foo imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
95 1) bar imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
96 2) foo uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
97 2) bar uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
98 3) foo extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
99 3) bar extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
100 4) foo reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
101 4) bar reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
102 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
103 Check hgweb's load order: |
4738
c41a404ac387
Handle extensions with defined but empty cmdtable
Brendan Cully <brendan@kublai.com>
parents:
4569
diff
changeset
|
104 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
105 $ cat > hgweb.cgi <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
106 > #!/usr/bin/env python |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
107 > from mercurial import demandimport; demandimport.enable() |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
108 > from mercurial.hgweb import hgweb |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
109 > from mercurial.hgweb import wsgicgi |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
110 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
111 > application = hgweb('.', 'test repo') |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
112 > wsgicgi.launch(application) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
113 > EOF |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
114 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
115 $ 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
|
116 > | grep '^[0-9]) ' # ignores HTML output |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
117 1) foo imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
118 1) bar imported |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
119 2) foo uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
120 2) bar uisetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
121 3) foo extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
122 3) bar extsetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
123 4) foo reposetup |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
124 4) bar reposetup |
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 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
128 $ echo 'foo = !' >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
129 $ echo 'bar = !' >> $HGRCPATH |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
130 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
131 $ cd .. |
9661
c4f6c02e33c4
hgweb: added test case for extension loading phases (issue1824)
Yuya Nishihara <yuya@tcha.org>
parents:
9410
diff
changeset
|
132 |
17014
50fbe9063ff2
tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16853
diff
changeset
|
133 hide outer repo |
50fbe9063ff2
tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16853
diff
changeset
|
134 $ hg init |
50fbe9063ff2
tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16853
diff
changeset
|
135 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
136 $ cat > empty.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
137 > '''empty cmdtable |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
138 > ''' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
139 > cmdtable = {} |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
140 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
141 $ emptypath=`pwd`/empty.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
142 $ echo "empty = $emptypath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
143 $ hg help empty |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
144 empty extension - empty cmdtable |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
145 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
146 no commands defined |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
147 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
148 $ echo 'empty = !' >> $HGRCPATH |
9661
c4f6c02e33c4
hgweb: added test case for extension loading phases (issue1824)
Yuya Nishihara <yuya@tcha.org>
parents:
9410
diff
changeset
|
149 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
150 $ cat > debugextension.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
151 > '''only debugcommands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
152 > ''' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
153 > def debugfoobar(ui, repo, *args, **opts): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
154 > "yet another debug command" |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
155 > pass |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
156 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
157 > def foo(ui, repo, *args, **opts): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
158 > """yet another foo command |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
159 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
160 > This command has been DEPRECATED since forever. |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
161 > """ |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
162 > pass |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
163 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
164 > cmdtable = { |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
165 > "debugfoobar": (debugfoobar, (), "hg debugfoobar"), |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
166 > "foo": (foo, (), "hg foo") |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
167 > } |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
168 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
169 $ debugpath=`pwd`/debugextension.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
170 $ echo "debugextension = $debugpath" >> $HGRCPATH |
9410
1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Martin Geisler <mg@lazybytes.net>
parents:
9128
diff
changeset
|
171 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
172 $ hg help debugextension |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
173 debugextension extension - only debugcommands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
174 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
175 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
|
176 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
177 $ hg --verbose help debugextension |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
178 debugextension extension - only debugcommands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
179 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
180 list of commands: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
181 |
16853
7863ff383894
help: format command and option list help using RST
Olav Reinert <seroton10@gmail.com>
parents:
16744
diff
changeset
|
182 foo yet another foo command |
12191
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: |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
185 |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
186 -R --repository REPO repository root directory or name of overlay bundle |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
187 file |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
188 --cwd DIR change working directory |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
189 -y --noninteractive do not prompt, automatically pick the first choice for |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
190 all prompts |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
191 -q --quiet suppress output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
192 -v --verbose enable additional output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
193 --config CONFIG [+] set/override config option (use 'section.name=value') |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
194 --debug enable debugging output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
195 --debugger start debugger |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
196 --encoding ENCODE set the charset encoding (default: ascii) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
197 --encodingmode MODE set the charset encoding mode (default: strict) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
198 --traceback always print a traceback on exception |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
199 --time time how long the command takes |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
200 --profile print command execution profile |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
201 --version output version information and exit |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
202 -h --help display help and exit |
18267
5bb610f87d1d
clfilter: enforce hidden changeset globally
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18224
diff
changeset
|
203 --hidden consider hidden changesets |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
204 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
205 [+] marked option can be specified multiple times |
9128
98d90ad54749
commands: hide deprecated commands.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
8189
diff
changeset
|
206 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
207 $ hg --debug help debugextension |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
208 debugextension extension - only debugcommands |
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 list of commands: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
211 |
16853
7863ff383894
help: format command and option list help using RST
Olav Reinert <seroton10@gmail.com>
parents:
16744
diff
changeset
|
212 debugfoobar yet another debug command |
7863ff383894
help: format command and option list help using RST
Olav Reinert <seroton10@gmail.com>
parents:
16744
diff
changeset
|
213 foo yet another foo command |
12191
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: |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
216 |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
217 -R --repository REPO repository root directory or name of overlay bundle |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
218 file |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
219 --cwd DIR change working directory |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
220 -y --noninteractive do not prompt, automatically pick the first choice for |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
221 all prompts |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
222 -q --quiet suppress output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
223 -v --verbose enable additional output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
224 --config CONFIG [+] set/override config option (use 'section.name=value') |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
225 --debug enable debugging output |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
226 --debugger start debugger |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
227 --encoding ENCODE set the charset encoding (default: ascii) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
228 --encodingmode MODE set the charset encoding mode (default: strict) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
229 --traceback always print a traceback on exception |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
230 --time time how long the command takes |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
231 --profile print command execution profile |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
232 --version output version information and exit |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
233 -h --help display help and exit |
18267
5bb610f87d1d
clfilter: enforce hidden changeset globally
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18224
diff
changeset
|
234 --hidden consider hidden changesets |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
235 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
236 [+] marked option can be specified multiple times |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
237 $ echo 'debugextension = !' >> $HGRCPATH |
7011
7da76778dbd7
Do not try to load extensions twice (issue811)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5523
diff
changeset
|
238 |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
239 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
|
240 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
241 $ echo 'extdiff =' >> $HGRCPATH |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
242 $ hg help extdiff |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
243 hg extdiff [OPT]... [FILE]... |
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 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
|
246 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
247 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
|
248 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
|
249 "-Npru". |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
250 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
251 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
|
252 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
|
253 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
|
254 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
|
255 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
256 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
|
257 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
|
258 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
|
259 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
|
260 |
14285
aa64a87b493d
help: give hint about 'hg help -e' when appropriate
Martin Geisler <mg@aragost.com>
parents:
14284
diff
changeset
|
261 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
|
262 |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
263 options: |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
264 |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
265 -p --program CMD comparison program to run |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
266 -o --option OPT [+] pass option to comparison program |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
267 -r --rev REV [+] revision |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
268 -c --change REV change made by revision |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
269 -I --include PATTERN [+] include names matching the given patterns |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
14849
diff
changeset
|
270 -X --exclude PATTERN [+] exclude names matching the given patterns |
14284
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 [+] 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
|
273 |
17837
b623e323c561
help: indicate help omitting if help document is not fully displayed
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17228
diff
changeset
|
274 use "hg -v help extdiff" to show the global options |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
275 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
276 $ hg help --extension extdiff |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
277 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
|
278 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
279 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
|
280 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
|
281 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
|
282 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
|
283 |
14327
d943412e2fba
extdiff: grammar "allows to" -> "allows one to"
Javi Merino <cibervicho@gmail.com>
parents:
14286
diff
changeset
|
284 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
|
285 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
|
286 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
287 [extdiff] |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
288 # 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
|
289 cdiff = gdiff -Nprc5 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
290 ## or the old way: |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
291 #cmd.cdiff = gdiff |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
292 #opts.cdiff = -Nprc5 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
293 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
294 # 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
|
295 vdiff = kdiff3 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
296 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
297 # 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
|
298 meld = |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
299 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
300 # 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
|
301 # (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
|
302 # 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
|
303 # your .vimrc |
16242
55174ab81973
extdiff: escape filenames with vim/DirDiff and make quoting work with Windows
Thomas Arendsen Hein <thomas@intevation.de>
parents:
15862
diff
changeset
|
304 vimdiff = gvim -f "+next" \ |
55174ab81973
extdiff: escape filenames with vim/DirDiff and make quoting work with Windows
Thomas Arendsen Hein <thomas@intevation.de>
parents:
15862
diff
changeset
|
305 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
306 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
307 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
|
308 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
309 $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
|
310 $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
|
311 $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
|
312 $root - repository root |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
313 $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
|
314 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
315 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
|
316 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
|
317 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
318 [extdiff] |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
319 kdiff3 = |
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 [diff-tools] |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
322 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
|
323 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
324 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
|
325 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
|
326 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
|
327 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
|
328 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
329 list of commands: |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
330 |
16853
7863ff383894
help: format command and option list help using RST
Olav Reinert <seroton10@gmail.com>
parents:
16744
diff
changeset
|
331 extdiff use external program to diff repository (or selected files) |
14284
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
332 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
333 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
|
334 |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
335 $ echo 'extdiff = !' >> $HGRCPATH |
1f9e11f65cd7
help: add -e/--extension switch to display extension help text
Henri Wiechers <hwiechers@gmail.com>
parents:
13191
diff
changeset
|
336 |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
337 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
|
338 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
339 $ 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
|
340 > 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
|
341 > """multirevs extension |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
342 > 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
|
343 > 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
|
344 > """multirevs command""" |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
345 > pass |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
346 > cmdtable = { |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
347 > "multirevs": (multirevs, [], 'ARG') |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
348 > } |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
349 > commands.norepo += ' multirevs' |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
350 > EOF |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
351 $ 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
|
352 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
353 $ hg help multirevs |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
354 Specifying Multiple Revisions |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
355 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
356 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
|
357 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
|
358 by the ":" character. |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
359 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
360 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
|
361 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
|
362 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
|
363 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
|
364 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
365 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
|
366 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
367 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
|
368 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
|
369 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
370 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
|
371 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
372 $ 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
|
373 hg multirevs ARG |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
374 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
375 multirevs command |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
376 |
17837
b623e323c561
help: indicate help omitting if help document is not fully displayed
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17228
diff
changeset
|
377 use "hg -v help multirevs" to show the global options |
14286
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
378 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
379 $ hg multirevs |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
380 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
|
381 hg multirevs ARG |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
382 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
383 multirevs command |
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 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
|
386 [255] |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
387 |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
388 $ echo "multirevs = !" >> $HGRCPATH |
005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents:
14285
diff
changeset
|
389 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12327
diff
changeset
|
390 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
|
391 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
392 $ debugpath=`pwd`/debugissue811.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
393 $ cat > debugissue811.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
394 > '''show all loaded extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
395 > ''' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
396 > from mercurial import extensions, commands |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
397 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
398 > def debugextensions(ui): |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
399 > "yet another debug command" |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
400 > 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
|
401 > |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
402 > cmdtable = {"debugextensions": (debugextensions, (), "hg debugextensions")} |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
403 > commands.norepo += " debugextensions" |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
404 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
405 $ echo "debugissue811 = $debugpath" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
406 $ echo "mq=" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
407 $ echo "hgext.mq=" >> $HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
408 $ 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
|
409 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
410 Show extensions: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
411 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
412 $ hg debugextensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
413 debugissue811 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
414 mq |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
415 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
416 Disabled extension commands: |
10364
de1e7099d100
dispatch: provide help for disabled extensions and commands
Brodie Rao <me+hg@dackz.net>
parents:
9802
diff
changeset
|
417 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
418 $ HGRCPATH= |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
419 $ export HGRCPATH |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
420 $ hg help email |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
421 'email' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
422 |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15447
diff
changeset
|
423 patchbomb command to send changesets as (a series of) patch emails |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
424 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
425 use "hg help extensions" for information on enabling extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
426 $ hg qdel |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
427 hg: unknown command 'qdel' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
428 'qdelete' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
429 |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15447
diff
changeset
|
430 mq manage a stack of patches |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
431 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
432 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
|
433 [255] |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
434 $ hg churn |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
435 hg: unknown command 'churn' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
436 'churn' is provided by the following extension: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
437 |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15447
diff
changeset
|
438 churn command to display statistics about repository history |
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 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
|
441 [255] |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
442 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
443 Disabled extensions: |
10364
de1e7099d100
dispatch: provide help for disabled extensions and commands
Brodie Rao <me+hg@dackz.net>
parents:
9802
diff
changeset
|
444 |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
445 $ hg help churn |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
446 churn extension - command to display statistics about repository history |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
447 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
448 use "hg help extensions" for information on enabling extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
449 $ hg help patchbomb |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
450 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
|
451 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
452 use "hg help extensions" for information on enabling extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
453 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
454 Broken disabled extension and command: |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
455 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
456 $ mkdir hgext |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
457 $ echo > hgext/__init__.py |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
458 $ cat > hgext/broken.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
459 > "broken extension' |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
460 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
461 $ cat > path.py <<EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
462 > import os, sys |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
463 > sys.path.insert(0, os.environ['HGEXTPATH']) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
464 > EOF |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
465 $ HGEXTPATH=`pwd` |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
466 $ export HGEXTPATH |
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 $ hg --config extensions.path=./path.py help broken |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
469 broken extension - (no help text available) |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
470 |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
471 use "hg help extensions" for information on enabling extensions |
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
472 |
13191
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
473 $ cat > hgext/forest.py <<EOF |
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
474 > cmdtable = None |
1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12399
diff
changeset
|
475 > EOF |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
476 $ hg --config extensions.path=./path.py help foo > /dev/null |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15202
diff
changeset
|
477 warning: error finding commands in $TESTTMP/hgext/forest.py (glob) |
12191
56c74b2df53d
tests: unify test-extension
Adrian Buehlmann <adrian@cadifra.com>
parents:
11070
diff
changeset
|
478 hg: unknown command 'foo' |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15202
diff
changeset
|
479 warning: error finding commands in $TESTTMP/hgext/forest.py (glob) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12191
diff
changeset
|
480 [255] |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
481 |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
482 $ cat > throw.py <<EOF |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
483 > from mercurial import cmdutil, commands |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
484 > cmdtable = {} |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
485 > command = cmdutil.command(cmdtable) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
486 > class Bogon(Exception): pass |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
487 > |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
488 > @command('throw', [], 'hg throw') |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
489 > def throw(ui, **opts): |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
490 > """throws an exception""" |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
491 > raise Bogon() |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
492 > commands.norepo += " throw" |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
493 > EOF |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
494 No declared supported version, extension complains: |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
495 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
496 ** Unknown exception encountered with possibly-broken third-party extension throw |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
497 ** which supports versions unknown of Mercurial. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
498 ** Please disable throw and try your action again. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
499 ** If that fixes the bug please report it to the extension author. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
500 ** Python * (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
501 ** Mercurial Distributed SCM * (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
502 ** Extensions loaded: throw |
18224
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
503 empty declaration of supported version, extension complains: |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
504 $ echo "testedwith = ''" >> throw.py |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
505 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
506 ** Unknown exception encountered with possibly-broken third-party extension throw |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
507 ** which supports versions unknown of Mercurial. |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
508 ** Please disable throw and try your action again. |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
509 ** If that fixes the bug please report it to the extension author. |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
510 ** Python * (glob) |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
511 ** Mercurial Distributed SCM (*) (glob) |
0f9013112eba
dispatch: handle empty `testedwith` value in extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17837
diff
changeset
|
512 ** Extensions loaded: throw |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
513 If the extension specifies a buglink, show that: |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
514 $ echo 'buglink = "http://example.com/bts"' >> throw.py |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
515 $ rm -f throw.pyc throw.pyo |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
516 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
517 ** Unknown exception encountered with possibly-broken third-party extension throw |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
518 ** which supports versions unknown of Mercurial. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
519 ** Please disable throw and try your action again. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
520 ** If that fixes the bug please report it to http://example.com/bts |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
521 ** Python * (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
522 ** Mercurial Distributed SCM (*) (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
523 ** Extensions loaded: throw |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
524 If the extensions declare outdated versions, accuse the older extension first: |
17227
7af38fe1f829
test-extension.t: use fixed version string instead of current tag
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17014
diff
changeset
|
525 $ echo "from mercurial import util" >> older.py |
7af38fe1f829
test-extension.t: use fixed version string instead of current tag
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17014
diff
changeset
|
526 $ echo "util.version = lambda:'2.2'" >> older.py |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
527 $ echo "testedwith = '1.9.3'" >> older.py |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
528 $ echo "testedwith = '2.1.1'" >> throw.py |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
529 $ rm -f throw.pyc throw.pyo |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
530 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
531 > throw 2>&1 | egrep '^\*\*' |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
532 ** Unknown exception encountered with possibly-broken third-party extension older |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
533 ** which supports versions 1.9.3 of Mercurial. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
534 ** Please disable older and try your action again. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
535 ** If that fixes the bug please report it to the extension author. |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
536 ** Python * (glob) |
17228
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
537 ** Mercurial Distributed SCM (version 2.2) |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
538 ** Extensions loaded: throw, older |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
539 One extension only tested with older, one only with newer versions: |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
540 $ echo "util.version = lambda:'2.1.0'" >> older.py |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
541 $ rm -f older.pyc older.pyo |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
542 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
543 > throw 2>&1 | egrep '^\*\*' |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
544 ** Unknown exception encountered with possibly-broken third-party extension older |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
545 ** which supports versions 1.9.3 of Mercurial. |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
546 ** Please disable older and try your action again. |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
547 ** If that fixes the bug please report it to the extension author. |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
548 ** Python * (glob) |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
549 ** Mercurial Distributed SCM (version 2.1.0) |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
550 ** Extensions loaded: throw, older |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
551 Older extension is tested with current version, the other only with newer: |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
552 $ echo "util.version = lambda:'1.9.3'" >> older.py |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
553 $ rm -f older.pyc older.pyo |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
554 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
555 > throw 2>&1 | egrep '^\*\*' |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
556 ** Unknown exception encountered with possibly-broken third-party extension throw |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
557 ** which supports versions 2.1.1 of Mercurial. |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
558 ** Please disable throw and try your action again. |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
559 ** If that fixes the bug please report it to http://example.com/bts |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
560 ** Python * (glob) |
d1b49b02bc16
dispatch: fix traceback when extension was tested with newer versions only
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17227
diff
changeset
|
561 ** Mercurial Distributed SCM (version 1.9.3) |
16744
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
562 ** Extensions loaded: throw, older |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
563 |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
564 Declare the version as supporting this hg version, show regular bts link: |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
565 $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'` |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
566 $ echo 'testedwith = """'"$hgver"'"""' >> throw.py |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
567 $ rm -f throw.pyc throw.pyo |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
568 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
569 ** unknown exception encountered, please report by visiting |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
570 ** http://mercurial.selenic.com/wiki/BugTracker |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
571 ** Python * (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
572 ** Mercurial Distributed SCM (*) (glob) |
1c9f58a6c8f1
dispatch: try and identify third-party extensions as sources of tracebacks
Augie Fackler <raf@durin42.com>
parents:
16242
diff
changeset
|
573 ** Extensions loaded: throw |