Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 38857:32ece991955c
amend: support "history-editing-backup" config option
Now, amend is in the list of those history editing commands
which support `history-editing-backup` config option.
If you don't want to store any backup then just use this config.
[ui]
hisotry-editing-backup = False
Current status of list of history editing commands which support
this config:
1. histedit
2. rebase
3. amend
Differential Revision: https://phab.mercurial-scm.org/D3968
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Tue, 10 Jul 2018 20:23:55 +0530 |
parents | e7aa113b14f7 |
children | f3f109971359 |
line wrap: on
line diff
--- 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