# HG changeset patch # User Jun Wu # Date 2017-03-26 23:53:28 # Node ID 7095e783958df1a083dec417fd82fbeec52cf190 # Parent f80d9ddc40f3e06b8783c2b18c59b0876376a7a0 repair: use ProgrammingError diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -163,8 +163,7 @@ def strip(ui, repo, nodelist, backup=Tru curtr = repo.currenttransaction() if curtr is not None: del curtr # avoid carrying reference to transaction for nothing - msg = _('programming error: cannot strip from inside a transaction') - raise error.Abort(msg, hint=_('contact your extension maintainer')) + raise error.ProgrammingError('cannot strip from inside a transaction') try: with repo.transaction("strip") as tr: diff --git a/tests/test-devel-warnings.t b/tests/test-devel-warnings.t --- a/tests/test-devel-warnings.t +++ b/tests/test-devel-warnings.t @@ -106,11 +106,10 @@ $ echo a > a $ hg add a $ hg commit -m a - $ hg stripintr + $ hg stripintr 2>&1 | egrep -v '^(\*\*| )' saved backup bundle to $TESTTMP/lock-checker/.hg/strip-backup/*-backup.hg (glob) - abort: programming error: cannot strip from inside a transaction - (contact your extension maintainer) - [255] + Traceback (most recent call last): + mercurial.error.ProgrammingError: cannot strip from inside a transaction $ hg log -r "oldstyle()" -T '{rev}\n' devel-warn: revset "oldstyle" uses list instead of smartset