##// END OF EJS Templates
rebase: add config to move rebase into a single transaction...
Durham Goode -
r33569:d341677d default
parent child Browse files
Show More
@@ -343,7 +343,7 b' class rebaseruntime(object):'
343 343 if dest.closesbranch() and not self.keepbranchesf:
344 344 self.ui.status(_('reopening closed branch head %s\n') % dest)
345 345
346 def _performrebase(self):
346 def _performrebase(self, tr):
347 347 repo, ui, opts = self.repo, self.ui, self.opts
348 348 if self.keepbranchesf:
349 349 # insert _savebranch at the start of extrafns so if
@@ -394,7 +394,7 b' class rebaseruntime(object):'
394 394 self.state,
395 395 self.destancestors,
396 396 self.obsoletenotrebased)
397 self.storestatus()
397 self.storestatus(tr=tr)
398 398 storecollapsemsg(repo, self.collapsemsg)
399 399 if len(repo[None].parents()) == 2:
400 400 repo.ui.debug('resuming interrupted rebase\n')
@@ -641,6 +641,15 b' def rebase(ui, repo, **opts):'
641 641 [commands]
642 642 rebase.requiredest = True
643 643
644 By default, rebase will close the transaction after each commit. For
645 performance purposes, you can configure rebase to use a single transaction
646 across the entire rebase. WARNING: This setting introduces a significant
647 risk of losing the work you've done in a rebase if the rebase aborts
648 unexpectedly::
649
650 [rebase]
651 singletransaction = True
652
644 653 Return Values:
645 654
646 655 Returns 0 on success, 1 if nothing to rebase or there are
@@ -700,7 +709,12 b' def rebase(ui, repo, **opts):'
700 709 if retcode is not None:
701 710 return retcode
702 711
703 rbsrt._performrebase()
712 tr = None
713 if ui.configbool('rebase', 'singletransaction'):
714 tr = repo.transaction('rebase')
715 with util.acceptintervention(tr):
716 rbsrt._performrebase(tr)
717
704 718 rbsrt._finishrebase()
705 719
706 720 def _definesets(ui, repo, destf=None, srcf=None, basef=None, revf=None,
General Comments 0
You need to be logged in to leave comments. Login now