##// END OF EJS Templates
tests: drop unnecessary glob that causes a warning on Windows...
Matt Harbison -
r23465:7e6d73f6 default
parent child Browse files
Show More
@@ -1,102 +1,102 b''
1 1 $ hg init rep; cd rep
2 2
3 3 $ touch empty-file
4 4 $ $PYTHON -c 'for x in range(10000): print x' > large-file
5 5
6 6 $ hg addremove
7 7 adding empty-file
8 8 adding large-file
9 9
10 10 $ hg commit -m A
11 11
12 12 $ rm large-file empty-file
13 13 $ $PYTHON -c 'for x in range(10,10000): print x' > another-file
14 14
15 15 $ hg addremove -s50
16 16 adding another-file
17 17 removing empty-file
18 18 removing large-file
19 19 recording removal of large-file as rename to another-file (99% similar)
20 20
21 21 $ hg commit -m B
22 22
23 23 comparing two empty files caused ZeroDivisionError in the past
24 24
25 25 $ hg update -C 0
26 26 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
27 27 $ rm empty-file
28 28 $ touch another-empty-file
29 29 $ hg addremove -s50
30 30 adding another-empty-file
31 31 removing empty-file
32 32
33 33 $ cd ..
34 34
35 35 $ hg init rep2; cd rep2
36 36
37 37 $ $PYTHON -c 'for x in range(10000): print x' > large-file
38 38 $ $PYTHON -c 'for x in range(50): print x' > tiny-file
39 39
40 40 $ hg addremove
41 41 adding large-file
42 42 adding tiny-file
43 43
44 44 $ hg commit -m A
45 45
46 46 $ $PYTHON -c 'for x in range(70): print x' > small-file
47 47 $ rm tiny-file
48 48 $ rm large-file
49 49
50 50 $ hg addremove -s50
51 51 removing large-file
52 52 adding small-file
53 53 removing tiny-file
54 54 recording removal of tiny-file as rename to small-file (82% similar)
55 55
56 56 $ hg commit -m B
57 57
58 58 should all fail
59 59
60 60 $ hg addremove -s foo
61 61 abort: similarity must be a number
62 62 [255]
63 63 $ hg addremove -s -1
64 64 abort: similarity must be between 0 and 100
65 65 [255]
66 66 $ hg addremove -s 1e6
67 67 abort: similarity must be between 0 and 100
68 68 [255]
69 69
70 70 $ cd ..
71 71
72 72 Issue1527: repeated addremove causes util.Abort
73 73
74 74 $ hg init rep3; cd rep3
75 75 $ mkdir d
76 76 $ echo a > d/a
77 77 $ hg add d/a
78 78 $ hg commit -m 1
79 79
80 80 $ mv d/a d/b
81 81 $ hg addremove -s80
82 82 removing d/a
83 83 adding d/b
84 84 recording removal of d/a as rename to d/b (100% similar) (glob)
85 85 $ hg debugstate
86 86 r 0 0 1970-01-01 00:00:00 d/a
87 87 a 0 -1 unset d/b
88 88 copy: d/a -> d/b
89 89 $ mv d/b c
90 90
91 91 no copies found here (since the target isn't in d
92 92
93 93 $ hg addremove -s80 d
94 removing d/b (glob)
94 removing d/b
95 95
96 96 copies here
97 97
98 98 $ hg addremove -s80
99 99 adding c
100 100 recording removal of d/a as rename to c (100% similar) (glob)
101 101
102 102 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now