mercurial/phases.py
branchstable
changeset 16030 308406677e9d
parent 16025 6697498bdd83
child 16051 2aa5b51f310f
equal deleted inserted replaced
16029:ee1c8385e5b0 16030:308406677e9d
   296     * `rroots`: define the second we substract to the first"""
   296     * `rroots`: define the second we substract to the first"""
   297     revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
   297     revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
   298                       heads, roots, roots, heads)
   298                       heads, roots, roots, heads)
   299     return [c.node() for c in revset]
   299     return [c.node() for c in revset]
   300 
   300 
       
   301 
       
   302 def newcommitphase(ui):
       
   303     """helper to get the target phase of new commit
       
   304 
       
   305     Handle all possible values for the phases.new-commit options.
       
   306 
       
   307     """
       
   308     v = ui.config('phases', 'new-commit', draft)
       
   309     try:
       
   310         return phasenames.index(v)
       
   311     except ValueError:
       
   312         try:
       
   313             return int(v)
       
   314         except ValueError:
       
   315             msg = _("phases.new-commit: not a valid phase name ('%s')")
       
   316             raise error.ConfigError(msg % v)
       
   317