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

login
register
mail settings
Submitter Pierre-Yves David
Date March 15, 2017, 7:43 a.m.
Message ID <7d93e88eca1999f86da7.1489563810@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19354/
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 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.

Patch

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