[PATCH 5 of 5] localrepo: deprecate 'wfile'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 15 03:43:34 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1489562837 25200
#      Wed Mar 15 00:27:17 2017 -0700
# Node ID e8af406bdf002ec5374ab9387301504cc67b1ef0
# Parent  6efb8f2d2453e33c3463045b9d5f9b0ff356e984
# 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 e8af406bdf00
localrepo: deprecate 'wfile'

The method had very few users and the modern form is shorter. So let us
deprecates another method of the localrepo class.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -975,6 +975,7 @@ class localrepository(object):
         return self.dirstate.pathto(f, cwd)
 
     def wfile(self, f, mode='r'):
+        self.ui.deprecwarn("use 'repo.wvfs' instead of 'repo.wfile'", '4.1')
         return self.wvfs(f, mode)
 
     def _link(self, f):


More information about the Mercurial-devel mailing list