rust-update: add a config item to disable the Rust update fastpath
Explanations inline.
--- a/mercurial/configitems.toml Tue Oct 01 13:49:11 2024 +0200
+++ b/mercurial/configitems.toml Wed Oct 16 17:21:03 2024 +0200
@@ -1963,6 +1963,17 @@
experimental = true
[[items]]
+section = "rust"
+name = "update-from-null"
+default = true
+experimental = true
+documentation = """Whether to use the Rust fast-path when an update from null
+is detected. This config item is here to help users disable the fastpath in
+case one of their extensions is interfering with the update code. If you are
+one of these people, please reach out.
+"""
+
+[[items]]
section = "server"
name = "bookmarks-pushkey-compat"
default = true
--- a/mercurial/merge.py Tue Oct 01 13:49:11 2024 +0200
+++ b/mercurial/merge.py Wed Oct 16 17:21:03 2024 +0200
@@ -35,7 +35,6 @@
pathutil,
policy,
pycompat,
- requirements,
scmutil,
subrepoutil,
util,
@@ -2024,6 +2023,7 @@
update_from_null_fallback = False
if (
MAYBE_USE_RUST_UPDATE
+ and repo.ui.configbool(b"rust", b"update-from-null")
and rust_update_mod is not None
and p1.rev() == nullrev
and not branchmerge