Performance of hg update was significantly worse since the introduction of
the Rust dirstatemap. This regression was noticed by Valentin Gatien-Baron
when working on a large repository, as it goes unnoticed for smaller
repositories like Mercurial itself.
This fix introduces the same getter/setter mechanism at hg-core level as
for set/get_dirs.
While this technique is, as previously discussed, quite suboptimal, it fixes an
important enough problem. Refactoring hg-core to use the typestate
pattern could be a good approach to improving code quality in a future patch.
If we have just set the fields to Some(..) in the previous line can't we do the unwrap here where it is obviously correct?