##// END OF EJS Templates
automv: reuse existing scutil._markchanges() function
Martijn Pieters -
r28150:7a984cec default
parent child Browse files
Show More
@@ -40,7 +40,7 b' def mvcheck(orig, ui, repo, *pats, **opt'
40 match = scmutil.match(repo[None], pats, opts)
40 match = scmutil.match(repo[None], pats, opts)
41 added, removed = _interestingfiles(repo, match)
41 added, removed = _interestingfiles(repo, match)
42 renames = _findrenames(repo, match, added, removed, threshold)
42 renames = _findrenames(repo, match, added, removed, threshold)
43 _markchanges(repo, renames)
43 scmutil._markchanges(repo, (), (), renames)
44
44
45 return orig(ui, repo, *pats, **opts)
45 return orig(ui, repo, *pats, **opts)
46
46
@@ -80,13 +80,3 b' def _findrenames(repo, matcher, added, r'
80 if renames:
80 if renames:
81 repo.ui.status(_('detected move of %d files\n') % len(renames))
81 repo.ui.status(_('detected move of %d files\n') % len(renames))
82 return renames
82 return renames
83
84 def _markchanges(repo, renames):
85 """Marks the files in renames as copied."""
86 wctx = repo[None]
87 wlock = repo.wlock()
88 try:
89 for dst, src in renames.iteritems():
90 wctx.copy(src, dst)
91 finally:
92 wlock.release()
General Comments 0
You need to be logged in to leave comments. Login now