Patchwork D1094: cmdutil: pass metadata from amend() to cleanupnodes

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 1:48 a.m.
Message ID <4be991589fb2235f490f9ec85dd4457e@localhost.localdomain>
Download mbox | patch
Permalink /patch/25064/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2017, 1:48 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG63712407c620: cmdutil: pass metadata from amend() to cleanupnodes (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1094?vs=2784&id=2874

REVISION DETAIL
  https://phab.mercurial-scm.org/D1094

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, dlax, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -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