win32: move lookupreg() to windows.py
lookupreg() doesn't use the win32 API directly any more, it uses the Python
standard library module _winreg.
win32: use Python's _winreg again
This is a partial backout of
f1fa8f481c7c.
f1fa8f481c7c switched win32.py to using ctypes with the intention to get rid
of the dependency on the pywin32 package.
But
f1fa8f481c7c replaced the usage of the Python standard module _winreg in
lookup_reg as well, which was uneeded (note that lookup_reg was later renamed
into lookupreg).
Basically, we're switching back to the previous _winreg-based implementation,
which uses _winreg.QueryValueEx(). QueryValueEx returns a unicode code string.
See also:
issue3467
localrepo: clear _filecache earlier to really force reloading (
issue3462)
ce0ad184f489 attempted to force the filecaches in localrepo to reload
everything after a rollback. But simply clearing _filecache isn't enough,
invalidate() needs to be called before/after. localrepo._rollback calls
invalidate() already, so we clear the map right afterwards which ensures
everything will be reread.
cleanup: use the deque type where appropriate
There have been quite a few places where we pop elements off the
front of a list. This can turn O(n) algorithms into something more
like O(n**2). Python has provided a deque type that can do this
efficiently since at least 2.4.
As an example of the difference a deque can make, it improves
perfancestors performance on a Linux repo from 0.50 seconds to 0.36.
i18n-ja: synchronized with
2478594b37c2