mercurial/cmdutil.py
changeset 20790 49f2d5644f04
parent 20773 efbf15979538
child 21024 7731a2281cf0
equal deleted inserted replaced
20789:d19c9bdbbf35 20790:49f2d5644f04
  1980             try:
  1980             try:
  1981                 if opts.get('secret'):
  1981                 if opts.get('secret'):
  1982                     commitphase = 'secret'
  1982                     commitphase = 'secret'
  1983                 else:
  1983                 else:
  1984                     commitphase = old.phase()
  1984                     commitphase = old.phase()
  1985                 repo.ui.setconfig('phases', 'new-commit', commitphase)
  1985                 repo.ui.setconfig('phases', 'new-commit', commitphase, 'amend')
  1986                 newid = repo.commitctx(new)
  1986                 newid = repo.commitctx(new)
  1987             finally:
  1987             finally:
  1988                 repo.ui.setconfig('phases', 'new-commit', ph)
  1988                 repo.ui.setconfig('phases', 'new-commit', ph, 'amend')
  1989             if newid != old.node():
  1989             if newid != old.node():
  1990                 # Reroute the working copy parent to the new changeset
  1990                 # Reroute the working copy parent to the new changeset
  1991                 repo.setparents(newid, nullid)
  1991                 repo.setparents(newid, nullid)
  1992 
  1992 
  1993                 # Move bookmarks from old parent to amend commit
  1993                 # Move bookmarks from old parent to amend commit