upgrade: simplify 'determineactions'
Since we only takes 'deficiencies', we can simplify the function and clarify its
arguments.
upgrade: filter optimizations outside of 'determineactions'
This sounds like higher level logic to process arguments.
Moving it out of 'determineactions' will allow passing only deficiencies to the
function. Then, in a future changeset, we will remove dispatch on "improvement
type" within the function. See next changeset for details.
upgrade: directly iterate over optimisations
Since we already have the list of optimisations independent from the
deficiencies, we can use it directly.
(we make a dual assignement in this changeset to simplify the next one)
upgrade: simplify optimisations validation
Since we fetch optimizations distinctly from the deficiencies, we can simplify
some code.
upgrade: split finding deficiencies from finding optimisations
Our ultimate goal is to make it easier to get a diagnostic of the repository
format. A first important and step for that is to separate part related to
repository format from the optimisation. We start by having two different
functions returning the two categories of possible "improvement".
upgrade: import 'localrepo' globally
The in-function imports mention a cycle that seems to no longer be relevant. As
a result, we just import it globally.
largefiles: set the extension as enabled locally after a share requiring it
This has been done for clone since
e1dbe0b215ae, so it makes sense here for the
same reasons.
windows: add context manager support to mixedfilemodewrapper
I stumbled into this in the next patch. The difference between getting a
context manager capable object or not from vfs classes was as subtle as adding a
'+' to the file mode.