Package hudson.plugins.git

Examples of hudson.plugins.git.GitChangeSet


     * @param path
     * @return
     * @throws IOException
     */
    private URL getDiffLinkRegardlessOfEditType(Path path) throws IOException {
        final GitChangeSet changeSet = path.getChangeSet();
        final ArrayList<String> affectedPaths = new ArrayList<String>(changeSet.getAffectedPaths());
        // Github seems to sort the output alphabetically by the path.
        Collections.sort(affectedPaths);
        final String pathAsString = path.getPath();
        final int i = Collections.binarySearch(affectedPaths, pathAsString);
        assert i >= 0;
View Full Code Here


    public URL getDiffLink(Path path) throws IOException {
        if (path.getEditType() != EditType.EDIT || path.getSrc() == null || path.getDst() == null
            || path.getChangeSet().getParentCommit() == null) {
            return null;
        }
        GitChangeSet changeSet = path.getChangeSet();
        String spec = param().add("a=blobdiff").add("f=" + path.getPath()).add("fp=" + path.getPath())
            .add("h=" + path.getSrc()).add("hp=" + path.getDst())
            .add("hb=" + changeSet.getId()).add("hpb=" + changeSet.getParentCommit()).toString();
        return new URL(url, url.getPath() + spec);
    }
View Full Code Here

     * @return diff link
     * @throws IOException
     */
    @Override
    public URL getDiffLink(Path path) throws IOException {
        final GitChangeSet changeSet = path.getChangeSet();
        final URL changeSetLink = new URL(url, "revisions/" + changeSet.getId().toString());
        final URL difflink;
        if (path.getEditType().equals(EditType.ADD)) {
            difflink = getFileLink(path);
        } else {
            difflink = new URL(changeSetLink, changeSetLink.getPath() + "/diff/" + path.getPath());
View Full Code Here

     * @return diff link
     * @throws IOException
     */
    @Override
    public URL getDiffLink(Path path) throws IOException {
        GitChangeSet changeSet = path.getChangeSet();
        return new URL(url,
            url.getPath() + "diff/" + path.getPath() + param().add("id=" + changeSet.getId()).toString());
    }
View Full Code Here

     * @return diff link
     * @throws IOException
     */
    @Override
    public URL getFileLink(Path path) throws IOException {
        GitChangeSet changeSet = path.getChangeSet();

        if (path.getEditType() == EditType.DELETE) {
            return new URL(url,
                url.getPath() + "tree/" + path.getPath() + param().add("id=" + changeSet.getParentCommit()).toString());
        } else {
            return new URL(url,
                url.getPath() + "tree/" + path.getPath() + param().add("id=" + changeSet.getId()).toString());
        }
    }
View Full Code Here

        for (LinkMarkup markup : MARKUPS) {
            markup.process(text, base);
        }
       
        if(change instanceof GitChangeSet) {
            GitChangeSet cs = (GitChangeSet)change;
            text.wrapBy("", " (<a href='"+url.commitId(cs.getId())+"'>commit: "+cs.getId()+"</a>)");
        }
    }
View Full Code Here

TOP

Related Classes of hudson.plugins.git.GitChangeSet

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.