https://trac.edgewall.org/ticket/13704


Found
r1915316

r1915316 | jun66j5 | 2024-01-19 06:26:36 +0000 (Fri, 19 Jan 2024)

Following up on r1912500, fix `none_dealloc` error caused by `apply_textdelta`
function incorrectly decrementing the reference count of the `None` object
twice when `delta.Editor.apply_textdelta` returns `None`, and the issue that
`parse_fn3_apply_textdelta` function which doesn't decrement the reference
count of the handler returned from `ParseFn3.apply_textdelta`.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
  (apply_textdelta): Remove one of the calls of `Py_DECREF` for `Py_None`.
  (parse_fn3_apply_textdelta): Decrement the reference count of the handler
    returned from `ParseFns3.apply_textdelta`.
* subversion/bindings/swig/python/tests/data/repository-deltas.dump:
    Add deltas dump file for `parse_fn3_apply_textdelta`.
* subversion/bindings/swig/python/tests/repository.py
  (test_delta_editor_apply_textdelta_handler_refcount): Add tests.
  (test_parse_fns3_apply_textdelta_handler_refcount): Add tests.

Reported by: https://trac.edgewall.org/ticket/13704
Reviewed by: futatuki