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. > > svn, version 1.14.2 (r1899510) > compiled Feb 21 2023, 03:04:00 on x86_64-microsoft-windows6.2.9200 > Thanks Pavel for reporting! I get the same on Linux (Ubuntu 22.10 on WSL), with both 1.14.2 and a newly compiled trunk version. In my case I'm using file:// as the access method: [[[ dsg@daniel-2022:~/svn_trunk/subversion$ ./svnadmin/svnadmin create $HOME/repo dsg@daniel-2022:~/svn_trunk/subversion$ ./svn/svn move file://$HOME/repo file://$HOME/repo/foo -m 'test move' subversion/libsvn_client/copy.c:1187: (apr_err=SVN_ERR_ASSERTION_FAIL) svn: E235000: In file 'subversion/libsvn_client/copy.c' line 1187: assertion failed (! svn_path_is_empty(path)) Aborted dsg@daniel-2022:~/svn_trunk/subversion$ ./svn/svn --version svn, version 1.15.0-dev (under development) compiled Mar 8 2023, 21:45:52 on x86_64-pc-linux-gnu [...] dsg@daniel-2022:~/svn_trunk/subversion$ ]]] I made a quick check and there seems to be code in subversion/libsvn_client/copy.c to detect if a move is into it's own child, lines 3080ff, however only [[[ if (!srcs_are_urls && !dst_is_url) ]] This condition seems to be added in r846422 (2003-06-25 23:46:20): [[[ Fix issue 1367, allow parent-into-child copies provided they are not WC-to-WC. * subversion/libsvn_client/copy.c [...] (setup_copy): Abort parent-into-child copies only if they are WC-to-WC. ]]] If I remove the condition (!srcs_are_urls && !dst_is_url) the code will properly detect that there is a move from a parent to its child and abort: [[[ dsg@daniel-2022:~/svn_trunk/subversion$ ./svn/svn move file://$HOME/repo file://$HOME/repo/foo -m 'test move' srcareurls: 1 dstisurl: 1 subversion/svn/move-cmd.c:100, subversion/svn/util.c:557, subversion/libsvn_client/copy.c:3495, subversion/libsvn_client/copy.c:3099: (apr_err=SVN_ERR_UNSUPPORTED_FEATURE) svn: E200007: Cannot copy path 'file:///home/dsg/repo' into its own child 'file:///home/dsg/repo/foo' ]]] The code has been refactored a number of times (including a merge from a feature branch to trunk) so I didn't trace all changes. I'm running out of time right now but the issue above should probably explain more about why this condition was added. I also did NOT run the test suite so it may be that I'm breaking things high and low with that change. Obviously it isn't committed until I understand the history of the code. Kind regards, Daniel