Package org.tmatesoft.svn.core.wc

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


        private static final long serialVersionUID = -8562813147341259328L;

        @Override
        protected void preUpdate(ModuleLocation module, File local) throws SVNException, IOException {
            listener.getLogger().println("Reverting " + local + " to depth " + module.getDepthOption() + " with ignoreExternals: " + module.isIgnoreExternalsOption());
            final SVNWCClient svnwc = manager.getWCClient();
            svnwc.setIgnoreExternals(module.isIgnoreExternalsOption());
            svnwc.doRevert(new File[]{local.getCanonicalFile()}, getSvnDepth(module.getDepthOption()), null);
        }
View Full Code Here


         *
         * @param workspace
         *      The target to run "svn info".
         */
        private SVNInfo parseSvnInfo(File workspace) throws SVNException {
            final SVNWCClient svnWc = clientManager.getWCClient();
            return svnWc.doInfo(workspace,SVNRevision.WORKING);
        }
View Full Code Here

        }

        public PathContext invoke(File p, VirtualChannel channel) throws IOException {
            final SvnClientManager manager = SubversionSCM.createClientManager(authProvider);
            try {
                final SVNWCClient svnwc = manager.getWCClient();

                SVNInfo info;
                try {
                    info = svnwc.doInfo(p, SVNRevision.WORKING);
                    String url = info.getURL().toDecodedString();
                    String repoRoot = info.getRepositoryRootURL().toDecodedString();
                    return new PathContext(url, repoRoot, null);
                } catch (SVNException e) {
                    e.printStackTrace();
View Full Code Here

  @Override
  protected List<SvnAjxpFile> listFiles(SvnDriver driver, final String path,
      final boolean dirOnly) {
    try {
      File dir = driver.getFile(path);
      SVNWCClient client = driver.getManager().getWCClient();

      final List<SvnAjxpFile> res = new Vector<SvnAjxpFile>();
      FileFilter filter = createFileFilter(dir);
      File[] files = dir.listFiles(filter);
      for (File file : files) {
        //SVNStatus status = driver.getManager().getStatusClient().doStatus(file, false);
       
        SVNInfo info = client.doInfo(file, SVNRevision.WORKING);
        if (dirOnly) {
          if (file.isDirectory())
            res.add(new SvnAjxpFile(info, path));
        } else {
          res.add(new SvnAjxpFile(info, path));
View Full Code Here

                    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

        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

    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

            }
        }
    }

    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

    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

    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

TOP

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

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.