localrepo: reverse contexts in status
This is a slight tweak to how localrepo.status calculates what files have
changed. By forcing a changectx to be first operator and anything not a
changectx to be the second operator, we can later exploit this to allow
refactoring the status operation as a method of a context object.
Furthermore, this change will speed up 'hg diff --reverse' when used with the
working directory because the code will now hit a fast path without needing to
calculate an unneeded second manifest.
$ hg init
$ echo a > a
$ hg add a
$ hg commit -m test
Do we ever miss a sub-second change?:
$ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
> hg co -qC 0
> echo b > a
> hg st
> done
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a
M a