[PATCH 4 of 5] transaction: use ProgrammingError

Jun Wu quark at fb.com
Sun Mar 26 20:14:53 EDT 2017


# HG changeset patch
# User Jun Wu <quark at 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

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:


More information about the Mercurial-devel mailing list