annotate tests/test-execute-bit @ 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 23ffe82615d8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5490
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
1 #!/bin/sh
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
2
5495
363ba35f55bd test-execute-bit: skip if execute-bit is not supported
Patrick Mezard <pmezard@gmail.com>
parents: 5490
diff changeset
3 "$TESTDIR/hghave" execbit || exit 80
363ba35f55bd test-execute-bit: skip if execute-bit is not supported
Patrick Mezard <pmezard@gmail.com>
parents: 5490
diff changeset
4
5490
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
5 hg init
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
6 echo a > a
6158
23ffe82615d8 repo.status: also compare flags for files in the lookup list.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5495
diff changeset
7 hg ci -Am'not executable'
5490
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
8
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
9 chmod +x a
6158
23ffe82615d8 repo.status: also compare flags for files in the lookup list.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5495
diff changeset
10 hg ci -m'executable'
5490
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
11 hg id
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12
6158
23ffe82615d8 repo.status: also compare flags for files in the lookup list.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5495
diff changeset
13 echo '% make sure we notice the change of mode if the cached size == -1'
23ffe82615d8 repo.status: also compare flags for files in the lookup list.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5495
diff changeset
14 hg rm a
23ffe82615d8 repo.status: also compare flags for files in the lookup list.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5495
diff changeset
15 hg revert -r 0 a
23ffe82615d8 repo.status: also compare flags for files in the lookup list.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5495
diff changeset
16 hg debugstate
23ffe82615d8 repo.status: also compare flags for files in the lookup list.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5495
diff changeset
17 hg st
23ffe82615d8 repo.status: also compare flags for files in the lookup list.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5495
diff changeset
18
5490
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
19 hg up 0
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
20 hg id
bf2bb53e5d2b See if execute bit is honoured when we go back in time
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
21 test -x a && echo executable -- eek || echo not executable -- whew