hgext/evolve.py
branchstable
changeset 1569 bd1468c23d88
parent 1528 afb0a33c4f6c
child 1570 0edb2c25f806
equal deleted inserted replaced
1529:b338fe4e0657 1569:bd1468c23d88
   145 #####################################################################
   145 #####################################################################
   146 
   146 
   147 class exthelper(object):
   147 class exthelper(object):
   148     """Helper for modular extension setup
   148     """Helper for modular extension setup
   149 
   149 
   150     A single helper should be instanciated for each extension. Helper
   150     A single helper should be instantiated for each extension. Helper
   151     methods are then used as decorator for various purpose.
   151     methods are then used as decorators for various purpose.
   152 
   152 
   153     All decorators return the original function and may be chained.
   153     All decorators return the original function and may be chained.
   154     """
   154     """
   155 
   155 
   156     def __init__(self):
   156     def __init__(self):
   793     try:
   793     try:
   794         histedit = extensions.find('histedit')
   794         histedit = extensions.find('histedit')
   795         if histedit:
   795         if histedit:
   796             extensions.wrapcommand(histedit.cmdtable, 'histedit', warnobserrors)
   796             extensions.wrapcommand(histedit.cmdtable, 'histedit', warnobserrors)
   797     except KeyError:
   797     except KeyError:
   798         pass  # rebase not found
   798         pass  # histedit not found
   799 
   799 
   800 #####################################################################
   800 #####################################################################
   801 ### Old Evolve extension content                                  ###
   801 ### Old Evolve extension content                                  ###
   802 #####################################################################
   802 #####################################################################
   803 
   803 
  1391         ui.progress('evolve', None)
  1391         ui.progress('evolve', None)
  1392     if repo['.'] != startnode:
  1392     if repo['.'] != startnode:
  1393         ui.status(_('working directory is now at %s\n') % repo['.'])
  1393         ui.status(_('working directory is now at %s\n') % repo['.'])
  1394 
  1394 
  1395 class MultipleSuccessorsError(RuntimeError):
  1395 class MultipleSuccessorsError(RuntimeError):
  1396     """Exception raised by _singlesuccessor when multiple sucessors sets exists
  1396     """Exception raised by _singlesuccessor when multiple successor sets exists
  1397 
  1397 
  1398     The object contains the list of successorssets in its 'successorssets'
  1398     The object contains the list of successorssets in its 'successorssets'
  1399     attribute to call to easily recover.
  1399     attribute to call to easily recover.
  1400     """
  1400     """
  1401 
  1401 
  1745                 result.add(unstable)
  1745                 result.add(unstable)
  1746     return sorted(result - target)
  1746     return sorted(result - target)
  1747 
  1747 
  1748 def _solveunstable(ui, repo, orig, dryrun=False, confirm=False,
  1748 def _solveunstable(ui, repo, orig, dryrun=False, confirm=False,
  1749                    progresscb=None):
  1749                    progresscb=None):
  1750     """Stabilize a unstable changeset"""
  1750     """Stabilize an unstable changeset"""
  1751     obs = orig.parents()[0]
  1751     obs = orig.parents()[0]
  1752     if not obs.obsolete() and len(orig.parents()) == 2:
  1752     if not obs.obsolete() and len(orig.parents()) == 2:
  1753         obs = orig.parents()[1] # second parent is obsolete ?
  1753         obs = orig.parents()[1] # second parent is obsolete ?
  1754 
  1754 
  1755     if not obs.obsolete():
  1755     if not obs.obsolete():