mercurial/dirstate.py
changeset 47911 3d2c17c5d7f2
parent 47910 50bed873a765
child 47912 91afee6f959e
equal deleted inserted replaced
47910:50bed873a765 47911:3d2c17c5d7f2
   741                     return
   741                     return
   742                 elif entry.merged or entry.from_p2:
   742                 elif entry.merged or entry.from_p2:
   743                     return
   743                     return
   744         self._addpath(f, possibly_dirty=True)
   744         self._addpath(f, possibly_dirty=True)
   745         self._map.copymap.pop(f, None)
   745         self._map.copymap.pop(f, None)
   746 
       
   747     def otherparent(self, f):
       
   748         '''Mark as coming from the other parent, always dirty.'''
       
   749         if self.pendingparentchange():
       
   750             util.nouideprecwarn(
       
   751                 b"do not use `otherparent` inside of update/merge context."
       
   752                 b" Use `update_file` or `update_file_p1`",
       
   753                 b'6.0',
       
   754                 stacklevel=2,
       
   755             )
       
   756         else:
       
   757             util.nouideprecwarn(
       
   758                 b"do not use `otherparent` outside of update/merge context."
       
   759                 b"It should have been set by the update/merge code",
       
   760                 b'6.0',
       
   761                 stacklevel=2,
       
   762             )
       
   763         self._otherparent(f)
       
   764 
   746 
   765     def _otherparent(self, f):
   747     def _otherparent(self, f):
   766         if not self.in_merge:
   748         if not self.in_merge:
   767             msg = _(b"setting %r to other parent only allowed in merges") % f
   749             msg = _(b"setting %r to other parent only allowed in merges") % f
   768             raise error.Abort(msg)
   750             raise error.Abort(msg)