[PATCH 5 of 7 clowncopter] automv: reuse existing scutil._markchanges() function
Martijn Pieters
mj at zopatista.com
Mon Feb 15 12:24:59 EST 2016
# HG changeset patch
# User Martijn Pieters <mjpieters at fb.com>
# Date 1455556398 0
# Mon Feb 15 17:13:18 2016 +0000
# Node ID 14ed7e41f1afdc0250afe722669dfb4975f6ee94
# Parent df7847e855528ed4702757dc89095ad8a7489e5e
automv: reuse existing scutil._markchanges() function.
diff --git a/hgext/automv.py b/hgext/automv.py
--- a/hgext/automv.py
+++ b/hgext/automv.py
@@ -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()
More information about the Mercurial-devel
mailing list