Patchwork [1,of,7] cleanup: drop vfs compatibility layer in scmutil

login
register
mail settings
Submitter Pierre-Yves David
Date May 2, 2017, 11:21 p.m.
Message ID <b11231e14d45d2a28c18.1493767300@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/20354/
State Accepted
Headers show

Comments

Pierre-Yves David - May 2, 2017, 11:21 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1493683173 -7200
#      Tue May 02 01:59:33 2017 +0200
# Node ID b11231e14d45d2a28c18429807283bee307c6bf8
# Parent  fbb5f4bf94928b98fa87871e84bb2ef972ec2d51
# EXP-Topic dropcompat
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r b11231e14d45
cleanup: drop vfs compatibility layer in scmutil

All these constructors are deprecated in 4.2. We can now drop them on the
default branch (future 4.3).
Yuya Nishihara - May 3, 2017, 1:48 a.m.
On Wed, 03 May 2017 01:21:40 +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1493683173 -7200
> #      Tue May 02 01:59:33 2017 +0200
> # Node ID b11231e14d45d2a28c18429807283bee307c6bf8
> # Parent  fbb5f4bf94928b98fa87871e84bb2ef972ec2d51
> # EXP-Topic dropcompat
> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
> #              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r b11231e14d45
> cleanup: drop vfs compatibility layer in scmutil

Queued, thanks.

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -26,7 +26,6 @@  from . import (
     revsetlang,
     similar,
     util,
-    vfs as vfsmod,
 )
 
 if pycompat.osname == 'nt':
@@ -335,27 +334,6 @@  def filteredhash(repo, maxrev):
         key = s.digest()
     return key
 
-def _deprecated(old, new, func):
-    msg = ('class at mercurial.scmutil.%s moved to mercurial.vfs.%s'
-           % (old, new))
-    def wrapper(*args, **kwargs):
-        util.nouideprecwarn(msg, '4.2')
-        return func(*args, **kwargs)
-    return wrapper
-
-# compatibility layer since all 'vfs' code moved to 'mercurial.vfs'
-#
-# This is hard to instal deprecation warning to this since we do not have
-# access to a 'ui' object.
-opener = _deprecated('opener', 'vfs', vfsmod.vfs)
-vfs = _deprecated('vfs', 'vfs', vfsmod.vfs)
-filteropener = _deprecated('filteropener', 'filtervfs', vfsmod.filtervfs)
-filtervfs = _deprecated('filtervfs', 'filtervfs', vfsmod.filtervfs)
-abstractvfs = _deprecated('abstractvfs', 'abstractvfs', vfsmod.abstractvfs)
-readonlyvfs = _deprecated('readonlyvfs', 'readonlyvfs', vfsmod.readonlyvfs)
-auditvfs = _deprecated('auditvfs', 'auditvfs', vfsmod.auditvfs)
-checkambigatclosing = vfsmod.checkambigatclosing
-
 def walkrepos(path, followsym=False, seen_dirs=None, recurse=False):
     '''yield every hg repository under path, always recursively.
     The recurse flag will only control recursion into repo working dirs'''