Patchwork [4,of,5] eol: use 'wvfs' instead of 'wfile'

login
register
mail settings
Submitter Pierre-Yves David
Date March 15, 2017, 7:43 a.m.
Message ID <6efb8f2d2453e33c3463.1489563813@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19357/
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 1489563119 25200
#      Wed Mar 15 00:31:59 2017 -0700
# Node ID 6efb8f2d2453e33c3463045b9d5f9b0ff356e984
# Parent  80da55359b34584991814524f6a11eaa1a97b55f
# 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 6efb8f2d2453
eol: use 'wvfs' instead of 'wfile'

Method is about to be deprecated and the modern form is shorter.

Patch

diff --git a/hgext/eol.py b/hgext/eol.py
--- a/hgext/eol.py
+++ b/hgext/eol.py
@@ -223,7 +223,7 @@  def parseeol(ui, repo, nodes):
                 if node is None:
                     # Cannot use workingctx.data() since it would load
                     # and cache the filters before we configure them.
-                    data = repo.wfile('.hgeol').read()
+                    data = repo.wvfs('.hgeol').read()
                 else:
                     data = repo[node]['.hgeol'].data()
                 return eolfile(ui, repo.root, data)