--- a/mercurial/cmdutil.py Fri Aug 03 00:10:52 2018 +0530
+++ b/mercurial/cmdutil.py Tue Jul 10 20:23:55 2018 +0530
@@ -2556,8 +2556,10 @@
obsmetadata = None
if opts.get('note'):
obsmetadata = {'note': encoding.fromlocal(opts['note'])}
+ backup = ui.configbool('ui', 'history-editing-backup')
scmutil.cleanupnodes(repo, mapping, 'amend', metadata=obsmetadata,
- fixphase=True, targetphase=commitphase)
+ fixphase=True, targetphase=commitphase,
+ backup=backup)
# Fixing the dirstate because localrepo.commitctx does not update
# it. This is rather convenient because we did not need to update