[PATCH 1 of 7 iterbatch] peer: raise NotImplementedError for abstract submit() method

Augie Fackler raf at durin42.com
Mon Mar 7 23:25:37 EST 2016


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1456868276 18000
#      Tue Mar 01 16:37:56 2016 -0500
# Node ID 5fd58c8c55d052c671a4725d01f27fb1c14353a9
# Parent  85cba1c5c22c842209588d8da99da174ff4313cd
# EXP-Topic batch
peer: raise NotImplementedError for abstract submit() method

Nothing should ever call this submit method directly as it should be
overridden by concrete batcher implementations.

diff --git a/mercurial/peer.py b/mercurial/peer.py
--- a/mercurial/peer.py
+++ b/mercurial/peer.py
@@ -39,7 +39,7 @@ class batcher(object):
             return resref
         return call
     def submit(self):
-        pass
+        raise NotImplementedError()
 
 class localbatch(batcher):
     '''performs the queued calls directly'''


More information about the Mercurial-devel mailing list