--- a/mercurial/copies.py Sun Oct 15 20:36:29 2017 -0700
+++ b/mercurial/copies.py Sun Oct 15 20:36:29 2017 -0700
@@ -842,7 +842,7 @@
data['incompletediverge'][sf] = [of, f]
return
-def duplicatecopies(repo, rev, fromrev, skiprev=None):
+def duplicatecopies(repo, wctx, 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
@@ -863,5 +863,4 @@
# actually be in the dirstate
if dst in exclude:
continue
- if repo.dirstate[dst] in "nma":
- repo.dirstate.copy(src, dst)
+ wctx[dst].markcopied(src)