# HG changeset patch # User Pierre-Yves David # Date 2021-07-07 22:57:25 # Node ID 14e2f4bd5f1630e13b1ed1d480d7ff4482f51b11 # Parent 0cef28b121a4a3752407a61215b4c82a5d048476 context: use `dirstate.set_tracked` in context.copy This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11015 diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1738,10 +1738,7 @@ class workingctx(committablectx): else: with self._repo.wlock(): ds = self._repo.dirstate - if ds[dest] in b'?': - ds.add(dest) - elif ds[dest] in b'r': - ds.normallookup(dest) + ds.set_tracked(dest) ds.copy(source, dest) def match(