##// 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 74 raise
75 75 return (vfs(filename), False)
76 76
77 _token = object()
78
77 79 class dirstate(object):
78 80
79 81 def __init__(self, opener, ui, root, validate):
@@ -688,12 +690,12 b' class dirstate(object):'
688 690 self._pl = (parent, nullid)
689 691 self._dirty = True
690 692
691 def write(self, tr=False):
693 def write(self, tr=_token):
692 694 if not self._dirty:
693 695 return
694 696
695 697 filename = self._filename
696 if tr is False: # not explicitly specified
698 if tr is _token: # not explicitly specified
697 699 self._ui.deprecwarn('use dirstate.write with '
698 700 'repo.currenttransaction()',
699 701 '3.9')
General Comments 0
You need to be logged in to leave comments. Login now