Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
trunk
-
None
Description
There's a bug with Python binding for the svn_txdelta_window_t structure. The problem is that the 'ops' array is mapped to Python as a single object, not as a sequence of 'num_ops' items. That is, the following code for apply_textdelta does not work: def apply_textdelta(self, file_baton, base_checksum): self.dbg(("apply_textdelta to %s" % (file_baton[0]))) def txdelta_handler(window): if window is None: self.dbg("txdelta - stop") else: self.dbg(("txdelta - %s [%d,%d] [X,%d] %d %d" % (file_baton[0], window.sview_offset, window.sview_len, window.tview_len, window.src_ops, window.num_ops))) for o in window.ops: self.dbg((" op: %d,%d,%d" % (o.action_code, o.offset, o.length))) return txdelta_handler It fails with the error that "for o in window.ops: TypeError: iteration over non-sequence". The following code works, but it can only access the first item in the 'ops' array: self.dbg((" op: %d,%d,%d" % (window.ops.action_code, window.ops.offset, window.ops.length))) This has been confirmed to be a bug on dev@subversion.apache.org in March 2010.
Original issue reported by stilor