Commit Graph

5 Commits

Author SHA1 Message Date
Phil Cohen
361fcc697a rebase: fix experimental.inmemorydisallowedpaths
Summary: This was just plain broken before. I added a test.

Reviewed By: DurhamG

Differential Revision: D6882388

fbshipit-source-id: 5450b50fa81d22ce0b6e9e4ed5aab1abc6755edc
2018-04-13 21:51:03 -07:00
Jun Wu
96a9afa2a5 drawdag: inline drawdag
Summary:
Since we have `debugbuilddag` as a builtin command, and `drawdag` is
pretty useful for writing clean test cases. Let's inline it. This would
simplify many tests since `drawdag=..." is no longer needed.

Reviewed By: DurhamG

Differential Revision: D6827925

fbshipit-source-id: b749f57fd5c55b2cb000dd2da2c2f9bc2386a519
2018-04-13 21:50:59 -07:00
Phil Cohen
87bb8c5500 rebase: fix a bug where rebases would wrongly be restarted
Summary:
If `rebase.experimental.inmemory` was enabled, but you ended up merging on-disk (e.g. you rebased the working copy parent), and you got merge conflicts, and didn't immediately solve them, hg would discard any work you did and restart the rebase unnecessarily.

The bug here is basically that `rbsrt.inmemory` field can be set to False later, because we make further calculations once we define the `rebaseset`. In that case `InterventionRequired` will get raised if the user didn't solve conflicts, but we'll catch it, thinking something went wrong "in-memory", and abort/rerun the rebase. I was too hasty in adding the "catch all exceptions and retry" block.

I solved this two ways -- first, move the rbsrt definition here and explicitly check the state in the Exception catch. Second, add an explicit catch for InterventionRequired and explain why with a comment.

Further refactoring of the rebase code will help here, I think, so we can consolidate all of this logic.

Reviewed By: DurhamG

Differential Revision: D6817683

fbshipit-source-id: eb8baba86ec0deb59a1e0b1cf9ffb02f056ecd92
2018-04-13 21:50:58 -07:00
Phil Cohen
27591b2ae0 rebase: replace --inmemory flag with rebase.experimental.inmemory config
Differential Revision: https://phab.mercurial-scm.org/D1666
2017-12-11 22:16:13 -08:00
Phil Cohen
10f9b7c52d tests: add a simple test for in-memory rebase
This is just a very simple start, but verifies some of the basic cases of an
in-memory rebase.

Differential Revision: https://phab.mercurial-scm.org/D1652
2017-12-10 22:39:46 -08:00