diff -r 300844cb1a56 -r 78d760aa3607 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Thu Mar 28 00:14:27 2013 -0700 +++ b/mercurial/cmdutil.py Thu Mar 28 18:27:19 2013 -0700 @@ -1593,7 +1593,10 @@ def duplicatecopies(repo, rev, fromrev): '''reproduce copies from fromrev to rev in the dirstate''' for dst, src in copies.pathcopies(repo[fromrev], repo[rev]).iteritems(): - repo.dirstate.copy(src, dst) + # copies.pathcopies returns backward renames, so dst might not + # actually be in the dirstate + 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'''