annotate tests/test-bad-extension.t @ 26228:0fd20a71abdb

extdiff: add a --patch argument for diffing changeset deltas One of the things I missed the most when transitioning from versioned MQ to evolve was the loss of being able to check that rebase conflicts were properly resolved by: $ hg ci --mq -m "before" $ hg rebase -s qbase -d tip $ hg bcompare --mq The old csets stay in the tree with evolve, but a straight diff includes all of the other changes that were pulled in, obscuring the code that was rebased. Diffing deltas can be confusing, but unless radical changes were made during the resolve, it is very clear when individual hunks are added, dropped or modified. Unlike the MQ technique, this can only compare a single pair of csets/patches at a time. Like the MQ method, this also highlights changes in the commit comment and other metadata. I originally tried monkey patching from the evolve extension, but that is too complicated given that it depends on the order the two different extensions are loaded. This functionality is also useful when comparing grafts however, so implementing it in the core is more than just convenience. The --change argument doesn't make much sense for this, but it isn't harmful so I didn't bother blocking it. The -I/-X options are ignored because of a limitation of cmdutil.export(). We'll fix that next.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 09 Sep 2015 21:07:38 -0400
parents de23a552fc23
children f39953663cc9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11858
934c7e91c126 tests: unify test-bad-extension
Martin Geisler <mg@lazybytes.net>
parents: 6204
diff changeset
1 $ echo 'raise Exception("bit bucket overflow")' > badext.py
934c7e91c126 tests: unify test-bad-extension
Martin Geisler <mg@lazybytes.net>
parents: 6204
diff changeset
2 $ abspath=`pwd`/badext.py
3014
01454af644b8 load extensions only after the ui object has been completely initialized
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
3
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 14286
diff changeset
4 $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 14286
diff changeset
5 > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 14286
diff changeset
6 > gpg =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 14286
diff changeset
7 > hgext.gpg =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 14286
diff changeset
8 > badext = $abspath
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 14286
diff changeset
9 > badext2 =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 14286
diff changeset
10 > EOF
3014
01454af644b8 load extensions only after the ui object has been completely initialized
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
11
11858
934c7e91c126 tests: unify test-bad-extension
Martin Geisler <mg@lazybytes.net>
parents: 6204
diff changeset
12 $ hg -q help help
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
13 *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow
12375
02990e22150b tests: require regexes in unified tests to be marked with " (re)"
Brodie Rao <brodie@bitheap.org>
parents: 11858
diff changeset
14 *** failed to import extension badext2: No module named badext2
14286
005a540e9aee help: add -c/--command flag to only show command help (issue2799)
Martin Geisler <mg@aragost.com>
parents: 14284
diff changeset
15 hg help [-ec] [TOPIC]
11858
934c7e91c126 tests: unify test-bad-extension
Martin Geisler <mg@lazybytes.net>
parents: 6204
diff changeset
16
934c7e91c126 tests: unify test-bad-extension
Martin Geisler <mg@lazybytes.net>
parents: 6204
diff changeset
17 show help for a given topic or a help overview
25364
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
18
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
19 show traceback
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
20
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
21 $ hg -q help help --traceback 2>&1 | grep -v '^ '
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
22 *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
23 Traceback (most recent call last):
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
24 Exception: bit bucket overflow
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
25 *** failed to import extension badext2: No module named badext2
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
26 Traceback (most recent call last):
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
27 ImportError: No module named badext2
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
28 hg help [-ec] [TOPIC]
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
29
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
30 show help for a given topic or a help overview
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
31
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
32 show traceback for ImportError of hgext.name if debug is set
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
33 (note that --debug option isn't applied yet when loading extensions)
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
34
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
35 $ hg help help --traceback --config ui.debug=True 2>&1 \
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
36 > | grep -v '^ ' | head -n10
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
37 *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
38 Traceback (most recent call last):
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
39 Exception: bit bucket overflow
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
40 could not import hgext.badext2 (No module named badext2): trying badext2
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
41 Traceback (most recent call last):
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
42 ImportError: No module named badext2
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
43 *** failed to import extension badext2: No module named badext2
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
44 Traceback (most recent call last):
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
45 ImportError: No module named badext2
de23a552fc23 extensions: show traceback on load failure if --traceback flag is set
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
46 hg help [-ec] [TOPIC]