Package org.tmatesoft.svn.core.wc

Examples of org.tmatesoft.svn.core.wc.SVNUpdateClient


    File filePath = new File(this.path);

    this.getTask().log("update " + filePath.getCanonicalPath());

    // Get the Update Client
    SVNUpdateClient client = this.getTask().getSvnClient().getUpdateClient();

    // Execute svn info
    long revision = client.doUpdate(filePath, this.revision, this.depth, this.recursive, this.force);

    // Set the computed properties in ant
    this.getProject().setProperty(this.revisionProperty, new Long(revision).toString());
  }
View Full Code Here


        if (!getSVNEnvironment().isVersioned(target.getTarget())) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND,
                    "''{0}'' does not appear to be a working copy path", target.getTarget());
            SVNErrorManager.error(err, SVNLogType.CLIENT);
        }
        SVNUpdateClient client = getSVNEnvironment().getClientManager().getUpdateClient();
        if (!getSVNEnvironment().isQuiet()) {
            client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment(), false, false, false));
        }
       
        SVNDepth depth = getSVNEnvironment().getDepth();
        boolean depthIsSticky = false;
        if (getSVNEnvironment().getSetDepth() != SVNDepth.UNKNOWN) {
            depth = getSVNEnvironment().getSetDepth();
            depthIsSticky = true;
        }
       
        client.doSwitch(target.getFile(), switchURL.getURL(), switchURL.getPegRevision(),
                getSVNEnvironment().getStartRevision(), depth,
                getSVNEnvironment().isForce(), depthIsSticky);   
    }
View Full Code Here

        if (from.isURL() != to.isURL() || !from.isURL()) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.INCORRECT_PARAMS,
                    "''{0}'' to ''{1}'' is not a valid relocation", new Object[] {from.getTarget(), to.getTarget()});
            SVNErrorManager.error(err, SVNLogType.CLIENT);
        }
        SVNUpdateClient client = getSVNEnvironment().getClientManager().getUpdateClient();
        if (targets.size() == 2) {
            SVNPath target = new SVNPath("");
            client.doRelocate(target.getFile(), from.getURL(), to.getURL(), getSVNEnvironment().getDepth().isRecursive());
        } else {
            for(int i = 2; i < targets.size(); i++) {
                SVNPath target = new SVNPath((String) targets.get(i));
                client.doRelocate(target.getFile(), from.getURL(), to.getURL(), getSVNEnvironment().getDepth().isRecursive());
            }
        }
    }
View Full Code Here

            };
            changelistClient.doGetChangeListPaths(changeLists, fileTargets, clDepth, handler);
            targets = targetPaths;
        }
       
        SVNUpdateClient client = getSVNEnvironment().getClientManager().getUpdateClient();
        if (!getSVNEnvironment().isQuiet()) {
            client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment()));
        }
       
        SVNDepth depth = getSVNEnvironment().getDepth();
        boolean depthIsSticky = false;
        if (getSVNEnvironment().getSetDepth() != SVNDepth.UNKNOWN) {
            depth = getSVNEnvironment().getSetDepth();
            depthIsSticky = true;
        }
       
        List files = new ArrayList(targets.size());
        for (Iterator ts = targets.iterator(); ts.hasNext();) {
            String targetName = (String) ts.next();
            SVNPath target = new SVNPath(targetName);
            if (!target.isFile()) {
                // skip it.
                getSVNEnvironment().getOut().println("Skipped '" + targetName + "'");
                continue;
            }
            files.add(target.getFile());
        }
        File[] filesArray = (File[]) files.toArray(new File[files.size()]);
        client.doUpdate(filesArray, getSVNEnvironment().getStartRevision(), depth,
                getSVNEnvironment().isForce(), depthIsSticky);
    }
View Full Code Here

  private static Logger logger = Logger.getLogger("SVNPostCommit");
 
  public void postCommitHook(String path, String repositoryURL) {
    File dstPath = new File(path);
    SVNClientManager cm = SVNClientManager.newInstance();
    SVNUpdateClient uc = cm.getUpdateClient();
    try {
      uc.doUpdate(dstPath, SVNRevision.HEAD,SVNDepth.INFINITY,true, true);
    } catch (SVNException e) {
      logger.throwing("SVNPostCommit", "postCommitHook", e);
      logger.warning(e.getLocalizedMessage());
      e.printStackTrace(System.err);
    }
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.wc.SVNUpdateClient

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.