Patchwork [2,of,5] tagmerge: use 'wvfs' instead of 'wfile'

login
register
mail settings
Submitter Pierre-Yves David
Date March 15, 2017, 7:43 a.m.
Message ID <facaf8ca3cea37059909.1489563811@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19355/
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 1489562938 25200
#      Wed Mar 15 00:28:58 2017 -0700
# Node ID facaf8ca3cea37059909cf61140bed0f6ae379e6
# Parent  7d93e88eca1999f86da79237796c3d3ab26596bc
# 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 facaf8ca3cea
tagmerge: use 'wvfs' instead of 'wfile'

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

Patch

diff --git a/mercurial/tagmerge.py b/mercurial/tagmerge.py
--- a/mercurial/tagmerge.py
+++ b/mercurial/tagmerge.py
@@ -169,7 +169,7 @@  def writemergedtags(repo, mergedtags):
     # finally we can join the sorted groups to get the final contents of the
     # merged .hgtags file, and then write it to disk
     mergedtagstring = '\n'.join([tags for rank, tags in finaltags if tags])
-    fp = repo.wfile('.hgtags', 'wb')
+    fp = repo.wvfs('.hgtags', 'wb')
     fp.write(mergedtagstring + '\n')
     fp.close()