diff hgext/histedit.py @ 38733:c2586a6e5884

histedit: add history-editing-backup config option Instead of passing --no-backup option every time you don't want to store backup, now you can set config option: [ui] history-editing-backup = False This option aims to operate on every history editing command. Differential Revision: https://phab.mercurial-scm.org/D3901
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Tue, 10 Jul 2018 17:01:06 +0530
parents 88e6630dc8d0
children faea9b1980d9
line wrap: on
line diff
--- a/hgext/histedit.py	Wed Jul 18 09:49:34 2018 -0700
+++ b/hgext/histedit.py	Tue Jul 10 17:01:06 2018 +0530
@@ -1111,7 +1111,9 @@
     fm.startitem()
     goal = _getgoal(opts)
     revs = opts.get('rev', [])
-    nobackup = opts.get('no_backup')
+    # experimental config: ui.history-editing-backup
+    nobackup = (opts.get('no_backup') or
+                not ui.configbool('ui', 'history-editing-backup'))
     rules = opts.get('commands', '')
     state.keep = opts.get('keep', False)