Package org.tmatesoft.svn.core.wc

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


        return "(working copy)";
    }

    private boolean defineEncoding(SVNProperties properties, SVNProperties diff) {
        if (myGenerator instanceof DefaultSVNDiffGenerator) {
            DefaultSVNDiffGenerator defaultGenerator = (DefaultSVNDiffGenerator) myGenerator;
            if (!defaultGenerator.hasEncoding()) {
                boolean hasOriginCharset = properties  == null ? false : properties.containsName(SVNProperty.CHARSET);
                String originCharset = properties == null ? null : properties.getStringValue(SVNProperty.CHARSET);
                boolean hasChangedCharset = diff == null ? false : diff.containsName(SVNProperty.CHARSET);
                String changedCharset = diff == null ? null : diff.getStringValue(SVNProperty.CHARSET);
                if (hasOriginCharset || (hasChangedCharset && changedCharset != null)) {
                    if (originCharset != null) {
                        defaultGenerator.setEncoding("UTF-8");
                        return false;
                    }
                    if (changedCharset != null) {
                        defaultGenerator.setEncoding("UTF-8");
                        return false;
                    }
                }
            }
        }
View Full Code Here


        return "(working copy)";
    }

    private boolean defineEncoding(SVNProperties properties, SVNProperties diff) {
        if (myGenerator instanceof DefaultSVNDiffGenerator) {
            DefaultSVNDiffGenerator defaultGenerator = (DefaultSVNDiffGenerator) myGenerator;
            if (!defaultGenerator.hasEncoding()) {
                boolean hasOriginCharset = properties  == null ? false : properties.containsName(SVNProperty.CHARSET);
                String originCharset = properties == null ? null : properties.getStringValue(SVNProperty.CHARSET);
                boolean hasChangedCharset = diff == null ? false : diff.containsName(SVNProperty.CHARSET);
                String changedCharset = diff == null ? null : diff.getStringValue(SVNProperty.CHARSET);
                if (hasOriginCharset || (hasChangedCharset && changedCharset != null)) {
                    if (originCharset != null) {
                        defaultGenerator.setEncoding("UTF-8");
                        return false;
                    }
                    if (changedCharset != null) {
                        defaultGenerator.setEncoding("UTF-8");
                        return false;
                    }
                }
            }
        }
View Full Code Here

        if (targets.isEmpty()) {
            targets.add("");
        }

        SVNDiffClient client = getSVNEnvironment().getClientManager().getDiffClient();
        DefaultSVNDiffGenerator diffGenerator = new DefaultSVNDiffGenerator();
        if (getSVNEnvironment().getDiffCommand() != null) {
            diffGenerator.setExternalDiffCommand(getSVNEnvironment().getDiffCommand());
            diffGenerator.setRawDiffOptions(getSVNEnvironment().getExtensions());
        } else {
            diffGenerator.setDiffOptions(getSVNEnvironment().getDiffOptions());
        }
       
        diffGenerator.setDiffDeleted(!getSVNEnvironment().isNoDiffDeleted());
        diffGenerator.setForcedBinaryDiff(getSVNEnvironment().isForce());
        diffGenerator.setBasePath(new File("").getAbsoluteFile());
        diffGenerator.setFallbackToAbsolutePath(true);
        diffGenerator.setOptions(client.getOptions());
        client.setDiffGenerator(diffGenerator);
       
        PrintStream ps = getSVNEnvironment().getOut();
        Collection changeLists = getSVNEnvironment().getChangelistsCollection();
        for(int i = 0; i < targets.size(); i++) {
View Full Code Here

TOP

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

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.