annotate tests/test-issue842 @ 9827:4fe9ca519637

mdiff: fix diff -b/B/w on mixed whitespace hunks (issue127) Previous code was computing hunks then checking if these hunks could be ignored when taking whitespace/blank-lines options in accounts. This approach is simple but fails with hunks containing both whitespace and non-whitespace changes, the whole hunk is emitted while it can be mostly made of whitespace. The new version normalize the whitespaces before hunk generation, and test for blank-lines afterwards.
author Patrick Mezard <pmezard@gmail.com>
date Wed, 11 Nov 2009 18:31:42 +0100
parents cb93eee1fbcd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8452
cb93eee1fbcd tests: add missing interpreter lines
Martin Geisler <mg@lazybytes.net>
parents: 6336
diff changeset
1 #!/bin/sh
cb93eee1fbcd tests: add missing interpreter lines
Martin Geisler <mg@lazybytes.net>
parents: 6336
diff changeset
2
6336
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
3 hg init test
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
4 cd test
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
5 echo foo > a
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
6 hg ci -Ama
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
7
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
8 hg up -r0000
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
9 echo bar > a
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
10 echo % should issue warning
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
11 hg ci -Amb
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
12
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
13 hg up -r0000
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
14 echo stuffy > a
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
15 echo % should not issue warning
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
16 hg ci -q -Amc
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
17
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
18 hg up -r0000
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
19 echo crap > a
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
20 hg branch testing
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
21 echo % should not issue warning
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
22 hg ci -q -Amd