Mercurial > hg
changeset 45738:5df1655edf42
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 12 Oct 2020 12:52:45 -0700 |
parents | b3e8d8e4a40d |
children | 693da1b928af |
files | mercurial/transaction.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/transaction.py Mon Oct 05 17:18:39 2020 -0400 +++ b/mercurial/transaction.py Mon Oct 12 12:52:45 2020 -0700 @@ -38,10 +38,8 @@ 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)