##// END OF EJS Templates
dirstate: eliminate redundant check parameter on _addpath()...
Adrian Buehlmann -
r17196:2abe975f default
parent child Browse files
Show More
@@ -312,10 +312,10 b' class dirstate(object):'
312 312 if self[f] not in "?r" and "_dirs" in self.__dict__:
313 313 _decdirs(self._dirs, f)
314 314
315 def _addpath(self, f, state, mode, size, mtime, check=False):
315 def _addpath(self, f, state, mode, size, mtime):
316 316 assert state not in "?r"
317 317 oldstate = self[f]
318 if check or oldstate == "r":
318 if state == 'a' or oldstate == 'r':
319 319 scmutil.checkfilename(f)
320 320 if f in self._dirs:
321 321 raise util.Abort(_('directory %r already in dirstate') % f)
@@ -377,7 +377,7 b' class dirstate(object):'
377 377
378 378 def add(self, f):
379 379 '''Mark a file added.'''
380 self._addpath(f, 'a', 0, -1, -1, True)
380 self._addpath(f, 'a', 0, -1, -1)
381 381 if f in self._copymap:
382 382 del self._copymap[f]
383 383
General Comments 0
You need to be logged in to leave comments. Login now