comparison mercurial/urllibcompat.py @ 36835:5bc7ff103081

py3: use r'' instead of sysstr('') to get around code transformer Fewer function calls should be better.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 10 Mar 2018 15:57:16 +0900
parents 3c15b84ab66c
children 5774fc623a18
comparison
equal deleted inserted replaced
36834:1527f40de3b3 36835:5bc7ff103081
16 16
17 def _registeraliases(self, origin, items): 17 def _registeraliases(self, origin, items):
18 """Add items that will be populated at the first access""" 18 """Add items that will be populated at the first access"""
19 items = map(_sysstr, items) 19 items = map(_sysstr, items)
20 self._aliases.update( 20 self._aliases.update(
21 (item.replace(_sysstr('_'), _sysstr('')).lower(), (origin, item)) 21 (item.replace(r'_', r'').lower(), (origin, item))
22 for item in items) 22 for item in items)
23 23
24 def _registeralias(self, origin, attr, name): 24 def _registeralias(self, origin, attr, name):
25 """Alias ``origin``.``attr`` as ``name``""" 25 """Alias ``origin``.``attr`` as ``name``"""
26 self._aliases[_sysstr(name)] = (origin, _sysstr(attr)) 26 self._aliases[_sysstr(name)] = (origin, _sysstr(attr))