Patchwork [4,of,5] transaction: use ProgrammingError

login
register
mail settings
Submitter Jun Wu
Date March 27, 2017, 12:14 a.m.
Message ID <4b594304a50056b5bde7.1490573693@localhost.localdomain>
Download mbox | patch
Permalink /patch/19717/
State Accepted
Headers show

Comments

Jun Wu - March 27, 2017, 12:14 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1490572770 25200
#      Sun Mar 26 16:59:30 2017 -0700
# Node ID 4b594304a50056b5bde7b193e5496db6f68982dc
# Parent  79b332a45f07401b16e0b8cdb861655057773ff7
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 4b594304a500
transaction: use ProgrammingError

Patch

diff --git a/mercurial/transaction.py b/mercurial/transaction.py
--- a/mercurial/transaction.py
+++ b/mercurial/transaction.py
@@ -227,5 +227,5 @@  class transaction(object):
         if self._queue:
             msg = 'cannot use transaction.addbackup inside "group"'
-            raise RuntimeError(msg)
+            raise error.ProgrammingError(msg)
 
         if file in self.map or file in self._backupmap: