Checking Out Directory / File with SVNKit

后端 未结 3 1598
南方客
南方客 2020-12-16 03:57

I can\'t see on the wiki where checking out is documented. Ideally, I would like to check out a file \"example/folder/file.xml\", if not just the folder... and then when the

3条回答
  •  情歌与酒
    2020-12-16 04:58

    As SVNKit developer, I would recommend you to prefer new API based on SvnOperationFactory. The old API (based on SVNClientManager) will be operational still but all new SVN features will come only to the new API.

    final SvnOperationFactory svnOperationFactory = new SvnOperationFactory();
    try {
        final SvnCheckout checkout = svnOperationFactory.createCheckout();
        checkout.setSingleTarget(SvnTarget.fromFile(workingCopyDirectory));
        checkout.setSource(SvnTarget.fromURL(url));
        //... other options
        checkout.run();
    } finally {
        svnOperationFactory.dispose();
    }
    

提交回复
热议问题