##// END OF EJS Templates
dirstate: deprecate the `normallookup` method in all cases...
marmoute -
r48541:9f19d9f2 default
parent child Browse files
Show More
@@ -403,7 +403,7 b' class dirstate(object):'
403 source = self._map.copymap.get(f)
403 source = self._map.copymap.get(f)
404 if source:
404 if source:
405 copies[f] = source
405 copies[f] = source
406 self.normallookup(f)
406 self._normallookup(f)
407 # Also fix up otherparent markers
407 # Also fix up otherparent markers
408 elif s.from_p2:
408 elif s.from_p2:
409 source = self._map.copymap.get(f)
409 source = self._map.copymap.get(f)
@@ -476,7 +476,7 b' class dirstate(object):'
476 self._add(filename)
476 self._add(filename)
477 return True
477 return True
478 elif not entry.tracked:
478 elif not entry.tracked:
479 self.normallookup(filename)
479 self._normallookup(filename)
480 return True
480 return True
481 # XXX This is probably overkill for more case, but we need this to
481 # XXX This is probably overkill for more case, but we need this to
482 # fully replace the `normallookup` call with `set_tracked` one.
482 # fully replace the `normallookup` call with `set_tracked` one.
@@ -746,6 +746,24 b' class dirstate(object):'
746
746
747 def normallookup(self, f):
747 def normallookup(self, f):
748 '''Mark a file normal, but possibly dirty.'''
748 '''Mark a file normal, but possibly dirty.'''
749 if self.pendingparentchange():
750 util.nouideprecwarn(
751 b"do not use `normallookup` inside of update/merge context."
752 b" Use `update_file` or `update_file_p1`",
753 b'6.0',
754 stacklevel=2,
755 )
756 else:
757 util.nouideprecwarn(
758 b"do not use `normallookup` outside of update/merge context."
759 b" Use `set_possibly_dirty` or `set_tracked`",
760 b'6.0',
761 stacklevel=2,
762 )
763 self._normallookup(f)
764
765 def _normallookup(self, f):
766 '''Mark a file normal, but possibly dirty.'''
749 if self.in_merge:
767 if self.in_merge:
750 # if there is a merge going on and the file was either
768 # if there is a merge going on and the file was either
751 # "merged" or coming from other parent (-2) before
769 # "merged" or coming from other parent (-2) before
@@ -825,7 +843,7 b' class dirstate(object):'
825 def merge(self, f):
843 def merge(self, f):
826 '''Mark a file merged.'''
844 '''Mark a file merged.'''
827 if not self.in_merge:
845 if not self.in_merge:
828 return self.normallookup(f)
846 return self._normallookup(f)
829 return self.otherparent(f)
847 return self.otherparent(f)
830
848
831 def drop(self, f):
849 def drop(self, f):
@@ -956,7 +974,7 b' class dirstate(object):'
956 self._map.setparents(parent, self._nodeconstants.nullid)
974 self._map.setparents(parent, self._nodeconstants.nullid)
957
975
958 for f in to_lookup:
976 for f in to_lookup:
959 self.normallookup(f)
977 self._normallookup(f)
960 for f in to_drop:
978 for f in to_drop:
961 self._drop(f)
979 self._drop(f)
962
980
General Comments 0
You need to be logged in to leave comments. Login now