annotate tests/test-abort-checkin @ 4135:6cb6cfe43c5d

Avoid some false positives for addremove -s The original code uses the similary score 1 - len(diff(after, before)) / len(after) The diff can at most be the size of the 'before' file, so any small 'before' file would be considered very similar. Removing an empty file would cause all files added in the same revision to be considered copies of the removed file. This changes the metric to bytes_overlap(before, after) / len(before + after) i.e. the actual percentage of bytes shared between the two files.
author Erling Ellingsen <erlingalf@gmail.com>
date Sun, 18 Feb 2007 20:39:25 +0100
parents 61fcd9fac434
children 193e0f8d9a47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2726
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
1 #!/bin/sh
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
2
2976
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2831
diff changeset
3 echo "[extensions]" >> $HGRCPATH
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2831
diff changeset
4 echo "mq=" >> $HGRCPATH
2831
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2726
diff changeset
5 cat > $HGTMP/false <<EOF
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2726
diff changeset
6 #!/bin/sh
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2726
diff changeset
7 exit 1
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2726
diff changeset
8 EOF
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2726
diff changeset
9 chmod +x $HGTMP/false
2726
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
10
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
11 hg init foo
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
12 cd foo
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
13 echo foo > foo
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
14 hg add foo
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
15
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
16 # mq may keep a reference to the repository so __del__ will not be called
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
17 # and .hg/journal.dirstate will not be deleted:
2831
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2726
diff changeset
18 HGEDITOR=$HGTMP/false hg ci
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2726
diff changeset
19 HGEDITOR=$HGTMP/false hg ci
2726
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
20
6bd351194a96 Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
21 exit 0