mercurial/cmdutil.py
changeset 34794 5781e0931c16
parent 34698 23eb03f46929
child 34852 d45236f3d38e
--- a/mercurial/cmdutil.py	Sun Oct 15 14:34:24 2017 +0530
+++ b/mercurial/cmdutil.py	Sun Oct 15 15:32:03 2017 +0530
@@ -3152,7 +3152,10 @@
         # Reroute the working copy parent to the new changeset
         repo.setparents(newid, nullid)
         mapping = {old.node(): (newid,)}
-        scmutil.cleanupnodes(repo, mapping, 'amend')
+        obsmetadata = None
+        if opts.get('note'):
+            obsmetadata = {'note': opts['note']}
+        scmutil.cleanupnodes(repo, mapping, 'amend', metadata=obsmetadata)
 
         # Fixing the dirstate because localrepo.commitctx does not update
         # it. This is rather convenient because we did not need to update