mercurial/cmdutil.py
changeset 20710 9c1665f36588
parent 20704 623ed0ed793e
parent 20702 2764148aa088
child 20755 cfd03c069e08
equal deleted inserted replaced
20709:71df845d86cf 20710:9c1665f36588
  1967                 # This not what we expect from amend.
  1967                 # This not what we expect from amend.
  1968                 return old.node()
  1968                 return old.node()
  1969 
  1969 
  1970             ph = repo.ui.config('phases', 'new-commit', phases.draft)
  1970             ph = repo.ui.config('phases', 'new-commit', phases.draft)
  1971             try:
  1971             try:
  1972                 repo.ui.setconfig('phases', 'new-commit', old.phase())
  1972                 if opts.get('secret'):
       
  1973                     commitphase = 'secret'
       
  1974                 else:
       
  1975                     commitphase = old.phase()
       
  1976                 repo.ui.setconfig('phases', 'new-commit', commitphase)
  1973                 newid = repo.commitctx(new)
  1977                 newid = repo.commitctx(new)
  1974             finally:
  1978             finally:
  1975                 repo.ui.setconfig('phases', 'new-commit', ph)
  1979                 repo.ui.setconfig('phases', 'new-commit', ph)
  1976             if newid != old.node():
  1980             if newid != old.node():
  1977                 # Reroute the working copy parent to the new changeset
  1981                 # Reroute the working copy parent to the new changeset