D1575: amend: make a copy of "extra" to avoid mutating an input
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Dec 1 22:12:15 EST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5cc14407a739: amend: make a copy of "extra" to avoid mutating an input (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1575?vs=4065&id=4079
REVISION DETAIL
https://phab.mercurial-scm.org/D1575
AFFECTED FILES
mercurial/cmdutil.py
CHANGE DETAILS
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -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())
To: martinvonz, #hg-reviewers, yuja
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list