[Updated] D11349: dirstate: drop the deprecated `merge` method

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Aug 27 12:40:38 UTC 2021


Closed by commit rHG8e46934c58d2: dirstate: drop the deprecated `merge` method (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11349?vs=30065&id=30107

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11349/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11349

AFFECTED FILES
  contrib/dirstatenonnormalcheck.py
  hgext/sparse.py
  mercurial/dirstate.py
  mercurial/interfaces/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/interfaces/dirstate.py b/mercurial/interfaces/dirstate.py
--- a/mercurial/interfaces/dirstate.py
+++ b/mercurial/interfaces/dirstate.py
@@ -132,9 +132,6 @@
     def copies():
         pass
 
-    def merge(f):
-        '''Mark a file merged.'''
-
     def drop(f):
         '''Drop a file from the dirstate'''
 
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -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)
diff --git a/hgext/sparse.py b/hgext/sparse.py
--- a/hgext/sparse.py
+++ b/hgext/sparse.py
@@ -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 '
diff --git a/contrib/dirstatenonnormalcheck.py b/contrib/dirstatenonnormalcheck.py
--- a/contrib/dirstatenonnormalcheck.py
+++ b/contrib/dirstatenonnormalcheck.py
@@ -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)



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210827/51a5e87f/attachment-0002.html>


More information about the Mercurial-patches mailing list