This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: move rust fast-path calling code to its own method

Authored by Alphare on Jan 14 2020, 12:32 PM.



This logic is about to get bigger, this will make it easier to read and not
pollute the main Python logic.

Diff Detail

rHG Mercurial
No Linters Available
No Unit Test Coverage

Event Timeline

Alphare created this revision.Jan 14 2020, 12:32 PM

Note to reviewers: this stack is part of the larger series of getting a full Rust dirstate.status which is most of the performance hit in bare hg status. More patches are coming, but I figured I would send the patches as I go to help with review timing.

pulkit accepted this revision.Jan 14 2020, 4:10 PM
This revision is now accepted and ready to land.Jan 14 2020, 4:10 PM

Absorbing the following diff to make test-check-format.t happy:

diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -1089,9 +1089,7 @@ class dirstate(object):
         # how to read the config file.
         numcpus = self._ui.configint(b"worker", b"numcpus")
         if numcpus is not None:
-            encoding.environ.setdefault(
-                b'RAYON_NUM_THREADS', b'%d' % numcpus
-            )
+            encoding.environ.setdefault(b'RAYON_NUM_THREADS', b'%d' % numcpus)
         workers_enabled = self._ui.configbool(b"worker", b"enabled", True)
         if not workers_enabled:

Absorbing the following diff to make test-check-format.t happy:

Sorry about that.

Alphare updated this revision to Diff 19314.Jan 15 2020, 4:55 PM