safehasattr: pass attribute name as string instead of bytes
This is a step toward replacing `util.safehasattr` usage with plain `hasattr`.
The builtin function behave poorly in Python2 but this was fixed in Python3.
These change are done one by one as they tend to have a small odd to trigger
puzzling breackage.
--- a/mercurial/wireprotov1peer.py Thu Feb 02 17:18:24 2023 +0100
+++ b/mercurial/wireprotov1peer.py Thu Feb 02 17:18:37 2023 +0100
@@ -483,7 +483,7 @@
else:
heads = wireprototypes.encodelist(heads)
- if util.safehasattr(bundle, b'deltaheader'):
+ if util.safehasattr(bundle, 'deltaheader'):
# this a bundle10, do the old style call sequence
ret, output = self._callpush(b"unbundle", bundle, heads=heads)
if ret == b"":