Patchwork [3,of,4] devel: officially deprecate dirstate.write without transaction argument

login
register
mail settings
Submitter Pierre-Yves David
Date May 8, 2016, 9:35 p.m.
Message ID <0bca9eed5d743dc99dac.1462743326@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/14974/
State Superseded
Commit 2e40fada340ba1507e736842dd972f1b5c586bbe
Headers show

Comments

Pierre-Yves David - May 8, 2016, 9:35 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1462469075 -7200
#      Thu May 05 19:24:35 2016 +0200
# Node ID 0bca9eed5d743dc99dac33f7c866fccee4f0168c
# Parent  cbb9caf8a54e5e6a6e9fe4b0e5f8f852d349d740
# EXP-Topic deprecate
devel: officially deprecate dirstate.write without transaction argument

When we introduce the develwarning, we did not had an official deprecation API
and infrastructure. We can now officially deprecate the old way with a version
deadline.

Patch

diff -r cbb9caf8a54e -r 0bca9eed5d74 mercurial/dirstate.py
--- a/mercurial/dirstate.py	Thu May 05 19:23:49 2016 +0200
+++ b/mercurial/dirstate.py	Thu May 05 19:24:35 2016 +0200
@@ -694,9 +694,9 @@  class dirstate(object):
 
         filename = self._filename
         if tr is False: # not explicitly specified
-            self._ui.develwarn('use dirstate.write with '
+            self._ui.deprecwarn('use dirstate.write with '
                                'repo.currenttransaction()',
-                               config='check-dirstate-write')
+                               '3.9')
 
             if self._opener.lexists(self._pendingfilename):
                 # if pending file already exists, in-memory changes