mercurial/cmdutil.py
branchstable
changeset 17461 bacde764fba0
parent 17391 fc24c10424d2
child 17468 8fea378242e3
equal deleted inserted replaced
17454:f5e86b416e05 17461:bacde764fba0
     8 from node import hex, nullid, nullrev, short
     8 from node import hex, nullid, nullrev, short
     9 from i18n import _
     9 from i18n import _
    10 import os, sys, errno, re, tempfile
    10 import os, sys, errno, re, tempfile
    11 import util, scmutil, templater, patch, error, templatekw, revlog, copies
    11 import util, scmutil, templater, patch, error, templatekw, revlog, copies
    12 import match as matchmod
    12 import match as matchmod
    13 import subrepo, context, repair, bookmarks, graphmod, revset
    13 import subrepo, context, repair, bookmarks, graphmod, revset, phases
    14 
    14 
    15 def parsealiases(cmd):
    15 def parsealiases(cmd):
    16     return cmd.lstrip("^").split("|")
    16     return cmd.lstrip("^").split("|")
    17 
    17 
    18 def findpossible(cmd, table, strict=False):
    18 def findpossible(cmd, table, strict=False):
  1666                              files=files,
  1666                              files=files,
  1667                              filectxfn=filectxfn,
  1667                              filectxfn=filectxfn,
  1668                              user=user,
  1668                              user=user,
  1669                              date=date,
  1669                              date=date,
  1670                              extra=extra)
  1670                              extra=extra)
  1671         newid = repo.commitctx(new)
  1671         ph = repo.ui.config('phases', 'new-commit', phases.draft)
       
  1672         try:
       
  1673             repo.ui.setconfig('phases', 'new-commit', old.phase())
       
  1674             newid = repo.commitctx(new)
       
  1675         finally:
       
  1676             repo.ui.setconfig('phases', 'new-commit', ph)
  1672         if newid != old.node():
  1677         if newid != old.node():
  1673             # Reroute the working copy parent to the new changeset
  1678             # Reroute the working copy parent to the new changeset
  1674             repo.setparents(newid, nullid)
  1679             repo.setparents(newid, nullid)
  1675 
  1680 
  1676             # Move bookmarks from old parent to amend commit
  1681             # Move bookmarks from old parent to amend commit