Mercurial > public > mercurial-scm > hg
comparison hgext/fastannotate/context.py @ 50914:1a242d4d2ac4
fastannotate: use sysstr to deal with some attributes
We are now Python3 only and attribute are always unicode string. So no needs to
managed them using bytes.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 31 Aug 2023 01:21:04 +0200 |
parents | e586a7eb380a |
children | d97227f42558 |
comparison
equal
deleted
inserted
replaced
50913:98b8836d0e82 | 50914:1a242d4d2ac4 |
---|---|
168 followrename: follow renames, like "hg annotate -f" | 168 followrename: follow renames, like "hg annotate -f" |
169 followmerge: follow p2 of a merge changeset, otherwise p2 is ignored | 169 followmerge: follow p2 of a merge changeset, otherwise p2 is ignored |
170 """ | 170 """ |
171 | 171 |
172 defaults = { | 172 defaults = { |
173 b'diffopts': None, | 173 'diffopts': None, |
174 b'followrename': True, | 174 'followrename': True, |
175 b'followmerge': True, | 175 'followmerge': True, |
176 } | 176 } |
177 | 177 |
178 def __init__(self, **opts): | 178 def __init__(self, **opts): |
179 opts = pycompat.byteskwargs(opts) | |
180 for k, v in self.defaults.items(): | 179 for k, v in self.defaults.items(): |
181 setattr(self, k, opts.get(k, v)) | 180 setattr(self, k, opts.get(k, v)) |
182 | 181 |
183 @util.propertycache | 182 @util.propertycache |
184 def shortstr(self): | 183 def shortstr(self): |