Mercurial > hg
annotate tests/test-remove @ 6349:6aaf5b1d8f15
coverage: deal with symlinked input paths (MacOSX issue)
/tmp is symlinked in MacOSX therefore test scripts as well as python modules
are installed in a symlinked location. coverage.py uses abspath() to normalize
its inputs which fails if these are referencing real paths. Use realpath()
instead.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 22 Mar 2008 19:01:09 +0100 |
parents | 8e3b651382f5 |
children | b34b876d1f6f |
rev | line source |
---|---|
936 | 1 #!/bin/sh |
2 | |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
3 remove() { |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
4 hg rm $@ |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
5 hg st |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
6 ls -R |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
7 hg up -C |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
8 } |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
9 |
936 | 10 hg init a |
11 cd a | |
12 echo a > foo | |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
13 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
14 echo % file not managed |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
15 remove foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
16 |
936 | 17 hg add foo |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
18 hg commit -m1 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
19 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
20 # the table cases |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
21 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
22 echo % 00 state added, options none |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
23 echo b > bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
24 hg add bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
25 remove bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
26 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
27 echo % 01 state clean, options none |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
28 remove foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
29 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
30 echo % 02 state modified, options none |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
31 echo b >> foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
32 remove foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
33 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
34 echo % 03 state missing, options none |
936 | 35 rm foo |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
36 remove foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
37 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
38 echo % 10 state added, options -f |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
39 echo b > bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
40 hg add bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
41 remove -f bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
42 rm bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
43 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
44 echo % 11 state clean, options -f |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
45 remove -f foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
46 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
47 echo % 12 state modified, options -f |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
48 echo b >> foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
49 remove -f foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
50 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
51 echo % 13 state missing, options -f |
2180
82385773df6c
make test-remove check some more cases.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1953
diff
changeset
|
52 rm foo |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
53 remove -f foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
54 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
55 echo % 20 state added, options -A |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
56 echo b > bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
57 hg add bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
58 remove -A bar |
936 | 59 |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
60 echo % 21 state clean, options -A |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
61 remove -A foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
62 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
63 echo % 22 state modified, options -A |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
64 echo b >> foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
65 remove -A foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
66 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
67 echo % 23 state missing, options -A |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
68 rm foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
69 remove -A foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
70 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
71 echo % 30 state added, options -Af |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
72 echo b > bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
73 hg add bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
74 remove -Af bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
75 rm bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
76 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
77 echo % 31 state clean, options -Af |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
78 remove -Af foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
79 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
80 echo % 32 state modified, options -Af |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
81 echo b >> foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
82 remove -Af foo |
2309
b2f37c7026ca
remove: rewrite to be ~400x faster, bit more friendly
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2180
diff
changeset
|
83 |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
84 echo % 33 state missing, options -Af |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
85 rm foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
86 remove -Af foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
87 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
88 # test some directory stuff |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
89 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
90 mkdir test |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
91 echo a > test/foo |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
92 echo b > test/bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
93 hg ci -Am2 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
94 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
95 echo % dir, options none |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
96 rm test/bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
97 remove test |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
98 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
99 echo % dir, options -f |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
100 rm test/bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
101 remove -f test |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
102 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
103 echo % dir, options -A |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
104 rm test/bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
105 remove -A test |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
106 |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
107 echo % dir, options -Af |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
108 rm test/bar |
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
109 remove -Af test |