[Request] [+ ] D8623: rebase: add environment variable to allow forcing in-memory rebase

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Tue Jun 9 20:53:21 UTC 2020


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

REVISION SUMMARY
  Use it in a test case where we know the rebase should proceed without
  incident in-memory, so we can see tracebacks rather than fallbacks.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/rebase.py
  tests/test-copies-in-changeset.t

CHANGE DETAILS

diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t
--- a/tests/test-copies-in-changeset.t
+++ b/tests/test-copies-in-changeset.t
@@ -356,7 +356,7 @@
   $ hg co -q 0
   $ hg mv a b
   $ hg ci -qm 'rename a to b'
-  $ hg rebase -d 1 --config rebase.experimental.inmemory=yes
+  $ HGNOREALLYONLYINMEMORYREBASE= hg rebase -d 1 --config rebase.experimental.inmemory=yes
   rebasing 2:* "rename a to b" (tip) (glob)
   merging a and b to b
   saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1067,6 +1067,8 @@
             with ui.configoverride(overrides, b'rebase'):
                 return _dorebase(ui, repo, action, opts, inmemory=inmemory)
         except error.InMemoryMergeConflictsError:
+            if 'HGNOREALLYONLYINMEMORYREBASE' in os.environ:
+                raise
             ui.warn(
                 _(
                     b'hit merge conflicts; re-running rebase without in-memory'



To: durin42, martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200609/4c3b13ba/attachment.html>


More information about the Mercurial-patches mailing list