.editorconfig
author Georges Racinet <georges.racinet@octobus.net>
Sun, 29 Oct 2023 10:47:54 +0100
changeset 51241 578c049f0408
parent 45392 c25efc468a49
permissions -rw-r--r--
rust-index: using `hg::index::Index` in `hg-cpython::dagops` Hooking `headrevs` to the Rust index is straightforward as long as we go the `PySharedRef` way. Direct attempts of obtaining a reference to the inner `hg::index::Index` fail for lifetime reasons: the reference is bound to the GIL, yet the `as_set` local variable is considered to be static (the borrow checker clearly does not realize or care that this set only stores `Revision` values). In `rank()`, the chosen solution is the simplest as far as `hg-cpython` is concerned, but it has the defect of removing an implementation that would be easily adaptable if the core index did implement `RankedGraph` (returning the same error as long as only `REVLOGV1` is supported), but that would introduce a direct dependency of `hg-core` on the ``vcsgraph` crate.

# See http://EditorConfig.org for the specification

root = true

[*.py]
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
end_of_line = lf

[*.{c,h}]
indent_size = 8
indent_style = tab
trim_trailing_whitespace = true
end_of_line = lf

[*.t]
indent_size = 2
indent_style = space
trim_trailing_whitespace = false
end_of_line = lf