Mercurial > evolve
diff hgext3rd/topic/compat.py @ 6322:57f9cdbf6a99
topic: use compat.CanceledError for user quit situations
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 10 Oct 2022 20:03:20 +0400 |
parents | 58b856416d2e |
children | f4ffe1e67a9b |
line wrap: on
line diff
--- a/hgext3rd/topic/compat.py Mon Oct 10 20:02:14 2022 +0400 +++ b/hgext3rd/topic/compat.py Mon Oct 10 20:03:20 2022 +0400 @@ -64,6 +64,12 @@ # hg <= 5.6 (527ce85c2e60) StateError = error.Abort +if util.safehasattr(error, 'CanceledError'): + CanceledError = error.CanceledError +else: + # hg <= 5.6 (ac362d5a7893) + CanceledError = error.Abort + if util.safehasattr(cmdutil, 'check_at_most_one_arg'): def check_at_most_one_arg(opts, *args): return cmdutil.check_at_most_one_arg(opts, *args)