wrapfunction: use sysstr instead of bytes as argument in "journal"
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 03 Feb 2023 04:22:15 +0100
changeset 50783 f642063c8147
parent 50782 014ff9a62501
child 50784 fcb67b8c8107
wrapfunction: use sysstr instead of bytes as argument in "journal" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
hgext/journal.py
--- a/hgext/journal.py	Fri Feb 03 04:21:55 2023 +0100
+++ b/hgext/journal.py	Fri Feb 03 04:22:15 2023 +0100
@@ -66,13 +66,13 @@
 
 # Journal recording, register hooks and storage object
 def extsetup(ui):
-    extensions.wrapfunction(dispatch, b'runcommand', runcommand)
-    extensions.wrapfunction(bookmarks.bmstore, b'_write', recordbookmarks)
+    extensions.wrapfunction(dispatch, 'runcommand', runcommand)
+    extensions.wrapfunction(bookmarks.bmstore, '_write', recordbookmarks)
     extensions.wrapfilecache(
         localrepo.localrepository, b'dirstate', wrapdirstate
     )
-    extensions.wrapfunction(hg, b'postshare', wrappostshare)
-    extensions.wrapfunction(hg, b'copystore', unsharejournal)
+    extensions.wrapfunction(hg, 'postshare', wrappostshare)
+    extensions.wrapfunction(hg, 'copystore', unsharejournal)
 
 
 def reposetup(ui, repo):