dirstate: drop the deprecated `merge` method
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 24 Aug 2021 21:11:57 +0200
changeset 47914 8e46934c58d2
parent 47913 3911c61f09c6
child 47915 51cd60c0a345
dirstate: drop the deprecated `merge` method The method was deprecated in 5.9. Differential Revision: https://phab.mercurial-scm.org/D11349
contrib/dirstatenonnormalcheck.py
hgext/sparse.py
mercurial/dirstate.py
mercurial/interfaces/dirstate.py
--- a/contrib/dirstatenonnormalcheck.py	Tue Aug 24 21:11:42 2021 +0200
+++ b/contrib/dirstatenonnormalcheck.py	Tue Aug 24 21:11:57 2021 +0200
@@ -60,7 +60,6 @@
             # We don't do all these checks when paranoid is disable as it would
             # make the extension run very slowly on large repos
             extensions.wrapfunction(dirstatecl, 'write', _checkdirstate)
-            extensions.wrapfunction(dirstatecl, 'merge', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'drop', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'set_tracked', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'set_untracked', _checkdirstate)
--- a/hgext/sparse.py	Tue Aug 24 21:11:42 2021 +0200
+++ b/hgext/sparse.py	Tue Aug 24 21:11:57 2021 +0200
@@ -258,7 +258,6 @@
         b'set_tracked',
         b'set_untracked',
         b'copy',
-        b'merge',
     ]
     hint = _(
         b'include file with `hg debugsparse --include <pattern>` or use '
--- a/mercurial/dirstate.py	Tue Aug 24 21:11:42 2021 +0200
+++ b/mercurial/dirstate.py	Tue Aug 24 21:11:57 2021 +0200
@@ -762,24 +762,6 @@
         self._addpath(filename, added=True)
         self._map.copymap.pop(filename, None)
 
-    def merge(self, f):
-        '''Mark a file merged.'''
-        if self.pendingparentchange():
-            util.nouideprecwarn(
-                b"do not use `merge` inside of update/merge context."
-                b" Use `update_file`",
-                b'6.0',
-                stacklevel=2,
-            )
-        else:
-            util.nouideprecwarn(
-                b"do not use `merge` outside of update/merge context."
-                b"It should have been set by the update/merge code",
-                b'6.0',
-                stacklevel=2,
-            )
-        self._merge(f)
-
     def _merge(self, f):
         if not self.in_merge:
             return self._normallookup(f)
--- a/mercurial/interfaces/dirstate.py	Tue Aug 24 21:11:42 2021 +0200
+++ b/mercurial/interfaces/dirstate.py	Tue Aug 24 21:11:57 2021 +0200
@@ -132,9 +132,6 @@
     def copies():
         pass
 
-    def merge(f):
-        '''Mark a file merged.'''
-
     def drop(f):
         '''Drop a file from the dirstate'''