##// END OF EJS Templates
dirstate: add default value to _addpath...
marmoute -
r48280:523c0038 default
parent child Browse files
Show More
@@ -438,7 +438,7 b' class dirstate(object):'
438 def copies(self):
438 def copies(self):
439 return self._map.copymap
439 return self._map.copymap
440
440
441 def _addpath(self, f, state, mode, size, mtime):
441 def _addpath(self, f, state, mode, size=NONNORMAL, mtime=AMBIGUOUS_TIME):
442 oldstate = self[f]
442 oldstate = self[f]
443 if state == b'a' or oldstate == b'r':
443 if state == b'a' or oldstate == b'r':
444 scmutil.checkfilename(f)
444 scmutil.checkfilename(f)
@@ -509,7 +509,7 b' class dirstate(object):'
509 return
509 return
510 if entry[0] == b'm' or entry[0] == b'n' and entry[2] == FROM_P2:
510 if entry[0] == b'm' or entry[0] == b'n' and entry[2] == FROM_P2:
511 return
511 return
512 self._addpath(f, b'n', 0, NONNORMAL, AMBIGUOUS_TIME)
512 self._addpath(f, b'n', 0)
513 self._map.copymap.pop(f, None)
513 self._map.copymap.pop(f, None)
514
514
515 def otherparent(self, f):
515 def otherparent(self, f):
@@ -519,15 +519,15 b' class dirstate(object):'
519 raise error.Abort(msg)
519 raise error.Abort(msg)
520 if f in self and self[f] == b'n':
520 if f in self and self[f] == b'n':
521 # merge-like
521 # merge-like
522 self._addpath(f, b'm', 0, FROM_P2, AMBIGUOUS_TIME)
522 self._addpath(f, b'm', 0, FROM_P2)
523 else:
523 else:
524 # add-like
524 # add-like
525 self._addpath(f, b'n', 0, FROM_P2, AMBIGUOUS_TIME)
525 self._addpath(f, b'n', 0, FROM_P2)
526 self._map.copymap.pop(f, None)
526 self._map.copymap.pop(f, None)
527
527
528 def add(self, f):
528 def add(self, f):
529 '''Mark a file added.'''
529 '''Mark a file added.'''
530 self._addpath(f, b'a', 0, NONNORMAL, AMBIGUOUS_TIME)
530 self._addpath(f, b'a', 0)
531 self._map.copymap.pop(f, None)
531 self._map.copymap.pop(f, None)
532
532
533 def remove(self, f):
533 def remove(self, f):
General Comments 0
You need to be logged in to leave comments. Login now