Package org.exist.versioning.svn.wc

Examples of org.exist.versioning.svn.wc.SVNClientManager


  @Override
  public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
    String uri = args[0].getStringValue();
    SVNRepositoryFactoryImpl.setup();
    SVNClientManager manager = SVNClientManager.newInstance(SVNWCUtil.createDefaultOptions(false), "", "");

    SVNStatusClient statusClient = manager.getStatusClient();
   
    SVNWCClient wcClient = manager.getWCClient();

    MemTreeBuilder builder = context.getDocumentBuilder();
        builder.startDocument();
        builder.startElement(new QName("status", null, null), null);
   
View Full Code Here


     * @param contextSequence
     */
    public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
        String uri = args[0].getStringValue();
        DefaultSVNOptions options = SVNWCUtil.createDefaultOptions(true);
        SVNClientManager manager = SVNClientManager.newInstance(options, "", "");
       
        try {
      manager.getWCClient().doCleanup(new Resource(uri));
    } catch (SVNException e) {
      throw new XPathException(this, e.getMessage(), e);
    }
       
        return Sequence.EMPTY_SEQUENCE; 
View Full Code Here

      password = params[1];
    }
      new WorkingCopy(userName, password);

      SVNRepositoryFactoryImpl.setup();
    SVNClientManager manager = SVNClientManager.newInstance(SVNWCUtil.createDefaultOptions(false), userName, password);
    SVNStatusClient statusClient = manager.getStatusClient();
//    SVNWCClient wcClient = manager.getWCClient();
    try {
      statusClient.doStatus(new Resource(collection), SVNRevision.HEAD, SVNDepth.getInfinityOrFilesDepth(true), true, true, false, false,  new AddStatusHandler(), null);
    } catch (SVNException e) {
      e.printStackTrace();
View Full Code Here

            SamplesUtility.createRepository(reposRoot);
            SVNCommitInfo info = SamplesUtility.createRepositoryTree(reposRoot);
            //print out new revision info
            System.out.println(info);

            SVNClientManager clientManager = SVNClientManager.newInstance();
           
            SVNURL reposURL = SVNURL.fromFile(reposRoot);

            //copy A to A_copy in repository (url-to-url copy)
            SVNCopyClient copyClient = clientManager.getCopyClient();
            SVNURL A_URL = reposURL.appendPath("A", true);
            SVNURL copyTargetURL = reposURL.appendPath("A_copy", true);
            SVNCopySource copySource = new SVNCopySource(SVNRevision.UNDEFINED, SVNRevision.HEAD, A_URL);
            info = copyClient.doCopy(new SVNCopySource[] { copySource }, copyTargetURL, false, false, true,
                    "copy A to A_copy", null);
            //print out new revision info
            System.out.println(info);
           
            //checkout the entire repository tree
            SamplesUtility.checkOutWorkingCopy(reposURL, wcRoot);

           
            //now make some changes to the A tree
            SamplesUtility.writeToFile(new File(wcRoot, "A/B/lambda"), "New text appended to 'lambda'", true);
            SamplesUtility.writeToFile(new File(wcRoot, "A/mu"), "New text in 'mu'", false);
           
            SVNWCClient wcClient = SVNClientManager.newInstance().getWCClient();
            wcClient.doSetProperty(new File(wcRoot, "A/B"), "spam", SVNPropertyValue.create("egg"), false,
                    SVNDepth.EMPTY, null, null);

            //commit local changes
            SVNCommitClient commitClient = clientManager.getCommitClient();
            commitClient.doCommit(new File[] { wcRoot }, false, "committing changes", null, null, false, false, SVNDepth.INFINITY);

            //now make some local changes to the A_copy tree
            //change file contents of A_copy/B/lambda and A_copy/mu
            SamplesUtility.writeToFile(new File(wcRoot, "A_copy/B/lambda"), "New text in copied 'lambda'", true);
            SamplesUtility.writeToFile(new File(wcRoot, "A_copy/mu"), "New text in copied 'mu'", false);

            //now diff the base revision of the working copy against the repository
            SVNDiffClient diffClient = clientManager.getDiffClient();

            /*
             * Since we provided no custom ISVNOptions implementation to SVNClientManager, our
             * manager uses DefaultSVNOptions, which is set to all SVN*Client classes which the
             * manager produces. So, we can cast ISVNOptions to DefaultSVNOptions.
View Full Code Here

TOP

Related Classes of org.exist.versioning.svn.wc.SVNClientManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.