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