# HG changeset patch # User Anton Shestakov # Date 1689621459 10800 # Node ID 43a1bacf6a146848cf8167f40431843ac1d58942 # Parent 3d16c9a8cf3aa5b01f8478422a9ad0e770350cba topic: write topic namespace to disk if it's not "none" And we need to make sure we don't provide None value to _changecurrenttns(). diff -r 3d16c9a8cf3a -r 43a1bacf6a14 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Mon Jul 17 14:34:59 2023 -0300 +++ b/hgext3rd/topic/__init__.py Mon Jul 17 16:17:39 2023 -0300 @@ -1705,7 +1705,7 @@ _changecurrenttopic(repo, topic) def _changecurrenttns(repo, tns): - if tns: + if tns != b'none': with repo.wlock(): repo.vfs.write(b'topic-namespace', tns) else: @@ -1720,7 +1720,7 @@ if opts.get('clear'): if tns: raise error.Abort(_(b"cannot use --clear when setting a topic namespace")) - tns = None + tns = b'none' elif not tns: ui.write(b'%s\n' % repo.currenttns) return