# HG changeset patch # User Pierre-Yves David <pierre-yves.da...@ens-lyon.org> # Date 1491222098 -7200 # Mon Apr 03 14:21:38 2017 +0200 # Node ID e92f6389d3f2182864fccc3e4dc4ce7fb70fea7b # Parent a86a1d8576c062dc6a95a7d02c886f9cf798d65e # EXP-Topic vfs.cleanup # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ # hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r e92f6389d3f2 vfs: deprecate all old classes in scmutil
Now that all vfs class moved to the vfs module, we can deprecate the old one. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -329,15 +329,25 @@ 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 = vfs = vfsmod.vfs -filteropener = filtervfs = vfsmod.filtervfs -abstractvfs = vfsmod.abstractvfs -readonlyvfs = vfsmod.readonlyvfs -auditvfs = vfsmod.auditvfs +opener = _deprecated('opener', 'vfs', vfsmod.vfs) +cfs = _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): _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel