Mercurial > hg-stable
diff hgext/rebase.py @ 38502:c892a30bafb9
rebase: no need to store backup in case of dryrun
While aborting an unfinished rebase in case of dryrun
there is no need to store backup for those rebased csets.
Differential Revision: https://phab.mercurial-scm.org/D3827
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Fri, 29 Jun 2018 00:47:33 +0530 |
parents | 9c3b48fb7ac5 |
children | 999e5c218daf |
line wrap: on
line diff
--- a/hgext/rebase.py Fri Jun 29 00:22:50 2018 +0530 +++ b/hgext/rebase.py Fri Jun 29 00:47:33 2018 +0530 @@ -325,7 +325,7 @@ skippedset.update(obsoleteextinctsuccessors) _checkobsrebase(self.repo, self.ui, obsoleteset, skippedset) - def _prepareabortorcontinue(self, isabort): + def _prepareabortorcontinue(self, isabort, backup=True): try: self.restorestatus() self.collapsemsg = restorecollapsemsg(self.repo, isabort) @@ -341,8 +341,8 @@ hint = _('use "hg rebase --abort" to clear broken state') raise error.Abort(msg, hint=hint) if isabort: - return abort(self.repo, self.originalwd, self.destmap, - self.state, activebookmark=self.activebookmark) + return abort(self.repo, self.originalwd, self.destmap, self.state, + activebookmark=self.activebookmark, backup=backup) def _preparenewrebase(self, destmap): if not destmap: @@ -850,7 +850,8 @@ ui.status(_('there will be no conflict, you can rebase\n')) return 0 finally: - rbsrt._prepareabortorcontinue(isabort=True) + # no need to store backup in case of dryrun + rbsrt._prepareabortorcontinue(isabort=True, backup=False) def _dorebase(ui, repo, inmemory=False, **opts): rbsrt = rebaseruntime(repo, ui, inmemory, pycompat.byteskwargs(opts)) @@ -1553,7 +1554,7 @@ return False -def abort(repo, originalwd, destmap, state, activebookmark=None): +def abort(repo, originalwd, destmap, state, activebookmark=None, backup=True): '''Restore the repository to its original state. Additional args: activebookmark: the name of the bookmark that should be active after the @@ -1598,7 +1599,7 @@ # Strip from the first rebased revision if rebased: - repair.strip(repo.ui, repo, strippoints) + repair.strip(repo.ui, repo, strippoints, backup=backup) if activebookmark and activebookmark in repo._bookmarks: bookmarks.activate(repo, activebookmark)