Mercurial > hg
comparison mercurial/dirstate.py @ 47915:51cd60c0a345
dirstate: drop the deprecated `drop` method
eh ;-)
Differential Revision: https://phab.mercurial-scm.org/D11350
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 24 Aug 2021 21:12:39 +0200 |
parents | 8e46934c58d2 |
children | 65e3d8028f2e |
comparison
equal
deleted
inserted
replaced
47914:8e46934c58d2 | 47915:51cd60c0a345 |
---|---|
764 | 764 |
765 def _merge(self, f): | 765 def _merge(self, f): |
766 if not self.in_merge: | 766 if not self.in_merge: |
767 return self._normallookup(f) | 767 return self._normallookup(f) |
768 return self._otherparent(f) | 768 return self._otherparent(f) |
769 | |
770 def drop(self, f): | |
771 '''Drop a file from the dirstate''' | |
772 if self.pendingparentchange(): | |
773 util.nouideprecwarn( | |
774 b"do not use `drop` inside of update/merge context." | |
775 b" Use `update_file`", | |
776 b'6.0', | |
777 stacklevel=2, | |
778 ) | |
779 else: | |
780 util.nouideprecwarn( | |
781 b"do not use `drop` outside of update/merge context." | |
782 b" Use `set_untracked`", | |
783 b'6.0', | |
784 stacklevel=2, | |
785 ) | |
786 self._drop(f) | |
787 | 769 |
788 def _drop(self, filename): | 770 def _drop(self, filename): |
789 """internal function to drop a file from the dirstate""" | 771 """internal function to drop a file from the dirstate""" |
790 if self._map.dropfile(filename): | 772 if self._map.dropfile(filename): |
791 self._dirty = True | 773 self._dirty = True |