Examples of SVNLogClient


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

      ISVNAuthenticationManager authManager = SubversionSCM.createSvnAuthenticationManager(authProvider);
      SVNURL repoURL = SVNURL.parseURIDecoded(getTagsDir());

      SVNRepository repo = SVNRepositoryFactory.create(repoURL);
      repo.setAuthenticationManager(authManager);
      SVNLogClient logClient = new SVNLogClient(authManager, null);
     
      if (isSVNRepositoryProjectRoot(repo)) {
        dirs = this.getSVNRootRepoDirectories(logClient, repoURL);
      } else {
        SimpleSVNDirEntryHandler dirEntryHandler = new SimpleSVNDirEntryHandler(tagsFilter);
        logClient.doList(repoURL, SVNRevision.HEAD, SVNRevision.HEAD, false, SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_TIME, dirEntryHandler);
        dirs = dirEntryHandler.getDirs(isReverseByDate(), isReverseByName());
      }
    }
    catch(SVNException e) {
      // logs are not translated (IMO, this is a bad idea to translate logs)
View Full Code Here

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

            ISVNAuthenticationProvider authProvider =
                    CredentialsSVNAuthenticationProviderImpl
                            .createAuthenticationProvider(build.getParent(), scm, l);
            final SVNClientManager manager = SubversionSCM.createClientManager(authProvider).getCore();
            try {
                SVNLogClient svnlc = manager.getLogClient();
                PathContext context = getUrlForPath(workspace.child(l.getLocalDir()), authProvider);
                context.moduleWorkspacePath = l.getLocalDir();
                changelogFileCreated |= buildModule(context, svnlc, logHandler);
            } finally {
                manager.dispose();
            }
        }
        ISVNAuthenticationProvider authProvider =
                CredentialsSVNAuthenticationProviderImpl
                        .createAuthenticationProvider(build.getParent(), scm, null);
        final SVNClientManager manager = SubversionSCM.createClientManager(authProvider).getCore();
        try {
            SVNLogClient svnlc = manager.getLogClient();
            for(SubversionSCM.External ext : externals) {
                PathContext context = getUrlForPath(workspace.child(ext.path), authProvider);
                context.moduleWorkspacePath = ext.path;
                changelogFileCreated |= buildModule(context, svnlc, logHandler);
            }
View Full Code Here

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

            }
        });
    }

    private void list(String url, Revision revision, Revision pegRevision, int depth, int direntFields, boolean fetchLocks, ISVNDirEntryHandler handler) throws ClientException {
        SVNLogClient client = getSVNLogClient();
        try {
            if (isURL(url)) {
                client.doList(SVNURL.parseURIEncoded(url),
                        JavaHLObjectFactory.getSVNRevision(pegRevision),
                        JavaHLObjectFactory.getSVNRevision(revision),
                        fetchLocks,
                        JavaHLObjectFactory.getSVNDepth(depth),
                        direntFields, handler);
            } else {
                client.doList(new File(url).getAbsoluteFile(),
                        JavaHLObjectFactory.getSVNRevision(pegRevision),
                        JavaHLObjectFactory.getSVNRevision(revision),
                        fetchLocks,
                        JavaHLObjectFactory.getSVNDepth(depth),
                        direntFields, handler);
View Full Code Here

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

                }
        );
    }

    private void logMessages(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean stopOnCopy, boolean discoverPath, boolean includeMergeInfo, String[] revisionProperties, long limit, ISVNLogEntryHandler logEntryHandler) throws ClientException {
        SVNLogClient client = getSVNLogClient();
        try {
            if (revisionEnd == null || revisionEnd.getKind() == RevisionKind.unspecified) {
                revisionEnd = Revision.HEAD;
            }
            if (revisionStart != null && revisionStart.getKind() == RevisionKind.unspecified) {
                revisionStart = Revision.getInstance(1);
            }
            if (isURL(path)) {
                if (revisionStart == null) {
                    revisionStart = Revision.HEAD;
                }
                client.doLog(
                        SVNURL.parseURIEncoded(path), new String[]{""},
                        JavaHLObjectFactory.getSVNRevision(pegRevision),
                        JavaHLObjectFactory.getSVNRevision(revisionStart),
                        JavaHLObjectFactory.getSVNRevision(revisionEnd),
                        stopOnCopy, discoverPath, includeMergeInfo, limit, revisionProperties, logEntryHandler);
            } else {
                if (revisionStart == null) {
                    revisionStart = Revision.BASE;
                }
                client.doLog(
                        new File[]{new File(path).getAbsoluteFile()},
                        JavaHLObjectFactory.getSVNRevision(revisionStart),
                        JavaHLObjectFactory.getSVNRevision(revisionEnd),
                        JavaHLObjectFactory.getSVNRevision(pegRevision),
                        stopOnCopy, discoverPath, includeMergeInfo, limit, revisionProperties, logEntryHandler);
View Full Code Here

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

        };
        blame(path, pegRevision, revisionStart, revisionEnd, ignoreMimeType, includeMergedRevisions, handler);
    }

    private void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, ISVNAnnotateHandler handler) throws ClientException {
        SVNLogClient client = getSVNLogClient();
        try {
            if (isURL(path)) {
                client.doAnnotate(SVNURL.parseURIEncoded(path),
                        JavaHLObjectFactory.getSVNRevision(pegRevision),
                        JavaHLObjectFactory.getSVNRevision(revisionStart),
                        JavaHLObjectFactory.getSVNRevision(revisionEnd),
                        ignoreMimeType,
                        includeMergedRevisions,
                        handler,
                        null);
            } else {
                client.doAnnotate(new File(path).getAbsoluteFile(),
                        JavaHLObjectFactory.getSVNRevision(pegRevision),
                        JavaHLObjectFactory.getSVNRevision(revisionStart),
                        JavaHLObjectFactory.getSVNRevision(revisionEnd),
                        ignoreMimeType,
                        includeMergedRevisions,
View Full Code Here

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

        SVNRevision youngestRev = SVNRevision.create(youngestRange.getEndRevision());
        SVNMergeRange oldestRange = listRanges[0];
        SVNRevision oldestRev = SVNRevision.create(oldestRange.getStartRevision());
           
        LogHandlerFilter filterHandler = new LogHandlerFilter(handler, rangeList);
        SVNLogClient logClient = getLogClient();
        logClient.doLog(reposRootURL, paths, youngestRev, oldestRev, youngestRev, false, discoverChangedPaths,
                false, 0, revProps, filterHandler);
        checkCancelled();
    }
View Full Code Here

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

        return adjustedProperties;
    }

    protected SVNLogClient getLogClient() {
        if (myLogClient == null) {
            myLogClient = new SVNLogClient(getRepositoryPool(), getOptions());
        }
        return myLogClient;
    }
View Full Code Here

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

    return repository;
  }

  public void doLog(SVNURL url, long fromRevision, long toRevision,
      SvnLogEntryHandler logEntryHandler) throws SVNException {
    SVNLogClient logClient = clientManager.getLogClient();
    SVNRevision svnFromRevision = SVNRevision.create(fromRevision);
    SVNRevision svnToRevision = SVNRevision.create(toRevision);
        boolean needToRetry = true;
        int retries = 0;
        do {
            try {
                logClient.doLog(url, null, svnFromRevision, svnFromRevision,
                        svnToRevision, false, false, 0, logEntryHandler);
                needToRetry = false;
            } catch (SVNException e) {
                if(++retries <= MAX_RETRIES && !isFatalException(e)) {
                    logger.warn("Error retrieving revisions author. Retrying - attempt " +
View Full Code Here

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

        }while(needToRetry);               
  }

  public void doAnnotate(SVNURL url, String filename, long revision,
      SvnAnnotateHandler annotateHandler) throws SVNException {
      SVNLogClient logClient = clientManager.getLogClient();
        SVNURL fileUrl = SVNURL.parseURIDecoded(url.toDecodedString() + "/" +
                filename);
      boolean needToRetry = true;
        int retries = 0;
        do{
            try {
                logClient.doAnnotate(fileUrl, SVNRevision.create(revision), SVNRevision
                        .create(1), SVNRevision.create(revision), false,
                        annotateHandler, "UTF-8");
                needToRetry=false;
            } catch (SVNException e) {
                if(isBinaryFileException(e)){
View Full Code Here

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

            depth = SVNDepth.IMMEDIATES;
        }
        int fields = getSVNEnvironment().isXML() || getSVNEnvironment().isVerbose() ?
                SVNDirEntry.DIRENT_ALL : SVNDirEntry.DIRENT_KIND | SVNDirEntry.DIRENT_TIME;
        boolean fetchLocks = getSVNEnvironment().isXML() || getSVNEnvironment().isVerbose();
        SVNLogClient client = getSVNEnvironment().getClientManager().getLogClient();
        for (int i = 0; i < targets.size(); i++) {
            String targetName = (String) targets.get(i);
            SVNPath target = new SVNPath(targetName, true);
            if (getSVNEnvironment().isXML()) {
                StringBuffer buffer = openXMLTag("list", SVNXMLUtil.XML_STYLE_NORMAL, "path",
                        "".equals(target.getTarget()) ? "." : target.getTarget(), new StringBuffer());
                getSVNEnvironment().getOut().print(buffer.toString());
            }
            if (!target.isURL()) {
                client.doList(target.getFile(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this);
            } else {
                client.doList(target.getURL(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this);
            }
            if (getSVNEnvironment().isXML()) {
                StringBuffer buffer = closeXMLTag("list", new StringBuffer());
                getSVNEnvironment().getOut().print(buffer.toString());
            }
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.