hgext/evolve.py
changeset 228 5a17c0d41a00
parent 219 cfdab01ca8a0
child 232 adb7e29cb2bd
equal deleted inserted replaced
227:abe52cf492ee 228:5a17c0d41a00
     5 #                Pierre-Yves David <pierre-yves.david@ens-lyon.org>
     5 #                Pierre-Yves David <pierre-yves.david@ens-lyon.org>
     6 #
     6 #
     7 # This software may be used and distributed according to the terms of the
     7 # This software may be used and distributed according to the terms of the
     8 # GNU General Public License version 2 or any later version.
     8 # GNU General Public License version 2 or any later version.
     9 
     9 
    10 '''A set of command to make changeset evolve.'''
    10 '''a set of commands to handle changeset mutation'''
    11 
    11 
    12 from mercurial import cmdutil
    12 from mercurial import cmdutil
    13 from mercurial import scmutil
    13 from mercurial import scmutil
    14 from mercurial import node
    14 from mercurial import node
    15 from mercurial import error
    15 from mercurial import error
   185      ('n', 'dry-run', False, 'Do nothing but printing what should be done'),
   185      ('n', 'dry-run', False, 'Do nothing but printing what should be done'),
   186      ('-A', 'any', False, 'Stabilize unstable change on any topological branch'),
   186      ('-A', 'any', False, 'Stabilize unstable change on any topological branch'),
   187     ],
   187     ],
   188     '')
   188     '')
   189 def stabilize(ui, repo, **opts):
   189 def stabilize(ui, repo, **opts):
   190     """move changeset out of they unstable state
   190     """move changeset out of the unstable state
   191 
   191 
   192     By default only works on changeset that will be rebase on ancestors of the
   192     By default only works on changeset that will be rebase on ancestors of the
   193     current working directory parent (included)"""
   193     current working directory parent (included)"""
   194 
   194 
   195     obsolete = extensions.find('obsolete')
   195     obsolete = extensions.find('obsolete')
   248 
   248 
   249 shorttemplate = '[{rev}] {desc|firstline}\n'
   249 shorttemplate = '[{rev}] {desc|firstline}\n'
   250 
   250 
   251 @command('^gdown',
   251 @command('^gdown',
   252     [],
   252     [],
   253     'update to working directory parent an display summary lines')
   253     '')
   254 def cmdgdown(ui, repo):
   254 def cmdgdown(ui, repo):
       
   255     """update to working directory parent an display summary lines"""
   255     wkctx = repo[None]
   256     wkctx = repo[None]
   256     wparents = wkctx.parents()
   257     wparents = wkctx.parents()
   257     if len(wparents) != 1:
   258     if len(wparents) != 1:
   258         raise util.Abort('merge in progress')
   259         raise util.Abort('merge in progress')
   259 
   260 
   270         ui.warn(_('multiple parents, explicitly update to one\n'))
   271         ui.warn(_('multiple parents, explicitly update to one\n'))
   271         return 1
   272         return 1
   272 
   273 
   273 @command('^gup',
   274 @command('^gup',
   274     [],
   275     [],
   275     'update to working directory children an display summary lines')
   276     '')
   276 def cmdup(ui, repo):
   277 def cmdup(ui, repo):
       
   278     """update to working directory children an display summary lines"""
   277     wkctx = repo[None]
   279     wkctx = repo[None]
   278     wparents = wkctx.parents()
   280     wparents = wkctx.parents()
   279     if len(wparents) != 1:
   281     if len(wparents) != 1:
   280         raise util.Abort('merge in progress')
   282         raise util.Abort('merge in progress')
   281 
   283