diff --git a/scm-core/src/main/java/sonia/scm/repository/Changeset.java b/scm-core/src/main/java/sonia/scm/repository/Changeset.java index d8c4a03ca0..efdb3fb16f 100644 --- a/scm-core/src/main/java/sonia/scm/repository/Changeset.java +++ b/scm-core/src/main/java/sonia/scm/repository/Changeset.java @@ -121,6 +121,7 @@ public class Changeset extends BasicPropertiesAware changeset.setTags(tags); changeset.setModifications(modifications); changeset.setProperties(properties); + changeset.setParents(parents); return changeset; } @@ -194,6 +195,12 @@ public class Changeset extends BasicPropertiesAware return false; } + if ((this.parents != other.parents) + && ((this.parents == null) ||!this.parents.equals(other.parents))) + { + return false; + } + return true; } @@ -229,6 +236,9 @@ public class Changeset extends BasicPropertiesAware hash = 47 * hash + ((this.tags != null) ? this.tags.hashCode() : 0); + hash = 47 * hash + ((this.parents != null) + ? this.parents.hashCode() + : 0); return hash; } @@ -245,6 +255,12 @@ public class Changeset extends BasicPropertiesAware StringBuilder out = new StringBuilder("changeset: "); out.append(id).append("\n"); + + if (parents != null) + { + out.append("parents: ").append(Util.toString(parents)).append("\n"); + } + out.append("author: ").append(author).append("\n"); if (date != null) @@ -342,6 +358,23 @@ public class Changeset extends BasicPropertiesAware return modifications; } + /** + * Method description + * + * + * @return + * @since 1.11 + */ + public List getParents() + { + if (parents == null) + { + parents = new ArrayList(); + } + + return parents; + } + /** * Method description * @@ -439,6 +472,18 @@ public class Changeset extends BasicPropertiesAware this.modifications = modifications; } + /** + * Method description + * + * + * @param parents + * @since 1.11 + */ + public void setParents(List parents) + { + this.parents = parents; + } + /** * Method description * @@ -471,6 +516,9 @@ public class Changeset extends BasicPropertiesAware @XmlElement(name = "modifications") private Modifications modifications; + /** parent changeset ids */ + private List parents; + /** The tags associated with the changeset */ private List tags; }