Package org.tmatesoft.svn.core.wc

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


public class SvnKitVersionChecker extends SvnKitAbstractClientManager implements SvnVersionChecker {

  public long getRemoteVersion(SvnProject project) throws SvnException {
    try {
      SVNInfo svnInfo = managerPool.getSvnManager(project).getWCClient().doInfo(
          SVNURL.parseURIEncoded(project.getUrl()), SVNRevision.HEAD, SVNRevision.HEAD);
      return svnInfo.getCommittedRevision().getNumber();

    }
    catch (SVNException e) {
      throw new SvnException(
          "Exception while trying to get the remote svn version for project " + project,
View Full Code Here


                listener.getLogger().println("Checking out a fresh workspace because " + module + " doesn't exist");
                return SvnCommandToUse.CHECKOUT;
            }

            try {
                SVNInfo svnkitInfo = parseSvnInfo(module);
                SvnInfo svnInfo = new SvnInfo(svnkitInfo);

                String url = location.getSVNURL().toString();
               
                if (!svnInfo.url.equals(url)) {
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();
                    return null;
                }
View Full Code Here

      throw new AjxpDriverException("Base path " + baseDir
          + " is not a directory.");
    }

    try {// retrieves SVN infos
      SVNInfo info = manager.getWCClient().doInfo(baseDir,
          SVNRevision.WORKING);
      SVNURL baseUrlTemp = info.getURL();
      if (baseUrl != null) {
        if (!baseUrl.equals(baseUrlTemp)) {
          throw new AjxpDriverException(
              "SVN URL of the working copy "
                  + baseUrlTemp
View Full Code Here

    }
  }

  private void updateIfRequired(File dir) {
    try {
      SVNInfo wcInfo = manager.getWCClient().doInfo(getBaseDir(),
          SVNRevision.WORKING);
      SVNRevision wcRev = wcInfo.getRevision();
      SVNInfo repoInfo = manager.getWCClient().doInfo(getBaseUrl(),
          null, SVNRevision.HEAD);
      SVNRevision repoRev = repoInfo.getRevision();

      if (log.isTraceEnabled())
        log
            .trace("WC Revision=" + wcRev + ", Repo Revision="
                + repoRev);
View Full Code Here

      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

    // Get the WC Client
    SVNWCClient client = this.getTask().getSvnClient().getWCClient();

    // Execute svn info
    SVNInfo info = client.doInfo(filePath, SVNRevision.WORKING);

    // Get the interesting info data
    SVNRevision revision = info.getRevision();
    SVNRevision committedRevision = info.getCommittedRevision();
    SVNURL url = info.getURL();
    SVNURL repositoryRootUrl = info.getRepositoryRootURL();
    String author = info.getAuthor();
    Date committedDate = info.getCommittedDate();

    // Set the computed properties in ant
    this.getProject().setProperty(this.revisionProperty, new Long(revision.getNumber()).toString());
    this.getProject().setProperty(this.urlProperty, url.toDecodedString());
    this.getProject().setProperty(this.repositoryRootUrlProperty, repositoryRootUrl.toDecodedString());
View Full Code Here

TOP

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

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.