changeset 50780:534c0dadd210

wrapfunction: use sysstr instead of bytes as argument in "highlight" 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 Fri, 03 Feb 2023 04:20:58 +0100
parents 39eb3aab3e63
children 0fbc0c978053
files hgext/highlight/__init__.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/highlight/__init__.py	Mon Jul 10 16:47:25 2023 +0200
+++ b/hgext/highlight/__init__.py	Fri Feb 03 04:20:58 2023 +0100
@@ -101,8 +101,8 @@
 def extsetup(ui):
     # monkeypatch in the new version
     extensions.wrapfunction(
-        webcommands, b'_filerevision', filerevision_highlight
+        webcommands, '_filerevision', filerevision_highlight
     )
-    extensions.wrapfunction(webcommands, b'annotate', annotate_highlight)
+    extensions.wrapfunction(webcommands, 'annotate', annotate_highlight)
     webcommands.highlightcss = generate_css
     webcommands.__all__.append(b'highlightcss')