changeset 47595:14e2f4bd5f16

context: use `dirstate.set_tracked` in context.copy This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11015
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 08 Jul 2021 00:57:25 +0200
parents 0cef28b121a4
children 791e2333d3d3
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Thu Jul 08 00:58:44 2021 +0200
+++ b/mercurial/context.py	Thu Jul 08 00:57:25 2021 +0200
@@ -1738,10 +1738,7 @@
         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(