Mercurial > hg
changeset 28150:7a984cece04a
automv: reuse existing scutil._markchanges() function
author | Martijn Pieters <mjpieters@fb.com> |
---|---|
date | Mon, 15 Feb 2016 17:13:18 +0000 |
parents | d356d5250ab2 |
children | 74e3d634a30e |
files | hgext/automv.py |
diffstat | 1 files changed, 1 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/automv.py Mon Feb 15 17:01:33 2016 +0000 +++ b/hgext/automv.py Mon Feb 15 17:13:18 2016 +0000 @@ -40,7 +40,7 @@ match = scmutil.match(repo[None], pats, opts) added, removed = _interestingfiles(repo, match) renames = _findrenames(repo, match, added, removed, threshold) - _markchanges(repo, renames) + scmutil._markchanges(repo, (), (), renames) return orig(ui, repo, *pats, **opts) @@ -80,13 +80,3 @@ if renames: repo.ui.status(_('detected move of %d files\n') % len(renames)) return renames - -def _markchanges(repo, renames): - """Marks the files in renames as copied.""" - wctx = repo[None] - wlock = repo.wlock() - try: - for dst, src in renames.iteritems(): - wctx.copy(src, dst) - finally: - wlock.release()