Examples of SVNLogClient


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

        } else if (getSVNEnvironment().isIncremental()) {
            SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "'incremental' option only valid in XML mode"), SVNLogType.CLIENT);
        }
       
        myBuffer = new StringBuffer();
        SVNLogClient client = getSVNEnvironment().getClientManager().getLogClient();
        client.setDiffOptions(getSVNEnvironment().getDiffOptions());
        for (Iterator ts = targets.iterator(); ts.hasNext();) {
            String targetName = (String) ts.next();
            SVNPath target = new SVNPath(targetName, true);
            SVNRevision endRev = end;
            if (endRev == SVNRevision.UNDEFINED) {
                if (target.getPegRevision() != SVNRevision.UNDEFINED) {
                    endRev = target.getPegRevision();
                } else if (target.isURL()) {
                    endRev = SVNRevision.HEAD;
                } else {
                    endRev = SVNRevision.BASE;
                }
            }
            if (getSVNEnvironment().isXML()) {
                myBuffer = openXMLTag("target", SVNXMLUtil.XML_STYLE_NORMAL, "path", SVNCommandUtil.getLocalPath(target.getTarget()), myBuffer);
            }
            try {
                if (target.isFile()) {
                    client.doAnnotate(target.getFile(), target.getPegRevision(),
                                      start, endRev, getSVNEnvironment().isForce(),
                                      getSVNEnvironment().isUseMergeHistory(),
                                      this, null);
                } else {
                    client.doAnnotate(target.getURL(), target.getPegRevision(),
                                      start, endRev, getSVNEnvironment().isForce(),
                                      getSVNEnvironment().isUseMergeHistory(),
                                      this, null);
                }
                if (getSVNEnvironment().isXML()) {
View Full Code Here

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

        }

        myAuthorOfInterest = getSVNEnvironment().getAuthorOfInterest();
        myLogRegularExpression = getSVNEnvironment().getRegularExpression();
       
        SVNLogClient client = getSVNEnvironment().getClientManager().getLogClient();
        if (!getSVNEnvironment().isQuiet()) {
            client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment()));
        }
       
        String[] revProps = null;
        if (getSVNEnvironment().isXML()) {
            if (!getSVNEnvironment().isIncremental()) {
                printXMLHeader("log");   
            }
           
            if (!getSVNEnvironment().isAllRevisionProperties() &&
                    getSVNEnvironment().getRevisionProperties() != null &&
                    !getSVNEnvironment().getRevisionProperties().isEmpty()) {
                SVNProperties revPropNames = getSVNEnvironment().getRevisionProperties();
                revProps = new String[revPropNames.size()];
                int i = 0;
                for (Iterator propNames = revPropNames.nameSet().iterator(); propNames.hasNext();) {
                    String propName = (String) propNames.next();
                    String propVal = revPropNames.getStringValue(propName);
                    if (propVal.length() > 0) {
                        SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR,
                                "cannot assign with 'with-revprop' option (drop the '=')");
                        SVNErrorManager.error(err, SVNLogType.CLIENT);
                    }
                    revProps[i++] = propName;
                }
            } else if (!getSVNEnvironment().isAllRevisionProperties()) {
                if (!getSVNEnvironment().isQuiet()) {
                    revProps = new String[3];
                    revProps[0] = SVNRevisionProperty.AUTHOR;
                    revProps[1] = SVNRevisionProperty.DATE;
                    revProps[2] = SVNRevisionProperty.LOG;
                } else {
                    revProps = new String[2];
                    revProps[0] = SVNRevisionProperty.AUTHOR;
                    revProps[1] = SVNRevisionProperty.DATE;
                }
            }
        } else {
            if (!getSVNEnvironment().isQuiet()) {
                revProps = new String[3];
                revProps[0] = SVNRevisionProperty.AUTHOR;
                revProps[1] = SVNRevisionProperty.DATE;
                revProps[2] = SVNRevisionProperty.LOG;
            } else {
                revProps = new String[2];
                revProps[0] = SVNRevisionProperty.AUTHOR;
                revProps[1] = SVNRevisionProperty.DATE;
            }
        }

        if (target.isFile()) {
            client.doLog(new File[] {target.getFile()}, editedRevisionRangesList, target.getPegRevision(),
                    getSVNEnvironment().isStopOnCopy(), getSVNEnvironment().isVerbose(),
                    getSVNEnvironment().isUseMergeHistory(), getSVNEnvironment().getLimit(),
                    revProps, this);
        } else {
            targets.remove(0);
            String[] paths = (String[]) targets.toArray(new String[targets.size()]);
            client.doLog(target.getURL(), paths, target.getPegRevision(), editedRevisionRangesList,
                    getSVNEnvironment().isStopOnCopy(),
                    getSVNEnvironment().isVerbose(),
                    getSVNEnvironment().isUseMergeHistory(),
                    getSVNEnvironment().getLimit(), revProps, this);
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

    }

    private void dumpRepositoryContents() throws SVNException {
        System.out.println("Repository contents:");
        SVNURL repoURL = SVNURL.parseURIEncoded( "svn://localhost/");
        SVNLogClient logClient = new SVNLogClient((ISVNAuthenticationManager)null, null);
        logClient.doList(repoURL, SVNRevision.HEAD, SVNRevision.HEAD, false, true, new ISVNDirEntryHandler() {
            @Override
            public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException {
                System.out.println(dirEntry.getRelativePath());
            }
        });
View Full Code Here

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

    /** */
    @Override
    public void execute() throws Exception
    {
        SVNLogClient client = this.getTask().getSvnClient().getLogClient();
        SVNRevision start = SVNRevision.parse(this.startRevision);
        SVNRevision end = SVNRevision.parse(this.endRevision);

        final StringBuilder logBuffer = new StringBuilder(1024);
        if (this.url == null)
        {
            File filePath = new File(this.path);
            this.getTask().log("log " + filePath.getCanonicalPath() + " " + start.toString() + ":" + end.toString());
            client.doLog(new File[] { filePath }, end, start, end, this.stopOnCopy, this.discoverChangedPaths, this.includeMergedRevisions, this.limit, new String[] { }, this.getLogEntryHandler(logBuffer));
        }
        else
        {
            String path = (this.path == null || "".equals(this.path)) ? "/" : this.path;
            this.getTask().log("log " + this.url + (("/".equals(path)) ? "" : path) + " " + start.toString() + ":" + end.toString());
            client.doLog(SVNURL.parseURIDecoded(this.url), new String[] { path }, end, start, end, this.stopOnCopy, this.discoverChangedPaths, this.includeMergedRevisions, this.limit, new String[] { }, this.getLogEntryHandler(logBuffer));
        }

        logBuffer.append(ITEM_SEPARATOR + LINE_SEPARATOR);

        this.getProject().setProperty(this.logProperty, logBuffer.toString());
View Full Code Here

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

    try {
      final List<Commit> ret = new ArrayList<Commit>();
      SVNURL svnUrl = SVNURL.parseURIDecoded(url);
      SVNClientManager clientManager = SVNClientManager.newInstance(
          new DefaultSVNOptions(), username, password);
      SVNLogClient logClient = clientManager.getLogClient();
      logClient.doLog(svnUrl, new String[] { "." }, SVNRevision.HEAD,
          SVNRevision.HEAD, SVNRevision.create(0), true, true, 10,
          new ISVNLogEntryHandler() {
            @Override
            public void handleLogEntry(SVNLogEntry logEntry)
                throws SVNException {
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.