svn: E200009: 'C:\Users\zxavi\Desktop\c\b' is not known to exist in the repository and is not part of the commit, yet its child 'C:\Users\zxavi\Desktop\c\b\b.txt' is part of the commit

使用svnkit 在进行java的svn开发的时候,在进行checkWorkCopy一直出现svn: E200009: 'C:\Users\zxavi\Desktop\c\b' is not known to exist in the repository and is not part of the commit, yet its child 'C:\Users\zxavi\Desktop\c\b\b.txt' is part of the commit  这样的错误。

public static void checkWorkCopy(SVNUtil su, SVNClientManager clientManager, String wcPath)
        throws SVNException {

        File wc = new File(wcPath);

        if (!isWorkingCopy(wc)) {
            if (!isURLExist(SVNURL.parseURIEncoded(su.getStoreUrl()), su.getUSERNAME(), su.getPASSWD())) {
                checkout(clientManager, SVNURL.parseURIEncoded(su.getStoreUrl()), SVNRevision.HEAD,
                    wc, SVNDepth.EMPTY);
            } else {
                checkout(clientManager, SVNURL.parseURIEncoded(su.getStoreUrl()), SVNRevision.HEAD,
                    wc, SVNDepth.INFINITY);
            }
        } else {
            update(clientManager, wc, SVNRevision.HEAD, SVNDepth.INFINITY);
        }
    }

原因很简单,在把本地文件上传至svn仓库是,我们使用图形化界面操作要注意这样一个细节

就算你不勾上这个b目录,只想勾b目录下的文件也不行的,因为这个图形化界面在你勾上b目录下文件的时候也会自动把b目录给勾选上。

发现这个细节后,在我用代码上传文件至svn目录下时就发现了错误原因了:

 

posted @ 2019-05-27 16:35  margo  阅读(980)  评论(0编辑  收藏  举报