This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: split dirstatemap in its own file
ClosedPublic

Authored by marmoute on Jul 2 2021, 11:18 AM.

Details

Summary

The dirstate file is large enough and the dirstatemap is quite insulated logic
already.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

marmoute created this revision.Jul 2 2021, 11:18 AM

While we’re at it, instead of having a large class definition instead of if rustmod is not None: what do you think of having a separate rustdirstatemap.py file and conditionally importing one or the other?

While we’re at it, instead of having a large class definition instead of if rustmod is not None: what do you think of having a separate rustdirstatemap.py file and conditionally importing one or the other?

This looks like a good idea.

While we’re at it, instead of having a large class definition instead of if rustmod is not None: what do you think of having a separate rustdirstatemap.py file and conditionally importing one or the other?

This looks like a good idea.

But actually not that simple because we have various extension and code that overwrite method of "the dirstatemap class" to reach their goal. So we would have to teach them about the duplication, etc.

So looks like a good idea, but too much of a detour for this series.

SimonSapin accepted this revision.Jul 2 2021, 6:25 PM

Alright

SimonSapin accepted this revision.Jul 5 2021, 3:47 AM
Alphare accepted this revision as: Alphare.Jul 5 2021, 5:13 AM
Alphare added a subscriber: Alphare.

This whole series looks good, I'll keep it around for one or two days to give others the chance to say something.

pulkit accepted this revision.Jul 6 2021, 12:18 PM
This revision is now accepted and ready to land.Jul 6 2021, 12:18 PM
This revision was automatically updated to reflect the committed changes.