Show More
@@ -59,10 +59,13 def mvcheck(orig, ui, repo, *pats, **opt | |||||
59 | opts = pycompat.byteskwargs(opts) |
|
59 | opts = pycompat.byteskwargs(opts) | |
60 | renames = None |
|
60 | renames = None | |
61 | disabled = opts.pop(b'no_automv', False) |
|
61 | disabled = opts.pop(b'no_automv', False) | |
|
62 | with repo.wlock(): | |||
62 | if not disabled: |
|
63 | if not disabled: | |
63 | threshold = ui.configint(b'automv', b'similarity') |
|
64 | threshold = ui.configint(b'automv', b'similarity') | |
64 | if not 0 <= threshold <= 100: |
|
65 | if not 0 <= threshold <= 100: | |
65 | raise error.Abort(_(b'automv.similarity must be between 0 and 100')) |
|
66 | raise error.Abort( | |
|
67 | _(b'automv.similarity must be between 0 and 100') | |||
|
68 | ) | |||
66 | if threshold > 0: |
|
69 | if threshold > 0: | |
67 | match = scmutil.match(repo[None], pats, opts) |
|
70 | match = scmutil.match(repo[None], pats, opts) | |
68 | added, removed = _interestingfiles(repo, match) |
|
71 | added, removed = _interestingfiles(repo, match) | |
@@ -71,7 +74,6 def mvcheck(orig, ui, repo, *pats, **opt | |||||
71 | repo, uipathfn, added, removed, threshold / 100.0 |
|
74 | repo, uipathfn, added, removed, threshold / 100.0 | |
72 | ) |
|
75 | ) | |
73 |
|
76 | |||
74 | with repo.wlock(): |
|
|||
75 | if renames is not None: |
|
77 | if renames is not None: | |
76 | with repo.dirstate.changing_files(repo): |
|
78 | with repo.dirstate.changing_files(repo): | |
77 | # XXX this should be wider and integrated with the commit |
|
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