view .editorconfig @ 47799:3fffb48539ee stable

rust-nodemap: falling back to C impl as mitigation This is a mitigation for https://bz.mercurial-scm.org/show_bug.cgi?id=6554 We see sometimes almost all data except the most recent revisions removed from the persistent nodemap, but we don't know how to reproduce yet. This has sadly repercussions beyond just needing to reconstruct the persistent nodemap: for instance, this automatically filters out all bookmarks pointing to revisions that the nodemap cannot resolve. If such filtering happens in a transaction, the update of the bookmarks file that happens at the end of transaction loses all bookmarks that have been affected. There may be similar consequences for other data. So this is a data loss, something that we have to prevent as soon as possible. As a mitigation measure, we will now fallback to the C implementation in case nodemap lookups failed. This will add some latency, e.g., in discovery, yet less than disabling the persistent nodemap entirely. We considered implementing the fallback directly on the Python side, but `revlog.get_rev()` is not systematically used, there are also several direct calls to the index method (`self.index.rev()` for a `revlog` instance). It is therefore more direct to implement the mitigation in the rust-cpython wrapper. Differential Revision: https://phab.mercurial-scm.org/D11238
author Georges Racinet <georges.racinet@octobus.net>
date Sun, 01 Aug 2021 14:39:38 +0200
parents c25efc468a49
children
line wrap: on
line source

# 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