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
--- 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())