diff hgext/fastannotate/context.py @ 50914:e586a7eb380a

diff-option: move attributes handling to sysstr Attributes are `str` and should be handled as such.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 31 Aug 2023 01:19:49 +0200
parents d44e3c45f0e4
children 1a242d4d2ac4
line wrap: on
line diff
--- a/hgext/fastannotate/context.py	Fri Sep 01 12:11:11 2023 +0200
+++ b/hgext/fastannotate/context.py	Thu Aug 31 01:19:49 2023 +0200
@@ -151,7 +151,10 @@
 
 def hashdiffopts(diffopts):
     diffoptstr = stringutil.pprint(
-        sorted((k, getattr(diffopts, k)) for k in mdiff.diffopts.defaults)
+        sorted(
+            (k, getattr(diffopts, pycompat.sysstr(k)))
+            for k in mdiff.diffopts.defaults
+        )
     )
     return hex(hashutil.sha1(diffoptstr).digest())[:6]