Mercurial > evolve
changeset 6534:43a1bacf6a14
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().
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 17 Jul 2023 16:17:39 -0300 |
parents | 3d16c9a8cf3a |
children | d324fa553620 |
files | hgext3rd/topic/__init__.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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