wrapfunction: use sysstr instead of bytes as argument in the "git" extension
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 10 Jul 2023 16:47:25 +0200
changeset 50779 39eb3aab3e63
parent 50778 ba3add904ab4
child 50780 534c0dadd210
wrapfunction: use sysstr instead of bytes as argument in the "git" extension This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
hgext/git/__init__.py
hgext/git/dirstate.py
--- a/hgext/git/__init__.py	Fri Feb 03 04:19:06 2023 +0100
+++ b/hgext/git/__init__.py	Mon Jul 10 16:47:25 2023 +0200
@@ -342,8 +342,8 @@
 
 
 def extsetup(ui):
-    extensions.wrapfunction(localrepo, b'makestore', _makestore)
-    extensions.wrapfunction(localrepo, b'makefilestorage', _makefilestorage)
+    extensions.wrapfunction(localrepo, 'makestore', _makestore)
+    extensions.wrapfunction(localrepo, 'makefilestorage', _makefilestorage)
     # Inject --git flag for `hg init`
     entry = extensions.wrapcommand(commands.table, b'init', init)
     entry[1].extend(
--- a/hgext/git/dirstate.py	Fri Feb 03 04:19:06 2023 +0100
+++ b/hgext/git/dirstate.py	Mon Jul 10 16:47:25 2023 +0200
@@ -47,7 +47,7 @@
     return result, warnings
 
 
-extensions.wrapfunction(matchmod, b'readpatternfile', readpatternfile)
+extensions.wrapfunction(matchmod, 'readpatternfile', readpatternfile)
 
 
 _STATUS_MAP = {}