mercurial/dirstatemap.py
changeset 48142 743808de0c03
parent 48141 a39192fc7c56
child 48143 f903a357ba72
equal deleted inserted replaced
48141:a39192fc7c56 48142:743808de0c03
   106 
   106 
   107         The fact it is actually new is the responsability of the caller
   107         The fact it is actually new is the responsability of the caller
   108         """
   108         """
   109 
   109 
   110     ### method to manipulate the entries
   110     ### method to manipulate the entries
       
   111 
       
   112     def set_possibly_dirty(self, filename):
       
   113         """record that the current state of the file on disk is unknown"""
       
   114         entry = self[filename]
       
   115         entry.set_possibly_dirty()
       
   116         self._refresh_entry(filename, entry)
   111 
   117 
   112     def set_tracked(self, filename):
   118     def set_tracked(self, filename):
   113         new = False
   119         new = False
   114         entry = self.get(filename)
   120         entry = self.get(filename)
   115         if entry is None:
   121         if entry is None:
   440         if not entry.any_tracked:
   446         if not entry.any_tracked:
   441             self._map.pop(f, None)
   447             self._map.pop(f, None)
   442 
   448 
   443     def _insert_entry(self, f, entry):
   449     def _insert_entry(self, f, entry):
   444         self._map[f] = entry
   450         self._map[f] = entry
   445 
       
   446     def set_possibly_dirty(self, filename):
       
   447         """record that the current state of the file on disk is unknown"""
       
   448         self[filename].set_possibly_dirty()
       
   449 
   451 
   450     def set_clean(self, filename, mode, size, mtime):
   452     def set_clean(self, filename, mode, size, mtime):
   451         """mark a file as back to a clean state"""
   453         """mark a file as back to a clean state"""
   452         entry = self[filename]
   454         entry = self[filename]
   453         mtime = mtime & rangemask
   455         mtime = mtime & rangemask
   797                 self._map.addfile(f, entry)
   799                 self._map.addfile(f, entry)
   798 
   800 
   799         def _insert_entry(self, f, entry):
   801         def _insert_entry(self, f, entry):
   800             self._map.addfile(f, entry)
   802             self._map.addfile(f, entry)
   801 
   803 
   802         def set_possibly_dirty(self, filename):
       
   803             """record that the current state of the file on disk is unknown"""
       
   804             entry = self[filename]
       
   805             entry.set_possibly_dirty()
       
   806             self._map.set_dirstate_item(filename, entry)
       
   807 
       
   808         def set_clean(self, filename, mode, size, mtime):
   804         def set_clean(self, filename, mode, size, mtime):
   809             """mark a file as back to a clean state"""
   805             """mark a file as back to a clean state"""
   810             entry = self[filename]
   806             entry = self[filename]
   811             mtime = mtime & rangemask
   807             mtime = mtime & rangemask
   812             size = size & rangemask
   808             size = size & rangemask