##// END OF EJS Templates
dirstate: drop the `_otherparent` method...
marmoute -
r48729:496a8e38 default
parent child Browse files
Show More
@@ -729,10 +729,8 b' class dirstate(object):'
729 # (see `merged_removed` and `from_p2_removed`)
729 # (see `merged_removed` and `from_p2_removed`)
730 if entry.merged_removed or entry.from_p2_removed:
730 if entry.merged_removed or entry.from_p2_removed:
731 source = self._map.copymap.get(f)
731 source = self._map.copymap.get(f)
732 if entry.merged_removed:
732 self._addpath(f, from_p2=True)
733 self._otherparent(f)
733 self._map.copymap.pop(f, None)
734 elif entry.from_p2_removed:
735 self._otherparent(f)
736 if source is not None:
734 if source is not None:
737 self.copy(source, f)
735 self.copy(source, f)
738 return
736 return
@@ -741,19 +739,6 b' class dirstate(object):'
741 self._addpath(f, possibly_dirty=True)
739 self._addpath(f, possibly_dirty=True)
742 self._map.copymap.pop(f, None)
740 self._map.copymap.pop(f, None)
743
741
744 def _otherparent(self, f):
745 if not self.in_merge:
746 msg = _(b"setting %r to other parent only allowed in merges") % f
747 raise error.Abort(msg)
748 entry = self._map.get(f)
749 if entry is not None and entry.tracked:
750 # merge-like
751 self._addpath(f, merged=True)
752 else:
753 # add-like
754 self._addpath(f, from_p2=True)
755 self._map.copymap.pop(f, None)
756
757 def _add(self, filename):
742 def _add(self, filename):
758 """internal function to mark a file as added"""
743 """internal function to mark a file as added"""
759 self._addpath(filename, added=True)
744 self._addpath(filename, added=True)
General Comments 0
You need to be logged in to leave comments. Login now