Patchwork [5,of,5] localrepo: deprecate 'wfile'

login
register
mail settings
Submitter Pierre-Yves David
Date March 15, 2017, 7:43 a.m.
Message ID <e8af406bdf002ec5374a.1489563814@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19358/
State Accepted
Headers show

Comments

Pierre-Yves David - March 15, 2017, 7:43 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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):