Branches only partially deleted in svn

I have a branch mapping defined as
branches = branches/DEV/*/src:refs/heads/branches/DEV/*

When I create a branch branches/DEV/BASEINT-21712_5 in Bitbucket everything looks fine.The log file svnmirror.log contains as expected:

2022-06-07 14:24:30,169 push - "addDir" "branches/DEV/BASEINT-21712_5" null -1 
2022-06-07 14:24:30,173 push - "addDir" "branches/DEV/BASEINT-21712_5/src" "trunk/src" 4156

But when I delete the branch in Bitbucket again, the higher level directory remains in svn. Again from logs:

2022-06-07 14:25:10,675 push - "openDir" "branches/DEV/BASEINT-21712_5" 4166
2022-06-07 14:25:10,677 push - "deleteEntry" "branches/DEV/BASEINT-21712_5/src" 4166

I would have expected a deleteEntry for branches/DEV/BASEINT-21712_5. Is this a bug or is there a configuration option?

SVN Mirror version: 4.0.6
Bitbucket version: 7.17.1

Hello Gerriet,

thank you for reaching out to us on that matter.

Do I understand correctly that you are creating the new branch branches/DEV/BASEINT-21712_5 by copying it from another branch containing the src subdirectory? And then when the branch is removed in Git, then only src directory in SVN is removed, is that correct?
If so, then it looks to be working as expected, SVN Mirror considers the lowest level directory as the branch and hence deletes only this directory.

In our svn repos, we have a directory structure like trunk/src or branches/DEV/BRANCH_XYZ/src. These /src suffixes have only historical reasons. We use svn externals for collecting code from several repositories. While doing this we drop the /src suffix. With git we would like to get rid off the /src, because git would not allow to check out only subdirectories. So we came to the branch mapping branches = branches/DEV/*/src:refs/heads/branches/DEV/*. That worked well, except for branch deletion.