mercurial/encoding.py
changeset 43469 5f2a8dabb0d8
parent 43089 c59eb1560c44
child 43496 2ade00f3b03b
equal deleted inserted replaced
43468:8b0fa4de0064 43469:5f2a8dabb0d8
   239 if pycompat.ispy3:
   239 if pycompat.ispy3:
   240     strtolocal = unitolocal
   240     strtolocal = unitolocal
   241     strfromlocal = unifromlocal
   241     strfromlocal = unifromlocal
   242     strmethod = unimethod
   242     strmethod = unimethod
   243 else:
   243 else:
   244     strtolocal = pycompat.identity
   244 
   245     strfromlocal = pycompat.identity
   245     def strtolocal(s):
       
   246         # type: (str) -> bytes
       
   247         return s
       
   248 
       
   249     def strfromlocal(s):
       
   250         # type: (bytes) -> str
       
   251         return s
       
   252 
   246     strmethod = pycompat.identity
   253     strmethod = pycompat.identity
   247 
   254 
   248 if not _nativeenviron:
   255 if not _nativeenviron:
   249     # now encoding and helper functions are available, recreate the environ
   256     # now encoding and helper functions are available, recreate the environ
   250     # dict to be exported to other modules
   257     # dict to be exported to other modules