D11015: context: use `dirstate.set_tracked` in context.copy
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Jul 8 07:34:47 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This is the new shinny API.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D11015
AFFECTED FILES
mercurial/context.py
CHANGE DETAILS
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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(
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list