comparison mercurial/exthelper.py @ 50798:d9e22b39041a

wrapfunction: use sysstr instead of bytes as argument in "exthelper" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 10 Jul 2023 19:33:14 +0200
parents 642e31cb55f0
children
comparison
equal deleted inserted replaced
50797:4c6151b69085 50798:d9e22b39041a
323 example:: 323 example::
324 324
325 # Required, otherwise the function will not be wrapped 325 # Required, otherwise the function will not be wrapped
326 uisetup = eh.finaluisetup 326 uisetup = eh.finaluisetup
327 327
328 @eh.wrapfunction(discovery, b'checkheads') 328 @eh.wrapfunction(discovery, 'checkheads')
329 def wrapcheckheads(orig, *args, **kwargs): 329 def wrapcheckheads(orig, *args, **kwargs):
330 ui.note(b'His head smashed in and his heart cut out') 330 ui.note(b'His head smashed in and his heart cut out')
331 return orig(*args, **kwargs) 331 return orig(*args, **kwargs)
332 """ 332 """
333 333