diff hgext3rd/topic/__init__.py @ 6318:3e488afe62f5

topic: use compat.InputError for conflicting CLI flags
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 07 Apr 2022 20:02:45 +0300
parents 466702ac6c28
children 8c664ed9c103
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Fri Oct 07 20:32:14 2022 -0400
+++ b/hgext3rd/topic/__init__.py	Thu Apr 07 20:02:45 2022 +0300
@@ -192,6 +192,7 @@
 
 from . import (
     common,
+    compat,
     constants,
     destination,
     discovery,
@@ -886,13 +887,13 @@
     age = opts.get('age')
 
     if current and topic:
-        raise error.Abort(_(b"cannot use --current when setting a topic"))
+        raise compat.InputError(_(b"cannot use --current when setting a topic"))
     if current and clear:
-        raise error.Abort(_(b"cannot use --current and --clear"))
+        raise compat.InputError(_(b"cannot use --current and --clear"))
     if clear and topic:
-        raise error.Abort(_(b"cannot use --clear when setting a topic"))
+        raise compat.InputError(_(b"cannot use --clear when setting a topic"))
     if age and topic:
-        raise error.Abort(_(b"cannot use --age while setting a topic"))
+        raise compat.InputError(_(b"cannot use --age while setting a topic"))
 
     touchedrevs = set()
     if rev: