hgext/histedit.py
changeset 27085 d50ff8f4891f
parent 27084 383f10b67fd6
child 27086 5f5c7d9f4a08
equal deleted inserted replaced
27084:383f10b67fd6 27085:d50ff8f4891f
   643                         (newnode, (n,)),
   643                         (newnode, (n,)),
   644                        ]
   644                        ]
   645         for ich in internalchanges:
   645         for ich in internalchanges:
   646             replacements.append((ich, (n,)))
   646             replacements.append((ich, (n,)))
   647         return repo[n], replacements
   647         return repo[n], replacements
       
   648 
       
   649 class base(histeditaction):
       
   650     def constraints(self):
       
   651         return set(['forceother'])
       
   652 
       
   653     def run(self):
       
   654         if self.repo['.'].node() != self.node:
       
   655             mergemod.update(self.repo, self.node, False, True, False)
       
   656             #                                     branchmerge, force, partial)
       
   657         return self.continueclean()
       
   658 
       
   659     def continuedirty(self):
       
   660         abortdirty()
       
   661 
       
   662     def continueclean(self):
       
   663         basectx = self.repo['.']
       
   664         return basectx, []
   648 
   665 
   649 class _multifold(fold):
   666 class _multifold(fold):
   650     """fold subclass used for when multiple folds happen in a row
   667     """fold subclass used for when multiple folds happen in a row
   651 
   668 
   652     We only want to fire the editor for the folded message once when
   669     We only want to fire the editor for the folded message once when
  1289 def extsetup(ui):
  1306 def extsetup(ui):
  1290     cmdutil.summaryhooks.add('histedit', summaryhook)
  1307     cmdutil.summaryhooks.add('histedit', summaryhook)
  1291     cmdutil.unfinishedstates.append(
  1308     cmdutil.unfinishedstates.append(
  1292         ['histedit-state', False, True, _('histedit in progress'),
  1309         ['histedit-state', False, True, _('histedit in progress'),
  1293          _("use 'hg histedit --continue' or 'hg histedit --abort'")])
  1310          _("use 'hg histedit --continue' or 'hg histedit --abort'")])
       
  1311     if ui.configbool("experimental", "histeditng"):
       
  1312         actiontable.update({'b': base, 'base': base})