mercurial/commands.py
changeset 27148 39163708825c
parent 27147 804abe8999f3
child 27167 3fe8cb40c9c5
equal deleted inserted replaced
27147:804abe8999f3 27148:39163708825c
  1615             raise error.Abort(_('cannot amend while merging'))
  1615             raise error.Abort(_('cannot amend while merging'))
  1616         allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt)
  1616         allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt)
  1617         if not allowunstable and old.children():
  1617         if not allowunstable and old.children():
  1618             raise error.Abort(_('cannot amend changeset with children'))
  1618             raise error.Abort(_('cannot amend changeset with children'))
  1619 
  1619 
       
  1620         newextra = extra.copy()
       
  1621         newextra['branch'] = branch
       
  1622         extra = newextra
  1620         # commitfunc is used only for temporary amend commit by cmdutil.amend
  1623         # commitfunc is used only for temporary amend commit by cmdutil.amend
  1621         def commitfunc(ui, repo, message, match, opts):
  1624         def commitfunc(ui, repo, message, match, opts):
  1622             return repo.commit(message,
  1625             return repo.commit(message,
  1623                                opts.get('user') or old.user(),
  1626                                opts.get('user') or old.user(),
  1624                                opts.get('date') or old.date(),
  1627                                opts.get('date') or old.date(),