org.netbeans.lib.cvsclient.command.diff.DiffCommand的任何工作示例

时间:2016-08-22 09:01:06

标签: java netbeans

我想使用org-netbeans-lib-cvsclient-RELEASE712.jar找出两个版本之间的差异。

任何工作实例?

    DiffCommand diffCommand = new DiffCommand();
    diffCommand.setRecursive(true);
    diffCommand.setRevision1("rel-2230");
    diffCommand.setRevision2("rel-2240");
    diffCommand.setFiles(new File[]{new File("D:/test/")});
    diffCommand.setBuilder(new SimpleDiffBuilder(em, diffCommand));

    try {
        System.out.println(diffCommand.getCVSCommand());

        cvsClient.executeCommand(diffCommand, opts);
        Set files = cvsClient.getAllFiles(new File("D:/test/"));

    } catch (CommandException | AuthenticationException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } 

0 个答案:

没有答案