py3: do not convert rust module/attribute names to bytes
authorYuya Nishihara <yuya@tcha.org>
Sat, 17 Aug 2019 10:25:04 +0900
changeset 42766 e94c8f584ee2
parent 42765 0770e221d24b
child 42767 624d86262e14
py3: do not convert rust module/attribute names to bytes policy.import*() functions expect system strings.
mercurial/match.py
mercurial/setdiscovery.py
mercurial/util.py
--- a/mercurial/match.py	Sat Aug 17 15:43:41 2019 +0900
+++ b/mercurial/match.py	Sat Aug 17 10:25:04 2019 +0900
@@ -25,7 +25,7 @@
     stringutil,
 )
 
-rustmod = policy.importrust('filepatterns')
+rustmod = policy.importrust(r'filepatterns')
 
 allpatternkinds = ('re', 'glob', 'path', 'relglob', 'relpath', 'relre',
                    'rootglob',
--- a/mercurial/setdiscovery.py	Sat Aug 17 15:43:41 2019 +0900
+++ b/mercurial/setdiscovery.py	Sat Aug 17 10:25:04 2019 +0900
@@ -270,8 +270,8 @@
                 sample.update(takefrom[:more])
         return sample
 
-partialdiscovery = policy.importrust('discovery',
-                                     member='PartialDiscovery',
+partialdiscovery = policy.importrust(r'discovery',
+                                     member=r'PartialDiscovery',
                                      default=partialdiscovery)
 
 def findcommonheads(ui, local, remote,
--- a/mercurial/util.py	Sat Aug 17 15:43:41 2019 +0900
+++ b/mercurial/util.py	Sat Aug 17 10:25:04 2019 +0900
@@ -53,7 +53,7 @@
     stringutil,
 )
 
-rustdirs = policy.importrust('dirstate', 'Dirs')
+rustdirs = policy.importrust(r'dirstate', r'Dirs')
 
 base85 = policy.importmod(r'base85')
 osutil = policy.importmod(r'osutil')