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

login
register
mail settings
Submitter Pierre-Yves David
Date May 11, 2016, 7:38 a.m.
Message ID <685102426f222a674696.1462952332@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/15010/
State Accepted
Commit 2e40fada340ba1507e736842dd972f1b5c586bbe
Headers show

Comments

Pierre-Yves David - May 11, 2016, 7:38 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1462951907 -7200
#      Wed May 11 09:31:47 2016 +0200
# Node ID 685102426f222a6746960a905e2392cc2c4607da
# Parent  88cf0151f1d38dd4626bbf100471ade049108c14
# 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 88cf0151f1d3 -r 685102426f22 mercurial/dirstate.py
--- a/mercurial/dirstate.py	Wed May 11 09:31:47 2016 +0200
+++ b/mercurial/dirstate.py	Wed May 11 09:31:47 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