equal
deleted
inserted
replaced
559 added=False, |
559 added=False, |
560 merged=False, |
560 merged=False, |
561 from_p2=False, |
561 from_p2=False, |
562 possibly_dirty=False, |
562 possibly_dirty=False, |
563 ): |
563 ): |
564 ret = self._rustmap.addfile( |
564 if added: |
565 f, |
565 assert not possibly_dirty |
566 mode, |
566 assert not from_p2 |
567 size, |
567 item = DirstateItem.new_added() |
568 mtime, |
568 elif merged: |
569 added, |
569 assert not possibly_dirty |
570 merged, |
570 assert not from_p2 |
571 from_p2, |
571 item = DirstateItem.new_merged() |
572 possibly_dirty, |
572 elif from_p2: |
573 ) |
573 assert not possibly_dirty |
|
574 item = DirstateItem.new_from_p2() |
|
575 elif possibly_dirty: |
|
576 item = DirstateItem.new_possibly_dirty() |
|
577 else: |
|
578 size = size & rangemask |
|
579 mtime = mtime & rangemask |
|
580 item = DirstateItem.new_normal(mode, size, mtime) |
|
581 self._rustmap.addfile(f, item) |
574 if added: |
582 if added: |
575 self.copymap.pop(f, None) |
583 self.copymap.pop(f, None) |
576 return ret |
|
577 |
584 |
578 def reset_state( |
585 def reset_state( |
579 self, |
586 self, |
580 filename, |
587 filename, |
581 wc_tracked=False, |
588 wc_tracked=False, |