D1990: wireprotoserver: make abstractserverproto a proper abstract base class
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Thu Feb 1 18:32:42 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG654d1f79b9a6: wireprotoserver: make abstractserverproto a proper abstract base class (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1990?vs=5113&id=5129
REVISION DETAIL
https://phab.mercurial-scm.org/D1990
AFFECTED FILES
mercurial/wireprotoserver.py
CHANGE DETAILS
diff --git a/mercurial/wireprotoserver.py b/mercurial/wireprotoserver.py
--- a/mercurial/wireprotoserver.py
+++ b/mercurial/wireprotoserver.py
@@ -6,6 +6,7 @@
from __future__ import absolute_import
+import abc
import cgi
import struct
import sys
@@ -37,12 +38,15 @@
Used as reference and documentation.
"""
+ __metaclass__ = abc.ABCMeta
+
+ @abc.abstractmethod
def getargs(self, args):
"""return the value for arguments in <args>
returns a list of values (same order as <args>)"""
- raise NotImplementedError()
+ @abc.abstractmethod
def getfile(self, fp):
"""write the whole content of a file into a file like object
@@ -52,13 +56,12 @@
chunk size is the ascii version of the int.
"""
- raise NotImplementedError()
+ @abc.abstractmethod
def redirect(self):
"""may setup interception for stdout and stderr
See also the `restore` method."""
- raise NotImplementedError()
# If the `redirect` function does install interception, the `restore`
# function MUST be defined. If interception is not used, this function
To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list