Package org.tmatesoft.svn.core.wc

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


    private void status(String path, int depth, boolean onServer, boolean getAll, boolean noIgnore,
            boolean ignoreExternals, String[] changelists, ISVNStatusHandler handler) throws ClientException {
        if (path == null) {
            return;
        }
        SVNStatusClient stClient = getSVNStatusClient();
        boolean oldIgnoreExternals = stClient.isIgnoreExternals();
        stClient.setIgnoreExternals(ignoreExternals);
        try {
            stClient.doStatus(new File(path).getAbsoluteFile(), SVNRevision.HEAD,
                    JavaHLObjectFactory.getSVNDepth(depth), onServer, getAll, noIgnore,
                    !ignoreExternals, handler, JavaHLObjectFactory.getChangeListsCollection(changelists));
        } catch (SVNException e) {
            throwException(e);
        } finally {
            stClient.setIgnoreExternals(oldIgnoreExternals);
            resetLog();
        }
    }
View Full Code Here


        }
        return false;
    }

    public static void canDelete(File path, ISVNOptions options, final ISVNEventHandler eventHandler) throws SVNException {
        SVNStatusClient statusClient = new SVNStatusClient((ISVNAuthenticationManager) null, options);
        if (eventHandler != null) {
            statusClient.setEventHandler(new ISVNEventHandler() {
                public void checkCancelled() throws SVNCancelException {
                    eventHandler.checkCancelled();
                }

                public void handleEvent(SVNEvent event, double progress) throws SVNException {
                }
            });
        }
        statusClient.doStatus(path, SVNRevision.UNDEFINED, SVNDepth.INFINITY, false, false, false, false, new ISVNStatusHandler() {
            public void handleStatus(SVNStatus status) throws SVNException {
                if (status.getContentsStatus() == SVNStatusType.STATUS_OBSTRUCTED) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNEXPECTED_KIND, "''{0}'' is in the way of the resource actually under version control", status.getFile());
                    SVNErrorManager.error(err, SVNLogType.WC);
                } else if (status.getEntry() == null) {
View Full Code Here

        targets = getSVNEnvironment().combineTargets(targets, true);
        if (targets.isEmpty()) {
            targets.add("");
        }
        myStatusPrinter = new SVNStatusPrinter(getSVNEnvironment());
        SVNStatusClient client = getSVNEnvironment().getClientManager().getStatusClient();
        if (!getSVNEnvironment().isXML()) {
            client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment()));
        }
        if (getSVNEnvironment().isXML()) {
            if (!getSVNEnvironment().isIncremental()) {
                printXMLHeader("status");
            }
        } else if (getSVNEnvironment().isIncremental()) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "'incremental' option only valid in XML mode");
            SVNErrorManager.error(err, SVNLogType.CLIENT);
        }

        Collection changeLists = getSVNEnvironment().getChangelistsCollection();
        for (Iterator ts = targets.iterator(); ts.hasNext();) {
            String target = (String) ts.next();
            SVNPath commandTarget = new SVNPath(target);

            if (getSVNEnvironment().isXML()) {
                StringBuffer xmlBuffer = openXMLTag("target", SVNXMLUtil.XML_STYLE_NORMAL, "path", SVNCommandUtil.getLocalPath(target), null);
                getSVNEnvironment().getOut().print(xmlBuffer);
            }
           
            try {
                long rev = client.doStatus(commandTarget.getFile(), SVNRevision.HEAD,
                        getSVNEnvironment().getDepth(), getSVNEnvironment().isUpdate(),
                        getSVNEnvironment().isVerbose(), getSVNEnvironment().isNoIgnore(),
                        false, this, changeLists);

                if (getSVNEnvironment().isXML()) {
View Full Code Here

    // Set the default property in ant in case we have an exception below.
    this.getProject().setProperty(this.revisionProperty, "-1");

    // Get the WC Client
    SVNStatusClient client = this.getTask().getSvnClient().getStatusClient();

    // Execute svn status
    SVNStatus status = client.doStatus(filePath, this.remote, this.ignoreExternals);

    // Get the interesting status data
    SVNRevision committedRevision = status.getCommittedRevision();
    SVNRevision remoteRevision = status.getRemoteRevision();
    SVNRevision revision = status.getRevision();
View Full Code Here

    // Set the default property in ant in case we have an exception below.
    this.getProject().setProperty(this.revisionProperty, "-1");

    // Get the WC Client
    SVNStatusClient client = this.getTask().getSvnClient()
        .getStatusClient();

    // Execute svn status
    SVNStatus status;
    if (recursive && filePath.isDirectory()) {
      client.doStatus(filePath, SVNRevision.WORKING, true, this.remote,
          true, false, this.ignoreExternals, this);
    }
    status = client.doStatus(filePath, this.remote, this.ignoreExternals);
    // Get the interesting status data
    SVNRevision committedRevision = status.getCommittedRevision();
    SVNRevision remoteRevision = status.getRemoteRevision();
    SVNRevision revision = status.getRevision();
    SVNRevision copyFromRevision = status.getCopyFromRevision();
View Full Code Here

TOP

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

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.