Patchwork D9111: changing-files: always use `mark_touched` to update the touched set

login
register
mail settings
Submitter phabricator
Date Sept. 28, 2020, 4:32 p.m.
Message ID <differential-rev-PHID-DREV-yw6ujk7rxkgrzoa23e2o-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47326/
State Superseded
Headers show

Comments

phabricator - Sept. 28, 2020, 4:32 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We use this function internally too because that will make cache invalidation
  simpler.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9111

AFFECTED FILES
  mercurial/metadata.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/metadata.py b/mercurial/metadata.py
--- a/mercurial/metadata.py
+++ b/mercurial/metadata.py
@@ -85,7 +85,7 @@ 
 
     def mark_added(self, filename):
         self._added.add(filename)
-        self._touched.add(filename)
+        self.mark_touched(filename)
 
     def update_added(self, filenames):
         for f in filenames:
@@ -103,7 +103,7 @@ 
 
     def mark_merged(self, filename):
         self._merged.add(filename)
-        self._touched.add(filename)
+        self.mark_touched(filename)
 
     def update_merged(self, filenames):
         for f in filenames:
@@ -147,7 +147,7 @@ 
 
     def mark_removed(self, filename):
         self._removed.add(filename)
-        self._touched.add(filename)
+        self.mark_touched(filename)
 
     def update_removed(self, filenames):
         for f in filenames: