Show More
@@ -59,19 +59,21 b' def mvcheck(orig, ui, repo, *pats, **opt' | |||
|
59 | 59 | opts = pycompat.byteskwargs(opts) |
|
60 | 60 | renames = None |
|
61 | 61 | disabled = opts.pop(b'no_automv', False) |
|
62 | if not disabled: | |
|
63 | threshold = ui.configint(b'automv', b'similarity') | |
|
64 | if not 0 <= threshold <= 100: | |
|
65 | raise error.Abort(_(b'automv.similarity must be between 0 and 100')) | |
|
66 | if threshold > 0: | |
|
67 | match = scmutil.match(repo[None], pats, opts) | |
|
68 | added, removed = _interestingfiles(repo, match) | |
|
69 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | |
|
70 | renames = _findrenames( | |
|
71 | repo, uipathfn, added, removed, threshold / 100.0 | |
|
72 | ) | |
|
62 | with repo.wlock(): | |
|
63 | if not disabled: | |
|
64 | threshold = ui.configint(b'automv', b'similarity') | |
|
65 | if not 0 <= threshold <= 100: | |
|
66 | raise error.Abort( | |
|
67 | _(b'automv.similarity must be between 0 and 100') | |
|
68 | ) | |
|
69 | if threshold > 0: | |
|
70 | match = scmutil.match(repo[None], pats, opts) | |
|
71 | added, removed = _interestingfiles(repo, match) | |
|
72 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | |
|
73 | renames = _findrenames( | |
|
74 | repo, uipathfn, added, removed, threshold / 100.0 | |
|
75 | ) | |
|
73 | 76 | |
|
74 | with repo.wlock(): | |
|
75 | 77 | if renames is not None: |
|
76 | 78 | with repo.dirstate.changing_files(repo): |
|
77 | 79 | # XXX this should be wider and integrated with the commit |
General Comments 0
You need to be logged in to leave comments.
Login now