# HG changeset patch # User Anton Shestakov # Date 1702747336 10800 # Node ID 9e442e116621739cac08153ca91065463ce9ba73 # Parent e0596b012b69effb6e39a3236fef2cfb239f59c3 topic: use InputError instead of simple Abort for topic namespaces checks diff -r e0596b012b69 -r 9e442e116621 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Sat Dec 16 13:23:38 2023 -0300 +++ b/hgext3rd/topic/__init__.py Sat Dec 16 14:22:16 2023 -0300 @@ -1833,7 +1833,7 @@ """set or show the current topic namespace""" if opts.get('clear'): if tns: - raise error.Abort(_(b"cannot use --clear when setting a topic namespace")) + raise compat.InputError(_(b"cannot use --clear when setting a topic namespace")) tns = b'none' elif not tns: ui.write(b'%s\n' % repo.currenttns) @@ -1841,9 +1841,9 @@ if tns: tns = tns.strip() if not tns: - raise error.Abort(_(b"topic namespace cannot consist entirely of whitespace")) + raise compat.InputError(_(b"topic namespace cannot consist entirely of whitespace")) if b'/' in tns: - raise error.Abort(_(b"topic namespace cannot contain '/' character")) + raise compat.InputError(_(b"topic namespace cannot contain '/' character")) scmutil.checknewlabel(repo, tns, b'topic namespace') helptxt = _(b"topic namespace names can only consist of alphanumeric, " diff -r e0596b012b69 -r 9e442e116621 tests/test-namespaces.t --- a/tests/test-namespaces.t Sat Dec 16 13:23:38 2023 -0300 +++ b/tests/test-namespaces.t Sat Dec 16 14:22:16 2023 -0300 @@ -64,7 +64,7 @@ $ hg debugtopicnamespace --clear nonsense abort: cannot use --clear when setting a topic namespace - [255] + [10] $ hg branch stable marked working directory as branch stable