##// END OF EJS Templates
automv: lock the repository before searching for renames...
marmoute -
r51019:18149ecb default
parent child Browse files
Show More
@@ -59,10 +59,13 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 with repo.wlock():
62 63 if not disabled:
63 64 threshold = ui.configint(b'automv', b'similarity')
64 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 69 if threshold > 0:
67 70 match = scmutil.match(repo[None], pats, opts)
68 71 added, removed = _interestingfiles(repo, match)
@@ -71,7 +74,6 def mvcheck(orig, ui, repo, *pats, **opt
71 74 repo, uipathfn, added, removed, threshold / 100.0
72 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