Mercurial > public > mercurial-scm > hg-stable
diff mercurial/copies.py @ 34787:754b5117622f
context: add workingfilectx.markcopied
With in-memory merge, copy information needs to be stored in-memory, not in the
dirstate.
To make this transition easy, move the existing dirstate-based approach to
workingfilectx; that way, other implementations can choose to store it
somewhere else.
Differential Revision: https://phab.mercurial-scm.org/D1106
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Sun, 15 Oct 2017 20:36:29 -0700 |
parents | e79b3611223b |
children | f05a6e015ecc |
line wrap: on
line diff
--- 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)