##// END OF EJS Templates
dirstate: show develwarn for write() invocation without transaction...
FUJIWARA Katsunori -
r26749:4a82cb5c default
parent child Browse files
Show More
@@ -110,6 +110,11 b' class largefilesdirstate(dirstate.dirsta'
110 return super(largefilesdirstate, self).normallookup(unixpath(f))
110 return super(largefilesdirstate, self).normallookup(unixpath(f))
111 def _ignore(self, f):
111 def _ignore(self, f):
112 return False
112 return False
113 def write(self, tr=False):
114 # (1) disable PENDING mode always
115 # (lfdirstate isn't yet managed as a part of the transaction)
116 # (2) avoid develwarn 'use dirstate.write with ....'
117 super(largefilesdirstate, self).write(None)
113
118
114 def openlfdirstate(ui, repo, create=True):
119 def openlfdirstate(ui, repo, create=True):
115 '''
120 '''
@@ -661,6 +661,11 b' class dirstate(object):'
661
661
662 filename = self._filename
662 filename = self._filename
663 if tr is False: # not explicitly specified
663 if tr is False: # not explicitly specified
664 if (self._ui.configbool('devel', 'all-warnings')
665 or self.ui.configbool('devel', 'check-dirstate-write')):
666 self._ui.develwarn('use dirstate.write with '
667 'repo.currenttransaction()')
668
664 if self._opener.lexists(self._pendingfilename):
669 if self._opener.lexists(self._pendingfilename):
665 # if pending file already exists, in-memory changes
670 # if pending file already exists, in-memory changes
666 # should be written into it, because it has priority
671 # should be written into it, because it has priority
General Comments 0
You need to be logged in to leave comments. Login now