All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hudson.scm.SVNRevisionState Maven / Gradle / Ivy

package hudson.scm;

import java.io.Serializable;
import java.util.Map;
import java.util.Map.Entry;

/**
 * {@link SCMRevisionState} for {@link SubversionSCM}. {@link Serializable} since we compute
 * this remote.
 */
final class SVNRevisionState extends SCMRevisionState implements Serializable {
    /**
     * All the remote locations that we checked out. This includes those that are specified
     * explicitly via {@link SubversionSCM#getLocations()} as well as those that
     * are implicitly pulled in via svn:externals, but it excludes those locations that
     * are added via svn:externals in a way that fixes revisions.
     */
    final Map revisions;

    SVNRevisionState(Map revisions) {
        this.revisions = revisions;
    }

//    public PartialOrder compareTo(SCMRevisionState rhs) {
//        SVNRevisionState that = (SVNRevisionState)rhs;
//        return PartialOrder.from(that.hasNew(this), this.hasNew(that));
//    }
//
//    /**
//     * Does this object has something newer than the given object?
//     */
//    private boolean hasNew(SVNRevisionState that) {
//        for (Entry e : revisions.entrySet()) {
//            Long rhs = that.revisions.get(e.getKey());
//            if (rhs==null || e.getValue().compareTo(rhs)>0)
//                return true;
//        }
//        return false;
//    }

    private static final long serialVersionUID = 1L;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy