comparison mercurial/dirstate.py @ 29149:2e40fada340b

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.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 11 May 2016 09:31:47 +0200
parents d115cbf5980b
children 0e9ed09f5fe9
comparison
equal deleted inserted replaced
29148:899879becd65 29149:2e40fada340b
692 if not self._dirty: 692 if not self._dirty:
693 return 693 return
694 694
695 filename = self._filename 695 filename = self._filename
696 if tr is False: # not explicitly specified 696 if tr is False: # not explicitly specified
697 self._ui.develwarn('use dirstate.write with ' 697 self._ui.deprecwarn('use dirstate.write with '
698 'repo.currenttransaction()', 698 'repo.currenttransaction()',
699 config='check-dirstate-write') 699 '3.9')
700 700
701 if self._opener.lexists(self._pendingfilename): 701 if self._opener.lexists(self._pendingfilename):
702 # if pending file already exists, in-memory changes 702 # if pending file already exists, in-memory changes
703 # should be written into it, because it has priority 703 # should be written into it, because it has priority
704 # to '.hg/dirstate' at reading under HG_PENDING mode 704 # to '.hg/dirstate' at reading under HG_PENDING mode