Show More
@@ -160,7 +160,9 b' def findrenames(repo, added=None, remove' | |||
|
160 | 160 | for line in alines[x1:x2]: |
|
161 | 161 | equal += len(line) |
|
162 | 162 | |
|
163 |
|
|
|
163 | lengths = len(aa) + len(rr) | |
|
164 | if lengths: | |
|
165 | myscore = equal*2.0 / lengths | |
|
164 | 166 | if myscore >= bestscore: |
|
165 | 167 | bestname, bestscore = r, myscore |
|
166 | 168 | if bestname: |
@@ -16,6 +16,12 b' hg addremove -s50' | |||
|
16 | 16 | |
|
17 | 17 | hg commit -m B |
|
18 | 18 | |
|
19 | echo % comparing two empty files caused ZeroDivisionError in the past | |
|
20 | hg update -C 0 | |
|
21 | rm empty-file | |
|
22 | touch another-empty-file | |
|
23 | hg addremove -s50 | |
|
24 | ||
|
19 | 25 | cd .. |
|
20 | 26 | |
|
21 | 27 | hg init rep2; cd rep2 |
@@ -4,6 +4,10 b' adding another-file' | |||
|
4 | 4 | removing empty-file |
|
5 | 5 | removing large-file |
|
6 | 6 | recording removal of large-file as rename to another-file (99% similar) |
|
7 | % comparing two empty files caused ZeroDivisionError in the past | |
|
8 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
9 | adding another-empty-file | |
|
10 | removing empty-file | |
|
7 | 11 | adding large-file |
|
8 | 12 | adding tiny-file |
|
9 | 13 | adding small-file |
General Comments 0
You need to be logged in to leave comments.
Login now