Mercurial > evolve
diff hgext3rd/topic/__init__.py @ 6610:ae7c75c43f92 stable
topic: properly decode topic and topic namespace after reading from disk
Looks like we forgot that the bytes read from disk should be converted to the
local encoding. The way it's done in this patch is how branch is handled in
core.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 11 Dec 2023 16:15:10 -0300 |
parents | 536d950753e6 |
children | 1dc008b6ad21 |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Mon Oct 23 15:27:57 2023 -0300 +++ b/hgext3rd/topic/__init__.py Mon Dec 11 16:15:10 2023 -0300 @@ -693,7 +693,8 @@ @property def currenttns(self): - return self.vfs.tryread(b'topic-namespace') or b'none' + tns = self.vfs.tryread(b'topic-namespace') or b'none' + return encoding.tolocal(tns) @util.propertycache def _topiccache(self): @@ -712,7 +713,8 @@ @property def currenttopic(self): - return self.vfs.tryread(b'topic') + topic = self.vfs.tryread(b'topic') + return encoding.tolocal(topic) # overwritten at the instance level by topicmap.py _autobranchmaptopic = True