forked from mirrors/jj
63ba2a6346
We ran into a bug in `MergedTree` with our commit backend at Google. The problem there was that `MergedTree` sometimes uses the wrong path when reading files and trees. We didn't catch the bug in our tests (outside of Google) because both our backends let you read files and trees at any path. This commit introduces a stricter backend that we can use in tests to catch this kind of bug. For simplicity, it stores all data in memory. Since tests are short-lived, I think that should be fine. For now, this backend is stricter only in that it doesn't mix objects written to different paths. We can make it strict/lossy in other ways later (e.g. modifying written commit objects). I think having a backend designed for tests can also be useful for later making it possible to control the backend, e.g. to inject errors. We may want to replace almost all uses of the local backend in tests with uses of this new test backend. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |