diff mercurial/cmdutil.py @ 22901:722117c8e023

duplicatecopies: move from cmdutil to copies This is in preparation for moving its primary caller into merge.py, which would be a layering violation in the current location.
author Matt Mackall <mpm@selenic.com>
date Mon, 13 Oct 2014 14:33:13 -0500
parents cd43195ef876
children 6c86c673dde6
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Oct 13 14:04:11 2014 -0500
+++ b/mercurial/cmdutil.py	Mon Oct 13 14:33:13 2014 -0500
@@ -2105,25 +2105,6 @@
 
     return err
 
-def duplicatecopies(repo, rev, fromrev, skiprev=None):
-    '''reproduce copies from fromrev to rev in the dirstate
-
-    If skiprev is specified, it's a revision that should be used to
-    filter copy records. Any copies that occur between fromrev and
-    skiprev will not be duplicated, even if they appear in the set of
-    copies between fromrev and rev.
-    '''
-    exclude = {}
-    if skiprev is not None:
-        exclude = copies.pathcopies(repo[fromrev], repo[skiprev])
-    for dst, src in copies.pathcopies(repo[fromrev], repo[rev]).iteritems():
-        # copies.pathcopies returns backward renames, so dst might not
-        # actually be in the dirstate
-        if dst in exclude:
-            continue
-        if repo.dirstate[dst] in "nma":
-            repo.dirstate.copy(src, dst)
-
 def commit(ui, repo, commitfunc, pats, opts):
     '''commit the specified files or all outstanding changes'''
     date = opts.get('date')