Mercurial > hg
annotate tests/test-check-code-hg.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 | 8fb6844a4ff1 |
children |
rev | line source |
---|---|
22047
8fb6844a4ff1
tests: change some #ifs to #requires
Matt Mackall <mpm@selenic.com>
parents:
21225
diff
changeset
|
1 #require test-repo |
21223
c35c027f5f43
test-check-code-hg: use test-repo check
Matt Mackall <mpm@selenic.com>
parents:
20239
diff
changeset
|
2 |
15557
7bb5ed61b74c
tests: convert test-check-code-hg.py to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
11771
diff
changeset
|
3 $ check_code="$TESTDIR"/../contrib/check-code.py |
7bb5ed61b74c
tests: convert test-check-code-hg.py to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
11771
diff
changeset
|
4 $ cd "$TESTDIR"/.. |
15558
c6b600d2348c
tests: run check-code with warnings and maintain a whitelist
Mads Kiilerich <mads@kiilerich.com>
parents:
15557
diff
changeset
|
5 |
19384
96fd9af75834
tests: check-code all python files in one run
Simon Heimberg <simohe@besonet.ch>
parents:
19321
diff
changeset
|
6 New errors are not allowed. Warnings are strongly discouraged. |
20239
16b5f498f49c
check-code: always report when a file is skipped by "no-check-code"
Simon Heimberg <simohe@besonet.ch>
parents:
19495
diff
changeset
|
7 (The writing "no-che?k-code" is for not skipping this file when checking.) |
19384
96fd9af75834
tests: check-code all python files in one run
Simon Heimberg <simohe@besonet.ch>
parents:
19321
diff
changeset
|
8 |
21225
c58aa73bf0b9
test-check-code-hg: use locate instead of manifest
Matt Mackall <mpm@selenic.com>
parents:
21224
diff
changeset
|
9 $ hg locate | sed 's-\\-/-g' | |
19495
9aee3d014394
tests: test-check-code-hg.t works for all files to check
Simon Heimberg <simohe@besonet.ch>
parents:
19386
diff
changeset
|
10 > xargs "$check_code" --warnings --per-file=0 || false |
20239
16b5f498f49c
check-code: always report when a file is skipped by "no-check-code"
Simon Heimberg <simohe@besonet.ch>
parents:
19495
diff
changeset
|
11 Skipping hgext/zeroconf/Zeroconf.py it has no-che?k-code (glob) |
16b5f498f49c
check-code: always report when a file is skipped by "no-check-code"
Simon Heimberg <simohe@besonet.ch>
parents:
19495
diff
changeset
|
12 Skipping i18n/polib.py it has no-che?k-code (glob) |
16b5f498f49c
check-code: always report when a file is skipped by "no-check-code"
Simon Heimberg <simohe@besonet.ch>
parents:
19495
diff
changeset
|
13 Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob) |
16b5f498f49c
check-code: always report when a file is skipped by "no-check-code"
Simon Heimberg <simohe@besonet.ch>
parents:
19495
diff
changeset
|
14 Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob) |
16b5f498f49c
check-code: always report when a file is skipped by "no-check-code"
Simon Heimberg <simohe@besonet.ch>
parents:
19495
diff
changeset
|
15 Skipping mercurial/httpclient/socketutil.py it has no-che?k-code (glob) |