Subversion delta operations.
Variable __author__ Undocumented
Variable __docformat__ Undocumented
Variable TXDELTA_SOURCE Undocumented
Variable TXDELTA_TARGET Undocumented
Variable TXDELTA_NEW Undocumented
Variable TXDELTA_INVALID Undocumented
Variable MAX_ENCODED_INT_LEN Undocumented
Variable DELTA_WINDOW_SIZE Undocumented
Function apply_txdelta_window Apply a txdelta window to a buffer.
Function apply_txdelta_handler_chunks Return a function that can be called repeatedly with txdelta windows.
Function apply_txdelta_handler Return a function that can be called repeatedly with txdelta windows.
Function txdelta_apply_ops Apply txdelta operations to a source view.
Function send_stream Send txdelta windows that create stream to handler
Function encode_length Encode a length variable.
Function decode_length Decode a length variable.
Function pack_svndiff_instruction Pack a SVN diff instruction
Function unpack_svndiff_instruction Unpack a SVN diff instruction
Variable SVNDIFF0_HEADER Undocumented
Function pack_svndiff0_window Pack an individual window using svndiff0.
Function pack_svndiff0 Pack a SVN diff file.
Function unpack_svndiff0 Unpack a version 0 svndiff text.
__author__ =
Undocumented
(type: str)
__docformat__ =
Undocumented
(type: str)
TXDELTA_SOURCE =
Undocumented
(type: int)
TXDELTA_TARGET =
Undocumented
(type: int)
TXDELTA_NEW =
Undocumented
(type: int)
TXDELTA_INVALID =
Undocumented
(type: int)
MAX_ENCODED_INT_LEN =
Undocumented
(type: int)
DELTA_WINDOW_SIZE =
Undocumented
(type: int)
def apply_txdelta_window(sbuf, window):
Apply a txdelta window to a buffer.
ParameterssbufSource buffer (as bytestring)
window(sview_offset, sview_len, tview_len, src_ops, ops, new_data)
sview_offsetOffset of the source view
sview_lenLength of the source view
tview_lenTarget view length
src_opsOperations to apply to sview
opsOps to apply
new_dataBuffer with possible new data
ReturnsTarget buffer
def apply_txdelta_handler_chunks(source_chunks, target_chunks):
Return a function that can be called repeatedly with txdelta windows.
ParameterssbufSource buffer
target_streamTarget stream
def apply_txdelta_handler(sbuf, target_stream):
Return a function that can be called repeatedly with txdelta windows.
ParameterssbufSource buffer
target_streamTarget stream
def txdelta_apply_ops(src_ops, ops, new_data, sview):
Apply txdelta operations to a source view.
Parameterssrc_opsSource operations, ignored.
opsList of operations (action, offset, length).
new_dataBuffer to fetch fragments with new data from
sviewSource data
ReturnsResult data
def send_stream(stream, handler, block_size=DELTA_WINDOW_SIZE):
Send txdelta windows that create stream to handler
Parametersstreamfile-like object to read the file from
handlertxdelta window handler function
ReturnsMD5 hash over the stream
def encode_length(len):
Encode a length variable.
ParameterslenLength to encode
ReturnsString with encoded length
def decode_length(text):
Decode a length variable.
ParameterstextBytestring to decode
ReturnsInteger with actual length
def pack_svndiff_instruction(diff_params):
Pack a SVN diff instruction
Parametersdiff_params(action, offset, length)
actionAction
offsetOffset
lengthLength
Returnsencoded text
def unpack_svndiff_instruction(text):
Unpack a SVN diff instruction
ParameterstextText to parse
Returnstuple with operation, remaining text
SVNDIFF0_HEADER =
Undocumented
(type: bytes)
def pack_svndiff0_window(window):
Pack an individual window using svndiff0.
ParameterswindowWindow to pack
ReturnsPacked diff (as bytestring)
def pack_svndiff0(windows):
Pack a SVN diff file.
ParameterswindowsIterator over diff windows
Returnstext
def unpack_svndiff0(text):
Unpack a version 0 svndiff text.
ParameterstextText to unpack.
Returnsyields tuples with sview_offset, sview_len, tview_len, ops_len, ops, newdata
API Documentation for subvertpy, generated by pydoctor at 2020-10-15 18:20:22.