Patchwork [5,of,5] crecord: use ProgrammingError

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

Comments

Jun Wu - March 27, 2017, 12:14 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1490572823 25200
#      Sun Mar 26 17:00:23 2017 -0700
# Node ID 234ade0bb549d9d1bd20aba41cd8ddc96619d703
# Parent  4b594304a50056b5bde7b193e5496db6f68982dc
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 234ade0bb549
crecord: use ProgrammingError

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -565,5 +565,5 @@  class curseschunkselector(object):
         # affects some ui text
         if operation not in _headermessages:
-            raise RuntimeError('unexpected operation: %s' % operation)
+            raise error.ProgrammingError('unexpected operation: %s' % operation)
         self.operation = operation