wireprotov2: raise ProgrammingError on unknown action
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 10 Oct 2018 23:19:42 -0700
changeset 40139 17223d8e7d75
parent 40138 b5bf3dd6ec5b
child 40140 46f9b1d2daf0
wireprotov2: raise ProgrammingError on unknown action Suggested by @durin42 in review of D4923. Differential Revision: https://phab.mercurial-scm.org/D4935
mercurial/wireprotov2peer.py
--- a/mercurial/wireprotov2peer.py	Mon Oct 08 17:24:28 2018 -0700
+++ b/mercurial/wireprotov2peer.py	Wed Oct 10 23:19:42 2018 -0700
@@ -337,6 +337,11 @@
             return
         elif action == 'noop':
             return
+        elif action == 'responsedata':
+            # Handled below.
+            pass
+        else:
+            raise error.ProgrammingError('action not handled: %s' % action)
 
         if frame.requestid not in self._requests:
             raise error.ProgrammingError(