Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 27148:39163708825c
commit: preserve extra when amending with commit --amend
The new extra propagation needs to be accounted for in cmdutil.amend,
when checking for a no-changes fast-path.
author | Mike Edgar <adgar@google.com> |
---|---|
date | Sat, 28 Nov 2015 04:11:57 -0500 |
parents | a93d53f79e6e |
children | 8d3c5797a175 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Nov 28 04:11:38 2015 -0500 +++ b/mercurial/cmdutil.py Sat Nov 28 04:11:57 2015 -0500 @@ -2619,6 +2619,11 @@ message = old.description() pureextra = extra.copy() + if 'amend_source' in pureextra: + del pureextra['amend_source'] + pureoldextra = old.extra() + if 'amend_source' in pureoldextra: + del pureoldextra['amend_source'] extra['amend_source'] = old.hex() new = context.memctx(repo, @@ -2636,7 +2641,7 @@ and newdesc == old.description() and user == old.user() and date == old.date() - and pureextra == old.extra()): + and pureextra == pureoldextra): # nothing changed. continuing here would create a new node # anyway because of the amend_source noise. #