mercurial/merge.py
branchstable
changeset 52186 e6a44bc91bc2
parent 52057 43e15277498e
child 52644 e627cc25b6f3
--- a/mercurial/merge.py	Tue Nov 05 15:18:32 2024 +0100
+++ b/mercurial/merge.py	Tue Nov 05 15:21:09 2024 +0100
@@ -2054,9 +2054,14 @@
             repo.hook(b'preupdate', throw=True, parent1=xp1, parent2=xp2)
             # note that we're in the middle of an update
             repo.vfs.write(b'updatestate', p2.hex())
+            num_cpus = (
+                repo.ui.configint(b"worker", b"numcpus", None)
+                if repo.ui.configbool(b"worker", b"enabled")
+                else 1
+            )
             try:
                 updated_count = rust_update_mod.update_from_null(
-                    repo.root, p2.rev()
+                    repo.root, p2.rev(), num_cpus
                 )
             except rust_update_mod.FallbackError:
                 update_from_null_fallback = True