[PATCH 1 of 5] cmdutil: remove deprecated _revertprefetch code

Augie Fackler raf at durin42.com
Fri May 11 04:55:24 UTC 2018


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1526014409 14400
#      Fri May 11 00:53:29 2018 -0400
# Node ID 5b4fd9f011a12c5e3b3c80100e826240c1747c56
# Parent  aaba341a89374e364598b9fd27262a9003d4feac
cmdutil: remove deprecated _revertprefetch code

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2997,12 +2997,6 @@ def revert(ui, repo, ctx, parents, *pats
 
         if not opts.get('dry_run'):
             needdata = ('revert', 'add', 'undelete')
-            if _revertprefetch is not _revertprefetchstub:
-                ui.deprecwarn("'cmdutil._revertprefetch' is deprecated, "
-                              "add a callback to 'scmutil.fileprefetchhooks'",
-                              '4.6', stacklevel=1)
-                _revertprefetch(repo, ctx,
-                                *[actions[name][0] for name in needdata])
             oplist = [actions[name][0] for name in needdata]
             prefetch = scmutil.prefetchfiles
             matchfiles = scmutil.matchfiles
@@ -3021,12 +3015,6 @@ def revert(ui, repo, ctx, parents, *pats
                     raise error.Abort("subrepository '%s' does not exist in %s!"
                                       % (sub, short(ctx.node())))
 
-def _revertprefetchstub(repo, ctx, *files):
-    """Stub method for detecting extension wrapping of _revertprefetch(), to
-    issue a deprecation warning."""
-
-_revertprefetch = _revertprefetchstub
-
 def _performrevert(repo, parents, ctx, actions, interactive=False,
                    tobackup=None):
     """function that actually perform all the actions computed for revert


More information about the Mercurial-devel mailing list