changing-files: always use `mark_touched` to update the touched set
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 25 Sep 2020 14:16:35 +0200
changeset 45622 42bb6c4f8106
parent 45621 646a676f5365
child 45623 d31483377673
changing-files: always use `mark_touched` to update the touched set We use this function internally too because that will make cache invalidation simpler. Differential Revision: https://phab.mercurial-scm.org/D9111
mercurial/metadata.py
--- a/mercurial/metadata.py	Fri Oct 02 08:57:43 2020 +0200
+++ b/mercurial/metadata.py	Fri Sep 25 14:16:35 2020 +0200
@@ -84,7 +84,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:
@@ -102,7 +102,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:
@@ -146,7 +146,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: