##// END OF EJS Templates
cleanup: replace False identity testing with an explicit token object...
Pierre-Yves David -
r29150:0e9ed09f default
parent child Browse files
Show More
@@ -74,6 +74,8 b' def _trypending(root, vfs, filename):'
74 raise
74 raise
75 return (vfs(filename), False)
75 return (vfs(filename), False)
76
76
77 _token = object()
78
77 class dirstate(object):
79 class dirstate(object):
78
80
79 def __init__(self, opener, ui, root, validate):
81 def __init__(self, opener, ui, root, validate):
@@ -688,12 +690,12 b' class dirstate(object):'
688 self._pl = (parent, nullid)
690 self._pl = (parent, nullid)
689 self._dirty = True
691 self._dirty = True
690
692
691 def write(self, tr=False):
693 def write(self, tr=_token):
692 if not self._dirty:
694 if not self._dirty:
693 return
695 return
694
696
695 filename = self._filename
697 filename = self._filename
696 if tr is False: # not explicitly specified
698 if tr is _token: # not explicitly specified
697 self._ui.deprecwarn('use dirstate.write with '
699 self._ui.deprecwarn('use dirstate.write with '
698 'repo.currenttransaction()',
700 'repo.currenttransaction()',
699 '3.9')
701 '3.9')
General Comments 0
You need to be logged in to leave comments. Login now