Examples of SVNWCClient


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

    public void cancelOperation() throws ClientException {
        myCancelOperation = true;
    }

    public Info info(String path) throws ClientException {
        SVNWCClient client = getSVNWCClient();
        try {
            if (isURL(path)) {
                return JavaHLObjectFactory.createInfo(client.doInfo(SVNURL.parseURIEncoded(path), SVNRevision.UNDEFINED, SVNRevision.UNDEFINED));
            }
            return JavaHLObjectFactory.createInfo(client.doInfo(new File(path).getAbsoluteFile(), SVNRevision.UNDEFINED));
        } catch (SVNException e) {
            if (e.getErrorMessage().getErrorCode() == SVNErrorCode.UNVERSIONED_RESOURCE) {
                return null;
            }
            throwException(e);
View Full Code Here

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

            resetLog();
        }
  }

    private void info2(String pathOrUrl, Revision revision, Revision pegRevision, int depth, String[] changelists, ISVNInfoHandler handler) throws SVNException {
        SVNWCClient client = getSVNWCClient();
        if (isURL(pathOrUrl)) {
            client.doInfo(SVNURL.parseURIEncoded(pathOrUrl),
                    JavaHLObjectFactory.getSVNRevision(pegRevision),
                    JavaHLObjectFactory.getSVNRevision(revision),
                    JavaHLObjectFactory.getSVNDepth(depth), handler);
        } else {
            Collection changeListsCollection = null;
            if (changelists != null && changelists.length > 0) {
                changeListsCollection = Arrays.asList(changelists);
            }
            client.doInfo(new File(pathOrUrl).getAbsoluteFile(),
                    JavaHLObjectFactory.getSVNRevision(pegRevision),
                    JavaHLObjectFactory.getSVNRevision(revision),
                    JavaHLObjectFactory.getSVNDepth(depth), changeListsCollection, handler);
        }
    }
View Full Code Here

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

                    client.setCommitHandler(null);
                }
                resetLog();
            }
        } else {
            SVNWCClient client = getSVNWCClient();
            for (int i = 0; i < path.length; i++) {
                try {
                    client.doDelete(new File(path[i]).getAbsoluteFile(), force, !keepLocal, false);
                } catch (SVNException e) {
                    throwException(e);
                } finally {
                    resetLog();
                }
View Full Code Here

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

        revert(path, JavaHLObjectFactory.infinityOrEmpty(recurse), null);
    }

  public void revert(String path, int depth, String[] changelists)
      throws ClientException {
        SVNWCClient client = getSVNWCClient();
        try {
            client.doRevert(new File[] { new File(path).getAbsoluteFile() },
                    JavaHLObjectFactory.getSVNDepth(depth),
                    JavaHLObjectFactory.getChangeListsCollection(changelists));
        } catch (SVNException e) {
            throwException(e);
        } finally {
View Full Code Here

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

    public void add(String path, boolean recurse, boolean force) throws ClientException {
        add(path, JavaHLObjectFactory.infinityOrEmpty(recurse), force, false, false);
    }

    public void add(String path, int depth, boolean force, boolean noIgnores, boolean addParents) throws ClientException {       
        SVNWCClient wcClient = getSVNWCClient();
        try {
            wcClient.doAdd(new File(path).getAbsoluteFile(), force, false, false, JavaHLObjectFactory.getSVNDepth(depth), noIgnores, addParents);
        } catch (SVNException e) {
            throwException(e);
        } finally {
            resetLog();
        }
View Full Code Here

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

            }
        }
    }

    public void cleanup(String path) throws ClientException {
        SVNWCClient client = getSVNWCClient();
        try {
            client.doCleanup(new File(path).getAbsoluteFile());
        } catch (SVNException e) {
            throwException(e);
        } finally {
            resetLog();
        }
View Full Code Here

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

    public void resolved(String path, boolean recurse) throws ClientException {
        resolve(path, JavaHLObjectFactory.infinityOrEmpty(recurse), ConflictResult.chooseMerged);
    }

    public void resolve(String path, int depth, int conflictResult) throws ClientException {
        SVNWCClient client = getSVNWCClient();
        try {
            client.doResolve(new File(path).getAbsoluteFile(), JavaHLObjectFactory.getSVNDepth(depth), JavaHLObjectFactory.getSVNConflictChoice(conflictResult));
        } catch (SVNException e) {
            throwException(e);
        } finally {
            resetLog();
        }
View Full Code Here

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

    private PropertyData[] properties(String path, Revision revision, Revision pegRevision, SVNDepth depth,
            String[] changelists) throws ClientException {
        if (path == null) {
            return null;
        }
        SVNWCClient client = getSVNWCClient();
        SVNRevision svnRevision = JavaHLObjectFactory.getSVNRevision(revision);
        SVNRevision svnPegRevision = JavaHLObjectFactory.getSVNRevision(pegRevision);
        JavaHLPropertyHandler propHandler = new JavaHLPropertyHandler(myOwner);
        try {
            if (isURL(path)) {
                client.doGetProperty(SVNURL.parseURIEncoded(path), null, svnPegRevision, svnRevision, depth, propHandler);
            } else {
                client.doGetProperty(new File(path).getAbsoluteFile(), null, svnPegRevision, svnRevision, depth,
                        propHandler, JavaHLObjectFactory.getChangeListsCollection(changelists));
            }
        } catch (SVNException e) {
            throwException(e);
        } finally {
View Full Code Here

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

        propertySet(path, name, SVNPropertyValue.create(value), depth, force, changelists, revprops);
    }

    private void propertySet(String path, String name, SVNPropertyValue value, int depth, boolean force,
            String[] changelists, Map revprops) throws ClientException {
       SVNWCClient client = getSVNWCClient();
       if (isURL(path)) {
           try {
               SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops);
               client.setCommitHandler(createCommitMessageHandler(true));
               client.doSetProperty(SVNURL.parseURIEncoded(path), name, value, SVNRevision.HEAD,
                        "", revisionProperties, force, ISVNPropertyHandler.NULL);
           } catch (SVNException e) {
               throwException(e);
           } finally {
               if (client != null) {
                   client.setCommitHandler(null);
               }
               resetLog();
           }
       } else {
           try {
               client.doSetProperty(new File(path).getAbsoluteFile(), name, value, force,
                        JavaHLObjectFactory.getSVNDepth(depth), ISVNPropertyHandler.NULL,
                        JavaHLObjectFactory.getChangeListsCollection(changelists));
           } catch (SVNException e) {
               throwException(e);
           } finally {
View Full Code Here

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

    public void propertyRemove(String path, String name, boolean recurse) throws ClientException {
        propertyRemove(path, name, JavaHLObjectFactory.infinityOrEmpty(recurse), null);
    }

  public void propertyRemove(String path, String name, int depth, String[] changelists) throws ClientException {
        SVNWCClient client = getSVNWCClient();
        try {
            client.doSetProperty(new File(path).getAbsoluteFile(), name, null, false,
                    JavaHLObjectFactory.getSVNDepth(depth), ISVNPropertyHandler.NULL,
                    JavaHLObjectFactory.getChangeListsCollection(changelists));
        } catch (SVNException e) {
            throwException(e);
        } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.