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

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


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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.

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


More information about the Mercurial-devel mailing list