comparison hgext/journal.py @ 50820:f642063c8147

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`.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 03 Feb 2023 04:22:15 +0100
parents d5116e4dc744
children e9a2e1c77f28
comparison
equal deleted inserted replaced
50819:014ff9a62501 50820:f642063c8147
64 bookmarktype: hg.sharedbookmarks, 64 bookmarktype: hg.sharedbookmarks,
65 } 65 }
66 66
67 # Journal recording, register hooks and storage object 67 # Journal recording, register hooks and storage object
68 def extsetup(ui): 68 def extsetup(ui):
69 extensions.wrapfunction(dispatch, b'runcommand', runcommand) 69 extensions.wrapfunction(dispatch, 'runcommand', runcommand)
70 extensions.wrapfunction(bookmarks.bmstore, b'_write', recordbookmarks) 70 extensions.wrapfunction(bookmarks.bmstore, '_write', recordbookmarks)
71 extensions.wrapfilecache( 71 extensions.wrapfilecache(
72 localrepo.localrepository, b'dirstate', wrapdirstate 72 localrepo.localrepository, b'dirstate', wrapdirstate
73 ) 73 )
74 extensions.wrapfunction(hg, b'postshare', wrappostshare) 74 extensions.wrapfunction(hg, 'postshare', wrappostshare)
75 extensions.wrapfunction(hg, b'copystore', unsharejournal) 75 extensions.wrapfunction(hg, 'copystore', unsharejournal)
76 76
77 77
78 def reposetup(ui, repo): 78 def reposetup(ui, repo):
79 if repo.local(): 79 if repo.local():
80 repo.journal = journalstorage(repo) 80 repo.journal = journalstorage(repo)