mercurial/dirstate.py
changeset 47945 8e46934c58d2
parent 47944 3911c61f09c6
child 47946 51cd60c0a345
equal deleted inserted replaced
47944:3911c61f09c6 47945:8e46934c58d2
   759 
   759 
   760     def _add(self, filename):
   760     def _add(self, filename):
   761         """internal function to mark a file as added"""
   761         """internal function to mark a file as added"""
   762         self._addpath(filename, added=True)
   762         self._addpath(filename, added=True)
   763         self._map.copymap.pop(filename, None)
   763         self._map.copymap.pop(filename, None)
   764 
       
   765     def merge(self, f):
       
   766         '''Mark a file merged.'''
       
   767         if self.pendingparentchange():
       
   768             util.nouideprecwarn(
       
   769                 b"do not use `merge` inside of update/merge context."
       
   770                 b" Use `update_file`",
       
   771                 b'6.0',
       
   772                 stacklevel=2,
       
   773             )
       
   774         else:
       
   775             util.nouideprecwarn(
       
   776                 b"do not use `merge` outside of update/merge context."
       
   777                 b"It should have been set by the update/merge code",
       
   778                 b'6.0',
       
   779                 stacklevel=2,
       
   780             )
       
   781         self._merge(f)
       
   782 
   764 
   783     def _merge(self, f):
   765     def _merge(self, f):
   784         if not self.in_merge:
   766         if not self.in_merge:
   785             return self._normallookup(f)
   767             return self._normallookup(f)
   786         return self._otherparent(f)
   768         return self._otherparent(f)