Patchwork D11016: context: use `dirstate.set_tracked` for `revert`

login
register
mail settings
Submitter phabricator
Date July 8, 2021, 7:34 a.m.
Message ID <differential-rev-PHID-DREV-plhjn5v2dc3bccmtsaqs-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49330/
State Superseded
Headers show

Comments

phabricator - July 8, 2021, 7:34 a.m.
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/D11016

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -3693,7 +3693,7 @@ 
         if f not in newlyaddedandmodifiedfiles:
             prntstatusmsg(b'add', f)
             checkout(f)
-            repo.dirstate.add(f)
+            repo.dirstate.set_tracked(f)
 
     normal = repo.dirstate.normallookup
     if node == parent and p2 == repo.nullid: