wrapfunction: use sysstr instead of bytes as argument in "fastannotate"
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 10 Jul 2023 16:12:33 +0200
changeset 50814 8dc2724d0304
parent 50813 335aeb3d670b
child 50815 ba3add904ab4
wrapfunction: use sysstr instead of bytes as argument in "fastannotate" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
hgext/fastannotate/protocol.py
hgext/fastannotate/support.py
--- a/hgext/fastannotate/protocol.py	Fri Feb 03 04:10:22 2023 +0100
+++ b/hgext/fastannotate/protocol.py	Mon Jul 10 16:12:33 2023 +0200
@@ -101,7 +101,7 @@
 
 def serveruisetup(ui):
     _registerwireprotocommand()
-    extensions.wrapfunction(wireprotov1server, b'_capabilities', _capabilities)
+    extensions.wrapfunction(wireprotov1server, '_capabilities', _capabilities)
 
 
 # client-side
--- a/hgext/fastannotate/support.py	Fri Feb 03 04:10:22 2023 +0100
+++ b/hgext/fastannotate/support.py	Mon Jul 10 16:12:33 2023 +0200
@@ -129,8 +129,8 @@
 
 
 def replacehgwebannotate():
-    extensions.wrapfunction(hgweb.webutil, b'annotate', _hgwebannotate)
+    extensions.wrapfunction(hgweb.webutil, 'annotate', _hgwebannotate)
 
 
 def replacefctxannotate():
-    extensions.wrapfunction(hgcontext.basefilectx, b'annotate', _fctxannotate)
+    extensions.wrapfunction(hgcontext.basefilectx, 'annotate', _fctxannotate)