pycompat: when setting attrs, ensure we use sysstr
The custom module importer was making these bytes, so when we poked
values into self.__dict__ we had bytes instead of unicode on py3 and
it didn't work.
--- a/mercurial/pycompat.py Sat Oct 08 05:26:18 2016 -0400
+++ b/mercurial/pycompat.py Sat Oct 08 08:35:43 2016 -0400
@@ -74,8 +74,10 @@
def _registeraliases(self, origin, items):
"""Add items that will be populated at the first access"""
- self._aliases.update((item.replace('_', '').lower(), (origin, item))
- for item in items)
+ items = map(sysstr, items)
+ self._aliases.update(
+ (item.replace(sysstr('_'), sysstr('')).lower(), (origin, item))
+ for item in items)
def __getattr__(self, name):
try: