Den tis 7 mars 2023 kl 20:24 skrev Pavel Lyalyakin via dev < dev@subversion.apache.org>:
> Hello, > > I seem to have found a new bug (I can't find similar reports) so I thought > I'd report it to this mailing list. Sorry if it's a known issue. > > I believe that the command shouldn't work anyway, right? But it shouldn't > assert either. > > The SVN client crashes when I run the following command: > [[[ > svn move https://svn1.mydomain.com/svn/MyRepo/ > https://svn1.mydomain.com/svn/MyRepo/trunk -m "Test Commit" > ]]] > [[[ > svn: E235000: In file '..\..\..\subversion\libsvn_client\copy.c' line > 1187: assertion failed (! svn_path_is_empty(path)) > ]]] > > SRC URL points to a root of a repository. DST URL points to a non-existent > subdirectory. > Hi I think I have found the root cause and the relevant commit. I will document my findings so far in case someone else would like to look at it, I need to do some more analysis before I'm ready to suggest a solution. In subversion/libsvn_client/copy.c, setup_copy, there is a check: [[[ if (svn_dirent_is_child(pair->src_abspath_or_url, pair->dst_abspath_or_url, iterpool)) return svn_error_createf (SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Cannot copy path '%s' into its own child '%s'"), svn_dirent_local_style(pair->src_abspath_or_url, pool), svn_dirent_local_style(pair->dst_abspath_or_url, pool)); ]]] This should prevent the assertion and instead give a reasonable error message. However, a few lines above, this code is only executed [[[ if (!srcs_are_urls && !dst_is_url) ]]] This condition seems to come from r846422, with a log message referencing issue SVN-1367 (from 2003!). There is a reasonable argument in the issue description on why this condition was added (it was supposed to manage svn copy). There is an argument "is_move" to the function, so it might be reasonable to also look at that variable in the above condition. Kind regards, Daniel