Hi,

Some minor nits in this commit:

Den sön 24 sep. 2023 kl 11:02 skrev <futat...@apache.org>:

> Author: futatuki
> Date: Sun Sep 24 09:02:05 2023
> New Revision: 1912515
>

[...]

> @@ -318,6 +388,36 @@ class SubversionRepositoryTestCase(unitt
>      del subpool
>      self.assertEqual(None, editor_ref())
>
> +  def test_replay_batons_refcounts(self):
> +    """Issue SVN-4917: check ref-count of batons created and used in call
> backs"""
>

I think we mostly write "callback(s)" as a single word. (The only other
cases in the code are in the bindings - also fix? - and when "call" is used
as a verb).


> +    root = fs.revision_root(self.fs, self.rev)
> +    editor = BatonCollector(self.fs, root)
> +    e_ptr, e_baton = delta.make_editor(editor)
> +    repos.replay(root, e_ptr, e_baton)
> +    for baton in editor.batons:
> +      self.assertEqual(sys.getrefcount(baton[2]), 2,
> +                       "leak on baton %s after replay without errors"
> +                       % repr(baton))
> +    del e_baton
> +    self.assertEqual(sys.getrefcount(e_ptr), 2,
> +                     "leak on editor baton after replay without errors")
> +
> +    editor = BatonCollectorErrorOnClose(self.fs, root,
> +                                        error_path=b'branches/v1x')
> +    e_ptr, e_baton = delta.make_editor(editor)
> +    self.assertRaises(SubversionException, repos.replay, root, e_ptr,
> e_baton)
> +    batons= editor.batons
>

Add a space to the left of the equal sign for readability?


> +    # As svn_repos_replay calls neigher close_edit callback nor abort_edit
>

Spell fix: "neither"


Kind regards,
Daniel Sahlberg

Reply via email to