# HG changeset patch # User Martin von Zweigbergk # Date 1512166435 28800 # Node ID 5cc14407a739ff54739e55907760306c9a9418fe # Parent 900ed9853017c5f56665f6c900f16e8514e77c92 amend: make a copy of "extra" to avoid mutating an input I don't know of any problems this has caused, it just seems less surprising. Differential Revision: https://phab.mercurial-scm.org/D1575 diff -r 900ed9853017 -r 5cc14407a739 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sat Dec 02 06:32:41 2017 +0530 +++ b/mercurial/cmdutil.py Fri Dec 01 14:13:55 2017 -0800 @@ -3137,6 +3137,8 @@ # base o - first parent of the changeset to amend wctx = repo[None] + # Copy to avoid mutating input + extra = extra.copy() # Update extra dict from amended commit (e.g. to preserve graft # source) extra.update(old.extra())