comparison mercurial/cmdutil.py @ 38817: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
comparison
equal deleted inserted replaced
38816:2b728789edfd 38817:32ece991955c
2554 repo.setparents(newid, nullid) 2554 repo.setparents(newid, nullid)
2555 mapping = {old.node(): (newid,)} 2555 mapping = {old.node(): (newid,)}
2556 obsmetadata = None 2556 obsmetadata = None
2557 if opts.get('note'): 2557 if opts.get('note'):
2558 obsmetadata = {'note': encoding.fromlocal(opts['note'])} 2558 obsmetadata = {'note': encoding.fromlocal(opts['note'])}
2559 backup = ui.configbool('ui', 'history-editing-backup')
2559 scmutil.cleanupnodes(repo, mapping, 'amend', metadata=obsmetadata, 2560 scmutil.cleanupnodes(repo, mapping, 'amend', metadata=obsmetadata,
2560 fixphase=True, targetphase=commitphase) 2561 fixphase=True, targetphase=commitphase,
2562 backup=backup)
2561 2563
2562 # Fixing the dirstate because localrepo.commitctx does not update 2564 # Fixing the dirstate because localrepo.commitctx does not update
2563 # it. This is rather convenient because we did not need to update 2565 # it. This is rather convenient because we did not need to update
2564 # the dirstate for all the files in the new commit which commitctx 2566 # the dirstate for all the files in the new commit which commitctx
2565 # could have done if it updated the dirstate. Now, we can 2567 # could have done if it updated the dirstate. Now, we can