Package org.tmatesoft.svn.core.wc

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


   *
   * @param artifact   the Artifact to that EditorMarkup should be added
   * @param actionData needed for Subversion connection information so that svn blame can be executed
   */
  private void annotateWithEditor(Artifact artifact, ActionData actionData) {
    SVNLogClient logClient = SVNClientManager.newInstance().getLogClient();
    AnnotationHandler ah = new AnnotationHandler(artifact, actionData);
    SVNRevision rev = SVNRevision.create(actionData.getRevision());
    try {
      logClient.doAnnotate(actionData.getSourceURL(), rev, SVNRevision.create(1), rev, ah);
    } catch (Exception e) {
      logger.error("Failed to annotate with editor information", e);
    }
    ah.addLast();
  }
View Full Code Here


        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

        return adjustedProperties;
    }

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

public class SvnKitPathChangeChecker extends SvnKitAbstractClientManager implements
    SvnPathChangeChecker {

  public Set<String> getChangedPaths(SvnProject project, long targetRevision) throws SvnException {
    SVNLogClient logClient = managerPool.getSvnManager(project).getLogClient();
    final Set<String> changedPaths = new HashSet<String>();

    try {
      if (log.isDebugEnabled()) {
        log.debug("Getting changes from rev " + project.getLastCheckedVersion()
            + " to rev " + targetRevision);
      }

      // we want to check all the paths that have changed
      logClient.doLog(SVNURL.parseURIEncoded(project.getUrl()), new String[] { "" },
          SVNRevision.HEAD, SVNRevision.create(project.getLastCheckedVersion()),
          SVNRevision.create(targetRevision), true, true, 0, new ISVNLogEntryHandler() {

            public void handleLogEntry(SVNLogEntry entry) throws SVNException {
              for (Object key : entry.getChangedPaths().keySet()) {
View Full Code Here

        return getSvnCore().doWithClientAndRepository(new SvnPersisterCore.SvnOperation<String>() {
            @Override
            public String execute(final SVNRepository repo, final SVNClientManager clientManager) throws Exception {
                final String[] targetPaths = {};
                final SVNRevision svnRevision = SVNRevision.HEAD;
                final SVNLogClient logClient = clientManager.getLogClient();
                final FilterableSVNLogEntryHandler handler = new FilterableSVNLogEntryHandler();

                // In order to get history is "descending" order, the startRevision should be the one closer to HEAD
                logClient.doLog(svnUrl, targetPaths, /* pegRevision */ SVNRevision.HEAD, svnRevision, SVNRevision.create(1),
                                /* stopOnCopy */ false, /* discoverChangedPaths */ false, /* includeMergedRevisions */ false,
                                /* limit */ 1,
                                new String[]{SVNRevisionProperty.LOG}, handler);
                final SVNLogEntry entry = handler.getLogEntries().size() > 0 ? handler.getLogEntries().get(0) : null;
                return entry == null ? "-1" : String.valueOf(entry.getRevision());
View Full Code Here

    private List<Revision> getSVNLogs(final SVNClientManager clientManager,
                                      final String[] paths,
                                      final SVNRevision startRevision,
                                      final int start, final int limit) throws StoreException.ReadException {
        try {
            final SVNLogClient logClient = clientManager.getLogClient();
            final FilterableSVNLogEntryHandler handler = new FilterableSVNLogEntryHandler();

            // In order to get history is "descending" order, the startRevision should be the one closer to HEAD
            logClient.doLog(svnUrl, paths, /* pegRevision */ SVNRevision.HEAD, startRevision, SVNRevision.create(1),
                            /* stopOnCopy */ false, /* discoverChangedPaths */ false, /* includeMergedRevisions */ false,
                            /* limit */ start + limit,
                            new String[]{SVNRevisionProperty.LOG, SVNRevisionProperty.AUTHOR, SVNRevisionProperty.DATE}, handler);

            final List<SVNLogEntry> entries = handler.getLogEntries();
View Full Code Here

                    return null;
                }
                */
                final Long revision = fetchRevision.length() > 0 ? parseRevisionOrDie(fetchRevision) : Long.valueOf(-1);
                final SVNRevision svnRevision = revision.longValue() > 0 ? SVNRevision.create(revision.longValue()) : SVNRevision.HEAD;
                final SVNLogClient logClient = clientManager.getLogClient();
                final FilterableSVNDirEntryHandler handler = new FilterableSVNDirEntryHandler();
                final SVNURL url = SvnPersisterCoreImpl.this.svnUrl.appendPath(testDefPath, false);
                logClient.doList(url,
                                 svnRevision,
                                 svnRevision,
                                 /* fetchlocks */false,
                                 SVNDepth.IMMEDIATES,
                                 SVNDirEntry.DIRENT_KIND | SVNDirEntry.DIRENT_CREATED_REVISION,
View Full Code Here

     * @throws SVNException
     */
    private SVNLogEntry getMostRecentLogEntry(final SVNClientManager clientManager, final String path, final SVNRevision startRevision) throws SVNException {
        final String[] targetPaths = {path};

        final SVNLogClient logClient = clientManager.getLogClient();
        final FilterableSVNLogEntryHandler handler = new FilterableSVNLogEntryHandler();

        final int limit = 1;
        // In order to get history is "descending" order, the startRevision should be the one closer to HEAD
        // The path@head could be deleted - must use 'pegRevision' to get history at a deleted path
        logClient.doLog(svnUrl, targetPaths,
                    /* pegRevision */ startRevision,
                    /* startRevision */ startRevision,
                    /* endRevision */ SVNRevision.create(1),
                    /* stopOnCopy */ false,
                    /* discoverChangedPaths */ false,
View Full Code Here

                }
        );
    }

    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

        };
        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

TOP

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

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.