merge: make calculateupdates() return file->action dict
This simplifies largefiles' overridecalculateupdates(), which no
longer has to do the conversion it started doing in
38e55e55ae4d
(largefiles: rewrite merge code using dictionary with entry per file,
2014-12-09).
To keep this patch small, we'll leave the name 'actionbyfile' in
overrides.py. It will be renamed in the next patch.
merge: let _forgetremoved() work on the file->action dict
By moving the conversion from the file->action dict after
_forgetremoved(), we make that method shorter by removing the need for
the confusing 'xactions' variable.
merge: let _resolvetrivial() work on the file->action dict
By moving the conversion from the file->action dict after
_resolvetrivial(), we greatly simplify and clarify that method.
merge: let bid merge work on the file->action dict
By moving the conversion from the file->action dict after the bid
merge code, bid merge can be simplified a little.
A few tests are affected by this change. Where we used to iterate over
the actions first in order of the action type ('g', 'r', etc.) [1], we
now iterate in order of filename. This difference affects the order of
debug log statements.
[1] And then in the non-deterministic order of files in the manifest
dictionary (the order returned from manifest.diff()).
merge: write manifestmerge() using dictionary with entry per file
In the same vein as
38e55e55ae4d (largefiles: rewrite merge code using
dictionary with entry per file, 2014-12-09), rewrite manifestmerge()
itself as dictionary with the filename as key. This will let us
simplify some of the other code in merge.py and eventually drop the
conversion in the largefiles code.
No difference in speed could be detected (well within the noise level
when run in Mozilla repo).
repoview: backout
ced3ecfc2e57
Monkey patching repoview does not really work and making it really work will
be really hard. So we better have it broken without complexity than broken with
extra complexity.