Patchwork [3,of,7] devel: use the new 'config' argument for the dirstate develwarn

login
register
mail settings
Submitter Pierre-Yves David
Date May 5, 2016, 5:05 p.m.
Message ID <32b36022d50653b1d73e.1462467953@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/14924/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Pierre-Yves David - May 5, 2016, 5:05 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1462465753 -7200
#      Thu May 05 18:29:13 2016 +0200
# Node ID 32b36022d50653b1d73e20905933081f29f88d24
# Parent  11839ae148f45e30e51ca34b72ba159343e9dad9
# EXP-Topic develwarn
devel: use the new 'config' argument for the dirstate develwarn

Patch

diff -r 11839ae148f4 -r 32b36022d506 mercurial/dirstate.py
--- a/mercurial/dirstate.py	Thu May 05 18:29:03 2016 +0200
+++ b/mercurial/dirstate.py	Thu May 05 18:29:13 2016 +0200
@@ -694,10 +694,9 @@  class dirstate(object):
 
         filename = self._filename
         if tr is False: # not explicitly specified
-            if (self._ui.configbool('devel', 'all-warnings')
-                or self._ui.configbool('devel', 'check-dirstate-write')):
-                self._ui.develwarn('use dirstate.write with '
-                                   'repo.currenttransaction()')
+            self._ui.develwarn('use dirstate.write with '
+                               'repo.currenttransaction()',
+                               config='check-dirstate-write')
 
             if self._opener.lexists(self._pendingfilename):
                 # if pending file already exists, in-memory changes