[PATCH 1 of 5] gpg: use 'wvfs' instead of 'wfile'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 15 07:43:30 UTC 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1489562901 25200
#      Wed Mar 15 00:28:21 2017 -0700
# Node ID 7d93e88eca1999f86da79237796c3d3ab26596bc
# Parent  1c48a8278b2f015fca607dfc652823560a5ac580
# 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 7d93e88eca19
gpg: use 'wvfs' instead of 'wfile'

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

diff --git a/hgext/gpg.py b/hgext/gpg.py
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -281,7 +281,7 @@ def _dosign(ui, repo, *revs, **opts):
             raise error.Abort(_("working copy of .hgsigs is changed "),
                              hint=_("please commit .hgsigs manually"))
 
-    sigsfile = repo.wfile(".hgsigs", "ab")
+    sigsfile = repo.wvfs(".hgsigs", "ab")
     sigsfile.write(sigmessage)
     sigsfile.close()
 


More information about the Mercurial-devel mailing list