diff -r 8defc7d9adae -r 4bc3e55cf386 mercurial/crecord.py --- a/mercurial/crecord.py Sun Mar 26 16:59:30 2017 -0700 +++ b/mercurial/crecord.py Sun Mar 26 17:00:23 2017 -0700 @@ -564,7 +564,7 @@ # 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 def uparrowevent(self):