Mercurial > public > mercurial-scm > hg-stable
diff mercurial/repair.py @ 38839:2002c193f2bc
rebase: support "history-editing-backup" config option
If you don't want to store any backup while rebasing, you can
use `history-editing-backup` config option.
[ui]
history-editing-backup = # True or False
Current status of list of commands which supports this config:
1. histedit
2. rebase
Differential Revision: https://phab.mercurial-scm.org/D3887
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Thu, 05 Jul 2018 10:42:48 +0530 |
parents | e7aa113b14f7 |
children | 73cf21b2e8a6 |
line wrap: on
line diff
--- a/mercurial/repair.py Wed Aug 01 16:06:53 2018 +0200 +++ b/mercurial/repair.py Thu Jul 05 10:42:48 2018 +0530 @@ -298,24 +298,24 @@ if roots: strip(self.ui, self.repo, roots, self.backup, self.topic) -def delayedstrip(ui, repo, nodelist, topic=None): +def delayedstrip(ui, repo, nodelist, topic=None, backup=True): """like strip, but works inside transaction and won't strip irreverent revs nodelist must explicitly contain all descendants. Otherwise a warning will be printed that some nodes are not stripped. - Always do a backup. The last non-None "topic" will be used as the backup - topic name. The default backup topic name is "backup". + Will do a backup if `backup` is True. The last non-None "topic" will be + used as the backup topic name. The default backup topic name is "backup". """ tr = repo.currenttransaction() if not tr: nodes = safestriproots(ui, repo, nodelist) - return strip(ui, repo, nodes, True, topic) + return strip(ui, repo, nodes, backup=backup, topic=topic) # transaction postclose callbacks are called in alphabet order. # use '\xff' as prefix so we are likely to be called last. callback = tr.getpostclose('\xffstrip') if callback is None: - callback = stripcallback(ui, repo, True, topic) + callback = stripcallback(ui, repo, backup=backup, topic=topic) tr.addpostclose('\xffstrip', callback) if topic: callback.topic = topic