Examples of SVNLookClient


Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

        boolean isRevProp = getCommandLine().hasArgument(SVNArgument.REV_PROP);
        File reposRoot = new File(getCommandLine().getPathAt(0))
        String propertyName = getCommandLine().getPathCount() < 2 ? null : getCommandLine().getPathAt(1);
        SVNRevision revision = SVNRevision.HEAD;
        SVNLookClient lookClient = getClientManager().getLookClient();
       
        if (getCommandLine().hasArgument(SVNArgument.TRANSACTION)) {
            String transactionName = (String) getCommandLine().getArgumentValue(SVNArgument.TRANSACTION);
            String path = null;
            String value = null;
            if (isRevProp) {
                value = lookClient.doGetRevisionProperty(reposRoot, propertyName, transactionName);
            } else {
                path = getCommandLine().getPathCount() < 3 ? null : SVNPathUtil.canonicalizeAbsPath(getCommandLine().getPathAt(2));
                value = lookClient.doGetProperty(reposRoot, propertyName, path, transactionName);
            }
            if (value == null) {
                if (path == null) {
                    SVNCommand.println(err, "Property '" + propertyName + "' not found on transaction '" + transactionName + "'");
                    System.exit(1);
                } else {
                    SVNCommand.println(err, "Property '" + propertyName + "' not found on path '" + path + "' in transaction '" + transactionName + "'");
                    System.exit(1);
                }
            }
            SVNCommand.print(out, value);
            return;
        } else if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
            revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
        }

        String path = null;
        String value = null;
        if (isRevProp) {
            value = lookClient.doGetRevisionProperty(reposRoot, propertyName, revision);
        } else {
            path = getCommandLine().getPathCount() < 3 ? null : SVNPathUtil.canonicalizeAbsPath(getCommandLine().getPathAt(2));
            value = lookClient.doGetProperty(reposRoot, propertyName, path, revision);
        }
        if (value == null) {
            long revNum = -1;
            if (SVNRevision.isValidRevisionNumber(revision.getNumber())) {
                 revNum = revision.getNumber();
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

        }
        File reposRoot = new File(getCommandLine().getPathAt(0))
        String path = SVNPathUtil.canonicalizeAbsPath(getCommandLine().getPathAt(1));
       
        SVNRevision revision = SVNRevision.HEAD;
        SVNLookClient lookClient = getClientManager().getLookClient();
        if (getCommandLine().hasArgument(SVNArgument.TRANSACTION)) {
            String transactionName = (String) getCommandLine().getArgumentValue(SVNArgument.TRANSACTION);
            lookClient.doCat(reposRoot, path, transactionName, out);
            return;
        } else if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
            revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
        }
        lookClient.doCat(reposRoot, path, revision, out);
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

        boolean isRevProp = getCommandLine().hasArgument(SVNArgument.REV_PROP);
        boolean isVerbose = getCommandLine().hasArgument(SVNArgument.VERBOSE);
        File reposRoot = new File(getCommandLine().getPathAt(0))
        SVNRevision revision = SVNRevision.HEAD;
        SVNLookClient lookClient = getClientManager().getLookClient();
       
        if (getCommandLine().hasArgument(SVNArgument.TRANSACTION)) {
            String transactionName = (String) getCommandLine().getArgumentValue(SVNArgument.TRANSACTION);
            Map props = null;
            if (isRevProp) {
                props = lookClient.doGetRevisionProperties(reposRoot, transactionName);
            } else {
                String path = getCommandLine().getPathCount() < 2 ? null : SVNPathUtil.canonicalizeAbsPath(getCommandLine().getPathAt(2));
                props = lookClient.doGetProperties(reposRoot, path, transactionName);
            }
            printProps(out, props, isVerbose);
            return;
        } else if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
            revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
        }

        Map props = null;
        if (isRevProp) {
            props = lookClient.doGetRevisionProperties(reposRoot, revision);
        } else {
            String path = getCommandLine().getPathCount() < 2 ? null : SVNPathUtil.canonicalizeAbsPath(getCommandLine().getPathAt(2));
            props = lookClient.doGetProperties(reposRoot, path, revision);
        }
        printProps(out, props, isVerbose);
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

        if (!getCommandLine().hasPaths()) {
            SVNCommand.println(err, "jsvnlook: Repository argument required");
            System.exit(1);
        }
        File reposRoot = new File(getCommandLine().getPathAt(0))
        SVNLookClient lookClient = getClientManager().getLookClient();
        SVNCommand.println(out, lookClient.doGetUUID(reposRoot));
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

            System.exit(1);
        }
        File reposRoot = new File(getCommandLine().getPathAt(0))
        String path = SVNPathUtil.canonicalizeAbsPath(getCommandLine().getPathAt(1));

        SVNLookClient lookClient = getClientManager().getLookClient();
        SVNLock lock = lookClient.doGetLock(reposRoot, path);
        if (lock != null) {
            String creationTime = SVNLookDateCommand.formatDate(lock.getCreationDate());
            String expirationTime = lock.getExpirationDate() != null ? SVNLookDateCommand.formatDate(lock.getExpirationDate()) : "";
            int commentLines = 0;
            if (lock.getComment() != null) {
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

            SVNCommand.println(err, "jsvnlook: Repository argument required");
            System.exit(1);
        }
        File reposRoot = new File(getCommandLine().getPathAt(0))
        SVNRevision revision = SVNRevision.HEAD;
        SVNLookClient lookClient = getClientManager().getLookClient();
       
        if (getCommandLine().hasArgument(SVNArgument.TRANSACTION)) {
            String transactionName = (String) getCommandLine().getArgumentValue(SVNArgument.TRANSACTION);
            SVNLogEntry entry = lookClient.doGetInfo(reposRoot, transactionName);
            printInfo(entry, out);
            return;
        } else if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
            revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
        }

        SVNLogEntry entry = lookClient.doGetInfo(reposRoot, revision);
        printInfo(entry, out);
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

        if (!getCommandLine().hasPaths()) {
            SVNCommand.println(err, "jsvnlook: Repository argument required");
            System.exit(1);
        }
        File reposRoot = new File(getCommandLine().getPathAt(0))
        SVNLookClient lookClient = getClientManager().getLookClient();
        SVNCommand.println(out, String.valueOf(lookClient.doGetYoungestRevision(reposRoot)));
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

            path = SVNPathUtil.canonicalizeAbsPath(getCommandLine().getPathAt(1));
        }
        myIsIncludeIDs = getCommandLine().hasArgument(SVNArgument.SHOW_IDS);
       
        SVNRevision revision = SVNRevision.HEAD;
        SVNLookClient lookClient = getClientManager().getLookClient();
        if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
            revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
        }
        if (myIsIncludeIDs) {
            SVNCommand.println(myOut, "REVISION   PATH <ID>");
            SVNCommand.println(myOut, "--------   ---------");
        } else {
            SVNCommand.println(myOut, "REVISION   PATH");
            SVNCommand.println(myOut, "--------   ----");
        }
        lookClient.doGetHistory(reposRoot, path, revision, myIsIncludeIDs, this);
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

     *
     * @return an <b>SVNLookClient</b> instance
     */
    public SVNLookClient getLookClient() {
        if (myLookClient == null) {
            myLookClient = new SVNLookClient(this, myOptions);
            myLookClient.setEventHandler(myEventHandler);
            myLookClient.setDebugLog(getDebugLog());
            myLookClient.setIgnoreExternals(myIsIgnoreExternals);
        }
        return myLookClient;
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.admin.SVNLookClient

        return options;
    }

    public void run() throws SVNException {
        SVNLookCommandEnvironment environment = getSVNLookEnvironment();
        SVNLookClient client = environment.getClientManager().getLookClient();
       
        String path = environment.getFirstArgument();
        if (environment.isRevision()) {
            client.doGetTree(environment.getRepositoryFile(), path,
                    getRevisionObject(), environment.isShowIDs(), !environment.isNonRecursive(), this);
        } else {
            client.doGetTree(environment.getRepositoryFile(), path, environment.getTransaction(),
                    environment.isShowIDs(), !environment.isNonRecursive(), this);
        }
    }
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.