diff options
Diffstat (limited to 'subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java')
-rw-r--r-- | subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java b/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java index 70af3d0..e2eb268 100644 --- a/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java +++ b/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java @@ -37,13 +37,9 @@ import org.apache.subversion.javahl.SubversionException; */ public class Mergeinfo implements java.io.Serializable { - // Update the serialVersionUID when there is a incompatible change - // made to this class. See any of the following, depending upon - // the Java release. - // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html - // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf - // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678 - // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678 + // Update the serialVersionUID when there is a incompatible change made to + // this class. See the java documentation for when a change is incompatible. + // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678 private static final long serialVersionUID = 1L; /** @@ -69,6 +65,31 @@ public class Mergeinfo implements java.io.Serializable } /** + * The three ways to request mergeinfo affecting a given path + * in {@link org.apache.subversion.javahl.ISVNRemote#getMergeinfo}. + * @since 1.9 + */ + public static enum Inheritance + { + /** Explicit mergeinfo only. */ + explicit, + + /** + * Explicit mergeinfo, or if that doesn't exist, the inherited + * mergeinfo from a target's nearest (path-wise, not history-wise) + * ancestor. + */ + inherited, + + /** + * Mergeinfo inherited from a target's nearest (path-wise, + * not history-wise) ancestor, regardless of whether target + * has explicit mergeinfo. + */ + nearest_ancestor; + } + + /** * Add one or more RevisionRange objects to merge info. If the * merge source is already stored, the list of revisions is * replaced. @@ -83,6 +104,11 @@ public class Mergeinfo implements java.io.Serializable addRevisionRange(mergeSrc, range); } + public void addRevisions(String mergeSrc, RevisionRangeList ranges) + { + addRevisions(mergeSrc, ranges.getRanges()); + } + /** * Add a revision range to the merged revisions for a path. If * the merge source already has associated revision ranges, add @@ -131,6 +157,14 @@ public class Mergeinfo implements java.io.Serializable } /** + * Like {@link #getReivsionRange}, but returns a {@link RevisionRangeList}. + */ + public RevisionRangeList getRevisionRangeList(String mergeSrc) + { + return new RevisionRangeList(getRevisionRange(mergeSrc)); + } + + /** * Parse the <code>svn:mergeinfo</code> property to populate the * merge source URLs and revision ranges of this instance. * @param mergeinfo <code>svn:mergeinfo</code> property value. |