Show More
@@ -64,7 +64,8 b' def mvcheck(orig, ui, repo, *pats, **opt' | |||
|
64 | 64 | if threshold > 0: |
|
65 | 65 | match = scmutil.match(repo[None], pats, opts) |
|
66 | 66 | added, removed = _interestingfiles(repo, match) |
|
67 | renames = _findrenames(repo, match, added, removed, | |
|
67 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | |
|
68 | renames = _findrenames(repo, uipathfn, added, removed, | |
|
68 | 69 | threshold / 100.0) |
|
69 | 70 | |
|
70 | 71 | with repo.wlock(): |
@@ -89,7 +90,7 b' def _interestingfiles(repo, matcher):' | |||
|
89 | 90 | |
|
90 | 91 | return added, removed |
|
91 | 92 | |
|
92 |
def _findrenames(repo, |
|
|
93 | def _findrenames(repo, uipathfn, added, removed, similarity): | |
|
93 | 94 | """Find what files in added are really moved files. |
|
94 | 95 | |
|
95 | 96 | Any file named in removed that is at least similarity% similar to a file |
@@ -103,7 +104,7 b' def _findrenames(repo, matcher, added, r' | |||
|
103 | 104 | if repo.ui.verbose: |
|
104 | 105 | repo.ui.status( |
|
105 | 106 | _('detected move of %s as %s (%d%% similar)\n') % ( |
|
106 |
|
|
|
107 | uipathfn(src), uipathfn(dst), score * 100)) | |
|
107 | 108 | renames[dst] = src |
|
108 | 109 | if renames: |
|
109 | 110 | repo.ui.status(_('detected move of %d files\n') % len(renames)) |
General Comments 0
You need to be logged in to leave comments.
Login now