##// END OF EJS Templates
bundle2: clarify the docstring of unpackermixin methods...
Pierre-Yves David -
r31862:9bd9e9cb default
parent child Browse files
Show More
@@ -621,12 +621,24 b' class unpackermixin(object):'
621 util.safehasattr(fp, 'tell'))
621 util.safehasattr(fp, 'tell'))
622
622
623 def _unpack(self, format):
623 def _unpack(self, format):
624 """unpack this struct format from the stream"""
624 """unpack this struct format from the stream
625
626 This method is meant for internal usage by the bundle2 protocol only.
627 They directly manipulate the low level stream including bundle2 level
628 instruction.
629
630 Do not use it to implement higher-level logic or methods."""
625 data = self._readexact(struct.calcsize(format))
631 data = self._readexact(struct.calcsize(format))
626 return _unpack(format, data)
632 return _unpack(format, data)
627
633
628 def _readexact(self, size):
634 def _readexact(self, size):
629 """read exactly <size> bytes from the stream"""
635 """read exactly <size> bytes from the stream
636
637 This method is meant for internal usage by the bundle2 protocol only.
638 They directly manipulate the low level stream including bundle2 level
639 instruction.
640
641 Do not use it to implement higher-level logic or methods."""
630 return changegroup.readexactly(self._fp, size)
642 return changegroup.readexactly(self._fp, size)
631
643
632 def seek(self, offset, whence=0):
644 def seek(self, offset, whence=0):
General Comments 0
You need to be logged in to leave comments. Login now