mercurial/merge.py
changeset 27122 77d760ba8dcd
parent 27121 b08c31cfc4b6
child 27129 1bf1a7c3df43
equal deleted inserted replaced
27121:b08c31cfc4b6 27122:77d760ba8dcd
   456             self.mark(dfile, 'r')
   456             self.mark(dfile, 'r')
   457 
   457 
   458         if complete:
   458         if complete:
   459             action = None
   459             action = None
   460             if deleted:
   460             if deleted:
   461                 if not fcd.isabsent():
   461                 if fcd.isabsent():
       
   462                     # dc: local picked. Need to drop if present, which may
       
   463                     # happen on re-resolves.
       
   464                     action = 'f'
       
   465                 else:
   462                     # cd: remote picked (or otherwise deleted)
   466                     # cd: remote picked (or otherwise deleted)
   463                     action = 'r'
   467                     action = 'r'
   464                 # else: dc: local picked (no action necessary)
       
   465             else:
   468             else:
   466                 if fcd.isabsent(): # dc: remote picked
   469                 if fcd.isabsent(): # dc: remote picked
   467                     action = 'g'
   470                     action = 'g'
   468                 elif fco.isabsent(): # cd: local picked
   471                 elif fco.isabsent(): # cd: local picked
   469                     action = 'a'
   472                     action = 'a'
   509         return len([True for f, entry in self._state.iteritems()
   512         return len([True for f, entry in self._state.iteritems()
   510                     if entry[0] == 'u'])
   513                     if entry[0] == 'u'])
   511 
   514 
   512     def actions(self):
   515     def actions(self):
   513         """return lists of actions to perform on the dirstate"""
   516         """return lists of actions to perform on the dirstate"""
   514         actions = {'r': [], 'a': [], 'g': []}
   517         actions = {'r': [], 'f': [], 'a': [], 'g': []}
   515         for f, (r, action) in self._results.iteritems():
   518         for f, (r, action) in self._results.iteritems():
   516             if action is not None:
   519             if action is not None:
   517                 actions[action].append((f, None, "merge result"))
   520                 actions[action].append((f, None, "merge result"))
   518         return actions
   521         return actions
   519 
   522