revlog: demonstrate a bug where transaction can be aborted partially
Differential Revision: https://phab.mercurial-scm.org/D12008
rust: fix build errors on darwin
I'm not all _that_ versed in Rust, but I think the root cause is that
some constants are u16 rather than u32 on Darwin. I checked that the
code still compiles on the latest Ubuntu.
Differential Revision: https://phab.mercurial-scm.org/D11955
rust: Fix outdated comments in OwningDirstateMap
OwningDirstateMap used to own a PyBytes, but was generalized to be
more generic when it was moved from hg-cpython to hg-core.
This fixes some comments that were still referencing PyBytes.
Differential Revision: https://phab.mercurial-scm.org/D12003
merge: consider the file merged when using :merge-{local,other}
Returning `None` from `simplemerge()` means that the caller interprets
it as "no merge was necessary (because two sides matched)". See
6217040b2780 and
issue2680 for some background. However,
`simplemerge()` shouldn't even get called in such scenarios, and
returning `None` means that the file is not considered merged, even
though the contents actually were. See the affected test cases.
Differential Revision: https://phab.mercurial-scm.org/D11999
simplemerge: delete unused exception class `CantReprocessAndShowBase`
The only user was removed in
f18830651811 (simplemerge: burn "minimal"
feature to the ground, 2014-08-05).
Differential Revision: https://phab.mercurial-scm.org/D11998
simplemerge: change _minimize() to minimize a single conflict
`_minimize()` is weird in that it changes `a_lines` and `b_lines` but
leaves `base_lines` unchanged, which means they'll be
inconsistent. That was fine because the caller never used
`base_lines`. With the recent refactorings of this code, we can now
make this function cleaner by having it minimize a single conflict and
not care about `base_lines`.
This also makes the code simpler and makes the code for each
`render_*()` function more similar.
Differential Revision: https://phab.mercurial-scm.org/D11981
simplemerge: make minimize() a free function
IMO, `Merge3Text` should be about merging text without knowing about
conflict markers. "Conflict minimization" is about making conflict
markers smaller, so it should be moved out. This patch does that. I'll
refactor it next.
Differential Revision: https://phab.mercurial-scm.org/D11980
simplemerge: simplify and rename `render_markers()`
`render_markers()` now always renders minimized 2-way markers, so
let's simplify and rename it accordingly.
Differential Revision: https://phab.mercurial-scm.org/D11979
simplemerge: split out function for rendering :merge3 conflict markers
The results in some duplicate, but the code is very straight-forward
and I think it's worth it to have each conflict marker style in a
separate function.
Differential Revision: https://phab.mercurial-scm.org/D11978