martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  rebase.singletransaction make rebase noticeably faster (~20% in a test
  I just ran). It is not enabled by default because it risks losing
  information if it aborts (see `hg help rebase`). When running rebase
  with the experimentla in-memory option on, rebase is first attempted
  in memory, and if any conflicts occur, it restarts, this time writing
  to disk. Thus, it should be safe to turn on single-transaction mode
  for the in-memory phase.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3076

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -788,7 +788,9 @@
         try:
             # in-memory merge doesn't support conflicts, so if we hit any, 
abort
             # and re-run as an on-disk merge.
-            return _origrebase(ui, repo, inmemory=inmemory, **opts)
+            overrides = {('rebase', 'singletransaction'): True}
+            with ui.configoverride(overrides, 'rebase'):
+                return _origrebase(ui, repo, inmemory=inmemory, **opts)
         except error.InMemoryMergeConflictsError:
             ui.warn(_('hit merge conflicts; re-running rebase without 
in-memory'
                       ' merge\n'))



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to