mercurial/cmdutil.py
branchstable
changeset 20700 b0153cb8b64e
parent 20072 6d4fda48b4e3
child 20702 2764148aa088
child 20771 434619dae569
equal deleted inserted replaced
20699:58c32a9c8e7b 20700:b0153cb8b64e
  1795                 # This not what we expect from amend.
  1795                 # This not what we expect from amend.
  1796                 return old.node()
  1796                 return old.node()
  1797 
  1797 
  1798             ph = repo.ui.config('phases', 'new-commit', phases.draft)
  1798             ph = repo.ui.config('phases', 'new-commit', phases.draft)
  1799             try:
  1799             try:
  1800                 repo.ui.setconfig('phases', 'new-commit', old.phase())
  1800                 if opts.get('secret'):
       
  1801                     commitphase = 'secret'
       
  1802                 else:
       
  1803                     commitphase = old.phase()
       
  1804                 repo.ui.setconfig('phases', 'new-commit', commitphase)
  1801                 newid = repo.commitctx(new)
  1805                 newid = repo.commitctx(new)
  1802             finally:
  1806             finally:
  1803                 repo.ui.setconfig('phases', 'new-commit', ph)
  1807                 repo.ui.setconfig('phases', 'new-commit', ph)
  1804             if newid != old.node():
  1808             if newid != old.node():
  1805                 # Reroute the working copy parent to the new changeset
  1809                 # Reroute the working copy parent to the new changeset