# HG changeset patch # User Martin von Zweigbergk # Date 2020-10-12 19:52:45 # Node ID 5df1655edf420d3b8e3991361a52b2859f27b0d1 # Parent b3e8d8e4a40d45d5bc13a8066bcc094945a22e89 transaction: use ProgrammingError for when an committed transaction is used It seems to me that ProgrammingError is the right type of error here. Differential Revision: https://phab.mercurial-scm.org/D9215 diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -38,10 +38,8 @@ GEN_GROUP_POST_FINALIZE = b'postfinalize def active(func): def _active(self, *args, **kwds): if self._count == 0: - raise error.Abort( - _( - b'cannot use transaction when it is already committed/aborted' - ) + raise error.ProgrammingError( + b'cannot use transaction when it is already committed/aborted' ) return func(self, *args, **kwds)