Mercurial > evolve
diff hgext3rd/topic/__init__.py @ 6320:0c780d972350
topic: use check_incompatible_arguments() for --list with --clear or --rev
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 07 Apr 2022 20:42:56 +0300 |
parents | 8c664ed9c103 |
children | f4ffe1e67a9b |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Thu Apr 07 20:28:11 2022 +0300 +++ b/hgext3rd/topic/__init__.py Thu Apr 07 20:42:56 2022 +0300 @@ -895,6 +895,8 @@ if age and topic: raise compat.InputError(_(b"cannot use --age while setting a topic")) + compat.check_incompatible_arguments(opts, 'list', ('clear', 'rev')) + touchedrevs = set() if rev: touchedrevs = scmutil.revrange(repo, rev) @@ -920,8 +922,6 @@ if list: ui.pager(b'topics') - if clear or rev: - raise error.Abort(_(b"cannot use --clear or --rev with --list")) if not topic: topic = repo.currenttopic if not topic: