##// END OF EJS Templates
automv: do not release lock between marking files and the actual commit
Martijn Pieters -
r28151:74e3d634 default
parent child Browse files
Show More
@@ -33,6 +33,7 b' def extsetup(ui):'
33
33
34 def mvcheck(orig, ui, repo, *pats, **opts):
34 def mvcheck(orig, ui, repo, *pats, **opts):
35 """Hook to check for moves at commit time"""
35 """Hook to check for moves at commit time"""
36 renames = None
36 disabled = opts.pop('no_automv', False)
37 disabled = opts.pop('no_automv', False)
37 if not disabled:
38 if not disabled:
38 threshold = float(ui.config('automv', 'similarity', '1.00'))
39 threshold = float(ui.config('automv', 'similarity', '1.00'))
@@ -40,9 +41,11 b' def mvcheck(orig, ui, repo, *pats, **opt'
40 match = scmutil.match(repo[None], pats, opts)
41 match = scmutil.match(repo[None], pats, opts)
41 added, removed = _interestingfiles(repo, match)
42 added, removed = _interestingfiles(repo, match)
42 renames = _findrenames(repo, match, added, removed, threshold)
43 renames = _findrenames(repo, match, added, removed, threshold)
44
45 with repo.wlock():
46 if renames is not None:
43 scmutil._markchanges(repo, (), (), renames)
47 scmutil._markchanges(repo, (), (), renames)
44
48 return orig(ui, repo, *pats, **opts)
45 return orig(ui, repo, *pats, **opts)
46
49
47 def _interestingfiles(repo, matcher):
50 def _interestingfiles(repo, matcher):
48 """Find what files were added or removed in this commit.
51 """Find what files were added or removed in this commit.
General Comments 0
You need to be logged in to leave comments. Login now