mercurial/cmdutil.py
changeset 34794 5781e0931c16
parent 34698 23eb03f46929
child 34852 d45236f3d38e
equal deleted inserted replaced
34793:3df59451cdec 34794:5781e0931c16
  3150             newid = repo.commitctx(new)
  3150             newid = repo.commitctx(new)
  3151 
  3151 
  3152         # Reroute the working copy parent to the new changeset
  3152         # Reroute the working copy parent to the new changeset
  3153         repo.setparents(newid, nullid)
  3153         repo.setparents(newid, nullid)
  3154         mapping = {old.node(): (newid,)}
  3154         mapping = {old.node(): (newid,)}
  3155         scmutil.cleanupnodes(repo, mapping, 'amend')
  3155         obsmetadata = None
       
  3156         if opts.get('note'):
       
  3157             obsmetadata = {'note': opts['note']}
       
  3158         scmutil.cleanupnodes(repo, mapping, 'amend', metadata=obsmetadata)
  3156 
  3159 
  3157         # Fixing the dirstate because localrepo.commitctx does not update
  3160         # Fixing the dirstate because localrepo.commitctx does not update
  3158         # it. This is rather convenient because we did not need to update
  3161         # it. This is rather convenient because we did not need to update
  3159         # the dirstate for all the files in the new commit which commitctx
  3162         # the dirstate for all the files in the new commit which commitctx
  3160         # could have done if it updated the dirstate. Now, we can
  3163         # could have done if it updated the dirstate. Now, we can