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