diff -r 2bde971474d2 -r f3a1089654e3 mercurial/pycompat.py --- 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: