Mercurial > hg-stable
comparison mercurial/dirstate.py @ 47945:8e46934c58d2
dirstate: drop the deprecated `merge` method
The method was deprecated in 5.9.
Differential Revision: https://phab.mercurial-scm.org/D11349
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 24 Aug 2021 21:11:57 +0200 |
parents | 3911c61f09c6 |
children | 51cd60c0a345 |
comparison
equal
deleted
inserted
replaced
47944:3911c61f09c6 | 47945:8e46934c58d2 |
---|---|
759 | 759 |
760 def _add(self, filename): | 760 def _add(self, filename): |
761 """internal function to mark a file as added""" | 761 """internal function to mark a file as added""" |
762 self._addpath(filename, added=True) | 762 self._addpath(filename, added=True) |
763 self._map.copymap.pop(filename, None) | 763 self._map.copymap.pop(filename, None) |
764 | |
765 def merge(self, f): | |
766 '''Mark a file merged.''' | |
767 if self.pendingparentchange(): | |
768 util.nouideprecwarn( | |
769 b"do not use `merge` inside of update/merge context." | |
770 b" Use `update_file`", | |
771 b'6.0', | |
772 stacklevel=2, | |
773 ) | |
774 else: | |
775 util.nouideprecwarn( | |
776 b"do not use `merge` outside of update/merge context." | |
777 b"It should have been set by the update/merge code", | |
778 b'6.0', | |
779 stacklevel=2, | |
780 ) | |
781 self._merge(f) | |
782 | 764 |
783 def _merge(self, f): | 765 def _merge(self, f): |
784 if not self.in_merge: | 766 if not self.in_merge: |
785 return self._normallookup(f) | 767 return self._normallookup(f) |
786 return self._otherparent(f) | 768 return self._otherparent(f) |