##// END OF EJS Templates
deprecation: enforce thew 'tr' argument of 'dirstate.write' (API)...
Pierre-Yves David -
r29673:52ff07e1 default
parent child Browse files
Show More
@@ -74,8 +74,6 b' def _trypending(root, vfs, filename):'
74 74 raise
75 75 return (vfs(filename), False)
76 76
77 _token = object()
78
79 77 class dirstate(object):
80 78
81 79 def __init__(self, opener, ui, root, validate):
@@ -692,22 +690,12 b' class dirstate(object):'
692 690 self._pl = (parent, nullid)
693 691 self._dirty = True
694 692
695 def write(self, tr=_token):
693 def write(self, tr):
696 694 if not self._dirty:
697 695 return
698 696
699 697 filename = self._filename
700 if tr is _token: # not explicitly specified
701 self._ui.deprecwarn('use dirstate.write with '
702 'repo.currenttransaction()',
703 '3.9')
704
705 if self._opener.lexists(self._pendingfilename):
706 # if pending file already exists, in-memory changes
707 # should be written into it, because it has priority
708 # to '.hg/dirstate' at reading under HG_PENDING mode
709 filename = self._pendingfilename
710 elif tr:
698 if tr:
711 699 # 'dirstate.write()' is not only for writing in-memory
712 700 # changes out, but also for dropping ambiguous timestamp.
713 701 # delayed writing re-raise "ambiguous timestamp issue".
General Comments 0
You need to be logged in to leave comments. Login now