comparison hgext/fsmonitor/__init__.py @ 50778:ba3add904ab4

wrapfunction: use sysstr instead of bytes as argument in "fsmonitor" 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:19:06 +0100
parents 2905b78fc52e
children d718eddf01d9
comparison
equal deleted inserted replaced
50777:8dc2724d0304 50778:ba3add904ab4
753 extensions.wrapfilecache( 753 extensions.wrapfilecache(
754 localrepo.localrepository, b'dirstate', wrapdirstate 754 localrepo.localrepository, b'dirstate', wrapdirstate
755 ) 755 )
756 if pycompat.isdarwin: 756 if pycompat.isdarwin:
757 # An assist for avoiding the dangling-symlink fsevents bug 757 # An assist for avoiding the dangling-symlink fsevents bug
758 extensions.wrapfunction(os, b'symlink', wrapsymlink) 758 extensions.wrapfunction(os, 'symlink', wrapsymlink)
759 759
760 extensions.wrapfunction(merge, b'_update', wrapupdate) 760 extensions.wrapfunction(merge, '_update', wrapupdate)
761 761
762 762
763 def wrapsymlink(orig, source, link_name): 763 def wrapsymlink(orig, source, link_name):
764 """if we create a dangling symlink, also touch the parent dir 764 """if we create a dangling symlink, also touch the parent dir
765 to encourage fsevents notifications to work more correctly""" 765 to encourage fsevents notifications to work more correctly"""