[ 
https://issues.apache.org/jira/browse/SVN-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144789#comment-17144789
 ] 

Julian Foad commented on SVN-4854:
----------------------------------

The order of operations matters, by design. svnmucc 1.8.15 succeeding was 
wrong; all later versions (1.9 through 1.14) error out, and that is correct.

The error handling should be improved. There are inconsistencies among various 
similar cases:
{code:none}
$ rm -rf repo && svnadmin create repo
$ svnmucc --version | head -n 1
svnmucc, version 1.14.0 (r1876290)

$ svnmucc -U file://$PWD/repo -m '' mkdir '/parent/subdir' mkdir '/parent'
svnmucc: E160020: Path 'parent' already exists

$ svnmucc -U file://$PWD/repo -m '' mkdir '/parent/subdir' 
svnmucc: E160016: Can't commit to 
'file:///home/julianfoad/tmp/svn/svn-4854/repo/parent' because it is not a 
directory

$ svnmucc -U file://$PWD/repo -m '' mkdir '/other' mkdir '/parent/subdir' 
svnmucc: E160016: Path 'parent' not present

$ svnmucc -U file://$PWD/repo -m '' mkdir '/parent/subdir' rm '/other'
svnmucc: E160013: Can't delete node at 'other' as it does not exist

$ svnmucc -U file://$PWD/repo -m '' mkdir '/parent/subdir' rm '/parent/other'
svnmucc: E160013: Can't delete node at 'other' as it does not exist

{code}
The cases shown here should all error out on the "{{mkdir '/parent/subdir'}}" 
operation as '/parent' neither exists nor should be created by that operation. 
Some of these cases are not erroring out on that operation but on a subsequent 
operation, and that is wrong.

The proposed change to the "already exists" error text, while possibly useful, 
is not the complete solution.

Also the error messages would be clearer if they indicated which operation they 
referred to and if they displayed full in-repository paths.

> a problem of svnmucc mkdir
> --------------------------
>
>                 Key: SVN-4854
>                 URL: https://issues.apache.org/jira/browse/SVN-4854
>             Project: Subversion
>          Issue Type: Bug
>          Components: svnmucc
>    Affects Versions: 1.10.6
>         Environment: CentOS 6.6
> Subversion 1.10.6
>            Reporter: Nathan Qian
>            Priority: Major
>
> # /usr/local/bin/svnmucc -U URL -m MESSAGE mkdir '/parent/subdir' mkdir 
> '/parent'
> svnmucc: E160020: Path 'parent' already exists
>  
> But:
> # /usr/local/bin/svnmucc -U URL -m MESSAGE mkdir '/parent' mkdir 
> '/parent/subdir' 
> r506 committed by root at 2020-04-27T12:18:21.419619Z
> It works. 
>  
> In the version 1.8.15, both of these two commands can be run;
> Also the error of the first command is definitely wrong. The '/parent' 
> directory does not exist.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to